@gympass/yoga 7.88.0 → 7.88.1
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/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/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,128 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { render } from "@testing-library/react-native";
|
|
4
|
+
import { BuildingFilled } from "@gympass/yoga-icons";
|
|
5
|
+
import { ThemeProvider } from "../..";
|
|
6
|
+
import Result from "./Result";
|
|
7
|
+
import Avatar from "../../Avatar";
|
|
8
|
+
import Text from "../../Text";
|
|
9
|
+
const attendanceList = [
|
|
10
|
+
{
|
|
11
|
+
description: "Attendance 01",
|
|
12
|
+
icon: BuildingFilled
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
description: "Attendance 02",
|
|
16
|
+
icon: BuildingFilled
|
|
17
|
+
}
|
|
18
|
+
];
|
|
19
|
+
const entranceList = [
|
|
20
|
+
{
|
|
21
|
+
children: "From 7:30 am to 9:00 pm",
|
|
22
|
+
variant: "stamina"
|
|
23
|
+
}
|
|
24
|
+
];
|
|
25
|
+
const activitiesList = [
|
|
26
|
+
{
|
|
27
|
+
children: "Yoga",
|
|
28
|
+
variant: "deep"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
children: "Meditation",
|
|
32
|
+
variant: "deep"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
children: "Pilates",
|
|
36
|
+
variant: "deep"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
children: "Activity4",
|
|
40
|
+
variant: "deep"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
children: "Activity5",
|
|
44
|
+
variant: "deep"
|
|
45
|
+
}
|
|
46
|
+
];
|
|
47
|
+
const tagsList = [
|
|
48
|
+
{
|
|
49
|
+
children: "Plan x Product availability",
|
|
50
|
+
variant: "informative"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
children: "Restriction",
|
|
54
|
+
variant: "attention"
|
|
55
|
+
}
|
|
56
|
+
];
|
|
57
|
+
describe("<Result />", () => {
|
|
58
|
+
it("should match snapshot", () => {
|
|
59
|
+
const { toJSON } = render(
|
|
60
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsxs(
|
|
61
|
+
Result,
|
|
62
|
+
{
|
|
63
|
+
rate: "5.0",
|
|
64
|
+
avatar: /* @__PURE__ */ jsx(Avatar.Circle, {}),
|
|
65
|
+
attendances: attendanceList,
|
|
66
|
+
title: "Jane Doe",
|
|
67
|
+
subTitle: "Activity",
|
|
68
|
+
divided: true,
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ jsx(Result.Details, { items: entranceList, dots: true, renderItem: Text.Small }),
|
|
71
|
+
/* @__PURE__ */ jsx(
|
|
72
|
+
Result.Details,
|
|
73
|
+
{
|
|
74
|
+
items: activitiesList,
|
|
75
|
+
dots: true,
|
|
76
|
+
limit: 3,
|
|
77
|
+
renderItem: Text.Small,
|
|
78
|
+
limitLabel: "activities"
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ jsx(Result.Tags, { items: tagsList }),
|
|
82
|
+
/* @__PURE__ */ jsx(Result.Button, { children: "See Details" })
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
) })
|
|
86
|
+
);
|
|
87
|
+
expect(toJSON()).toMatchSnapshot();
|
|
88
|
+
});
|
|
89
|
+
it("should match snapshot without limitLabel prop", () => {
|
|
90
|
+
const { toJSON } = render(
|
|
91
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsxs(
|
|
92
|
+
Result,
|
|
93
|
+
{
|
|
94
|
+
rate: "5.0",
|
|
95
|
+
avatar: /* @__PURE__ */ jsx(Avatar.Circle, {}),
|
|
96
|
+
attendances: attendanceList,
|
|
97
|
+
title: "John Doe",
|
|
98
|
+
subTitle: "Activity",
|
|
99
|
+
divided: true,
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ jsx(Result.Details, { items: entranceList, dots: true, renderItem: Text.Small }),
|
|
102
|
+
/* @__PURE__ */ jsx(
|
|
103
|
+
Result.Details,
|
|
104
|
+
{
|
|
105
|
+
items: activitiesList,
|
|
106
|
+
dots: true,
|
|
107
|
+
limit: 2,
|
|
108
|
+
renderItem: Text.Small
|
|
109
|
+
}
|
|
110
|
+
),
|
|
111
|
+
/* @__PURE__ */ jsx(Result.Tags, { items: tagsList }),
|
|
112
|
+
/* @__PURE__ */ jsx(Result.Button, { children: "See Details" })
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
) })
|
|
116
|
+
);
|
|
117
|
+
expect(toJSON()).toMatchSnapshot();
|
|
118
|
+
});
|
|
119
|
+
it("should match snapshot without attendence", () => {
|
|
120
|
+
const { toJSON } = render(
|
|
121
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsxs(Result, { avatar: /* @__PURE__ */ jsx(Avatar, {}), title: "Gym", children: [
|
|
122
|
+
/* @__PURE__ */ jsx(Result.Details, { items: entranceList, dots: true }),
|
|
123
|
+
/* @__PURE__ */ jsx(Result.Details, { items: activitiesList, dots: true })
|
|
124
|
+
] }) })
|
|
125
|
+
);
|
|
126
|
+
expect(toJSON()).toMatchSnapshot();
|
|
127
|
+
});
|
|
128
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import Button from "../../Button";
|
|
3
|
+
const ResultButton = styled(Button.Link)`
|
|
4
|
+
${({
|
|
5
|
+
theme: {
|
|
6
|
+
yoga: {
|
|
7
|
+
spacing: { xxsmall, xlarge }
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
}) => {
|
|
11
|
+
return `
|
|
12
|
+
margin-top: ${xxsmall}px;
|
|
13
|
+
margin-right: ${xlarge}px;
|
|
14
|
+
`;
|
|
15
|
+
}}
|
|
16
|
+
`;
|
|
17
|
+
var ResultButton_default = ResultButton;
|
|
18
|
+
export {
|
|
19
|
+
ResultButton_default as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
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 { jsx } from "react/jsx-runtime";
|
|
30
|
+
import React from "react";
|
|
31
|
+
import { arrayOf, shape } from "prop-types";
|
|
32
|
+
import styled from "styled-components";
|
|
33
|
+
import Tag from "../../Tag";
|
|
34
|
+
const TagStyled = styled(Tag.Informative)`
|
|
35
|
+
margin-right: 4px;
|
|
36
|
+
`;
|
|
37
|
+
const Wrapper = styled.ScrollView`
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: row;
|
|
40
|
+
${({
|
|
41
|
+
theme: {
|
|
42
|
+
yoga: {
|
|
43
|
+
spacing: { xxsmall }
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}) => `
|
|
47
|
+
margin-top: ${xxsmall}px;
|
|
48
|
+
`}
|
|
49
|
+
`;
|
|
50
|
+
const ResultTags = ({ items }) => /* @__PURE__ */ jsx(Wrapper, { horizontal: true, showsHorizontalScrollIndicator: false, children: items.map((_a, index) => {
|
|
51
|
+
var props = __objRest(_a, []);
|
|
52
|
+
return (
|
|
53
|
+
// eslint-disable-next-line react/no-array-index-key
|
|
54
|
+
/* @__PURE__ */ jsx(TagStyled, __spreadValues({ small: true }, props), index)
|
|
55
|
+
);
|
|
56
|
+
}) });
|
|
57
|
+
ResultTags.displayName = "Result.Tags";
|
|
58
|
+
ResultTags.propTypes = {
|
|
59
|
+
/** Props to generate each Tag. See Tag for details */
|
|
60
|
+
items: arrayOf(shape({})).isRequired
|
|
61
|
+
};
|
|
62
|
+
var Tags_default = ResultTags;
|
|
63
|
+
export {
|
|
64
|
+
Tags_default as default
|
|
65
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
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 Box from "../../Box";
|
|
23
|
+
import Icon from "../../Icon";
|
|
24
|
+
const TinyTextIcon = (props) => /* @__PURE__ */ jsx(Box, { height: "xsmall", width: "xsmall", children: /* @__PURE__ */ jsx(Icon, __spreadProps(__spreadValues({}, props), { size: "xsmall", mt: "2px" })) });
|
|
25
|
+
TinyTextIcon.propTypes = Icon.propTypes;
|
|
26
|
+
var TinyTextIcon_default = TinyTextIcon;
|
|
27
|
+
export {
|
|
28
|
+
TinyTextIcon_default as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
const Skeleton = ({ lineHeights, radii }) => ({
|
|
2
|
+
border: {
|
|
3
|
+
circular: radii.circle
|
|
4
|
+
},
|
|
5
|
+
height: {
|
|
6
|
+
text: {
|
|
7
|
+
h1: lineHeights.huge,
|
|
8
|
+
h2: lineHeights.xxxlarge,
|
|
9
|
+
h3: lineHeights.xxlarge,
|
|
10
|
+
h4: lineHeights.xlarge,
|
|
11
|
+
h5: lineHeights.large,
|
|
12
|
+
body1: lineHeights.medium,
|
|
13
|
+
body2: lineHeights.small,
|
|
14
|
+
overline: lineHeights.xsmall,
|
|
15
|
+
exception: lineHeights.xxsmall
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
var Skeleton_theme_default = Skeleton;
|
|
20
|
+
export {
|
|
21
|
+
Skeleton_theme_default as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,142 @@
|
|
|
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 { jsx } from "react/jsx-runtime";
|
|
30
|
+
import { checkPropTypes, oneOf } from "prop-types";
|
|
31
|
+
import React, { useEffect, useState } from "react";
|
|
32
|
+
import { Animated, Easing } from "react-native";
|
|
33
|
+
import styled from "styled-components";
|
|
34
|
+
import { margins, widths, heights } from "@gympass/yoga-system";
|
|
35
|
+
const StyledSkeleton = styled.View`
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
|
|
39
|
+
${margins}
|
|
40
|
+
|
|
41
|
+
${widths}
|
|
42
|
+
|
|
43
|
+
${heights}
|
|
44
|
+
|
|
45
|
+
${({
|
|
46
|
+
type,
|
|
47
|
+
variant,
|
|
48
|
+
theme: {
|
|
49
|
+
yoga: {
|
|
50
|
+
colors,
|
|
51
|
+
components: {
|
|
52
|
+
skeleton: {
|
|
53
|
+
border: { [type]: borderRadius },
|
|
54
|
+
height: { [type]: { [variant]: height } = {} }
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}) => `
|
|
60
|
+
background-color: ${colors.elements.backgroundAndDisabled};
|
|
61
|
+
${borderRadius ? `border-radius: ${borderRadius}px;` : ""}
|
|
62
|
+
${height ? `height: ${height}px;` : ""}
|
|
63
|
+
`}
|
|
64
|
+
`;
|
|
65
|
+
function Skeleton(_a) {
|
|
66
|
+
var _b = _a, { animation = "pulse" } = _b, props = __objRest(_b, ["animation"]);
|
|
67
|
+
const [opacity] = useState(new Animated.Value(0.4));
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
if (animation) {
|
|
70
|
+
Animated.loop(
|
|
71
|
+
Animated.sequence([
|
|
72
|
+
Animated.timing(opacity, {
|
|
73
|
+
toValue: 1,
|
|
74
|
+
delay: 500,
|
|
75
|
+
duration: 1e3,
|
|
76
|
+
easing: Easing.inOut(Easing.linear),
|
|
77
|
+
useNativeDriver: true
|
|
78
|
+
}),
|
|
79
|
+
Animated.timing(opacity, {
|
|
80
|
+
toValue: 0.4,
|
|
81
|
+
duration: 500,
|
|
82
|
+
easing: Easing.inOut(Easing.linear),
|
|
83
|
+
useNativeDriver: true
|
|
84
|
+
})
|
|
85
|
+
])
|
|
86
|
+
).start();
|
|
87
|
+
}
|
|
88
|
+
}, [opacity]);
|
|
89
|
+
return /* @__PURE__ */ jsx(Animated.View, { style: { opacity }, children: /* @__PURE__ */ jsx(StyledSkeleton, __spreadValues({}, props)) });
|
|
90
|
+
}
|
|
91
|
+
Skeleton.propTypes = {
|
|
92
|
+
/**
|
|
93
|
+
* Determines which type will be rendered. It can be
|
|
94
|
+
* 'circular', 'rectangular' or 'text'.
|
|
95
|
+
*/
|
|
96
|
+
type: oneOf(["circular", "rectangular", "text"]).isRequired,
|
|
97
|
+
/**
|
|
98
|
+
* style the skeleton following the theme (the variant prop can only be used assemble to type "text").
|
|
99
|
+
* It can be 'h1', 'h2', 'h3', 'h4', 'h5', 'body1', 'body2', 'overline', or 'exception'
|
|
100
|
+
*/
|
|
101
|
+
variant: (props, propName, componentName) => {
|
|
102
|
+
const { type } = props;
|
|
103
|
+
if (type !== "text" && !!props[propName]) {
|
|
104
|
+
return new Error(
|
|
105
|
+
`The ${propName} prop must only be used when the type is equal to "text".`
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
if (type === "text") {
|
|
109
|
+
return checkPropTypes(
|
|
110
|
+
{
|
|
111
|
+
[propName]: oneOf([
|
|
112
|
+
"h1",
|
|
113
|
+
"h2",
|
|
114
|
+
"h3",
|
|
115
|
+
"h4",
|
|
116
|
+
"h5",
|
|
117
|
+
"body1",
|
|
118
|
+
"body2",
|
|
119
|
+
"overline",
|
|
120
|
+
"exception"
|
|
121
|
+
]).isRequired
|
|
122
|
+
},
|
|
123
|
+
props,
|
|
124
|
+
"prop",
|
|
125
|
+
componentName
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
return null;
|
|
129
|
+
},
|
|
130
|
+
/**
|
|
131
|
+
* Determine if the animation will 'pulse' or false;
|
|
132
|
+
*/
|
|
133
|
+
animation: oneOf(["pulse", false])
|
|
134
|
+
};
|
|
135
|
+
Skeleton.defaultProps = {
|
|
136
|
+
variant: void 0,
|
|
137
|
+
animation: "pulse"
|
|
138
|
+
};
|
|
139
|
+
var Skeleton_default = Skeleton;
|
|
140
|
+
export {
|
|
141
|
+
Skeleton_default as default
|
|
142
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { render } from "@testing-library/react-native";
|
|
4
|
+
import { ThemeProvider, Skeleton } from "../..";
|
|
5
|
+
describe("<Skeleton />", () => {
|
|
6
|
+
it("should render the circular skeleton", () => {
|
|
7
|
+
const { toJSON } = render(
|
|
8
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Skeleton, { type: "circular", width: 64, height: 64 }) })
|
|
9
|
+
);
|
|
10
|
+
expect(toJSON()).toMatchSnapshot();
|
|
11
|
+
});
|
|
12
|
+
it("should render the rectangular skeleton", () => {
|
|
13
|
+
const { toJSON } = render(
|
|
14
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Skeleton, { type: "rectangular", width: 400, height: 200 }) })
|
|
15
|
+
);
|
|
16
|
+
expect(toJSON()).toMatchSnapshot();
|
|
17
|
+
});
|
|
18
|
+
it("should render the text skeleton", () => {
|
|
19
|
+
const { toJSON } = render(
|
|
20
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Skeleton, { type: "text", variant: "body1", width: 61, height: 32 }) })
|
|
21
|
+
);
|
|
22
|
+
expect(toJSON()).toMatchSnapshot();
|
|
23
|
+
});
|
|
24
|
+
it("should render all text skeleton variants correctly", () => {
|
|
25
|
+
const { toJSON } = render(
|
|
26
|
+
/* @__PURE__ */ jsxs(ThemeProvider, { children: [
|
|
27
|
+
/* @__PURE__ */ jsx(Skeleton, { type: "text", variant: "h1", width: "100" }),
|
|
28
|
+
/* @__PURE__ */ jsx(Skeleton, { type: "text", variant: "h2", width: "100" }),
|
|
29
|
+
/* @__PURE__ */ jsx(Skeleton, { type: "text", variant: "h3", width: "100" }),
|
|
30
|
+
/* @__PURE__ */ jsx(Skeleton, { type: "text", variant: "h4", width: "100" }),
|
|
31
|
+
/* @__PURE__ */ jsx(Skeleton, { type: "text", variant: "h5", width: "100" }),
|
|
32
|
+
/* @__PURE__ */ jsx(Skeleton, { type: "text", variant: "body1", width: "100" }),
|
|
33
|
+
/* @__PURE__ */ jsx(Skeleton, { type: "text", variant: "body2", width: "100" }),
|
|
34
|
+
/* @__PURE__ */ jsx(Skeleton, { type: "text", variant: "overline", width: "100" }),
|
|
35
|
+
/* @__PURE__ */ jsx(Skeleton, { type: "text", variant: "exception", width: "100" })
|
|
36
|
+
] })
|
|
37
|
+
);
|
|
38
|
+
expect(toJSON()).toMatchSnapshot();
|
|
39
|
+
});
|
|
40
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
const Slider = ({
|
|
2
|
+
colors,
|
|
3
|
+
radii,
|
|
4
|
+
elevations,
|
|
5
|
+
spacing,
|
|
6
|
+
fontWeights,
|
|
7
|
+
fontSizes
|
|
8
|
+
}) => ({
|
|
9
|
+
track: {
|
|
10
|
+
backgroundColor: {
|
|
11
|
+
active: colors.primary,
|
|
12
|
+
inactive: colors.elements.lineAndBorders
|
|
13
|
+
},
|
|
14
|
+
border: {
|
|
15
|
+
radius: radii.circle
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
step: {
|
|
19
|
+
backgroundColor: {
|
|
20
|
+
active: colors.primary,
|
|
21
|
+
inactive: colors.elements.lineAndBorders
|
|
22
|
+
},
|
|
23
|
+
border: {
|
|
24
|
+
radius: radii.circle
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
marker: {
|
|
28
|
+
backgroundColor: colors.primary,
|
|
29
|
+
border: {
|
|
30
|
+
color: colors.white,
|
|
31
|
+
radius: radii.circle
|
|
32
|
+
},
|
|
33
|
+
shadow: elevations.small
|
|
34
|
+
},
|
|
35
|
+
tooltip: {
|
|
36
|
+
shadow: elevations.medium,
|
|
37
|
+
radius: radii.small,
|
|
38
|
+
backgroundColor: colors.elements.backgroundAndDisabled,
|
|
39
|
+
distance: spacing.large,
|
|
40
|
+
padding: {
|
|
41
|
+
top: spacing.xxxsmall,
|
|
42
|
+
right: spacing.xxsmall,
|
|
43
|
+
bottom: spacing.xxxsmall,
|
|
44
|
+
left: spacing.xxsmall
|
|
45
|
+
},
|
|
46
|
+
font: {
|
|
47
|
+
color: colors.text.secondary,
|
|
48
|
+
title: {
|
|
49
|
+
weight: fontWeights.regular
|
|
50
|
+
},
|
|
51
|
+
description: {
|
|
52
|
+
weight: fontWeights.regular
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
ribbon: {
|
|
56
|
+
backgroundColor: colors.primary,
|
|
57
|
+
radius: radii.small,
|
|
58
|
+
padding: {
|
|
59
|
+
top: spacing.xxxsmall,
|
|
60
|
+
right: spacing.xxsmall,
|
|
61
|
+
bottom: spacing.xxxsmall,
|
|
62
|
+
left: spacing.xxsmall
|
|
63
|
+
},
|
|
64
|
+
font: {
|
|
65
|
+
color: colors.white,
|
|
66
|
+
weight: fontWeights.bold,
|
|
67
|
+
size: fontSizes.xsmall
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
var Slider_theme_default = Slider;
|
|
73
|
+
export {
|
|
74
|
+
Slider_theme_default as default
|
|
75
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import styled from "styled-components";
|
|
2
|
+
import { oneOf } from "prop-types";
|
|
3
|
+
const LabelView = styled.View`
|
|
4
|
+
align-items: center;
|
|
5
|
+
flex-direction: row;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
`;
|
|
8
|
+
const LabelText = styled.Text(
|
|
9
|
+
({
|
|
10
|
+
placement,
|
|
11
|
+
theme: {
|
|
12
|
+
yoga: { baseFont }
|
|
13
|
+
}
|
|
14
|
+
}) => `
|
|
15
|
+
position: relative;
|
|
16
|
+
bottom: 5;
|
|
17
|
+
left: ${placement === "left" ? -8 : 0}px;
|
|
18
|
+
|
|
19
|
+
font-family: ${baseFont.family};
|
|
20
|
+
|
|
21
|
+
text-align: ${placement};
|
|
22
|
+
`
|
|
23
|
+
);
|
|
24
|
+
LabelText.propTypes = {
|
|
25
|
+
placement: oneOf(["left", "right"])
|
|
26
|
+
};
|
|
27
|
+
LabelText.defaultProps = {
|
|
28
|
+
placement: "left"
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
LabelText,
|
|
32
|
+
LabelView
|
|
33
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { TouchableOpacity, View } from "react-native";
|
|
4
|
+
import { bool, number, shape, string } from "prop-types";
|
|
5
|
+
import styled from "styled-components";
|
|
6
|
+
import { hexToRgb } from "@gympass/yoga-common";
|
|
7
|
+
import Tooltip from "./Tooltip";
|
|
8
|
+
import Box from "../../Box";
|
|
9
|
+
const Circle = styled(Box).attrs(
|
|
10
|
+
({
|
|
11
|
+
theme: {
|
|
12
|
+
yoga: {
|
|
13
|
+
components: { slider }
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}) => ({
|
|
17
|
+
bgColor: slider.marker.backgroundColor,
|
|
18
|
+
border: 6,
|
|
19
|
+
borderColor: slider.marker.border.color,
|
|
20
|
+
borderRadius: slider.marker.border.radius,
|
|
21
|
+
elevation: slider.marker.shadow,
|
|
22
|
+
height: 24,
|
|
23
|
+
width: 24,
|
|
24
|
+
top: "2px",
|
|
25
|
+
position: "relative",
|
|
26
|
+
as: TouchableOpacity
|
|
27
|
+
})
|
|
28
|
+
)``;
|
|
29
|
+
const CirclePressed = styled(Circle)(
|
|
30
|
+
({
|
|
31
|
+
pressed,
|
|
32
|
+
theme: {
|
|
33
|
+
yoga: {
|
|
34
|
+
components: { slider }
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}) => `
|
|
38
|
+
${pressed ? `
|
|
39
|
+
background-color: ${hexToRgb(slider.marker.backgroundColor, 0.2)};
|
|
40
|
+
border: none;
|
|
41
|
+
width: 40px;
|
|
42
|
+
height: 40px;
|
|
43
|
+
position: absolute;
|
|
44
|
+
elevation: 0;
|
|
45
|
+
top: -6px;
|
|
46
|
+
` : "display: none; border: none;"}
|
|
47
|
+
`
|
|
48
|
+
);
|
|
49
|
+
CirclePressed.propTypes = {
|
|
50
|
+
pressed: bool
|
|
51
|
+
};
|
|
52
|
+
CirclePressed.defaultProps = {
|
|
53
|
+
pressed: false
|
|
54
|
+
};
|
|
55
|
+
const Marker = ({ pressed, tooltip }) => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
56
|
+
pressed && tooltip && /* @__PURE__ */ jsx(
|
|
57
|
+
Tooltip,
|
|
58
|
+
{
|
|
59
|
+
description: tooltip.description,
|
|
60
|
+
title: tooltip.title,
|
|
61
|
+
ribbon: tooltip.ribbon
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
/* @__PURE__ */ jsx(CirclePressed, { as: View, pressed }),
|
|
65
|
+
/* @__PURE__ */ jsx(Circle, { accessible: true, accessibilityRole: "adjustable" })
|
|
66
|
+
] });
|
|
67
|
+
Marker.propTypes = {
|
|
68
|
+
pressed: bool,
|
|
69
|
+
tooltip: shape({
|
|
70
|
+
description: string,
|
|
71
|
+
title: string,
|
|
72
|
+
ribbon: string,
|
|
73
|
+
visible: bool,
|
|
74
|
+
step: number
|
|
75
|
+
})
|
|
76
|
+
};
|
|
77
|
+
Marker.defaultProps = {
|
|
78
|
+
pressed: false,
|
|
79
|
+
tooltip: void 0
|
|
80
|
+
};
|
|
81
|
+
var Marker_default = Marker;
|
|
82
|
+
export {
|
|
83
|
+
Marker_default as default
|
|
84
|
+
};
|