@metamask/design-system-react-native 0.6.0 → 0.8.0

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 (427) hide show
  1. package/CHANGELOG.md +58 -1
  2. package/dist/components/AvatarBase/AvatarBase.cjs +9 -11
  3. package/dist/components/AvatarBase/AvatarBase.cjs.map +1 -1
  4. package/dist/components/AvatarBase/AvatarBase.d.cts.map +1 -1
  5. package/dist/components/AvatarBase/AvatarBase.d.mts.map +1 -1
  6. package/dist/components/AvatarBase/AvatarBase.mjs +9 -11
  7. package/dist/components/AvatarBase/AvatarBase.mjs.map +1 -1
  8. package/dist/components/AvatarFavicon/AvatarFavicon.cjs +2 -2
  9. package/dist/components/AvatarFavicon/AvatarFavicon.cjs.map +1 -1
  10. package/dist/components/AvatarFavicon/AvatarFavicon.d.cts +1 -1
  11. package/dist/components/AvatarFavicon/AvatarFavicon.d.cts.map +1 -1
  12. package/dist/components/AvatarFavicon/AvatarFavicon.d.mts +1 -1
  13. package/dist/components/AvatarFavicon/AvatarFavicon.d.mts.map +1 -1
  14. package/dist/components/AvatarFavicon/AvatarFavicon.mjs +2 -2
  15. package/dist/components/AvatarFavicon/AvatarFavicon.mjs.map +1 -1
  16. package/dist/components/AvatarGroup/AvatarGroup.cjs +4 -5
  17. package/dist/components/AvatarGroup/AvatarGroup.cjs.map +1 -1
  18. package/dist/components/AvatarGroup/AvatarGroup.d.cts.map +1 -1
  19. package/dist/components/AvatarGroup/AvatarGroup.d.mts.map +1 -1
  20. package/dist/components/AvatarGroup/AvatarGroup.mjs +4 -5
  21. package/dist/components/AvatarGroup/AvatarGroup.mjs.map +1 -1
  22. package/dist/components/AvatarIcon/AvatarIcon.cjs +5 -6
  23. package/dist/components/AvatarIcon/AvatarIcon.cjs.map +1 -1
  24. package/dist/components/AvatarIcon/AvatarIcon.d.cts.map +1 -1
  25. package/dist/components/AvatarIcon/AvatarIcon.d.mts.map +1 -1
  26. package/dist/components/AvatarIcon/AvatarIcon.mjs +5 -6
  27. package/dist/components/AvatarIcon/AvatarIcon.mjs.map +1 -1
  28. package/dist/components/AvatarNetwork/AvatarNetwork.cjs +2 -2
  29. package/dist/components/AvatarNetwork/AvatarNetwork.cjs.map +1 -1
  30. package/dist/components/AvatarNetwork/AvatarNetwork.d.cts +1 -1
  31. package/dist/components/AvatarNetwork/AvatarNetwork.d.cts.map +1 -1
  32. package/dist/components/AvatarNetwork/AvatarNetwork.d.mts +1 -1
  33. package/dist/components/AvatarNetwork/AvatarNetwork.d.mts.map +1 -1
  34. package/dist/components/AvatarNetwork/AvatarNetwork.mjs +2 -2
  35. package/dist/components/AvatarNetwork/AvatarNetwork.mjs.map +1 -1
  36. package/dist/components/AvatarToken/AvatarToken.cjs +2 -2
  37. package/dist/components/AvatarToken/AvatarToken.cjs.map +1 -1
  38. package/dist/components/AvatarToken/AvatarToken.d.cts +1 -1
  39. package/dist/components/AvatarToken/AvatarToken.d.cts.map +1 -1
  40. package/dist/components/AvatarToken/AvatarToken.d.mts +1 -1
  41. package/dist/components/AvatarToken/AvatarToken.d.mts.map +1 -1
  42. package/dist/components/AvatarToken/AvatarToken.mjs +2 -2
  43. package/dist/components/AvatarToken/AvatarToken.mjs.map +1 -1
  44. package/dist/components/BadgeCount/BadgeCount.cjs +5 -10
  45. package/dist/components/BadgeCount/BadgeCount.cjs.map +1 -1
  46. package/dist/components/BadgeCount/BadgeCount.d.cts.map +1 -1
  47. package/dist/components/BadgeCount/BadgeCount.d.mts.map +1 -1
  48. package/dist/components/BadgeCount/BadgeCount.mjs +5 -10
  49. package/dist/components/BadgeCount/BadgeCount.mjs.map +1 -1
  50. package/dist/components/BadgeIcon/BadgeIcon.cjs +5 -10
  51. package/dist/components/BadgeIcon/BadgeIcon.cjs.map +1 -1
  52. package/dist/components/BadgeIcon/BadgeIcon.d.cts.map +1 -1
  53. package/dist/components/BadgeIcon/BadgeIcon.d.mts.map +1 -1
  54. package/dist/components/BadgeIcon/BadgeIcon.mjs +5 -10
  55. package/dist/components/BadgeIcon/BadgeIcon.mjs.map +1 -1
  56. package/dist/components/BadgeStatus/BadgeStatus.cjs +6 -6
  57. package/dist/components/BadgeStatus/BadgeStatus.cjs.map +1 -1
  58. package/dist/components/BadgeStatus/BadgeStatus.constants.cjs +8 -8
  59. package/dist/components/BadgeStatus/BadgeStatus.constants.cjs.map +1 -1
  60. package/dist/components/BadgeStatus/BadgeStatus.constants.d.cts +1 -1
  61. package/dist/components/BadgeStatus/BadgeStatus.constants.d.cts.map +1 -1
  62. package/dist/components/BadgeStatus/BadgeStatus.constants.d.mts +1 -1
  63. package/dist/components/BadgeStatus/BadgeStatus.constants.d.mts.map +1 -1
  64. package/dist/components/BadgeStatus/BadgeStatus.constants.mjs +1 -1
  65. package/dist/components/BadgeStatus/BadgeStatus.constants.mjs.map +1 -1
  66. package/dist/components/BadgeStatus/BadgeStatus.d.cts.map +1 -1
  67. package/dist/components/BadgeStatus/BadgeStatus.d.mts.map +1 -1
  68. package/dist/components/BadgeStatus/BadgeStatus.mjs +6 -6
  69. package/dist/components/BadgeStatus/BadgeStatus.mjs.map +1 -1
  70. package/dist/components/BadgeStatus/BadgeStatus.types.cjs.map +1 -1
  71. package/dist/components/BadgeStatus/BadgeStatus.types.d.cts +5 -29
  72. package/dist/components/BadgeStatus/BadgeStatus.types.d.cts.map +1 -1
  73. package/dist/components/BadgeStatus/BadgeStatus.types.d.mts +5 -29
  74. package/dist/components/BadgeStatus/BadgeStatus.types.d.mts.map +1 -1
  75. package/dist/components/BadgeStatus/BadgeStatus.types.mjs.map +1 -1
  76. package/dist/components/BadgeStatus/index.cjs +4 -4
  77. package/dist/components/BadgeStatus/index.cjs.map +1 -1
  78. package/dist/components/BadgeStatus/index.d.cts +1 -1
  79. package/dist/components/BadgeStatus/index.d.cts.map +1 -1
  80. package/dist/components/BadgeStatus/index.d.mts +1 -1
  81. package/dist/components/BadgeStatus/index.d.mts.map +1 -1
  82. package/dist/components/BadgeStatus/index.mjs +1 -1
  83. package/dist/components/BadgeStatus/index.mjs.map +1 -1
  84. package/dist/components/BadgeWrapper/BadgeWrapper.cjs +3 -3
  85. package/dist/components/BadgeWrapper/BadgeWrapper.cjs.map +1 -1
  86. package/dist/components/BadgeWrapper/BadgeWrapper.d.cts.map +1 -1
  87. package/dist/components/BadgeWrapper/BadgeWrapper.d.mts.map +1 -1
  88. package/dist/components/BadgeWrapper/BadgeWrapper.mjs +3 -3
  89. package/dist/components/BadgeWrapper/BadgeWrapper.mjs.map +1 -1
  90. package/dist/components/BottomSheetFooter/BottomSheetFooter.cjs +35 -0
  91. package/dist/components/BottomSheetFooter/BottomSheetFooter.cjs.map +1 -0
  92. package/dist/components/BottomSheetFooter/BottomSheetFooter.d.cts +4 -0
  93. package/dist/components/BottomSheetFooter/BottomSheetFooter.d.cts.map +1 -0
  94. package/dist/components/BottomSheetFooter/BottomSheetFooter.d.mts +4 -0
  95. package/dist/components/BottomSheetFooter/BottomSheetFooter.d.mts.map +1 -0
  96. package/dist/components/BottomSheetFooter/BottomSheetFooter.mjs +35 -0
  97. package/dist/components/BottomSheetFooter/BottomSheetFooter.mjs.map +1 -0
  98. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.cjs +12 -0
  99. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.cjs.map +1 -0
  100. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.d.cts +41 -0
  101. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.d.cts.map +1 -0
  102. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.d.mts +41 -0
  103. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.d.mts.map +1 -0
  104. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.mjs +9 -0
  105. package/dist/components/BottomSheetFooter/BottomSheetFooter.types.mjs.map +1 -0
  106. package/dist/components/BottomSheetFooter/index.cjs +8 -0
  107. package/dist/components/BottomSheetFooter/index.cjs.map +1 -0
  108. package/dist/components/BottomSheetFooter/index.d.cts +4 -0
  109. package/dist/components/BottomSheetFooter/index.d.cts.map +1 -0
  110. package/dist/components/BottomSheetFooter/index.d.mts +4 -0
  111. package/dist/components/BottomSheetFooter/index.d.mts.map +1 -0
  112. package/dist/components/BottomSheetFooter/index.mjs +3 -0
  113. package/dist/components/BottomSheetFooter/index.mjs.map +1 -0
  114. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.cjs +51 -0
  115. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.cjs.map +1 -0
  116. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.constants.cjs +7 -0
  117. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.constants.cjs.map +1 -0
  118. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.constants.d.cts +3 -0
  119. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.constants.d.cts.map +1 -0
  120. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.constants.d.mts +3 -0
  121. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.constants.d.mts.map +1 -0
  122. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.constants.mjs +4 -0
  123. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.constants.mjs.map +1 -0
  124. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.d.cts +4 -0
  125. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.d.cts.map +1 -0
  126. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.d.mts +4 -0
  127. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.d.mts.map +1 -0
  128. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.mjs +31 -0
  129. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.mjs.map +1 -0
  130. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.cjs +3 -0
  131. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.cjs.map +1 -0
  132. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.d.cts +20 -0
  133. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.d.cts.map +1 -0
  134. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.d.mts +20 -0
  135. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.d.mts.map +1 -0
  136. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.mjs +2 -0
  137. package/dist/components/BottomSheetOverlay/BottomSheetOverlay.types.mjs.map +1 -0
  138. package/dist/components/BottomSheetOverlay/index.cjs +6 -0
  139. package/dist/components/BottomSheetOverlay/index.cjs.map +1 -0
  140. package/dist/components/BottomSheetOverlay/index.d.cts +3 -0
  141. package/dist/components/BottomSheetOverlay/index.d.cts.map +1 -0
  142. package/dist/components/BottomSheetOverlay/index.d.mts +3 -0
  143. package/dist/components/BottomSheetOverlay/index.d.mts.map +1 -0
  144. package/dist/components/BottomSheetOverlay/index.mjs +2 -0
  145. package/dist/components/BottomSheetOverlay/index.mjs.map +1 -0
  146. package/dist/components/Box/Box.cjs +12 -27
  147. package/dist/components/Box/Box.cjs.map +1 -1
  148. package/dist/components/Box/Box.d.cts.map +1 -1
  149. package/dist/components/Box/Box.d.mts.map +1 -1
  150. package/dist/components/Box/Box.mjs +12 -27
  151. package/dist/components/Box/Box.mjs.map +1 -1
  152. package/dist/components/ButtonBase/ButtonBase.cjs +50 -41
  153. package/dist/components/ButtonBase/ButtonBase.cjs.map +1 -1
  154. package/dist/components/ButtonBase/ButtonBase.d.cts.map +1 -1
  155. package/dist/components/ButtonBase/ButtonBase.d.mts.map +1 -1
  156. package/dist/components/ButtonBase/ButtonBase.mjs +50 -41
  157. package/dist/components/ButtonBase/ButtonBase.mjs.map +1 -1
  158. package/dist/components/ButtonIcon/ButtonIcon.cjs +5 -10
  159. package/dist/components/ButtonIcon/ButtonIcon.cjs.map +1 -1
  160. package/dist/components/ButtonIcon/ButtonIcon.d.cts.map +1 -1
  161. package/dist/components/ButtonIcon/ButtonIcon.d.mts.map +1 -1
  162. package/dist/components/ButtonIcon/ButtonIcon.mjs +5 -10
  163. package/dist/components/ButtonIcon/ButtonIcon.mjs.map +1 -1
  164. package/dist/components/Card/Card.cjs +26 -0
  165. package/dist/components/Card/Card.cjs.map +1 -0
  166. package/dist/components/Card/Card.d.cts +4 -0
  167. package/dist/components/Card/Card.d.cts.map +1 -0
  168. package/dist/components/Card/Card.d.mts +4 -0
  169. package/dist/components/Card/Card.d.mts.map +1 -0
  170. package/dist/components/Card/Card.mjs +26 -0
  171. package/dist/components/Card/Card.mjs.map +1 -0
  172. package/dist/components/Card/Card.types.cjs +3 -0
  173. package/dist/components/Card/Card.types.cjs.map +1 -0
  174. package/dist/components/Card/Card.types.d.cts +25 -0
  175. package/dist/components/Card/Card.types.d.cts.map +1 -0
  176. package/dist/components/Card/Card.types.d.mts +25 -0
  177. package/dist/components/Card/Card.types.d.mts.map +1 -0
  178. package/dist/components/Card/Card.types.mjs +2 -0
  179. package/dist/components/Card/Card.types.mjs.map +1 -0
  180. package/dist/components/Card/index.cjs +6 -0
  181. package/dist/components/Card/index.cjs.map +1 -0
  182. package/dist/components/Card/index.d.cts +3 -0
  183. package/dist/components/Card/index.d.cts.map +1 -0
  184. package/dist/components/Card/index.d.mts +3 -0
  185. package/dist/components/Card/index.d.mts.map +1 -0
  186. package/dist/components/Card/index.mjs +2 -0
  187. package/dist/components/Card/index.mjs.map +1 -0
  188. package/dist/components/Checkbox/Checkbox.cjs +4 -4
  189. package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
  190. package/dist/components/Checkbox/Checkbox.d.cts.map +1 -1
  191. package/dist/components/Checkbox/Checkbox.d.mts.map +1 -1
  192. package/dist/components/Checkbox/Checkbox.mjs +4 -4
  193. package/dist/components/Checkbox/Checkbox.mjs.map +1 -1
  194. package/dist/components/HeaderBase/HeaderBase.cjs +123 -0
  195. package/dist/components/HeaderBase/HeaderBase.cjs.map +1 -0
  196. package/dist/components/HeaderBase/HeaderBase.d.cts +4 -0
  197. package/dist/components/HeaderBase/HeaderBase.d.cts.map +1 -0
  198. package/dist/components/HeaderBase/HeaderBase.d.mts +4 -0
  199. package/dist/components/HeaderBase/HeaderBase.d.mts.map +1 -0
  200. package/dist/components/HeaderBase/HeaderBase.mjs +103 -0
  201. package/dist/components/HeaderBase/HeaderBase.mjs.map +1 -0
  202. package/dist/components/HeaderBase/HeaderBase.types.cjs +3 -0
  203. package/dist/components/HeaderBase/HeaderBase.types.cjs.map +1 -0
  204. package/dist/components/HeaderBase/HeaderBase.types.d.cts +71 -0
  205. package/dist/components/HeaderBase/HeaderBase.types.d.cts.map +1 -0
  206. package/dist/components/HeaderBase/HeaderBase.types.d.mts +71 -0
  207. package/dist/components/HeaderBase/HeaderBase.types.d.mts.map +1 -0
  208. package/dist/components/HeaderBase/HeaderBase.types.mjs +2 -0
  209. package/dist/components/HeaderBase/HeaderBase.types.mjs.map +1 -0
  210. package/dist/components/HeaderBase/index.cjs +6 -0
  211. package/dist/components/HeaderBase/index.cjs.map +1 -0
  212. package/dist/components/HeaderBase/index.d.cts +3 -0
  213. package/dist/components/HeaderBase/index.d.cts.map +1 -0
  214. package/dist/components/HeaderBase/index.d.mts +3 -0
  215. package/dist/components/HeaderBase/index.d.mts.map +1 -0
  216. package/dist/components/HeaderBase/index.mjs +2 -0
  217. package/dist/components/HeaderBase/index.mjs.map +1 -0
  218. package/dist/components/Icon/Icon.assets.cjs +2 -0
  219. package/dist/components/Icon/Icon.assets.cjs.map +1 -1
  220. package/dist/components/Icon/Icon.assets.d.cts.map +1 -1
  221. package/dist/components/Icon/Icon.assets.d.mts.map +1 -1
  222. package/dist/components/Icon/Icon.assets.mjs +2 -0
  223. package/dist/components/Icon/Icon.assets.mjs.map +1 -1
  224. package/dist/components/Icon/Icon.cjs +4 -32
  225. package/dist/components/Icon/Icon.cjs.map +1 -1
  226. package/dist/components/Icon/Icon.d.cts.map +1 -1
  227. package/dist/components/Icon/Icon.d.mts.map +1 -1
  228. package/dist/components/Icon/Icon.mjs +2 -10
  229. package/dist/components/Icon/Icon.mjs.map +1 -1
  230. package/dist/components/Icon/assets/corporate-fare.svg +1 -0
  231. package/dist/components/Input/Input.cjs +53 -0
  232. package/dist/components/Input/Input.cjs.map +1 -0
  233. package/dist/components/Input/Input.d.cts +10 -0
  234. package/dist/components/Input/Input.d.cts.map +1 -0
  235. package/dist/components/Input/Input.d.mts +10 -0
  236. package/dist/components/Input/Input.d.mts.map +1 -0
  237. package/dist/components/Input/Input.mjs +50 -0
  238. package/dist/components/Input/Input.mjs.map +1 -0
  239. package/dist/components/Input/Input.types.cjs +3 -0
  240. package/dist/components/Input/Input.types.cjs.map +1 -0
  241. package/dist/components/Input/Input.types.d.cts +33 -0
  242. package/dist/components/Input/Input.types.d.cts.map +1 -0
  243. package/dist/components/Input/Input.types.d.mts +33 -0
  244. package/dist/components/Input/Input.types.d.mts.map +1 -0
  245. package/dist/components/Input/Input.types.mjs +2 -0
  246. package/dist/components/Input/Input.types.mjs.map +1 -0
  247. package/dist/components/Input/index.cjs +6 -0
  248. package/dist/components/Input/index.cjs.map +1 -0
  249. package/dist/components/Input/index.d.cts +3 -0
  250. package/dist/components/Input/index.d.cts.map +1 -0
  251. package/dist/components/Input/index.d.mts +3 -0
  252. package/dist/components/Input/index.d.mts.map +1 -0
  253. package/dist/components/Input/index.mjs +2 -0
  254. package/dist/components/Input/index.mjs.map +1 -0
  255. package/dist/components/Label/Label.cjs +11 -0
  256. package/dist/components/Label/Label.cjs.map +1 -0
  257. package/dist/components/Label/Label.d.cts +4 -0
  258. package/dist/components/Label/Label.d.cts.map +1 -0
  259. package/dist/components/Label/Label.d.mts +4 -0
  260. package/dist/components/Label/Label.d.mts.map +1 -0
  261. package/dist/components/Label/Label.mjs +11 -0
  262. package/dist/components/Label/Label.mjs.map +1 -0
  263. package/dist/components/Label/Label.types.cjs +3 -0
  264. package/dist/components/Label/Label.types.cjs.map +1 -0
  265. package/dist/components/Label/Label.types.d.cts +9 -0
  266. package/dist/components/Label/Label.types.d.cts.map +1 -0
  267. package/dist/components/Label/Label.types.d.mts +9 -0
  268. package/dist/components/Label/Label.types.d.mts.map +1 -0
  269. package/dist/components/Label/Label.types.mjs +2 -0
  270. package/dist/components/Label/Label.types.mjs.map +1 -0
  271. package/dist/components/Label/index.cjs +6 -0
  272. package/dist/components/Label/index.cjs.map +1 -0
  273. package/dist/components/Label/index.d.cts +3 -0
  274. package/dist/components/Label/index.d.cts.map +1 -0
  275. package/dist/components/Label/index.d.mts +3 -0
  276. package/dist/components/Label/index.d.mts.map +1 -0
  277. package/dist/components/Label/index.mjs +2 -0
  278. package/dist/components/Label/index.mjs.map +1 -0
  279. package/dist/components/RadioButton/RadioButton.cjs +58 -0
  280. package/dist/components/RadioButton/RadioButton.cjs.map +1 -0
  281. package/dist/components/RadioButton/RadioButton.constants.cjs +12 -0
  282. package/dist/components/RadioButton/RadioButton.constants.cjs.map +1 -0
  283. package/dist/components/RadioButton/RadioButton.constants.d.cts +3 -0
  284. package/dist/components/RadioButton/RadioButton.constants.d.cts.map +1 -0
  285. package/dist/components/RadioButton/RadioButton.constants.d.mts +3 -0
  286. package/dist/components/RadioButton/RadioButton.constants.d.mts.map +1 -0
  287. package/dist/components/RadioButton/RadioButton.constants.mjs +9 -0
  288. package/dist/components/RadioButton/RadioButton.constants.mjs.map +1 -0
  289. package/dist/components/RadioButton/RadioButton.d.cts +4 -0
  290. package/dist/components/RadioButton/RadioButton.d.cts.map +1 -0
  291. package/dist/components/RadioButton/RadioButton.d.mts +4 -0
  292. package/dist/components/RadioButton/RadioButton.d.mts.map +1 -0
  293. package/dist/components/RadioButton/RadioButton.mjs +58 -0
  294. package/dist/components/RadioButton/RadioButton.mjs.map +1 -0
  295. package/dist/components/RadioButton/RadioButton.types.cjs +3 -0
  296. package/dist/components/RadioButton/RadioButton.types.cjs.map +1 -0
  297. package/dist/components/RadioButton/RadioButton.types.d.cts +64 -0
  298. package/dist/components/RadioButton/RadioButton.types.d.cts.map +1 -0
  299. package/dist/components/RadioButton/RadioButton.types.d.mts +64 -0
  300. package/dist/components/RadioButton/RadioButton.types.d.mts.map +1 -0
  301. package/dist/components/RadioButton/RadioButton.types.mjs +2 -0
  302. package/dist/components/RadioButton/RadioButton.types.mjs.map +1 -0
  303. package/dist/components/RadioButton/index.cjs +6 -0
  304. package/dist/components/RadioButton/index.cjs.map +1 -0
  305. package/dist/components/RadioButton/index.d.cts +3 -0
  306. package/dist/components/RadioButton/index.d.cts.map +1 -0
  307. package/dist/components/RadioButton/index.d.mts +3 -0
  308. package/dist/components/RadioButton/index.d.mts.map +1 -0
  309. package/dist/components/RadioButton/index.mjs +2 -0
  310. package/dist/components/RadioButton/index.mjs.map +1 -0
  311. package/dist/components/Skeleton/Skeleton.cjs +86 -0
  312. package/dist/components/Skeleton/Skeleton.cjs.map +1 -0
  313. package/dist/components/Skeleton/Skeleton.d.cts +5 -0
  314. package/dist/components/Skeleton/Skeleton.d.cts.map +1 -0
  315. package/dist/components/Skeleton/Skeleton.d.mts +5 -0
  316. package/dist/components/Skeleton/Skeleton.d.mts.map +1 -0
  317. package/dist/components/Skeleton/Skeleton.mjs +68 -0
  318. package/dist/components/Skeleton/Skeleton.mjs.map +1 -0
  319. package/dist/components/Skeleton/Skeleton.types.cjs +3 -0
  320. package/dist/components/Skeleton/Skeleton.types.cjs.map +1 -0
  321. package/dist/components/Skeleton/Skeleton.types.d.cts +51 -0
  322. package/dist/components/Skeleton/Skeleton.types.d.cts.map +1 -0
  323. package/dist/components/Skeleton/Skeleton.types.d.mts +51 -0
  324. package/dist/components/Skeleton/Skeleton.types.d.mts.map +1 -0
  325. package/dist/components/Skeleton/Skeleton.types.mjs +2 -0
  326. package/dist/components/Skeleton/Skeleton.types.mjs.map +1 -0
  327. package/dist/components/Skeleton/index.cjs +9 -0
  328. package/dist/components/Skeleton/index.cjs.map +1 -0
  329. package/dist/components/Skeleton/index.d.cts +3 -0
  330. package/dist/components/Skeleton/index.d.cts.map +1 -0
  331. package/dist/components/Skeleton/index.d.mts +3 -0
  332. package/dist/components/Skeleton/index.d.mts.map +1 -0
  333. package/dist/components/Skeleton/index.mjs +2 -0
  334. package/dist/components/Skeleton/index.mjs.map +1 -0
  335. package/dist/components/Text/Text.cjs +9 -14
  336. package/dist/components/Text/Text.cjs.map +1 -1
  337. package/dist/components/Text/Text.d.cts.map +1 -1
  338. package/dist/components/Text/Text.d.mts.map +1 -1
  339. package/dist/components/Text/Text.mjs +10 -15
  340. package/dist/components/Text/Text.mjs.map +1 -1
  341. package/dist/components/Toast/Toast.cjs +174 -0
  342. package/dist/components/Toast/Toast.cjs.map +1 -0
  343. package/dist/components/Toast/Toast.constants.cjs +12 -0
  344. package/dist/components/Toast/Toast.constants.cjs.map +1 -0
  345. package/dist/components/Toast/Toast.constants.d.cts +8 -0
  346. package/dist/components/Toast/Toast.constants.d.cts.map +1 -0
  347. package/dist/components/Toast/Toast.constants.d.mts +8 -0
  348. package/dist/components/Toast/Toast.constants.d.mts.map +1 -0
  349. package/dist/components/Toast/Toast.constants.mjs +9 -0
  350. package/dist/components/Toast/Toast.constants.mjs.map +1 -0
  351. package/dist/components/Toast/Toast.context.cjs +40 -0
  352. package/dist/components/Toast/Toast.context.cjs.map +1 -0
  353. package/dist/components/Toast/Toast.context.d.cts +7 -0
  354. package/dist/components/Toast/Toast.context.d.cts.map +1 -0
  355. package/dist/components/Toast/Toast.context.d.mts +7 -0
  356. package/dist/components/Toast/Toast.context.d.mts.map +1 -0
  357. package/dist/components/Toast/Toast.context.mjs +20 -0
  358. package/dist/components/Toast/Toast.context.mjs.map +1 -0
  359. package/dist/components/Toast/Toast.d.cts +8 -0
  360. package/dist/components/Toast/Toast.d.cts.map +1 -0
  361. package/dist/components/Toast/Toast.d.mts +8 -0
  362. package/dist/components/Toast/Toast.d.mts.map +1 -0
  363. package/dist/components/Toast/Toast.mjs +156 -0
  364. package/dist/components/Toast/Toast.mjs.map +1 -0
  365. package/dist/components/Toast/Toast.types.cjs +19 -0
  366. package/dist/components/Toast/Toast.types.cjs.map +1 -0
  367. package/dist/components/Toast/Toast.types.d.cts +123 -0
  368. package/dist/components/Toast/Toast.types.d.cts.map +1 -0
  369. package/dist/components/Toast/Toast.types.d.mts +123 -0
  370. package/dist/components/Toast/Toast.types.d.mts.map +1 -0
  371. package/dist/components/Toast/Toast.types.mjs +16 -0
  372. package/dist/components/Toast/Toast.types.mjs.map +1 -0
  373. package/dist/components/Toast/index.cjs +19 -0
  374. package/dist/components/Toast/index.cjs.map +1 -0
  375. package/dist/components/Toast/index.d.cts +6 -0
  376. package/dist/components/Toast/index.d.cts.map +1 -0
  377. package/dist/components/Toast/index.d.mts +6 -0
  378. package/dist/components/Toast/index.d.mts.map +1 -0
  379. package/dist/components/Toast/index.mjs +5 -0
  380. package/dist/components/Toast/index.mjs.map +1 -0
  381. package/dist/components/index.cjs +23 -2
  382. package/dist/components/index.cjs.map +1 -1
  383. package/dist/components/index.d.cts +18 -0
  384. package/dist/components/index.d.cts.map +1 -1
  385. package/dist/components/index.d.mts +18 -0
  386. package/dist/components/index.d.mts.map +1 -1
  387. package/dist/components/index.mjs +9 -0
  388. package/dist/components/index.mjs.map +1 -1
  389. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs +17 -9
  390. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.cjs.map +1 -1
  391. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.cts +1 -1
  392. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.cts.map +1 -1
  393. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.mts +1 -1
  394. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.d.mts.map +1 -1
  395. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.mjs +17 -6
  396. package/dist/components/temp-components/ButtonAnimated/ButtonAnimated.mjs.map +1 -1
  397. package/dist/components/temp-components/Spinner/Spinner.cjs +2 -2
  398. package/dist/components/temp-components/Spinner/Spinner.cjs.map +1 -1
  399. package/dist/components/temp-components/Spinner/Spinner.d.cts.map +1 -1
  400. package/dist/components/temp-components/Spinner/Spinner.d.mts.map +1 -1
  401. package/dist/components/temp-components/Spinner/Spinner.mjs +2 -2
  402. package/dist/components/temp-components/Spinner/Spinner.mjs.map +1 -1
  403. package/dist/types/index.cjs +17 -41
  404. package/dist/types/index.cjs.map +1 -1
  405. package/dist/types/index.d.cts +16 -38
  406. package/dist/types/index.d.cts.map +1 -1
  407. package/dist/types/index.d.mts +16 -38
  408. package/dist/types/index.d.mts.map +1 -1
  409. package/dist/types/index.mjs +16 -40
  410. package/dist/types/index.mjs.map +1 -1
  411. package/package.json +13 -9
  412. package/dist/components/Icon/Icon.utilities.cjs +0 -31
  413. package/dist/components/Icon/Icon.utilities.cjs.map +0 -1
  414. package/dist/components/Icon/Icon.utilities.d.cts +0 -22
  415. package/dist/components/Icon/Icon.utilities.d.cts.map +0 -1
  416. package/dist/components/Icon/Icon.utilities.d.mts +0 -22
  417. package/dist/components/Icon/Icon.utilities.d.mts.map +0 -1
  418. package/dist/components/Icon/Icon.utilities.mjs +0 -27
  419. package/dist/components/Icon/Icon.utilities.mjs.map +0 -1
  420. package/dist/components/Text/Text.utilities.cjs +0 -46
  421. package/dist/components/Text/Text.utilities.cjs.map +0 -1
  422. package/dist/components/Text/Text.utilities.d.cts +0 -32
  423. package/dist/components/Text/Text.utilities.d.cts.map +0 -1
  424. package/dist/components/Text/Text.utilities.d.mts +0 -32
  425. package/dist/components/Text/Text.utilities.d.mts.map +0 -1
  426. package/dist/components/Text/Text.utilities.mjs +0 -42
  427. package/dist/components/Text/Text.utilities.mjs.map +0 -1
@@ -0,0 +1,58 @@
1
+ function $importDefault(module) {
2
+ if (module?.__esModule) {
3
+ return module.default;
4
+ }
5
+ return module;
6
+ }
7
+ import { useTailwind } from "@metamask/design-system-twrnc-preset";
8
+ import $React from "react";
9
+ const React = $importDefault($React);
10
+ import { View, TouchableOpacity } from "react-native/index.js";
11
+ import { TextOrChildren } from "../temp-components/TextOrChildren/index.mjs";
12
+ const getRadioButtonBorderClass = (isReadOnly, isDanger, isChecked) => {
13
+ if (isReadOnly) {
14
+ return 'border-background-default';
15
+ }
16
+ if (isDanger) {
17
+ return 'border-error-default';
18
+ }
19
+ if (isChecked) {
20
+ return 'border-primary-default';
21
+ }
22
+ return 'border-default';
23
+ };
24
+ const getRadioButtonDotClass = (isReadOnly, isDanger) => {
25
+ if (isReadOnly) {
26
+ return 'bg-icon-alternative';
27
+ }
28
+ if (isDanger) {
29
+ return 'bg-error-default';
30
+ }
31
+ return 'bg-primary-default';
32
+ };
33
+ export const RadioButton = ({ onPress, label, labelProps, isChecked = false, isDisabled = false, isReadOnly = false, isDanger = false, touchableOpacityProps, radioButtonContainerProps, twClassName, style, ...props }) => {
34
+ const tw = useTailwind();
35
+ return (<View {...props} style={[
36
+ tw.style('flex-row items-center', isDisabled ? 'opacity-50' : 'opacity-100', twClassName),
37
+ style,
38
+ ]}>
39
+ <TouchableOpacity onPress={onPress} disabled={isDisabled || isReadOnly} accessible accessibilityRole="radio" accessibilityState={{
40
+ checked: isChecked,
41
+ disabled: isDisabled,
42
+ }} accessibilityLabel={typeof label === 'string' ? label : undefined} {...touchableOpacityProps} style={[
43
+ tw.style('flex-row items-center'),
44
+ touchableOpacityProps?.style,
45
+ ]}>
46
+ <View {...radioButtonContainerProps} style={[
47
+ tw.style('size-5 items-center justify-center rounded-full border-2 bg-default', getRadioButtonBorderClass(isReadOnly, isDanger, isChecked)),
48
+ radioButtonContainerProps?.style,
49
+ ]}>
50
+ {isChecked && (<View style={tw.style('size-3 rounded-full', getRadioButtonDotClass(isReadOnly, isDanger))}/>)}
51
+ </View>
52
+ {label ? (<TextOrChildren textProps={{ ...labelProps, twClassName: 'ml-3' }}>
53
+ {label}
54
+ </TextOrChildren>) : null}
55
+ </TouchableOpacity>
56
+ </View>);
57
+ };
58
+ //# sourceMappingURL=RadioButton.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButton.mjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.tsx"],"names":[],"mappings":"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","sourcesContent":["import { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React from 'react';\nimport { View, TouchableOpacity } from 'react-native';\n\nimport { TextOrChildren } from '../temp-components/TextOrChildren';\n\nimport type { RadioButtonProps } from './RadioButton.types';\n\nconst getRadioButtonBorderClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n isChecked: boolean,\n): string => {\n if (isReadOnly) {\n return 'border-background-default';\n }\n if (isDanger) {\n return 'border-error-default';\n }\n if (isChecked) {\n return 'border-primary-default';\n }\n return 'border-default';\n};\n\nconst getRadioButtonDotClass = (\n isReadOnly: boolean,\n isDanger: boolean,\n): string => {\n if (isReadOnly) {\n return 'bg-icon-alternative';\n }\n if (isDanger) {\n return 'bg-error-default';\n }\n return 'bg-primary-default';\n};\n\nexport const RadioButton = ({\n onPress,\n label,\n labelProps,\n isChecked = false,\n isDisabled = false,\n isReadOnly = false,\n isDanger = false,\n touchableOpacityProps,\n radioButtonContainerProps,\n twClassName,\n style,\n ...props\n}: RadioButtonProps) => {\n const tw = useTailwind();\n\n return (\n <View\n {...props}\n style={[\n tw.style(\n 'flex-row items-center',\n isDisabled ? 'opacity-50' : 'opacity-100',\n twClassName,\n ),\n style,\n ]}\n >\n <TouchableOpacity\n onPress={onPress}\n disabled={isDisabled || isReadOnly}\n accessible\n accessibilityRole=\"radio\"\n accessibilityState={{\n checked: isChecked,\n disabled: isDisabled,\n }}\n accessibilityLabel={typeof label === 'string' ? label : undefined}\n {...touchableOpacityProps}\n style={[\n tw.style('flex-row items-center'),\n touchableOpacityProps?.style,\n ]}\n >\n <View\n {...radioButtonContainerProps}\n style={[\n tw.style(\n 'size-5 items-center justify-center rounded-full border-2 bg-default',\n getRadioButtonBorderClass(isReadOnly, isDanger, isChecked),\n ),\n radioButtonContainerProps?.style,\n ]}\n >\n {isChecked && (\n <View\n style={tw.style(\n 'size-3 rounded-full',\n getRadioButtonDotClass(isReadOnly, isDanger),\n )}\n />\n )}\n </View>\n {label ? (\n <TextOrChildren textProps={{ ...labelProps, twClassName: 'ml-3' }}>\n {label}\n </TextOrChildren>\n ) : null}\n </TouchableOpacity>\n </View>\n );\n};\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=RadioButton.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButton.types.cjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TouchableOpacityProps, ViewProps } from 'react-native';\n\nimport type { TextProps } from '../Text';\n\n/**\n * RadioButton component props.\n *\n * Extends ViewProps so the root View inherits standard React Native\n * props such as `testID` and `accessibilityLabel`.\n */\nexport type RadioButtonProps = {\n /**\n * Optional callback triggered when the radio button is pressed.\n */\n onPress?: () => void;\n\n /**\n * Optional label displayed beside the radio button.\n */\n label?: string | React.ReactNode;\n\n /**\n * Optional props passed to the label's Text component.\n */\n labelProps?: Omit<Partial<TextProps>, 'children'>;\n\n /**\n * Optional prop to configure the checked state.\n *\n * @default false\n */\n isChecked?: boolean;\n\n /**\n * Optional prop to configure the disabled state.\n *\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * Optional prop to configure the read-only state.\n *\n * @default false\n */\n isReadOnly?: boolean;\n\n /**\n * Optional prop to configure the danger state.\n *\n * @default false\n */\n isDanger?: boolean;\n\n /**\n * Optional props passed to the inner TouchableOpacity.\n * Use this for TouchableOpacity-specific props such as `testID`.\n */\n touchableOpacityProps?: Omit<\n Partial<TouchableOpacityProps>,\n 'children' | 'onPress' | 'disabled'\n >;\n\n /**\n * Optional props passed to the radio button circle container.\n */\n radioButtonContainerProps?: Omit<Partial<ViewProps>, 'children'>;\n\n /**\n * Optional Tailwind CSS classes for the root container.\n */\n twClassName?: string;\n\n /**\n * Optional custom styles for the root container.\n */\n style?: ViewProps['style'];\n} & Omit<ViewProps, 'children'>;\n"]}
@@ -0,0 +1,64 @@
1
+ import type { TouchableOpacityProps, ViewProps } from "react-native/index.js";
2
+ import type { TextProps } from "../Text/index.cjs";
3
+ /**
4
+ * RadioButton component props.
5
+ *
6
+ * Extends ViewProps so the root View inherits standard React Native
7
+ * props such as `testID` and `accessibilityLabel`.
8
+ */
9
+ export type RadioButtonProps = {
10
+ /**
11
+ * Optional callback triggered when the radio button is pressed.
12
+ */
13
+ onPress?: () => void;
14
+ /**
15
+ * Optional label displayed beside the radio button.
16
+ */
17
+ label?: string | React.ReactNode;
18
+ /**
19
+ * Optional props passed to the label's Text component.
20
+ */
21
+ labelProps?: Omit<Partial<TextProps>, 'children'>;
22
+ /**
23
+ * Optional prop to configure the checked state.
24
+ *
25
+ * @default false
26
+ */
27
+ isChecked?: boolean;
28
+ /**
29
+ * Optional prop to configure the disabled state.
30
+ *
31
+ * @default false
32
+ */
33
+ isDisabled?: boolean;
34
+ /**
35
+ * Optional prop to configure the read-only state.
36
+ *
37
+ * @default false
38
+ */
39
+ isReadOnly?: boolean;
40
+ /**
41
+ * Optional prop to configure the danger state.
42
+ *
43
+ * @default false
44
+ */
45
+ isDanger?: boolean;
46
+ /**
47
+ * Optional props passed to the inner TouchableOpacity.
48
+ * Use this for TouchableOpacity-specific props such as `testID`.
49
+ */
50
+ touchableOpacityProps?: Omit<Partial<TouchableOpacityProps>, 'children' | 'onPress' | 'disabled'>;
51
+ /**
52
+ * Optional props passed to the radio button circle container.
53
+ */
54
+ radioButtonContainerProps?: Omit<Partial<ViewProps>, 'children'>;
55
+ /**
56
+ * Optional Tailwind CSS classes for the root container.
57
+ */
58
+ twClassName?: string;
59
+ /**
60
+ * Optional custom styles for the root container.
61
+ */
62
+ style?: ViewProps['style'];
63
+ } & Omit<ViewProps, 'children'>;
64
+ //# sourceMappingURL=RadioButton.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButton.types.d.cts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,8BAAqB;AAErE,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAEjC;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAElD;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,IAAI,CAC1B,OAAO,CAAC,qBAAqB,CAAC,EAC9B,UAAU,GAAG,SAAS,GAAG,UAAU,CACpC,CAAC;IAEF;;OAEG;IACH,yBAAyB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAEjE;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;CAC5B,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC"}
@@ -0,0 +1,64 @@
1
+ import type { TouchableOpacityProps, ViewProps } from "react-native/index.js";
2
+ import type { TextProps } from "../Text/index.mjs";
3
+ /**
4
+ * RadioButton component props.
5
+ *
6
+ * Extends ViewProps so the root View inherits standard React Native
7
+ * props such as `testID` and `accessibilityLabel`.
8
+ */
9
+ export type RadioButtonProps = {
10
+ /**
11
+ * Optional callback triggered when the radio button is pressed.
12
+ */
13
+ onPress?: () => void;
14
+ /**
15
+ * Optional label displayed beside the radio button.
16
+ */
17
+ label?: string | React.ReactNode;
18
+ /**
19
+ * Optional props passed to the label's Text component.
20
+ */
21
+ labelProps?: Omit<Partial<TextProps>, 'children'>;
22
+ /**
23
+ * Optional prop to configure the checked state.
24
+ *
25
+ * @default false
26
+ */
27
+ isChecked?: boolean;
28
+ /**
29
+ * Optional prop to configure the disabled state.
30
+ *
31
+ * @default false
32
+ */
33
+ isDisabled?: boolean;
34
+ /**
35
+ * Optional prop to configure the read-only state.
36
+ *
37
+ * @default false
38
+ */
39
+ isReadOnly?: boolean;
40
+ /**
41
+ * Optional prop to configure the danger state.
42
+ *
43
+ * @default false
44
+ */
45
+ isDanger?: boolean;
46
+ /**
47
+ * Optional props passed to the inner TouchableOpacity.
48
+ * Use this for TouchableOpacity-specific props such as `testID`.
49
+ */
50
+ touchableOpacityProps?: Omit<Partial<TouchableOpacityProps>, 'children' | 'onPress' | 'disabled'>;
51
+ /**
52
+ * Optional props passed to the radio button circle container.
53
+ */
54
+ radioButtonContainerProps?: Omit<Partial<ViewProps>, 'children'>;
55
+ /**
56
+ * Optional Tailwind CSS classes for the root container.
57
+ */
58
+ twClassName?: string;
59
+ /**
60
+ * Optional custom styles for the root container.
61
+ */
62
+ style?: ViewProps['style'];
63
+ } & Omit<ViewProps, 'children'>;
64
+ //# sourceMappingURL=RadioButton.types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButton.types.d.mts","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,SAAS,EAAE,8BAAqB;AAErE,OAAO,KAAK,EAAE,SAAS,EAAE,0BAAgB;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;IAEjC;;OAEG;IACH,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAElD;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,IAAI,CAC1B,OAAO,CAAC,qBAAqB,CAAC,EAC9B,UAAU,GAAG,SAAS,GAAG,UAAU,CACpC,CAAC;IAEF;;OAEG;IACH,yBAAyB,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,UAAU,CAAC,CAAC;IAEjE;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;CAC5B,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=RadioButton.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RadioButton.types.mjs","sourceRoot":"","sources":["../../../src/components/RadioButton/RadioButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { TouchableOpacityProps, ViewProps } from 'react-native';\n\nimport type { TextProps } from '../Text';\n\n/**\n * RadioButton component props.\n *\n * Extends ViewProps so the root View inherits standard React Native\n * props such as `testID` and `accessibilityLabel`.\n */\nexport type RadioButtonProps = {\n /**\n * Optional callback triggered when the radio button is pressed.\n */\n onPress?: () => void;\n\n /**\n * Optional label displayed beside the radio button.\n */\n label?: string | React.ReactNode;\n\n /**\n * Optional props passed to the label's Text component.\n */\n labelProps?: Omit<Partial<TextProps>, 'children'>;\n\n /**\n * Optional prop to configure the checked state.\n *\n * @default false\n */\n isChecked?: boolean;\n\n /**\n * Optional prop to configure the disabled state.\n *\n * @default false\n */\n isDisabled?: boolean;\n\n /**\n * Optional prop to configure the read-only state.\n *\n * @default false\n */\n isReadOnly?: boolean;\n\n /**\n * Optional prop to configure the danger state.\n *\n * @default false\n */\n isDanger?: boolean;\n\n /**\n * Optional props passed to the inner TouchableOpacity.\n * Use this for TouchableOpacity-specific props such as `testID`.\n */\n touchableOpacityProps?: Omit<\n Partial<TouchableOpacityProps>,\n 'children' | 'onPress' | 'disabled'\n >;\n\n /**\n * Optional props passed to the radio button circle container.\n */\n radioButtonContainerProps?: Omit<Partial<ViewProps>, 'children'>;\n\n /**\n * Optional Tailwind CSS classes for the root container.\n */\n twClassName?: string;\n\n /**\n * Optional custom styles for the root container.\n */\n style?: ViewProps['style'];\n} & Omit<ViewProps, 'children'>;\n"]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RadioButton = void 0;
4
+ var RadioButton_1 = require("./RadioButton.cjs");
5
+ Object.defineProperty(exports, "RadioButton", { enumerable: true, get: function () { return RadioButton_1.RadioButton; } });
6
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/RadioButton/index.ts"],"names":[],"mappings":";;;AAAA,iDAA4C;AAAnC,0GAAA,WAAW,OAAA","sourcesContent":["export { RadioButton } from './RadioButton';\nexport type { RadioButtonProps } from './RadioButton.types';\n"]}
@@ -0,0 +1,3 @@
1
+ export { RadioButton } from "./RadioButton.cjs";
2
+ export type { RadioButtonProps } from "./RadioButton.types.cjs";
3
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/RadioButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAAsB;AAC5C,YAAY,EAAE,gBAAgB,EAAE,gCAA4B"}
@@ -0,0 +1,3 @@
1
+ export { RadioButton } from "./RadioButton.mjs";
2
+ export type { RadioButtonProps } from "./RadioButton.types.mjs";
3
+ //# sourceMappingURL=index.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../../src/components/RadioButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAAsB;AAC5C,YAAY,EAAE,gBAAgB,EAAE,gCAA4B"}
@@ -0,0 +1,2 @@
1
+ export { RadioButton } from "./RadioButton.mjs";
2
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/components/RadioButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,0BAAsB","sourcesContent":["export { RadioButton } from './RadioButton';\nexport type { RadioButtonProps } from './RadioButton.types';\n"]}
@@ -0,0 +1,86 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ const design_system_twrnc_preset_1 = require("@metamask/design-system-twrnc-preset");
27
+ const react_1 = __importStar(require("react"));
28
+ const react_native_1 = require("react-native/index.js");
29
+ const Skeleton = ({ height, width, children, hideChildren = false, style, childrenWrapperProps, animatedViewProps, twClassName, autoPlay = true, ...props }) => {
30
+ const tw = (0, design_system_twrnc_preset_1.useTailwind)();
31
+ const opacityAnim = (0, react_1.useRef)(new react_native_1.Animated.Value(0.2)).current;
32
+ const hasChildren = children !== null && children !== undefined;
33
+ const startAnimation = () => {
34
+ react_native_1.Animated.sequence([
35
+ react_native_1.Animated.timing(opacityAnim, {
36
+ toValue: 0.1,
37
+ duration: 700,
38
+ useNativeDriver: true,
39
+ isInteraction: false,
40
+ }),
41
+ react_native_1.Animated.timing(opacityAnim, {
42
+ toValue: 0.2,
43
+ duration: 700,
44
+ useNativeDriver: true,
45
+ isInteraction: false,
46
+ }),
47
+ ]).start(({ finished }) => {
48
+ /* istanbul ignore next - animation interruption is not testable in Jest */
49
+ if (finished) {
50
+ startAnimation();
51
+ }
52
+ });
53
+ };
54
+ (0, react_1.useEffect)(() => {
55
+ if (autoPlay && (!hasChildren || hideChildren)) {
56
+ startAnimation();
57
+ }
58
+ return () => {
59
+ opacityAnim.stopAnimation();
60
+ };
61
+ }, [hasChildren, hideChildren, autoPlay]);
62
+ if (!hideChildren && hasChildren) {
63
+ return <>{children}</>;
64
+ }
65
+ return (<react_native_1.View style={[
66
+ tw.style('rounded overflow-hidden', twClassName),
67
+ height !== undefined && { height },
68
+ width !== undefined && { width },
69
+ style,
70
+ ]} {...props}>
71
+ <react_native_1.Animated.View {...animatedViewProps} style={[
72
+ tw.style('absolute inset-0 rounded bg-icon-alternative'),
73
+ { opacity: opacityAnim },
74
+ animatedViewProps?.style,
75
+ ]} pointerEvents="none"/>
76
+
77
+ {hasChildren && (<react_native_1.View {...childrenWrapperProps} style={[
78
+ tw.style('relative z-10 opacity-0'),
79
+ childrenWrapperProps?.style,
80
+ ]} pointerEvents="none" accessibilityElementsHidden importantForAccessibility="no-hide-descendants">
81
+ {children}
82
+ </react_native_1.View>)}
83
+ </react_native_1.View>);
84
+ };
85
+ exports.default = Skeleton;
86
+ //# sourceMappingURL=Skeleton.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Skeleton.cjs","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAmE;AACnE,+CAAiD;AACjD,wDAA8C;AAI9C,MAAM,QAAQ,GAA4B,CAAC,EACzC,MAAM,EACN,KAAK,EACL,QAAQ,EACR,YAAY,GAAG,KAAK,EACpB,KAAK,EACL,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,QAAQ,GAAG,IAAI,EACf,GAAG,KAAK,EACT,EAAE,EAAE;IACH,MAAM,EAAE,GAAG,IAAA,wCAAW,GAAE,CAAC;IACzB,MAAM,WAAW,GAAG,IAAA,cAAM,EAAC,IAAI,uBAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC;IAC5D,MAAM,WAAW,GAAG,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,SAAS,CAAC;IAEhE,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,uBAAQ,CAAC,QAAQ,CAAC;YAChB,uBAAQ,CAAC,MAAM,CAAC,WAAW,EAAE;gBAC3B,OAAO,EAAE,GAAG;gBACZ,QAAQ,EAAE,GAAG;gBACb,eAAe,EAAE,IAAI;gBACrB,aAAa,EAAE,KAAK;aACrB,CAAC;YACF,uBAAQ,CAAC,MAAM,CAAC,WAAW,EAAE;gBAC3B,OAAO,EAAE,GAAG;gBACZ,QAAQ,EAAE,GAAG;gBACb,eAAe,EAAE,IAAI;gBACrB,aAAa,EAAE,KAAK;aACrB,CAAC;SACH,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;YACxB,2EAA2E;YAC3E,IAAI,QAAQ,EAAE;gBACZ,cAAc,EAAE,CAAC;aAClB;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,QAAQ,IAAI,CAAC,CAAC,WAAW,IAAI,YAAY,CAAC,EAAE;YAC9C,cAAc,EAAE,CAAC;SAClB;QAED,OAAO,GAAG,EAAE;YACV,WAAW,CAAC,aAAa,EAAE,CAAC;QAC9B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,WAAW,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE1C,IAAI,CAAC,YAAY,IAAI,WAAW,EAAE;QAChC,OAAO,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC;KACxB;IAED,OAAO,CACL,CAAC,mBAAI,CACH,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,yBAAyB,EAAE,WAAW,CAAC;YAChD,MAAM,KAAK,SAAS,IAAI,EAAE,MAAM,EAAE;YAClC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE;YAChC,KAAK;SACN,CAAC,CACF,IAAI,KAAK,CAAC,CAEV;MAAA,CAAC,uBAAQ,CAAC,IAAI,CACZ,IAAI,iBAAiB,CAAC,CACtB,KAAK,CAAC,CAAC;YACL,EAAE,CAAC,KAAK,CAAC,8CAA8C,CAAC;YACxD,EAAE,OAAO,EAAE,WAAW,EAAE;YACxB,iBAAiB,EAAE,KAAK;SACzB,CAAC,CACF,aAAa,CAAC,MAAM,EAGtB;;MAAA,CAAC,WAAW,IAAI,CACd,CAAC,mBAAI,CACH,IAAI,oBAAoB,CAAC,CACzB,KAAK,CAAC,CAAC;gBACL,EAAE,CAAC,KAAK,CAAC,yBAAyB,CAAC;gBACnC,oBAAoB,EAAE,KAAK;aAC5B,CAAC,CACF,aAAa,CAAC,MAAM,CACpB,2BAA2B,CAC3B,yBAAyB,CAAC,qBAAqB,CAE/C;UAAA,CAAC,QAAQ,CACX;QAAA,EAAE,mBAAI,CAAC,CACR,CACH;IAAA,EAAE,mBAAI,CAAC,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,QAAQ,CAAC","sourcesContent":["import { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React, { useEffect, useRef } from 'react';\nimport { Animated, View } from 'react-native';\n\nimport type { SkeletonProps } from './Skeleton.types';\n\nconst Skeleton: React.FC<SkeletonProps> = ({\n height,\n width,\n children,\n hideChildren = false,\n style,\n childrenWrapperProps,\n animatedViewProps,\n twClassName,\n autoPlay = true,\n ...props\n}) => {\n const tw = useTailwind();\n const opacityAnim = useRef(new Animated.Value(0.2)).current;\n const hasChildren = children !== null && children !== undefined;\n\n const startAnimation = () => {\n Animated.sequence([\n Animated.timing(opacityAnim, {\n toValue: 0.1,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n Animated.timing(opacityAnim, {\n toValue: 0.2,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n ]).start(({ finished }) => {\n /* istanbul ignore next - animation interruption is not testable in Jest */\n if (finished) {\n startAnimation();\n }\n });\n };\n\n useEffect(() => {\n if (autoPlay && (!hasChildren || hideChildren)) {\n startAnimation();\n }\n\n return () => {\n opacityAnim.stopAnimation();\n };\n }, [hasChildren, hideChildren, autoPlay]);\n\n if (!hideChildren && hasChildren) {\n return <>{children}</>;\n }\n\n return (\n <View\n style={[\n tw.style('rounded overflow-hidden', twClassName),\n height !== undefined && { height },\n width !== undefined && { width },\n style,\n ]}\n {...props}\n >\n <Animated.View\n {...animatedViewProps}\n style={[\n tw.style('absolute inset-0 rounded bg-icon-alternative'),\n { opacity: opacityAnim },\n animatedViewProps?.style,\n ]}\n pointerEvents=\"none\"\n />\n\n {hasChildren && (\n <View\n {...childrenWrapperProps}\n style={[\n tw.style('relative z-10 opacity-0'),\n childrenWrapperProps?.style,\n ]}\n pointerEvents=\"none\"\n accessibilityElementsHidden\n importantForAccessibility=\"no-hide-descendants\"\n >\n {children}\n </View>\n )}\n </View>\n );\n};\n\nexport default Skeleton;\n"]}
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import type { SkeletonProps } from "./Skeleton.types.cjs";
3
+ declare const Skeleton: React.FC<SkeletonProps>;
4
+ export default Skeleton;
5
+ //# sourceMappingURL=Skeleton.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Skeleton.d.cts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,cAAc;AAGjD,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwFrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import type { SkeletonProps } from "./Skeleton.types.mjs";
3
+ declare const Skeleton: React.FC<SkeletonProps>;
4
+ export default Skeleton;
5
+ //# sourceMappingURL=Skeleton.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Skeleton.d.mts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"AACA,OAAO,KAA4B,cAAc;AAGjD,OAAO,KAAK,EAAE,aAAa,EAAE,6BAAyB;AAEtD,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAwFrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,68 @@
1
+ function $importDefault(module) {
2
+ if (module?.__esModule) {
3
+ return module.default;
4
+ }
5
+ return module;
6
+ }
7
+ import { useTailwind } from "@metamask/design-system-twrnc-preset";
8
+ import $React, { useEffect, useRef } from "react";
9
+ const React = $importDefault($React);
10
+ import { Animated, View } from "react-native/index.js";
11
+ const Skeleton = ({ height, width, children, hideChildren = false, style, childrenWrapperProps, animatedViewProps, twClassName, autoPlay = true, ...props }) => {
12
+ const tw = useTailwind();
13
+ const opacityAnim = useRef(new Animated.Value(0.2)).current;
14
+ const hasChildren = children !== null && children !== undefined;
15
+ const startAnimation = () => {
16
+ Animated.sequence([
17
+ Animated.timing(opacityAnim, {
18
+ toValue: 0.1,
19
+ duration: 700,
20
+ useNativeDriver: true,
21
+ isInteraction: false,
22
+ }),
23
+ Animated.timing(opacityAnim, {
24
+ toValue: 0.2,
25
+ duration: 700,
26
+ useNativeDriver: true,
27
+ isInteraction: false,
28
+ }),
29
+ ]).start(({ finished }) => {
30
+ /* istanbul ignore next - animation interruption is not testable in Jest */
31
+ if (finished) {
32
+ startAnimation();
33
+ }
34
+ });
35
+ };
36
+ useEffect(() => {
37
+ if (autoPlay && (!hasChildren || hideChildren)) {
38
+ startAnimation();
39
+ }
40
+ return () => {
41
+ opacityAnim.stopAnimation();
42
+ };
43
+ }, [hasChildren, hideChildren, autoPlay]);
44
+ if (!hideChildren && hasChildren) {
45
+ return <>{children}</>;
46
+ }
47
+ return (<View style={[
48
+ tw.style('rounded overflow-hidden', twClassName),
49
+ height !== undefined && { height },
50
+ width !== undefined && { width },
51
+ style,
52
+ ]} {...props}>
53
+ <Animated.View {...animatedViewProps} style={[
54
+ tw.style('absolute inset-0 rounded bg-icon-alternative'),
55
+ { opacity: opacityAnim },
56
+ animatedViewProps?.style,
57
+ ]} pointerEvents="none"/>
58
+
59
+ {hasChildren && (<View {...childrenWrapperProps} style={[
60
+ tw.style('relative z-10 opacity-0'),
61
+ childrenWrapperProps?.style,
62
+ ]} pointerEvents="none" accessibilityElementsHidden importantForAccessibility="no-hide-descendants">
63
+ {children}
64
+ </View>)}
65
+ </View>);
66
+ };
67
+ export default Skeleton;
68
+ //# sourceMappingURL=Skeleton.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Skeleton.mjs","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.tsx"],"names":[],"mappings":"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","sourcesContent":["import { useTailwind } from '@metamask/design-system-twrnc-preset';\nimport React, { useEffect, useRef } from 'react';\nimport { Animated, View } from 'react-native';\n\nimport type { SkeletonProps } from './Skeleton.types';\n\nconst Skeleton: React.FC<SkeletonProps> = ({\n height,\n width,\n children,\n hideChildren = false,\n style,\n childrenWrapperProps,\n animatedViewProps,\n twClassName,\n autoPlay = true,\n ...props\n}) => {\n const tw = useTailwind();\n const opacityAnim = useRef(new Animated.Value(0.2)).current;\n const hasChildren = children !== null && children !== undefined;\n\n const startAnimation = () => {\n Animated.sequence([\n Animated.timing(opacityAnim, {\n toValue: 0.1,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n Animated.timing(opacityAnim, {\n toValue: 0.2,\n duration: 700,\n useNativeDriver: true,\n isInteraction: false,\n }),\n ]).start(({ finished }) => {\n /* istanbul ignore next - animation interruption is not testable in Jest */\n if (finished) {\n startAnimation();\n }\n });\n };\n\n useEffect(() => {\n if (autoPlay && (!hasChildren || hideChildren)) {\n startAnimation();\n }\n\n return () => {\n opacityAnim.stopAnimation();\n };\n }, [hasChildren, hideChildren, autoPlay]);\n\n if (!hideChildren && hasChildren) {\n return <>{children}</>;\n }\n\n return (\n <View\n style={[\n tw.style('rounded overflow-hidden', twClassName),\n height !== undefined && { height },\n width !== undefined && { width },\n style,\n ]}\n {...props}\n >\n <Animated.View\n {...animatedViewProps}\n style={[\n tw.style('absolute inset-0 rounded bg-icon-alternative'),\n { opacity: opacityAnim },\n animatedViewProps?.style,\n ]}\n pointerEvents=\"none\"\n />\n\n {hasChildren && (\n <View\n {...childrenWrapperProps}\n style={[\n tw.style('relative z-10 opacity-0'),\n childrenWrapperProps?.style,\n ]}\n pointerEvents=\"none\"\n accessibilityElementsHidden\n importantForAccessibility=\"no-hide-descendants\"\n >\n {children}\n </View>\n )}\n </View>\n );\n};\n\nexport default Skeleton;\n"]}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=Skeleton.types.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Skeleton.types.cjs","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { ReactNode } from 'react';\nimport type { ViewProps } from 'react-native';\n\n/**\n * Skeleton component props.\n *\n * Extends ViewProps to inherit standard React Native props\n * such as testID and accessibilityLabel.\n */\nexport type SkeletonProps = {\n /**\n * Optional prop to set the height of the Skeleton.\n */\n height?: number | string;\n /**\n * Optional prop to set the width of the Skeleton.\n */\n width?: number | string;\n /**\n * Optional content to display within the skeleton.\n * When provided without `hideChildren`, children are rendered directly.\n * When provided with `hideChildren`, children are rendered invisibly\n * to preserve layout dimensions.\n */\n children?: ReactNode;\n /**\n * When true, children are rendered invisibly while the skeleton\n * animation plays, preserving layout dimensions.\n *\n * @default false\n */\n hideChildren?: boolean;\n /**\n * Props spread to the children wrapper View (e.g., testID, accessibilityLabel).\n */\n childrenWrapperProps?: ViewProps;\n /**\n * Props spread to the animated background View (e.g., testID, accessibilityLabel).\n */\n animatedViewProps?: ViewProps;\n /**\n * Tailwind CSS classes for the skeleton container.\n */\n twClassName?: string;\n /**\n * Whether to automatically start the shimmer animation.\n *\n * @default true\n */\n autoPlay?: boolean;\n} & ViewProps;\n"]}
@@ -0,0 +1,51 @@
1
+ import type { ReactNode } from "react";
2
+ import type { ViewProps } from "react-native/index.js";
3
+ /**
4
+ * Skeleton component props.
5
+ *
6
+ * Extends ViewProps to inherit standard React Native props
7
+ * such as testID and accessibilityLabel.
8
+ */
9
+ export type SkeletonProps = {
10
+ /**
11
+ * Optional prop to set the height of the Skeleton.
12
+ */
13
+ height?: number | string;
14
+ /**
15
+ * Optional prop to set the width of the Skeleton.
16
+ */
17
+ width?: number | string;
18
+ /**
19
+ * Optional content to display within the skeleton.
20
+ * When provided without `hideChildren`, children are rendered directly.
21
+ * When provided with `hideChildren`, children are rendered invisibly
22
+ * to preserve layout dimensions.
23
+ */
24
+ children?: ReactNode;
25
+ /**
26
+ * When true, children are rendered invisibly while the skeleton
27
+ * animation plays, preserving layout dimensions.
28
+ *
29
+ * @default false
30
+ */
31
+ hideChildren?: boolean;
32
+ /**
33
+ * Props spread to the children wrapper View (e.g., testID, accessibilityLabel).
34
+ */
35
+ childrenWrapperProps?: ViewProps;
36
+ /**
37
+ * Props spread to the animated background View (e.g., testID, accessibilityLabel).
38
+ */
39
+ animatedViewProps?: ViewProps;
40
+ /**
41
+ * Tailwind CSS classes for the skeleton container.
42
+ */
43
+ twClassName?: string;
44
+ /**
45
+ * Whether to automatically start the shimmer animation.
46
+ *
47
+ * @default true
48
+ */
49
+ autoPlay?: boolean;
50
+ } & ViewProps;
51
+ //# sourceMappingURL=Skeleton.types.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Skeleton.types.d.cts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,8BAAqB;AAE9C;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,oBAAoB,CAAC,EAAE,SAAS,CAAC;IACjC;;OAEG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,SAAS,CAAC"}
@@ -0,0 +1,51 @@
1
+ import type { ReactNode } from "react";
2
+ import type { ViewProps } from "react-native/index.js";
3
+ /**
4
+ * Skeleton component props.
5
+ *
6
+ * Extends ViewProps to inherit standard React Native props
7
+ * such as testID and accessibilityLabel.
8
+ */
9
+ export type SkeletonProps = {
10
+ /**
11
+ * Optional prop to set the height of the Skeleton.
12
+ */
13
+ height?: number | string;
14
+ /**
15
+ * Optional prop to set the width of the Skeleton.
16
+ */
17
+ width?: number | string;
18
+ /**
19
+ * Optional content to display within the skeleton.
20
+ * When provided without `hideChildren`, children are rendered directly.
21
+ * When provided with `hideChildren`, children are rendered invisibly
22
+ * to preserve layout dimensions.
23
+ */
24
+ children?: ReactNode;
25
+ /**
26
+ * When true, children are rendered invisibly while the skeleton
27
+ * animation plays, preserving layout dimensions.
28
+ *
29
+ * @default false
30
+ */
31
+ hideChildren?: boolean;
32
+ /**
33
+ * Props spread to the children wrapper View (e.g., testID, accessibilityLabel).
34
+ */
35
+ childrenWrapperProps?: ViewProps;
36
+ /**
37
+ * Props spread to the animated background View (e.g., testID, accessibilityLabel).
38
+ */
39
+ animatedViewProps?: ViewProps;
40
+ /**
41
+ * Tailwind CSS classes for the skeleton container.
42
+ */
43
+ twClassName?: string;
44
+ /**
45
+ * Whether to automatically start the shimmer animation.
46
+ *
47
+ * @default true
48
+ */
49
+ autoPlay?: boolean;
50
+ } & ViewProps;
51
+ //# sourceMappingURL=Skeleton.types.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Skeleton.types.d.mts","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.types.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,8BAAqB;AAE9C;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,oBAAoB,CAAC,EAAE,SAAS,CAAC;IACjC;;OAEG;IACH,iBAAiB,CAAC,EAAE,SAAS,CAAC;IAC9B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,SAAS,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Skeleton.types.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Skeleton.types.mjs","sourceRoot":"","sources":["../../../src/components/Skeleton/Skeleton.types.ts"],"names":[],"mappings":"","sourcesContent":["// Third party dependencies.\nimport type { ReactNode } from 'react';\nimport type { ViewProps } from 'react-native';\n\n/**\n * Skeleton component props.\n *\n * Extends ViewProps to inherit standard React Native props\n * such as testID and accessibilityLabel.\n */\nexport type SkeletonProps = {\n /**\n * Optional prop to set the height of the Skeleton.\n */\n height?: number | string;\n /**\n * Optional prop to set the width of the Skeleton.\n */\n width?: number | string;\n /**\n * Optional content to display within the skeleton.\n * When provided without `hideChildren`, children are rendered directly.\n * When provided with `hideChildren`, children are rendered invisibly\n * to preserve layout dimensions.\n */\n children?: ReactNode;\n /**\n * When true, children are rendered invisibly while the skeleton\n * animation plays, preserving layout dimensions.\n *\n * @default false\n */\n hideChildren?: boolean;\n /**\n * Props spread to the children wrapper View (e.g., testID, accessibilityLabel).\n */\n childrenWrapperProps?: ViewProps;\n /**\n * Props spread to the animated background View (e.g., testID, accessibilityLabel).\n */\n animatedViewProps?: ViewProps;\n /**\n * Tailwind CSS classes for the skeleton container.\n */\n twClassName?: string;\n /**\n * Whether to automatically start the shimmer animation.\n *\n * @default true\n */\n autoPlay?: boolean;\n} & ViewProps;\n"]}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Skeleton = void 0;
7
+ var Skeleton_1 = require("./Skeleton.cjs");
8
+ Object.defineProperty(exports, "Skeleton", { enumerable: true, get: function () { return __importDefault(Skeleton_1).default; } });
9
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":";;;;;;AAAA,2CAAiD;AAAxC,qHAAA,OAAO,OAAY","sourcesContent":["export { default as Skeleton } from './Skeleton';\nexport type { SkeletonProps } from './Skeleton.types';\n"]}
@@ -0,0 +1,3 @@
1
+ export { default as Skeleton } from "./Skeleton.cjs";
2
+ export type { SkeletonProps } from "./Skeleton.types.cjs";
3
+ //# sourceMappingURL=index.d.cts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Skeleton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,uBAAmB;AACjD,YAAY,EAAE,aAAa,EAAE,6BAAyB"}