react-useanimations 2.0.9-RC → 2.0.9-RC1

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.
Files changed (355) hide show
  1. package/{src/bin → bin}/addAnimationFiles.sh +0 -0
  2. package/{src/bin → bin}/generateStories.sh +0 -0
  3. package/index.d.ts +19 -0
  4. package/index.js +197 -0
  5. package/{src/lib → lib}/activity/activity.json +0 -0
  6. package/lib/activity/index.d.ts +3 -0
  7. package/lib/activity/index.js +16 -0
  8. package/{src/lib → lib}/airplay/airplay.json +0 -0
  9. package/lib/airplay/index.d.ts +3 -0
  10. package/lib/airplay/index.js +16 -0
  11. package/{src/lib → lib}/alertCircle/alertCircle.json +0 -0
  12. package/lib/alertCircle/index.d.ts +3 -0
  13. package/lib/alertCircle/index.js +16 -0
  14. package/{src/lib → lib}/alertOctagon/alertOctagon.json +0 -0
  15. package/lib/alertOctagon/index.d.ts +3 -0
  16. package/lib/alertOctagon/index.js +16 -0
  17. package/{src/lib → lib}/alertTriangle/alertTriangle.json +0 -0
  18. package/lib/alertTriangle/index.d.ts +3 -0
  19. package/lib/alertTriangle/index.js +16 -0
  20. package/{src/lib → lib}/archive/archive.json +0 -0
  21. package/lib/archive/index.d.ts +3 -0
  22. package/lib/archive/index.js +16 -0
  23. package/{src/lib → lib}/arrowDown/arrowDown.json +0 -0
  24. package/lib/arrowDown/index.d.ts +3 -0
  25. package/lib/arrowDown/index.js +16 -0
  26. package/{src/lib → lib}/arrowDownCircle/arrowDownCircle.json +0 -0
  27. package/lib/arrowDownCircle/index.d.ts +3 -0
  28. package/lib/arrowDownCircle/index.js +16 -0
  29. package/{src/lib → lib}/arrowLeftCircle/arrowLeftCircle.json +0 -0
  30. package/lib/arrowLeftCircle/index.d.ts +3 -0
  31. package/lib/arrowLeftCircle/index.js +16 -0
  32. package/{src/lib → lib}/arrowRightCircle/arrowRightCircle.json +0 -0
  33. package/lib/arrowRightCircle/index.d.ts +3 -0
  34. package/lib/arrowRightCircle/index.js +16 -0
  35. package/{src/lib → lib}/arrowUp/arrowUp.json +0 -0
  36. package/lib/arrowUp/index.d.ts +3 -0
  37. package/lib/arrowUp/index.js +16 -0
  38. package/{src/lib → lib}/arrowUpCircle/arrowUpCircle.json +0 -0
  39. package/lib/arrowUpCircle/index.d.ts +3 -0
  40. package/lib/arrowUpCircle/index.js +16 -0
  41. package/{src/lib → lib}/behance/behance.json +0 -0
  42. package/lib/behance/index.d.ts +3 -0
  43. package/lib/behance/index.js +16 -0
  44. package/{src/lib → lib}/bookmark/bookmark.json +0 -0
  45. package/lib/bookmark/index.d.ts +3 -0
  46. package/lib/bookmark/index.js +16 -0
  47. package/{src/lib → lib}/calendar/calendar.json +0 -0
  48. package/lib/calendar/index.d.ts +3 -0
  49. package/lib/calendar/index.js +16 -0
  50. package/{src/lib → lib}/checkBox/checkBox.json +0 -0
  51. package/lib/checkBox/index.d.ts +3 -0
  52. package/lib/checkBox/index.js +16 -0
  53. package/{src/lib → lib}/checkmark/checkmark.json +0 -0
  54. package/lib/checkmark/index.d.ts +3 -0
  55. package/lib/checkmark/index.js +16 -0
  56. package/{src/lib → lib}/codepen/codepen.json +0 -0
  57. package/lib/codepen/index.d.ts +3 -0
  58. package/lib/codepen/index.js +16 -0
  59. package/{src/lib → lib}/copy/copy.json +0 -0
  60. package/lib/copy/index.d.ts +3 -0
  61. package/lib/copy/index.js +16 -0
  62. package/{src/lib → lib}/download/download.json +0 -0
  63. package/lib/download/index.d.ts +3 -0
  64. package/lib/download/index.js +16 -0
  65. package/{src/lib → lib}/dribbble/dribbble.json +0 -0
  66. package/lib/dribbble/index.d.ts +3 -0
  67. package/lib/dribbble/index.js +16 -0
  68. package/{src/lib → lib}/edit/edit.json +0 -0
  69. package/lib/edit/index.d.ts +3 -0
  70. package/lib/edit/index.js +16 -0
  71. package/{src/lib → lib}/error/error.json +0 -0
  72. package/lib/error/index.d.ts +3 -0
  73. package/lib/error/index.js +16 -0
  74. package/{src/lib → lib}/explore/explore.json +0 -0
  75. package/lib/explore/index.d.ts +3 -0
  76. package/lib/explore/index.js +16 -0
  77. package/{src/lib → lib}/facebook/facebook.json +0 -0
  78. package/lib/facebook/index.d.ts +3 -0
  79. package/lib/facebook/index.js +16 -0
  80. package/{src/lib → lib}/folder/folder.json +0 -0
  81. package/lib/folder/index.d.ts +3 -0
  82. package/lib/folder/index.js +16 -0
  83. package/{src/lib → lib}/github/github.json +0 -0
  84. package/lib/github/index.d.ts +3 -0
  85. package/lib/github/index.js +16 -0
  86. package/{src/lib → lib}/heart/heart.json +0 -0
  87. package/lib/heart/index.d.ts +3 -0
  88. package/lib/heart/index.js +16 -0
  89. package/{src/lib → lib}/help/help.json +0 -0
  90. package/lib/help/index.d.ts +3 -0
  91. package/lib/help/index.js +16 -0
  92. package/{src/lib → lib}/home/home.json +0 -0
  93. package/lib/home/index.d.ts +3 -0
  94. package/lib/home/index.js +16 -0
  95. package/lib/infinity/index.d.ts +3 -0
  96. package/lib/infinity/index.js +16 -0
  97. package/{src/lib → lib}/infinity/infinity.json +0 -0
  98. package/lib/info/index.d.ts +3 -0
  99. package/lib/info/index.js +16 -0
  100. package/{src/lib → lib}/info/info.json +0 -0
  101. package/lib/instagram/index.d.ts +3 -0
  102. package/lib/instagram/index.js +16 -0
  103. package/{src/lib → lib}/instagram/instagram.json +0 -0
  104. package/lib/linkedin/index.d.ts +3 -0
  105. package/lib/linkedin/index.js +16 -0
  106. package/{src/lib → lib}/linkedin/linkedin.json +0 -0
  107. package/lib/loading/index.d.ts +3 -0
  108. package/lib/loading/index.js +16 -0
  109. package/{src/lib → lib}/loading/loading.json +0 -0
  110. package/lib/loading2/index.d.ts +3 -0
  111. package/lib/loading2/index.js +16 -0
  112. package/{src/lib → lib}/loading2/loading2.json +0 -0
  113. package/lib/loading3/index.d.ts +3 -0
  114. package/lib/loading3/index.js +16 -0
  115. package/{src/lib → lib}/loading3/loading3.json +0 -0
  116. package/lib/lock/index.d.ts +3 -0
  117. package/lib/lock/index.js +16 -0
  118. package/{src/lib → lib}/lock/lock.json +0 -0
  119. package/lib/mail/index.d.ts +3 -0
  120. package/lib/mail/index.js +16 -0
  121. package/{src/lib → lib}/mail/mail.json +0 -0
  122. package/lib/maximizeMinimize/index.d.ts +3 -0
  123. package/lib/maximizeMinimize/index.js +16 -0
  124. package/{src/lib → lib}/maximizeMinimize/maximizeMinimize.json +0 -0
  125. package/lib/maximizeMinimize2/index.d.ts +3 -0
  126. package/lib/maximizeMinimize2/index.js +16 -0
  127. package/{src/lib → lib}/maximizeMinimize2/maximizeMinimize2.json +0 -0
  128. package/lib/menu/index.d.ts +3 -0
  129. package/lib/menu/index.js +16 -0
  130. package/{src/lib → lib}/menu/menu.json +0 -0
  131. package/lib/menu2/index.d.ts +3 -0
  132. package/lib/menu2/index.js +16 -0
  133. package/{src/lib → lib}/menu2/menu2.json +0 -0
  134. package/lib/menu3/index.d.ts +3 -0
  135. package/lib/menu3/index.js +16 -0
  136. package/{src/lib → lib}/menu3/menu3.json +0 -0
  137. package/lib/menu4/index.d.ts +3 -0
  138. package/lib/menu4/index.js +16 -0
  139. package/{src/lib → lib}/menu4/menu4.json +0 -0
  140. package/lib/microphone/index.d.ts +3 -0
  141. package/lib/microphone/index.js +16 -0
  142. package/{src/lib → lib}/microphone/microphone.json +0 -0
  143. package/lib/microphone2/index.d.ts +3 -0
  144. package/lib/microphone2/index.js +16 -0
  145. package/{src/lib → lib}/microphone2/microphone2.json +0 -0
  146. package/lib/notification/index.d.ts +3 -0
  147. package/lib/notification/index.js +16 -0
  148. package/{src/lib → lib}/notification/notification.json +0 -0
  149. package/lib/notification2/index.d.ts +3 -0
  150. package/lib/notification2/index.js +16 -0
  151. package/{src/lib → lib}/notification2/notification2.json +0 -0
  152. package/lib/playPause/index.d.ts +3 -0
  153. package/lib/playPause/index.js +16 -0
  154. package/{src/lib → lib}/playPause/playPause.json +0 -0
  155. package/lib/playPauseCircle/index.d.ts +3 -0
  156. package/lib/playPauseCircle/index.js +16 -0
  157. package/{src/lib → lib}/playPauseCircle/playPauseCircle.json +0 -0
  158. package/lib/plusToX/index.d.ts +3 -0
  159. package/lib/plusToX/index.js +16 -0
  160. package/{src/lib → lib}/plusToX/plusToX.json +0 -0
  161. package/lib/pocket/index.d.ts +3 -0
  162. package/lib/pocket/index.js +16 -0
  163. package/{src/lib → lib}/pocket/pocket.json +0 -0
  164. package/lib/radioButton/index.d.ts +3 -0
  165. package/lib/radioButton/index.js +16 -0
  166. package/{src/lib → lib}/radioButton/radioButton.json +0 -0
  167. package/lib/scrollDown/index.d.ts +3 -0
  168. package/lib/scrollDown/index.js +16 -0
  169. package/{src/lib → lib}/scrollDown/scrollDown.json +0 -0
  170. package/lib/searchToX/index.d.ts +3 -0
  171. package/lib/searchToX/index.js +16 -0
  172. package/{src/lib → lib}/searchToX/searchToX.json +0 -0
  173. package/lib/settings/index.d.ts +3 -0
  174. package/lib/settings/index.js +16 -0
  175. package/{src/lib → lib}/settings/settings.json +0 -0
  176. package/lib/settings2/index.d.ts +3 -0
  177. package/lib/settings2/index.js +16 -0
  178. package/{src/lib → lib}/settings2/settings2.json +0 -0
  179. package/lib/share/index.d.ts +3 -0
  180. package/lib/share/index.js +16 -0
  181. package/{src/lib → lib}/share/share.json +0 -0
  182. package/lib/skipBack/index.d.ts +3 -0
  183. package/lib/skipBack/index.js +16 -0
  184. package/{src/lib → lib}/skipBack/skipBack.json +0 -0
  185. package/lib/skipForward/index.d.ts +3 -0
  186. package/lib/skipForward/index.js +16 -0
  187. package/{src/lib → lib}/skipForward/skipForward.json +0 -0
  188. package/lib/star/index.d.ts +3 -0
  189. package/lib/star/index.js +16 -0
  190. package/{src/lib → lib}/star/star.json +0 -0
  191. package/lib/thumbUp/index.d.ts +3 -0
  192. package/lib/thumbUp/index.js +16 -0
  193. package/{src/lib → lib}/thumbUp/thumbUp.json +0 -0
  194. package/lib/toggle/index.d.ts +3 -0
  195. package/lib/toggle/index.js +16 -0
  196. package/{src/lib → lib}/toggle/toggle.json +0 -0
  197. package/lib/trash/index.d.ts +3 -0
  198. package/lib/trash/index.js +16 -0
  199. package/{src/lib → lib}/trash/trash.json +0 -0
  200. package/lib/trash2/index.d.ts +3 -0
  201. package/lib/trash2/index.js +16 -0
  202. package/{src/lib → lib}/trash2/trash2.json +0 -0
  203. package/lib/twitter/index.d.ts +3 -0
  204. package/lib/twitter/index.js +16 -0
  205. package/{src/lib → lib}/twitter/twitter.json +0 -0
  206. package/lib/userMinus/index.d.ts +3 -0
  207. package/lib/userMinus/index.js +16 -0
  208. package/{src/lib → lib}/userMinus/userMinus.json +0 -0
  209. package/lib/userPlus/index.d.ts +3 -0
  210. package/lib/userPlus/index.js +16 -0
  211. package/{src/lib → lib}/userPlus/userPlus.json +0 -0
  212. package/lib/userX/index.d.ts +3 -0
  213. package/lib/userX/index.js +16 -0
  214. package/{src/lib → lib}/userX/userX.json +0 -0
  215. package/lib/video/index.d.ts +3 -0
  216. package/lib/video/index.js +16 -0
  217. package/{src/lib → lib}/video/video.json +0 -0
  218. package/lib/video2/index.d.ts +3 -0
  219. package/lib/video2/index.js +16 -0
  220. package/{src/lib → lib}/video2/video2.json +0 -0
  221. package/lib/visibility/index.d.ts +3 -0
  222. package/lib/visibility/index.js +16 -0
  223. package/{src/lib → lib}/visibility/visibility.json +0 -0
  224. package/lib/visibility2/index.d.ts +3 -0
  225. package/lib/visibility2/index.js +16 -0
  226. package/{src/lib → lib}/visibility2/visibility2.json +0 -0
  227. package/lib/volume/index.d.ts +3 -0
  228. package/lib/volume/index.js +16 -0
  229. package/{src/lib → lib}/volume/volume.json +0 -0
  230. package/lib/youtube/index.d.ts +3 -0
  231. package/lib/youtube/index.js +16 -0
  232. package/{src/lib → lib}/youtube/youtube.json +0 -0
  233. package/lib/youtube2/index.d.ts +3 -0
  234. package/lib/youtube2/index.js +16 -0
  235. package/{src/lib → lib}/youtube2/youtube2.json +0 -0
  236. package/lib/zoomIn/index.d.ts +3 -0
  237. package/lib/zoomIn/index.js +16 -0
  238. package/{src/lib → lib}/zoomIn/zoomIn.json +0 -0
  239. package/lib/zoomOut/index.d.ts +3 -0
  240. package/lib/zoomOut/index.js +16 -0
  241. package/{src/lib → lib}/zoomOut/zoomOut.json +0 -0
  242. package/package.json +5 -2
  243. package/stories/controlled.stories.d.ts +60 -0
  244. package/stories/controlled.stories.js +231 -0
  245. package/stories/generated.stories.d.ts +20 -0
  246. package/stories/generated.stories.js +977 -0
  247. package/stories/variants.stories.d.ts +70 -0
  248. package/stories/variants.stories.js +196 -0
  249. package/{src/typings.d.ts → typings.d.ts} +0 -0
  250. package/utils/constants.d.ts +6 -0
  251. package/utils/constants.js +1 -0
  252. package/utils/getEffect.d.ts +3 -0
  253. package/{src/utils/getEffect.ts → utils/getEffect.js} +12 -9
  254. package/utils/getEvents.d.ts +12 -0
  255. package/utils/getEvents.js +96 -0
  256. package/{src/utils/index.ts → utils/index.d.ts} +0 -0
  257. package/utils/index.js +23 -0
  258. package/.babelrc +0 -4
  259. package/.editorconfig +0 -15
  260. package/.eslintignore +0 -2
  261. package/.eslintrc.json +0 -31
  262. package/.gitattributes +0 -1
  263. package/.prettierrc +0 -10
  264. package/.storybook/main.js +0 -15
  265. package/.vscode/settings.json +0 -5
  266. package/LICENSE +0 -30
  267. package/README.md +0 -110
  268. package/README_v1.md +0 -46
  269. package/src/index.tsx +0 -177
  270. package/src/lib/activity/index.ts +0 -4
  271. package/src/lib/airplay/index.ts +0 -4
  272. package/src/lib/alertCircle/index.ts +0 -4
  273. package/src/lib/alertOctagon/index.ts +0 -4
  274. package/src/lib/alertTriangle/index.ts +0 -4
  275. package/src/lib/archive/index.ts +0 -4
  276. package/src/lib/arrowDown/index.ts +0 -4
  277. package/src/lib/arrowDownCircle/index.ts +0 -4
  278. package/src/lib/arrowLeftCircle/index.ts +0 -4
  279. package/src/lib/arrowRightCircle/index.ts +0 -4
  280. package/src/lib/arrowUp/index.ts +0 -4
  281. package/src/lib/arrowUpCircle/index.ts +0 -4
  282. package/src/lib/behance/index.ts +0 -4
  283. package/src/lib/bookmark/index.ts +0 -4
  284. package/src/lib/calendar/index.ts +0 -4
  285. package/src/lib/checkBox/index.ts +0 -4
  286. package/src/lib/checkmark/index.ts +0 -4
  287. package/src/lib/codepen/index.ts +0 -4
  288. package/src/lib/copy/index.ts +0 -4
  289. package/src/lib/download/index.ts +0 -4
  290. package/src/lib/dribbble/index.ts +0 -4
  291. package/src/lib/edit/index.ts +0 -4
  292. package/src/lib/error/index.ts +0 -4
  293. package/src/lib/explore/index.ts +0 -4
  294. package/src/lib/facebook/index.ts +0 -4
  295. package/src/lib/folder/index.ts +0 -4
  296. package/src/lib/github/index.ts +0 -4
  297. package/src/lib/heart/index.ts +0 -4
  298. package/src/lib/help/index.ts +0 -4
  299. package/src/lib/home/index.ts +0 -4
  300. package/src/lib/infinity/index.ts +0 -4
  301. package/src/lib/info/index.ts +0 -4
  302. package/src/lib/instagram/index.ts +0 -4
  303. package/src/lib/linkedin/index.ts +0 -4
  304. package/src/lib/loading/index.ts +0 -4
  305. package/src/lib/loading2/index.ts +0 -4
  306. package/src/lib/loading3/index.ts +0 -4
  307. package/src/lib/lock/index.ts +0 -4
  308. package/src/lib/mail/index.ts +0 -4
  309. package/src/lib/maximizeMinimize/index.ts +0 -4
  310. package/src/lib/maximizeMinimize2/index.ts +0 -4
  311. package/src/lib/menu/index.ts +0 -4
  312. package/src/lib/menu2/index.ts +0 -4
  313. package/src/lib/menu3/index.ts +0 -4
  314. package/src/lib/menu4/index.ts +0 -4
  315. package/src/lib/microphone/index.ts +0 -4
  316. package/src/lib/microphone2/index.ts +0 -4
  317. package/src/lib/notification/index.ts +0 -4
  318. package/src/lib/notification2/index.ts +0 -4
  319. package/src/lib/playPause/index.ts +0 -4
  320. package/src/lib/playPauseCircle/index.ts +0 -4
  321. package/src/lib/plusToX/index.ts +0 -4
  322. package/src/lib/pocket/index.ts +0 -4
  323. package/src/lib/radioButton/index.ts +0 -4
  324. package/src/lib/scrollDown/index.ts +0 -4
  325. package/src/lib/searchToX/index.ts +0 -4
  326. package/src/lib/settings/index.ts +0 -4
  327. package/src/lib/settings2/index.ts +0 -4
  328. package/src/lib/share/index.ts +0 -4
  329. package/src/lib/skipBack/index.ts +0 -4
  330. package/src/lib/skipForward/index.ts +0 -4
  331. package/src/lib/star/index.ts +0 -4
  332. package/src/lib/thumbUp/index.ts +0 -4
  333. package/src/lib/toggle/index.ts +0 -4
  334. package/src/lib/trash/index.ts +0 -4
  335. package/src/lib/trash2/index.ts +0 -4
  336. package/src/lib/twitter/index.ts +0 -4
  337. package/src/lib/userMinus/index.ts +0 -4
  338. package/src/lib/userPlus/index.ts +0 -4
  339. package/src/lib/userX/index.ts +0 -4
  340. package/src/lib/video/index.ts +0 -4
  341. package/src/lib/video2/index.ts +0 -4
  342. package/src/lib/visibility/index.ts +0 -4
  343. package/src/lib/visibility2/index.ts +0 -4
  344. package/src/lib/volume/index.ts +0 -4
  345. package/src/lib/youtube/index.ts +0 -4
  346. package/src/lib/youtube2/index.ts +0 -4
  347. package/src/lib/zoomIn/index.ts +0 -4
  348. package/src/lib/zoomOut/index.ts +0 -4
  349. package/src/stories/controlled.stories.tsx +0 -257
  350. package/src/stories/generated.stories.tsx +0 -406
  351. package/src/stories/variants.stories.tsx +0 -237
  352. package/src/utils/constants.ts +0 -93
  353. package/src/utils/getEvents.ts +0 -81
  354. package/tsconfig.json +0 -67
  355. package/useanimations-preview.gif +0 -0
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import plusToX from './plusToX.json';
3
-
4
- export default { animationData: plusToX, animationKey: 'plusToX' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import pocket from './pocket.json';
3
-
4
- export default { animationData: pocket, animationKey: 'pocket' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import radioButton from './radioButton.json';
3
-
4
- export default { animationData: radioButton, animationKey: 'radioButton' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import scrollDown from './scrollDown.json';
3
-
4
- export default { animationData: scrollDown, animationKey: 'scrollDown' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import searchToX from './searchToX.json';
3
-
4
- export default { animationData: searchToX, animationKey: 'searchToX' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import settings from './settings.json';
3
-
4
- export default { animationData: settings, animationKey: 'settings' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import settings2 from './settings2.json';
3
-
4
- export default { animationData: settings2, animationKey: 'settings2' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import share from './share.json';
3
-
4
- export default { animationData: share, animationKey: 'share' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import skipBack from './skipBack.json';
3
-
4
- export default { animationData: skipBack, animationKey: 'skipBack' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import skipForward from './skipForward.json';
3
-
4
- export default { animationData: skipForward, animationKey: 'skipForward' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import star from './star.json';
3
-
4
- export default { animationData: star, animationKey: 'star' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import thumbUp from './thumbUp.json';
3
-
4
- export default { animationData: thumbUp, animationKey: 'thumbUp' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import toggle from './toggle.json';
3
-
4
- export default { animationData: toggle, animationKey: 'toggle' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import trash from './trash.json';
3
-
4
- export default { animationData: trash, animationKey: 'trash' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import trash2 from './trash2.json';
3
-
4
- export default { animationData: trash2, animationKey: 'trash2' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import twitter from './twitter.json';
3
-
4
- export default { animationData: twitter, animationKey: 'twitter' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import userMinus from './userMinus.json';
3
-
4
- export default { animationData: userMinus, animationKey: 'userMinus' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import userPlus from './userPlus.json';
3
-
4
- export default { animationData: userPlus, animationKey: 'userPlus' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import userX from './userX.json';
3
-
4
- export default { animationData: userX, animationKey: 'userX' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import video from './video.json';
3
-
4
- export default { animationData: video, animationKey: 'video' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import video2 from './video2.json';
3
-
4
- export default { animationData: video2, animationKey: 'video2' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import visibility from './visibility.json';
3
-
4
- export default { animationData: visibility, animationKey: 'visibility' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import visibility2 from './visibility2.json';
3
-
4
- export default { animationData: visibility2, animationKey: 'visibility2' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import volume from './volume.json';
3
-
4
- export default { animationData: volume, animationKey: 'volume' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import youtube from './youtube.json';
3
-
4
- export default { animationData: youtube, animationKey: 'youtube' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import youtube2 from './youtube2.json';
3
-
4
- export default { animationData: youtube2, animationKey: 'youtube2' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import zoomIn from './zoomIn.json';
3
-
4
- export default { animationData: zoomIn, animationKey: 'zoomIn' } as Animation;
@@ -1,4 +0,0 @@
1
- import type { Animation } from '../../utils/constants';
2
- import zoomOut from './zoomOut.json';
3
-
4
- export default { animationData: zoomOut, animationKey: 'zoomOut' } as Animation;
@@ -1,257 +0,0 @@
1
- import React, { useState } from 'react';
2
- import { withInfo } from '@storybook/addon-info';
3
- import radioButton from '../lib/radioButton';
4
- import star from '../lib/star';
5
- import UseAnimation from '..';
6
-
7
- // ANIMATIONS WITH CLICK PLAY & BACKWARDS WILL HAVE REVERSE FUNCITONALITY FOR STATE MNG
8
- export default {
9
- title: 'Controlled State',
10
- component: UseAnimation,
11
- decorators: [withInfo],
12
- };
13
-
14
- export const RadioButton = () => {
15
- const [checked, setChecked] = useState(true);
16
-
17
- return (
18
- <div style={{ display: 'flex', flexWrap: 'wrap' }}>
19
- <div style={{ padding: '20px' }}>
20
- <span>radioButton</span>
21
- <UseAnimation
22
- reverse={checked}
23
- onClick={() => {
24
- setChecked(!checked);
25
- }}
26
- size={40}
27
- wrapperStyle={{ marginTop: '5px' }}
28
- animation={radioButton}
29
- />
30
- </div>
31
- </div>
32
- );
33
- };
34
-
35
- RadioButton.story = {
36
- parameters: {
37
- info: {
38
- text: `
39
- ~~~js
40
- export const RadioButton = () => {
41
- const [checked, setChecked] = useState(true);
42
-
43
- return (
44
- <div style={{ display: 'flex', flexWrap: 'wrap' }}>
45
- <div style={{ padding: '20px' }}>
46
- <span>radioButton</span>
47
- <UseAnimation
48
- reverse={checked}
49
- onClick={() => {
50
- setChecked(!checked);
51
- }}
52
- size={40}
53
- wrapperStyle={{ marginTop: '5px' }}
54
- animation={radioButton}
55
- />
56
- </div>
57
- </div>
58
- );
59
- };
60
- ~~~
61
- `,
62
- },
63
- },
64
- };
65
-
66
- export const ChangingStrokeColor = () => {
67
- const [strokeColor, setStrokeColor] = useState('black');
68
-
69
- const handleButtonOnClick = () =>
70
- strokeColor === 'black' ? setStrokeColor('red') : setStrokeColor('black');
71
-
72
- return (
73
- <div style={{ display: 'flex', flexWrap: 'wrap', flexDirection: 'column' }}>
74
- <button type="button" onClick={handleButtonOnClick} style={{ width: 100, height: 50 }}>
75
- Change Stroke Color
76
- </button>
77
- <div style={{ padding: '20px' }}>
78
- <span>star</span>
79
- <UseAnimation
80
- pathCss="fill: pink"
81
- strokeColor={strokeColor}
82
- size={40}
83
- wrapperStyle={{ marginTop: '5px' }}
84
- animation={star}
85
- />
86
- </div>
87
- </div>
88
- );
89
- };
90
-
91
- ChangingStrokeColor.story = {
92
- parameters: {
93
- info: {
94
- text: `
95
- ~~~js
96
- export const ChangingStrokeColor = () => {
97
- const [strokeColor, setStrokeColor] = useState('black');
98
-
99
- const handleButtonOnClick = () =>
100
- strokeColor === 'black' ? setStrokeColor('red') : setStrokeColor('black');
101
-
102
- return (
103
- <div style={{ display: 'flex', flexWrap: 'wrap', flexDirection: 'column' }}>
104
- <button type="button" onClick={handleButtonOnClick} style={{ width: 100, height: 50 }}>
105
- Change Stroke Color
106
- </button>
107
- <div style={{ padding: '20px' }}>
108
- <span>star</span>
109
- <UseAnimation
110
- strokeColor={strokeColor}
111
- size={40}
112
- wrapperStyle={{ marginTop: '5px' }}
113
- animation={star}
114
- />
115
- </div>
116
- </div>
117
- );
118
- };
119
- ~~~
120
- `,
121
- },
122
- },
123
- };
124
-
125
- export const ChangingFillColor = () => {
126
- const [fillColor, setFillColor] = useState('black');
127
-
128
- const handleButtonOnClick = () =>
129
- fillColor === 'black' ? setFillColor('red') : setFillColor('black');
130
-
131
- return (
132
- <div style={{ display: 'flex', flexWrap: 'wrap', flexDirection: 'column' }}>
133
- <button type="button" onClick={handleButtonOnClick} style={{ width: 100, height: 50 }}>
134
- Change Fill Color
135
- </button>
136
- <div style={{ padding: '20px' }}>
137
- <span>star</span>
138
- <UseAnimation
139
- fillColor={fillColor}
140
- size={40}
141
- wrapperStyle={{ marginTop: '5px' }}
142
- animation={star}
143
- />
144
- </div>
145
- </div>
146
- );
147
- };
148
-
149
- ChangingFillColor.story = {
150
- parameters: {
151
- info: {
152
- text: `
153
- ~~~js
154
- export const ChangingFillColor = () => {
155
- const [fillColor, setFillColor] = useState('black');
156
-
157
- const handleButtonOnClick = () =>
158
- fillColor === 'black' ? setFillColor('red') : setFillColor('black');
159
-
160
- return (
161
- <div style={{ display: 'flex', flexWrap: 'wrap', flexDirection: 'column' }}>
162
- <button type="button" onClick={handleButtonOnClick} style={{ width: 100, height: 50 }}>
163
- Change Fill Color
164
- </button>
165
- <div style={{ padding: '20px' }}>
166
- <span>star</span>
167
- <UseAnimation
168
- fillColor={fillColor}
169
- size={40}
170
- wrapperStyle={{ marginTop: '5px' }}
171
- animation={star}
172
- />
173
- </div>
174
- </div>
175
- );
176
- };
177
- ~~~
178
- `,
179
- },
180
- },
181
- };
182
-
183
- export const ChangingPathCss = () => {
184
- const defaultCssPath = 'fill: red; stroke: blue;';
185
- const [pathCss, setPathCss] = useState(defaultCssPath);
186
-
187
- const handleButtonOnClick = () =>
188
- pathCss === defaultCssPath
189
- ? setPathCss('fill: blue; stroke: red;')
190
- : setPathCss(defaultCssPath);
191
-
192
- return (
193
- <div style={{ display: 'flex', flexWrap: 'wrap', flexDirection: 'column' }}>
194
- <div style={{ display: 'flex', alignItems: 'center' }}>
195
- <button type="button" onClick={handleButtonOnClick} style={{ width: 100, height: 50 }}>
196
- Change Path Css
197
- </button>
198
- <span style={{ marginLeft: '20px' }}>
199
- After changing, click the star back & forth to see the fill & stroke change taking an
200
- effect
201
- </span>
202
- </div>
203
- <div style={{ padding: '20px' }}>
204
- <span>star</span>
205
- <UseAnimation
206
- pathCss={pathCss}
207
- size={40}
208
- wrapperStyle={{ marginTop: '5px' }}
209
- animation={star}
210
- />
211
- </div>
212
- </div>
213
- );
214
- };
215
-
216
- ChangingPathCss.story = {
217
- parameters: {
218
- info: {
219
- text: `
220
- ~~~js
221
- export const ChangingPathCss = () => {
222
- const defaultCssPath = 'fill: red; stroke: blue;';
223
- const [pathCss, setPathCss] = useState(defaultCssPath);
224
-
225
- const handleButtonOnClick = () =>
226
- pathCss === defaultCssPath
227
- ? setPathCss('fill: blue; stroke: red;')
228
- : setPathCss(defaultCssPath);
229
-
230
- return (
231
- <div style={{ display: 'flex', flexWrap: 'wrap', flexDirection: 'column' }}>
232
- <div style={{ display: 'flex', alignItems: 'center' }}>
233
- <button type="button" onClick={handleButtonOnClick} style={{ width: 100, height: 50 }}>
234
- Change Path Css
235
- </button>
236
- <span style={{ marginLeft: '20px' }}>
237
- After changing, click the star back & forth to see the fill & stroke change taking an
238
- effect
239
- </span>
240
- </div>
241
- <div style={{ padding: '20px' }}>
242
- <span>star</span>
243
- <UseAnimation
244
- pathCss={pathCss}
245
- size={40}
246
- wrapperStyle={{ marginTop: '5px' }}
247
- animation={star}
248
- />
249
- </div>
250
- </div>
251
- );
252
- };
253
- ~~~
254
- `,
255
- },
256
- },
257
- };