react-useanimations 2.0.9 → 3.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +112 -67
- package/index.d.mts +144 -0
- package/index.d.ts +144 -0
- package/index.js +288 -0
- package/index.mjs +258 -0
- package/lib/activity/index.d.mts +5 -0
- package/lib/activity/index.d.ts +5 -0
- package/lib/activity/index.js +32 -0
- package/lib/activity/index.mjs +9 -0
- package/lib/airplay/index.d.mts +5 -0
- package/lib/airplay/index.d.ts +5 -0
- package/lib/airplay/index.js +32 -0
- package/lib/airplay/index.mjs +9 -0
- package/lib/alertCircle/index.d.mts +5 -0
- package/lib/alertCircle/index.d.ts +5 -0
- package/lib/alertCircle/index.js +32 -0
- package/lib/alertCircle/index.mjs +9 -0
- package/lib/alertOctagon/index.d.mts +5 -0
- package/lib/alertOctagon/index.d.ts +5 -0
- package/lib/alertOctagon/index.js +32 -0
- package/lib/alertOctagon/index.mjs +9 -0
- package/lib/alertTriangle/index.d.mts +5 -0
- package/lib/alertTriangle/index.d.ts +5 -0
- package/lib/alertTriangle/index.js +32 -0
- package/lib/alertTriangle/index.mjs +9 -0
- package/lib/archive/index.d.mts +5 -0
- package/lib/archive/index.d.ts +5 -0
- package/lib/archive/index.js +32 -0
- package/lib/archive/index.mjs +9 -0
- package/lib/arrowDown/index.d.mts +5 -0
- package/lib/arrowDown/index.d.ts +5 -0
- package/lib/arrowDown/index.js +32 -0
- package/lib/arrowDown/index.mjs +9 -0
- package/lib/arrowDownCircle/index.d.mts +5 -0
- package/lib/arrowDownCircle/index.d.ts +5 -0
- package/lib/arrowDownCircle/index.js +32 -0
- package/lib/arrowDownCircle/index.mjs +9 -0
- package/lib/arrowLeftCircle/index.d.mts +5 -0
- package/lib/arrowLeftCircle/index.d.ts +5 -0
- package/lib/arrowLeftCircle/index.js +32 -0
- package/lib/arrowLeftCircle/index.mjs +9 -0
- package/lib/arrowRightCircle/index.d.mts +5 -0
- package/lib/arrowRightCircle/index.d.ts +5 -0
- package/lib/arrowRightCircle/index.js +32 -0
- package/lib/arrowRightCircle/index.mjs +9 -0
- package/lib/arrowUp/index.d.mts +5 -0
- package/lib/arrowUp/index.d.ts +5 -0
- package/lib/arrowUp/index.js +32 -0
- package/lib/arrowUp/index.mjs +9 -0
- package/lib/arrowUpCircle/index.d.mts +5 -0
- package/lib/arrowUpCircle/index.d.ts +5 -0
- package/lib/arrowUpCircle/index.js +32 -0
- package/lib/arrowUpCircle/index.mjs +9 -0
- package/lib/behance/index.d.mts +5 -0
- package/lib/behance/index.d.ts +5 -0
- package/lib/behance/index.js +32 -0
- package/lib/behance/index.mjs +9 -0
- package/lib/bookmark/index.d.mts +5 -0
- package/lib/bookmark/index.d.ts +5 -0
- package/lib/bookmark/index.js +32 -0
- package/lib/bookmark/index.mjs +9 -0
- package/lib/calendar/index.d.mts +5 -0
- package/lib/calendar/index.d.ts +5 -0
- package/lib/calendar/index.js +32 -0
- package/lib/calendar/index.mjs +9 -0
- package/lib/checkBox/index.d.mts +5 -0
- package/lib/checkBox/index.d.ts +5 -0
- package/lib/checkBox/index.js +32 -0
- package/lib/checkBox/index.mjs +9 -0
- package/lib/checkmark/index.d.mts +5 -0
- package/lib/checkmark/index.d.ts +5 -0
- package/lib/checkmark/index.js +32 -0
- package/lib/checkmark/index.mjs +9 -0
- package/lib/chevronLeft/index.d.mts +5 -0
- package/lib/chevronLeft/index.d.ts +5 -0
- package/lib/chevronLeft/index.js +32 -0
- package/lib/chevronLeft/index.mjs +9 -0
- package/lib/chevronRight/index.d.mts +5 -0
- package/lib/chevronRight/index.d.ts +5 -0
- package/lib/chevronRight/index.js +32 -0
- package/lib/chevronRight/index.mjs +9 -0
- package/lib/codepen/index.d.mts +5 -0
- package/lib/codepen/index.d.ts +5 -0
- package/lib/codepen/index.js +32 -0
- package/lib/codepen/index.mjs +9 -0
- package/lib/copy/index.d.mts +5 -0
- package/lib/copy/index.d.ts +5 -0
- package/lib/copy/index.js +32 -0
- package/lib/copy/index.mjs +9 -0
- package/lib/download/index.d.mts +5 -0
- package/lib/download/index.d.ts +5 -0
- package/lib/download/index.js +32 -0
- package/lib/download/index.mjs +9 -0
- package/lib/dribbble/index.d.mts +5 -0
- package/lib/dribbble/index.d.ts +5 -0
- package/lib/dribbble/index.js +32 -0
- package/lib/dribbble/index.mjs +9 -0
- package/lib/edit/index.d.mts +5 -0
- package/lib/edit/index.d.ts +5 -0
- package/lib/edit/index.js +32 -0
- package/lib/edit/index.mjs +9 -0
- package/lib/error/index.d.mts +5 -0
- package/lib/error/index.d.ts +5 -0
- package/lib/error/index.js +32 -0
- package/lib/error/index.mjs +9 -0
- package/lib/explore/index.d.mts +5 -0
- package/lib/explore/index.d.ts +5 -0
- package/lib/explore/index.js +32 -0
- package/lib/explore/index.mjs +9 -0
- package/lib/facebook/index.d.mts +5 -0
- package/lib/facebook/index.d.ts +5 -0
- package/lib/facebook/index.js +32 -0
- package/lib/facebook/index.mjs +9 -0
- package/lib/filter/index.d.mts +5 -0
- package/lib/filter/index.d.ts +5 -0
- package/lib/filter/index.js +32 -0
- package/lib/filter/index.mjs +9 -0
- package/lib/folder/index.d.mts +5 -0
- package/lib/folder/index.d.ts +5 -0
- package/lib/folder/index.js +32 -0
- package/lib/folder/index.mjs +9 -0
- package/lib/github/index.d.mts +5 -0
- package/lib/github/index.d.ts +5 -0
- package/lib/github/index.js +32 -0
- package/lib/github/index.mjs +9 -0
- package/lib/heart/index.d.mts +5 -0
- package/lib/heart/index.d.ts +5 -0
- package/lib/heart/index.js +32 -0
- package/lib/heart/index.mjs +9 -0
- package/lib/help/index.d.mts +5 -0
- package/lib/help/index.d.ts +5 -0
- package/lib/help/index.js +32 -0
- package/lib/help/index.mjs +9 -0
- package/lib/home/index.d.mts +5 -0
- package/lib/home/index.d.ts +5 -0
- package/lib/home/index.js +32 -0
- package/lib/home/index.mjs +9 -0
- package/lib/infinity/index.d.mts +5 -0
- package/lib/infinity/index.d.ts +5 -0
- package/lib/infinity/index.js +32 -0
- package/lib/infinity/index.mjs +9 -0
- package/lib/info/index.d.mts +5 -0
- package/lib/info/index.d.ts +5 -0
- package/lib/info/index.js +32 -0
- package/lib/info/index.mjs +9 -0
- package/lib/instagram/index.d.mts +5 -0
- package/lib/instagram/index.d.ts +5 -0
- package/lib/instagram/index.js +32 -0
- package/lib/instagram/index.mjs +9 -0
- package/lib/linkedin/index.d.mts +5 -0
- package/lib/linkedin/index.d.ts +5 -0
- package/lib/linkedin/index.js +32 -0
- package/lib/linkedin/index.mjs +9 -0
- package/lib/loading/index.d.mts +5 -0
- package/lib/loading/index.d.ts +5 -0
- package/lib/loading/index.js +32 -0
- package/lib/loading/index.mjs +9 -0
- package/lib/loading2/index.d.mts +5 -0
- package/lib/loading2/index.d.ts +5 -0
- package/lib/loading2/index.js +32 -0
- package/lib/loading2/index.mjs +9 -0
- package/lib/loading3/index.d.mts +5 -0
- package/lib/loading3/index.d.ts +5 -0
- package/lib/loading3/index.js +32 -0
- package/lib/loading3/index.mjs +9 -0
- package/lib/loading4/index.d.mts +5 -0
- package/lib/loading4/index.d.ts +5 -0
- package/lib/loading4/index.js +32 -0
- package/lib/loading4/index.mjs +9 -0
- package/lib/lock/index.d.mts +5 -0
- package/lib/lock/index.d.ts +5 -0
- package/lib/lock/index.js +32 -0
- package/lib/lock/index.mjs +9 -0
- package/lib/mail/index.d.mts +5 -0
- package/lib/mail/index.d.ts +5 -0
- package/lib/mail/index.js +32 -0
- package/lib/mail/index.mjs +9 -0
- package/lib/maximizeMinimize/index.d.mts +5 -0
- package/lib/maximizeMinimize/index.d.ts +5 -0
- package/lib/maximizeMinimize/index.js +32 -0
- package/lib/maximizeMinimize/index.mjs +9 -0
- package/lib/maximizeMinimize2/index.d.mts +5 -0
- package/lib/maximizeMinimize2/index.d.ts +5 -0
- package/lib/maximizeMinimize2/index.js +32 -0
- package/lib/maximizeMinimize2/index.mjs +9 -0
- package/lib/menu/index.d.mts +5 -0
- package/lib/menu/index.d.ts +5 -0
- package/lib/menu/index.js +32 -0
- package/lib/menu/index.mjs +9 -0
- package/lib/menu2/index.d.mts +5 -0
- package/lib/menu2/index.d.ts +5 -0
- package/lib/menu2/index.js +32 -0
- package/lib/menu2/index.mjs +9 -0
- package/lib/menu3/index.d.mts +5 -0
- package/lib/menu3/index.d.ts +5 -0
- package/lib/menu3/index.js +32 -0
- package/lib/menu3/index.mjs +9 -0
- package/lib/menu4/index.d.mts +5 -0
- package/lib/menu4/index.d.ts +5 -0
- package/lib/menu4/index.js +32 -0
- package/lib/menu4/index.mjs +9 -0
- package/lib/microphone/index.d.mts +5 -0
- package/lib/microphone/index.d.ts +5 -0
- package/lib/microphone/index.js +32 -0
- package/lib/microphone/index.mjs +9 -0
- package/lib/microphone2/index.d.mts +5 -0
- package/lib/microphone2/index.d.ts +5 -0
- package/lib/microphone2/index.js +32 -0
- package/lib/microphone2/index.mjs +9 -0
- package/lib/notification/index.d.mts +5 -0
- package/lib/notification/index.d.ts +5 -0
- package/lib/notification/index.js +32 -0
- package/lib/notification/index.mjs +9 -0
- package/lib/notification2/index.d.mts +5 -0
- package/lib/notification2/index.d.ts +5 -0
- package/lib/notification2/index.js +32 -0
- package/lib/notification2/index.mjs +9 -0
- package/lib/notification3/index.d.mts +5 -0
- package/lib/notification3/index.d.ts +5 -0
- package/lib/notification3/index.js +32 -0
- package/lib/notification3/index.mjs +9 -0
- package/lib/notification4/index.d.mts +5 -0
- package/lib/notification4/index.d.ts +5 -0
- package/lib/notification4/index.js +32 -0
- package/lib/notification4/index.mjs +9 -0
- package/lib/playPause/index.d.mts +5 -0
- package/lib/playPause/index.d.ts +5 -0
- package/lib/playPause/index.js +32 -0
- package/lib/playPause/index.mjs +9 -0
- package/lib/playPauseCircle/index.d.mts +5 -0
- package/lib/playPauseCircle/index.d.ts +5 -0
- package/lib/playPauseCircle/index.js +32 -0
- package/lib/playPauseCircle/index.mjs +9 -0
- package/lib/plusToX/index.d.mts +5 -0
- package/lib/plusToX/index.d.ts +5 -0
- package/lib/plusToX/index.js +32 -0
- package/lib/plusToX/index.mjs +9 -0
- package/lib/pocket/index.d.mts +5 -0
- package/lib/pocket/index.d.ts +5 -0
- package/lib/pocket/index.js +32 -0
- package/lib/pocket/index.mjs +9 -0
- package/lib/radioButton/index.d.mts +5 -0
- package/lib/radioButton/index.d.ts +5 -0
- package/lib/radioButton/index.js +32 -0
- package/lib/radioButton/index.mjs +9 -0
- package/lib/refresh/index.d.mts +5 -0
- package/lib/refresh/index.d.ts +5 -0
- package/lib/refresh/index.js +32 -0
- package/lib/refresh/index.mjs +9 -0
- package/lib/scrollDown/index.d.mts +5 -0
- package/lib/scrollDown/index.d.ts +5 -0
- package/lib/scrollDown/index.js +32 -0
- package/lib/scrollDown/index.mjs +9 -0
- package/lib/searchToX/index.d.mts +5 -0
- package/lib/searchToX/index.d.ts +5 -0
- package/lib/searchToX/index.js +32 -0
- package/lib/searchToX/index.mjs +9 -0
- package/lib/settings/index.d.mts +5 -0
- package/lib/settings/index.d.ts +5 -0
- package/lib/settings/index.js +32 -0
- package/lib/settings/index.mjs +9 -0
- package/lib/settings2/index.d.mts +5 -0
- package/lib/settings2/index.d.ts +5 -0
- package/lib/settings2/index.js +32 -0
- package/lib/settings2/index.mjs +9 -0
- package/lib/share/index.d.mts +5 -0
- package/lib/share/index.d.ts +5 -0
- package/lib/share/index.js +32 -0
- package/lib/share/index.mjs +9 -0
- package/lib/skipBack/index.d.mts +5 -0
- package/lib/skipBack/index.d.ts +5 -0
- package/lib/skipBack/index.js +32 -0
- package/lib/skipBack/index.mjs +9 -0
- package/lib/skipForward/index.d.mts +5 -0
- package/lib/skipForward/index.d.ts +5 -0
- package/lib/skipForward/index.js +32 -0
- package/lib/skipForward/index.mjs +9 -0
- package/lib/star/index.d.mts +5 -0
- package/lib/star/index.d.ts +5 -0
- package/lib/star/index.js +32 -0
- package/lib/star/index.mjs +9 -0
- package/lib/thumbUp/index.d.mts +5 -0
- package/lib/thumbUp/index.d.ts +5 -0
- package/lib/thumbUp/index.js +32 -0
- package/lib/thumbUp/index.mjs +9 -0
- package/lib/toggle/index.d.mts +5 -0
- package/lib/toggle/index.d.ts +5 -0
- package/lib/toggle/index.js +32 -0
- package/lib/toggle/index.mjs +9 -0
- package/lib/trash/index.d.mts +5 -0
- package/lib/trash/index.d.ts +5 -0
- package/lib/trash/index.js +32 -0
- package/lib/trash/index.mjs +9 -0
- package/lib/trash2/index.d.mts +5 -0
- package/lib/trash2/index.d.ts +5 -0
- package/lib/trash2/index.js +32 -0
- package/lib/trash2/index.mjs +9 -0
- package/lib/twitter/index.d.mts +5 -0
- package/lib/twitter/index.d.ts +5 -0
- package/lib/twitter/index.js +32 -0
- package/lib/twitter/index.mjs +9 -0
- package/lib/userMinus/index.d.mts +5 -0
- package/lib/userMinus/index.d.ts +5 -0
- package/lib/userMinus/index.js +32 -0
- package/lib/userMinus/index.mjs +9 -0
- package/lib/userPlus/index.d.mts +5 -0
- package/lib/userPlus/index.d.ts +5 -0
- package/lib/userPlus/index.js +32 -0
- package/lib/userPlus/index.mjs +9 -0
- package/lib/userX/index.d.mts +5 -0
- package/lib/userX/index.d.ts +5 -0
- package/lib/userX/index.js +32 -0
- package/lib/userX/index.mjs +9 -0
- package/lib/video/index.d.mts +5 -0
- package/lib/video/index.d.ts +5 -0
- package/lib/video/index.js +32 -0
- package/lib/video/index.mjs +9 -0
- package/lib/video2/index.d.mts +5 -0
- package/lib/video2/index.d.ts +5 -0
- package/lib/video2/index.js +32 -0
- package/lib/video2/index.mjs +9 -0
- package/lib/visibility/index.d.mts +5 -0
- package/lib/visibility/index.d.ts +5 -0
- package/lib/visibility/index.js +32 -0
- package/lib/visibility/index.mjs +9 -0
- package/lib/visibility2/index.d.mts +5 -0
- package/lib/visibility2/index.d.ts +5 -0
- package/lib/visibility2/index.js +32 -0
- package/lib/visibility2/index.mjs +9 -0
- package/lib/visibility3/index.d.mts +5 -0
- package/lib/visibility3/index.d.ts +5 -0
- package/lib/visibility3/index.js +32 -0
- package/lib/visibility3/index.mjs +9 -0
- package/lib/volume/index.d.mts +5 -0
- package/lib/volume/index.d.ts +5 -0
- package/lib/volume/index.js +32 -0
- package/lib/volume/index.mjs +9 -0
- package/lib/youtube/index.d.mts +5 -0
- package/lib/youtube/index.d.ts +5 -0
- package/lib/youtube/index.js +32 -0
- package/lib/youtube/index.mjs +9 -0
- package/lib/youtube2/index.d.mts +5 -0
- package/lib/youtube2/index.d.ts +5 -0
- package/lib/youtube2/index.js +32 -0
- package/lib/youtube2/index.mjs +9 -0
- package/lib/zoomIn/index.d.mts +5 -0
- package/lib/zoomIn/index.d.ts +5 -0
- package/lib/zoomIn/index.js +32 -0
- package/lib/zoomIn/index.mjs +9 -0
- package/lib/zoomOut/index.d.mts +5 -0
- package/lib/zoomOut/index.d.ts +5 -0
- package/lib/zoomOut/index.js +32 -0
- package/lib/zoomOut/index.mjs +9 -0
- package/package.json +55 -65
- package/.babelrc +0 -4
- package/.editorconfig +0 -15
- package/.eslintignore +0 -2
- package/.eslintrc.json +0 -31
- package/.gitattributes +0 -1
- package/.prettierrc +0 -10
- package/.storybook/main.js +0 -15
- package/.vscode/settings.json +0 -5
- package/README_v1.md +0 -46
- package/src/bin/addAnimationFiles.sh +0 -28
- package/src/bin/generateStories.sh +0 -34
- package/src/index.tsx +0 -177
- package/src/lib/activity/activity.json +0 -1
- package/src/lib/activity/index.ts +0 -4
- package/src/lib/airplay/airplay.json +0 -1
- package/src/lib/airplay/index.ts +0 -4
- package/src/lib/alertCircle/alertCircle.json +0 -1
- package/src/lib/alertCircle/index.ts +0 -4
- package/src/lib/alertOctagon/alertOctagon.json +0 -1
- package/src/lib/alertOctagon/index.ts +0 -4
- package/src/lib/alertTriangle/alertTriangle.json +0 -1
- package/src/lib/alertTriangle/index.ts +0 -4
- package/src/lib/archive/archive.json +0 -1
- package/src/lib/archive/index.ts +0 -4
- package/src/lib/arrowDown/arrowDown.json +0 -1
- package/src/lib/arrowDown/index.ts +0 -4
- package/src/lib/arrowDownCircle/arrowDownCircle.json +0 -1
- package/src/lib/arrowDownCircle/index.ts +0 -4
- package/src/lib/arrowLeftCircle/arrowLeftCircle.json +0 -1
- package/src/lib/arrowLeftCircle/index.ts +0 -4
- package/src/lib/arrowRightCircle/arrowRightCircle.json +0 -1
- package/src/lib/arrowRightCircle/index.ts +0 -4
- package/src/lib/arrowUp/arrowUp.json +0 -1
- package/src/lib/arrowUp/index.ts +0 -4
- package/src/lib/arrowUpCircle/arrowUpCircle.json +0 -1
- package/src/lib/arrowUpCircle/index.ts +0 -4
- package/src/lib/behance/behance.json +0 -1
- package/src/lib/behance/index.ts +0 -4
- package/src/lib/bookmark/bookmark.json +0 -1
- package/src/lib/bookmark/index.ts +0 -4
- package/src/lib/calendar/calendar.json +0 -1
- package/src/lib/calendar/index.ts +0 -4
- package/src/lib/checkBox/checkBox.json +0 -1
- package/src/lib/checkBox/index.ts +0 -4
- package/src/lib/checkmark/checkmark.json +0 -1
- package/src/lib/checkmark/index.ts +0 -4
- package/src/lib/codepen/codepen.json +0 -1
- package/src/lib/codepen/index.ts +0 -4
- package/src/lib/copy/copy.json +0 -1
- package/src/lib/copy/index.ts +0 -4
- package/src/lib/download/download.json +0 -1
- package/src/lib/download/index.ts +0 -4
- package/src/lib/dribbble/dribbble.json +0 -1
- package/src/lib/dribbble/index.ts +0 -4
- package/src/lib/edit/edit.json +0 -1
- package/src/lib/edit/index.ts +0 -4
- package/src/lib/error/error.json +0 -1
- package/src/lib/error/index.ts +0 -4
- package/src/lib/explore/explore.json +0 -1
- package/src/lib/explore/index.ts +0 -4
- package/src/lib/facebook/facebook.json +0 -1
- package/src/lib/facebook/index.ts +0 -4
- package/src/lib/folder/folder.json +0 -1
- package/src/lib/folder/index.ts +0 -4
- package/src/lib/github/github.json +0 -1
- package/src/lib/github/index.ts +0 -4
- package/src/lib/heart/heart.json +0 -1
- package/src/lib/heart/index.ts +0 -4
- package/src/lib/help/help.json +0 -1
- package/src/lib/help/index.ts +0 -4
- package/src/lib/home/home.json +0 -1
- package/src/lib/home/index.ts +0 -4
- package/src/lib/infinity/index.ts +0 -4
- package/src/lib/infinity/infinity.json +0 -1
- package/src/lib/info/index.ts +0 -4
- package/src/lib/info/info.json +0 -1
- package/src/lib/instagram/index.ts +0 -4
- package/src/lib/instagram/instagram.json +0 -1
- package/src/lib/linkedin/index.ts +0 -4
- package/src/lib/linkedin/linkedin.json +0 -1
- package/src/lib/loading/index.ts +0 -4
- package/src/lib/loading/loading.json +0 -1
- package/src/lib/loading2/index.ts +0 -4
- package/src/lib/loading2/loading2.json +0 -1
- package/src/lib/loading3/index.ts +0 -4
- package/src/lib/loading3/loading3.json +0 -1
- package/src/lib/lock/index.ts +0 -4
- package/src/lib/lock/lock.json +0 -1
- package/src/lib/mail/index.ts +0 -4
- package/src/lib/mail/mail.json +0 -1
- package/src/lib/maximizeMinimize/index.ts +0 -4
- package/src/lib/maximizeMinimize/maximizeMinimize.json +0 -1
- package/src/lib/maximizeMinimize2/index.ts +0 -4
- package/src/lib/maximizeMinimize2/maximizeMinimize2.json +0 -1
- package/src/lib/menu/index.ts +0 -4
- package/src/lib/menu/menu.json +0 -1
- package/src/lib/menu2/index.ts +0 -4
- package/src/lib/menu2/menu2.json +0 -1
- package/src/lib/menu3/index.ts +0 -4
- package/src/lib/menu3/menu3.json +0 -1
- package/src/lib/menu4/index.ts +0 -4
- package/src/lib/menu4/menu4.json +0 -1
- package/src/lib/microphone/index.ts +0 -4
- package/src/lib/microphone/microphone.json +0 -1
- package/src/lib/microphone2/index.ts +0 -4
- package/src/lib/microphone2/microphone2.json +0 -1
- package/src/lib/notification/index.ts +0 -4
- package/src/lib/notification/notification.json +0 -1
- package/src/lib/notification2/index.ts +0 -4
- package/src/lib/notification2/notification2.json +0 -1
- package/src/lib/playPause/index.ts +0 -4
- package/src/lib/playPause/playPause.json +0 -1
- package/src/lib/playPauseCircle/index.ts +0 -4
- package/src/lib/playPauseCircle/playPauseCircle.json +0 -1
- package/src/lib/plusToX/index.ts +0 -4
- package/src/lib/plusToX/plusToX.json +0 -1
- package/src/lib/pocket/index.ts +0 -4
- package/src/lib/pocket/pocket.json +0 -1
- package/src/lib/radioButton/index.ts +0 -4
- package/src/lib/radioButton/radioButton.json +0 -1
- package/src/lib/scrollDown/index.ts +0 -4
- package/src/lib/scrollDown/scrollDown.json +0 -1
- package/src/lib/searchToX/index.ts +0 -4
- package/src/lib/searchToX/searchToX.json +0 -1
- package/src/lib/settings/index.ts +0 -4
- package/src/lib/settings/settings.json +0 -1
- package/src/lib/settings2/index.ts +0 -4
- package/src/lib/settings2/settings2.json +0 -1
- package/src/lib/share/index.ts +0 -4
- package/src/lib/share/share.json +0 -1
- package/src/lib/skipBack/index.ts +0 -4
- package/src/lib/skipBack/skipBack.json +0 -1
- package/src/lib/skipForward/index.ts +0 -4
- package/src/lib/skipForward/skipForward.json +0 -1
- package/src/lib/star/index.ts +0 -4
- package/src/lib/star/star.json +0 -1
- package/src/lib/thumbUp/index.ts +0 -4
- package/src/lib/thumbUp/thumbUp.json +0 -1
- package/src/lib/toggle/index.ts +0 -4
- package/src/lib/toggle/toggle.json +0 -1
- package/src/lib/trash/index.ts +0 -4
- package/src/lib/trash/trash.json +0 -1
- package/src/lib/trash2/index.ts +0 -4
- package/src/lib/trash2/trash2.json +0 -1
- package/src/lib/twitter/index.ts +0 -4
- package/src/lib/twitter/twitter.json +0 -1
- package/src/lib/userMinus/index.ts +0 -4
- package/src/lib/userMinus/userMinus.json +0 -1
- package/src/lib/userPlus/index.ts +0 -4
- package/src/lib/userPlus/userPlus.json +0 -1
- package/src/lib/userX/index.ts +0 -4
- package/src/lib/userX/userX.json +0 -1
- package/src/lib/video/index.ts +0 -4
- package/src/lib/video/video.json +0 -1
- package/src/lib/video2/index.ts +0 -4
- package/src/lib/video2/video2.json +0 -1
- package/src/lib/visibility/index.ts +0 -4
- package/src/lib/visibility/visibility.json +0 -1
- package/src/lib/visibility2/index.ts +0 -4
- package/src/lib/visibility2/visibility2.json +0 -1
- package/src/lib/volume/index.ts +0 -4
- package/src/lib/volume/volume.json +0 -1
- package/src/lib/youtube/index.ts +0 -4
- package/src/lib/youtube/youtube.json +0 -1
- package/src/lib/youtube2/index.ts +0 -4
- package/src/lib/youtube2/youtube2.json +0 -1
- package/src/lib/zoomIn/index.ts +0 -4
- package/src/lib/zoomIn/zoomIn.json +0 -1
- package/src/lib/zoomOut/index.ts +0 -4
- package/src/lib/zoomOut/zoomOut.json +0 -1
- package/src/stories/controlled.stories.tsx +0 -257
- package/src/stories/generated.stories.tsx +0 -406
- package/src/stories/variants.stories.tsx +0 -237
- package/src/typings.d.ts +0 -6
- package/src/utils/constants.ts +0 -93
- package/src/utils/getEffect.ts +0 -91
- package/src/utils/getEvents.ts +0 -81
- package/src/utils/index.ts +0 -3
- package/tsconfig.json +0 -67
- package/useanimations-preview.gif +0 -0
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { withInfo } from '@storybook/addon-info';
|
|
3
|
-
import activity from '../lib/activity';
|
|
4
|
-
import youtube from '../lib/youtube';
|
|
5
|
-
import star from '../lib/star';
|
|
6
|
-
import heart from '../lib/heart';
|
|
7
|
-
import UseAnimation from '..';
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
title: 'Variants',
|
|
11
|
-
component: UseAnimation,
|
|
12
|
-
decorators: [withInfo],
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export const Stroke = () => (
|
|
16
|
-
<div style={{ display: 'flex', flexWrap: 'wrap' }}>
|
|
17
|
-
<div style={{ padding: '20px' }}>
|
|
18
|
-
<span>activity</span>
|
|
19
|
-
<UseAnimation
|
|
20
|
-
strokeColor="green"
|
|
21
|
-
size={40}
|
|
22
|
-
wrapperStyle={{ marginTop: '5px' }}
|
|
23
|
-
animation={activity}
|
|
24
|
-
/>
|
|
25
|
-
</div>
|
|
26
|
-
<div style={{ padding: '20px' }}>
|
|
27
|
-
<span>activity</span>
|
|
28
|
-
<UseAnimation
|
|
29
|
-
strokeColor="red"
|
|
30
|
-
size={40}
|
|
31
|
-
wrapperStyle={{ marginTop: '5px' }}
|
|
32
|
-
animation={youtube}
|
|
33
|
-
/>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
Stroke.story = {
|
|
39
|
-
parameters: {
|
|
40
|
-
info: {
|
|
41
|
-
text: `
|
|
42
|
-
~~~js
|
|
43
|
-
export const Stroke = () => (
|
|
44
|
-
<div style={{ display: 'flex', flexWrap: 'wrap' }}>
|
|
45
|
-
<div style={{ padding: '20px' }}>
|
|
46
|
-
<span>activity</span>
|
|
47
|
-
<UseAnimation
|
|
48
|
-
strokeColor="green"
|
|
49
|
-
size={40}
|
|
50
|
-
wrapperStyle={{ marginTop: '5px' }}
|
|
51
|
-
animation={activity}
|
|
52
|
-
/>
|
|
53
|
-
</div>
|
|
54
|
-
<div style={{ padding: '20px' }}>
|
|
55
|
-
<span>activity</span>
|
|
56
|
-
<UseAnimation
|
|
57
|
-
strokeColor="red"
|
|
58
|
-
size={40}
|
|
59
|
-
wrapperStyle={{ marginTop: '5px' }}
|
|
60
|
-
animation={youtube}
|
|
61
|
-
/>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
);
|
|
65
|
-
~~~
|
|
66
|
-
`,
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export const Fill = () => (
|
|
72
|
-
<div style={{ display: 'flex', flexWrap: 'wrap' }}>
|
|
73
|
-
<div style={{ padding: '20px' }}>
|
|
74
|
-
<span>star</span>
|
|
75
|
-
<UseAnimation
|
|
76
|
-
fillColor="green"
|
|
77
|
-
size={40}
|
|
78
|
-
wrapperStyle={{ marginTop: '5px' }}
|
|
79
|
-
animation={star}
|
|
80
|
-
/>
|
|
81
|
-
</div>
|
|
82
|
-
<div style={{ padding: '20px' }}>
|
|
83
|
-
<span>heart</span>
|
|
84
|
-
<UseAnimation
|
|
85
|
-
fillColor="red"
|
|
86
|
-
size={40}
|
|
87
|
-
wrapperStyle={{ marginTop: '5px' }}
|
|
88
|
-
animation={heart}
|
|
89
|
-
/>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
);
|
|
93
|
-
|
|
94
|
-
Fill.story = {
|
|
95
|
-
parameters: {
|
|
96
|
-
info: {
|
|
97
|
-
text: `
|
|
98
|
-
~~~js
|
|
99
|
-
export const Fill = () => (
|
|
100
|
-
<div style={{ display: 'flex', flexWrap: 'wrap' }}>
|
|
101
|
-
<div style={{ padding: '20px' }}>
|
|
102
|
-
<span>star</span>
|
|
103
|
-
<UseAnimation
|
|
104
|
-
fillColor="green"
|
|
105
|
-
size={40}
|
|
106
|
-
wrapperStyle={{ marginTop: '5px' }}
|
|
107
|
-
animation={star}
|
|
108
|
-
/>
|
|
109
|
-
</div>
|
|
110
|
-
<div style={{ padding: '20px' }}>
|
|
111
|
-
<span>heart</span>
|
|
112
|
-
<UseAnimation
|
|
113
|
-
fillColor="red"
|
|
114
|
-
size={40}
|
|
115
|
-
wrapperStyle={{ marginTop: '5px' }}
|
|
116
|
-
animation={heart}
|
|
117
|
-
/>
|
|
118
|
-
</div>
|
|
119
|
-
</div>
|
|
120
|
-
);
|
|
121
|
-
~~~
|
|
122
|
-
`,
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
};
|
|
126
|
-
|
|
127
|
-
export const CustomCSS = () => (
|
|
128
|
-
<div style={{ display: 'flex', flexWrap: 'wrap' }}>
|
|
129
|
-
<div style={{ padding: '20px' }}>
|
|
130
|
-
<span>activity</span>
|
|
131
|
-
<UseAnimation
|
|
132
|
-
size={40}
|
|
133
|
-
pathCss="stroke: purple; stroke-width: 2%;"
|
|
134
|
-
wrapperStyle={{ marginTop: '5px' }}
|
|
135
|
-
animation={activity}
|
|
136
|
-
/>
|
|
137
|
-
</div>
|
|
138
|
-
</div>
|
|
139
|
-
);
|
|
140
|
-
|
|
141
|
-
CustomCSS.story = {
|
|
142
|
-
parameters: {
|
|
143
|
-
info: {
|
|
144
|
-
text: `
|
|
145
|
-
~~~js
|
|
146
|
-
export const CustomCSS = () => (
|
|
147
|
-
<div style={{ display: 'flex', flexWrap: 'wrap' }}>
|
|
148
|
-
<div style={{ padding: '20px' }}>
|
|
149
|
-
<span>activity</span>
|
|
150
|
-
<UseAnimation
|
|
151
|
-
size={40}
|
|
152
|
-
pathCss="stroke: purple; stroke-width: 2%;"
|
|
153
|
-
wrapperStyle={{ marginTop: '5px' }}
|
|
154
|
-
animation={activity}
|
|
155
|
-
/>
|
|
156
|
-
</div>
|
|
157
|
-
</div>
|
|
158
|
-
);
|
|
159
|
-
~~~
|
|
160
|
-
`,
|
|
161
|
-
},
|
|
162
|
-
},
|
|
163
|
-
};
|
|
164
|
-
|
|
165
|
-
export const Size = () => (
|
|
166
|
-
<div style={{ display: 'flex', flexWrap: 'wrap' }}>
|
|
167
|
-
<div style={{ padding: '20px' }}>
|
|
168
|
-
<span>activity</span>
|
|
169
|
-
<UseAnimation size={60} wrapperStyle={{ marginTop: '5px' }} animation={activity} />
|
|
170
|
-
</div>
|
|
171
|
-
</div>
|
|
172
|
-
);
|
|
173
|
-
|
|
174
|
-
Size.story = {
|
|
175
|
-
parameters: {
|
|
176
|
-
info: {
|
|
177
|
-
text: `
|
|
178
|
-
~~~js
|
|
179
|
-
export const Size = () => (
|
|
180
|
-
<div style={{ display: 'flex', flexWrap: 'wrap' }}>
|
|
181
|
-
<div style={{ padding: '20px' }}>
|
|
182
|
-
<span>activity</span>
|
|
183
|
-
<UseAnimation size={60} wrapperStyle={{ marginTop: '5px' }} animation={activity} />
|
|
184
|
-
</div>
|
|
185
|
-
</div>
|
|
186
|
-
);
|
|
187
|
-
~~~
|
|
188
|
-
`,
|
|
189
|
-
},
|
|
190
|
-
},
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
export const WrapperElement = () => {
|
|
194
|
-
return (
|
|
195
|
-
<UseAnimation
|
|
196
|
-
animation={heart}
|
|
197
|
-
size={60}
|
|
198
|
-
onClick={() => {
|
|
199
|
-
// eslint-disable-next-line
|
|
200
|
-
console.log('additional onClick cb is working');
|
|
201
|
-
}}
|
|
202
|
-
render={(eventProps, animationProps) => (
|
|
203
|
-
<button style={{ padding: '20px' }} type="button" {...eventProps}>
|
|
204
|
-
<div {...animationProps} />
|
|
205
|
-
</button>
|
|
206
|
-
)}
|
|
207
|
-
/>
|
|
208
|
-
);
|
|
209
|
-
};
|
|
210
|
-
|
|
211
|
-
WrapperElement.story = {
|
|
212
|
-
parameters: {
|
|
213
|
-
info: {
|
|
214
|
-
text: `
|
|
215
|
-
~~~js
|
|
216
|
-
export const WrapperElement = () => {
|
|
217
|
-
return (
|
|
218
|
-
<UseAnimation
|
|
219
|
-
animation={heart}
|
|
220
|
-
size={60}
|
|
221
|
-
onClick={() => {
|
|
222
|
-
// eslint-disable-next-line
|
|
223
|
-
console.log('additional onClick cb is working');
|
|
224
|
-
}}
|
|
225
|
-
render={(eventProps, animationProps) => (
|
|
226
|
-
<button style={{ padding: '20px' }} type="button" {...eventProps}>
|
|
227
|
-
<div {...animationProps} />
|
|
228
|
-
</button>
|
|
229
|
-
)}
|
|
230
|
-
/>
|
|
231
|
-
);
|
|
232
|
-
};
|
|
233
|
-
~~~
|
|
234
|
-
`,
|
|
235
|
-
},
|
|
236
|
-
},
|
|
237
|
-
};
|
package/src/typings.d.ts
DELETED
package/src/utils/constants.ts
DELETED
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
export type AnimationEffect =
|
|
2
|
-
| 'CLICK_PLAY_AND_BACKWARDS'
|
|
3
|
-
| 'HOVER_PLAY_AND_STOP'
|
|
4
|
-
| 'HOVER_PLAY_AND_BACKWARDS'
|
|
5
|
-
| 'CLICK_PLAY'
|
|
6
|
-
| 'LOOP_PLAY'
|
|
7
|
-
| 'CLICK_PLAY_AND_SEGMENTS';
|
|
8
|
-
|
|
9
|
-
export type Animation = {
|
|
10
|
-
animationData: any;
|
|
11
|
-
animationKey: AnimationKey;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export type AnimationKey =
|
|
15
|
-
| 'activity'
|
|
16
|
-
| 'airplay'
|
|
17
|
-
| 'alertCircle'
|
|
18
|
-
| 'alertOctagon'
|
|
19
|
-
| 'alertTriangle'
|
|
20
|
-
| 'archive'
|
|
21
|
-
| 'arrowDown'
|
|
22
|
-
| 'arrowDownCircle'
|
|
23
|
-
| 'arrowLeftCircle'
|
|
24
|
-
| 'arrowRightCircle'
|
|
25
|
-
| 'arrowUp'
|
|
26
|
-
| 'arrowUpCircle'
|
|
27
|
-
| 'bookmark'
|
|
28
|
-
| 'behance'
|
|
29
|
-
| 'calendar'
|
|
30
|
-
| 'checkBox'
|
|
31
|
-
| 'checkmark'
|
|
32
|
-
| 'codepen'
|
|
33
|
-
| 'copy'
|
|
34
|
-
| 'download'
|
|
35
|
-
| 'dribbble'
|
|
36
|
-
| 'edit'
|
|
37
|
-
| 'error'
|
|
38
|
-
| 'explore'
|
|
39
|
-
| 'facebook'
|
|
40
|
-
| 'folder'
|
|
41
|
-
| 'github'
|
|
42
|
-
| 'heart'
|
|
43
|
-
| 'help'
|
|
44
|
-
| 'home'
|
|
45
|
-
| 'infinity'
|
|
46
|
-
| 'info'
|
|
47
|
-
| 'instagram'
|
|
48
|
-
| 'linkedin'
|
|
49
|
-
| 'loading'
|
|
50
|
-
| 'loading2'
|
|
51
|
-
| 'loading3'
|
|
52
|
-
| 'lock'
|
|
53
|
-
| 'mail'
|
|
54
|
-
| 'maximizeMinimize'
|
|
55
|
-
| 'maximizeMinimize2'
|
|
56
|
-
| 'menu'
|
|
57
|
-
| 'menu2'
|
|
58
|
-
| 'menu3'
|
|
59
|
-
| 'menu4'
|
|
60
|
-
| 'microphone'
|
|
61
|
-
| 'microphone2'
|
|
62
|
-
| 'notification'
|
|
63
|
-
| 'notification2'
|
|
64
|
-
| 'playPause'
|
|
65
|
-
| 'playPauseCircle'
|
|
66
|
-
| 'plusToX'
|
|
67
|
-
| 'pocket'
|
|
68
|
-
| 'radioButton'
|
|
69
|
-
| 'scrollDown'
|
|
70
|
-
| 'searchToX'
|
|
71
|
-
| 'settings'
|
|
72
|
-
| 'settings2'
|
|
73
|
-
| 'share'
|
|
74
|
-
| 'skipBack'
|
|
75
|
-
| 'skipForward'
|
|
76
|
-
| 'star'
|
|
77
|
-
| 'thumbUp'
|
|
78
|
-
| 'toggle'
|
|
79
|
-
| 'trash'
|
|
80
|
-
| 'trash2'
|
|
81
|
-
| 'twitter'
|
|
82
|
-
| 'userMinus'
|
|
83
|
-
| 'userPlus'
|
|
84
|
-
| 'userX'
|
|
85
|
-
| 'video'
|
|
86
|
-
| 'video2'
|
|
87
|
-
| 'visibility'
|
|
88
|
-
| 'visibility2'
|
|
89
|
-
| 'volume'
|
|
90
|
-
| 'youtube'
|
|
91
|
-
| 'youtube2'
|
|
92
|
-
| 'zoomIn'
|
|
93
|
-
| 'zoomOut';
|
package/src/utils/getEffect.ts
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import type { AnimationKey, AnimationEffect } from '.';
|
|
2
|
-
|
|
3
|
-
type Animations = {
|
|
4
|
-
[Key in AnimationKey]: AnimationEffect;
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
const animations: Animations = {
|
|
8
|
-
activity: 'LOOP_PLAY',
|
|
9
|
-
airplay: 'LOOP_PLAY',
|
|
10
|
-
alertCircle: 'LOOP_PLAY',
|
|
11
|
-
alertOctagon: 'LOOP_PLAY',
|
|
12
|
-
alertTriangle: 'LOOP_PLAY',
|
|
13
|
-
archive: 'HOVER_PLAY_AND_BACKWARDS',
|
|
14
|
-
arrowDown: 'LOOP_PLAY',
|
|
15
|
-
arrowDownCircle: 'CLICK_PLAY_AND_BACKWARDS',
|
|
16
|
-
arrowLeftCircle: 'CLICK_PLAY_AND_BACKWARDS',
|
|
17
|
-
arrowRightCircle: 'CLICK_PLAY_AND_BACKWARDS',
|
|
18
|
-
arrowUp: 'LOOP_PLAY',
|
|
19
|
-
arrowUpCircle: 'CLICK_PLAY_AND_BACKWARDS',
|
|
20
|
-
bookmark: 'CLICK_PLAY_AND_BACKWARDS',
|
|
21
|
-
behance: 'HOVER_PLAY_AND_STOP',
|
|
22
|
-
calendar: 'HOVER_PLAY_AND_STOP',
|
|
23
|
-
checkBox: 'CLICK_PLAY_AND_BACKWARDS',
|
|
24
|
-
checkmark: 'LOOP_PLAY',
|
|
25
|
-
codepen: 'HOVER_PLAY_AND_STOP',
|
|
26
|
-
copy: 'CLICK_PLAY',
|
|
27
|
-
download: 'CLICK_PLAY',
|
|
28
|
-
dribbble: 'HOVER_PLAY_AND_BACKWARDS',
|
|
29
|
-
edit: 'CLICK_PLAY',
|
|
30
|
-
error: 'LOOP_PLAY',
|
|
31
|
-
explore: 'HOVER_PLAY_AND_BACKWARDS',
|
|
32
|
-
facebook: 'HOVER_PLAY_AND_STOP',
|
|
33
|
-
folder: 'HOVER_PLAY_AND_STOP',
|
|
34
|
-
github: 'HOVER_PLAY_AND_STOP',
|
|
35
|
-
help: 'LOOP_PLAY',
|
|
36
|
-
heart: 'CLICK_PLAY_AND_BACKWARDS',
|
|
37
|
-
home: 'HOVER_PLAY_AND_STOP',
|
|
38
|
-
infinity: 'LOOP_PLAY',
|
|
39
|
-
info: 'HOVER_PLAY_AND_BACKWARDS',
|
|
40
|
-
instagram: 'HOVER_PLAY_AND_STOP',
|
|
41
|
-
linkedin: 'HOVER_PLAY_AND_STOP',
|
|
42
|
-
loading: 'LOOP_PLAY',
|
|
43
|
-
loading2: 'LOOP_PLAY',
|
|
44
|
-
loading3: 'LOOP_PLAY',
|
|
45
|
-
lock: 'CLICK_PLAY_AND_BACKWARDS',
|
|
46
|
-
mail: 'CLICK_PLAY',
|
|
47
|
-
maximizeMinimize: 'CLICK_PLAY_AND_BACKWARDS',
|
|
48
|
-
maximizeMinimize2: 'CLICK_PLAY_AND_BACKWARDS',
|
|
49
|
-
menu: 'CLICK_PLAY_AND_BACKWARDS',
|
|
50
|
-
menu2: 'CLICK_PLAY_AND_BACKWARDS',
|
|
51
|
-
menu3: 'CLICK_PLAY_AND_BACKWARDS',
|
|
52
|
-
menu4: 'CLICK_PLAY_AND_BACKWARDS',
|
|
53
|
-
microphone: 'CLICK_PLAY_AND_BACKWARDS',
|
|
54
|
-
microphone2: 'CLICK_PLAY_AND_BACKWARDS',
|
|
55
|
-
notification: 'CLICK_PLAY_AND_BACKWARDS',
|
|
56
|
-
notification2: 'CLICK_PLAY_AND_BACKWARDS',
|
|
57
|
-
playPause: 'CLICK_PLAY_AND_BACKWARDS',
|
|
58
|
-
playPauseCircle: 'CLICK_PLAY_AND_BACKWARDS',
|
|
59
|
-
plusToX: 'CLICK_PLAY_AND_BACKWARDS',
|
|
60
|
-
pocket: 'HOVER_PLAY_AND_STOP',
|
|
61
|
-
radioButton: 'CLICK_PLAY_AND_BACKWARDS',
|
|
62
|
-
scrollDown: 'LOOP_PLAY',
|
|
63
|
-
searchToX: 'CLICK_PLAY_AND_BACKWARDS',
|
|
64
|
-
settings: 'HOVER_PLAY_AND_BACKWARDS',
|
|
65
|
-
settings2: 'CLICK_PLAY_AND_BACKWARDS',
|
|
66
|
-
skipForward: 'CLICK_PLAY_AND_SEGMENTS',
|
|
67
|
-
skipBack: 'CLICK_PLAY_AND_SEGMENTS',
|
|
68
|
-
share: 'HOVER_PLAY_AND_BACKWARDS',
|
|
69
|
-
star: 'CLICK_PLAY_AND_BACKWARDS',
|
|
70
|
-
toggle: 'CLICK_PLAY_AND_BACKWARDS',
|
|
71
|
-
trash: 'HOVER_PLAY_AND_BACKWARDS',
|
|
72
|
-
trash2: 'HOVER_PLAY_AND_BACKWARDS',
|
|
73
|
-
thumbUp: 'CLICK_PLAY_AND_BACKWARDS',
|
|
74
|
-
twitter: 'HOVER_PLAY_AND_STOP',
|
|
75
|
-
userMinus: 'HOVER_PLAY_AND_STOP',
|
|
76
|
-
userPlus: 'HOVER_PLAY_AND_STOP',
|
|
77
|
-
userX: 'HOVER_PLAY_AND_STOP',
|
|
78
|
-
video: 'CLICK_PLAY_AND_BACKWARDS',
|
|
79
|
-
video2: 'CLICK_PLAY_AND_BACKWARDS',
|
|
80
|
-
visibility: 'CLICK_PLAY_AND_BACKWARDS',
|
|
81
|
-
visibility2: 'CLICK_PLAY_AND_BACKWARDS',
|
|
82
|
-
volume: 'CLICK_PLAY_AND_BACKWARDS',
|
|
83
|
-
youtube: 'HOVER_PLAY_AND_STOP',
|
|
84
|
-
youtube2: 'HOVER_PLAY_AND_STOP',
|
|
85
|
-
zoomIn: 'LOOP_PLAY',
|
|
86
|
-
zoomOut: 'LOOP_PLAY',
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
const getEffect = (animationKey: AnimationKey) => animations[animationKey] || '';
|
|
90
|
-
|
|
91
|
-
export default getEffect;
|
package/src/utils/getEvents.ts
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import type { AnimationEffect } from './constants';
|
|
2
|
-
|
|
3
|
-
const getClickAndPlaySegmentsEvents = (animation: any) => ({
|
|
4
|
-
onClick: () => animation.playSegments([0, 60], true),
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
const getClickPlayEvents = (animation: any) => ({
|
|
8
|
-
onClick: () => {
|
|
9
|
-
animation.stop();
|
|
10
|
-
animation.play();
|
|
11
|
-
},
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
const getHoverPlayAndStop = (animation: any) => ({
|
|
15
|
-
onMouseEnter: () => animation.play(),
|
|
16
|
-
onMouseLeave: () => animation.stop(),
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
const getHoverPlayBackwardsEvents = (animation: any) => ({
|
|
20
|
-
onMouseEnter: () => {
|
|
21
|
-
animation.setDirection(1);
|
|
22
|
-
animation.play();
|
|
23
|
-
},
|
|
24
|
-
onMouseLeave: () => {
|
|
25
|
-
animation.setDirection(-1);
|
|
26
|
-
animation.play();
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
const getClickAndPlayBackwardsEvents = (animation: any, reverse: boolean) => {
|
|
31
|
-
let directionMenu = 1;
|
|
32
|
-
|
|
33
|
-
// EG CHECKBOX WHICH NEED TO BE CHECKED AS INITIAL STATE, LET'S PLAY THE ANIMATION ASAP AUTOMATICALLY
|
|
34
|
-
if (reverse) {
|
|
35
|
-
animation.setDirection(directionMenu);
|
|
36
|
-
animation.play();
|
|
37
|
-
directionMenu *= -1;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return {
|
|
41
|
-
onClick: () => {
|
|
42
|
-
animation.setDirection(directionMenu);
|
|
43
|
-
animation.play();
|
|
44
|
-
directionMenu *= -1;
|
|
45
|
-
},
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const getEvents = ({
|
|
50
|
-
animation,
|
|
51
|
-
reverse,
|
|
52
|
-
animEffect,
|
|
53
|
-
}: {
|
|
54
|
-
animation: any;
|
|
55
|
-
reverse: boolean;
|
|
56
|
-
animEffect: AnimationEffect;
|
|
57
|
-
}) => {
|
|
58
|
-
if (animEffect === 'CLICK_PLAY_AND_SEGMENTS') {
|
|
59
|
-
return getClickAndPlaySegmentsEvents(animation);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
if (animEffect === 'CLICK_PLAY') {
|
|
63
|
-
return getClickPlayEvents(animation);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
if (animEffect === 'HOVER_PLAY_AND_STOP') {
|
|
67
|
-
return getHoverPlayAndStop(animation);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (animEffect === 'HOVER_PLAY_AND_BACKWARDS') {
|
|
71
|
-
return getHoverPlayBackwardsEvents(animation);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
if (animEffect === 'CLICK_PLAY_AND_BACKWARDS') {
|
|
75
|
-
return getClickAndPlayBackwardsEvents(animation, reverse);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return getClickPlayEvents(animation);
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
export default getEvents;
|
package/src/utils/index.ts
DELETED
package/tsconfig.json
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
/* Basic Options */
|
|
4
|
-
// "incremental": true, /* Enable incremental compilation */
|
|
5
|
-
"target": "esnext", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
|
|
6
|
-
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
|
|
7
|
-
// "lib": [], /* Specify library files to be included in the compilation. */
|
|
8
|
-
"allowJs": true, /* Allow javascript files to be compiled. */
|
|
9
|
-
// "checkJs": true, /* Report errors in .js files. */
|
|
10
|
-
"jsx": "react", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
|
|
11
|
-
"declaration": true, /* Generates corresponding '.d.ts' file. */
|
|
12
|
-
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
|
13
|
-
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
|
14
|
-
// "outFile": "./", /* Concatenate and emit output to single file. */
|
|
15
|
-
"outDir": "./dist", /* Redirect output structure to the directory. */
|
|
16
|
-
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
|
|
17
|
-
// "composite": true, /* Enable project compilation */
|
|
18
|
-
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
|
|
19
|
-
// "removeComments": true, /* Do not emit comments to output. */
|
|
20
|
-
"noEmit": false, /* Do not emit outputs. */
|
|
21
|
-
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
|
22
|
-
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
|
23
|
-
"isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
|
|
24
|
-
/* Strict Type-Checking Options */
|
|
25
|
-
"strict": true, /* Enable all strict type-checking options. */
|
|
26
|
-
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
|
|
27
|
-
// "strictNullChecks": true, /* Enable strict null checks. */
|
|
28
|
-
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
|
29
|
-
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
|
|
30
|
-
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
|
31
|
-
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
|
|
32
|
-
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
|
33
|
-
/* Additional Checks */
|
|
34
|
-
// "noUnusedLocals": true, /* Report errors on unused locals. */
|
|
35
|
-
// "noUnusedParameters": true, /* Report errors on unused parameters. */
|
|
36
|
-
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
|
|
37
|
-
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
|
38
|
-
/* Module Resolution Options */
|
|
39
|
-
"moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
|
40
|
-
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
|
|
41
|
-
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
|
42
|
-
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
|
|
43
|
-
// "typeRoots": [], /* List of folders to include type definitions from. */
|
|
44
|
-
// "types": [], /* Type declaration files to be included in compilation. */
|
|
45
|
-
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
|
|
46
|
-
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
|
|
47
|
-
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
|
48
|
-
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
49
|
-
/* Source Map Options */
|
|
50
|
-
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
|
51
|
-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
52
|
-
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
|
53
|
-
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
|
54
|
-
/* Experimental Options */
|
|
55
|
-
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
|
56
|
-
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
|
57
|
-
/* Advanced Options */
|
|
58
|
-
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
|
|
59
|
-
},
|
|
60
|
-
"include": [
|
|
61
|
-
"src"
|
|
62
|
-
],
|
|
63
|
-
"exclude": [
|
|
64
|
-
"node_modules",
|
|
65
|
-
"dist"
|
|
66
|
-
]
|
|
67
|
-
}
|
|
Binary file
|