@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,88 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { render, fireEvent } from "@testing-library/react-native";
|
|
4
|
+
import { Text } from "react-native";
|
|
5
|
+
import ThemeProvider from "../../Theme";
|
|
6
|
+
import List from "..";
|
|
7
|
+
const data = [
|
|
8
|
+
{ key: "Devin" },
|
|
9
|
+
{ key: "Dan" },
|
|
10
|
+
{ key: "Dominic" },
|
|
11
|
+
{ key: "Jackson" },
|
|
12
|
+
{ key: "James" },
|
|
13
|
+
{ key: "Joel" },
|
|
14
|
+
{ key: "John" },
|
|
15
|
+
{ key: "Jillian" },
|
|
16
|
+
{ key: "Jimmy" },
|
|
17
|
+
{ key: "Julie" }
|
|
18
|
+
];
|
|
19
|
+
describe("<List />", () => {
|
|
20
|
+
describe("Snapshots", () => {
|
|
21
|
+
describe("Without props", () => {
|
|
22
|
+
it("should match snapshot with a default list", () => {
|
|
23
|
+
const { toJSON } = render(
|
|
24
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(
|
|
25
|
+
List,
|
|
26
|
+
{
|
|
27
|
+
data,
|
|
28
|
+
renderItem: ({ item }) => /* @__PURE__ */ jsx(List.Item, { children: /* @__PURE__ */ jsx(Text, { children: item.key }) })
|
|
29
|
+
}
|
|
30
|
+
) })
|
|
31
|
+
);
|
|
32
|
+
expect(toJSON()).toMatchSnapshot();
|
|
33
|
+
});
|
|
34
|
+
it("should match snapshot with a small list", () => {
|
|
35
|
+
const { toJSON } = render(
|
|
36
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(
|
|
37
|
+
List,
|
|
38
|
+
{
|
|
39
|
+
data,
|
|
40
|
+
renderItem: ({ item }) => /* @__PURE__ */ jsx(List.Item, { small: true, children: /* @__PURE__ */ jsx(Text, { children: item.key }) })
|
|
41
|
+
}
|
|
42
|
+
) })
|
|
43
|
+
);
|
|
44
|
+
expect(toJSON()).toMatchSnapshot();
|
|
45
|
+
});
|
|
46
|
+
it("should match snapshot with a list without divisors", () => {
|
|
47
|
+
const { toJSON } = render(
|
|
48
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(
|
|
49
|
+
List,
|
|
50
|
+
{
|
|
51
|
+
data,
|
|
52
|
+
renderItem: ({ item }) => /* @__PURE__ */ jsx(List.Item, { divided: false, children: /* @__PURE__ */ jsx(Text, { children: item.key }) })
|
|
53
|
+
}
|
|
54
|
+
) })
|
|
55
|
+
);
|
|
56
|
+
expect(toJSON()).toMatchSnapshot();
|
|
57
|
+
});
|
|
58
|
+
it("should match snapshot with a horizontal list", () => {
|
|
59
|
+
const { toJSON } = render(
|
|
60
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(
|
|
61
|
+
List,
|
|
62
|
+
{
|
|
63
|
+
horizontal: true,
|
|
64
|
+
data,
|
|
65
|
+
renderItem: ({ item }) => /* @__PURE__ */ jsx(List.Item, { children: /* @__PURE__ */ jsx(Text, { children: item.key }) })
|
|
66
|
+
}
|
|
67
|
+
) })
|
|
68
|
+
);
|
|
69
|
+
expect(toJSON()).toMatchSnapshot();
|
|
70
|
+
});
|
|
71
|
+
it("should call onPress when selectable item is pressed", () => {
|
|
72
|
+
const a = { key: "Devin", onPress: jest.fn() };
|
|
73
|
+
const { getByText } = render(
|
|
74
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(
|
|
75
|
+
List,
|
|
76
|
+
{
|
|
77
|
+
data: [a],
|
|
78
|
+
renderItem: ({ item }) => /* @__PURE__ */ jsx(List.Item, { onPress: item.onPress, children: /* @__PURE__ */ jsx(Text, { children: item.key }) })
|
|
79
|
+
}
|
|
80
|
+
) })
|
|
81
|
+
);
|
|
82
|
+
const selectableItem = getByText(a.key);
|
|
83
|
+
fireEvent.press(selectableItem);
|
|
84
|
+
expect(a.onPress).toHaveBeenCalled();
|
|
85
|
+
});
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
});
|
|
@@ -0,0 +1,109 @@
|
|
|
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 { TouchableHighlight } from "react-native";
|
|
32
|
+
import PropTypes from "prop-types";
|
|
33
|
+
import styled, { withTheme } from "styled-components";
|
|
34
|
+
const StyledView = styled.View(
|
|
35
|
+
({
|
|
36
|
+
divided,
|
|
37
|
+
small,
|
|
38
|
+
theme: {
|
|
39
|
+
yoga: {
|
|
40
|
+
components: { list }
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}) => `
|
|
44
|
+
${divided ? `
|
|
45
|
+
border-bottom-width: ${list.border.width}px;
|
|
46
|
+
border-bottom-color: ${list.border.color};
|
|
47
|
+
` : ""}
|
|
48
|
+
|
|
49
|
+
${small ? `
|
|
50
|
+
padding:
|
|
51
|
+
${list.listItem.small.padding.top}px
|
|
52
|
+
${list.listItem.small.padding.right}px
|
|
53
|
+
${list.listItem.small.padding.bottom}px
|
|
54
|
+
${list.listItem.small.padding.left}px;
|
|
55
|
+
` : `
|
|
56
|
+
padding:
|
|
57
|
+
${list.listItem.padding.top}px
|
|
58
|
+
${list.listItem.padding.right}px
|
|
59
|
+
${list.listItem.padding.bottom}px
|
|
60
|
+
${list.listItem.padding.left}px;
|
|
61
|
+
`}
|
|
62
|
+
`
|
|
63
|
+
);
|
|
64
|
+
const ListItem = (_a) => {
|
|
65
|
+
var _b = _a, {
|
|
66
|
+
theme: {
|
|
67
|
+
yoga: {
|
|
68
|
+
components: {
|
|
69
|
+
list: { listItem }
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
small,
|
|
74
|
+
divided,
|
|
75
|
+
onPress
|
|
76
|
+
} = _b, rest = __objRest(_b, [
|
|
77
|
+
"theme",
|
|
78
|
+
"small",
|
|
79
|
+
"divided",
|
|
80
|
+
"onPress"
|
|
81
|
+
]);
|
|
82
|
+
const Component = /* @__PURE__ */ jsx(StyledView, __spreadValues({ small, divided }, rest));
|
|
83
|
+
if (onPress) {
|
|
84
|
+
return /* @__PURE__ */ jsx(
|
|
85
|
+
TouchableHighlight,
|
|
86
|
+
{
|
|
87
|
+
onPress,
|
|
88
|
+
underlayColor: listItem.selectable.color,
|
|
89
|
+
children: Component
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
return Component;
|
|
94
|
+
};
|
|
95
|
+
ListItem.propTypes = {
|
|
96
|
+
small: PropTypes.bool,
|
|
97
|
+
divided: PropTypes.bool,
|
|
98
|
+
onPress: PropTypes.func
|
|
99
|
+
};
|
|
100
|
+
ListItem.defaultProps = {
|
|
101
|
+
small: false,
|
|
102
|
+
divided: true,
|
|
103
|
+
onPress: void 0
|
|
104
|
+
};
|
|
105
|
+
ListItem.displayName = "List.Item";
|
|
106
|
+
var ListItem_default = withTheme(ListItem);
|
|
107
|
+
export {
|
|
108
|
+
ListItem_default as default
|
|
109
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
const Menu = ({ spacing, radii, colors, fontWeights }) => ({
|
|
2
|
+
border: {
|
|
3
|
+
radius: radii.small
|
|
4
|
+
},
|
|
5
|
+
width: {
|
|
6
|
+
min: 176,
|
|
7
|
+
max: 280
|
|
8
|
+
},
|
|
9
|
+
margin: {
|
|
10
|
+
default: spacing.small,
|
|
11
|
+
medium: spacing.medium,
|
|
12
|
+
xxsmall: spacing.xxsmall
|
|
13
|
+
},
|
|
14
|
+
padding: {
|
|
15
|
+
horizontal: spacing.small,
|
|
16
|
+
vertical: spacing.xxsmall
|
|
17
|
+
},
|
|
18
|
+
backgroundColor: {
|
|
19
|
+
white: colors.white,
|
|
20
|
+
disabled: colors.elements.backgroundAndDisabled
|
|
21
|
+
},
|
|
22
|
+
text: {
|
|
23
|
+
default: {
|
|
24
|
+
color: colors.text.primary
|
|
25
|
+
},
|
|
26
|
+
active: {
|
|
27
|
+
color: colors.primary
|
|
28
|
+
},
|
|
29
|
+
disabled: {
|
|
30
|
+
color: colors.text.disabled
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
font: {
|
|
34
|
+
weight: fontWeights.medium
|
|
35
|
+
},
|
|
36
|
+
icon: {
|
|
37
|
+
disabled: colors.elements.selectionAndIcons
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
var Menu_theme_default = Menu;
|
|
41
|
+
export {
|
|
42
|
+
Menu_theme_default as default
|
|
43
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Menu from "./web/Menu";
|
|
2
|
+
import MenuAction from "./web/MenuAction";
|
|
3
|
+
import MenuList from "./web/MenuList";
|
|
4
|
+
import MenuItem from "./web/MenuItem";
|
|
5
|
+
Menu.Action = MenuAction;
|
|
6
|
+
Menu.List = MenuList;
|
|
7
|
+
Menu.Item = MenuItem;
|
|
8
|
+
var Menu_default = Menu;
|
|
9
|
+
export {
|
|
10
|
+
Menu_default as default
|
|
11
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const Progress = ({ spacing, colors, radii, fontSizes }) => ({
|
|
2
|
+
height: spacing.xxsmall,
|
|
3
|
+
backgroundColor: {
|
|
4
|
+
bar: colors.elements.backgroundAndDisabled
|
|
5
|
+
},
|
|
6
|
+
border: {
|
|
7
|
+
radius: radii.small
|
|
8
|
+
},
|
|
9
|
+
label: {
|
|
10
|
+
font: {
|
|
11
|
+
size: fontSizes.xsmall
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
var Progress_theme_default = Progress;
|
|
16
|
+
export {
|
|
17
|
+
Progress_theme_default as default
|
|
18
|
+
};
|
|
@@ -0,0 +1,198 @@
|
|
|
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, number, shape, oneOfType, oneOf } from "prop-types";
|
|
36
|
+
import {
|
|
37
|
+
backgroundColor,
|
|
38
|
+
borders,
|
|
39
|
+
elevation,
|
|
40
|
+
positions,
|
|
41
|
+
display,
|
|
42
|
+
spacing as systemSpacing
|
|
43
|
+
} from "@gympass/yoga-system";
|
|
44
|
+
import { charLength } from "../../shared";
|
|
45
|
+
const ProgressWrapper = styled.View`
|
|
46
|
+
width: 100%;
|
|
47
|
+
|
|
48
|
+
${({ isNumber, align }) => `
|
|
49
|
+
|
|
50
|
+
${isNumber ? `
|
|
51
|
+
flex-direction: row;
|
|
52
|
+
` : `
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
`}
|
|
55
|
+
|
|
56
|
+
${isNumber && align === "left" ? "flex-direction: row-reverse;" : ""}
|
|
57
|
+
`}
|
|
58
|
+
|
|
59
|
+
${backgroundColor}
|
|
60
|
+
${borders}
|
|
61
|
+
${elevation}
|
|
62
|
+
${positions}
|
|
63
|
+
${display}
|
|
64
|
+
${systemSpacing}
|
|
65
|
+
`;
|
|
66
|
+
const ProgressBar = styled.View`
|
|
67
|
+
position: relative;
|
|
68
|
+
flex-grow: 1;
|
|
69
|
+
|
|
70
|
+
margin: auto 0;
|
|
71
|
+
|
|
72
|
+
${({
|
|
73
|
+
theme: {
|
|
74
|
+
yoga: {
|
|
75
|
+
components: { progress }
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}) => `
|
|
79
|
+
height: ${progress.height}px;
|
|
80
|
+
|
|
81
|
+
background-color: ${progress.backgroundColor.bar};
|
|
82
|
+
|
|
83
|
+
border-radius: ${progress.border.radius}px;
|
|
84
|
+
`};
|
|
85
|
+
`;
|
|
86
|
+
const ProgressValue = styled.View`
|
|
87
|
+
position: absolute;
|
|
88
|
+
|
|
89
|
+
height: 100%;
|
|
90
|
+
|
|
91
|
+
${({
|
|
92
|
+
variant,
|
|
93
|
+
width,
|
|
94
|
+
theme: {
|
|
95
|
+
yoga: {
|
|
96
|
+
colors: { [variant]: color },
|
|
97
|
+
components: { progress }
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}) => `
|
|
101
|
+
width: ${width}%;
|
|
102
|
+
|
|
103
|
+
background-color: ${color};
|
|
104
|
+
|
|
105
|
+
border-radius: ${progress.border.radius}px;
|
|
106
|
+
`}
|
|
107
|
+
`;
|
|
108
|
+
const Label = styled.Text`
|
|
109
|
+
${({
|
|
110
|
+
isNumber,
|
|
111
|
+
align,
|
|
112
|
+
theme: {
|
|
113
|
+
yoga: {
|
|
114
|
+
baseFont,
|
|
115
|
+
spacing,
|
|
116
|
+
colors,
|
|
117
|
+
components: { progress }
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}) => `
|
|
121
|
+
font-family: ${baseFont.family};
|
|
122
|
+
font-size: ${progress.label.font.size}px;
|
|
123
|
+
text-align: ${align};
|
|
124
|
+
color: ${colors.deep};
|
|
125
|
+
|
|
126
|
+
${isNumber ? `
|
|
127
|
+
width: 22px;
|
|
128
|
+
|
|
129
|
+
margin-${align === "right" ? "left" : "right"}: ${spacing.xxsmall}px;
|
|
130
|
+
` : `
|
|
131
|
+
margin-top: ${spacing.xxxsmall}px;
|
|
132
|
+
`}
|
|
133
|
+
`}
|
|
134
|
+
`;
|
|
135
|
+
const Progress = React.forwardRef(
|
|
136
|
+
(_a, ref) => {
|
|
137
|
+
var _b = _a, { label, max, value, variant } = _b, props = __objRest(_b, ["label", "max", "value", "variant"]);
|
|
138
|
+
const isNumber = !/[a-zA-Z]/g.test(label.value);
|
|
139
|
+
const align = label.placement || "left";
|
|
140
|
+
return /* @__PURE__ */ jsxs(ProgressWrapper, __spreadProps(__spreadValues({ ref }, props), { isNumber, align, children: [
|
|
141
|
+
/* @__PURE__ */ jsx(ProgressBar, { children: /* @__PURE__ */ jsx(ProgressValue, { width: value / max * 100, variant }) }),
|
|
142
|
+
Object.keys(label).length > 0 && (isNumber || label.value) && /* @__PURE__ */ jsx(Label, { isNumber, align, children: label.value })
|
|
143
|
+
] }));
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
Progress.propTypes = {
|
|
147
|
+
/** Use labels to increase users understanding. If the value is numeric, make
|
|
148
|
+
* sure it has a maximum of 3 characters */
|
|
149
|
+
label: shape({
|
|
150
|
+
value: charLength(3, oneOfType([number, string])),
|
|
151
|
+
placement: oneOf(["left", "right"])
|
|
152
|
+
}),
|
|
153
|
+
/** This attribute describes how much work the task indicated by the progress
|
|
154
|
+
* element requires. The max attribute, if present, must have a value greater
|
|
155
|
+
* than zero and be a valid floating point number. The default value is 1. */
|
|
156
|
+
max: number,
|
|
157
|
+
/** This attribute specifies how much of the task that has been completed. It
|
|
158
|
+
* must be a valid floating point number between 0 and max, or between 0 and 1
|
|
159
|
+
* if max is omitted. If there is no value attribute, the progress bar is
|
|
160
|
+
* indeterminate; this indicates that an activity is ongoing with no
|
|
161
|
+
* indication of how long it is expected to take. */
|
|
162
|
+
value: number,
|
|
163
|
+
/** style the card following the theme (primary, secondary, vibin, hope,
|
|
164
|
+
* energy, relax, peace, verve, uplift, deepPurple, deep, stamina, dark,
|
|
165
|
+
* medium, light, clear, white) */
|
|
166
|
+
variant: oneOf([
|
|
167
|
+
"primary",
|
|
168
|
+
"secondary",
|
|
169
|
+
"vibin",
|
|
170
|
+
"hope",
|
|
171
|
+
"energy",
|
|
172
|
+
"relax",
|
|
173
|
+
"peace",
|
|
174
|
+
"verve",
|
|
175
|
+
"uplift",
|
|
176
|
+
"deepPurple",
|
|
177
|
+
"stamina",
|
|
178
|
+
"dark",
|
|
179
|
+
"medium",
|
|
180
|
+
"deep",
|
|
181
|
+
"light",
|
|
182
|
+
"clear",
|
|
183
|
+
"white"
|
|
184
|
+
])
|
|
185
|
+
};
|
|
186
|
+
Progress.defaultProps = {
|
|
187
|
+
label: {
|
|
188
|
+
value: void 0,
|
|
189
|
+
placement: "left"
|
|
190
|
+
},
|
|
191
|
+
max: 1,
|
|
192
|
+
value: void 0,
|
|
193
|
+
variant: "verve"
|
|
194
|
+
};
|
|
195
|
+
var Progress_default = Progress;
|
|
196
|
+
export {
|
|
197
|
+
Progress_default as default
|
|
198
|
+
};
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { render } from "@testing-library/react-native";
|
|
4
|
+
import { ThemeProvider, Progress } from "../..";
|
|
5
|
+
describe("<Progress />", () => {
|
|
6
|
+
it("should match snapshot", () => {
|
|
7
|
+
const { toJSON } = render(
|
|
8
|
+
/* @__PURE__ */ jsxs(ThemeProvider, { children: [
|
|
9
|
+
/* @__PURE__ */ jsx(Progress, {}),
|
|
10
|
+
/* @__PURE__ */ jsx(Progress, { max: 100 }),
|
|
11
|
+
/* @__PURE__ */ jsx(Progress, { max: 100, value: 60 })
|
|
12
|
+
] })
|
|
13
|
+
);
|
|
14
|
+
expect(toJSON()).toMatchSnapshot();
|
|
15
|
+
});
|
|
16
|
+
it("should match snapshot with label string", () => {
|
|
17
|
+
const { toJSON } = render(
|
|
18
|
+
/* @__PURE__ */ jsxs(ThemeProvider, { children: [
|
|
19
|
+
/* @__PURE__ */ jsx(Progress, { max: 100, label: { value: "Some decription here" } }),
|
|
20
|
+
/* @__PURE__ */ jsx(
|
|
21
|
+
Progress,
|
|
22
|
+
{
|
|
23
|
+
max: 100,
|
|
24
|
+
value: 65,
|
|
25
|
+
label: { value: "Some decription here", placement: "right" }
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
] })
|
|
29
|
+
);
|
|
30
|
+
expect(toJSON()).toMatchSnapshot();
|
|
31
|
+
});
|
|
32
|
+
it("should match snapshot with label number", () => {
|
|
33
|
+
const { toJSON } = render(
|
|
34
|
+
/* @__PURE__ */ jsxs(ThemeProvider, { children: [
|
|
35
|
+
/* @__PURE__ */ jsx(Progress, { max: 100, value: 20, label: { value: 20 } }),
|
|
36
|
+
/* @__PURE__ */ jsx(
|
|
37
|
+
Progress,
|
|
38
|
+
{
|
|
39
|
+
max: 100,
|
|
40
|
+
value: 65,
|
|
41
|
+
label: { value: 65, placement: "right" }
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
] })
|
|
45
|
+
);
|
|
46
|
+
expect(toJSON()).toMatchSnapshot();
|
|
47
|
+
});
|
|
48
|
+
it("should match snapshot with all variants", () => {
|
|
49
|
+
const { toJSON } = render(
|
|
50
|
+
/* @__PURE__ */ jsxs(ThemeProvider, { children: [
|
|
51
|
+
/* @__PURE__ */ jsx(
|
|
52
|
+
Progress,
|
|
53
|
+
{
|
|
54
|
+
max: 100,
|
|
55
|
+
value: 20,
|
|
56
|
+
label: { value: 20 },
|
|
57
|
+
variant: "primary"
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
/* @__PURE__ */ jsx(
|
|
61
|
+
Progress,
|
|
62
|
+
{
|
|
63
|
+
max: 100,
|
|
64
|
+
value: 20,
|
|
65
|
+
label: { value: 20 },
|
|
66
|
+
variant: "secondary"
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
/* @__PURE__ */ jsx(Progress, { max: 100, value: 20, label: { value: 20 }, variant: "vibin" }),
|
|
70
|
+
/* @__PURE__ */ jsx(Progress, { max: 100, value: 20, label: { value: 20 }, variant: "hope" }),
|
|
71
|
+
/* @__PURE__ */ jsx(Progress, { max: 100, value: 20, label: { value: 20 }, variant: "energy" }),
|
|
72
|
+
/* @__PURE__ */ jsx(Progress, { max: 100, value: 20, label: { value: 20 }, variant: "relax" }),
|
|
73
|
+
/* @__PURE__ */ jsx(Progress, { max: 100, value: 20, label: { value: 20 }, variant: "peace" }),
|
|
74
|
+
/* @__PURE__ */ jsx(Progress, { max: 100, value: 20, label: { value: 20 }, variant: "verve" }),
|
|
75
|
+
/* @__PURE__ */ jsx(Progress, { max: 100, value: 20, label: { value: 20 }, variant: "uplift" }),
|
|
76
|
+
/* @__PURE__ */ jsx(
|
|
77
|
+
Progress,
|
|
78
|
+
{
|
|
79
|
+
max: 100,
|
|
80
|
+
value: 20,
|
|
81
|
+
label: { value: 20 },
|
|
82
|
+
variant: "deepPurple"
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
/* @__PURE__ */ jsx(
|
|
86
|
+
Progress,
|
|
87
|
+
{
|
|
88
|
+
max: 100,
|
|
89
|
+
value: 20,
|
|
90
|
+
label: { value: 20 },
|
|
91
|
+
variant: "stamina"
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
/* @__PURE__ */ jsx(Progress, { max: 100, value: 20, label: { value: 20 }, variant: "dark" }),
|
|
95
|
+
/* @__PURE__ */ jsx(Progress, { max: 100, value: 20, label: { value: 20 }, variant: "medium" }),
|
|
96
|
+
/* @__PURE__ */ jsx(Progress, { max: 100, value: 20, label: { value: 20 }, variant: "deep" }),
|
|
97
|
+
/* @__PURE__ */ jsx(Progress, { max: 100, value: 20, label: { value: 20 }, variant: "light" }),
|
|
98
|
+
/* @__PURE__ */ jsx(Progress, { max: 100, value: 20, label: { value: 20 }, variant: "clear" }),
|
|
99
|
+
/* @__PURE__ */ jsx(Progress, { max: 100, value: 20, label: { value: 20 }, variant: "white" })
|
|
100
|
+
] })
|
|
101
|
+
);
|
|
102
|
+
expect(toJSON()).toMatchSnapshot();
|
|
103
|
+
});
|
|
104
|
+
it("should match snapshot with positions prop system", () => {
|
|
105
|
+
const { toJSON } = render(
|
|
106
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Progress, { position: "absolute", top: "small", left: "small" }) })
|
|
107
|
+
);
|
|
108
|
+
expect(toJSON()).toMatchSnapshot();
|
|
109
|
+
});
|
|
110
|
+
it("should match snapshot with spacing prop system", () => {
|
|
111
|
+
const { toJSON } = render(
|
|
112
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Progress, { m: "small", padding: "medium" }) })
|
|
113
|
+
);
|
|
114
|
+
expect(toJSON()).toMatchSnapshot();
|
|
115
|
+
});
|
|
116
|
+
it("should match snapshot with background color prop system", () => {
|
|
117
|
+
const { toJSON } = render(
|
|
118
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Progress, { backgroundColor: "primary" }) })
|
|
119
|
+
);
|
|
120
|
+
expect(toJSON()).toMatchSnapshot();
|
|
121
|
+
});
|
|
122
|
+
it("should match snapshot with border prop system", () => {
|
|
123
|
+
const { toJSON } = render(
|
|
124
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Progress, { b: "small", bRadius: "small" }) })
|
|
125
|
+
);
|
|
126
|
+
expect(toJSON()).toMatchSnapshot();
|
|
127
|
+
});
|
|
128
|
+
it("should match snapshot with elevation prop system", () => {
|
|
129
|
+
const { toJSON } = render(
|
|
130
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Progress, { elevation: "small" }) })
|
|
131
|
+
);
|
|
132
|
+
expect(toJSON()).toMatchSnapshot();
|
|
133
|
+
});
|
|
134
|
+
});
|