@aic-kits/react-native 0.0.3 → 0.0.5
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 +4 -4
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme } from '@emotion/react';
|
|
3
|
+
import { forwardRef, useEffect, useImperativeHandle, useMemo, useState, } from 'react';
|
|
4
|
+
import { Text } from '../Text';
|
|
5
|
+
function PlainTextChat({ streamText, children, ...otherProps }, ref) {
|
|
6
|
+
const [text, setText] = useState('');
|
|
7
|
+
const theme = useTheme();
|
|
8
|
+
const themeBubble = useMemo(() => theme.__hd__.chat, [theme]);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
let isCancelled = false;
|
|
11
|
+
const fetchText = async () => {
|
|
12
|
+
if (streamText) {
|
|
13
|
+
for await (const chunk of streamText()) {
|
|
14
|
+
if (isCancelled) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
setText((prev) => prev + chunk);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
fetchText();
|
|
22
|
+
return () => {
|
|
23
|
+
isCancelled = true;
|
|
24
|
+
};
|
|
25
|
+
}, [streamText]);
|
|
26
|
+
useImperativeHandle(ref, () => ({
|
|
27
|
+
bubbleProps: {
|
|
28
|
+
paddingHorizontal: themeBubble.defaultTextPaddingHorizontal,
|
|
29
|
+
paddingVertical: themeBubble.defaultTextPaddingVertical,
|
|
30
|
+
},
|
|
31
|
+
}), [
|
|
32
|
+
themeBubble.defaultTextPaddingHorizontal,
|
|
33
|
+
themeBubble.defaultTextPaddingVertical,
|
|
34
|
+
]);
|
|
35
|
+
return (_jsx(Text, { fontSize: themeBubble.defaultTextFontSize, fontWeight: themeBubble.defaultTextFontWeight, color: themeBubble.defaultTextColor, ...otherProps, children: streamText ? text : children }));
|
|
36
|
+
}
|
|
37
|
+
export const TextChat = forwardRef(PlainTextChat);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VideoChat.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/VideoChat.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,YAAY,EAOlB,MAAM,OAAO,CAAC;AAQf,OAAO,KAAK,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAiHtD,eAAO,MAAM,SAAS,EAAiC,CACrD,KAAK,EAAE,cAAc,GAAG;IAAE,GAAG,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,CAAA;CAAE,KACpD,KAAK,CAAC,SAAS,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme } from '@emotion/react';
|
|
3
|
+
import { forwardRef, useCallback, useImperativeHandle, useMemo, useRef, useState, } from 'react';
|
|
4
|
+
import { Box } from '../Box';
|
|
5
|
+
import { calculateCanvasSize } from '../Image/utils';
|
|
6
|
+
import { PlaySwitch } from '../PlaySwitch';
|
|
7
|
+
import { Video } from '../Video';
|
|
8
|
+
import VideoDetail from '../Video/VideoDetail';
|
|
9
|
+
const PlainVideoChat = ({ source, width, height, maxWidth, setMediaDetail, }, chatRef) => {
|
|
10
|
+
const theme = useTheme();
|
|
11
|
+
const themeChat = useMemo(() => theme.__hd__.chat, [theme]);
|
|
12
|
+
const canvasSize = calculateCanvasSize(width, height, maxWidth, themeChat.defaultMediaScale);
|
|
13
|
+
const previewRef = useRef(null);
|
|
14
|
+
const detailRef = useRef(null);
|
|
15
|
+
const [play, setPlay] = useState(false);
|
|
16
|
+
const [showPlaySwitch, setShowPlaySwitch] = useState(true);
|
|
17
|
+
const syncRef = useCallback(async (src, dst) => {
|
|
18
|
+
if (src === null || dst === null) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const currentTime = src.currentTime;
|
|
22
|
+
dst.seek(currentTime, 0);
|
|
23
|
+
}, []);
|
|
24
|
+
const pauseAllStates = useCallback(() => {
|
|
25
|
+
previewRef.current?.pause();
|
|
26
|
+
setShowPlaySwitch(true);
|
|
27
|
+
setPlay(false);
|
|
28
|
+
}, [previewRef, setPlay, setShowPlaySwitch]);
|
|
29
|
+
const exitDetailView = useCallback(() => {
|
|
30
|
+
setMediaDetail?.(undefined);
|
|
31
|
+
syncRef(detailRef.current, previewRef.current);
|
|
32
|
+
pauseAllStates();
|
|
33
|
+
}, [pauseAllStates, setMediaDetail, syncRef]);
|
|
34
|
+
const handlePlaySwitchStatus = () => {
|
|
35
|
+
if (play) {
|
|
36
|
+
pauseAllStates();
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
previewRef.current?.resume();
|
|
40
|
+
setTimeout(() => setShowPlaySwitch(false), 500);
|
|
41
|
+
setPlay(true);
|
|
42
|
+
};
|
|
43
|
+
useImperativeHandle(chatRef, () => ({
|
|
44
|
+
onPress: async () => {
|
|
45
|
+
const mediaDetail = (_jsx(VideoDetail, { variant: 'video', videoRef: detailRef, source: source, width: width, height: height, initialPosition: previewRef.current?.currentTime, onBack: exitDetailView }));
|
|
46
|
+
setMediaDetail?.(mediaDetail);
|
|
47
|
+
previewRef.current?.pause();
|
|
48
|
+
},
|
|
49
|
+
}), [exitDetailView, height, setMediaDetail, source, width]);
|
|
50
|
+
return (_jsxs(Box, { position: "relative", width: canvasSize.width, height: canvasSize.height, children: [_jsx(Video, { ref: previewRef, source: source, style: {
|
|
51
|
+
width: canvasSize.width,
|
|
52
|
+
height: canvasSize.height,
|
|
53
|
+
}, afterEnd: pauseAllStates }), _jsx(Box, { position: "absolute", top: 0, left: 0, right: 0, bottom: 0, justifyContent: "center", alignItems: "center", children: showPlaySwitch &&
|
|
54
|
+
_jsx(PlaySwitch, { status: play ? 'pause' : 'play', onChange: handlePlaySwitchStatus, size: 'xlarge', color: "white" }) })] }));
|
|
55
|
+
};
|
|
56
|
+
export const VideoChat = forwardRef(PlainVideoChat);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAW,MAAM,QAAQ,CAAC;AAGjD,eAAO,MAAM,IAAI,UAAW,SAAS,4CAoCpC,CAAC;AAEF,cAAc,QAAQ,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useRef } from 'react';
|
|
3
|
+
import { Bubble } from '../Bubble';
|
|
4
|
+
import { Touchable } from '../Touchable';
|
|
5
|
+
import { ImageChat } from './ImageChat';
|
|
6
|
+
import { TextChat } from './TextChat';
|
|
7
|
+
import { VideoChat } from './VideoChat';
|
|
8
|
+
export const Chat = (props) => {
|
|
9
|
+
const chatRef = useRef(null);
|
|
10
|
+
let chatComponent;
|
|
11
|
+
if (props.variant === 'text') {
|
|
12
|
+
chatComponent = (_jsx(TextChat, { ...props, ref: chatRef }));
|
|
13
|
+
}
|
|
14
|
+
if (props.variant === 'image') {
|
|
15
|
+
chatComponent = (_jsx(ImageChat, { ...props, ref: chatRef }));
|
|
16
|
+
}
|
|
17
|
+
if (props.variant === 'video') {
|
|
18
|
+
chatComponent = (_jsx(VideoChat, { ...props, ref: chatRef }));
|
|
19
|
+
}
|
|
20
|
+
return (_jsx(Touchable, { onPress: () => {
|
|
21
|
+
if (chatRef.current?.onPress) {
|
|
22
|
+
chatRef.current?.onPress();
|
|
23
|
+
}
|
|
24
|
+
}, children: _jsx(Bubble, { positionType: props.positionType, ...chatRef.current?.bubbleProps, children: chatComponent }) }));
|
|
25
|
+
};
|
|
26
|
+
export * from './type';
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { DataSourceParam } from '@shopify/react-native-skia';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
import type { DimensionValue } from 'react-native';
|
|
4
|
+
import type { ReactVideoSourceProperties } from 'react-native-video';
|
|
5
|
+
import type { BubbleProps } from '../Bubble/type';
|
|
6
|
+
import type { TextProps } from '../Text';
|
|
7
|
+
/**
|
|
8
|
+
* Interface for MediaChatProps, which defines common properties for media-based chat components.
|
|
9
|
+
*/
|
|
10
|
+
export interface MediaChatProps {
|
|
11
|
+
/**
|
|
12
|
+
* Optional maximum width for the media content.
|
|
13
|
+
*/
|
|
14
|
+
maxWidth?: DimensionValue;
|
|
15
|
+
/**
|
|
16
|
+
* Optional width for the media content.
|
|
17
|
+
*/
|
|
18
|
+
width?: DimensionValue;
|
|
19
|
+
/**
|
|
20
|
+
* Optional height for the media content.
|
|
21
|
+
*/
|
|
22
|
+
height?: DimensionValue;
|
|
23
|
+
/**
|
|
24
|
+
* Optional function to set media detail view.
|
|
25
|
+
* @param detail - React state action to update the media detail view.
|
|
26
|
+
*/
|
|
27
|
+
setMediaDetail?: React.Dispatch<React.SetStateAction<ReactNode>>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Union type for ChatProps, representing all possible chat component types.
|
|
31
|
+
* It can be either TextChatProps, ImageChatProps, or VideoChatProps.
|
|
32
|
+
*/
|
|
33
|
+
export type ChatProps = (TextChatProps | ImageChatProps | VideoChatProps);
|
|
34
|
+
/**
|
|
35
|
+
* Interface for ChatRef, which defines the structure of the ref object for Chat components.
|
|
36
|
+
*/
|
|
37
|
+
export type ChatRef = {
|
|
38
|
+
/**
|
|
39
|
+
* Optional function to be called when the chat component is pressed.
|
|
40
|
+
*/
|
|
41
|
+
onPress?: () => void;
|
|
42
|
+
/**
|
|
43
|
+
* Optional object containing bubble properties, excluding the 'positionType'.
|
|
44
|
+
* These properties can be applied to the Bubble component wrapping the chat content.
|
|
45
|
+
*/
|
|
46
|
+
bubbleProps?: Omit<BubbleProps, 'positionType'>;
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Interface for Text Chat properties.
|
|
50
|
+
* @extends Omit<TextProps, 'children' | 'style'> - Inherits from TextProps, excluding 'children' and 'style' properties.
|
|
51
|
+
* @extends Pick<BubbleProps, 'positionType'> - Includes the 'positionType' property from BubbleProps.
|
|
52
|
+
*/
|
|
53
|
+
export interface TextChatProps extends Omit<TextProps, 'children' | 'style'>, Pick<BubbleProps, 'positionType'> {
|
|
54
|
+
/** Specifies the variant of the chat component as 'text'. */
|
|
55
|
+
variant: 'text';
|
|
56
|
+
/** Optional ReactNode to be rendered as the content of the text chat. */
|
|
57
|
+
children?: ReactNode | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Optional function that returns an AsyncGenerator for streaming text content.
|
|
60
|
+
* @returns {AsyncGenerator<string, void, unknown>} An async generator that yields strings.
|
|
61
|
+
*/
|
|
62
|
+
streamText?: () => AsyncGenerator<string, void, unknown>;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Interface for Image Chat properties.
|
|
66
|
+
* @extends MediaChatProps - Inherits properties for media handling.
|
|
67
|
+
* @extends Pick<BubbleProps, 'positionType'> - Includes the 'positionType' property from BubbleProps.
|
|
68
|
+
*/
|
|
69
|
+
export interface ImageChatProps extends MediaChatProps, Pick<BubbleProps, 'positionType'> {
|
|
70
|
+
/** Specifies the variant of the chat component as 'image'. */
|
|
71
|
+
variant: 'image';
|
|
72
|
+
/**
|
|
73
|
+
* Optional source for the image.
|
|
74
|
+
* Can be a URL string, a local file resource, or other valid image source.
|
|
75
|
+
*/
|
|
76
|
+
source?: DataSourceParam;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Interface for Video Chat properties.
|
|
80
|
+
* @extends MediaChatProps - Inherits properties for media handling.
|
|
81
|
+
* @extends Pick<BubbleProps, 'positionType'> - Includes the 'positionType' property from BubbleProps.
|
|
82
|
+
*/
|
|
83
|
+
export interface VideoChatProps extends MediaChatProps, Pick<BubbleProps, 'positionType'> {
|
|
84
|
+
/** Specifies the variant of the chat component as 'video'. */
|
|
85
|
+
variant: 'video';
|
|
86
|
+
/**
|
|
87
|
+
* Source for the video content.
|
|
88
|
+
* It's a read-only object that includes all properties of ReactVideoSourceProperties except 'uri',
|
|
89
|
+
* and adds a potentially undefined 'uri' property that can be a string, NodeRequire, or undefined.
|
|
90
|
+
*/
|
|
91
|
+
source: Readonly<Omit<ReactVideoSourceProperties, 'uri'> & {
|
|
92
|
+
uri?: string | NodeRequire | undefined;
|
|
93
|
+
}> | undefined;
|
|
94
|
+
}
|
|
95
|
+
//# sourceMappingURL=type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../src/components/Chat/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAErE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,QAAQ,CAAC,EAAE,cAAc,CAAC;IAE1B;;OAEG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;IAEvB;;OAEG;IACH,MAAM,CAAC,EAAE,cAAc,CAAC;IAExB;;;OAGG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC,CAAA;CACjE;AAED;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,aAAa,GAAG,cAAc,GAAG,cAAc,CAAC,CAAC;AAE1E;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;OAGG;IACH,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC;CACjD,CAAA;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,SAAS,EAAE,UAAU,GAAG,OAAO,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC;IAC7G,6DAA6D;IAC7D,OAAO,EAAE,MAAM,CAAC;IAEhB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;IAEjC;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;CAC1D;AAGD;;;;GAIG;AACH,MAAM,WAAW,cAAe,SAAQ,cAAc,EAAE,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC;IACvF,8DAA8D;IAC9D,OAAO,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,MAAM,CAAC,EAAE,eAAe,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAe,SAAQ,cAAc,EAAE,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC;IACvF,8DAA8D;IAC9D,OAAO,EAAE,OAAO,CAAC;IAEjB;;;;OAIG;IACH,MAAM,EAAE,QAAQ,CAAC,IAAI,CAAC,0BAA0B,EAAE,KAAK,CAAC,GAAG;QACzD,GAAG,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;KACxC,CAAC,GAAG,SAAS,CAAC;CAChB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ChatCluster/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAIhD,eAAO,MAAM,WAAW,uCAIrB,gBAAgB,4CA0ClB,CAAC;AAEF,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useTheme } from '@emotion/react';
|
|
3
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
4
|
+
import { Box } from '../Box';
|
|
5
|
+
import { calculateAlignment } from '../Bubble/utils';
|
|
6
|
+
import { Chat } from '../Chat';
|
|
7
|
+
import { List } from '../List';
|
|
8
|
+
import { genBubblePositionStyle, scaledChatMedia } from './utils';
|
|
9
|
+
export const ChatCluster = ({ chatItems, view = 'right', ...otherProps }) => {
|
|
10
|
+
const theme = useTheme();
|
|
11
|
+
const themeChat = useMemo(() => theme.__hd__.chat, [theme]);
|
|
12
|
+
const [widthValue, setWidthValue] = useState(0);
|
|
13
|
+
const onLayout = useCallback((event) => {
|
|
14
|
+
const { width } = event.nativeEvent.layout;
|
|
15
|
+
if (width !== widthValue) {
|
|
16
|
+
setWidthValue(width);
|
|
17
|
+
}
|
|
18
|
+
}, [widthValue]);
|
|
19
|
+
const alignSelf = calculateAlignment(view);
|
|
20
|
+
return (_jsx(Box, { width: themeChat.defaultClusterWidth, alignSelf: alignSelf, children: _jsx(Box, { onLayout: onLayout, width: "100%", children: _jsx(List, { data: chatItems, renderItem: ({ item, index }) => (_jsx(Box, { marginTop: index === 0 ? undefined : themeChat.defaultItemSeparatorSize, children: _jsx(Chat, { positionType: genBubblePositionStyle(view, index, chatItems.length), ...scaledChatMedia(item, widthValue), ...otherProps }, `chat_${index}`) })) }) }) }));
|
|
21
|
+
};
|
|
22
|
+
export * from './types';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ChatProps } from '../Chat';
|
|
3
|
+
export interface ChatClusterProps {
|
|
4
|
+
/**
|
|
5
|
+
* List of items to display.
|
|
6
|
+
*/
|
|
7
|
+
chatItems: ChatProps[];
|
|
8
|
+
view: 'right' | 'left';
|
|
9
|
+
setMediaDetail?: React.Dispatch<React.SetStateAction<ReactNode | undefined>>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/ChatCluster/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,SAAS,EAAE,SAAS,EAAE,CAAC;IAKvB,IAAI,EAAE,OAAO,GAAG,MAAM,CAAC;IAEvB,cAAc,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,GAAG,SAAS,CAAC,CAAC,CAAC;CAC9E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { BubblePositionType } from '../Bubble/type';
|
|
2
|
+
import type { ChatProps } from '../Chat';
|
|
3
|
+
export declare const genBubblePositionStyle: (view: "right" | "left", index: number, len: number) => BubblePositionType;
|
|
4
|
+
export declare const scaledChatMedia: (props: ChatProps, maxWidth: number) => ChatProps;
|
|
5
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/ChatCluster/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,eAAO,MAAM,sBAAsB,SAC3B,OAAO,GAAG,MAAM,SACf,MAAM,OACR,MAAM,KACV,kBAQF,CAAC;AAEF,eAAO,MAAM,eAAe,UACnB,SAAS,YACN,MAAM,KACf,SAMF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const genBubblePositionStyle = (view, index, len) => {
|
|
2
|
+
if (len === 1) {
|
|
3
|
+
return view;
|
|
4
|
+
}
|
|
5
|
+
const isFirst = index === 0;
|
|
6
|
+
const isLast = index === len - 1;
|
|
7
|
+
const suffix = isFirst ? 'top' : (isLast ? 'bottom' : 'middle');
|
|
8
|
+
return `${view}-${suffix}`;
|
|
9
|
+
};
|
|
10
|
+
export const scaledChatMedia = (props, maxWidth) => {
|
|
11
|
+
if (props.variant === 'image' || props.variant === 'video') {
|
|
12
|
+
props.maxWidth = maxWidth;
|
|
13
|
+
}
|
|
14
|
+
return props;
|
|
15
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,eAAO,MAAM,IAAI,UAAW,SAAS,4CAuDpC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { useTheme } from '../../theme';
|
|
4
|
+
import { Box } from '../Box';
|
|
5
|
+
import { Icon } from '../Icon';
|
|
6
|
+
import { Text } from '../Text';
|
|
7
|
+
import { Touchable } from '../Touchable';
|
|
8
|
+
export const Chip = (props) => {
|
|
9
|
+
const theme = useTheme();
|
|
10
|
+
const themeChip = useMemo(() => theme.__hd__.chip, [theme]);
|
|
11
|
+
const { text, size = themeChip.defaultSize, selected = themeChip.defaultSelected, onPress, icon, rightIcon, color = 'primary', } = props;
|
|
12
|
+
const chipType = useMemo(() => (selected ? 'selected' : 'unselected'), [selected]);
|
|
13
|
+
const textColor = selected ? 'white' : color;
|
|
14
|
+
const iconColor = selected ? 'white' : color;
|
|
15
|
+
return (_jsx(Touchable, { onPress: onPress, children: _jsxs(Box, { backgroundColor: themeChip.backgroundColors[chipType], borderWidth: themeChip.borderWidth, borderColor: themeChip.borderColor, borderRadius: themeChip.borderRadius, paddingVertical: themeChip.chipConfigs[size].paddingVertical, paddingHorizontal: themeChip.chipConfigs[size].paddingHorizontal, flex: 0, children: [icon && (_jsx(Box, { marginRight: "xsmall", children: _jsx(Icon, { icon: icon, color: iconColor, size: themeChip.chipConfigs[size].iconSize }) })), _jsx(Text, { fontSize: themeChip.chipConfigs[size].fontSize, fontWeight: themeChip.chipConfigs[size].fontWeight, color: textColor, children: text }), rightIcon && (_jsx(Box, { marginLeft: "xsmall", children: _jsx(Icon, { icon: rightIcon, color: iconColor, size: size }) }))] }) }));
|
|
16
|
+
};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Color } from '../../theme';
|
|
2
|
+
import type { IconName } from '../Icon';
|
|
3
|
+
/**
|
|
4
|
+
* Props for the Chip component.
|
|
5
|
+
*/
|
|
6
|
+
export interface ChipProps {
|
|
7
|
+
/**
|
|
8
|
+
* The text content of the chip.
|
|
9
|
+
* This is the main label displayed on the chip.
|
|
10
|
+
* Required prop.
|
|
11
|
+
*/
|
|
12
|
+
text: string;
|
|
13
|
+
/**
|
|
14
|
+
* The size of the chip.
|
|
15
|
+
* Determines the overall dimensions of the chip.
|
|
16
|
+
* @default 'medium'
|
|
17
|
+
*/
|
|
18
|
+
size?: 'small' | 'medium' | 'large';
|
|
19
|
+
/**
|
|
20
|
+
* Whether the chip is selected or not.
|
|
21
|
+
* Affects the visual appearance of the chip.
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
selected?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Function to be called when the chip is pressed.
|
|
27
|
+
* Handles the interaction when the user taps on the chip.
|
|
28
|
+
* Optional callback.
|
|
29
|
+
*/
|
|
30
|
+
onPress?: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* Icon to be displayed on the left side of the chip text.
|
|
33
|
+
* Enhances visual representation of the chip.
|
|
34
|
+
* Uses IconName type for consistency.
|
|
35
|
+
*/
|
|
36
|
+
icon?: IconName;
|
|
37
|
+
/**
|
|
38
|
+
* Icon to be displayed on the right side of the chip text.
|
|
39
|
+
* Can be used for additional visual information or actions.
|
|
40
|
+
* Uses IconName type for consistency.
|
|
41
|
+
*/
|
|
42
|
+
rightIcon?: IconName;
|
|
43
|
+
/**
|
|
44
|
+
* The color theme of the chip.
|
|
45
|
+
* Determines the visual style and color scheme of the chip.
|
|
46
|
+
* @default 'primary'
|
|
47
|
+
*/
|
|
48
|
+
color?: Color;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/Chip/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IAEpC;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;;;OAIG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAEhB;;;;OAIG;IACH,SAAS,CAAC,EAAE,QAAQ,CAAC;IAErB;;;;OAIG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;CACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Color } from '../../theme';
|
|
2
|
+
declare const StyledDivider: import("@emotion/native").StyledComponent<import("..").BoxProps & {
|
|
3
|
+
ref?: import("react").ForwardedRef<import("react-native").View>;
|
|
4
|
+
} & {
|
|
5
|
+
theme?: import("@emotion/react").Theme;
|
|
6
|
+
as?: React.ElementType;
|
|
7
|
+
} & {
|
|
8
|
+
orientation: "horizontal" | "vertical";
|
|
9
|
+
themeColor: Color | undefined;
|
|
10
|
+
}, {}, {}>;
|
|
11
|
+
export { StyledDivider };
|
|
12
|
+
//# sourceMappingURL=StyledDivider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StyledDivider.d.ts","sourceRoot":"","sources":["../../../src/components/Divider/StyledDivider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAGzC,QAAA,MAAM,aAAa;;;;SAsBsoK,MAAO,WAAW;;iBArB7pK,YAAY,GAAG,UAAU;gBACzB,KAAK,GAAG,SAAS;UAiB7B,CAAC;AAEH,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import styled from '@emotion/native';
|
|
2
|
+
import { Box } from '../Box';
|
|
3
|
+
const StyledDivider = styled(Box)(({ theme, themeColor, orientation }) => {
|
|
4
|
+
const validThemeColor = themeColor && theme.colors[themeColor]
|
|
5
|
+
? themeColor
|
|
6
|
+
: theme.__hd__.divider.colors.default;
|
|
7
|
+
return {
|
|
8
|
+
height: orientation === 'horizontal'
|
|
9
|
+
? theme.__hd__.divider.borderWidths.default
|
|
10
|
+
: '100%',
|
|
11
|
+
width: orientation === 'vertical'
|
|
12
|
+
? theme.__hd__.divider.borderWidths.default
|
|
13
|
+
: '100%',
|
|
14
|
+
backgroundColor: validThemeColor,
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
export { StyledDivider };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { Color } from '../../theme';
|
|
2
|
+
import { type BoxProps } from '../Box';
|
|
3
|
+
interface DividerProps extends BoxProps {
|
|
4
|
+
/**
|
|
5
|
+
* The orientation of the divider. The default value is 'horizontal'.
|
|
6
|
+
*/
|
|
7
|
+
orientation?: 'horizontal' | 'vertical';
|
|
8
|
+
/**
|
|
9
|
+
* The color of the divider. The default value is 'grey200'.
|
|
10
|
+
*/
|
|
11
|
+
color?: Color;
|
|
12
|
+
}
|
|
13
|
+
export declare const Divider: ({ orientation, color, ...otherProps }: DividerProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Divider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAI5C,UAAU,YAAa,SAAQ,QAAQ;IACrC;;OAEG;IACJ,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IAEvC;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,eAAO,MAAM,OAAO,0CAIjB,YAAY,4CAId,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '../Box';
|
|
3
|
+
import { StyledDivider } from './StyledDivider';
|
|
4
|
+
export const Divider = ({ orientation = 'horizontal', color, ...otherProps }) => (_jsx(Box, { ...otherProps, children: _jsx(StyledDivider, { orientation: orientation, themeColor: color }) }));
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FastList vs List Component Differences:
|
|
3
|
+
* 1. FastList uses Shopify's FlashList which offers better performance for long lists
|
|
4
|
+
* compared to React Native's FlatList (used by List component).
|
|
5
|
+
* 2. contentContainerStyle in FastList only supports a limited set of style properties:
|
|
6
|
+
* - backgroundColor
|
|
7
|
+
* - padding, paddingTop, paddingBottom, paddingLeft, paddingRight
|
|
8
|
+
* - paddingVertical, paddingHorizontal
|
|
9
|
+
* Common layout properties like 'gap' are NOT supported.
|
|
10
|
+
* For full style support, use the List component instead.
|
|
11
|
+
*/
|
|
12
|
+
import type { FlashListProps, ListRenderItem } from '@shopify/flash-list';
|
|
13
|
+
import { FlashList } from '@shopify/flash-list';
|
|
14
|
+
import { type ForwardedRef } from 'react';
|
|
15
|
+
import { type ScrollableProps } from '../Scrollable';
|
|
16
|
+
export interface FastListProps<T> extends Omit<ScrollableProps, 'children' | 'renderItem' | 'contentContainerStyle'>, Omit<FlashListProps<T>, 'children' | 'renderItem'> {
|
|
17
|
+
children?: ListRenderItem<T> | null | undefined;
|
|
18
|
+
renderItem?: ListRenderItem<T> | null | undefined;
|
|
19
|
+
}
|
|
20
|
+
declare function PlainFastList<T>({ style, contentContainerStyle, renderItem, children, ...otherProps }: FastListProps<T>, ref: ForwardedRef<FlashList<T>>): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const FastList: <T>(props: FastListProps<T> & {
|
|
22
|
+
ref?: ForwardedRef<FlashList<T>>;
|
|
23
|
+
}) => ReturnType<typeof PlainFastList>;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FastList/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAc,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,aAAa,CAAC,CAAC,CAC9B,SAAQ,IAAI,CAAC,eAAe,EAAE,UAAU,GAAG,YAAY,GAAG,uBAAuB,CAAC,EAChF,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IAKpD,QAAQ,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IAKjD,UAAU,CAAC,EAAE,cAAc,CAAC,CAAC,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;CAClD;AAED,iBAAS,aAAa,CAAC,CAAC,EACtB,EACE,KAAK,EACL,qBAAqB,EACrB,UAAU,EACV,QAAQ,EACR,GAAG,UAAU,EACd,EAAE,aAAa,CAAC,CAAC,CAAC,EACnB,GAAG,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,2CAiBhC;AAED,eAAO,MAAM,QAAQ,EAAgC,CAAC,CAAC,EACrD,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG;IAAE,GAAG,CAAC,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,CAAA;CAAE,KAC3D,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { FlashList } from '@shopify/flash-list';
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { useTheme } from '../../theme';
|
|
5
|
+
import { genScrollableContainerStyle, genScrollableContentContainerStyle, } from '../Scrollable';
|
|
6
|
+
function PlainFastList({ style, contentContainerStyle, renderItem, children, ...otherProps }, ref) {
|
|
7
|
+
const theme = useTheme();
|
|
8
|
+
return (_jsx(FlashList, { ref: ref, renderItem: renderItem || children, style: [genScrollableContainerStyle(theme, otherProps), style], showsHorizontalScrollIndicator: false, showsVerticalScrollIndicator: false, contentContainerStyle: {
|
|
9
|
+
...genScrollableContentContainerStyle(theme, otherProps),
|
|
10
|
+
...contentContainerStyle,
|
|
11
|
+
}, ...otherProps }));
|
|
12
|
+
}
|
|
13
|
+
export const FastList = forwardRef(PlainFastList);
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type ListProps } from '../List';
|
|
2
|
+
/**
|
|
3
|
+
* Represents an option in the Filter component.
|
|
4
|
+
* @template T The type of the value associated with the option.
|
|
5
|
+
*/
|
|
6
|
+
export interface FilterOption<T> {
|
|
7
|
+
/**
|
|
8
|
+
* The value associated with the option.
|
|
9
|
+
*/
|
|
10
|
+
value: T;
|
|
11
|
+
/**
|
|
12
|
+
* The text to display for the option.
|
|
13
|
+
*/
|
|
14
|
+
text: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Props for the Filter component.
|
|
18
|
+
* @template T The type of the values in the filter options.
|
|
19
|
+
*/
|
|
20
|
+
export interface FilterProps<T> extends Partial<ListProps<FilterOption<T>>> {
|
|
21
|
+
/**
|
|
22
|
+
* An array of filter options to display.
|
|
23
|
+
*/
|
|
24
|
+
options: FilterOption<T>[];
|
|
25
|
+
/**
|
|
26
|
+
* An array of currently selected values.
|
|
27
|
+
*/
|
|
28
|
+
selectedValues: T[];
|
|
29
|
+
/**
|
|
30
|
+
* Callback function called when the selection changes.
|
|
31
|
+
*/
|
|
32
|
+
onSelectionChange: (selectedValues: T[]) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Whether multiple selections are allowed.
|
|
35
|
+
* @default false
|
|
36
|
+
*/
|
|
37
|
+
multiple?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export declare function Filter<T>({ options, selectedValues, onSelectionChange, multiple, ...listProps }: FilterProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Filter/index.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C;;;GAGG;AACH,MAAM,WAAW,YAAY,CAAC,CAAC;IAC7B;;OAEG;IACH,KAAK,EAAE,CAAC,CAAC;IACT;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,MAAM,WAAW,WAAW,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;IACzE;;OAEG;IACH,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3B;;OAEG;IACH,cAAc,EAAE,CAAC,EAAE,CAAC;IACpB;;OAEG;IACH,iBAAiB,EAAE,CAAC,cAAc,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;IACjD;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,MAAM,CAAC,CAAC,EAAE,EACxB,OAAO,EACP,cAAc,EACd,iBAAiB,EACjB,QAAgB,EAChB,GAAG,SAAS,EACb,EAAE,WAAW,CAAC,CAAC,CAAC,2CAwChB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import omit from 'lodash/fp/omit';
|
|
3
|
+
import { useCallback, useMemo } from 'react';
|
|
4
|
+
import { useTheme } from '../../theme';
|
|
5
|
+
import { Box } from '../Box';
|
|
6
|
+
import { Chip } from '../Chip';
|
|
7
|
+
import { List } from '../List';
|
|
8
|
+
export function Filter({ options, selectedValues, onSelectionChange, multiple = false, ...listProps }) {
|
|
9
|
+
const theme = useTheme();
|
|
10
|
+
const themeFilter = useMemo(() => theme.__hd__.filter, [theme]);
|
|
11
|
+
const handleChipPress = useCallback((value) => {
|
|
12
|
+
if (multiple) {
|
|
13
|
+
const newSelectedValues = selectedValues.includes(value)
|
|
14
|
+
? selectedValues.filter((v) => v !== value)
|
|
15
|
+
: [...selectedValues, value];
|
|
16
|
+
onSelectionChange(newSelectedValues);
|
|
17
|
+
}
|
|
18
|
+
else {
|
|
19
|
+
onSelectionChange(selectedValues[0] === value ? [] : [value]);
|
|
20
|
+
}
|
|
21
|
+
}, [multiple, onSelectionChange, selectedValues]);
|
|
22
|
+
return (_jsx(List, { data: options, horizontal: true, justifyContent: "flex-start", alignItems: "center", showsHorizontalScrollIndicator: false, ...omit(['data', 'renderItem'], listProps), children: ({ item }) => (_jsx(Box, { marginRight: "small", children: _jsx(Chip, { text: item.text, selected: selectedValues.includes(item.value), onPress: () => handleChipPress(item.value), size: themeFilter.chipSize, color: themeFilter.chipColor }) })) }));
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type LinearGradientProps } from 'react-native-linear-gradient';
|
|
2
|
+
import { type GradientColor } from '../../theme';
|
|
3
|
+
import { type BoxProps } from '../Box';
|
|
4
|
+
export interface GradientProps extends BoxProps, Omit<LinearGradientProps, 'colors'> {
|
|
5
|
+
/**
|
|
6
|
+
* The colors of the linear gradient.
|
|
7
|
+
*/
|
|
8
|
+
gradient: GradientColor;
|
|
9
|
+
}
|
|
10
|
+
export declare const Gradient: ({ gradient, children, ...otherProps }: GradientProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Gradient/index.tsx"],"names":[],"mappings":"AACA,OAAuB,EACrB,KAAK,mBAAmB,EACzB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AAC3D,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAE5C,MAAM,WAAW,aACf,SAAQ,QAAQ,EACd,IAAI,CAAC,mBAAmB,EAAE,QAAQ,CAAC;IACrC;;OAEG;IACH,QAAQ,EAAE,aAAa,CAAC;CACzB;AAED,eAAO,MAAM,QAAQ,0CAIlB,aAAa,4CAaf,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import LinearGradient, {} from 'react-native-linear-gradient';
|
|
4
|
+
import { useTheme } from '../../theme';
|
|
5
|
+
import { Box } from '../Box';
|
|
6
|
+
export const Gradient = ({ gradient, children, ...otherProps }) => {
|
|
7
|
+
const theme = useTheme();
|
|
8
|
+
const colors = useMemo(() => theme.gradientColors[gradient], [gradient, theme]);
|
|
9
|
+
return (_jsx(Box, { ...otherProps, children: _jsx(LinearGradient, { colors: colors, children: children }) }));
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackButton.d.ts","sourceRoot":"","sources":["../../../src/components/Header/BackButton.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG3C,KAAK,eAAe,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC;AAEjD,eAAO,MAAM,UAAU,UAAW,eAAe,mDA2ChD,CAAC"}
|