@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,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Text,
|
|
3
|
+
H1,
|
|
4
|
+
H2,
|
|
5
|
+
H3,
|
|
6
|
+
H4,
|
|
7
|
+
H5,
|
|
8
|
+
Small,
|
|
9
|
+
Tiny,
|
|
10
|
+
Light,
|
|
11
|
+
Regular,
|
|
12
|
+
Medium,
|
|
13
|
+
Bold,
|
|
14
|
+
Black,
|
|
15
|
+
SectionTitle,
|
|
16
|
+
SmallestException
|
|
17
|
+
} from "./web";
|
|
18
|
+
Text.H1 = H1;
|
|
19
|
+
Text.H2 = H2;
|
|
20
|
+
Text.H3 = H3;
|
|
21
|
+
Text.H4 = H4;
|
|
22
|
+
Text.H5 = H5;
|
|
23
|
+
Text.Small = Small;
|
|
24
|
+
Text.Tiny = Tiny;
|
|
25
|
+
Text.Light = Light;
|
|
26
|
+
Text.Regular = Regular;
|
|
27
|
+
Text.Medium = Medium;
|
|
28
|
+
Text.Bold = Bold;
|
|
29
|
+
Text.Black = Black;
|
|
30
|
+
Text.SectionTitle = SectionTitle;
|
|
31
|
+
Text.SmallestException = SmallestException;
|
|
32
|
+
var Text_default = Text;
|
|
33
|
+
export {
|
|
34
|
+
Text_default as default
|
|
35
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Text,
|
|
3
|
+
H1,
|
|
4
|
+
H2,
|
|
5
|
+
H3,
|
|
6
|
+
H4,
|
|
7
|
+
H5,
|
|
8
|
+
Small,
|
|
9
|
+
Tiny,
|
|
10
|
+
Light,
|
|
11
|
+
Regular,
|
|
12
|
+
Medium,
|
|
13
|
+
Bold,
|
|
14
|
+
Black,
|
|
15
|
+
SectionTitle,
|
|
16
|
+
SmallestException
|
|
17
|
+
} from "./native";
|
|
18
|
+
Text.H1 = H1;
|
|
19
|
+
Text.H2 = H2;
|
|
20
|
+
Text.H3 = H3;
|
|
21
|
+
Text.H4 = H4;
|
|
22
|
+
Text.H5 = H5;
|
|
23
|
+
Text.Small = Small;
|
|
24
|
+
Text.Tiny = Tiny;
|
|
25
|
+
Text.Light = Light;
|
|
26
|
+
Text.Regular = Regular;
|
|
27
|
+
Text.Medium = Medium;
|
|
28
|
+
Text.Bold = Bold;
|
|
29
|
+
Text.Black = Black;
|
|
30
|
+
Text.SectionTitle = SectionTitle;
|
|
31
|
+
Text.SmallestException = SmallestException;
|
|
32
|
+
var index_native_default = Text;
|
|
33
|
+
export {
|
|
34
|
+
index_native_default as default
|
|
35
|
+
};
|
|
@@ -0,0 +1,123 @@
|
|
|
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
|
+
import { jsx } from "react/jsx-runtime";
|
|
18
|
+
import React from "react";
|
|
19
|
+
import styled from "styled-components";
|
|
20
|
+
import { oneOf, bool } from "prop-types";
|
|
21
|
+
import { system } from "@gympass/yoga-system";
|
|
22
|
+
import textStyle from "../textStyle";
|
|
23
|
+
import { deprecated } from "../../shared";
|
|
24
|
+
const styledText = (type) => styled.Text`
|
|
25
|
+
${textStyle(type)}
|
|
26
|
+
${system}
|
|
27
|
+
`;
|
|
28
|
+
const H1 = styledText("h1");
|
|
29
|
+
H1.displayName = "Text.H1";
|
|
30
|
+
const H2 = styledText("h2");
|
|
31
|
+
H2.displayName = "Text.H2";
|
|
32
|
+
const H3 = styledText("h3");
|
|
33
|
+
H3.displayName = "Text.H3";
|
|
34
|
+
const H4 = styledText("h4");
|
|
35
|
+
H4.displayName = "Text.H4";
|
|
36
|
+
const H5 = styledText("h5");
|
|
37
|
+
H5.displayName = "Text.H5";
|
|
38
|
+
const Small = styledText("small");
|
|
39
|
+
Small.displayName = "Text.Small";
|
|
40
|
+
const Tiny = styledText("tiny");
|
|
41
|
+
Tiny.displayName = "Text.Tiny";
|
|
42
|
+
const Light = styledText("light");
|
|
43
|
+
Light.displayName = "Text.Light";
|
|
44
|
+
const Regular = styledText("regular");
|
|
45
|
+
Regular.displayName = "Text.Regular";
|
|
46
|
+
const Medium = styledText("medium");
|
|
47
|
+
Medium.displayName = "Text.Medium";
|
|
48
|
+
const Bold = styledText("bold");
|
|
49
|
+
Bold.displayName = "Text.Bold";
|
|
50
|
+
const Black = styledText("black");
|
|
51
|
+
Black.displayName = "Text.Black";
|
|
52
|
+
const SectionTitle = styledText("sectionTitle");
|
|
53
|
+
SectionTitle.displayName = "Text.SectionTitle";
|
|
54
|
+
const SmallestException = styledText("smallestException");
|
|
55
|
+
SmallestException.displayName = "Text.SmallestException";
|
|
56
|
+
const TextRenderer = styledText("p");
|
|
57
|
+
const Text = (props) => /* @__PURE__ */ jsx(TextRenderer, __spreadValues({}, props));
|
|
58
|
+
Text.displayName = "Text";
|
|
59
|
+
const fontSizes = oneOf([
|
|
60
|
+
"xxsmall",
|
|
61
|
+
"xsmall",
|
|
62
|
+
"small",
|
|
63
|
+
"medium",
|
|
64
|
+
"large",
|
|
65
|
+
"xlarge",
|
|
66
|
+
"xxlarge",
|
|
67
|
+
"xxxlarge",
|
|
68
|
+
"huge"
|
|
69
|
+
]);
|
|
70
|
+
Text.propTypes = {
|
|
71
|
+
inverted: bool,
|
|
72
|
+
/** (deprecated: use color instead) style the text following the theme */
|
|
73
|
+
variant: deprecated(
|
|
74
|
+
oneOf([
|
|
75
|
+
"primary",
|
|
76
|
+
"secondary",
|
|
77
|
+
"vibin",
|
|
78
|
+
"hope",
|
|
79
|
+
"energy",
|
|
80
|
+
"relax",
|
|
81
|
+
"peace",
|
|
82
|
+
"verve",
|
|
83
|
+
"uplift",
|
|
84
|
+
"deepPurple",
|
|
85
|
+
"stamina",
|
|
86
|
+
"deep",
|
|
87
|
+
"medium",
|
|
88
|
+
"light",
|
|
89
|
+
"clear",
|
|
90
|
+
"white"
|
|
91
|
+
]),
|
|
92
|
+
"Use `color` system prop instead"
|
|
93
|
+
),
|
|
94
|
+
/** (deprecated: use fontSize instead) style the text following the theme */
|
|
95
|
+
size: deprecated(fontSizes, "Use `fontSize` system prop instead"),
|
|
96
|
+
/** set the font-weight to regular */
|
|
97
|
+
light: bool,
|
|
98
|
+
fontSize: fontSizes
|
|
99
|
+
};
|
|
100
|
+
Text.defaultProps = {
|
|
101
|
+
inverted: false,
|
|
102
|
+
variant: void 0,
|
|
103
|
+
size: void 0,
|
|
104
|
+
fontSize: "medium",
|
|
105
|
+
light: false
|
|
106
|
+
};
|
|
107
|
+
export {
|
|
108
|
+
Black,
|
|
109
|
+
Bold,
|
|
110
|
+
H1,
|
|
111
|
+
H2,
|
|
112
|
+
H3,
|
|
113
|
+
H4,
|
|
114
|
+
H5,
|
|
115
|
+
Light,
|
|
116
|
+
Medium,
|
|
117
|
+
Regular,
|
|
118
|
+
SectionTitle,
|
|
119
|
+
Small,
|
|
120
|
+
SmallestException,
|
|
121
|
+
Text,
|
|
122
|
+
Tiny
|
|
123
|
+
};
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { render } from "@testing-library/react-native";
|
|
4
|
+
import { ThemeProvider } from "../..";
|
|
5
|
+
import { Text } from ".";
|
|
6
|
+
describe("<Text />", () => {
|
|
7
|
+
describe("Snapshots", () => {
|
|
8
|
+
it("should match snapshot with Text", () => {
|
|
9
|
+
const { toJSON } = render(
|
|
10
|
+
/* @__PURE__ */ jsxs(ThemeProvider, { children: [
|
|
11
|
+
/* @__PURE__ */ jsx(Text.H1, { children: "Live the mission" }),
|
|
12
|
+
/* @__PURE__ */ jsx(Text.H2, { children: "Live the mission" }),
|
|
13
|
+
/* @__PURE__ */ jsx(Text.H3, { children: "Live the mission" }),
|
|
14
|
+
/* @__PURE__ */ jsx(Text.H4, { children: "Live the mission" }),
|
|
15
|
+
/* @__PURE__ */ jsx(Text, { children: "Live the mission" }),
|
|
16
|
+
/* @__PURE__ */ jsx(Text.Small, { children: "Live the mission" }),
|
|
17
|
+
/* @__PURE__ */ jsx(Text.Tiny, { children: "Live the mission" }),
|
|
18
|
+
/* @__PURE__ */ jsx(Text.Regular, { children: "Live the mission" }),
|
|
19
|
+
/* @__PURE__ */ jsx(Text.Medium, { children: "Live the mission" }),
|
|
20
|
+
/* @__PURE__ */ jsx(Text.Bold, { children: "Live the mission" }),
|
|
21
|
+
/* @__PURE__ */ jsx(Text.Black, { children: "Live the mission" }),
|
|
22
|
+
/* @__PURE__ */ jsx(Text.SectionTitle, { children: "Live the mission" }),
|
|
23
|
+
/* @__PURE__ */ jsx(Text.SmallestException, { children: "Live the mission" })
|
|
24
|
+
] })
|
|
25
|
+
);
|
|
26
|
+
expect(toJSON()).toMatchSnapshot();
|
|
27
|
+
});
|
|
28
|
+
it("should match snapshot with Text variant", () => {
|
|
29
|
+
const { toJSON } = render(
|
|
30
|
+
/* @__PURE__ */ jsxs(ThemeProvider, { children: [
|
|
31
|
+
/* @__PURE__ */ jsx(Text.H1, { variant: "primary", children: "Live the mission" }),
|
|
32
|
+
/* @__PURE__ */ jsx(Text.H2, { variant: "secondary", children: "Live the mission" }),
|
|
33
|
+
/* @__PURE__ */ jsx(Text.H3, { variant: "tertiary", children: "Live the mission" })
|
|
34
|
+
] })
|
|
35
|
+
);
|
|
36
|
+
expect(toJSON()).toMatchSnapshot();
|
|
37
|
+
});
|
|
38
|
+
it("should match snapshot with Text light", () => {
|
|
39
|
+
const { toJSON } = render(
|
|
40
|
+
/* @__PURE__ */ jsxs(ThemeProvider, { children: [
|
|
41
|
+
/* @__PURE__ */ jsx(Text.H1, { light: true, children: "Live the mission" }),
|
|
42
|
+
/* @__PURE__ */ jsx(Text.H2, { light: true, children: "Live the mission" }),
|
|
43
|
+
/* @__PURE__ */ jsx(Text.H3, { light: true, children: "Live the mission" })
|
|
44
|
+
] })
|
|
45
|
+
);
|
|
46
|
+
expect(toJSON()).toMatchSnapshot();
|
|
47
|
+
});
|
|
48
|
+
it("should match snapshot with Text fontSize", () => {
|
|
49
|
+
const { toJSON } = render(
|
|
50
|
+
/* @__PURE__ */ jsxs(ThemeProvider, { children: [
|
|
51
|
+
/* @__PURE__ */ jsx(Text.Small, { fontSize: "xsmall", children: "Live the small mission" }),
|
|
52
|
+
/* @__PURE__ */ jsx(Text.Tiny, { fontSize: "medium", children: "Live the medium mission" }),
|
|
53
|
+
/* @__PURE__ */ jsx(Text.Regular, { fontSize: "xlarge", children: "Live the xlarge mission" }),
|
|
54
|
+
/* @__PURE__ */ jsx(Text.Medium, { fontSize: "xxxlarge", children: "Live the xxxlarge mission" })
|
|
55
|
+
] })
|
|
56
|
+
);
|
|
57
|
+
expect(toJSON()).toMatchSnapshot();
|
|
58
|
+
});
|
|
59
|
+
it("should match snapshot with Text size", () => {
|
|
60
|
+
const { toJSON } = render(
|
|
61
|
+
/* @__PURE__ */ jsxs(ThemeProvider, { children: [
|
|
62
|
+
/* @__PURE__ */ jsx(Text.Small, { size: "xsmall", children: "Live the small mission" }),
|
|
63
|
+
/* @__PURE__ */ jsx(Text.Tiny, { size: "medium", children: "Live the medium mission" }),
|
|
64
|
+
/* @__PURE__ */ jsx(Text.Regular, { size: "xlarge", children: "Live the xlarge mission" }),
|
|
65
|
+
/* @__PURE__ */ jsx(Text.Medium, { size: "xxxlarge", children: "Live the xxxlarge mission" })
|
|
66
|
+
] })
|
|
67
|
+
);
|
|
68
|
+
expect(toJSON()).toMatchSnapshot();
|
|
69
|
+
});
|
|
70
|
+
it("should match snapshot with inverted Text", () => {
|
|
71
|
+
const { toJSON } = render(
|
|
72
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Text, { inverted: true, children: "Live the mission" }) })
|
|
73
|
+
);
|
|
74
|
+
expect(toJSON()).toMatchSnapshot();
|
|
75
|
+
});
|
|
76
|
+
it("should match snapshot with truncated lines Text", () => {
|
|
77
|
+
const { toJSON } = render(
|
|
78
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsxs(Text, { numberOfLines: 1, children: [
|
|
79
|
+
"Live the mission",
|
|
80
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
81
|
+
"even in one line"
|
|
82
|
+
] }) })
|
|
83
|
+
);
|
|
84
|
+
expect(toJSON()).toMatchSnapshot();
|
|
85
|
+
});
|
|
86
|
+
it("should match snapshot with border prop system", () => {
|
|
87
|
+
const { toJSON } = render(
|
|
88
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Text, { border: "small", bRadius: "small", children: "Live the mission" }) })
|
|
89
|
+
);
|
|
90
|
+
expect(toJSON()).toMatchSnapshot();
|
|
91
|
+
});
|
|
92
|
+
it("should match snapshot with background color prop system", () => {
|
|
93
|
+
const { toJSON } = render(
|
|
94
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Text, { backgroundColor: "vibin", children: "Live the mission" }) })
|
|
95
|
+
);
|
|
96
|
+
expect(toJSON()).toMatchSnapshot();
|
|
97
|
+
});
|
|
98
|
+
it("should match snapshot with elevation prop system", () => {
|
|
99
|
+
const { toJSON } = render(
|
|
100
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Text, { elevation: "medium", children: "Live the mission" }) })
|
|
101
|
+
);
|
|
102
|
+
expect(toJSON()).toMatchSnapshot();
|
|
103
|
+
});
|
|
104
|
+
it("should match snapshot with spacing prop system", () => {
|
|
105
|
+
const { toJSON } = render(
|
|
106
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Text, { m: "medium", paddingVertical: "large", paddingHorizontal: "small", children: "Live the mission" }) })
|
|
107
|
+
);
|
|
108
|
+
expect(toJSON()).toMatchSnapshot();
|
|
109
|
+
});
|
|
110
|
+
it("should match snapshot with typography prop system", () => {
|
|
111
|
+
const { toJSON } = render(
|
|
112
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(
|
|
113
|
+
Text,
|
|
114
|
+
{
|
|
115
|
+
color: "text.primary",
|
|
116
|
+
fontSize: "small",
|
|
117
|
+
fontWeight: "medium",
|
|
118
|
+
lineHeight: "small",
|
|
119
|
+
children: "Live the mission"
|
|
120
|
+
}
|
|
121
|
+
) })
|
|
122
|
+
);
|
|
123
|
+
expect(toJSON()).toMatchSnapshot();
|
|
124
|
+
});
|
|
125
|
+
it("should match snapshot with display prop system", () => {
|
|
126
|
+
const { toJSON } = render(
|
|
127
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Text, { display: "flex", children: "Live the mission" }) })
|
|
128
|
+
);
|
|
129
|
+
expect(toJSON()).toMatchSnapshot();
|
|
130
|
+
});
|
|
131
|
+
it("should match snapshot with position prop system", () => {
|
|
132
|
+
const { toJSON } = render(
|
|
133
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Text, { position: "absolute", top: "small", left: "small", children: "Live the mission" }) })
|
|
134
|
+
);
|
|
135
|
+
expect(toJSON()).toMatchSnapshot();
|
|
136
|
+
});
|
|
137
|
+
it("should match snapshot with flexes prop system", () => {
|
|
138
|
+
const { toJSON } = render(
|
|
139
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Text, { display: "flex", flexGrow: 1, children: "Live the mission" }) })
|
|
140
|
+
);
|
|
141
|
+
expect(toJSON()).toMatchSnapshot();
|
|
142
|
+
});
|
|
143
|
+
it("should match snapshot with overflows prop system", () => {
|
|
144
|
+
const { toJSON } = render(
|
|
145
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(Text, { overflow: "scroll", children: "Live the mission" }) })
|
|
146
|
+
);
|
|
147
|
+
expect(toJSON()).toMatchSnapshot();
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Text,
|
|
3
|
+
H1,
|
|
4
|
+
H2,
|
|
5
|
+
H3,
|
|
6
|
+
H4,
|
|
7
|
+
H5,
|
|
8
|
+
Small,
|
|
9
|
+
Tiny,
|
|
10
|
+
Light,
|
|
11
|
+
Regular,
|
|
12
|
+
Medium,
|
|
13
|
+
Bold,
|
|
14
|
+
Black,
|
|
15
|
+
SectionTitle,
|
|
16
|
+
SmallestException
|
|
17
|
+
} from "./Text";
|
|
18
|
+
export {
|
|
19
|
+
Black,
|
|
20
|
+
Bold,
|
|
21
|
+
H1,
|
|
22
|
+
H2,
|
|
23
|
+
H3,
|
|
24
|
+
H4,
|
|
25
|
+
H5,
|
|
26
|
+
Light,
|
|
27
|
+
Medium,
|
|
28
|
+
Regular,
|
|
29
|
+
SectionTitle,
|
|
30
|
+
Small,
|
|
31
|
+
SmallestException,
|
|
32
|
+
Text,
|
|
33
|
+
Tiny
|
|
34
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { css } from "styled-components";
|
|
2
|
+
const textStyle = (type) => () => css`
|
|
3
|
+
${({
|
|
4
|
+
light,
|
|
5
|
+
variant,
|
|
6
|
+
inverted,
|
|
7
|
+
fontSize = "medium",
|
|
8
|
+
size = "medium",
|
|
9
|
+
theme: {
|
|
10
|
+
yoga: {
|
|
11
|
+
baseFont,
|
|
12
|
+
fontWeights,
|
|
13
|
+
fontSizes: { [size || fontSize]: pSize },
|
|
14
|
+
colors: { [variant]: color, text, white },
|
|
15
|
+
components: {
|
|
16
|
+
text: {
|
|
17
|
+
[type]: {
|
|
18
|
+
fontsize,
|
|
19
|
+
lineHeight,
|
|
20
|
+
fontWeight,
|
|
21
|
+
textTransform,
|
|
22
|
+
letterSpacing
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}) => `
|
|
29
|
+
font-size: ${fontsize || pSize}px;
|
|
30
|
+
${letterSpacing ? `letter-spacing: ${letterSpacing}px;` : ""}
|
|
31
|
+
${lineHeight ? `line-height: ${lineHeight}px;` : ""}
|
|
32
|
+
${fontWeight ? `font-weight: ${fontWeight};` : ""}
|
|
33
|
+
${light ? `font-weight: ${fontWeights.light};` : ""}
|
|
34
|
+
|
|
35
|
+
font-family: ${baseFont.family};
|
|
36
|
+
color: ${variant ? color : text.primary};
|
|
37
|
+
${inverted ? `color: ${white};` : ""}
|
|
38
|
+
${textTransform ? `text-transform: ${textTransform};` : ""}
|
|
39
|
+
`}
|
|
40
|
+
`;
|
|
41
|
+
var sharedTextStyle_default = textStyle;
|
|
42
|
+
export {
|
|
43
|
+
sharedTextStyle_default as default
|
|
44
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { css } from "styled-components";
|
|
2
|
+
import defaultStyle from "./sharedTextStyle";
|
|
3
|
+
const textStyle = (type) => () => css`
|
|
4
|
+
${defaultStyle(type)};
|
|
5
|
+
${({
|
|
6
|
+
light,
|
|
7
|
+
theme: {
|
|
8
|
+
yoga: {
|
|
9
|
+
baseFont,
|
|
10
|
+
fontWeights,
|
|
11
|
+
components: {
|
|
12
|
+
text: {
|
|
13
|
+
[type]: { fontWeight }
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}) => `
|
|
19
|
+
font-family: ${fontWeight === 400 ? baseFont.family : `${baseFont.family}-${fontWeight}`};
|
|
20
|
+
|
|
21
|
+
${light ? `font-family: ${baseFont.family}-${fontWeights.light};` : ""}
|
|
22
|
+
`}
|
|
23
|
+
`;
|
|
24
|
+
var textStyle_android_default = textStyle;
|
|
25
|
+
export {
|
|
26
|
+
textStyle_android_default as default
|
|
27
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { css } from "styled-components";
|
|
2
|
+
import defaultStyle from "./sharedTextStyle";
|
|
3
|
+
const textStyle = (type) => () => css`
|
|
4
|
+
${defaultStyle(type)};
|
|
5
|
+
${({ numberOfLines }) => `
|
|
6
|
+
${numberOfLines ? `
|
|
7
|
+
display: -webkit-box;
|
|
8
|
+
-webkit-box-orient: vertical;
|
|
9
|
+
-webkit-line-clamp: ${numberOfLines};
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
` : ""}
|
|
12
|
+
`}
|
|
13
|
+
`;
|
|
14
|
+
var textStyle_web_default = textStyle;
|
|
15
|
+
export {
|
|
16
|
+
textStyle_web_default as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
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 styled from "styled-components";
|
|
23
|
+
import { bool, func, number, string } from "prop-types";
|
|
24
|
+
import Input from "../../Input";
|
|
25
|
+
const StyledInput = styled(Input)`
|
|
26
|
+
height: 88px;
|
|
27
|
+
`;
|
|
28
|
+
const TextArea = (props) => /* @__PURE__ */ jsx(StyledInput, __spreadProps(__spreadValues({}, props), { textAlignVertical: "top", multiline: true, cleanable: false }));
|
|
29
|
+
TextArea.propTypes = {
|
|
30
|
+
disabled: bool,
|
|
31
|
+
/** A error text to be displayed below field */
|
|
32
|
+
error: string,
|
|
33
|
+
full: bool,
|
|
34
|
+
/** A helper text to be displayed below field */
|
|
35
|
+
helper: string,
|
|
36
|
+
label: string,
|
|
37
|
+
/** maximum length (number of characters) of value */
|
|
38
|
+
maxLength: number,
|
|
39
|
+
readOnly: bool,
|
|
40
|
+
value: string,
|
|
41
|
+
onBlur: func,
|
|
42
|
+
onChangeText: func,
|
|
43
|
+
onFocus: func
|
|
44
|
+
};
|
|
45
|
+
TextArea.defaultProps = {
|
|
46
|
+
disabled: false,
|
|
47
|
+
error: void 0,
|
|
48
|
+
full: false,
|
|
49
|
+
helper: void 0,
|
|
50
|
+
label: "",
|
|
51
|
+
maxLength: void 0,
|
|
52
|
+
readOnly: false,
|
|
53
|
+
value: "",
|
|
54
|
+
onBlur: () => {
|
|
55
|
+
},
|
|
56
|
+
onChangeText: () => {
|
|
57
|
+
},
|
|
58
|
+
onFocus: () => {
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
var TextArea_default = TextArea;
|
|
62
|
+
export {
|
|
63
|
+
TextArea_default as default
|
|
64
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { render } from "@testing-library/react-native";
|
|
4
|
+
import { ThemeProvider, TextArea } from "../..";
|
|
5
|
+
describe("<TextArea />", () => {
|
|
6
|
+
it("should match snapshot", () => {
|
|
7
|
+
const { toJSON } = render(
|
|
8
|
+
/* @__PURE__ */ jsx(ThemeProvider, { children: /* @__PURE__ */ jsx(TextArea, {}) })
|
|
9
|
+
);
|
|
10
|
+
expect(toJSON()).toMatchSnapshot();
|
|
11
|
+
});
|
|
12
|
+
});
|
|
@@ -0,0 +1,75 @@
|
|
|
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 * as yogaTokens from "@gympass/yoga-tokens";
|
|
31
|
+
import PropTypes from "prop-types";
|
|
32
|
+
import React from "react";
|
|
33
|
+
import { ThemeProvider } from "styled-components";
|
|
34
|
+
import yogaThemeBuilder from "../theme";
|
|
35
|
+
const getBuilderTokens = (builder, tokens) => {
|
|
36
|
+
if (!builder) {
|
|
37
|
+
return {};
|
|
38
|
+
}
|
|
39
|
+
const isThemeInvalid = builder ? !("isFromThemeBuilder" in builder) : false;
|
|
40
|
+
if (isThemeInvalid) {
|
|
41
|
+
throw new TypeError(
|
|
42
|
+
`Invalid 'theme' parameter. Expected one generated by createTheme() function.
|
|
43
|
+
Did you sent a function directly to <ThemeProvider />?
|
|
44
|
+
`
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
const customTokens = builder(tokens);
|
|
48
|
+
if (typeof customTokens !== "object") {
|
|
49
|
+
throw TypeError(
|
|
50
|
+
`Invalid 'theme' return value. Expected 'object', got ${typeof builder(
|
|
51
|
+
tokens
|
|
52
|
+
)}.`
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
return customTokens;
|
|
56
|
+
};
|
|
57
|
+
const getTheme = ({ locale, theme }) => {
|
|
58
|
+
const tokens = yogaTokens[locale] || yogaTokens.default;
|
|
59
|
+
const customTokens = getBuilderTokens(theme, tokens);
|
|
60
|
+
return yogaThemeBuilder(tokens, customTokens);
|
|
61
|
+
};
|
|
62
|
+
const Provider = (_a) => {
|
|
63
|
+
var _b = _a, { locale, theme } = _b, rest = __objRest(_b, ["locale", "theme"]);
|
|
64
|
+
return /* @__PURE__ */ jsx(ThemeProvider, __spreadValues({ theme: { yoga: getTheme({ locale, theme }) } }, rest));
|
|
65
|
+
};
|
|
66
|
+
Provider.propTypes = {
|
|
67
|
+
locale: PropTypes.string
|
|
68
|
+
};
|
|
69
|
+
Provider.defaultProps = {
|
|
70
|
+
locale: "pt-BR"
|
|
71
|
+
};
|
|
72
|
+
var Provider_default = Provider;
|
|
73
|
+
export {
|
|
74
|
+
Provider_default as default
|
|
75
|
+
};
|