@kivid/native-components 1.0.0-alpha.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.
Files changed (498) hide show
  1. package/README.md +57 -0
  2. package/assets/adaptive-icon.png +0 -0
  3. package/assets/favicon.png +0 -0
  4. package/assets/fonts/Nunito-Bold.ttf +0 -0
  5. package/assets/fonts/Nunito-BoldItalic.ttf +0 -0
  6. package/assets/fonts/Nunito-Italic.ttf +0 -0
  7. package/assets/fonts/Nunito-Medium.ttf +0 -0
  8. package/assets/fonts/Nunito-MediumItalic.ttf +0 -0
  9. package/assets/fonts/Nunito-Regular.ttf +0 -0
  10. package/assets/fonts/Nunito-SemiBold.ttf +0 -0
  11. package/assets/fonts/Nunito-SemiBoldItalic.ttf +0 -0
  12. package/assets/icon.png +0 -0
  13. package/assets/splash.png +0 -0
  14. package/dist/README.md +57 -0
  15. package/dist/commonjs/components/Button/assets/class-variants.js +91 -0
  16. package/dist/commonjs/components/Button/assets/class-variants.js.map +1 -0
  17. package/dist/commonjs/components/Button/assets/design-system-showcase.js +1455 -0
  18. package/dist/commonjs/components/Button/assets/design-system-showcase.js.map +1 -0
  19. package/dist/commonjs/components/Button/index.js +116 -0
  20. package/dist/commonjs/components/Button/index.js.map +1 -0
  21. package/dist/commonjs/components/Button/types.js +6 -0
  22. package/dist/commonjs/components/Button/types.js.map +1 -0
  23. package/dist/commonjs/components/Chip/assets/class-variants.js +63 -0
  24. package/dist/commonjs/components/Chip/assets/class-variants.js.map +1 -0
  25. package/dist/commonjs/components/Chip/enums/chip-size.js +12 -0
  26. package/dist/commonjs/components/Chip/enums/chip-size.js.map +1 -0
  27. package/dist/commonjs/components/Chip/enums/chip-variant.js +13 -0
  28. package/dist/commonjs/components/Chip/enums/chip-variant.js.map +1 -0
  29. package/dist/commonjs/components/Chip/enums/index.js +28 -0
  30. package/dist/commonjs/components/Chip/enums/index.js.map +1 -0
  31. package/dist/commonjs/components/Chip/index.js +38 -0
  32. package/dist/commonjs/components/Chip/index.js.map +1 -0
  33. package/dist/commonjs/components/Chip/types.js +6 -0
  34. package/dist/commonjs/components/Chip/types.js.map +1 -0
  35. package/dist/commonjs/components/HighlightedText/index.js +46 -0
  36. package/dist/commonjs/components/HighlightedText/index.js.map +1 -0
  37. package/dist/commonjs/components/HighlightedText/types.js +6 -0
  38. package/dist/commonjs/components/HighlightedText/types.js.map +1 -0
  39. package/dist/commonjs/components/InformationStatus/components/GradientAdd/index.js +74 -0
  40. package/dist/commonjs/components/InformationStatus/components/GradientAdd/index.js.map +1 -0
  41. package/dist/commonjs/components/InformationStatus/components/GradientAdd/types.js +6 -0
  42. package/dist/commonjs/components/InformationStatus/components/GradientAdd/types.js.map +1 -0
  43. package/dist/commonjs/components/InformationStatus/components/GradientAlert/index.js +79 -0
  44. package/dist/commonjs/components/InformationStatus/components/GradientAlert/index.js.map +1 -0
  45. package/dist/commonjs/components/InformationStatus/components/GradientAlert/types.js +6 -0
  46. package/dist/commonjs/components/InformationStatus/components/GradientAlert/types.js.map +1 -0
  47. package/dist/commonjs/components/InformationStatus/components/GradientCheck/index.js +74 -0
  48. package/dist/commonjs/components/InformationStatus/components/GradientCheck/index.js.map +1 -0
  49. package/dist/commonjs/components/InformationStatus/components/GradientCheck/types.js +6 -0
  50. package/dist/commonjs/components/InformationStatus/components/GradientCheck/types.js.map +1 -0
  51. package/dist/commonjs/components/InformationStatus/components/GradientClose/index.js +72 -0
  52. package/dist/commonjs/components/InformationStatus/components/GradientClose/index.js.map +1 -0
  53. package/dist/commonjs/components/InformationStatus/components/GradientClose/types.js +6 -0
  54. package/dist/commonjs/components/InformationStatus/components/GradientClose/types.js.map +1 -0
  55. package/dist/commonjs/components/InformationStatus/components/index.js +50 -0
  56. package/dist/commonjs/components/InformationStatus/components/index.js.map +1 -0
  57. package/dist/commonjs/components/InformationStatus/enums.js +14 -0
  58. package/dist/commonjs/components/InformationStatus/enums.js.map +1 -0
  59. package/dist/commonjs/components/InformationStatus/index.js +75 -0
  60. package/dist/commonjs/components/InformationStatus/index.js.map +1 -0
  61. package/dist/commonjs/components/InformationStatus/types.js +6 -0
  62. package/dist/commonjs/components/InformationStatus/types.js.map +1 -0
  63. package/dist/commonjs/components/InputCheckbox/assets/class-variants.js +64 -0
  64. package/dist/commonjs/components/InputCheckbox/assets/class-variants.js.map +1 -0
  65. package/dist/commonjs/components/InputCheckbox/enums/checkbox-variant.js +17 -0
  66. package/dist/commonjs/components/InputCheckbox/enums/checkbox-variant.js.map +1 -0
  67. package/dist/commonjs/components/InputCheckbox/enums/index.js +28 -0
  68. package/dist/commonjs/components/InputCheckbox/enums/index.js.map +1 -0
  69. package/dist/commonjs/components/InputCheckbox/enums/select-variant.js +12 -0
  70. package/dist/commonjs/components/InputCheckbox/enums/select-variant.js.map +1 -0
  71. package/dist/commonjs/components/InputCheckbox/icons/CheckIcon/index.js +28 -0
  72. package/dist/commonjs/components/InputCheckbox/icons/CheckIcon/index.js.map +1 -0
  73. package/dist/commonjs/components/InputCheckbox/icons/IndeterminateIcon/index.js +28 -0
  74. package/dist/commonjs/components/InputCheckbox/icons/IndeterminateIcon/index.js.map +1 -0
  75. package/dist/commonjs/components/InputCheckbox/icons/index.js +20 -0
  76. package/dist/commonjs/components/InputCheckbox/icons/index.js.map +1 -0
  77. package/dist/commonjs/components/InputCheckbox/index.js +53 -0
  78. package/dist/commonjs/components/InputCheckbox/index.js.map +1 -0
  79. package/dist/commonjs/components/InputCheckbox/types.js +6 -0
  80. package/dist/commonjs/components/InputCheckbox/types.js.map +1 -0
  81. package/dist/commonjs/components/InputOTP/components/InformationStatus/index.js +93 -0
  82. package/dist/commonjs/components/InputOTP/components/InformationStatus/index.js.map +1 -0
  83. package/dist/commonjs/components/InputOTP/components/InformationStatus/types.js +6 -0
  84. package/dist/commonjs/components/InputOTP/components/InformationStatus/types.js.map +1 -0
  85. package/dist/commonjs/components/InputOTP/components/index.js +17 -0
  86. package/dist/commonjs/components/InputOTP/components/index.js.map +1 -0
  87. package/dist/commonjs/components/InputOTP/enums/index.js +17 -0
  88. package/dist/commonjs/components/InputOTP/enums/index.js.map +1 -0
  89. package/dist/commonjs/components/InputOTP/enums/information-status.js +15 -0
  90. package/dist/commonjs/components/InputOTP/enums/information-status.js.map +1 -0
  91. package/dist/commonjs/components/InputOTP/index.js +135 -0
  92. package/dist/commonjs/components/InputOTP/index.js.map +1 -0
  93. package/dist/commonjs/components/InputOTP/types.js +6 -0
  94. package/dist/commonjs/components/InputOTP/types.js.map +1 -0
  95. package/dist/commonjs/components/LoadingDots/assets/loading-button-dark.json +1 -0
  96. package/dist/commonjs/components/LoadingDots/assets/loading-button-grape.json +1 -0
  97. package/dist/commonjs/components/LoadingDots/assets/loading-button-light.json +1 -0
  98. package/dist/commonjs/components/LoadingDots/index.js +45 -0
  99. package/dist/commonjs/components/LoadingDots/index.js.map +1 -0
  100. package/dist/commonjs/components/LoadingDots/types.js +6 -0
  101. package/dist/commonjs/components/LoadingDots/types.js.map +1 -0
  102. package/dist/commonjs/components/Seal/assets/class-variants.js +64 -0
  103. package/dist/commonjs/components/Seal/assets/class-variants.js.map +1 -0
  104. package/dist/commonjs/components/Seal/components/AddIcon/index.js +32 -0
  105. package/dist/commonjs/components/Seal/components/AddIcon/index.js.map +1 -0
  106. package/dist/commonjs/components/Seal/components/AlertIcon/index.js +32 -0
  107. package/dist/commonjs/components/Seal/components/AlertIcon/index.js.map +1 -0
  108. package/dist/commonjs/components/Seal/components/ErrorIcon/index.js +32 -0
  109. package/dist/commonjs/components/Seal/components/ErrorIcon/index.js.map +1 -0
  110. package/dist/commonjs/components/Seal/components/LeftIcon/index.js +32 -0
  111. package/dist/commonjs/components/Seal/components/LeftIcon/index.js.map +1 -0
  112. package/dist/commonjs/components/Seal/components/MinusIcon/index.js +30 -0
  113. package/dist/commonjs/components/Seal/components/MinusIcon/index.js.map +1 -0
  114. package/dist/commonjs/components/Seal/components/RightIcon/index.js +32 -0
  115. package/dist/commonjs/components/Seal/components/RightIcon/index.js.map +1 -0
  116. package/dist/commonjs/components/Seal/components/SuccessIcon/index.js +32 -0
  117. package/dist/commonjs/components/Seal/components/SuccessIcon/index.js.map +1 -0
  118. package/dist/commonjs/components/Seal/components/index.js +55 -0
  119. package/dist/commonjs/components/Seal/components/index.js.map +1 -0
  120. package/dist/commonjs/components/Seal/enums/index.js +17 -0
  121. package/dist/commonjs/components/Seal/enums/index.js.map +1 -0
  122. package/dist/commonjs/components/Seal/enums/seal-variant.js +17 -0
  123. package/dist/commonjs/components/Seal/enums/seal-variant.js.map +1 -0
  124. package/dist/commonjs/components/Seal/index.js +52 -0
  125. package/dist/commonjs/components/Seal/index.js.map +1 -0
  126. package/dist/commonjs/components/Seal/types.js +6 -0
  127. package/dist/commonjs/components/Seal/types.js.map +1 -0
  128. package/dist/commonjs/components/Title/components/icon/index.js +49 -0
  129. package/dist/commonjs/components/Title/components/icon/index.js.map +1 -0
  130. package/dist/commonjs/components/Title/components/icon/types.js +15 -0
  131. package/dist/commonjs/components/Title/components/icon/types.js.map +1 -0
  132. package/dist/commonjs/components/Title/components/index.js +28 -0
  133. package/dist/commonjs/components/Title/components/index.js.map +1 -0
  134. package/dist/commonjs/components/Title/components/marker/index.js +33 -0
  135. package/dist/commonjs/components/Title/components/marker/index.js.map +1 -0
  136. package/dist/commonjs/components/Title/components/marker/types.js +2 -0
  137. package/dist/commonjs/components/Title/components/marker/types.js.map +1 -0
  138. package/dist/commonjs/components/Title/index.js +44 -0
  139. package/dist/commonjs/components/Title/index.js.map +1 -0
  140. package/dist/commonjs/components/Title/types.js +6 -0
  141. package/dist/commonjs/components/Title/types.js.map +1 -0
  142. package/dist/commonjs/components/Toggle/assets/class-variants.js +37 -0
  143. package/dist/commonjs/components/Toggle/assets/class-variants.js.map +1 -0
  144. package/dist/commonjs/components/Toggle/enums/index.js +17 -0
  145. package/dist/commonjs/components/Toggle/enums/index.js.map +1 -0
  146. package/dist/commonjs/components/Toggle/enums/variant.js +15 -0
  147. package/dist/commonjs/components/Toggle/enums/variant.js.map +1 -0
  148. package/dist/commonjs/components/Toggle/index.js +41 -0
  149. package/dist/commonjs/components/Toggle/index.js.map +1 -0
  150. package/dist/commonjs/components/Toggle/types.js +6 -0
  151. package/dist/commonjs/components/Toggle/types.js.map +1 -0
  152. package/dist/commonjs/components/Typography/index.js +52 -0
  153. package/dist/commonjs/components/Typography/index.js.map +1 -0
  154. package/dist/commonjs/components/Typography/types.js +6 -0
  155. package/dist/commonjs/components/Typography/types.js.map +1 -0
  156. package/dist/commonjs/components/index.js +127 -0
  157. package/dist/commonjs/components/index.js.map +1 -0
  158. package/dist/commonjs/hooks/index.js +17 -0
  159. package/dist/commonjs/hooks/index.js.map +1 -0
  160. package/dist/commonjs/hooks/use-fonts.js +31 -0
  161. package/dist/commonjs/hooks/use-fonts.js.map +1 -0
  162. package/dist/commonjs/iconography/Icons/index.js +97 -0
  163. package/dist/commonjs/iconography/Icons/index.js.map +1 -0
  164. package/dist/commonjs/iconography/Icons/types.js +6 -0
  165. package/dist/commonjs/iconography/Icons/types.js.map +1 -0
  166. package/dist/commonjs/index.js +17 -0
  167. package/dist/commonjs/index.js.map +1 -0
  168. package/dist/commonjs/nativewind-env.d.js +3 -0
  169. package/dist/commonjs/nativewind-env.d.js.map +1 -0
  170. package/dist/commonjs/package.json +1 -0
  171. package/dist/commonjs/welcome.mdx +3 -0
  172. package/dist/module/components/Button/assets/class-variants.js +88 -0
  173. package/dist/module/components/Button/assets/class-variants.js.map +1 -0
  174. package/dist/module/components/Button/assets/design-system-showcase.js +1451 -0
  175. package/dist/module/components/Button/assets/design-system-showcase.js.map +1 -0
  176. package/dist/module/components/Button/index.js +110 -0
  177. package/dist/module/components/Button/index.js.map +1 -0
  178. package/dist/module/components/Button/types.js +4 -0
  179. package/dist/module/components/Button/types.js.map +1 -0
  180. package/dist/module/components/Chip/assets/class-variants.js +59 -0
  181. package/dist/module/components/Chip/assets/class-variants.js.map +1 -0
  182. package/dist/module/components/Chip/enums/chip-size.js +8 -0
  183. package/dist/module/components/Chip/enums/chip-size.js.map +1 -0
  184. package/dist/module/components/Chip/enums/chip-variant.js +9 -0
  185. package/dist/module/components/Chip/enums/chip-variant.js.map +1 -0
  186. package/dist/module/components/Chip/enums/index.js +5 -0
  187. package/dist/module/components/Chip/enums/index.js.map +1 -0
  188. package/dist/module/components/Chip/index.js +34 -0
  189. package/dist/module/components/Chip/index.js.map +1 -0
  190. package/dist/module/components/Chip/types.js +4 -0
  191. package/dist/module/components/Chip/types.js.map +1 -0
  192. package/dist/module/components/HighlightedText/index.js +41 -0
  193. package/dist/module/components/HighlightedText/index.js.map +1 -0
  194. package/dist/module/components/HighlightedText/types.js +4 -0
  195. package/dist/module/components/HighlightedText/types.js.map +1 -0
  196. package/dist/module/components/InformationStatus/components/GradientAdd/index.js +69 -0
  197. package/dist/module/components/InformationStatus/components/GradientAdd/index.js.map +1 -0
  198. package/dist/module/components/InformationStatus/components/GradientAdd/types.js +4 -0
  199. package/dist/module/components/InformationStatus/components/GradientAdd/types.js.map +1 -0
  200. package/dist/module/components/InformationStatus/components/GradientAlert/index.js +74 -0
  201. package/dist/module/components/InformationStatus/components/GradientAlert/index.js.map +1 -0
  202. package/dist/module/components/InformationStatus/components/GradientAlert/types.js +4 -0
  203. package/dist/module/components/InformationStatus/components/GradientAlert/types.js.map +1 -0
  204. package/dist/module/components/InformationStatus/components/GradientCheck/index.js +69 -0
  205. package/dist/module/components/InformationStatus/components/GradientCheck/index.js.map +1 -0
  206. package/dist/module/components/InformationStatus/components/GradientCheck/types.js +4 -0
  207. package/dist/module/components/InformationStatus/components/GradientCheck/types.js.map +1 -0
  208. package/dist/module/components/InformationStatus/components/GradientClose/index.js +67 -0
  209. package/dist/module/components/InformationStatus/components/GradientClose/index.js.map +1 -0
  210. package/dist/module/components/InformationStatus/components/GradientClose/types.js +4 -0
  211. package/dist/module/components/InformationStatus/components/GradientClose/types.js.map +1 -0
  212. package/dist/module/components/InformationStatus/components/index.js +7 -0
  213. package/dist/module/components/InformationStatus/components/index.js.map +1 -0
  214. package/dist/module/components/InformationStatus/enums.js +10 -0
  215. package/dist/module/components/InformationStatus/enums.js.map +1 -0
  216. package/dist/module/components/InformationStatus/index.js +71 -0
  217. package/dist/module/components/InformationStatus/index.js.map +1 -0
  218. package/dist/module/components/InformationStatus/types.js +4 -0
  219. package/dist/module/components/InformationStatus/types.js.map +1 -0
  220. package/dist/module/components/InputCheckbox/assets/class-variants.js +60 -0
  221. package/dist/module/components/InputCheckbox/assets/class-variants.js.map +1 -0
  222. package/dist/module/components/InputCheckbox/enums/checkbox-variant.js +13 -0
  223. package/dist/module/components/InputCheckbox/enums/checkbox-variant.js.map +1 -0
  224. package/dist/module/components/InputCheckbox/enums/index.js +5 -0
  225. package/dist/module/components/InputCheckbox/enums/index.js.map +1 -0
  226. package/dist/module/components/InputCheckbox/enums/select-variant.js +8 -0
  227. package/dist/module/components/InputCheckbox/enums/select-variant.js.map +1 -0
  228. package/dist/module/components/InputCheckbox/icons/CheckIcon/index.js +22 -0
  229. package/dist/module/components/InputCheckbox/icons/CheckIcon/index.js.map +1 -0
  230. package/dist/module/components/InputCheckbox/icons/IndeterminateIcon/index.js +22 -0
  231. package/dist/module/components/InputCheckbox/icons/IndeterminateIcon/index.js.map +1 -0
  232. package/dist/module/components/InputCheckbox/icons/index.js +5 -0
  233. package/dist/module/components/InputCheckbox/icons/index.js.map +1 -0
  234. package/dist/module/components/InputCheckbox/index.js +49 -0
  235. package/dist/module/components/InputCheckbox/index.js.map +1 -0
  236. package/dist/module/components/InputCheckbox/types.js +4 -0
  237. package/dist/module/components/InputCheckbox/types.js.map +1 -0
  238. package/dist/module/components/InputOTP/components/InformationStatus/index.js +87 -0
  239. package/dist/module/components/InputOTP/components/InformationStatus/index.js.map +1 -0
  240. package/dist/module/components/InputOTP/components/InformationStatus/types.js +4 -0
  241. package/dist/module/components/InputOTP/components/InformationStatus/types.js.map +1 -0
  242. package/dist/module/components/InputOTP/components/index.js +4 -0
  243. package/dist/module/components/InputOTP/components/index.js.map +1 -0
  244. package/dist/module/components/InputOTP/enums/index.js +4 -0
  245. package/dist/module/components/InputOTP/enums/index.js.map +1 -0
  246. package/dist/module/components/InputOTP/enums/information-status.js +11 -0
  247. package/dist/module/components/InputOTP/enums/information-status.js.map +1 -0
  248. package/dist/module/components/InputOTP/index.js +130 -0
  249. package/dist/module/components/InputOTP/index.js.map +1 -0
  250. package/dist/module/components/InputOTP/types.js +4 -0
  251. package/dist/module/components/InputOTP/types.js.map +1 -0
  252. package/dist/module/components/LoadingDots/assets/loading-button-dark.json +1 -0
  253. package/dist/module/components/LoadingDots/assets/loading-button-grape.json +1 -0
  254. package/dist/module/components/LoadingDots/assets/loading-button-light.json +1 -0
  255. package/dist/module/components/LoadingDots/index.js +39 -0
  256. package/dist/module/components/LoadingDots/index.js.map +1 -0
  257. package/dist/module/components/LoadingDots/types.js +4 -0
  258. package/dist/module/components/LoadingDots/types.js.map +1 -0
  259. package/dist/module/components/Seal/assets/class-variants.js +60 -0
  260. package/dist/module/components/Seal/assets/class-variants.js.map +1 -0
  261. package/dist/module/components/Seal/components/AddIcon/index.js +27 -0
  262. package/dist/module/components/Seal/components/AddIcon/index.js.map +1 -0
  263. package/dist/module/components/Seal/components/AlertIcon/index.js +27 -0
  264. package/dist/module/components/Seal/components/AlertIcon/index.js.map +1 -0
  265. package/dist/module/components/Seal/components/ErrorIcon/index.js +27 -0
  266. package/dist/module/components/Seal/components/ErrorIcon/index.js.map +1 -0
  267. package/dist/module/components/Seal/components/LeftIcon/index.js +27 -0
  268. package/dist/module/components/Seal/components/LeftIcon/index.js.map +1 -0
  269. package/dist/module/components/Seal/components/MinusIcon/index.js +25 -0
  270. package/dist/module/components/Seal/components/MinusIcon/index.js.map +1 -0
  271. package/dist/module/components/Seal/components/RightIcon/index.js +27 -0
  272. package/dist/module/components/Seal/components/RightIcon/index.js.map +1 -0
  273. package/dist/module/components/Seal/components/SuccessIcon/index.js +27 -0
  274. package/dist/module/components/Seal/components/SuccessIcon/index.js.map +1 -0
  275. package/dist/module/components/Seal/components/index.js +10 -0
  276. package/dist/module/components/Seal/components/index.js.map +1 -0
  277. package/dist/module/components/Seal/enums/index.js +4 -0
  278. package/dist/module/components/Seal/enums/index.js.map +1 -0
  279. package/dist/module/components/Seal/enums/seal-variant.js +13 -0
  280. package/dist/module/components/Seal/enums/seal-variant.js.map +1 -0
  281. package/dist/module/components/Seal/index.js +46 -0
  282. package/dist/module/components/Seal/index.js.map +1 -0
  283. package/dist/module/components/Seal/types.js +4 -0
  284. package/dist/module/components/Seal/types.js.map +1 -0
  285. package/dist/module/components/Title/components/icon/index.js +45 -0
  286. package/dist/module/components/Title/components/icon/index.js.map +1 -0
  287. package/dist/module/components/Title/components/icon/types.js +11 -0
  288. package/dist/module/components/Title/components/icon/types.js.map +1 -0
  289. package/dist/module/components/Title/components/index.js +5 -0
  290. package/dist/module/components/Title/components/index.js.map +1 -0
  291. package/dist/module/components/Title/components/marker/index.js +29 -0
  292. package/dist/module/components/Title/components/marker/index.js.map +1 -0
  293. package/dist/module/components/Title/components/marker/types.js +2 -0
  294. package/dist/module/components/Title/components/marker/types.js.map +1 -0
  295. package/dist/module/components/Title/index.js +41 -0
  296. package/dist/module/components/Title/index.js.map +1 -0
  297. package/dist/module/components/Title/types.js +4 -0
  298. package/dist/module/components/Title/types.js.map +1 -0
  299. package/dist/module/components/Toggle/assets/class-variants.js +34 -0
  300. package/dist/module/components/Toggle/assets/class-variants.js.map +1 -0
  301. package/dist/module/components/Toggle/enums/index.js +4 -0
  302. package/dist/module/components/Toggle/enums/index.js.map +1 -0
  303. package/dist/module/components/Toggle/enums/variant.js +11 -0
  304. package/dist/module/components/Toggle/enums/variant.js.map +1 -0
  305. package/dist/module/components/Toggle/index.js +37 -0
  306. package/dist/module/components/Toggle/index.js.map +1 -0
  307. package/dist/module/components/Toggle/types.js +4 -0
  308. package/dist/module/components/Toggle/types.js.map +1 -0
  309. package/dist/module/components/Typography/index.js +47 -0
  310. package/dist/module/components/Typography/index.js.map +1 -0
  311. package/dist/module/components/Typography/types.js +4 -0
  312. package/dist/module/components/Typography/types.js.map +1 -0
  313. package/dist/module/components/index.js +14 -0
  314. package/dist/module/components/index.js.map +1 -0
  315. package/dist/module/hooks/index.js +4 -0
  316. package/dist/module/hooks/index.js.map +1 -0
  317. package/dist/module/hooks/use-fonts.js +27 -0
  318. package/dist/module/hooks/use-fonts.js.map +1 -0
  319. package/dist/module/iconography/Icons/index.js +92 -0
  320. package/dist/module/iconography/Icons/index.js.map +1 -0
  321. package/dist/module/iconography/Icons/types.js +4 -0
  322. package/dist/module/iconography/Icons/types.js.map +1 -0
  323. package/dist/module/index.js +4 -0
  324. package/dist/module/index.js.map +1 -0
  325. package/dist/module/nativewind-env.d.js +3 -0
  326. package/dist/module/nativewind-env.d.js.map +1 -0
  327. package/dist/module/package.json +1 -0
  328. package/dist/module/welcome.mdx +3 -0
  329. package/dist/package.json +57 -0
  330. package/dist/typescript/components/Button/assets/class-variants.d.ts +16 -0
  331. package/dist/typescript/components/Button/assets/design-system-showcase.d.ts +1448 -0
  332. package/dist/typescript/components/Button/index.d.ts +6 -0
  333. package/dist/typescript/components/Button/types.d.ts +16 -0
  334. package/dist/typescript/components/Chip/assets/class-variants.d.ts +5 -0
  335. package/dist/typescript/components/Chip/enums/chip-size.d.ts +4 -0
  336. package/dist/typescript/components/Chip/enums/chip-variant.d.ts +5 -0
  337. package/dist/typescript/components/Chip/enums/index.d.ts +2 -0
  338. package/dist/typescript/components/Chip/index.d.ts +2 -0
  339. package/dist/typescript/components/Chip/types.d.ts +11 -0
  340. package/dist/typescript/components/HighlightedText/index.d.ts +6 -0
  341. package/dist/typescript/components/HighlightedText/types.d.ts +9 -0
  342. package/dist/typescript/components/InformationStatus/components/GradientAdd/index.d.ts +3 -0
  343. package/dist/typescript/components/InformationStatus/components/GradientAdd/types.d.ts +5 -0
  344. package/dist/typescript/components/InformationStatus/components/GradientAlert/index.d.ts +3 -0
  345. package/dist/typescript/components/InformationStatus/components/GradientAlert/types.d.ts +5 -0
  346. package/dist/typescript/components/InformationStatus/components/GradientCheck/index.d.ts +3 -0
  347. package/dist/typescript/components/InformationStatus/components/GradientCheck/types.d.ts +5 -0
  348. package/dist/typescript/components/InformationStatus/components/GradientClose/index.d.ts +3 -0
  349. package/dist/typescript/components/InformationStatus/components/GradientClose/types.d.ts +5 -0
  350. package/dist/typescript/components/InformationStatus/components/index.d.ts +4 -0
  351. package/dist/typescript/components/InformationStatus/enums.d.ts +6 -0
  352. package/dist/typescript/components/InformationStatus/index.d.ts +2 -0
  353. package/dist/typescript/components/InformationStatus/types.d.ts +14 -0
  354. package/dist/typescript/components/InputCheckbox/assets/class-variants.d.ts +6 -0
  355. package/dist/typescript/components/InputCheckbox/enums/checkbox-variant.d.ts +9 -0
  356. package/dist/typescript/components/InputCheckbox/enums/index.d.ts +2 -0
  357. package/dist/typescript/components/InputCheckbox/enums/select-variant.d.ts +4 -0
  358. package/dist/typescript/components/InputCheckbox/icons/CheckIcon/index.d.ts +2 -0
  359. package/dist/typescript/components/InputCheckbox/icons/IndeterminateIcon/index.d.ts +2 -0
  360. package/dist/typescript/components/InputCheckbox/icons/index.d.ts +2 -0
  361. package/dist/typescript/components/InputCheckbox/index.d.ts +2 -0
  362. package/dist/typescript/components/InputCheckbox/types.d.ts +10 -0
  363. package/dist/typescript/components/InputOTP/components/InformationStatus/index.d.ts +3 -0
  364. package/dist/typescript/components/InputOTP/components/InformationStatus/types.d.ts +6 -0
  365. package/dist/typescript/components/InputOTP/components/index.d.ts +1 -0
  366. package/dist/typescript/components/InputOTP/enums/index.d.ts +1 -0
  367. package/dist/typescript/components/InputOTP/enums/information-status.d.ts +7 -0
  368. package/dist/typescript/components/InputOTP/index.d.ts +3 -0
  369. package/dist/typescript/components/InputOTP/types.d.ts +11 -0
  370. package/dist/typescript/components/LoadingDots/index.d.ts +3 -0
  371. package/dist/typescript/components/LoadingDots/types.d.ts +9 -0
  372. package/dist/typescript/components/Seal/assets/class-variants.d.ts +5 -0
  373. package/dist/typescript/components/Seal/components/AddIcon/index.d.ts +2 -0
  374. package/dist/typescript/components/Seal/components/AlertIcon/index.d.ts +2 -0
  375. package/dist/typescript/components/Seal/components/ErrorIcon/index.d.ts +2 -0
  376. package/dist/typescript/components/Seal/components/LeftIcon/index.d.ts +2 -0
  377. package/dist/typescript/components/Seal/components/MinusIcon/index.d.ts +2 -0
  378. package/dist/typescript/components/Seal/components/RightIcon/index.d.ts +2 -0
  379. package/dist/typescript/components/Seal/components/SuccessIcon/index.d.ts +2 -0
  380. package/dist/typescript/components/Seal/components/index.d.ts +7 -0
  381. package/dist/typescript/components/Seal/enums/index.d.ts +1 -0
  382. package/dist/typescript/components/Seal/enums/seal-variant.d.ts +9 -0
  383. package/dist/typescript/components/Seal/index.d.ts +3 -0
  384. package/dist/typescript/components/Seal/types.d.ts +14 -0
  385. package/dist/typescript/components/Title/components/icon/index.d.ts +2 -0
  386. package/dist/typescript/components/Title/components/icon/types.d.ts +12 -0
  387. package/dist/typescript/components/Title/components/index.d.ts +2 -0
  388. package/dist/typescript/components/Title/components/marker/index.d.ts +2 -0
  389. package/dist/typescript/components/Title/components/marker/types.d.ts +4 -0
  390. package/dist/typescript/components/Title/index.d.ts +7 -0
  391. package/dist/typescript/components/Title/types.d.ts +7 -0
  392. package/dist/typescript/components/Toggle/assets/class-variants.d.ts +6 -0
  393. package/dist/typescript/components/Toggle/enums/index.d.ts +1 -0
  394. package/dist/typescript/components/Toggle/enums/variant.d.ts +7 -0
  395. package/dist/typescript/components/Toggle/index.d.ts +2 -0
  396. package/dist/typescript/components/Toggle/types.d.ts +7 -0
  397. package/dist/typescript/components/Typography/index.d.ts +27 -0
  398. package/dist/typescript/components/Typography/types.d.ts +7 -0
  399. package/dist/typescript/components/index.d.ts +11 -0
  400. package/dist/typescript/hooks/index.d.ts +1 -0
  401. package/dist/typescript/hooks/use-fonts.d.ts +10 -0
  402. package/dist/typescript/iconography/Icons/index.d.ts +2 -0
  403. package/dist/typescript/iconography/Icons/types.d.ts +11 -0
  404. package/dist/typescript/index.d.ts +1 -0
  405. package/index.js +6 -0
  406. package/package.json +128 -0
  407. package/src/components/Button/assets/class-variants.ts +111 -0
  408. package/src/components/Button/assets/design-system-showcase.ts +1745 -0
  409. package/src/components/Button/index.stories.tsx +407 -0
  410. package/src/components/Button/index.tsx +137 -0
  411. package/src/components/Button/types.ts +31 -0
  412. package/src/components/Chip/assets/class-variants.ts +68 -0
  413. package/src/components/Chip/enums/chip-size.ts +4 -0
  414. package/src/components/Chip/enums/chip-variant.ts +5 -0
  415. package/src/components/Chip/enums/index.ts +2 -0
  416. package/src/components/Chip/index.stories.tsx +95 -0
  417. package/src/components/Chip/index.tsx +35 -0
  418. package/src/components/Chip/types.ts +13 -0
  419. package/src/components/HighlightedText/index.stories.tsx +110 -0
  420. package/src/components/HighlightedText/index.tsx +38 -0
  421. package/src/components/HighlightedText/types.ts +10 -0
  422. package/src/components/InformationStatus/components/GradientAdd/index.tsx +74 -0
  423. package/src/components/InformationStatus/components/GradientAdd/types.ts +6 -0
  424. package/src/components/InformationStatus/components/GradientAlert/index.tsx +81 -0
  425. package/src/components/InformationStatus/components/GradientAlert/types.ts +6 -0
  426. package/src/components/InformationStatus/components/GradientCheck/index.tsx +75 -0
  427. package/src/components/InformationStatus/components/GradientCheck/types.ts +6 -0
  428. package/src/components/InformationStatus/components/GradientClose/index.tsx +73 -0
  429. package/src/components/InformationStatus/components/GradientClose/types.ts +6 -0
  430. package/src/components/InformationStatus/components/index.ts +4 -0
  431. package/src/components/InformationStatus/enums.ts +6 -0
  432. package/src/components/InformationStatus/index.stories.tsx +112 -0
  433. package/src/components/InformationStatus/index.tsx +76 -0
  434. package/src/components/InformationStatus/types.ts +16 -0
  435. package/src/components/InputCheckbox/assets/class-variants.ts +90 -0
  436. package/src/components/InputCheckbox/enums/checkbox-variant.ts +9 -0
  437. package/src/components/InputCheckbox/enums/index.ts +2 -0
  438. package/src/components/InputCheckbox/enums/select-variant.ts +4 -0
  439. package/src/components/InputCheckbox/icons/CheckIcon/index.tsx +23 -0
  440. package/src/components/InputCheckbox/icons/IndeterminateIcon/index.tsx +23 -0
  441. package/src/components/InputCheckbox/icons/index.ts +2 -0
  442. package/src/components/InputCheckbox/index.stories.tsx +133 -0
  443. package/src/components/InputCheckbox/index.tsx +53 -0
  444. package/src/components/InputCheckbox/types.ts +13 -0
  445. package/src/components/InputOTP/components/InformationStatus/index.tsx +105 -0
  446. package/src/components/InputOTP/components/InformationStatus/types.ts +6 -0
  447. package/src/components/InputOTP/components/index.ts +1 -0
  448. package/src/components/InputOTP/enums/index.ts +1 -0
  449. package/src/components/InputOTP/enums/information-status.ts +7 -0
  450. package/src/components/InputOTP/index.stories.tsx +247 -0
  451. package/src/components/InputOTP/index.tsx +177 -0
  452. package/src/components/InputOTP/types.ts +12 -0
  453. package/src/components/LoadingDots/assets/loading-button-dark.json +1 -0
  454. package/src/components/LoadingDots/assets/loading-button-grape.json +1 -0
  455. package/src/components/LoadingDots/assets/loading-button-light.json +1 -0
  456. package/src/components/LoadingDots/index.stories.tsx +74 -0
  457. package/src/components/LoadingDots/index.tsx +37 -0
  458. package/src/components/LoadingDots/types.ts +10 -0
  459. package/src/components/Seal/assets/class-variants.ts +70 -0
  460. package/src/components/Seal/components/AddIcon/index.tsx +26 -0
  461. package/src/components/Seal/components/AlertIcon/index.tsx +26 -0
  462. package/src/components/Seal/components/ErrorIcon/index.tsx +26 -0
  463. package/src/components/Seal/components/LeftIcon/index.tsx +26 -0
  464. package/src/components/Seal/components/MinusIcon/index.tsx +24 -0
  465. package/src/components/Seal/components/RightIcon/index.tsx +26 -0
  466. package/src/components/Seal/components/SuccessIcon/index.tsx +26 -0
  467. package/src/components/Seal/components/index.ts +7 -0
  468. package/src/components/Seal/enums/index.ts +1 -0
  469. package/src/components/Seal/enums/seal-variant.ts +9 -0
  470. package/src/components/Seal/index.stories.tsx +124 -0
  471. package/src/components/Seal/index.tsx +53 -0
  472. package/src/components/Seal/types.ts +18 -0
  473. package/src/components/Title/components/icon/index.tsx +51 -0
  474. package/src/components/Title/components/icon/types.ts +12 -0
  475. package/src/components/Title/components/index.ts +2 -0
  476. package/src/components/Title/components/marker/index.tsx +25 -0
  477. package/src/components/Title/components/marker/types.ts +13 -0
  478. package/src/components/Title/index.stories.tsx +619 -0
  479. package/src/components/Title/index.tsx +36 -0
  480. package/src/components/Title/types.ts +7 -0
  481. package/src/components/Toggle/assets/class-variants.ts +40 -0
  482. package/src/components/Toggle/enums/index.ts +1 -0
  483. package/src/components/Toggle/enums/variant.ts +7 -0
  484. package/src/components/Toggle/index.stories.tsx +88 -0
  485. package/src/components/Toggle/index.tsx +42 -0
  486. package/src/components/Toggle/types.ts +8 -0
  487. package/src/components/Typography/index.stories.tsx +260 -0
  488. package/src/components/Typography/index.tsx +46 -0
  489. package/src/components/Typography/types.ts +8 -0
  490. package/src/components/index.ts +11 -0
  491. package/src/hooks/index.ts +1 -0
  492. package/src/hooks/use-fonts.ts +22 -0
  493. package/src/iconography/Icons/index.stories.tsx +23 -0
  494. package/src/iconography/Icons/index.tsx +89 -0
  495. package/src/iconography/Icons/types.ts +12 -0
  496. package/src/index.ts +1 -0
  497. package/src/nativewind-env.d.ts +1 -0
  498. package/src/welcome.mdx +3 -0
@@ -0,0 +1,7 @@
1
+ export enum InformationStatusEnum {
2
+ DEFAULT = "default",
3
+ ERROR = "error",
4
+ SUCCESS = "success",
5
+ LOADING = "loading",
6
+ COOLDOWN = "cooldown",
7
+ }
@@ -0,0 +1,247 @@
1
+ import type { Meta, StoryObj } from "@storybook/react-native";
2
+ import { InputOTP } from "./index";
3
+ import { useState } from "react";
4
+ import { Text, View } from "react-native";
5
+ import { InformationStatusEnum } from "./enums";
6
+
7
+ const meta: Meta<typeof InputOTP> = {
8
+ title: "Components/InputOTP",
9
+ component: InputOTP,
10
+ parameters: {
11
+ layout: "centered",
12
+ },
13
+ tags: ["autodocs"],
14
+ argTypes: {
15
+ OTPInputsQuantity: {
16
+ control: { type: "number", min: 1, max: 10 },
17
+ description: "Number of input fields",
18
+ table: {
19
+ defaultValue: { summary: "6" },
20
+ },
21
+ },
22
+ status: {
23
+ control: { type: "select" },
24
+ options: Object.values(InformationStatusEnum),
25
+ description: "Status of the input",
26
+ table: {
27
+ defaultValue: { summary: InformationStatusEnum.DEFAULT },
28
+ type: { summary: Object.values(InformationStatusEnum).join(" | ") },
29
+ },
30
+ },
31
+ rounded: {
32
+ control: "boolean",
33
+ description: "Rounded corners",
34
+ table: {
35
+ defaultValue: { summary: "false" },
36
+ },
37
+ },
38
+ disabled: {
39
+ control: "boolean",
40
+ description: "Whether inputs are disabled",
41
+ table: {
42
+ defaultValue: { summary: "false" },
43
+ },
44
+ },
45
+ customInformation: {
46
+ control: "object",
47
+ description: "Custom information to display",
48
+ table: {
49
+ defaultValue: { summary: "null" },
50
+ },
51
+ },
52
+ onChange: {
53
+ action: "onChange",
54
+ description: "Callback when all inputs are filled",
55
+ },
56
+ onPressRetryToken: {
57
+ action: "onPressRetryToken",
58
+ description: "Callback when the retry button is pressed",
59
+ },
60
+ },
61
+ };
62
+
63
+ export default meta;
64
+ type Story = StoryObj<typeof InputOTP>;
65
+
66
+ const Template = (args: React.ComponentProps<typeof InputOTP>) => {
67
+ const [value, setValue] = useState("");
68
+ return (
69
+ <View className="flex flex-col gap-300">
70
+ <InputOTP
71
+ {...args}
72
+ onChange={(val) => {
73
+ setValue(val);
74
+ args.onChange?.(val);
75
+ }}
76
+ />
77
+ {value && <Text>Entered value: {value}</Text>}
78
+ </View>
79
+ );
80
+ };
81
+
82
+ export const Default: Story = {
83
+ render: (args) => <Template {...args} />,
84
+ args: {
85
+ OTPInputsQuantity: 6,
86
+ },
87
+ };
88
+
89
+ export const Rounded: Story = {
90
+ render: (args) => <Template {...args} />,
91
+ args: {
92
+ rounded: true,
93
+ },
94
+ };
95
+
96
+ export const Disabled: Story = {
97
+ render: (args) => <Template {...args} />,
98
+ args: {
99
+ disabled: true,
100
+ },
101
+ };
102
+
103
+ export const WithCustomInformation: Story = {
104
+ render: (args) => (
105
+ <InputOTP
106
+ {...args}
107
+ customInformation={
108
+ <View>
109
+ <Text className="text-label_medium_700 text-blackberry-500">
110
+ O código realmente é esse?
111
+ </Text>
112
+ <Text className="text-label_medium_700 text-chia-900">
113
+ Tente novamente
114
+ </Text>
115
+ </View>
116
+ }
117
+ />
118
+ ),
119
+ args: {
120
+ status: InformationStatusEnum.ERROR,
121
+ disabled: true,
122
+ },
123
+ };
124
+
125
+ export const WithInformationStatusDefault: Story = {
126
+ render: (args) => <InputOTP {...args} />,
127
+ };
128
+
129
+ export const WithInformationStatusCooldown: Story = {
130
+ render: (args) => <InputOTP {...args} />,
131
+ args: {
132
+ disabled: true,
133
+ status: InformationStatusEnum.COOLDOWN,
134
+ onPressRetryToken: () => {
135
+ console.log("Resending...");
136
+ },
137
+ },
138
+ };
139
+
140
+ export const WithInformationStatusError: Story = {
141
+ render: (args) => <InputOTP {...args} />,
142
+ args: {
143
+ status: InformationStatusEnum.ERROR,
144
+ disabled: true,
145
+ },
146
+ };
147
+
148
+ export const WithInformationStatusLoading: Story = {
149
+ render: (args) => <InputOTP {...args} />,
150
+ args: {
151
+ disabled: true,
152
+ status: InformationStatusEnum.LOADING,
153
+ },
154
+ };
155
+
156
+ export const WithInformationStatusSuccess: Story = {
157
+ render: (args) => <InputOTP {...args} />,
158
+ args: {
159
+ disabled: true,
160
+ status: InformationStatusEnum.SUCCESS,
161
+ },
162
+ };
163
+
164
+ export const Interactive: Story = {
165
+ render: (args) => {
166
+ function generateRandomInterval(OTPInputsQuantity: number): string {
167
+ const result: string[] = [];
168
+ const digitsPerBlock = 1;
169
+
170
+ for (let count = 0; count < OTPInputsQuantity; count++) {
171
+ let inputDigit = "";
172
+ for (let j = 0; j < digitsPerBlock; j++) {
173
+ inputDigit += Math.floor(Math.random() * 10);
174
+ }
175
+ result.push(inputDigit);
176
+ }
177
+
178
+ return result.join("");
179
+ }
180
+
181
+ const mockDelay = (ms: number) =>
182
+ new Promise((resolve) => setTimeout(resolve, ms));
183
+
184
+ async function handleClick(inputValue: string) {
185
+ setStatus(InformationStatusEnum.LOADING);
186
+ try {
187
+ await mockDelay(3000);
188
+ if (inputValue === validToken) {
189
+ setStatus(InformationStatusEnum.SUCCESS);
190
+ return;
191
+ }
192
+ setStatus(InformationStatusEnum.ERROR);
193
+ } catch (error) {
194
+ console.error("Error during token validation:", error);
195
+ setStatus(InformationStatusEnum.ERROR);
196
+ }
197
+ }
198
+
199
+ const [status, setStatus] = useState<InformationStatusEnum>(
200
+ InformationStatusEnum.DEFAULT
201
+ );
202
+ const [validToken] = useState(() =>
203
+ generateRandomInterval(args.OTPInputsQuantity ?? 6)
204
+ );
205
+
206
+ const handleOTPChange = async (inputValue: string) => {
207
+ args.onChange?.(inputValue);
208
+
209
+ if (inputValue.length === (args.OTPInputsQuantity ?? 6)) {
210
+ setStatus(InformationStatusEnum.LOADING);
211
+
212
+ await mockDelay(3000);
213
+
214
+ if (inputValue === validToken) {
215
+ setStatus(InformationStatusEnum.SUCCESS);
216
+
217
+ return;
218
+ }
219
+
220
+ if (inputValue !== validToken) {
221
+ setStatus(InformationStatusEnum.ERROR);
222
+
223
+ return;
224
+ }
225
+
226
+ setStatus(InformationStatusEnum.DEFAULT);
227
+ }
228
+ };
229
+
230
+ return (
231
+ <>
232
+ <InputOTP
233
+ {...args}
234
+ onChange={handleOTPChange}
235
+ disabled={status === InformationStatusEnum.LOADING}
236
+ status={status}
237
+ onPressRetryToken={handleClick}
238
+ />
239
+
240
+ <View className="mt-900">
241
+ <Text>Token correto esperado: {validToken}</Text>
242
+ <Text>Status atual: {status}</Text>
243
+ </View>
244
+ </>
245
+ );
246
+ },
247
+ };
@@ -0,0 +1,177 @@
1
+ import { useRef, useState } from "react";
2
+ import {
3
+ View,
4
+ TextInput,
5
+ NativeSyntheticEvent,
6
+ TextInputKeyPressEventData,
7
+ Platform,
8
+ TextInputFocusEventData,
9
+ TextInputChangeEventData,
10
+ } from "react-native";
11
+ import type { InputOTPProps } from "./types";
12
+ import { merge } from "@butterfly/tailwind-preset";
13
+ import { InformationStatus } from "./components";
14
+ import { InformationStatusEnum } from "./enums";
15
+
16
+ export function InputOTP(props: InputOTPProps) {
17
+ const {
18
+ status = InformationStatusEnum.DEFAULT,
19
+ OTPInputsQuantity = 6,
20
+ customInformation,
21
+ rounded = false,
22
+ disabled = false,
23
+ onChange,
24
+ onPressRetryToken,
25
+ } = props;
26
+
27
+ const inputsRef = useRef<Array<TextInput | null>>([]);
28
+ const [inputValues, setInputValues] = useState<string[]>(
29
+ Array(OTPInputsQuantity).fill("")
30
+ );
31
+ const hasError = status === InformationStatusEnum.ERROR;
32
+
33
+ function handlePress() {
34
+ const values = [...inputValues];
35
+ const inputRefValuesJoined = values.join("");
36
+
37
+ if (inputRefValuesJoined.length === OTPInputsQuantity) {
38
+ onPressRetryToken?.(inputRefValuesJoined);
39
+ }
40
+ }
41
+
42
+ const handleChange = (
43
+ event: NativeSyntheticEvent<TextInputChangeEventData>,
44
+ index: number
45
+ ) => {
46
+ const text = event.nativeEvent.text;
47
+ const newValues = [...inputValues];
48
+
49
+ if (text.length > 1) {
50
+ const chars = text.split("");
51
+ let targetIndex = index;
52
+ chars.forEach((char) => {
53
+ if (targetIndex < OTPInputsQuantity) {
54
+ newValues[targetIndex] = char;
55
+ targetIndex++;
56
+ }
57
+ });
58
+ setInputValues(newValues);
59
+ onChange?.(newValues.join(""));
60
+
61
+ const nextEmptyIndex = newValues.findIndex((value) => !value);
62
+ if (nextEmptyIndex !== -1) {
63
+ inputsRef.current[nextEmptyIndex]?.focus();
64
+ } else {
65
+ inputsRef.current[OTPInputsQuantity - 1]?.focus();
66
+ }
67
+ return;
68
+ }
69
+
70
+ newValues[index] = text;
71
+ setInputValues(newValues);
72
+ onChange?.(newValues.join(""));
73
+
74
+ if (text && index < OTPInputsQuantity - 1) {
75
+ const nextEmptyIndex = newValues.findIndex((v, i) => i > index && !v);
76
+ if (nextEmptyIndex !== -1) {
77
+ inputsRef.current[nextEmptyIndex]?.focus();
78
+ }
79
+ }
80
+ };
81
+
82
+ const handleKeyDown = (
83
+ e: NativeSyntheticEvent<TextInputKeyPressEventData>,
84
+ index: number
85
+ ) => {
86
+ if (e.nativeEvent.key === "Backspace") {
87
+ const hasValueAhead = inputValues.slice(index + 1).some((value) => value);
88
+
89
+ if (hasValueAhead) {
90
+ const lastFilledIndex = [...inputValues]
91
+ .map((value, i) => (value ? i : -1))
92
+ .filter((i) => i !== -1)
93
+ .pop();
94
+
95
+ if (lastFilledIndex !== undefined) {
96
+ inputsRef.current[lastFilledIndex]?.focus();
97
+ }
98
+ return;
99
+ }
100
+
101
+ if (inputValues[index]) {
102
+ const newValues = [...inputValues];
103
+ newValues[index] = "";
104
+ setInputValues(newValues);
105
+ }
106
+ if (index > 0) {
107
+ inputsRef.current[index - 1]?.focus();
108
+ }
109
+ }
110
+ };
111
+
112
+ const handleFocus = (
113
+ event: NativeSyntheticEvent<TextInputFocusEventData>,
114
+ index: number
115
+ ) => {
116
+ const firstEmptyIndex = inputValues.findIndex((value) => !value);
117
+
118
+ if (firstEmptyIndex !== -1 && index > firstEmptyIndex) {
119
+ inputsRef.current[firstEmptyIndex]?.focus();
120
+ event.preventDefault();
121
+ return;
122
+ }
123
+
124
+ if (firstEmptyIndex === -1 && index < OTPInputsQuantity - 1) {
125
+ inputsRef.current[OTPInputsQuantity - 1]?.focus();
126
+ event.preventDefault();
127
+ }
128
+ };
129
+
130
+ function renderInformationStatus() {
131
+ if (customInformation) {
132
+ return <>{customInformation}</>;
133
+ }
134
+
135
+ return <InformationStatus status={status} onPress={handlePress} />;
136
+ }
137
+
138
+ const inputStyle = merge(
139
+ "w-1000 h-1100 text-center text-3 font-bold leading-3 border-100 bg-chia-100 placeholder-chia-400",
140
+ rounded ? "rounded-700" : "rounded-500",
141
+ disabled ? "opacity-50" : "",
142
+ hasError
143
+ ? "border-blackberry-500 text-blackberry-500"
144
+ : "border-chia-400 text-chia-900"
145
+ );
146
+
147
+ return (
148
+ <View className="flex flex-col items-center gap-600">
149
+ <View className="flex-row gap-300 max-w-[280px] items-center justify-between">
150
+ {Array.from({ length: OTPInputsQuantity }).map((_, i) => (
151
+ <TextInput
152
+ ref={(ref) => {
153
+ inputsRef.current[i] = ref;
154
+ }}
155
+ key={`otp-input-${i}`}
156
+ textContentType="oneTimeCode"
157
+ placeholder="_"
158
+ className={inputStyle}
159
+ autoComplete={
160
+ Platform.OS === "android" ? "sms-otp" : "one-time-code"
161
+ }
162
+ placeholderTextColor="#DEE7E7"
163
+ editable={!disabled}
164
+ value={inputValues[i]}
165
+ onChange={(e) => handleChange(e, i)}
166
+ onKeyPress={(e) => handleKeyDown(e, i)}
167
+ onFocus={(e) => handleFocus(e, i)}
168
+ />
169
+ ))}
170
+ </View>
171
+
172
+ {renderInformationStatus()}
173
+ </View>
174
+ );
175
+ }
176
+
177
+ export default InputOTP;
@@ -0,0 +1,12 @@
1
+ import type React from "react";
2
+ import type { InformationStatusEnum } from "./enums";
3
+
4
+ export interface InputOTPProps {
5
+ OTPInputsQuantity?: number;
6
+ rounded?: boolean;
7
+ disabled?: boolean;
8
+ status?: InformationStatusEnum;
9
+ customInformation?: React.ReactNode;
10
+ onChange: (value: string) => void;
11
+ onPressRetryToken?: (value: string) => void;
12
+ }
@@ -0,0 +1 @@
1
+ {"v":"4.8.0","meta":{"g":"LottieFiles AE 1.0.0","a":"","k":"","d":"","tc":"none"},"fr":60,"ip":9,"op":41,"w":96,"h":96,"nm":"Comp 1","ddd":0,"assets":[{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"ball4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":0,"k":223,"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.534],"y":[0]},"t":25,"s":[169.5]},{"i":{"x":[0.424],"y":[1]},"o":{"x":[0.514],"y":[0]},"t":40,"s":[129.5]},{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.054],"y":[0]},"t":55,"s":[169.5]},{"t":70,"s":[129.5]}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-14.359],[14.359,0],[0,14.359],[-14.359,0]],"o":[[0,14.359],[-14.359,0],[0,-14.359],[14.359,0]],"v":[[26,0],[0,26],[-26,0],[0,-26]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.3607843137254902,0.38823529411764707,0.38823529411764707,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":40,"op":71,"st":25,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"ball 4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":0,"k":150,"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.534],"y":[0]},"t":20,"s":[169.5]},{"i":{"x":[0.424],"y":[1]},"o":{"x":[0.514],"y":[0]},"t":35,"s":[129.5]},{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.054],"y":[0]},"t":50,"s":[169.5]},{"t":65,"s":[129.5]}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-14.359],[14.359,0],[0,14.359],[-14.359,0]],"o":[[0,14.359],[-14.359,0],[0,-14.359],[14.359,0]],"v":[[26,0],[0,26],[-26,0],[0,-26]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.3607843137254902,0.38823529411764707,0.38823529411764707,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":35,"op":66,"st":20,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"ball 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":0,"k":77,"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.534],"y":[0]},"t":15,"s":[169.5]},{"i":{"x":[0.424],"y":[1]},"o":{"x":[0.514],"y":[0]},"t":30,"s":[129.5]},{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.054],"y":[0]},"t":45,"s":[169.5]},{"t":60,"s":[129.5]}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-14.359],[14.359,0],[0,14.359],[-14.359,0]],"o":[[0,14.359],[-14.359,0],[0,-14.359],[14.359,0]],"v":[[26,0],[0,26],[-26,0],[0,-26]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.3607843137254902,0.38823529411764707,0.38823529411764707,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":30,"op":61,"st":15,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"ball3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":0,"k":223,"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.534],"y":[0]},"t":-6,"s":[169.5]},{"i":{"x":[0.424],"y":[1]},"o":{"x":[0.514],"y":[0]},"t":9,"s":[129.5]},{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.054],"y":[0]},"t":24,"s":[169.5]},{"t":39,"s":[129.5]}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-14.359],[14.359,0],[0,14.359],[-14.359,0]],"o":[[0,14.359],[-14.359,0],[0,-14.359],[14.359,0]],"v":[[26,0],[0,26],[-26,0],[0,-26]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.3607843137254902,0.38823529411764707,0.38823529411764707,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":9,"op":40,"st":-6,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"ball 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":0,"k":150,"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.534],"y":[0]},"t":-11,"s":[169.5]},{"i":{"x":[0.424],"y":[1]},"o":{"x":[0.514],"y":[0]},"t":4,"s":[129.5]},{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.054],"y":[0]},"t":19,"s":[169.5]},{"t":34,"s":[129.5]}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-14.359],[14.359,0],[0,14.359],[-14.359,0]],"o":[[0,14.359],[-14.359,0],[0,-14.359],[14.359,0]],"v":[[26,0],[0,26],[-26,0],[0,-26]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.3607843137254902,0.38823529411764707,0.38823529411764707,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":4,"op":35,"st":-11,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"ball 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":0,"k":77,"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.534],"y":[0]},"t":-16,"s":[169.5]},{"i":{"x":[0.424],"y":[1]},"o":{"x":[0.514],"y":[0]},"t":-1,"s":[129.5]},{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.054],"y":[0]},"t":14,"s":[169.5]},{"t":29,"s":[129.5]}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-14.359],[14.359,0],[0,14.359],[-14.359,0]],"o":[[0,14.359],[-14.359,0],[0,-14.359],[14.359,0]],"v":[[26,0],[0,26],[-26,0],[0,-26]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.3607843137254902,0.38823529411764707,0.38823529411764707,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":-1,"op":30,"st":-16,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"Pre-comp 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[150,150,0],"ix":2},"a":{"a":0,"k":[395,400,0],"ix":1},"s":{"a":0,"k":[41,41,100],"ix":6}},"ao":0,"w":300,"h":300,"ip":0,"op":211,"st":0,"bm":0}],"markers":[]}
@@ -0,0 +1 @@
1
+ {"v":"4.8.0","meta":{"g":"LottieFiles AE 1.0.0","a":"","k":"","d":"","tc":"none"},"fr":60,"ip":9,"op":41,"w":96,"h":96,"nm":"Comp 1","ddd":0,"assets":[{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"ball4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":0,"k":223,"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.534],"y":[0]},"t":25,"s":[169.5]},{"i":{"x":[0.424],"y":[1]},"o":{"x":[0.514],"y":[0]},"t":40,"s":[129.5]},{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.054],"y":[0]},"t":55,"s":[169.5]},{"t":70,"s":[129.5]}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-14.359],[14.359,0],[0,14.359],[-14.359,0]],"o":[[0,14.359],[-14.359,0],[0,-14.359],[14.359,0]],"v":[[26,0],[0,26],[-26,0],[0,-26]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.47843137254901963,0.3137254901960784,0.8509803921568627,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":40,"op":71,"st":25,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"ball 4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":0,"k":150,"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.534],"y":[0]},"t":20,"s":[169.5]},{"i":{"x":[0.424],"y":[1]},"o":{"x":[0.514],"y":[0]},"t":35,"s":[129.5]},{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.054],"y":[0]},"t":50,"s":[169.5]},{"t":65,"s":[129.5]}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-14.359],[14.359,0],[0,14.359],[-14.359,0]],"o":[[0,14.359],[-14.359,0],[0,-14.359],[14.359,0]],"v":[[26,0],[0,26],[-26,0],[0,-26]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.47843137254901963,0.3137254901960784,0.8509803921568627,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":35,"op":66,"st":20,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"ball 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":0,"k":77,"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.534],"y":[0]},"t":15,"s":[169.5]},{"i":{"x":[0.424],"y":[1]},"o":{"x":[0.514],"y":[0]},"t":30,"s":[129.5]},{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.054],"y":[0]},"t":45,"s":[169.5]},{"t":60,"s":[129.5]}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-14.359],[14.359,0],[0,14.359],[-14.359,0]],"o":[[0,14.359],[-14.359,0],[0,-14.359],[14.359,0]],"v":[[26,0],[0,26],[-26,0],[0,-26]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.47843137254901963,0.3137254901960784,0.8509803921568627,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":30,"op":61,"st":15,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"ball3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":0,"k":223,"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.534],"y":[0]},"t":-6,"s":[169.5]},{"i":{"x":[0.424],"y":[1]},"o":{"x":[0.514],"y":[0]},"t":9,"s":[129.5]},{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.054],"y":[0]},"t":24,"s":[169.5]},{"t":39,"s":[129.5]}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-14.359],[14.359,0],[0,14.359],[-14.359,0]],"o":[[0,14.359],[-14.359,0],[0,-14.359],[14.359,0]],"v":[[26,0],[0,26],[-26,0],[0,-26]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.47843137254901963,0.3137254901960784,0.8509803921568627,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":9,"op":40,"st":-6,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"ball 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":0,"k":150,"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.534],"y":[0]},"t":-11,"s":[169.5]},{"i":{"x":[0.424],"y":[1]},"o":{"x":[0.514],"y":[0]},"t":4,"s":[129.5]},{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.054],"y":[0]},"t":19,"s":[169.5]},{"t":34,"s":[129.5]}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-14.359],[14.359,0],[0,14.359],[-14.359,0]],"o":[[0,14.359],[-14.359,0],[0,-14.359],[14.359,0]],"v":[[26,0],[0,26],[-26,0],[0,-26]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.47843137254901963,0.3137254901960784,0.8509803921568627,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":4,"op":35,"st":-11,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"ball 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":0,"k":77,"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.534],"y":[0]},"t":-16,"s":[169.5]},{"i":{"x":[0.424],"y":[1]},"o":{"x":[0.514],"y":[0]},"t":-1,"s":[129.5]},{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.054],"y":[0]},"t":14,"s":[169.5]},{"t":29,"s":[129.5]}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-14.359],[14.359,0],[0,14.359],[-14.359,0]],"o":[[0,14.359],[-14.359,0],[0,-14.359],[14.359,0]],"v":[[26,0],[0,26],[-26,0],[0,-26]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.47843137254901963,0.3137254901960784,0.8509803921568627,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":-1,"op":30,"st":-16,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"Pre-comp 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[150,150,0],"ix":2},"a":{"a":0,"k":[395,400,0],"ix":1},"s":{"a":0,"k":[41,41,100],"ix":6}},"ao":0,"w":300,"h":300,"ip":0,"op":211,"st":0,"bm":0}],"markers":[]}
@@ -0,0 +1 @@
1
+ {"v":"4.8.0","meta":{"g":"LottieFiles AE 1.0.0","a":"","k":"","d":"","tc":"none"},"fr":60,"ip":9,"op":41,"w":96,"h":96,"nm":"Comp 1","ddd":0,"assets":[{"id":"comp_0","layers":[{"ddd":0,"ind":1,"ty":4,"nm":"ball4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":0,"k":223,"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.534],"y":[0]},"t":25,"s":[169.5]},{"i":{"x":[0.424],"y":[1]},"o":{"x":[0.514],"y":[0]},"t":40,"s":[129.5]},{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.054],"y":[0]},"t":55,"s":[169.5]},{"t":70,"s":[129.5]}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-14.359],[14.359,0],[0,14.359],[-14.359,0]],"o":[[0,14.359],[-14.359,0],[0,-14.359],[14.359,0]],"v":[[26,0],[0,26],[-26,0],[0,-26]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.9803921568627451,0.9882352941176471,0.9882352941176471,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":40,"op":71,"st":25,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"ball 4","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":0,"k":150,"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.534],"y":[0]},"t":20,"s":[169.5]},{"i":{"x":[0.424],"y":[1]},"o":{"x":[0.514],"y":[0]},"t":35,"s":[129.5]},{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.054],"y":[0]},"t":50,"s":[169.5]},{"t":65,"s":[129.5]}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-14.359],[14.359,0],[0,14.359],[-14.359,0]],"o":[[0,14.359],[-14.359,0],[0,-14.359],[14.359,0]],"v":[[26,0],[0,26],[-26,0],[0,-26]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.9803921568627451,0.9882352941176471,0.9882352941176471,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":35,"op":66,"st":20,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"ball 3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":0,"k":77,"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.534],"y":[0]},"t":15,"s":[169.5]},{"i":{"x":[0.424],"y":[1]},"o":{"x":[0.514],"y":[0]},"t":30,"s":[129.5]},{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.054],"y":[0]},"t":45,"s":[169.5]},{"t":60,"s":[129.5]}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-14.359],[14.359,0],[0,14.359],[-14.359,0]],"o":[[0,14.359],[-14.359,0],[0,-14.359],[14.359,0]],"v":[[26,0],[0,26],[-26,0],[0,-26]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.9803921568627451,0.9882352941176471,0.9882352941176471,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":30,"op":61,"st":15,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"ball3","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":0,"k":223,"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.534],"y":[0]},"t":-6,"s":[169.5]},{"i":{"x":[0.424],"y":[1]},"o":{"x":[0.514],"y":[0]},"t":9,"s":[129.5]},{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.054],"y":[0]},"t":24,"s":[169.5]},{"t":39,"s":[129.5]}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-14.359],[14.359,0],[0,14.359],[-14.359,0]],"o":[[0,14.359],[-14.359,0],[0,-14.359],[14.359,0]],"v":[[26,0],[0,26],[-26,0],[0,-26]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.9803921568627451,0.9882352941176471,0.9882352941176471,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":9,"op":40,"st":-6,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"ball 2","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":0,"k":150,"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.534],"y":[0]},"t":-11,"s":[169.5]},{"i":{"x":[0.424],"y":[1]},"o":{"x":[0.514],"y":[0]},"t":4,"s":[129.5]},{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.054],"y":[0]},"t":19,"s":[169.5]},{"t":34,"s":[129.5]}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-14.359],[14.359,0],[0,14.359],[-14.359,0]],"o":[[0,14.359],[-14.359,0],[0,-14.359],[14.359,0]],"v":[[26,0],[0,26],[-26,0],[0,-26]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.9803921568627451,0.9882352941176471,0.9882352941176471,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":4,"op":35,"st":-11,"bm":0},{"ddd":0,"ind":6,"ty":4,"nm":"ball 1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"s":true,"x":{"a":0,"k":77,"ix":3},"y":{"a":1,"k":[{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.534],"y":[0]},"t":-16,"s":[169.5]},{"i":{"x":[0.424],"y":[1]},"o":{"x":[0.514],"y":[0]},"t":-1,"s":[129.5]},{"i":{"x":[0.465],"y":[1]},"o":{"x":[0.054],"y":[0]},"t":14,"s":[169.5]},{"t":29,"s":[129.5]}],"ix":4}},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[0,-14.359],[14.359,0],[0,14.359],[-14.359,0]],"o":[[0,14.359],[-14.359,0],[0,-14.359],[14.359,0]],"v":[[26,0],[0,26],[-26,0],[0,-26]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.9803921568627451,0.9882352941176471,0.9882352941176471,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[0,0],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":-1,"op":30,"st":-16,"bm":0}]}],"layers":[{"ddd":0,"ind":1,"ty":0,"nm":"Pre-comp 1","refId":"comp_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[150,150,0],"ix":2},"a":{"a":0,"k":[395,400,0],"ix":1},"s":{"a":0,"k":[41,41,100],"ix":6}},"ao":0,"w":300,"h":300,"ip":0,"op":211,"st":0,"bm":0}],"markers":[]}
@@ -0,0 +1,74 @@
1
+ import { type Meta, type StoryObj } from "@storybook/react-native";
2
+ import { LoadingDots } from "./index";
3
+ import { View } from "react-native";
4
+ import { LoadingDotsVariant } from "./types";
5
+
6
+ const meta = {
7
+ title: "Components/LoadingDots",
8
+ component: LoadingDots,
9
+ parameters: {
10
+ layout: "centered",
11
+ docs: {
12
+ description: {
13
+ component: "A loading dots component with color variants.",
14
+ },
15
+ },
16
+ },
17
+ tags: ["autodocs"],
18
+ argTypes: {
19
+ variant: {
20
+ control: { type: "select" },
21
+ options: ["grape", "light", "dark"],
22
+ description: "The color variant of the dots",
23
+ },
24
+ },
25
+ } satisfies Meta<typeof LoadingDots>;
26
+
27
+ export default meta;
28
+ type Story = StoryObj<typeof meta>;
29
+
30
+ function renderLoadingDots({ variant }: { variant?: LoadingDotsVariant }) {
31
+ return (
32
+ <View style={{ width: 200, height: 200 }}>
33
+ <LoadingDots variant={variant} />
34
+ </View>
35
+ );
36
+ }
37
+
38
+ export const Default: Story = {
39
+ args: {
40
+ variant: "grape",
41
+ },
42
+
43
+ render: renderLoadingDots,
44
+ };
45
+
46
+ export const Grape: Story = {
47
+ args: {
48
+ variant: "grape",
49
+ },
50
+
51
+ render: renderLoadingDots,
52
+ };
53
+
54
+ export const Light: Story = {
55
+ args: {
56
+ variant: "light",
57
+ },
58
+ parameters: {
59
+ backgrounds: { default: "dark" },
60
+ },
61
+
62
+ render: renderLoadingDots,
63
+ };
64
+
65
+ export const Dark: Story = {
66
+ args: {
67
+ variant: "dark",
68
+ },
69
+ parameters: {
70
+ backgrounds: { default: "dark" },
71
+ },
72
+
73
+ render: renderLoadingDots,
74
+ };
@@ -0,0 +1,37 @@
1
+ import LottieView from "lottie-react-native";
2
+ import { Ref } from "react";
3
+ import type { LoadingDotsProps, LoadingDotsVariant } from "./types";
4
+ import { View, ViewStyle } from "react-native";
5
+
6
+ export const LoadingDots = ({
7
+ variant = "grape",
8
+ className,
9
+ style,
10
+ lottieViewStyle,
11
+ ref,
12
+ ...rest
13
+ }: LoadingDotsProps) => {
14
+ const variantsMap: Record<LoadingDotsVariant, string> = {
15
+ grape: require("./assets/loading-button-grape.json"),
16
+ light: require("./assets/loading-button-light.json"),
17
+ dark: require("./assets/loading-button-dark.json"),
18
+ };
19
+
20
+ const purposefulOverwrittenSrc = variantsMap[variant];
21
+
22
+ const narrowedStyle = (lottieViewStyle as ViewStyle) || {};
23
+
24
+ return (
25
+ <View className={className} style={style} ref={ref}>
26
+ <LottieView
27
+ loop={true}
28
+ autoPlay={true}
29
+ {...rest}
30
+ style={{ width: 24, height: 24, ...narrowedStyle }}
31
+ source={purposefulOverwrittenSrc}
32
+ />
33
+ </View>
34
+ );
35
+ };
36
+
37
+ export default LoadingDots;