react-useanimations 2.10.0 → 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/LICENSE +30 -0
- package/README.md +155 -0
- package/index.d.mts +144 -0
- package/index.d.ts +136 -11
- package/index.js +279 -188
- package/index.mjs +258 -0
- package/lib/activity/index.d.mts +5 -0
- package/lib/activity/index.d.ts +5 -3
- package/lib/activity/index.js +27 -11
- package/lib/activity/index.mjs +9 -0
- package/lib/airplay/index.d.mts +5 -0
- package/lib/airplay/index.d.ts +5 -3
- package/lib/airplay/index.js +27 -11
- package/lib/airplay/index.mjs +9 -0
- package/lib/alertCircle/index.d.mts +5 -0
- package/lib/alertCircle/index.d.ts +5 -3
- package/lib/alertCircle/index.js +27 -11
- package/lib/alertCircle/index.mjs +9 -0
- package/lib/alertOctagon/index.d.mts +5 -0
- package/lib/alertOctagon/index.d.ts +5 -3
- package/lib/alertOctagon/index.js +27 -11
- package/lib/alertOctagon/index.mjs +9 -0
- package/lib/alertTriangle/index.d.mts +5 -0
- package/lib/alertTriangle/index.d.ts +5 -3
- package/lib/alertTriangle/index.js +27 -11
- package/lib/alertTriangle/index.mjs +9 -0
- package/lib/archive/index.d.mts +5 -0
- package/lib/archive/index.d.ts +5 -3
- package/lib/archive/index.js +27 -11
- package/lib/archive/index.mjs +9 -0
- package/lib/arrowDown/index.d.mts +5 -0
- package/lib/arrowDown/index.d.ts +5 -3
- package/lib/arrowDown/index.js +27 -11
- package/lib/arrowDown/index.mjs +9 -0
- package/lib/arrowDownCircle/index.d.mts +5 -0
- package/lib/arrowDownCircle/index.d.ts +5 -3
- package/lib/arrowDownCircle/index.js +27 -11
- package/lib/arrowDownCircle/index.mjs +9 -0
- package/lib/arrowLeftCircle/index.d.mts +5 -0
- package/lib/arrowLeftCircle/index.d.ts +5 -3
- package/lib/arrowLeftCircle/index.js +27 -11
- package/lib/arrowLeftCircle/index.mjs +9 -0
- package/lib/arrowRightCircle/index.d.mts +5 -0
- package/lib/arrowRightCircle/index.d.ts +5 -3
- package/lib/arrowRightCircle/index.js +27 -11
- package/lib/arrowRightCircle/index.mjs +9 -0
- package/lib/arrowUp/index.d.mts +5 -0
- package/lib/arrowUp/index.d.ts +5 -3
- package/lib/arrowUp/index.js +27 -11
- package/lib/arrowUp/index.mjs +9 -0
- package/lib/arrowUpCircle/index.d.mts +5 -0
- package/lib/arrowUpCircle/index.d.ts +5 -3
- package/lib/arrowUpCircle/index.js +27 -11
- package/lib/arrowUpCircle/index.mjs +9 -0
- package/lib/behance/index.d.mts +5 -0
- package/lib/behance/index.d.ts +5 -3
- package/lib/behance/index.js +27 -11
- package/lib/behance/index.mjs +9 -0
- package/lib/bookmark/index.d.mts +5 -0
- package/lib/bookmark/index.d.ts +5 -3
- package/lib/bookmark/index.js +27 -11
- package/lib/bookmark/index.mjs +9 -0
- package/lib/calendar/index.d.mts +5 -0
- package/lib/calendar/index.d.ts +5 -3
- package/lib/calendar/index.js +27 -11
- package/lib/calendar/index.mjs +9 -0
- package/lib/checkBox/index.d.mts +5 -0
- package/lib/checkBox/index.d.ts +5 -3
- package/lib/checkBox/index.js +27 -11
- package/lib/checkBox/index.mjs +9 -0
- package/lib/checkmark/index.d.mts +5 -0
- package/lib/checkmark/index.d.ts +5 -3
- package/lib/checkmark/index.js +27 -11
- 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 -3
- package/lib/codepen/index.js +27 -11
- package/lib/codepen/index.mjs +9 -0
- package/lib/copy/index.d.mts +5 -0
- package/lib/copy/index.d.ts +5 -3
- package/lib/copy/index.js +27 -11
- package/lib/copy/index.mjs +9 -0
- package/lib/download/index.d.mts +5 -0
- package/lib/download/index.d.ts +5 -3
- package/lib/download/index.js +27 -11
- package/lib/download/index.mjs +9 -0
- package/lib/dribbble/index.d.mts +5 -0
- package/lib/dribbble/index.d.ts +5 -3
- package/lib/dribbble/index.js +27 -11
- package/lib/dribbble/index.mjs +9 -0
- package/lib/edit/index.d.mts +5 -0
- package/lib/edit/index.d.ts +5 -3
- package/lib/edit/index.js +27 -11
- package/lib/edit/index.mjs +9 -0
- package/lib/error/index.d.mts +5 -0
- package/lib/error/index.d.ts +5 -3
- package/lib/error/index.js +27 -11
- package/lib/error/index.mjs +9 -0
- package/lib/explore/index.d.mts +5 -0
- package/lib/explore/index.d.ts +5 -3
- package/lib/explore/index.js +27 -11
- package/lib/explore/index.mjs +9 -0
- package/lib/facebook/index.d.mts +5 -0
- package/lib/facebook/index.d.ts +5 -3
- package/lib/facebook/index.js +27 -11
- 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 -3
- package/lib/folder/index.js +27 -11
- package/lib/folder/index.mjs +9 -0
- package/lib/github/index.d.mts +5 -0
- package/lib/github/index.d.ts +5 -3
- package/lib/github/index.js +27 -11
- package/lib/github/index.mjs +9 -0
- package/lib/heart/index.d.mts +5 -0
- package/lib/heart/index.d.ts +5 -3
- package/lib/heart/index.js +27 -11
- package/lib/heart/index.mjs +9 -0
- package/lib/help/index.d.mts +5 -0
- package/lib/help/index.d.ts +5 -3
- package/lib/help/index.js +27 -11
- package/lib/help/index.mjs +9 -0
- package/lib/home/index.d.mts +5 -0
- package/lib/home/index.d.ts +5 -3
- package/lib/home/index.js +27 -11
- package/lib/home/index.mjs +9 -0
- package/lib/infinity/index.d.mts +5 -0
- package/lib/infinity/index.d.ts +5 -3
- package/lib/infinity/index.js +27 -11
- package/lib/infinity/index.mjs +9 -0
- package/lib/info/index.d.mts +5 -0
- package/lib/info/index.d.ts +5 -3
- package/lib/info/index.js +27 -11
- package/lib/info/index.mjs +9 -0
- package/lib/instagram/index.d.mts +5 -0
- package/lib/instagram/index.d.ts +5 -3
- package/lib/instagram/index.js +27 -11
- package/lib/instagram/index.mjs +9 -0
- package/lib/linkedin/index.d.mts +5 -0
- package/lib/linkedin/index.d.ts +5 -3
- package/lib/linkedin/index.js +27 -11
- package/lib/linkedin/index.mjs +9 -0
- package/lib/loading/index.d.mts +5 -0
- package/lib/loading/index.d.ts +5 -3
- package/lib/loading/index.js +27 -11
- package/lib/loading/index.mjs +9 -0
- package/lib/loading2/index.d.mts +5 -0
- package/lib/loading2/index.d.ts +5 -3
- package/lib/loading2/index.js +27 -11
- package/lib/loading2/index.mjs +9 -0
- package/lib/loading3/index.d.mts +5 -0
- package/lib/loading3/index.d.ts +5 -3
- package/lib/loading3/index.js +27 -11
- 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 -3
- package/lib/lock/index.js +27 -11
- package/lib/lock/index.mjs +9 -0
- package/lib/mail/index.d.mts +5 -0
- package/lib/mail/index.d.ts +5 -3
- package/lib/mail/index.js +27 -11
- package/lib/mail/index.mjs +9 -0
- package/lib/maximizeMinimize/index.d.mts +5 -0
- package/lib/maximizeMinimize/index.d.ts +5 -3
- package/lib/maximizeMinimize/index.js +27 -11
- package/lib/maximizeMinimize/index.mjs +9 -0
- package/lib/maximizeMinimize2/index.d.mts +5 -0
- package/lib/maximizeMinimize2/index.d.ts +5 -3
- package/lib/maximizeMinimize2/index.js +27 -11
- package/lib/maximizeMinimize2/index.mjs +9 -0
- package/lib/menu/index.d.mts +5 -0
- package/lib/menu/index.d.ts +5 -3
- package/lib/menu/index.js +27 -11
- package/lib/menu/index.mjs +9 -0
- package/lib/menu2/index.d.mts +5 -0
- package/lib/menu2/index.d.ts +5 -3
- package/lib/menu2/index.js +27 -11
- package/lib/menu2/index.mjs +9 -0
- package/lib/menu3/index.d.mts +5 -0
- package/lib/menu3/index.d.ts +5 -3
- package/lib/menu3/index.js +27 -11
- package/lib/menu3/index.mjs +9 -0
- package/lib/menu4/index.d.mts +5 -0
- package/lib/menu4/index.d.ts +5 -3
- package/lib/menu4/index.js +27 -11
- package/lib/menu4/index.mjs +9 -0
- package/lib/microphone/index.d.mts +5 -0
- package/lib/microphone/index.d.ts +5 -3
- package/lib/microphone/index.js +27 -11
- package/lib/microphone/index.mjs +9 -0
- package/lib/microphone2/index.d.mts +5 -0
- package/lib/microphone2/index.d.ts +5 -3
- package/lib/microphone2/index.js +27 -11
- package/lib/microphone2/index.mjs +9 -0
- package/lib/notification/index.d.mts +5 -0
- package/lib/notification/index.d.ts +5 -3
- package/lib/notification/index.js +27 -11
- package/lib/notification/index.mjs +9 -0
- package/lib/notification2/index.d.mts +5 -0
- package/lib/notification2/index.d.ts +5 -3
- package/lib/notification2/index.js +27 -11
- 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 -3
- package/lib/playPause/index.js +27 -11
- package/lib/playPause/index.mjs +9 -0
- package/lib/playPauseCircle/index.d.mts +5 -0
- package/lib/playPauseCircle/index.d.ts +5 -3
- package/lib/playPauseCircle/index.js +27 -11
- package/lib/playPauseCircle/index.mjs +9 -0
- package/lib/plusToX/index.d.mts +5 -0
- package/lib/plusToX/index.d.ts +5 -3
- package/lib/plusToX/index.js +27 -11
- package/lib/plusToX/index.mjs +9 -0
- package/lib/pocket/index.d.mts +5 -0
- package/lib/pocket/index.d.ts +5 -3
- package/lib/pocket/index.js +27 -11
- package/lib/pocket/index.mjs +9 -0
- package/lib/radioButton/index.d.mts +5 -0
- package/lib/radioButton/index.d.ts +5 -3
- package/lib/radioButton/index.js +27 -11
- 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 -3
- package/lib/scrollDown/index.js +27 -11
- package/lib/scrollDown/index.mjs +9 -0
- package/lib/searchToX/index.d.mts +5 -0
- package/lib/searchToX/index.d.ts +5 -3
- package/lib/searchToX/index.js +27 -11
- package/lib/searchToX/index.mjs +9 -0
- package/lib/settings/index.d.mts +5 -0
- package/lib/settings/index.d.ts +5 -3
- package/lib/settings/index.js +27 -11
- package/lib/settings/index.mjs +9 -0
- package/lib/settings2/index.d.mts +5 -0
- package/lib/settings2/index.d.ts +5 -3
- package/lib/settings2/index.js +27 -11
- package/lib/settings2/index.mjs +9 -0
- package/lib/share/index.d.mts +5 -0
- package/lib/share/index.d.ts +5 -3
- package/lib/share/index.js +27 -11
- package/lib/share/index.mjs +9 -0
- package/lib/skipBack/index.d.mts +5 -0
- package/lib/skipBack/index.d.ts +5 -3
- package/lib/skipBack/index.js +27 -11
- package/lib/skipBack/index.mjs +9 -0
- package/lib/skipForward/index.d.mts +5 -0
- package/lib/skipForward/index.d.ts +5 -3
- package/lib/skipForward/index.js +27 -11
- package/lib/skipForward/index.mjs +9 -0
- package/lib/star/index.d.mts +5 -0
- package/lib/star/index.d.ts +5 -3
- package/lib/star/index.js +27 -11
- package/lib/star/index.mjs +9 -0
- package/lib/thumbUp/index.d.mts +5 -0
- package/lib/thumbUp/index.d.ts +5 -3
- package/lib/thumbUp/index.js +27 -11
- package/lib/thumbUp/index.mjs +9 -0
- package/lib/toggle/index.d.mts +5 -0
- package/lib/toggle/index.d.ts +5 -3
- package/lib/toggle/index.js +27 -11
- package/lib/toggle/index.mjs +9 -0
- package/lib/trash/index.d.mts +5 -0
- package/lib/trash/index.d.ts +5 -3
- package/lib/trash/index.js +27 -11
- package/lib/trash/index.mjs +9 -0
- package/lib/trash2/index.d.mts +5 -0
- package/lib/trash2/index.d.ts +5 -3
- package/lib/trash2/index.js +27 -11
- package/lib/trash2/index.mjs +9 -0
- package/lib/twitter/index.d.mts +5 -0
- package/lib/twitter/index.d.ts +5 -3
- package/lib/twitter/index.js +27 -11
- package/lib/twitter/index.mjs +9 -0
- package/lib/userMinus/index.d.mts +5 -0
- package/lib/userMinus/index.d.ts +5 -3
- package/lib/userMinus/index.js +27 -11
- package/lib/userMinus/index.mjs +9 -0
- package/lib/userPlus/index.d.mts +5 -0
- package/lib/userPlus/index.d.ts +5 -3
- package/lib/userPlus/index.js +27 -11
- package/lib/userPlus/index.mjs +9 -0
- package/lib/userX/index.d.mts +5 -0
- package/lib/userX/index.d.ts +5 -3
- package/lib/userX/index.js +27 -11
- package/lib/userX/index.mjs +9 -0
- package/lib/video/index.d.mts +5 -0
- package/lib/video/index.d.ts +5 -3
- package/lib/video/index.js +27 -11
- package/lib/video/index.mjs +9 -0
- package/lib/video2/index.d.mts +5 -0
- package/lib/video2/index.d.ts +5 -3
- package/lib/video2/index.js +27 -11
- package/lib/video2/index.mjs +9 -0
- package/lib/visibility/index.d.mts +5 -0
- package/lib/visibility/index.d.ts +5 -3
- package/lib/visibility/index.js +27 -11
- package/lib/visibility/index.mjs +9 -0
- package/lib/visibility2/index.d.mts +5 -0
- package/lib/visibility2/index.d.ts +5 -3
- package/lib/visibility2/index.js +27 -11
- 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 -3
- package/lib/volume/index.js +27 -11
- package/lib/volume/index.mjs +9 -0
- package/lib/youtube/index.d.mts +5 -0
- package/lib/youtube/index.d.ts +5 -3
- package/lib/youtube/index.js +27 -11
- package/lib/youtube/index.mjs +9 -0
- package/lib/youtube2/index.d.mts +5 -0
- package/lib/youtube2/index.d.ts +5 -3
- package/lib/youtube2/index.js +27 -11
- package/lib/youtube2/index.mjs +9 -0
- package/lib/zoomIn/index.d.mts +5 -0
- package/lib/zoomIn/index.d.ts +5 -3
- package/lib/zoomIn/index.js +27 -11
- package/lib/zoomIn/index.mjs +9 -0
- package/lib/zoomOut/index.d.mts +5 -0
- package/lib/zoomOut/index.d.ts +5 -3
- package/lib/zoomOut/index.js +27 -11
- package/lib/zoomOut/index.mjs +9 -0
- package/package.json +55 -68
- package/bin/addAnimationFiles.sh +0 -28
- package/bin/generateStories.sh +0 -34
- package/lib/activity/activity.json +0 -1
- package/lib/airplay/airplay.json +0 -1
- package/lib/alertCircle/alertCircle.json +0 -1
- package/lib/alertOctagon/alertOctagon.json +0 -1
- package/lib/alertTriangle/alertTriangle.json +0 -1
- package/lib/archive/archive.json +0 -1
- package/lib/arrowDown/arrowDown.json +0 -1
- package/lib/arrowDownCircle/arrowDownCircle.json +0 -1
- package/lib/arrowLeftCircle/arrowLeftCircle.json +0 -1
- package/lib/arrowRightCircle/arrowRightCircle.json +0 -1
- package/lib/arrowUp/arrowUp.json +0 -1
- package/lib/arrowUpCircle/arrowUpCircle.json +0 -1
- package/lib/behance/behance.json +0 -1
- package/lib/bookmark/bookmark.json +0 -1
- package/lib/calendar/calendar.json +0 -1
- package/lib/checkBox/checkBox.json +0 -1
- package/lib/checkmark/checkmark.json +0 -1
- package/lib/codepen/codepen.json +0 -1
- package/lib/copy/copy.json +0 -1
- package/lib/download/download.json +0 -1
- package/lib/dribbble/dribbble.json +0 -1
- package/lib/edit/edit.json +0 -1
- package/lib/error/error.json +0 -1
- package/lib/explore/explore.json +0 -1
- package/lib/facebook/facebook.json +0 -1
- package/lib/folder/folder.json +0 -1
- package/lib/github/github.json +0 -1
- package/lib/heart/heart.json +0 -1
- package/lib/help/help.json +0 -1
- package/lib/home/home.json +0 -1
- package/lib/infinity/infinity.json +0 -1
- package/lib/info/info.json +0 -1
- package/lib/instagram/instagram.json +0 -1
- package/lib/linkedin/linkedin.json +0 -1
- package/lib/loading/loading.json +0 -1
- package/lib/loading2/loading2.json +0 -1
- package/lib/loading3/loading3.json +0 -1
- package/lib/lock/lock.json +0 -1
- package/lib/mail/mail.json +0 -1
- package/lib/maximizeMinimize/maximizeMinimize.json +0 -1
- package/lib/maximizeMinimize2/maximizeMinimize2.json +0 -1
- package/lib/menu/menu.json +0 -1
- package/lib/menu2/menu2.json +0 -1
- package/lib/menu3/menu3.json +0 -1
- package/lib/menu4/menu4.json +0 -1
- package/lib/microphone/microphone.json +0 -1
- package/lib/microphone2/microphone2.json +0 -1
- package/lib/notification/notification.json +0 -1
- package/lib/notification2/notification2.json +0 -1
- package/lib/playPause/playPause.json +0 -1
- package/lib/playPauseCircle/playPauseCircle.json +0 -1
- package/lib/plusToX/plusToX.json +0 -1
- package/lib/pocket/pocket.json +0 -1
- package/lib/radioButton/radioButton.json +0 -1
- package/lib/scrollDown/scrollDown.json +0 -1
- package/lib/searchToX/searchToX.json +0 -1
- package/lib/settings/settings.json +0 -1
- package/lib/settings2/settings2.json +0 -1
- package/lib/share/share.json +0 -1
- package/lib/skipBack/skipBack.json +0 -1
- package/lib/skipForward/skipForward.json +0 -1
- package/lib/star/star.json +0 -1
- package/lib/thumbUp/thumbUp.json +0 -1
- package/lib/toggle/toggle.json +0 -1
- package/lib/trash/trash.json +0 -1
- package/lib/trash2/trash2.json +0 -1
- package/lib/twitter/twitter.json +0 -1
- package/lib/userMinus/userMinus.json +0 -1
- package/lib/userPlus/userPlus.json +0 -1
- package/lib/userX/userX.json +0 -1
- package/lib/video/video.json +0 -1
- package/lib/video2/video2.json +0 -1
- package/lib/visibility/visibility.json +0 -1
- package/lib/visibility2/visibility2.json +0 -1
- package/lib/volume/volume.json +0 -1
- package/lib/youtube/youtube.json +0 -1
- package/lib/youtube2/youtube2.json +0 -1
- package/lib/zoomIn/zoomIn.json +0 -1
- package/lib/zoomOut/zoomOut.json +0 -1
- package/stories/controlled.stories.d.ts +0 -60
- package/stories/controlled.stories.js +0 -231
- package/stories/generated.stories.d.ts +0 -20
- package/stories/generated.stories.js +0 -977
- package/stories/variants.stories.d.ts +0 -70
- package/stories/variants.stories.js +0 -196
- package/typings.d.ts +0 -6
- package/utils/constants.d.ts +0 -6
- package/utils/constants.js +0 -1
- package/utils/getEffect.d.ts +0 -3
- package/utils/getEffect.js +0 -94
- package/utils/getEvents.d.ts +0 -12
- package/utils/getEvents.js +0 -96
- package/utils/index.d.ts +0 -3
- package/utils/index.js +0 -23
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
declare const _default: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: React.FC<{
|
|
5
|
-
animation: import("../utils").Animation;
|
|
6
|
-
reverse?: boolean | undefined;
|
|
7
|
-
strokeColor?: string | undefined;
|
|
8
|
-
fillColor?: string | undefined;
|
|
9
|
-
pathCss?: string | undefined;
|
|
10
|
-
options?: Partial<import("lottie-web").AnimationConfig> | undefined;
|
|
11
|
-
size?: number | undefined;
|
|
12
|
-
loop?: number | boolean | undefined;
|
|
13
|
-
autoplay?: boolean | undefined;
|
|
14
|
-
speed?: number | undefined;
|
|
15
|
-
wrapperStyle?: React.CSSProperties | undefined;
|
|
16
|
-
render?: ((eventProps: any, animationProps: any) => React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)>) | undefined;
|
|
17
|
-
} & React.HTMLProps<HTMLDivElement>>;
|
|
18
|
-
decorators: any[];
|
|
19
|
-
};
|
|
20
|
-
export default _default;
|
|
21
|
-
export declare const Stroke: {
|
|
22
|
-
(): JSX.Element;
|
|
23
|
-
story: {
|
|
24
|
-
parameters: {
|
|
25
|
-
info: {
|
|
26
|
-
text: string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
export declare const Fill: {
|
|
32
|
-
(): JSX.Element;
|
|
33
|
-
story: {
|
|
34
|
-
parameters: {
|
|
35
|
-
info: {
|
|
36
|
-
text: string;
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
export declare const CustomCSS: {
|
|
42
|
-
(): JSX.Element;
|
|
43
|
-
story: {
|
|
44
|
-
parameters: {
|
|
45
|
-
info: {
|
|
46
|
-
text: string;
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
export declare const Size: {
|
|
52
|
-
(): JSX.Element;
|
|
53
|
-
story: {
|
|
54
|
-
parameters: {
|
|
55
|
-
info: {
|
|
56
|
-
text: string;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
export declare const WrapperElement: {
|
|
62
|
-
(): JSX.Element;
|
|
63
|
-
story: {
|
|
64
|
-
parameters: {
|
|
65
|
-
info: {
|
|
66
|
-
text: string;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
};
|
|
@@ -1,196 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.WrapperElement = exports.Size = exports.CustomCSS = exports.Fill = exports.Stroke = exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _addonInfo = require("@storybook/addon-info");
|
|
11
|
-
|
|
12
|
-
var _activity = _interopRequireDefault(require("../lib/activity"));
|
|
13
|
-
|
|
14
|
-
var _youtube = _interopRequireDefault(require("../lib/youtube"));
|
|
15
|
-
|
|
16
|
-
var _star = _interopRequireDefault(require("../lib/star"));
|
|
17
|
-
|
|
18
|
-
var _heart = _interopRequireDefault(require("../lib/heart"));
|
|
19
|
-
|
|
20
|
-
var _ = _interopRequireDefault(require(".."));
|
|
21
|
-
|
|
22
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
-
|
|
24
|
-
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
25
|
-
|
|
26
|
-
var _default = {
|
|
27
|
-
title: 'Variants',
|
|
28
|
-
component: _["default"],
|
|
29
|
-
decorators: [_addonInfo.withInfo]
|
|
30
|
-
};
|
|
31
|
-
exports["default"] = _default;
|
|
32
|
-
|
|
33
|
-
var Stroke = function Stroke() {
|
|
34
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
35
|
-
style: {
|
|
36
|
-
display: 'flex',
|
|
37
|
-
flexWrap: 'wrap'
|
|
38
|
-
}
|
|
39
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
40
|
-
style: {
|
|
41
|
-
padding: '20px'
|
|
42
|
-
}
|
|
43
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, "activity"), /*#__PURE__*/_react["default"].createElement(_["default"], {
|
|
44
|
-
strokeColor: "green",
|
|
45
|
-
size: 40,
|
|
46
|
-
wrapperStyle: {
|
|
47
|
-
marginTop: '5px'
|
|
48
|
-
},
|
|
49
|
-
animation: _activity["default"]
|
|
50
|
-
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
51
|
-
style: {
|
|
52
|
-
padding: '20px'
|
|
53
|
-
}
|
|
54
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, "activity"), /*#__PURE__*/_react["default"].createElement(_["default"], {
|
|
55
|
-
strokeColor: "red",
|
|
56
|
-
size: 40,
|
|
57
|
-
wrapperStyle: {
|
|
58
|
-
marginTop: '5px'
|
|
59
|
-
},
|
|
60
|
-
animation: _youtube["default"]
|
|
61
|
-
})));
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
exports.Stroke = Stroke;
|
|
65
|
-
Stroke.story = {
|
|
66
|
-
parameters: {
|
|
67
|
-
info: {
|
|
68
|
-
text: "\n ~~~js\n export const Stroke = () => (\n <div style={{ display: 'flex', flexWrap: 'wrap' }}>\n <div style={{ padding: '20px' }}>\n <span>activity</span>\n <UseAnimation\n strokeColor=\"green\"\n size={40}\n wrapperStyle={{ marginTop: '5px' }}\n animation={activity}\n />\n </div>\n <div style={{ padding: '20px' }}>\n <span>activity</span>\n <UseAnimation\n strokeColor=\"red\"\n size={40}\n wrapperStyle={{ marginTop: '5px' }}\n animation={youtube}\n />\n </div>\n </div>\n );\n ~~~\n "
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
var Fill = function Fill() {
|
|
74
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
75
|
-
style: {
|
|
76
|
-
display: 'flex',
|
|
77
|
-
flexWrap: 'wrap'
|
|
78
|
-
}
|
|
79
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
80
|
-
style: {
|
|
81
|
-
padding: '20px'
|
|
82
|
-
}
|
|
83
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, "star"), /*#__PURE__*/_react["default"].createElement(_["default"], {
|
|
84
|
-
fillColor: "green",
|
|
85
|
-
size: 40,
|
|
86
|
-
wrapperStyle: {
|
|
87
|
-
marginTop: '5px'
|
|
88
|
-
},
|
|
89
|
-
animation: _star["default"]
|
|
90
|
-
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
91
|
-
style: {
|
|
92
|
-
padding: '20px'
|
|
93
|
-
}
|
|
94
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, "heart"), /*#__PURE__*/_react["default"].createElement(_["default"], {
|
|
95
|
-
fillColor: "red",
|
|
96
|
-
size: 40,
|
|
97
|
-
wrapperStyle: {
|
|
98
|
-
marginTop: '5px'
|
|
99
|
-
},
|
|
100
|
-
animation: _heart["default"]
|
|
101
|
-
})));
|
|
102
|
-
};
|
|
103
|
-
|
|
104
|
-
exports.Fill = Fill;
|
|
105
|
-
Fill.story = {
|
|
106
|
-
parameters: {
|
|
107
|
-
info: {
|
|
108
|
-
text: "\n ~~~js\n export const Fill = () => (\n <div style={{ display: 'flex', flexWrap: 'wrap' }}>\n <div style={{ padding: '20px' }}>\n <span>star</span>\n <UseAnimation\n fillColor=\"green\"\n size={40}\n wrapperStyle={{ marginTop: '5px' }}\n animation={star}\n />\n </div>\n <div style={{ padding: '20px' }}>\n <span>heart</span>\n <UseAnimation\n fillColor=\"red\"\n size={40}\n wrapperStyle={{ marginTop: '5px' }}\n animation={heart}\n />\n </div>\n </div>\n );\n ~~~\n "
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
var CustomCSS = function CustomCSS() {
|
|
114
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
115
|
-
style: {
|
|
116
|
-
display: 'flex',
|
|
117
|
-
flexWrap: 'wrap'
|
|
118
|
-
}
|
|
119
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
120
|
-
style: {
|
|
121
|
-
padding: '20px'
|
|
122
|
-
}
|
|
123
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, "activity"), /*#__PURE__*/_react["default"].createElement(_["default"], {
|
|
124
|
-
size: 40,
|
|
125
|
-
pathCss: "stroke: purple; stroke-width: 2%;",
|
|
126
|
-
wrapperStyle: {
|
|
127
|
-
marginTop: '5px'
|
|
128
|
-
},
|
|
129
|
-
animation: _activity["default"]
|
|
130
|
-
})));
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
exports.CustomCSS = CustomCSS;
|
|
134
|
-
CustomCSS.story = {
|
|
135
|
-
parameters: {
|
|
136
|
-
info: {
|
|
137
|
-
text: "\n ~~~js\n export const CustomCSS = () => (\n <div style={{ display: 'flex', flexWrap: 'wrap' }}>\n <div style={{ padding: '20px' }}>\n <span>activity</span>\n <UseAnimation\n size={40}\n pathCss=\"stroke: purple; stroke-width: 2%;\"\n wrapperStyle={{ marginTop: '5px' }}\n animation={activity}\n />\n </div>\n </div>\n );\n ~~~\n "
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
var Size = function Size() {
|
|
143
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
144
|
-
style: {
|
|
145
|
-
display: 'flex',
|
|
146
|
-
flexWrap: 'wrap'
|
|
147
|
-
}
|
|
148
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
149
|
-
style: {
|
|
150
|
-
padding: '20px'
|
|
151
|
-
}
|
|
152
|
-
}, /*#__PURE__*/_react["default"].createElement("span", null, "activity"), /*#__PURE__*/_react["default"].createElement(_["default"], {
|
|
153
|
-
size: 60,
|
|
154
|
-
wrapperStyle: {
|
|
155
|
-
marginTop: '5px'
|
|
156
|
-
},
|
|
157
|
-
animation: _activity["default"]
|
|
158
|
-
})));
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
exports.Size = Size;
|
|
162
|
-
Size.story = {
|
|
163
|
-
parameters: {
|
|
164
|
-
info: {
|
|
165
|
-
text: "\n ~~~js\n export const Size = () => (\n <div style={{ display: 'flex', flexWrap: 'wrap' }}>\n <div style={{ padding: '20px' }}>\n <span>activity</span>\n <UseAnimation size={60} wrapperStyle={{ marginTop: '5px' }} animation={activity} />\n </div>\n </div>\n );\n ~~~\n "
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
var WrapperElement = function WrapperElement() {
|
|
171
|
-
return /*#__PURE__*/_react["default"].createElement(_["default"], {
|
|
172
|
-
animation: _heart["default"],
|
|
173
|
-
size: 60,
|
|
174
|
-
onClick: function onClick() {
|
|
175
|
-
// eslint-disable-next-line
|
|
176
|
-
console.log('additional onClick cb is working');
|
|
177
|
-
},
|
|
178
|
-
render: function render(eventProps, animationProps) {
|
|
179
|
-
return /*#__PURE__*/_react["default"].createElement("button", _extends({
|
|
180
|
-
style: {
|
|
181
|
-
padding: '20px'
|
|
182
|
-
},
|
|
183
|
-
type: "button"
|
|
184
|
-
}, eventProps), /*#__PURE__*/_react["default"].createElement("div", animationProps));
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
exports.WrapperElement = WrapperElement;
|
|
190
|
-
WrapperElement.story = {
|
|
191
|
-
parameters: {
|
|
192
|
-
info: {
|
|
193
|
-
text: "\n ~~~js\n export const WrapperElement = () => {\n return (\n <UseAnimation\n animation={heart}\n size={60}\n onClick={() => {\n // eslint-disable-next-line\n console.log('additional onClick cb is working');\n }}\n render={(eventProps, animationProps) => (\n <button style={{ padding: '20px' }} type=\"button\" {...eventProps}>\n <div {...animationProps} />\n </button>\n )}\n />\n );\n };\n ~~~\n "
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
};
|
package/typings.d.ts
DELETED
package/utils/constants.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export declare type AnimationEffect = 'CLICK_PLAY_AND_BACKWARDS' | 'HOVER_PLAY_AND_STOP' | 'HOVER_PLAY_AND_BACKWARDS' | 'CLICK_PLAY' | 'LOOP_PLAY' | 'CLICK_PLAY_AND_SEGMENTS';
|
|
2
|
-
export declare type Animation = {
|
|
3
|
-
animationData: any;
|
|
4
|
-
animationKey: AnimationKey;
|
|
5
|
-
};
|
|
6
|
-
export declare type AnimationKey = 'activity' | 'airplay' | 'alertCircle' | 'alertOctagon' | 'alertTriangle' | 'archive' | 'arrowDown' | 'arrowDownCircle' | 'arrowLeftCircle' | 'arrowRightCircle' | 'arrowUp' | 'arrowUpCircle' | 'bookmark' | 'behance' | 'calendar' | 'checkBox' | 'checkmark' | 'codepen' | 'copy' | 'download' | 'dribbble' | 'edit' | 'error' | 'explore' | 'facebook' | 'folder' | 'github' | 'heart' | 'help' | 'home' | 'infinity' | 'info' | 'instagram' | 'linkedin' | 'loading' | 'loading2' | 'loading3' | 'lock' | 'mail' | 'maximizeMinimize' | 'maximizeMinimize2' | 'menu' | 'menu2' | 'menu3' | 'menu4' | 'microphone' | 'microphone2' | 'notification' | 'notification2' | 'playPause' | 'playPauseCircle' | 'plusToX' | 'pocket' | 'radioButton' | 'scrollDown' | 'searchToX' | 'settings' | 'settings2' | 'share' | 'skipBack' | 'skipForward' | 'star' | 'thumbUp' | 'toggle' | 'trash' | 'trash2' | 'twitter' | 'userMinus' | 'userPlus' | 'userX' | 'video' | 'video2' | 'visibility' | 'visibility2' | 'volume' | 'youtube' | 'youtube2' | 'zoomIn' | 'zoomOut';
|
package/utils/constants.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
package/utils/getEffect.d.ts
DELETED
package/utils/getEffect.js
DELETED
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var 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
|
-
var getEffect = function getEffect(animationKey) {
|
|
90
|
-
return animations[animationKey] || '';
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
var _default = getEffect;
|
|
94
|
-
exports["default"] = _default;
|
package/utils/getEvents.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { AnimationEffect } from './constants';
|
|
2
|
-
declare const getEvents: ({ animation, reverse, animEffect, }: {
|
|
3
|
-
animation: any;
|
|
4
|
-
reverse: boolean;
|
|
5
|
-
animEffect: AnimationEffect;
|
|
6
|
-
}) => {
|
|
7
|
-
onClick: () => any;
|
|
8
|
-
} | {
|
|
9
|
-
onMouseEnter: () => any;
|
|
10
|
-
onMouseLeave: () => any;
|
|
11
|
-
};
|
|
12
|
-
export default getEvents;
|
package/utils/getEvents.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var getClickAndPlaySegmentsEvents = function getClickAndPlaySegmentsEvents(animation) {
|
|
9
|
-
return {
|
|
10
|
-
onClick: function onClick() {
|
|
11
|
-
return animation.playSegments([0, 60], true);
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
var getClickPlayEvents = function getClickPlayEvents(animation) {
|
|
17
|
-
return {
|
|
18
|
-
onClick: function onClick() {
|
|
19
|
-
animation.stop();
|
|
20
|
-
animation.play();
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
var getHoverPlayAndStop = function getHoverPlayAndStop(animation) {
|
|
26
|
-
return {
|
|
27
|
-
onMouseEnter: function onMouseEnter() {
|
|
28
|
-
return animation.play();
|
|
29
|
-
},
|
|
30
|
-
onMouseLeave: function onMouseLeave() {
|
|
31
|
-
return animation.stop();
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
var getHoverPlayBackwardsEvents = function getHoverPlayBackwardsEvents(animation) {
|
|
37
|
-
return {
|
|
38
|
-
onMouseEnter: function onMouseEnter() {
|
|
39
|
-
animation.setDirection(1);
|
|
40
|
-
animation.play();
|
|
41
|
-
},
|
|
42
|
-
onMouseLeave: function onMouseLeave() {
|
|
43
|
-
animation.setDirection(-1);
|
|
44
|
-
animation.play();
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
var getClickAndPlayBackwardsEvents = function getClickAndPlayBackwardsEvents(animation, reverse) {
|
|
50
|
-
var directionMenu = 1; // EG CHECKBOX WHICH NEED TO BE CHECKED AS INITIAL STATE, LET'S PLAY THE ANIMATION ASAP AUTOMATICALLY
|
|
51
|
-
|
|
52
|
-
if (reverse) {
|
|
53
|
-
animation.setDirection(directionMenu);
|
|
54
|
-
animation.play();
|
|
55
|
-
directionMenu *= -1;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
return {
|
|
59
|
-
onClick: function onClick() {
|
|
60
|
-
animation.setDirection(directionMenu);
|
|
61
|
-
animation.play();
|
|
62
|
-
directionMenu *= -1;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
|
|
67
|
-
var getEvents = function getEvents(_ref) {
|
|
68
|
-
var animation = _ref.animation,
|
|
69
|
-
reverse = _ref.reverse,
|
|
70
|
-
animEffect = _ref.animEffect;
|
|
71
|
-
|
|
72
|
-
if (animEffect === 'CLICK_PLAY_AND_SEGMENTS') {
|
|
73
|
-
return getClickAndPlaySegmentsEvents(animation);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (animEffect === 'CLICK_PLAY') {
|
|
77
|
-
return getClickPlayEvents(animation);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
if (animEffect === 'HOVER_PLAY_AND_STOP') {
|
|
81
|
-
return getHoverPlayAndStop(animation);
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
if (animEffect === 'HOVER_PLAY_AND_BACKWARDS') {
|
|
85
|
-
return getHoverPlayBackwardsEvents(animation);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if (animEffect === 'CLICK_PLAY_AND_BACKWARDS') {
|
|
89
|
-
return getClickAndPlayBackwardsEvents(animation, reverse);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
return getClickPlayEvents(animation);
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
var _default = getEvents;
|
|
96
|
-
exports["default"] = _default;
|
package/utils/index.d.ts
DELETED
package/utils/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "getEffect", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function get() {
|
|
9
|
-
return _getEffect["default"];
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "getEvents", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function get() {
|
|
15
|
-
return _getEvents["default"];
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
var _getEffect = _interopRequireDefault(require("./getEffect"));
|
|
20
|
-
|
|
21
|
-
var _getEvents = _interopRequireDefault(require("./getEvents"));
|
|
22
|
-
|
|
23
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|