@aic-kits/react-native 0.0.2 → 0.0.4
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/lib/auth/components/SocialAuthButton/constants.d.ts +7 -0
- package/lib/auth/components/SocialAuthButton/constants.d.ts.map +1 -0
- package/lib/auth/components/SocialAuthButton/constants.js +14 -0
- package/lib/auth/components/SocialAuthButton/index.d.ts +22 -0
- package/lib/auth/components/SocialAuthButton/index.d.ts.map +1 -0
- package/lib/auth/components/SocialAuthButton/index.js +37 -0
- package/lib/auth/components/SocialSignIn/constants.d.ts +3 -0
- package/lib/auth/components/SocialSignIn/constants.d.ts.map +1 -0
- package/lib/auth/components/SocialSignIn/constants.js +1 -0
- package/lib/auth/components/SocialSignIn/index.d.ts +16 -0
- package/lib/auth/components/SocialSignIn/index.d.ts.map +1 -0
- package/lib/auth/components/SocialSignIn/index.js +11 -0
- package/lib/auth/components/index.d.ts +3 -0
- package/lib/auth/components/index.d.ts.map +1 -0
- package/lib/auth/components/index.js +2 -0
- package/lib/auth/hooks/index.d.ts +2 -0
- package/lib/auth/hooks/index.d.ts.map +1 -0
- package/lib/auth/hooks/index.js +1 -0
- package/lib/auth/hooks/useAuthListener.d.ts +6 -0
- package/lib/auth/hooks/useAuthListener.d.ts.map +1 -0
- package/lib/auth/hooks/useAuthListener.js +40 -0
- package/lib/auth/index.d.ts +7 -0
- package/lib/auth/index.d.ts.map +1 -0
- package/lib/auth/index.js +6 -0
- package/lib/auth/types.d.ts +26 -0
- package/lib/auth/types.d.ts.map +1 -0
- package/lib/auth/types.js +1 -0
- package/lib/auth/utils/apple.d.ts +4 -0
- package/lib/auth/utils/apple.d.ts.map +1 -0
- package/lib/auth/utils/apple.js +90 -0
- package/lib/auth/utils/email.d.ts +11 -0
- package/lib/auth/utils/email.d.ts.map +1 -0
- package/lib/auth/utils/email.js +33 -0
- package/lib/auth/utils/facebook.d.ts +4 -0
- package/lib/auth/utils/facebook.d.ts.map +1 -0
- package/lib/auth/utils/facebook.js +59 -0
- package/lib/auth/utils/google.d.ts +3 -0
- package/lib/auth/utils/google.d.ts.map +1 -0
- package/lib/auth/utils/google.js +33 -0
- package/lib/auth/utils/index.d.ts +8 -0
- package/lib/auth/utils/index.d.ts.map +1 -0
- package/lib/auth/utils/index.js +55 -0
- package/lib/components/Art/BrandArt.d.ts +3 -0
- package/lib/components/Art/BrandArt.d.ts.map +1 -0
- package/lib/components/Art/BrandArt.js +6 -0
- package/lib/components/Art/EmojiArt.d.ts +3 -0
- package/lib/components/Art/EmojiArt.d.ts.map +1 -0
- package/lib/components/Art/EmojiArt.js +25 -0
- package/lib/components/Art/IconArt.d.ts +3 -0
- package/lib/components/Art/IconArt.d.ts.map +1 -0
- package/lib/components/Art/IconArt.js +26 -0
- package/lib/components/Art/ImageArt.d.ts +3 -0
- package/lib/components/Art/ImageArt.d.ts.map +1 -0
- package/lib/components/Art/ImageArt.js +24 -0
- package/lib/components/Art/SvgArt.d.ts +3 -0
- package/lib/components/Art/SvgArt.d.ts.map +1 -0
- package/lib/components/Art/SvgArt.js +51 -0
- package/lib/components/Art/constants.d.ts +5 -0
- package/lib/components/Art/constants.d.ts.map +1 -0
- package/lib/components/Art/constants.js +6 -0
- package/lib/components/Art/hooks.d.ts +3 -0
- package/lib/components/Art/hooks.d.ts.map +1 -0
- package/lib/components/Art/hooks.js +8 -0
- package/lib/components/Art/index.d.ts +10 -0
- package/lib/components/Art/index.d.ts.map +1 -0
- package/lib/components/Art/index.js +29 -0
- package/lib/components/Art/types.d.ts +157 -0
- package/lib/components/Art/types.d.ts.map +1 -0
- package/lib/components/Art/types.js +1 -0
- package/lib/components/Art/utils.d.ts +40 -0
- package/lib/components/Art/utils.d.ts.map +1 -0
- package/lib/components/Art/utils.js +68 -0
- package/lib/components/Avatar/Wrapper.d.ts +11 -0
- package/lib/components/Avatar/Wrapper.d.ts.map +1 -0
- package/lib/components/Avatar/Wrapper.js +67 -0
- package/lib/components/Avatar/apiCalls/useUploadCloudinaryImageApi.d.ts +14 -0
- package/lib/components/Avatar/apiCalls/useUploadCloudinaryImageApi.d.ts.map +1 -0
- package/lib/components/Avatar/apiCalls/useUploadCloudinaryImageApi.js +24 -0
- package/lib/components/Avatar/index.d.ts +3 -0
- package/lib/components/Avatar/index.d.ts.map +1 -0
- package/lib/components/Avatar/index.js +37 -0
- package/lib/components/Avatar/types.d.ts +51 -0
- package/lib/components/Avatar/types.d.ts.map +1 -0
- package/lib/components/Avatar/types.js +1 -0
- package/lib/components/Avatar/utils.d.ts +6 -0
- package/lib/components/Avatar/utils.d.ts.map +1 -0
- package/lib/components/Avatar/utils.js +9 -0
- package/lib/components/Base/BaseFooter.d.ts +8 -0
- package/lib/components/Base/BaseFooter.d.ts.map +1 -0
- package/lib/components/Base/BaseFooter.js +18 -0
- package/lib/components/Base/index.d.ts +4 -0
- package/lib/components/Base/index.d.ts.map +1 -0
- package/lib/components/Base/index.js +49 -0
- package/lib/components/Base/types.d.ts +83 -0
- package/lib/components/Base/types.d.ts.map +1 -0
- package/lib/components/Base/types.js +1 -0
- package/lib/components/Box/StyledBox.d.ts +254 -0
- package/lib/components/Box/StyledBox.d.ts.map +1 -0
- package/lib/components/Box/StyledBox.js +53 -0
- package/lib/components/Box/config.d.ts +359 -0
- package/lib/components/Box/config.d.ts.map +1 -0
- package/lib/components/Box/config.js +227 -0
- package/lib/components/Box/index.d.ts +11 -0
- package/lib/components/Box/index.d.ts.map +1 -0
- package/lib/components/Box/index.js +14 -0
- package/lib/components/Box/types.d.ts +53 -0
- package/lib/components/Box/types.d.ts.map +1 -0
- package/lib/components/Box/types.js +1 -0
- package/lib/components/Bubble/index.d.ts +8 -0
- package/lib/components/Bubble/index.d.ts.map +1 -0
- package/lib/components/Bubble/index.js +20 -0
- package/lib/components/Bubble/type.d.ts +18 -0
- package/lib/components/Bubble/type.d.ts.map +1 -0
- package/lib/components/Bubble/type.js +1 -0
- package/lib/components/Bubble/utils.d.ts +12 -0
- package/lib/components/Bubble/utils.d.ts.map +1 -0
- package/lib/components/Bubble/utils.js +33 -0
- package/lib/components/Button/StyledButton.d.ts +34 -0
- package/lib/components/Button/StyledButton.d.ts.map +1 -0
- package/lib/components/Button/StyledButton.js +49 -0
- package/lib/components/Button/index.d.ts +64 -0
- package/lib/components/Button/index.d.ts.map +1 -0
- package/lib/components/Button/index.js +20 -0
- package/lib/components/Button/utils.d.ts +4 -0
- package/lib/components/Button/utils.d.ts.map +1 -0
- package/lib/components/Button/utils.js +10 -0
- package/lib/components/Card/StyledCard.d.ts +226 -0
- package/lib/components/Card/StyledCard.d.ts.map +1 -0
- package/lib/components/Card/StyledCard.js +17 -0
- package/lib/components/Card/index.d.ts +27 -0
- package/lib/components/Card/index.d.ts.map +1 -0
- package/lib/components/Card/index.js +44 -0
- package/lib/components/Chart/LineChart.d.ts +3 -0
- package/lib/components/Chart/LineChart.d.ts.map +1 -0
- package/lib/components/Chart/LineChart.js +27 -0
- package/lib/components/Chart/constants.d.ts +2 -0
- package/lib/components/Chart/constants.d.ts.map +1 -0
- package/lib/components/Chart/constants.js +47 -0
- package/lib/components/Chart/index.d.ts +3 -0
- package/lib/components/Chart/index.d.ts.map +1 -0
- package/lib/components/Chart/index.js +10 -0
- package/lib/components/Chart/types.d.ts +32 -0
- package/lib/components/Chart/types.d.ts.map +1 -0
- package/lib/components/Chart/types.js +1 -0
- package/lib/components/Chart/utils.d.ts +6 -0
- package/lib/components/Chart/utils.d.ts.map +1 -0
- package/lib/components/Chart/utils.js +8 -0
- package/lib/components/Chat/ImageChat.d.ts +8 -0
- package/lib/components/Chat/ImageChat.d.ts.map +1 -0
- package/lib/components/Chat/ImageChat.js +24 -0
- package/lib/components/Chat/TextChat.d.ts +8 -0
- package/lib/components/Chat/TextChat.d.ts.map +1 -0
- package/lib/components/Chat/TextChat.js +37 -0
- package/lib/components/Chat/VideoChat.d.ts +6 -0
- package/lib/components/Chat/VideoChat.d.ts.map +1 -0
- package/lib/components/Chat/VideoChat.js +56 -0
- package/lib/components/Chat/index.d.ts +4 -0
- package/lib/components/Chat/index.d.ts.map +1 -0
- package/lib/components/Chat/index.js +26 -0
- package/lib/components/Chat/type.d.ts +95 -0
- package/lib/components/Chat/type.d.ts.map +1 -0
- package/lib/components/Chat/type.js +1 -0
- package/lib/components/ChatCluster/index.d.ts +4 -0
- package/lib/components/ChatCluster/index.d.ts.map +1 -0
- package/lib/components/ChatCluster/index.js +22 -0
- package/lib/components/ChatCluster/types.d.ts +11 -0
- package/lib/components/ChatCluster/types.d.ts.map +1 -0
- package/lib/components/ChatCluster/types.js +1 -0
- package/lib/components/ChatCluster/utils.d.ts +5 -0
- package/lib/components/ChatCluster/utils.d.ts.map +1 -0
- package/lib/components/ChatCluster/utils.js +15 -0
- package/lib/components/Chip/index.d.ts +3 -0
- package/lib/components/Chip/index.d.ts.map +1 -0
- package/lib/components/Chip/index.js +16 -0
- package/lib/components/Chip/types.d.ts +50 -0
- package/lib/components/Chip/types.d.ts.map +1 -0
- package/lib/components/Chip/types.js +1 -0
- package/lib/components/Divider/StyledDivider.d.ts +12 -0
- package/lib/components/Divider/StyledDivider.d.ts.map +1 -0
- package/lib/components/Divider/StyledDivider.js +17 -0
- package/lib/components/Divider/index.d.ts +15 -0
- package/lib/components/Divider/index.d.ts.map +1 -0
- package/lib/components/Divider/index.js +4 -0
- package/lib/components/FastList/index.d.ts +25 -0
- package/lib/components/FastList/index.d.ts.map +1 -0
- package/lib/components/FastList/index.js +13 -0
- package/lib/components/Filter/index.d.ts +40 -0
- package/lib/components/Filter/index.d.ts.map +1 -0
- package/lib/components/Filter/index.js +23 -0
- package/lib/components/Gradient/index.d.ts +11 -0
- package/lib/components/Gradient/index.d.ts.map +1 -0
- package/lib/components/Gradient/index.js +10 -0
- package/lib/components/Header/BackButton.d.ts +5 -0
- package/lib/components/Header/BackButton.d.ts.map +1 -0
- package/lib/components/Header/BackButton.js +22 -0
- package/lib/components/Header/DefaultHeader.d.ts +8 -0
- package/lib/components/Header/DefaultHeader.d.ts.map +1 -0
- package/lib/components/Header/DefaultHeader.js +13 -0
- package/lib/components/Header/HeaderContent.d.ts +6 -0
- package/lib/components/Header/HeaderContent.d.ts.map +1 -0
- package/lib/components/Header/HeaderContent.js +18 -0
- package/lib/components/Header/IconButton.d.ts +13 -0
- package/lib/components/Header/IconButton.d.ts.map +1 -0
- package/lib/components/Header/IconButton.js +6 -0
- package/lib/components/Header/ProgressHeader.d.ts +7 -0
- package/lib/components/Header/ProgressHeader.d.ts.map +1 -0
- package/lib/components/Header/ProgressHeader.js +18 -0
- package/lib/components/Header/RightButton.d.ts +3 -0
- package/lib/components/Header/RightButton.d.ts.map +1 -0
- package/lib/components/Header/RightButton.js +15 -0
- package/lib/components/Header/index.d.ts +4 -0
- package/lib/components/Header/index.d.ts.map +1 -0
- package/lib/components/Header/index.js +12 -0
- package/lib/components/Header/types.d.ts +86 -0
- package/lib/components/Header/types.d.ts.map +1 -0
- package/lib/components/Header/types.js +1 -0
- package/lib/components/Header/utils.d.ts +10 -0
- package/lib/components/Header/utils.d.ts.map +1 -0
- package/lib/components/Header/utils.js +3 -0
- package/lib/components/Icon/AnimatedIcon.d.ts +6 -0
- package/lib/components/Icon/AnimatedIcon.d.ts.map +1 -0
- package/lib/components/Icon/AnimatedIcon.js +34 -0
- package/lib/components/Icon/PlainIcon.d.ts +16 -0
- package/lib/components/Icon/PlainIcon.d.ts.map +1 -0
- package/lib/components/Icon/PlainIcon.js +13 -0
- package/lib/components/Icon/constants.d.ts +703 -0
- package/lib/components/Icon/constants.d.ts.map +1 -0
- package/lib/components/Icon/constants.js +702 -0
- package/lib/components/Icon/index.d.ts +34 -0
- package/lib/components/Icon/index.d.ts.map +1 -0
- package/lib/components/Icon/index.js +24 -0
- package/lib/components/Icon/utils.d.ts +3 -0
- package/lib/components/Icon/utils.d.ts.map +1 -0
- package/lib/components/Icon/utils.js +2 -0
- package/lib/components/Image/ImageDetail.d.ts +11 -0
- package/lib/components/Image/ImageDetail.d.ts.map +1 -0
- package/lib/components/Image/ImageDetail.js +33 -0
- package/lib/components/Image/index.d.ts +11 -0
- package/lib/components/Image/index.d.ts.map +1 -0
- package/lib/components/Image/index.js +5 -0
- package/lib/components/Image/utils.d.ts +6 -0
- package/lib/components/Image/utils.d.ts.map +1 -0
- package/lib/components/Image/utils.js +12 -0
- package/lib/components/InfoCard/BasicInfoCard.d.ts +19 -0
- package/lib/components/InfoCard/BasicInfoCard.d.ts.map +1 -0
- package/lib/components/InfoCard/BasicInfoCard.js +18 -0
- package/lib/components/InfoCard/NewsInfoCard.d.ts +22 -0
- package/lib/components/InfoCard/NewsInfoCard.d.ts.map +1 -0
- package/lib/components/InfoCard/NewsInfoCard.js +15 -0
- package/lib/components/InfoCard/ThumbnailInfoCard.d.ts +33 -0
- package/lib/components/InfoCard/ThumbnailInfoCard.d.ts.map +1 -0
- package/lib/components/InfoCard/ThumbnailInfoCard.js +24 -0
- package/lib/components/InfoCard/index.d.ts +15 -0
- package/lib/components/InfoCard/index.d.ts.map +1 -0
- package/lib/components/InfoCard/index.js +16 -0
- package/lib/components/Input/StyledInput.d.ts +13 -0
- package/lib/components/Input/StyledInput.d.ts.map +1 -0
- package/lib/components/Input/StyledInput.js +14 -0
- package/lib/components/Input/index.d.ts +34 -0
- package/lib/components/Input/index.d.ts.map +1 -0
- package/lib/components/Input/index.js +15 -0
- package/lib/components/LevelStep/CircularProgress.d.ts +12 -0
- package/lib/components/LevelStep/CircularProgress.d.ts.map +1 -0
- package/lib/components/LevelStep/CircularProgress.js +27 -0
- package/lib/components/LevelStep/TransformedSvg.d.ts +13 -0
- package/lib/components/LevelStep/TransformedSvg.d.ts.map +1 -0
- package/lib/components/LevelStep/TransformedSvg.js +9 -0
- package/lib/components/LevelStep/constants.d.ts +8 -0
- package/lib/components/LevelStep/constants.d.ts.map +1 -0
- package/lib/components/LevelStep/constants.js +17 -0
- package/lib/components/LevelStep/index.d.ts +3 -0
- package/lib/components/LevelStep/index.d.ts.map +1 -0
- package/lib/components/LevelStep/index.js +78 -0
- package/lib/components/LevelStep/types.d.ts +7 -0
- package/lib/components/LevelStep/types.d.ts.map +1 -0
- package/lib/components/LevelStep/types.js +1 -0
- package/lib/components/List/index.d.ts +13 -0
- package/lib/components/List/index.d.ts.map +1 -0
- package/lib/components/List/index.js +13 -0
- package/lib/components/Loading/Loading.d.ts +3 -0
- package/lib/components/Loading/Loading.d.ts.map +1 -0
- package/lib/components/Loading/Loading.js +61 -0
- package/lib/components/Loading/StyledLoading.d.ts +14 -0
- package/lib/components/Loading/StyledLoading.d.ts.map +1 -0
- package/lib/components/Loading/StyledLoading.js +18 -0
- package/lib/components/Loading/index.d.ts +3 -0
- package/lib/components/Loading/index.d.ts.map +1 -0
- package/lib/components/Loading/index.js +26 -0
- package/lib/components/Loading/types.d.ts +25 -0
- package/lib/components/Loading/types.d.ts.map +1 -0
- package/lib/components/Loading/types.js +1 -0
- package/lib/components/Notification/Notification.d.ts +6 -0
- package/lib/components/Notification/Notification.d.ts.map +1 -0
- package/lib/components/Notification/Notification.js +13 -0
- package/lib/components/Notification/NotificationProvider.d.ts +4 -0
- package/lib/components/Notification/NotificationProvider.d.ts.map +1 -0
- package/lib/components/Notification/NotificationProvider.js +13 -0
- package/lib/components/Notification/Toast.d.ts +8 -0
- package/lib/components/Notification/Toast.d.ts.map +1 -0
- package/lib/components/Notification/Toast.js +32 -0
- package/lib/components/Notification/context.d.ts +7 -0
- package/lib/components/Notification/context.d.ts.map +1 -0
- package/lib/components/Notification/context.js +9 -0
- package/lib/components/Notification/index.d.ts +3 -0
- package/lib/components/Notification/index.d.ts.map +1 -0
- package/lib/components/Notification/index.js +2 -0
- package/lib/components/PlaySwitch/index.d.ts +4 -0
- package/lib/components/PlaySwitch/index.d.ts.map +1 -0
- package/lib/components/PlaySwitch/index.js +62 -0
- package/lib/components/PlaySwitch/types.d.ts +23 -0
- package/lib/components/PlaySwitch/types.d.ts.map +1 -0
- package/lib/components/PlaySwitch/types.js +1 -0
- package/lib/components/Progress/StyledProgress.d.ts +225 -0
- package/lib/components/Progress/StyledProgress.d.ts.map +1 -0
- package/lib/components/Progress/StyledProgress.js +22 -0
- package/lib/components/Progress/index.d.ts +25 -0
- package/lib/components/Progress/index.d.ts.map +1 -0
- package/lib/components/Progress/index.js +33 -0
- package/lib/components/Scrollable/StyledScrollable.d.ts +33 -0
- package/lib/components/Scrollable/StyledScrollable.d.ts.map +1 -0
- package/lib/components/Scrollable/StyledScrollable.js +56 -0
- package/lib/components/Scrollable/index.d.ts +6 -0
- package/lib/components/Scrollable/index.d.ts.map +1 -0
- package/lib/components/Scrollable/index.js +15 -0
- package/lib/components/Scrollable/types.d.ts +5 -0
- package/lib/components/Scrollable/types.d.ts.map +1 -0
- package/lib/components/Scrollable/types.js +1 -0
- package/lib/components/Sectional/Item.d.ts +13 -0
- package/lib/components/Sectional/Item.d.ts.map +1 -0
- package/lib/components/Sectional/Item.js +21 -0
- package/lib/components/Sectional/index.d.ts +9 -0
- package/lib/components/Sectional/index.d.ts.map +1 -0
- package/lib/components/Sectional/index.js +25 -0
- package/lib/components/Sectional/types.d.ts +33 -0
- package/lib/components/Sectional/types.d.ts.map +1 -0
- package/lib/components/Sectional/types.js +1 -0
- package/lib/components/Sectional/utils.d.ts +11 -0
- package/lib/components/Sectional/utils.d.ts.map +1 -0
- package/lib/components/Sectional/utils.js +37 -0
- package/lib/components/Selection/index.d.ts +17 -0
- package/lib/components/Selection/index.d.ts.map +1 -0
- package/lib/components/Selection/index.js +24 -0
- package/lib/components/Skeleton/SkeletonBackground.d.ts +6 -0
- package/lib/components/Skeleton/SkeletonBackground.d.ts.map +1 -0
- package/lib/components/Skeleton/SkeletonBackground.js +23 -0
- package/lib/components/Skeleton/SkeletonWrapper.d.ts +8 -0
- package/lib/components/Skeleton/SkeletonWrapper.d.ts.map +1 -0
- package/lib/components/Skeleton/SkeletonWrapper.js +50 -0
- package/lib/components/Skeleton/index.d.ts +4 -0
- package/lib/components/Skeleton/index.d.ts.map +1 -0
- package/lib/components/Skeleton/index.js +16 -0
- package/lib/components/Skeleton/types.d.ts +16 -0
- package/lib/components/Skeleton/types.d.ts.map +1 -0
- package/lib/components/Skeleton/types.js +1 -0
- package/lib/components/Slides/index.d.ts +14 -0
- package/lib/components/Slides/index.d.ts.map +1 -0
- package/lib/components/Slides/index.js +46 -0
- package/lib/components/Squircle/index.d.ts +35 -0
- package/lib/components/Squircle/index.d.ts.map +1 -0
- package/lib/components/Squircle/index.js +21 -0
- package/lib/components/Squircle/types.d.ts +20 -0
- package/lib/components/Squircle/types.d.ts.map +1 -0
- package/lib/components/Squircle/types.js +1 -0
- package/lib/components/Squircle/utils.d.ts +4 -0
- package/lib/components/Squircle/utils.d.ts.map +1 -0
- package/lib/components/Squircle/utils.js +86 -0
- package/lib/components/Text/StyledText.d.ts +18 -0
- package/lib/components/Text/StyledText.d.ts.map +1 -0
- package/lib/components/Text/StyledText.js +19 -0
- package/lib/components/Text/constants.d.ts +3 -0
- package/lib/components/Text/constants.d.ts.map +1 -0
- package/lib/components/Text/constants.js +6 -0
- package/lib/components/Text/index.d.ts +6 -0
- package/lib/components/Text/index.d.ts.map +1 -0
- package/lib/components/Text/index.js +7 -0
- package/lib/components/Text/types.d.ts +55 -0
- package/lib/components/Text/types.d.ts.map +1 -0
- package/lib/components/Text/types.js +1 -0
- package/lib/components/Text/withRichText.d.ts +6 -0
- package/lib/components/Text/withRichText.d.ts.map +1 -0
- package/lib/components/Text/withRichText.js +38 -0
- package/lib/components/Touchable/index.d.ts +5 -0
- package/lib/components/Touchable/index.d.ts.map +1 -0
- package/lib/components/Touchable/index.js +56 -0
- package/lib/components/Touchable/types.d.ts +22 -0
- package/lib/components/Touchable/types.d.ts.map +1 -0
- package/lib/components/Touchable/types.js +1 -0
- package/lib/components/Video/StyledVideoControlManager.d.ts +49 -0
- package/lib/components/Video/StyledVideoControlManager.d.ts.map +1 -0
- package/lib/components/Video/StyledVideoControlManager.js +64 -0
- package/lib/components/Video/StyledVideoDetail.d.ts +16 -0
- package/lib/components/Video/StyledVideoDetail.d.ts.map +1 -0
- package/lib/components/Video/StyledVideoDetail.js +23 -0
- package/lib/components/Video/VideoControlManager.d.ts +10 -0
- package/lib/components/Video/VideoControlManager.d.ts.map +1 -0
- package/lib/components/Video/VideoControlManager.js +67 -0
- package/lib/components/Video/VideoDetail.d.ts +11 -0
- package/lib/components/Video/VideoDetail.d.ts.map +1 -0
- package/lib/components/Video/VideoDetail.js +102 -0
- package/lib/components/Video/index.d.ts +25 -0
- package/lib/components/Video/index.d.ts.map +1 -0
- package/lib/components/Video/index.js +49 -0
- package/lib/components/Vimeo/Player.d.ts +4 -0
- package/lib/components/Vimeo/Player.d.ts.map +1 -0
- package/lib/components/Vimeo/Player.js +30 -0
- package/lib/components/Vimeo/constants.d.ts +2 -0
- package/lib/components/Vimeo/constants.d.ts.map +1 -0
- package/lib/components/Vimeo/constants.js +23 -0
- package/lib/components/Vimeo/index.d.ts +10 -0
- package/lib/components/Vimeo/index.d.ts.map +1 -0
- package/lib/components/Vimeo/index.js +35 -0
- package/lib/components/Vimeo/types.d.ts +74 -0
- package/lib/components/Vimeo/types.d.ts.map +1 -0
- package/lib/components/Vimeo/types.js +1 -0
- package/lib/components/Vimeo/utils.d.ts +4 -0
- package/lib/components/Vimeo/utils.d.ts.map +1 -0
- package/lib/components/Vimeo/utils.js +126 -0
- package/lib/components/index.d.ts +33 -0
- package/lib/components/index.d.ts.map +1 -0
- package/lib/components/index.js +32 -0
- package/lib/hooks/index.d.ts +3 -0
- package/lib/hooks/index.d.ts.map +1 -0
- package/lib/hooks/index.js +2 -0
- package/lib/hooks/useKeyboard.d.ts +10 -0
- package/lib/hooks/useKeyboard.d.ts.map +1 -0
- package/lib/hooks/useKeyboard.js +54 -0
- package/lib/hooks/usePrevious.d.ts +3 -0
- package/lib/hooks/usePrevious.d.ts.map +1 -0
- package/lib/hooks/usePrevious.js +9 -0
- package/lib/index.d.ts +7 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +6 -0
- package/lib/services/base/BaseResponse.d.ts +12 -0
- package/lib/services/base/BaseResponse.d.ts.map +1 -0
- package/lib/services/base/BaseResponse.js +9 -0
- package/lib/services/base/BaseService.d.ts +8 -0
- package/lib/services/base/BaseService.d.ts.map +1 -0
- package/lib/services/base/BaseService.js +61 -0
- package/lib/services/base/index.d.ts +3 -0
- package/lib/services/base/index.d.ts.map +1 -0
- package/lib/services/base/index.js +2 -0
- package/lib/services/hooks/index.d.ts +2 -0
- package/lib/services/hooks/index.d.ts.map +1 -0
- package/lib/services/hooks/index.js +1 -0
- package/lib/services/hooks/useRequest.d.ts +14 -0
- package/lib/services/hooks/useRequest.d.ts.map +1 -0
- package/lib/services/hooks/useRequest.js +30 -0
- package/lib/services/index.d.ts +3 -0
- package/lib/services/index.d.ts.map +1 -0
- package/lib/services/index.js +2 -0
- package/lib/theme/ThemeProvider.d.ts +13 -0
- package/lib/theme/ThemeProvider.d.ts.map +1 -0
- package/lib/theme/ThemeProvider.js +5 -0
- package/lib/theme/ThemeSwitcher.d.ts +9 -0
- package/lib/theme/ThemeSwitcher.d.ts.map +1 -0
- package/lib/theme/ThemeSwitcher.js +19 -0
- package/lib/theme/common/borders.d.ts +9 -0
- package/lib/theme/common/borders.d.ts.map +1 -0
- package/lib/theme/common/borders.js +27 -0
- package/lib/theme/common/colors.d.ts +74 -0
- package/lib/theme/common/colors.d.ts.map +1 -0
- package/lib/theme/common/colors.js +73 -0
- package/lib/theme/common/gradient.d.ts +13 -0
- package/lib/theme/common/gradient.d.ts.map +1 -0
- package/lib/theme/common/gradient.js +12 -0
- package/lib/theme/common/index.d.ts +50 -0
- package/lib/theme/common/index.d.ts.map +1 -0
- package/lib/theme/common/index.js +37 -0
- package/lib/theme/common/scale.d.ts +12 -0
- package/lib/theme/common/scale.d.ts.map +1 -0
- package/lib/theme/common/scale.js +16 -0
- package/lib/theme/common/shadows.d.ts +17 -0
- package/lib/theme/common/shadows.d.ts.map +1 -0
- package/lib/theme/common/shadows.js +13 -0
- package/lib/theme/common/sizes.d.ts +6 -0
- package/lib/theme/common/sizes.d.ts.map +1 -0
- package/lib/theme/common/sizes.js +26 -0
- package/lib/theme/common/spaces.d.ts +5 -0
- package/lib/theme/common/spaces.d.ts.map +1 -0
- package/lib/theme/common/spaces.js +31 -0
- package/lib/theme/common/text.d.ts +14 -0
- package/lib/theme/common/text.d.ts.map +1 -0
- package/lib/theme/common/text.js +70 -0
- package/lib/theme/components/art.d.ts +17 -0
- package/lib/theme/components/art.d.ts.map +1 -0
- package/lib/theme/components/art.js +15 -0
- package/lib/theme/components/avatar.d.ts +11 -0
- package/lib/theme/components/avatar.d.ts.map +1 -0
- package/lib/theme/components/avatar.js +20 -0
- package/lib/theme/components/base.d.ts +14 -0
- package/lib/theme/components/base.d.ts.map +1 -0
- package/lib/theme/components/base.js +17 -0
- package/lib/theme/components/bubble.d.ts +6 -0
- package/lib/theme/components/bubble.d.ts.map +1 -0
- package/lib/theme/components/bubble.js +10 -0
- package/lib/theme/components/button.d.ts +12 -0
- package/lib/theme/components/button.d.ts.map +1 -0
- package/lib/theme/components/button.js +22 -0
- package/lib/theme/components/card.d.ts +8 -0
- package/lib/theme/components/card.d.ts.map +1 -0
- package/lib/theme/components/card.js +16 -0
- package/lib/theme/components/chart.d.ts +16 -0
- package/lib/theme/components/chart.d.ts.map +1 -0
- package/lib/theme/components/chart.js +22 -0
- package/lib/theme/components/chat.d.ts +11 -0
- package/lib/theme/components/chat.d.ts.map +1 -0
- package/lib/theme/components/chat.js +20 -0
- package/lib/theme/components/chip.d.ts +18 -0
- package/lib/theme/components/chip.d.ts.map +1 -0
- package/lib/theme/components/chip.js +43 -0
- package/lib/theme/components/divider.d.ts +12 -0
- package/lib/theme/components/divider.d.ts.map +1 -0
- package/lib/theme/components/divider.js +16 -0
- package/lib/theme/components/filter.d.ts +5 -0
- package/lib/theme/components/filter.d.ts.map +1 -0
- package/lib/theme/components/filter.js +8 -0
- package/lib/theme/components/header.d.ts +30 -0
- package/lib/theme/components/header.d.ts.map +1 -0
- package/lib/theme/components/header.js +36 -0
- package/lib/theme/components/image.d.ts +4 -0
- package/lib/theme/components/image.d.ts.map +1 -0
- package/lib/theme/components/image.js +6 -0
- package/lib/theme/components/index.d.ts +27 -0
- package/lib/theme/components/index.d.ts.map +1 -0
- package/lib/theme/components/index.js +26 -0
- package/lib/theme/components/infoCard.d.ts +25 -0
- package/lib/theme/components/infoCard.d.ts.map +1 -0
- package/lib/theme/components/infoCard.js +32 -0
- package/lib/theme/components/input.d.ts +21 -0
- package/lib/theme/components/input.d.ts.map +1 -0
- package/lib/theme/components/input.js +34 -0
- package/lib/theme/components/levelStep.d.ts +48 -0
- package/lib/theme/components/levelStep.d.ts.map +1 -0
- package/lib/theme/components/levelStep.js +56 -0
- package/lib/theme/components/loading.d.ts +16 -0
- package/lib/theme/components/loading.d.ts.map +1 -0
- package/lib/theme/components/loading.js +27 -0
- package/lib/theme/components/notification.d.ts +23 -0
- package/lib/theme/components/notification.d.ts.map +1 -0
- package/lib/theme/components/notification.js +38 -0
- package/lib/theme/components/playSwitch.d.ts +10 -0
- package/lib/theme/components/playSwitch.d.ts.map +1 -0
- package/lib/theme/components/playSwitch.js +14 -0
- package/lib/theme/components/progress.d.ts +10 -0
- package/lib/theme/components/progress.d.ts.map +1 -0
- package/lib/theme/components/progress.js +14 -0
- package/lib/theme/components/selection.d.ts +9 -0
- package/lib/theme/components/selection.d.ts.map +1 -0
- package/lib/theme/components/selection.js +21 -0
- package/lib/theme/components/skeleton.d.ts +11 -0
- package/lib/theme/components/skeleton.d.ts.map +1 -0
- package/lib/theme/components/skeleton.js +18 -0
- package/lib/theme/components/slides.d.ts +7 -0
- package/lib/theme/components/slides.d.ts.map +1 -0
- package/lib/theme/components/slides.js +10 -0
- package/lib/theme/components/text.d.ts +21 -0
- package/lib/theme/components/text.d.ts.map +1 -0
- package/lib/theme/components/text.js +22 -0
- package/lib/theme/components/touchable.d.ts +15 -0
- package/lib/theme/components/touchable.d.ts.map +1 -0
- package/lib/theme/components/touchable.js +41 -0
- package/lib/theme/components/video.d.ts +18 -0
- package/lib/theme/components/video.d.ts.map +1 -0
- package/lib/theme/components/video.js +47 -0
- package/lib/theme/getTheme.d.ts +34 -0
- package/lib/theme/getTheme.d.ts.map +1 -0
- package/lib/theme/getTheme.js +36 -0
- package/lib/theme/index.d.ts +10 -0
- package/lib/theme/index.d.ts.map +1 -0
- package/lib/theme/index.js +7 -0
- package/lib/utils/api/index.d.ts +3 -0
- package/lib/utils/api/index.d.ts.map +1 -0
- package/lib/utils/api/index.js +2 -0
- package/lib/utils/api/keys.d.ts +3 -0
- package/lib/utils/api/keys.d.ts.map +1 -0
- package/lib/utils/api/keys.js +11 -0
- package/lib/utils/api/urls.d.ts +3 -0
- package/lib/utils/api/urls.d.ts.map +1 -0
- package/lib/utils/api/urls.js +8 -0
- package/lib/utils/format/index.d.ts +3 -0
- package/lib/utils/format/index.d.ts.map +1 -0
- package/lib/utils/format/index.js +2 -0
- package/lib/utils/format/text.d.ts +4 -0
- package/lib/utils/format/text.d.ts.map +1 -0
- package/lib/utils/format/text.js +13 -0
- package/lib/utils/haptic/index.d.ts +4 -0
- package/lib/utils/haptic/index.d.ts.map +1 -0
- package/lib/utils/haptic/index.js +3 -0
- package/lib/utils/haptic/types.d.ts +25 -0
- package/lib/utils/haptic/types.d.ts.map +1 -0
- package/lib/utils/haptic/types.js +25 -0
- package/lib/utils/haptic/utils.d.ts +3 -0
- package/lib/utils/haptic/utils.d.ts.map +1 -0
- package/lib/utils/haptic/utils.js +8 -0
- package/lib/utils/index.d.ts +9 -0
- package/lib/utils/index.d.ts.map +1 -0
- package/lib/utils/index.js +8 -0
- package/lib/utils/intl/IntlProvider.d.ts +7 -0
- package/lib/utils/intl/IntlProvider.d.ts.map +1 -0
- package/lib/utils/intl/IntlProvider.js +16 -0
- package/lib/utils/intl/context.d.ts +15 -0
- package/lib/utils/intl/context.d.ts.map +1 -0
- package/lib/utils/intl/context.js +9 -0
- package/lib/utils/intl/global.d.ts +7 -0
- package/lib/utils/intl/global.d.ts.map +1 -0
- package/lib/utils/intl/global.js +1 -0
- package/lib/utils/intl/hooks.d.ts +7 -0
- package/lib/utils/intl/hooks.d.ts.map +1 -0
- package/lib/utils/intl/hooks.js +10 -0
- package/lib/utils/intl/index.d.ts +5 -0
- package/lib/utils/intl/index.d.ts.map +1 -0
- package/lib/utils/intl/index.js +4 -0
- package/lib/utils/intl/state.d.ts +12 -0
- package/lib/utils/intl/state.d.ts.map +1 -0
- package/lib/utils/intl/state.js +14 -0
- package/lib/utils/intl/utils.d.ts +6 -0
- package/lib/utils/intl/utils.d.ts.map +1 -0
- package/lib/utils/intl/utils.js +7 -0
- package/lib/utils/notification/index.d.ts +2 -0
- package/lib/utils/notification/index.d.ts.map +1 -0
- package/lib/utils/notification/index.js +1 -0
- package/lib/utils/notification/toast/constants.d.ts +4 -0
- package/lib/utils/notification/toast/constants.d.ts.map +1 -0
- package/lib/utils/notification/toast/constants.js +7 -0
- package/lib/utils/notification/toast/index.d.ts +3 -0
- package/lib/utils/notification/toast/index.d.ts.map +1 -0
- package/lib/utils/notification/toast/index.js +2 -0
- package/lib/utils/notification/toast/types.d.ts +2 -0
- package/lib/utils/notification/toast/types.d.ts.map +1 -0
- package/lib/utils/notification/toast/types.js +1 -0
- package/lib/utils/notification/toast/utils.d.ts +6 -0
- package/lib/utils/notification/toast/utils.d.ts.map +1 -0
- package/lib/utils/notification/toast/utils.js +23 -0
- package/lib/utils/routes/index.d.ts +4 -0
- package/lib/utils/routes/index.d.ts.map +1 -0
- package/lib/utils/routes/index.js +3 -0
- package/lib/utils/routes/types.d.ts +10 -0
- package/lib/utils/routes/types.d.ts.map +1 -0
- package/lib/utils/routes/types.js +1 -0
- package/lib/utils/routes/utils.d.ts +5 -0
- package/lib/utils/routes/utils.d.ts.map +1 -0
- package/lib/utils/routes/utils.js +3 -0
- package/lib/utils/scale.d.ts +4 -0
- package/lib/utils/scale.d.ts.map +1 -0
- package/lib/utils/scale.js +15 -0
- package/lib/utils/ui/color/index.d.ts +3 -0
- package/lib/utils/ui/color/index.d.ts.map +1 -0
- package/lib/utils/ui/color/index.js +2 -0
- package/lib/utils/ui/color/utils.d.ts +2 -0
- package/lib/utils/ui/color/utils.d.ts.map +1 -0
- package/lib/utils/ui/color/utils.js +9 -0
- package/lib/utils/ui/index.d.ts +2 -0
- package/lib/utils/ui/index.d.ts.map +1 -0
- package/lib/utils/ui/index.js +1 -0
- package/package.json +7 -6
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ViewToken } from '@shopify/flash-list';
|
|
2
|
+
import type { SectionListData } from 'react-native';
|
|
3
|
+
import type { FlashListItem } from './types';
|
|
4
|
+
export declare const convertSectionsToFlashListItems: <T, S>(sections: SectionListData<T, S>[]) => FlashListItem<T, S>[];
|
|
5
|
+
export declare const getItemType: <T, S>(item: FlashListItem<T, S>) => "row" | "sectionHeader";
|
|
6
|
+
export declare const getStickyHeaderIndices: <T, S>(items: FlashListItem<T, S>[]) => number[];
|
|
7
|
+
export declare const isSectionChanged: <T, S>({ viewableItems, changed, }: {
|
|
8
|
+
viewableItems: ViewToken[];
|
|
9
|
+
changed: ViewToken[];
|
|
10
|
+
}) => boolean;
|
|
11
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/Sectional/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,eAAO,MAAM,+BAA+B,GAAI,CAAC,EAAE,CAAC,YACxC,eAAe,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAChC,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EASrB,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,CAAC,EAAE,CAAC,QAAQ,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,KAAG,KAAK,GAAG,eACd,CAAC;AAEzD,eAAO,MAAM,sBAAsB,GAAI,CAAC,EAAE,CAAC,SAAS,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,KAGhD,MAAM,EAC9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,CAAC,EAAE,CAAC,+BAGlC;IACD,aAAa,EAAE,SAAS,EAAE,CAAC;IAC3B,OAAO,EAAE,SAAS,EAAE,CAAC;CACrB,YAoCD,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { first, get, isNumber } from 'lodash';
|
|
2
|
+
export const convertSectionsToFlashListItems = (sections) => {
|
|
3
|
+
return [
|
|
4
|
+
{ type: 'headerSeparator' },
|
|
5
|
+
...sections.flatMap((section) => [
|
|
6
|
+
{ type: 'sectionHeader', section },
|
|
7
|
+
...section.data.map((item, index) => ({ type: 'row', item, section, index })),
|
|
8
|
+
]),
|
|
9
|
+
{ type: 'footerSeparator' },
|
|
10
|
+
];
|
|
11
|
+
};
|
|
12
|
+
export const getItemType = (item) => item.type === 'sectionHeader' ? 'sectionHeader' : 'row';
|
|
13
|
+
export const getStickyHeaderIndices = (items) => {
|
|
14
|
+
return items
|
|
15
|
+
.map((item, index) => (item.type === 'sectionHeader' ? index : null))
|
|
16
|
+
.filter(isNumber);
|
|
17
|
+
};
|
|
18
|
+
export const isSectionChanged = ({ viewableItems, changed, }) => {
|
|
19
|
+
const firstViewableItem = first(viewableItems);
|
|
20
|
+
if (!firstViewableItem) {
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
const firstViewableItemIndex = firstViewableItem.index;
|
|
24
|
+
if (!isNumber(firstViewableItemIndex)) {
|
|
25
|
+
return false;
|
|
26
|
+
}
|
|
27
|
+
const firstViewableItemContent = firstViewableItem.item;
|
|
28
|
+
const secondViewableItem = get(viewableItems, 1);
|
|
29
|
+
const secondViewableItemContent = secondViewableItem?.item;
|
|
30
|
+
const isASectionHeaderGoingUp = firstViewableItemContent?.type === 'sectionHeader' &&
|
|
31
|
+
changed.some((item) => item.index === firstViewableItemIndex - 1 && !item.isViewable);
|
|
32
|
+
const isASectionHeaderGoingDown = viewableItems.length > 2 &&
|
|
33
|
+
secondViewableItemContent?.type === 'sectionHeader' &&
|
|
34
|
+
changed.some((item) => item.index === firstViewableItemIndex &&
|
|
35
|
+
item.isViewable);
|
|
36
|
+
return isASectionHeaderGoingUp || isASectionHeaderGoingDown;
|
|
37
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { CardProps } from '../Card';
|
|
2
|
+
interface SelectionProps extends CardProps {
|
|
3
|
+
/**
|
|
4
|
+
* Specifies whether the selection is selected.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
selected?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Callback function that is triggered when the selection changes.
|
|
10
|
+
*
|
|
11
|
+
* @param selected
|
|
12
|
+
*/
|
|
13
|
+
onSelectionChange?: (selected: boolean) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const Selection: ({ selected, borderRadius, borderColor, backgroundColor, ...otherProps }: SelectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Selection/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,UAAU,cAAe,SAAQ,SAAS;IACxC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,IAAI,CAAC;CACjD;AAcD,eAAO,MAAM,SAAS,4EAMnB,cAAc,4CAgChB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
|
+
import { useTheme } from '../../theme';
|
|
4
|
+
import { Card } from '../Card';
|
|
5
|
+
import { Touchable } from '../Touchable';
|
|
6
|
+
const genCardProps = (theme, status, borderColor, backgroundColor) => ({
|
|
7
|
+
borderWidth: theme.__hd__.selection.borderWidths[status],
|
|
8
|
+
borderColor: borderColor || theme.__hd__.selection.borderColors[status],
|
|
9
|
+
backgroundColor: backgroundColor || theme.__hd__.selection.backgroundColors[status],
|
|
10
|
+
});
|
|
11
|
+
export const Selection = ({ selected = false, borderRadius, borderColor, backgroundColor, ...otherProps }) => {
|
|
12
|
+
const theme = useTheme();
|
|
13
|
+
const [status, setStatus] = useState(selected ? 'selected' : 'unselected');
|
|
14
|
+
const cardProps = useMemo(() => genCardProps(theme, status, borderColor, backgroundColor), [backgroundColor, borderColor, status, theme]);
|
|
15
|
+
const onPress = useCallback(() => {
|
|
16
|
+
setStatus(prevStatus => {
|
|
17
|
+
const newStatus = prevStatus === 'selected' ? 'unselected' : 'selected';
|
|
18
|
+
otherProps.onSelectionChange?.(newStatus === 'selected');
|
|
19
|
+
return newStatus;
|
|
20
|
+
});
|
|
21
|
+
}, [otherProps]);
|
|
22
|
+
useEffect(() => setStatus(selected ? 'selected' : 'unselected'), [selected]);
|
|
23
|
+
return (_jsx(Touchable, { onPress: onPress, ...otherProps, children: _jsx(Card, { ...cardProps, borderRadius: borderRadius || theme.__hd__.selection.defaultBorderRadius, ...otherProps }) }));
|
|
24
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ViewProps } from 'react-native';
|
|
3
|
+
export interface SkeletonBackgroundProps extends ViewProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const SkeletonBackground: React.FC<SkeletonBackgroundProps>;
|
|
6
|
+
//# sourceMappingURL=SkeletonBackground.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkeletonBackground.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/SkeletonBackground.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAW9C,MAAM,WAAW,uBAAwB,SAAQ,SAAS;CAAG;AAE7D,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA6BhE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React, { useEffect, useMemo } from 'react';
|
|
3
|
+
import Animated, { Easing, useAnimatedStyle, useSharedValue, withRepeat, withTiming, } from 'react-native-reanimated';
|
|
4
|
+
import { useTheme } from '../../theme';
|
|
5
|
+
export const SkeletonBackground = ({ style, ...otherProps }) => {
|
|
6
|
+
const theme = useTheme();
|
|
7
|
+
const themeSkeleton = useMemo(() => theme.__hd__.skeleton, [theme]);
|
|
8
|
+
const backgroundColor = useSharedValue(themeSkeleton.backgroundColors.min);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
backgroundColor.value = withRepeat(withTiming(themeSkeleton.backgroundColors.max, {
|
|
11
|
+
duration: themeSkeleton.animation.loopInterval,
|
|
12
|
+
easing: Easing.linear,
|
|
13
|
+
}), -1, true);
|
|
14
|
+
}, [
|
|
15
|
+
backgroundColor,
|
|
16
|
+
themeSkeleton.animation.loopInterval,
|
|
17
|
+
themeSkeleton.backgroundColors.max,
|
|
18
|
+
]);
|
|
19
|
+
const animatedStyle = useAnimatedStyle(() => ({
|
|
20
|
+
backgroundColor: backgroundColor.value,
|
|
21
|
+
}));
|
|
22
|
+
return _jsx(Animated.View, { style: [style, animatedStyle], ...otherProps });
|
|
23
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { SkeletonProps } from './types';
|
|
3
|
+
interface SkeletonWrapperProps extends SkeletonProps {
|
|
4
|
+
onSkeletonVisibilityChange?: (isVisible: boolean) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const SkeletonWrapper: React.FC<SkeletonWrapperProps>;
|
|
7
|
+
export {};
|
|
8
|
+
//# sourceMappingURL=SkeletonWrapper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SkeletonWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/SkeletonWrapper.tsx"],"names":[],"mappings":"AACA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAcvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,UAAU,oBAAqB,SAAQ,aAAa;IAClD,0BAA0B,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;CAC3D;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA6E1D,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { isNil } from 'lodash';
|
|
3
|
+
import React, { useCallback, useEffect, useMemo, useRef } from 'react';
|
|
4
|
+
import { StyleSheet } from 'react-native';
|
|
5
|
+
import Animated, { runOnJS, useAnimatedStyle, useSharedValue, withRepeat, withTiming, } from 'react-native-reanimated';
|
|
6
|
+
import { useTheme } from '../../theme';
|
|
7
|
+
import { Box } from '../Box';
|
|
8
|
+
import { SkeletonBackground } from './SkeletonBackground';
|
|
9
|
+
export const SkeletonWrapper = ({ loading = false, onSkeletonVisibilityChange = () => { }, children, skeletonOverlay, ...otherProps }) => {
|
|
10
|
+
const theme = useTheme();
|
|
11
|
+
const themeSkeleton = useMemo(() => theme.__hd__.skeleton, [theme]);
|
|
12
|
+
const postShowingTimeout = useRef();
|
|
13
|
+
const skeletonOpacity = useSharedValue(loading ? 1 : 0);
|
|
14
|
+
const skeletonColor = useSharedValue(themeSkeleton.backgroundColors.min);
|
|
15
|
+
const animatedContentStyle = useAnimatedStyle(() => ({
|
|
16
|
+
opacity: 1 - skeletonOpacity.value,
|
|
17
|
+
}));
|
|
18
|
+
const animatedSkeletonStyle = useAnimatedStyle(() => ({
|
|
19
|
+
opacity: skeletonOpacity.value,
|
|
20
|
+
backgroundColor: skeletonColor.value,
|
|
21
|
+
borderRadius: themeSkeleton.borderRadius,
|
|
22
|
+
}));
|
|
23
|
+
const postShowingCallback = useCallback(() => {
|
|
24
|
+
if (!isNil(postShowingTimeout.current)) {
|
|
25
|
+
clearTimeout(postShowingTimeout.current);
|
|
26
|
+
}
|
|
27
|
+
postShowingTimeout.current = setTimeout(() => onSkeletonVisibilityChange(loading), themeSkeleton.postShowingTimeout);
|
|
28
|
+
}, [loading, onSkeletonVisibilityChange, themeSkeleton.postShowingTimeout]);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
skeletonOpacity.value = withTiming(loading ? 1 : 0, {
|
|
31
|
+
duration: themeSkeleton.animation.showingDuration,
|
|
32
|
+
}, () => runOnJS(postShowingCallback)());
|
|
33
|
+
}, [
|
|
34
|
+
loading,
|
|
35
|
+
onSkeletonVisibilityChange,
|
|
36
|
+
postShowingCallback,
|
|
37
|
+
skeletonOpacity,
|
|
38
|
+
themeSkeleton.animation.showingDuration,
|
|
39
|
+
]);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
skeletonColor.value = withRepeat(withTiming(themeSkeleton.backgroundColors.max, {
|
|
42
|
+
duration: themeSkeleton.animation.loopInterval,
|
|
43
|
+
}), -1, true);
|
|
44
|
+
}, [
|
|
45
|
+
skeletonColor,
|
|
46
|
+
themeSkeleton.animation.loopInterval,
|
|
47
|
+
themeSkeleton.backgroundColors.max,
|
|
48
|
+
]);
|
|
49
|
+
return (_jsxs(Box, { overflow: "hidden", ...otherProps, children: [!skeletonOverlay && (_jsx(Animated.View, { style: animatedContentStyle, children: children })), _jsx(Animated.View, { style: [StyleSheet.absoluteFill, animatedSkeletonStyle], children: _jsx(SkeletonBackground, {}) }), skeletonOverlay && (_jsx(Animated.View, { style: animatedContentStyle, children: children }))] }));
|
|
50
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAKnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAyB5C,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import { Box } from '../Box';
|
|
4
|
+
import { SkeletonWrapper } from './SkeletonWrapper';
|
|
5
|
+
export const Skeleton = ({ loading = true, children, ...otherProps }) => {
|
|
6
|
+
const [isSkeletonShown, setIsSkeletonShown] = useState(loading);
|
|
7
|
+
useEffect(() => {
|
|
8
|
+
if (loading) {
|
|
9
|
+
setIsSkeletonShown(true);
|
|
10
|
+
}
|
|
11
|
+
}, [isSkeletonShown, loading]);
|
|
12
|
+
if (!isSkeletonShown) {
|
|
13
|
+
return _jsx(Box, { ...otherProps, children: children });
|
|
14
|
+
}
|
|
15
|
+
return (_jsx(SkeletonWrapper, { loading: loading, onSkeletonVisibilityChange: setIsSkeletonShown, ...otherProps, children: children }));
|
|
16
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { BoxProps } from '../Box';
|
|
2
|
+
export interface SkeletonProps extends BoxProps {
|
|
3
|
+
/**
|
|
4
|
+
* If `true`, the skeleton will be shown.
|
|
5
|
+
*/
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* If `true`, the skeleton will be shown as overlay.
|
|
9
|
+
*/
|
|
10
|
+
skeletonOverlay?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Callback when the skeleton visibility changes.
|
|
13
|
+
*/
|
|
14
|
+
postShowingTimeout?: number;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAEvC,MAAM,WAAW,aAAc,SAAQ,QAAQ;IAC7C;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ListRenderItem } from 'react-native';
|
|
2
|
+
import type { ListProps } from '../List';
|
|
3
|
+
export interface SlidesProps<T> extends Omit<ListProps<T>, 'renderItem'> {
|
|
4
|
+
/**
|
|
5
|
+
* Render a slide.
|
|
6
|
+
*/
|
|
7
|
+
renderSlide: ListRenderItem<T>;
|
|
8
|
+
/**
|
|
9
|
+
* The current slide index.
|
|
10
|
+
*/
|
|
11
|
+
currentSlideIndex: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function Slides<T>({ renderSlide, currentSlideIndex, onScrollToIndexFailed, ...otherProps }: SlidesProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Slides/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAsB,MAAM,cAAc,CAAC;AAQvE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,MAAM,WAAW,WAAW,CAAC,CAAC,CAAE,SAAQ,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,YAAY,CAAC;IACtE;;OAEG;IACH,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;IAE/B;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAkDD,wBAAgB,MAAM,CAAC,CAAC,EAAE,EACxB,WAAW,EACX,iBAAiB,EACjB,qBAAgC,EAChC,GAAG,UAAU,EACd,EAAE,WAAW,CAAC,CAAC,CAAC,2CA8BhB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styled from '@emotion/native';
|
|
3
|
+
import React, { useEffect, useMemo } from 'react';
|
|
4
|
+
import { FlatList, useWindowDimensions } from 'react-native';
|
|
5
|
+
import Animated, { useAnimatedStyle, useSharedValue, withTiming, } from 'react-native-reanimated';
|
|
6
|
+
import { useTheme } from '../../theme';
|
|
7
|
+
import { List } from '../List';
|
|
8
|
+
const StyledSlideContainer = styled(Animated.View)(() => {
|
|
9
|
+
const { width } = useWindowDimensions();
|
|
10
|
+
return {
|
|
11
|
+
width,
|
|
12
|
+
};
|
|
13
|
+
});
|
|
14
|
+
function Slide({ renderSlide, currentSlideIndex, ...info }) {
|
|
15
|
+
const theme = useTheme();
|
|
16
|
+
const themeSlides = useMemo(() => theme.__hd__.slides, [theme]);
|
|
17
|
+
const opacity = useSharedValue(currentSlideIndex === info.index ? 1 : 0);
|
|
18
|
+
const scale = useSharedValue(currentSlideIndex === info.index ? 1 : themeSlides.outFocusScale);
|
|
19
|
+
const animatedStyle = useAnimatedStyle(() => ({
|
|
20
|
+
opacity: opacity.value,
|
|
21
|
+
transform: [{ scale: scale.value }],
|
|
22
|
+
}));
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
opacity.value = withTiming(currentSlideIndex === info.index ? 1 : 0);
|
|
25
|
+
scale.value = withTiming(currentSlideIndex === info.index ? 1 : themeSlides.outFocusScale);
|
|
26
|
+
}, [
|
|
27
|
+
currentSlideIndex,
|
|
28
|
+
info.index,
|
|
29
|
+
opacity,
|
|
30
|
+
scale,
|
|
31
|
+
themeSlides.outFocusScale,
|
|
32
|
+
]);
|
|
33
|
+
return (_jsx(StyledSlideContainer, { style: [animatedStyle], children: renderSlide(info) }));
|
|
34
|
+
}
|
|
35
|
+
export function Slides({ renderSlide, currentSlideIndex, onScrollToIndexFailed = () => { }, ...otherProps }) {
|
|
36
|
+
const listRef = React.useRef(null);
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
if (listRef.current) {
|
|
39
|
+
listRef.current.scrollToIndex({
|
|
40
|
+
animated: true,
|
|
41
|
+
index: currentSlideIndex,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
}, [currentSlideIndex]);
|
|
45
|
+
return (_jsx(List, { ref: listRef, renderItem: info => (_jsx(Slide, { ...info, renderSlide: renderSlide, currentSlideIndex: currentSlideIndex })), initialScrollIndex: currentSlideIndex, onScrollToIndexFailed: onScrollToIndexFailed, pagingEnabled: true, horizontal: true, scrollEnabled: false, ...otherProps }));
|
|
46
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
export interface SquircleProps {
|
|
3
|
+
/**
|
|
4
|
+
* The radius of the squircle.
|
|
5
|
+
*
|
|
6
|
+
*/
|
|
7
|
+
borderRadius: number;
|
|
8
|
+
/**
|
|
9
|
+
* The background color of the squircle.
|
|
10
|
+
*
|
|
11
|
+
* @default white
|
|
12
|
+
*/
|
|
13
|
+
backgroundColor: string;
|
|
14
|
+
/**
|
|
15
|
+
* The higher the value, the smoother the border.
|
|
16
|
+
*
|
|
17
|
+
* @default 1
|
|
18
|
+
*/
|
|
19
|
+
borderSmoothing?: number;
|
|
20
|
+
/**
|
|
21
|
+
* The width of the squircle.
|
|
22
|
+
*/
|
|
23
|
+
width: number;
|
|
24
|
+
/**
|
|
25
|
+
* The height of the squircle.
|
|
26
|
+
*/
|
|
27
|
+
height: number;
|
|
28
|
+
/**
|
|
29
|
+
* Additional style.
|
|
30
|
+
*/
|
|
31
|
+
style?: StyleProp<ViewStyle> | undefined;
|
|
32
|
+
}
|
|
33
|
+
export declare const Squircle: ({ borderRadius, backgroundColor, borderSmoothing, width, height, style, }: SquircleProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export { drawSquirclePath } from './utils';
|
|
35
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Squircle/index.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAKzD,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;;OAIG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,GAAG,SAAS,CAAC;CAC1C;AAMD,eAAO,MAAM,QAAQ,8EAOlB,aAAa,4CAef,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import styled from '@emotion/native';
|
|
3
|
+
import { Canvas, Path } from '@shopify/react-native-skia';
|
|
4
|
+
import { useMemo } from 'react';
|
|
5
|
+
import { StyleSheet } from 'react-native';
|
|
6
|
+
import { drawSquirclePath } from './utils';
|
|
7
|
+
const StyledCanvas = styled(Canvas) `
|
|
8
|
+
${StyleSheet.absoluteFill}
|
|
9
|
+
`;
|
|
10
|
+
export const Squircle = ({ borderRadius, backgroundColor, borderSmoothing = 1, width, height, style, }) => {
|
|
11
|
+
const path = useMemo(() => {
|
|
12
|
+
return drawSquirclePath({
|
|
13
|
+
borderSmoothing,
|
|
14
|
+
borderRadius: borderRadius,
|
|
15
|
+
width,
|
|
16
|
+
height,
|
|
17
|
+
});
|
|
18
|
+
}, [borderSmoothing, borderRadius, width, height]);
|
|
19
|
+
return (_jsx(StyledCanvas, { style: style, children: _jsx(Path, { path: path, color: backgroundColor }) }));
|
|
20
|
+
};
|
|
21
|
+
export { drawSquirclePath } from './utils';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { SkPath } from '@shopify/react-native-skia';
|
|
2
|
+
export interface SquircleParams {
|
|
3
|
+
borderSmoothing: number;
|
|
4
|
+
borderRadius: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
}
|
|
8
|
+
export interface SquirclePathParams extends SquircleParams {
|
|
9
|
+
a: number;
|
|
10
|
+
b: number;
|
|
11
|
+
c: number;
|
|
12
|
+
d: number;
|
|
13
|
+
p: number;
|
|
14
|
+
circularSectionLength: number;
|
|
15
|
+
}
|
|
16
|
+
export interface DrawSquirclePathParams extends SquirclePathParams {
|
|
17
|
+
path: SkPath;
|
|
18
|
+
borderRadius: number;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Squircle/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAEzD,MAAM,WAAW,cAAc;IAC7B,eAAe,EAAE,MAAM,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,kBAAmB,SAAQ,cAAc;IACxD,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,qBAAqB,EAAE,MAAM,CAAC;CAC/B;AAED,MAAM,WAAW,sBAAuB,SAAQ,kBAAkB;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SquircleParams, SquirclePathParams } from './types';
|
|
2
|
+
export declare const getPathParamsForBorder: ({ borderSmoothing, borderRadius, width, height, }: SquircleParams) => SquirclePathParams;
|
|
3
|
+
export declare const drawSquirclePath: ({ borderSmoothing, borderRadius, width, height, }: SquircleParams) => import("@shopify/react-native-skia").SkPath;
|
|
4
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/Squircle/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAEV,cAAc,EACd,kBAAkB,EACnB,MAAM,SAAS,CAAC;AAIjB,eAAO,MAAM,sBAAsB,sDAKhC,cAAc,KAAG,kBA0CnB,CAAC;AAsIF,eAAO,MAAM,gBAAgB,sDAK1B,cAAc,gDA0BhB,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { Skia } from '@shopify/react-native-skia';
|
|
2
|
+
const degreesToRadians = (degrees) => degrees * (Math.PI / 180);
|
|
3
|
+
export const getPathParamsForBorder = ({ borderSmoothing, borderRadius, width, height, }) => {
|
|
4
|
+
const maxRadius = Math.min(width, height) / 2;
|
|
5
|
+
borderRadius = Math.min(borderRadius, maxRadius);
|
|
6
|
+
const p = Math.min((1 + borderSmoothing) * borderRadius, maxRadius);
|
|
7
|
+
let angleAlpha, angleBeta;
|
|
8
|
+
if (borderRadius <= maxRadius / 2) {
|
|
9
|
+
angleBeta = 90 * (1 - borderSmoothing);
|
|
10
|
+
angleAlpha = 45 * borderSmoothing;
|
|
11
|
+
}
|
|
12
|
+
else {
|
|
13
|
+
const diffRatio = (borderRadius - maxRadius / 2) / (maxRadius / 2);
|
|
14
|
+
angleBeta = 90 * (1 - borderSmoothing * (1 - diffRatio));
|
|
15
|
+
angleAlpha = 45 * borderSmoothing * (1 - diffRatio);
|
|
16
|
+
}
|
|
17
|
+
const angleTheta = (90 - angleBeta) / 2;
|
|
18
|
+
const p3ToP4Distance = borderRadius * Math.tan(degreesToRadians(angleTheta / 2));
|
|
19
|
+
const circularSectionLength = Math.sin(degreesToRadians(angleBeta / 2)) * borderRadius * Math.sqrt(2);
|
|
20
|
+
const c = p3ToP4Distance * Math.cos(degreesToRadians(angleAlpha));
|
|
21
|
+
const d = c * Math.tan(degreesToRadians(angleAlpha));
|
|
22
|
+
const b = (p - circularSectionLength - c - d) / 3;
|
|
23
|
+
const a = 2 * b;
|
|
24
|
+
return {
|
|
25
|
+
a,
|
|
26
|
+
b,
|
|
27
|
+
c,
|
|
28
|
+
d,
|
|
29
|
+
p,
|
|
30
|
+
circularSectionLength,
|
|
31
|
+
width,
|
|
32
|
+
height,
|
|
33
|
+
borderRadius,
|
|
34
|
+
borderSmoothing,
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
const drawTopRightBorderPath = ({ path, width, height, borderRadius, a, b, c, d, p, circularSectionLength, }) => {
|
|
38
|
+
path.moveTo(Math.max(width / 2, width - p), 0);
|
|
39
|
+
path.cubicTo(width - (p - a), 0, width - (p - a - b), 0, width - (p - a - b - c), d);
|
|
40
|
+
path.rArcTo(borderRadius, borderRadius, 0, true, false, circularSectionLength, circularSectionLength);
|
|
41
|
+
path.cubicTo(width, p - a - b, width, p - a, width, Math.min(height / 2, p));
|
|
42
|
+
};
|
|
43
|
+
const drawBottomRightBorderPath = ({ path, width, height, borderRadius, a, b, c, d, p, circularSectionLength, }) => {
|
|
44
|
+
path.lineTo(width, Math.max(height / 2, height - p));
|
|
45
|
+
path.cubicTo(width, height - (p - a), width, height - (p - a - b), width - d, height - (p - a - b - c));
|
|
46
|
+
path.rArcTo(borderRadius, borderRadius, 0, true, false, -circularSectionLength, circularSectionLength);
|
|
47
|
+
path.cubicTo(width - (p - a - b), height, width - (p - a), height, Math.max(width / 2, width - p), height);
|
|
48
|
+
};
|
|
49
|
+
const drawBottomLeftBorderPath = ({ path, width, height, borderRadius, a, b, c, d, p, circularSectionLength, }) => {
|
|
50
|
+
path.lineTo(Math.min(width / 2, p), height);
|
|
51
|
+
path.cubicTo(p - a, height, p - a - b, height, p - a - b - c, height - d);
|
|
52
|
+
path.rArcTo(borderRadius, borderRadius, 0, true, false, -circularSectionLength, -circularSectionLength);
|
|
53
|
+
path.cubicTo(0, height - (p - a - b), 0, height - (p - a), 0, Math.max(height / 2, height - p));
|
|
54
|
+
};
|
|
55
|
+
const drawTopLeftBorderPath = ({ path, width, height, borderRadius, a, b, c, d, p, circularSectionLength, }) => {
|
|
56
|
+
path.lineTo(0, Math.min(height / 2, p));
|
|
57
|
+
path.cubicTo(0, p - a, 0, p - a - b, d, p - a - b - c);
|
|
58
|
+
path.rArcTo(borderRadius, borderRadius, 0, true, false, circularSectionLength, -circularSectionLength);
|
|
59
|
+
path.cubicTo(p - a - b, 0, p - a, 0, Math.min(width / 2, p), 0);
|
|
60
|
+
};
|
|
61
|
+
export const drawSquirclePath = ({ borderSmoothing, borderRadius, width, height, }) => {
|
|
62
|
+
const path = Skia.Path.Make();
|
|
63
|
+
const defaultPathParams = getPathParamsForBorder({
|
|
64
|
+
borderSmoothing,
|
|
65
|
+
borderRadius,
|
|
66
|
+
width,
|
|
67
|
+
height,
|
|
68
|
+
});
|
|
69
|
+
drawTopRightBorderPath({
|
|
70
|
+
path,
|
|
71
|
+
...defaultPathParams,
|
|
72
|
+
});
|
|
73
|
+
drawBottomRightBorderPath({
|
|
74
|
+
path,
|
|
75
|
+
...defaultPathParams,
|
|
76
|
+
});
|
|
77
|
+
drawBottomLeftBorderPath({
|
|
78
|
+
path,
|
|
79
|
+
...defaultPathParams,
|
|
80
|
+
});
|
|
81
|
+
drawTopLeftBorderPath({
|
|
82
|
+
path,
|
|
83
|
+
...defaultPathParams,
|
|
84
|
+
});
|
|
85
|
+
return path;
|
|
86
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Text } from 'react-native';
|
|
2
|
+
import type { Color, FontSize, FontWeight, Scale } from '../../theme';
|
|
3
|
+
declare const StyledText: import("@emotion/native").StyledComponent<import("react-native").TextProps & {
|
|
4
|
+
theme?: import("@emotion/react").Theme;
|
|
5
|
+
as?: React.ElementType;
|
|
6
|
+
} & {
|
|
7
|
+
themeFontSize: FontSize;
|
|
8
|
+
themeFontWeight?: FontWeight;
|
|
9
|
+
themeColor: Color;
|
|
10
|
+
themeTypeface: keyof Scale["font"];
|
|
11
|
+
textAlign?: "auto" | "left" | "right" | "center" | "justify" | undefined;
|
|
12
|
+
textTransform?: "none" | "capitalize" | "uppercase" | "lowercase" | undefined;
|
|
13
|
+
textDecorationLine?: "none" | "underline" | "line-through" | "underline line-through" | undefined;
|
|
14
|
+
}, {}, {
|
|
15
|
+
ref?: import("react").Ref<Text> | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
export { StyledText };
|
|
18
|
+
//# sourceMappingURL=StyledText.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StyledText.d.ts","sourceRoot":"","sources":["../../../src/components/Text/StyledText.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,OAAO,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEtE,QAAA,MAAM,UAAU;;SAwCuwH,MAAO,WAAW;;mBAvCxxH,QAAQ;sBACL,UAAU;gBAChB,KAAK;mBACF,MAAM,KAAK,CAAC,MAAM,CAAC;gBACtB,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS;oBACzD,MAAM,GAAG,YAAY,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS;yBACxD,MAAM,GAAG,WAAW,GAAG,cAAc,GAAG,wBAAwB,GAAG,SAAS;;;EA8BhG,CAAC;AAEH,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import styled from '@emotion/native';
|
|
2
|
+
import { Text } from 'react-native';
|
|
3
|
+
const StyledText = styled(Text)(({ themeFontSize, themeFontWeight, themeColor, themeTypeface, theme, textAlign, textTransform, textDecorationLine, }) => {
|
|
4
|
+
const defaultThemeFontWeight = theme.__hd__.text.fontWeights[themeFontSize];
|
|
5
|
+
const sizeStyles = {
|
|
6
|
+
fontSize: theme.__hd__.text.fontSizes[themeFontSize],
|
|
7
|
+
lineHeight: theme.__hd__.text.lineHeights[themeFontSize],
|
|
8
|
+
letterSpacing: theme.__hd__.text.fontSizes[themeFontSize] * 0.03,
|
|
9
|
+
};
|
|
10
|
+
return {
|
|
11
|
+
...sizeStyles,
|
|
12
|
+
fontFamily: theme.__hd__.text.fonts[themeTypeface][themeFontWeight || defaultThemeFontWeight],
|
|
13
|
+
color: theme.colors[themeColor],
|
|
14
|
+
textAlign,
|
|
15
|
+
textTransform,
|
|
16
|
+
textDecorationLine,
|
|
17
|
+
};
|
|
18
|
+
});
|
|
19
|
+
export { StyledText };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/Text/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,eAAO,MAAM,wBAAwB,EAAE,QAAQ,EAK9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Text/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAgCzC,eAAO,MAAM,IAAI;eAGqV,CAAC;6CAH5T,CAAC;AAE5C,YAAY,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { StyledText } from './StyledText';
|
|
3
|
+
import { withRichText } from './withRichText';
|
|
4
|
+
const PlainText = ({ children, fontSize = 'medium', fontWeight, color = 'grey900', typeface = 'neutral', allowFontScaling = false, textAlign, textTransform, textDecorationLine, ...nativeProps }) => {
|
|
5
|
+
return (_jsx(StyledText, { ...nativeProps, themeFontSize: fontSize, themeFontWeight: fontWeight, themeColor: color, themeTypeface: typeface, allowFontScaling: allowFontScaling, textAlign: textAlign, textTransform: textTransform, textDecorationLine: textDecorationLine, children: children }));
|
|
6
|
+
};
|
|
7
|
+
export const Text = withRichText(PlainText);
|