@navegarti/rn-design-system 0.2.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 (470) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +37 -0
  3. package/lib/module/api/axios-adapter.js +174 -0
  4. package/lib/module/api/axios-adapter.js.map +1 -0
  5. package/lib/module/api/errors.js +91 -0
  6. package/lib/module/api/errors.js.map +1 -0
  7. package/lib/module/api/index.js +30 -0
  8. package/lib/module/api/index.js.map +1 -0
  9. package/lib/module/api/retry-strategy.js +68 -0
  10. package/lib/module/api/retry-strategy.js.map +1 -0
  11. package/lib/module/api/stores/auth-store.js +26 -0
  12. package/lib/module/api/stores/auth-store.js.map +1 -0
  13. package/lib/module/api/types.js +4 -0
  14. package/lib/module/api/types.js.map +1 -0
  15. package/lib/module/api.js +10 -0
  16. package/lib/module/api.js.map +1 -0
  17. package/lib/module/components/Button/index.js +32 -0
  18. package/lib/module/components/Button/index.js.map +1 -0
  19. package/lib/module/components/Button/styles.js +27 -0
  20. package/lib/module/components/Button/styles.js.map +1 -0
  21. package/lib/module/components/Carousel/components/dot.js +42 -0
  22. package/lib/module/components/Carousel/components/dot.js.map +1 -0
  23. package/lib/module/components/Carousel/components/footer.js +22 -0
  24. package/lib/module/components/Carousel/components/footer.js.map +1 -0
  25. package/lib/module/components/Carousel/components/list.js +55 -0
  26. package/lib/module/components/Carousel/components/list.js.map +1 -0
  27. package/lib/module/components/Carousel/components/pagination.js +29 -0
  28. package/lib/module/components/Carousel/components/pagination.js.map +1 -0
  29. package/lib/module/components/Carousel/components/see-all-button.js +24 -0
  30. package/lib/module/components/Carousel/components/see-all-button.js.map +1 -0
  31. package/lib/module/components/Carousel/context.js +15 -0
  32. package/lib/module/components/Carousel/context.js.map +1 -0
  33. package/lib/module/components/Carousel/index.js +142 -0
  34. package/lib/module/components/Carousel/index.js.map +1 -0
  35. package/lib/module/components/Carousel/styles.js +10 -0
  36. package/lib/module/components/Carousel/styles.js.map +1 -0
  37. package/lib/module/components/Carousel/types.js +4 -0
  38. package/lib/module/components/Carousel/types.js.map +1 -0
  39. package/lib/module/components/Checkbox/index.js +34 -0
  40. package/lib/module/components/Checkbox/index.js.map +1 -0
  41. package/lib/module/components/Checkbox/styles.js +9 -0
  42. package/lib/module/components/Checkbox/styles.js.map +1 -0
  43. package/lib/module/components/FAB/components/extended-fab.js +17 -0
  44. package/lib/module/components/FAB/components/extended-fab.js.map +1 -0
  45. package/lib/module/components/FAB/index.js +24 -0
  46. package/lib/module/components/FAB/index.js.map +1 -0
  47. package/lib/module/components/FAB/styles.js +40 -0
  48. package/lib/module/components/FAB/styles.js.map +1 -0
  49. package/lib/module/components/FAB/utils.js +49 -0
  50. package/lib/module/components/FAB/utils.js.map +1 -0
  51. package/lib/module/components/Flex/index.js +4 -0
  52. package/lib/module/components/Flex/index.js.map +1 -0
  53. package/lib/module/components/Flex/styles.js +31 -0
  54. package/lib/module/components/Flex/styles.js.map +1 -0
  55. package/lib/module/components/FormLabel/index.js +10 -0
  56. package/lib/module/components/FormLabel/index.js.map +1 -0
  57. package/lib/module/components/FormLabel/styles.js +10 -0
  58. package/lib/module/components/FormLabel/styles.js.map +1 -0
  59. package/lib/module/components/Input/components/input-control.js +25 -0
  60. package/lib/module/components/Input/components/input-control.js.map +1 -0
  61. package/lib/module/components/Input/components/input-error.js +17 -0
  62. package/lib/module/components/Input/components/input-error.js.map +1 -0
  63. package/lib/module/components/Input/components/input-field.js +48 -0
  64. package/lib/module/components/Input/components/input-field.js.map +1 -0
  65. package/lib/module/components/Input/components/input-icon.js +10 -0
  66. package/lib/module/components/Input/components/input-icon.js.map +1 -0
  67. package/lib/module/components/Input/components/input-password-toggle.js +30 -0
  68. package/lib/module/components/Input/components/input-password-toggle.js.map +1 -0
  69. package/lib/module/components/Input/components/input-root.js +45 -0
  70. package/lib/module/components/Input/components/input-root.js.map +1 -0
  71. package/lib/module/components/Input/context.js +12 -0
  72. package/lib/module/components/Input/context.js.map +1 -0
  73. package/lib/module/components/Input/index.js +18 -0
  74. package/lib/module/components/Input/index.js.map +1 -0
  75. package/lib/module/components/Input/styles.js +40 -0
  76. package/lib/module/components/Input/styles.js.map +1 -0
  77. package/lib/module/components/Input/utils.js +24 -0
  78. package/lib/module/components/Input/utils.js.map +1 -0
  79. package/lib/module/components/Margin/index.js +4 -0
  80. package/lib/module/components/Margin/index.js.map +1 -0
  81. package/lib/module/components/Margin/styles.js +15 -0
  82. package/lib/module/components/Margin/styles.js.map +1 -0
  83. package/lib/module/components/OTPInput/index.js +85 -0
  84. package/lib/module/components/OTPInput/index.js.map +1 -0
  85. package/lib/module/components/OTPInput/styles.js +23 -0
  86. package/lib/module/components/OTPInput/styles.js.map +1 -0
  87. package/lib/module/components/OTPInput/utils.js +24 -0
  88. package/lib/module/components/OTPInput/utils.js.map +1 -0
  89. package/lib/module/components/Padding/index.js +4 -0
  90. package/lib/module/components/Padding/index.js.map +1 -0
  91. package/lib/module/components/Padding/styles.js +15 -0
  92. package/lib/module/components/Padding/styles.js.map +1 -0
  93. package/lib/module/components/Radio/components/radio-item.js +52 -0
  94. package/lib/module/components/Radio/components/radio-item.js.map +1 -0
  95. package/lib/module/components/Radio/context.js +5 -0
  96. package/lib/module/components/Radio/context.js.map +1 -0
  97. package/lib/module/components/Radio/index.js +30 -0
  98. package/lib/module/components/Radio/index.js.map +1 -0
  99. package/lib/module/components/Radio/styles.js +33 -0
  100. package/lib/module/components/Radio/styles.js.map +1 -0
  101. package/lib/module/components/Radio/utils.js +15 -0
  102. package/lib/module/components/Radio/utils.js.map +1 -0
  103. package/lib/module/components/Select/components/error-icon.js +8 -0
  104. package/lib/module/components/Select/components/error-icon.js.map +1 -0
  105. package/lib/module/components/Select/components/select-error.js +17 -0
  106. package/lib/module/components/Select/components/select-error.js.map +1 -0
  107. package/lib/module/components/Select/components/select-field.js +67 -0
  108. package/lib/module/components/Select/components/select-field.js.map +1 -0
  109. package/lib/module/components/Select/context.js +12 -0
  110. package/lib/module/components/Select/context.js.map +1 -0
  111. package/lib/module/components/Select/index.js +26 -0
  112. package/lib/module/components/Select/index.js.map +1 -0
  113. package/lib/module/components/Select/styles.js +15 -0
  114. package/lib/module/components/Select/styles.js.map +1 -0
  115. package/lib/module/components/Skeleton/index.js +44 -0
  116. package/lib/module/components/Skeleton/index.js.map +1 -0
  117. package/lib/module/components/Switch/index.js +55 -0
  118. package/lib/module/components/Switch/index.js.map +1 -0
  119. package/lib/module/components/Switch/styles.js +31 -0
  120. package/lib/module/components/Switch/styles.js.map +1 -0
  121. package/lib/module/components/Switch/utils.js +12 -0
  122. package/lib/module/components/Switch/utils.js.map +1 -0
  123. package/lib/module/components/Text/index.js +4 -0
  124. package/lib/module/components/Text/index.js.map +1 -0
  125. package/lib/module/components/Text/styles.js +25 -0
  126. package/lib/module/components/Text/styles.js.map +1 -0
  127. package/lib/module/components.js +23 -0
  128. package/lib/module/components.js.map +1 -0
  129. package/lib/module/form.js +10 -0
  130. package/lib/module/form.js.map +1 -0
  131. package/lib/module/formValidators/ZodTypeValidator.js +38 -0
  132. package/lib/module/formValidators/ZodTypeValidator.js.map +1 -0
  133. package/lib/module/formValidators/index.js +8 -0
  134. package/lib/module/formValidators/index.js.map +1 -0
  135. package/lib/module/formValidators/types.js +4 -0
  136. package/lib/module/formValidators/types.js.map +1 -0
  137. package/lib/module/hooks/useAppIsActive.js +20 -0
  138. package/lib/module/hooks/useAppIsActive.js.map +1 -0
  139. package/lib/module/hooks/useAppSecurity.js +26 -0
  140. package/lib/module/hooks/useAppSecurity.js.map +1 -0
  141. package/lib/module/hooks/useNetworkStatus.js +55 -0
  142. package/lib/module/hooks/useNetworkStatus.js.map +1 -0
  143. package/lib/module/hooks/useStatusBar.js +26 -0
  144. package/lib/module/hooks/useStatusBar.js.map +1 -0
  145. package/lib/module/hooks.js +12 -0
  146. package/lib/module/hooks.js.map +1 -0
  147. package/lib/module/index.js +53 -0
  148. package/lib/module/index.js.map +1 -0
  149. package/lib/module/libs/tanstack-form.js +5 -0
  150. package/lib/module/libs/tanstack-form.js.map +1 -0
  151. package/lib/module/package.json +1 -0
  152. package/lib/module/utils/camelCase.js +7 -0
  153. package/lib/module/utils/camelCase.js.map +1 -0
  154. package/lib/module/utils/camelCaseJSONKeys.js +29 -0
  155. package/lib/module/utils/camelCaseJSONKeys.js.map +1 -0
  156. package/lib/module/utils/capitalizeWord.js +5 -0
  157. package/lib/module/utils/capitalizeWord.js.map +1 -0
  158. package/lib/module/utils/createLinkingPhoneNumberString.js +10 -0
  159. package/lib/module/utils/createLinkingPhoneNumberString.js.map +1 -0
  160. package/lib/module/utils/dateFormatters.js +34 -0
  161. package/lib/module/utils/dateFormatters.js.map +1 -0
  162. package/lib/module/utils/debounce.js +12 -0
  163. package/lib/module/utils/debounce.js.map +1 -0
  164. package/lib/module/utils/deepLinkParser.js +117 -0
  165. package/lib/module/utils/deepLinkParser.js.map +1 -0
  166. package/lib/module/utils/getAge.js +13 -0
  167. package/lib/module/utils/getAge.js.map +1 -0
  168. package/lib/module/utils/getOnlyNumbers.js +4 -0
  169. package/lib/module/utils/getOnlyNumbers.js.map +1 -0
  170. package/lib/module/utils/isArray.js +7 -0
  171. package/lib/module/utils/isArray.js.map +1 -0
  172. package/lib/module/utils/isObject.js +7 -0
  173. package/lib/module/utils/isObject.js.map +1 -0
  174. package/lib/module/utils/masks.js +5 -0
  175. package/lib/module/utils/masks.js.map +1 -0
  176. package/lib/module/utils/priceFormatter.js +9 -0
  177. package/lib/module/utils/priceFormatter.js.map +1 -0
  178. package/lib/module/utils/removeTextAccents.js +5 -0
  179. package/lib/module/utils/removeTextAccents.js.map +1 -0
  180. package/lib/module/utils/shadowStyledIos.js +8 -0
  181. package/lib/module/utils/shadowStyledIos.js.map +1 -0
  182. package/lib/module/utils/sortBy.js +18 -0
  183. package/lib/module/utils/sortBy.js.map +1 -0
  184. package/lib/module/utils/uniqBy.js +15 -0
  185. package/lib/module/utils/uniqBy.js.map +1 -0
  186. package/lib/module/utils/userFullnameInitialsExtractor.js +19 -0
  187. package/lib/module/utils/userFullnameInitialsExtractor.js.map +1 -0
  188. package/lib/module/utils.js +26 -0
  189. package/lib/module/utils.js.map +1 -0
  190. package/lib/typescript/package.json +1 -0
  191. package/lib/typescript/src/api/axios-adapter.d.ts +61 -0
  192. package/lib/typescript/src/api/axios-adapter.d.ts.map +1 -0
  193. package/lib/typescript/src/api/errors.d.ts +63 -0
  194. package/lib/typescript/src/api/errors.d.ts.map +1 -0
  195. package/lib/typescript/src/api/index.d.ts +21 -0
  196. package/lib/typescript/src/api/index.d.ts.map +1 -0
  197. package/lib/typescript/src/api/retry-strategy.d.ts +21 -0
  198. package/lib/typescript/src/api/retry-strategy.d.ts.map +1 -0
  199. package/lib/typescript/src/api/stores/auth-store.d.ts +15 -0
  200. package/lib/typescript/src/api/stores/auth-store.d.ts.map +1 -0
  201. package/lib/typescript/src/api/types.d.ts +68 -0
  202. package/lib/typescript/src/api/types.d.ts.map +1 -0
  203. package/lib/typescript/src/api.d.ts +8 -0
  204. package/lib/typescript/src/api.d.ts.map +1 -0
  205. package/lib/typescript/src/components/Button/index.d.ts +478 -0
  206. package/lib/typescript/src/components/Button/index.d.ts.map +1 -0
  207. package/lib/typescript/src/components/Button/styles.d.ts +318 -0
  208. package/lib/typescript/src/components/Button/styles.d.ts.map +1 -0
  209. package/lib/typescript/src/components/Carousel/components/dot.d.ts +7 -0
  210. package/lib/typescript/src/components/Carousel/components/dot.d.ts.map +1 -0
  211. package/lib/typescript/src/components/Carousel/components/footer.d.ts +6 -0
  212. package/lib/typescript/src/components/Carousel/components/footer.d.ts.map +1 -0
  213. package/lib/typescript/src/components/Carousel/components/list.d.ts +8 -0
  214. package/lib/typescript/src/components/Carousel/components/list.d.ts.map +1 -0
  215. package/lib/typescript/src/components/Carousel/components/pagination.d.ts +2 -0
  216. package/lib/typescript/src/components/Carousel/components/pagination.d.ts.map +1 -0
  217. package/lib/typescript/src/components/Carousel/components/see-all-button.d.ts +7 -0
  218. package/lib/typescript/src/components/Carousel/components/see-all-button.d.ts.map +1 -0
  219. package/lib/typescript/src/components/Carousel/context.d.ts +4 -0
  220. package/lib/typescript/src/components/Carousel/context.d.ts.map +1 -0
  221. package/lib/typescript/src/components/Carousel/index.d.ts +394 -0
  222. package/lib/typescript/src/components/Carousel/index.d.ts.map +1 -0
  223. package/lib/typescript/src/components/Carousel/styles.d.ts +79 -0
  224. package/lib/typescript/src/components/Carousel/styles.d.ts.map +1 -0
  225. package/lib/typescript/src/components/Carousel/types.d.ts +40 -0
  226. package/lib/typescript/src/components/Carousel/types.d.ts.map +1 -0
  227. package/lib/typescript/src/components/Checkbox/index.d.ts +10 -0
  228. package/lib/typescript/src/components/Checkbox/index.d.ts.map +1 -0
  229. package/lib/typescript/src/components/Checkbox/styles.d.ts +154 -0
  230. package/lib/typescript/src/components/Checkbox/styles.d.ts.map +1 -0
  231. package/lib/typescript/src/components/FAB/components/extended-fab.d.ts +3 -0
  232. package/lib/typescript/src/components/FAB/components/extended-fab.d.ts.map +1 -0
  233. package/lib/typescript/src/components/FAB/index.d.ts +8 -0
  234. package/lib/typescript/src/components/FAB/index.d.ts.map +1 -0
  235. package/lib/typescript/src/components/FAB/styles.d.ts +807 -0
  236. package/lib/typescript/src/components/FAB/styles.d.ts.map +1 -0
  237. package/lib/typescript/src/components/FAB/utils.d.ts +19 -0
  238. package/lib/typescript/src/components/FAB/utils.d.ts.map +1 -0
  239. package/lib/typescript/src/components/Flex/index.d.ts +2 -0
  240. package/lib/typescript/src/components/Flex/index.d.ts.map +1 -0
  241. package/lib/typescript/src/components/Flex/styles.d.ts +135 -0
  242. package/lib/typescript/src/components/Flex/styles.d.ts.map +1 -0
  243. package/lib/typescript/src/components/FormLabel/index.d.ts +3 -0
  244. package/lib/typescript/src/components/FormLabel/index.d.ts.map +1 -0
  245. package/lib/typescript/src/components/FormLabel/styles.d.ts +158 -0
  246. package/lib/typescript/src/components/FormLabel/styles.d.ts.map +1 -0
  247. package/lib/typescript/src/components/Input/components/input-control.d.ts +3 -0
  248. package/lib/typescript/src/components/Input/components/input-control.d.ts.map +1 -0
  249. package/lib/typescript/src/components/Input/components/input-error.d.ts +3 -0
  250. package/lib/typescript/src/components/Input/components/input-error.d.ts.map +1 -0
  251. package/lib/typescript/src/components/Input/components/input-field.d.ts +7 -0
  252. package/lib/typescript/src/components/Input/components/input-field.d.ts.map +1 -0
  253. package/lib/typescript/src/components/Input/components/input-icon.d.ts +3 -0
  254. package/lib/typescript/src/components/Input/components/input-icon.d.ts.map +1 -0
  255. package/lib/typescript/src/components/Input/components/input-password-toggle.d.ts +2 -0
  256. package/lib/typescript/src/components/Input/components/input-password-toggle.d.ts.map +1 -0
  257. package/lib/typescript/src/components/Input/components/input-root.d.ts +9 -0
  258. package/lib/typescript/src/components/Input/components/input-root.d.ts.map +1 -0
  259. package/lib/typescript/src/components/Input/context.d.ts +15 -0
  260. package/lib/typescript/src/components/Input/context.d.ts.map +1 -0
  261. package/lib/typescript/src/components/Input/index.d.ts +17 -0
  262. package/lib/typescript/src/components/Input/index.d.ts.map +1 -0
  263. package/lib/typescript/src/components/Input/styles.d.ts +738 -0
  264. package/lib/typescript/src/components/Input/styles.d.ts.map +1 -0
  265. package/lib/typescript/src/components/Input/utils.d.ts +3 -0
  266. package/lib/typescript/src/components/Input/utils.d.ts.map +1 -0
  267. package/lib/typescript/src/components/Margin/index.d.ts +2 -0
  268. package/lib/typescript/src/components/Margin/index.d.ts.map +1 -0
  269. package/lib/typescript/src/components/Margin/styles.d.ts +144 -0
  270. package/lib/typescript/src/components/Margin/styles.d.ts.map +1 -0
  271. package/lib/typescript/src/components/OTPInput/index.d.ts +18 -0
  272. package/lib/typescript/src/components/OTPInput/index.d.ts.map +1 -0
  273. package/lib/typescript/src/components/OTPInput/styles.d.ts +214 -0
  274. package/lib/typescript/src/components/OTPInput/styles.d.ts.map +1 -0
  275. package/lib/typescript/src/components/OTPInput/utils.d.ts +3 -0
  276. package/lib/typescript/src/components/OTPInput/utils.d.ts.map +1 -0
  277. package/lib/typescript/src/components/Padding/index.d.ts +2 -0
  278. package/lib/typescript/src/components/Padding/index.d.ts.map +1 -0
  279. package/lib/typescript/src/components/Padding/styles.d.ts +144 -0
  280. package/lib/typescript/src/components/Padding/styles.d.ts.map +1 -0
  281. package/lib/typescript/src/components/Radio/components/radio-item.d.ts +8 -0
  282. package/lib/typescript/src/components/Radio/components/radio-item.d.ts.map +1 -0
  283. package/lib/typescript/src/components/Radio/context.d.ts +8 -0
  284. package/lib/typescript/src/components/Radio/context.d.ts.map +1 -0
  285. package/lib/typescript/src/components/Radio/index.d.ts +86 -0
  286. package/lib/typescript/src/components/Radio/index.d.ts.map +1 -0
  287. package/lib/typescript/src/components/Radio/styles.d.ts +348 -0
  288. package/lib/typescript/src/components/Radio/styles.d.ts.map +1 -0
  289. package/lib/typescript/src/components/Radio/utils.d.ts +2 -0
  290. package/lib/typescript/src/components/Radio/utils.d.ts.map +1 -0
  291. package/lib/typescript/src/components/Select/components/error-icon.d.ts +2 -0
  292. package/lib/typescript/src/components/Select/components/error-icon.d.ts.map +1 -0
  293. package/lib/typescript/src/components/Select/components/select-error.d.ts +3 -0
  294. package/lib/typescript/src/components/Select/components/select-error.d.ts.map +1 -0
  295. package/lib/typescript/src/components/Select/components/select-field.d.ts +5 -0
  296. package/lib/typescript/src/components/Select/components/select-field.d.ts.map +1 -0
  297. package/lib/typescript/src/components/Select/context.d.ts +7 -0
  298. package/lib/typescript/src/components/Select/context.d.ts.map +1 -0
  299. package/lib/typescript/src/components/Select/index.d.ts +11 -0
  300. package/lib/typescript/src/components/Select/index.d.ts.map +1 -0
  301. package/lib/typescript/src/components/Select/styles.d.ts +315 -0
  302. package/lib/typescript/src/components/Select/styles.d.ts.map +1 -0
  303. package/lib/typescript/src/components/Skeleton/index.d.ts +11 -0
  304. package/lib/typescript/src/components/Skeleton/index.d.ts.map +1 -0
  305. package/lib/typescript/src/components/Switch/index.d.ts +11 -0
  306. package/lib/typescript/src/components/Switch/index.d.ts.map +1 -0
  307. package/lib/typescript/src/components/Switch/styles.d.ts +344 -0
  308. package/lib/typescript/src/components/Switch/styles.d.ts.map +1 -0
  309. package/lib/typescript/src/components/Switch/utils.d.ts +2 -0
  310. package/lib/typescript/src/components/Switch/utils.d.ts.map +1 -0
  311. package/lib/typescript/src/components/Text/index.d.ts +3 -0
  312. package/lib/typescript/src/components/Text/index.d.ts.map +1 -0
  313. package/lib/typescript/src/components/Text/styles.d.ts +169 -0
  314. package/lib/typescript/src/components/Text/styles.d.ts.map +1 -0
  315. package/lib/typescript/src/components.d.ts +20 -0
  316. package/lib/typescript/src/components.d.ts.map +1 -0
  317. package/lib/typescript/src/form.d.ts +7 -0
  318. package/lib/typescript/src/form.d.ts.map +1 -0
  319. package/lib/typescript/src/formValidators/ZodTypeValidator.d.ts +11 -0
  320. package/lib/typescript/src/formValidators/ZodTypeValidator.d.ts.map +1 -0
  321. package/lib/typescript/src/formValidators/index.d.ts +4 -0
  322. package/lib/typescript/src/formValidators/index.d.ts.map +1 -0
  323. package/lib/typescript/src/formValidators/types.d.ts +16 -0
  324. package/lib/typescript/src/formValidators/types.d.ts.map +1 -0
  325. package/lib/typescript/src/hooks/useAppIsActive.d.ts +2 -0
  326. package/lib/typescript/src/hooks/useAppIsActive.d.ts.map +1 -0
  327. package/lib/typescript/src/hooks/useAppSecurity.d.ts +8 -0
  328. package/lib/typescript/src/hooks/useAppSecurity.d.ts.map +1 -0
  329. package/lib/typescript/src/hooks/useNetworkStatus.d.ts +7 -0
  330. package/lib/typescript/src/hooks/useNetworkStatus.d.ts.map +1 -0
  331. package/lib/typescript/src/hooks/useStatusBar.d.ts +7 -0
  332. package/lib/typescript/src/hooks/useStatusBar.d.ts.map +1 -0
  333. package/lib/typescript/src/hooks.d.ts +9 -0
  334. package/lib/typescript/src/hooks.d.ts.map +1 -0
  335. package/lib/typescript/src/index.d.ts +45 -0
  336. package/lib/typescript/src/index.d.ts.map +1 -0
  337. package/lib/typescript/src/libs/tanstack-form.d.ts +3 -0
  338. package/lib/typescript/src/libs/tanstack-form.d.ts.map +1 -0
  339. package/lib/typescript/src/utils/camelCase.d.ts +2 -0
  340. package/lib/typescript/src/utils/camelCase.d.ts.map +1 -0
  341. package/lib/typescript/src/utils/camelCaseJSONKeys.d.ts +3 -0
  342. package/lib/typescript/src/utils/camelCaseJSONKeys.d.ts.map +1 -0
  343. package/lib/typescript/src/utils/capitalizeWord.d.ts +3 -0
  344. package/lib/typescript/src/utils/capitalizeWord.d.ts.map +1 -0
  345. package/lib/typescript/src/utils/createLinkingPhoneNumberString.d.ts +3 -0
  346. package/lib/typescript/src/utils/createLinkingPhoneNumberString.d.ts.map +1 -0
  347. package/lib/typescript/src/utils/dateFormatters.d.ts +7 -0
  348. package/lib/typescript/src/utils/dateFormatters.d.ts.map +1 -0
  349. package/lib/typescript/src/utils/debounce.d.ts +2 -0
  350. package/lib/typescript/src/utils/debounce.d.ts.map +1 -0
  351. package/lib/typescript/src/utils/deepLinkParser.d.ts +7 -0
  352. package/lib/typescript/src/utils/deepLinkParser.d.ts.map +1 -0
  353. package/lib/typescript/src/utils/getAge.d.ts +2 -0
  354. package/lib/typescript/src/utils/getAge.d.ts.map +1 -0
  355. package/lib/typescript/src/utils/getOnlyNumbers.d.ts +2 -0
  356. package/lib/typescript/src/utils/getOnlyNumbers.d.ts.map +1 -0
  357. package/lib/typescript/src/utils/isArray.d.ts +2 -0
  358. package/lib/typescript/src/utils/isArray.d.ts.map +1 -0
  359. package/lib/typescript/src/utils/isObject.d.ts +2 -0
  360. package/lib/typescript/src/utils/isObject.d.ts.map +1 -0
  361. package/lib/typescript/src/utils/masks.d.ts +3 -0
  362. package/lib/typescript/src/utils/masks.d.ts.map +1 -0
  363. package/lib/typescript/src/utils/priceFormatter.d.ts +2 -0
  364. package/lib/typescript/src/utils/priceFormatter.d.ts.map +1 -0
  365. package/lib/typescript/src/utils/removeTextAccents.d.ts +3 -0
  366. package/lib/typescript/src/utils/removeTextAccents.d.ts.map +1 -0
  367. package/lib/typescript/src/utils/shadowStyledIos.d.ts +3 -0
  368. package/lib/typescript/src/utils/shadowStyledIos.d.ts.map +1 -0
  369. package/lib/typescript/src/utils/sortBy.d.ts +2 -0
  370. package/lib/typescript/src/utils/sortBy.d.ts.map +1 -0
  371. package/lib/typescript/src/utils/uniqBy.d.ts +2 -0
  372. package/lib/typescript/src/utils/uniqBy.d.ts.map +1 -0
  373. package/lib/typescript/src/utils/userFullnameInitialsExtractor.d.ts +3 -0
  374. package/lib/typescript/src/utils/userFullnameInitialsExtractor.d.ts.map +1 -0
  375. package/lib/typescript/src/utils.d.ts +23 -0
  376. package/lib/typescript/src/utils.d.ts.map +1 -0
  377. package/package.json +234 -0
  378. package/src/api/axios-adapter.ts +272 -0
  379. package/src/api/errors.ts +113 -0
  380. package/src/api/index.ts +27 -0
  381. package/src/api/retry-strategy.ts +86 -0
  382. package/src/api/stores/auth-store.ts +26 -0
  383. package/src/api/types.ts +91 -0
  384. package/src/api.tsx +17 -0
  385. package/src/components/Button/index.tsx +35 -0
  386. package/src/components/Button/styles.ts +28 -0
  387. package/src/components/Carousel/components/dot.tsx +43 -0
  388. package/src/components/Carousel/components/footer.tsx +21 -0
  389. package/src/components/Carousel/components/list.tsx +81 -0
  390. package/src/components/Carousel/components/pagination.tsx +16 -0
  391. package/src/components/Carousel/components/see-all-button.tsx +25 -0
  392. package/src/components/Carousel/context.tsx +19 -0
  393. package/src/components/Carousel/index.tsx +191 -0
  394. package/src/components/Carousel/styles.ts +8 -0
  395. package/src/components/Carousel/types.ts +45 -0
  396. package/src/components/Checkbox/index.tsx +42 -0
  397. package/src/components/Checkbox/styles.ts +7 -0
  398. package/src/components/FAB/components/extended-fab.tsx +17 -0
  399. package/src/components/FAB/index.tsx +22 -0
  400. package/src/components/FAB/styles.ts +61 -0
  401. package/src/components/FAB/utils.ts +45 -0
  402. package/src/components/Flex/index.tsx +1 -0
  403. package/src/components/Flex/styles.ts +47 -0
  404. package/src/components/FormLabel/index.tsx +6 -0
  405. package/src/components/FormLabel/styles.ts +8 -0
  406. package/src/components/Input/components/input-control.tsx +20 -0
  407. package/src/components/Input/components/input-error.tsx +14 -0
  408. package/src/components/Input/components/input-field.tsx +55 -0
  409. package/src/components/Input/components/input-icon.tsx +7 -0
  410. package/src/components/Input/components/input-password-toggle.tsx +19 -0
  411. package/src/components/Input/components/input-root.tsx +55 -0
  412. package/src/components/Input/context.tsx +26 -0
  413. package/src/components/Input/index.tsx +17 -0
  414. package/src/components/Input/styles.ts +45 -0
  415. package/src/components/Input/utils.ts +27 -0
  416. package/src/components/Margin/index.tsx +1 -0
  417. package/src/components/Margin/styles.ts +23 -0
  418. package/src/components/OTPInput/index.tsx +116 -0
  419. package/src/components/OTPInput/styles.ts +23 -0
  420. package/src/components/OTPInput/utils.ts +31 -0
  421. package/src/components/Padding/index.tsx +1 -0
  422. package/src/components/Padding/styles.ts +23 -0
  423. package/src/components/Radio/components/radio-item.tsx +53 -0
  424. package/src/components/Radio/context.tsx +10 -0
  425. package/src/components/Radio/index.tsx +32 -0
  426. package/src/components/Radio/styles.ts +38 -0
  427. package/src/components/Radio/utils.ts +19 -0
  428. package/src/components/Select/components/error-icon.tsx +3 -0
  429. package/src/components/Select/components/select-error.tsx +14 -0
  430. package/src/components/Select/components/select-field.tsx +72 -0
  431. package/src/components/Select/context.tsx +17 -0
  432. package/src/components/Select/index.tsx +24 -0
  433. package/src/components/Select/styles.ts +15 -0
  434. package/src/components/Skeleton/index.tsx +60 -0
  435. package/src/components/Switch/index.tsx +61 -0
  436. package/src/components/Switch/styles.ts +32 -0
  437. package/src/components/Switch/utils.ts +15 -0
  438. package/src/components/Text/index.tsx +2 -0
  439. package/src/components/Text/styles.ts +44 -0
  440. package/src/components.tsx +20 -0
  441. package/src/form.tsx +7 -0
  442. package/src/formValidators/ZodTypeValidator.ts +58 -0
  443. package/src/formValidators/index.ts +8 -0
  444. package/src/formValidators/types.ts +21 -0
  445. package/src/hooks/useAppIsActive.ts +28 -0
  446. package/src/hooks/useAppSecurity.tsx +35 -0
  447. package/src/hooks/useNetworkStatus.ts +75 -0
  448. package/src/hooks/useStatusBar.ts +34 -0
  449. package/src/hooks.tsx +9 -0
  450. package/src/index.tsx +50 -0
  451. package/src/libs/tanstack-form.tsx +3 -0
  452. package/src/utils/camelCase.ts +6 -0
  453. package/src/utils/camelCaseJSONKeys.ts +31 -0
  454. package/src/utils/capitalizeWord.ts +4 -0
  455. package/src/utils/createLinkingPhoneNumberString.ts +13 -0
  456. package/src/utils/dateFormatters.ts +48 -0
  457. package/src/utils/debounce.ts +15 -0
  458. package/src/utils/deepLinkParser.ts +88 -0
  459. package/src/utils/getAge.ts +12 -0
  460. package/src/utils/getOnlyNumbers.ts +1 -0
  461. package/src/utils/isArray.ts +4 -0
  462. package/src/utils/isObject.ts +4 -0
  463. package/src/utils/masks.ts +3 -0
  464. package/src/utils/priceFormatter.ts +11 -0
  465. package/src/utils/removeTextAccents.ts +4 -0
  466. package/src/utils/shadowStyledIos.ts +6 -0
  467. package/src/utils/sortBy.ts +21 -0
  468. package/src/utils/uniqBy.ts +20 -0
  469. package/src/utils/userFullnameInitialsExtractor.ts +23 -0
  470. package/src/utils.tsx +23 -0
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ import { useInputContext } from "../context.js";
4
+ import { InputErrorText } from "../styles.js";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ export const InputError = props => {
7
+ const {
8
+ hasError
9
+ } = useInputContext();
10
+ if (!hasError) {
11
+ return null;
12
+ }
13
+ return /*#__PURE__*/_jsx(InputErrorText, {
14
+ ...props
15
+ });
16
+ };
17
+ //# sourceMappingURL=input-error.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useInputContext","InputErrorText","jsx","_jsx","InputError","props","hasError"],"sourceRoot":"../../../../../src","sources":["components/Input/components/input-error.tsx"],"mappings":";;AAEA,SAASA,eAAe,QAAQ,eAAY;AAC5C,SAASC,cAAc,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE3C,OAAO,MAAMC,UAAU,GAAIC,KAAgB,IAAK;EAC9C,MAAM;IAAEC;EAAS,CAAC,GAAGN,eAAe,CAAC,CAAC;EAEtC,IAAI,CAACM,QAAQ,EAAE;IACb,OAAO,IAAI;EACb;EAEA,oBAAOH,IAAA,CAACF,cAAc;IAAA,GAAKI;EAAK,CAAG,CAAC;AACtC,CAAC","ignoreList":[]}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+
3
+ import { memo, useState } from 'react';
4
+ import { useInputContext } from "../context.js";
5
+ import { ErrorExclamation, StyledMaskInput } from "../styles.js";
6
+ import { InputIcon } from "./input-icon.js";
7
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
8
+ export const InputField = /*#__PURE__*/memo(({
9
+ value,
10
+ onChangeText,
11
+ ...props
12
+ }) => {
13
+ const {
14
+ inputRef,
15
+ handleFocus,
16
+ handleBlur,
17
+ isPassword,
18
+ showPassword,
19
+ hasError,
20
+ disabled
21
+ } = useInputContext();
22
+ const [internalValue, setInternalValue] = useState(value ?? '');
23
+ return /*#__PURE__*/_jsxs(_Fragment, {
24
+ children: [/*#__PURE__*/_jsx(StyledMaskInput, {
25
+ ref: inputRef,
26
+ onFocus: handleFocus,
27
+ onBlur: handleBlur,
28
+ secureTextEntry: isPassword && !showPassword,
29
+ value: internalValue,
30
+ onChangeText: (masked, unmasked) => {
31
+ setInternalValue(unmasked);
32
+ if (onChangeText) {
33
+ onChangeText(unmasked, masked);
34
+ }
35
+ },
36
+ cursorColor: "#000",
37
+ editable: !disabled,
38
+ ...props
39
+ }), hasError && /*#__PURE__*/_jsx(InputIcon, {
40
+ children: /*#__PURE__*/_jsx(ErrorExclamation, {
41
+ children: "!"
42
+ })
43
+ })]
44
+ });
45
+ }, (prevProps, nextProps) => {
46
+ return prevProps.value === nextProps.value;
47
+ });
48
+ //# sourceMappingURL=input-field.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["memo","useState","useInputContext","ErrorExclamation","StyledMaskInput","InputIcon","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","InputField","value","onChangeText","props","inputRef","handleFocus","handleBlur","isPassword","showPassword","hasError","disabled","internalValue","setInternalValue","children","ref","onFocus","onBlur","secureTextEntry","masked","unmasked","cursorColor","editable","prevProps","nextProps"],"sourceRoot":"../../../../../src","sources":["components/Input/components/input-field.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,QAAQ,QAAQ,OAAO;AAGtC,SAASC,eAAe,QAAQ,eAAY;AAC5C,SAASC,gBAAgB,EAAEC,eAAe,QAAQ,cAAW;AAC7D,SAASC,SAAS,QAAQ,iBAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAMzC,OAAO,MAAMC,UAAU,gBAAGZ,IAAI,CAC5B,CAAC;EAAEa,KAAK;EAAEC,YAAY;EAAE,GAAGC;AAAkB,CAAC,KAAK;EACjD,MAAM;IACJC,QAAQ;IACRC,WAAW;IACXC,UAAU;IACVC,UAAU;IACVC,YAAY;IACZC,QAAQ;IACRC;EACF,CAAC,GAAGpB,eAAe,CAAC,CAAC;EACrB,MAAM,CAACqB,aAAa,EAAEC,gBAAgB,CAAC,GAAGvB,QAAQ,CAACY,KAAK,IAAI,EAAE,CAAC;EAE/D,oBACEF,KAAA,CAAAF,SAAA;IAAAgB,QAAA,gBACElB,IAAA,CAACH,eAAe;MACdsB,GAAG,EAAEV,QAAS;MACdW,OAAO,EAAEV,WAAY;MACrBW,MAAM,EAAEV,UAAW;MACnBW,eAAe,EAAEV,UAAU,IAAI,CAACC,YAAa;MAC7CP,KAAK,EAAEU,aAAc;MACrBT,YAAY,EAAEA,CAACgB,MAAM,EAAEC,QAAQ,KAAK;QAClCP,gBAAgB,CAACO,QAAQ,CAAC;QAE1B,IAAIjB,YAAY,EAAE;UAChBA,YAAY,CAACiB,QAAQ,EAAED,MAAM,CAAC;QAChC;MACF,CAAE;MACFE,WAAW,EAAC,MAAM;MAClBC,QAAQ,EAAE,CAACX,QAAS;MAAA,GAChBP;IAAK,CACV,CAAC,EACDM,QAAQ,iBACPd,IAAA,CAACF,SAAS;MAAAoB,QAAA,eACRlB,IAAA,CAACJ,gBAAgB;QAAAsB,QAAA,EAAC;MAAC,CAAkB;IAAC,CAC7B,CACZ;EAAA,CACD,CAAC;AAEP,CAAC,EACD,CAACS,SAAS,EAAEC,SAAS,KAAK;EACxB,OAAOD,SAAS,CAACrB,KAAK,KAAKsB,SAAS,CAACtB,KAAK;AAC5C,CACF,CAAC","ignoreList":[]}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ import { InputIconContainer } from "../styles.js";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ export const InputIcon = props => {
6
+ return /*#__PURE__*/_jsx(InputIconContainer, {
7
+ ...props
8
+ });
9
+ };
10
+ //# sourceMappingURL=input-icon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["InputIconContainer","jsx","_jsx","InputIcon","props"],"sourceRoot":"../../../../../src","sources":["components/Input/components/input-icon.tsx"],"mappings":";;AAEA,SAASA,kBAAkB,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAE/C,OAAO,MAAMC,SAAS,GAAIC,KAAgB,IAAK;EAC7C,oBAAOF,IAAA,CAACF,kBAAkB;IAAA,GAAKI;EAAK,CAAG,CAAC;AAC1C,CAAC","ignoreList":[]}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ import { EyeIcon, EyeOffIcon } from 'lucide-react-native';
4
+ import { Pressable } from 'react-native';
5
+ import { useInputContext } from "../context.js";
6
+ import { InputIcon } from "./input-icon.js";
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ export const InputPasswordToggle = () => {
9
+ const {
10
+ toggleShowPassword,
11
+ showPassword
12
+ } = useInputContext();
13
+ return /*#__PURE__*/_jsx(InputIcon, {
14
+ children: /*#__PURE__*/_jsx(Pressable, {
15
+ hitSlop: {
16
+ bottom: 10,
17
+ left: 10,
18
+ right: 10,
19
+ top: 10
20
+ },
21
+ onPress: toggleShowPassword,
22
+ children: showPassword ? /*#__PURE__*/_jsx(EyeOffIcon, {
23
+ size: 20
24
+ }) : /*#__PURE__*/_jsx(EyeIcon, {
25
+ size: 20
26
+ })
27
+ })
28
+ });
29
+ };
30
+ //# sourceMappingURL=input-password-toggle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["EyeIcon","EyeOffIcon","Pressable","useInputContext","InputIcon","jsx","_jsx","InputPasswordToggle","toggleShowPassword","showPassword","children","hitSlop","bottom","left","right","top","onPress","size"],"sourceRoot":"../../../../../src","sources":["components/Input/components/input-password-toggle.tsx"],"mappings":";;AAAA,SAASA,OAAO,EAAEC,UAAU,QAAQ,qBAAqB;AACzD,SAASC,SAAS,QAAQ,cAAc;AAExC,SAASC,eAAe,QAAQ,eAAY;AAC5C,SAASC,SAAS,QAAQ,iBAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAEzC,OAAO,MAAMC,mBAAmB,GAAGA,CAAA,KAAM;EACvC,MAAM;IAAEC,kBAAkB;IAAEC;EAAa,CAAC,GAAGN,eAAe,CAAC,CAAC;EAC9D,oBACEG,IAAA,CAACF,SAAS;IAAAM,QAAA,eACRJ,IAAA,CAACJ,SAAS;MACRS,OAAO,EAAE;QAAEC,MAAM,EAAE,EAAE;QAAEC,IAAI,EAAE,EAAE;QAAEC,KAAK,EAAE,EAAE;QAAEC,GAAG,EAAE;MAAG,CAAE;MACtDC,OAAO,EAAER,kBAAmB;MAAAE,QAAA,EAE3BD,YAAY,gBAAGH,IAAA,CAACL,UAAU;QAACgB,IAAI,EAAE;MAAG,CAAE,CAAC,gBAAGX,IAAA,CAACN,OAAO;QAACiB,IAAI,EAAE;MAAG,CAAE;IAAC,CACvD;EAAC,CACH,CAAC;AAEhB,CAAC","ignoreList":[]}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ import { useRef, useState } from 'react';
4
+ import { InputContext } from "../context.js";
5
+ import { InputRootContainer } from "../styles.js";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ export const InputRoot = ({
8
+ children,
9
+ isPassword,
10
+ hasError = false,
11
+ disabled = false
12
+ }) => {
13
+ // biome-ignore lint/suspicious/noExplicitAny: For any reason, TextInput type does not has focus and blur methods
14
+ const inputRef = useRef(null);
15
+ const [isFocused, setIsFocused] = useState(false);
16
+ const [showPassword, setShowPassword] = useState(!isPassword);
17
+ const handleFocus = () => {
18
+ inputRef.current?.focus();
19
+ setIsFocused(true);
20
+ };
21
+ const handleBlur = () => {
22
+ inputRef.current?.blur();
23
+ setIsFocused(false);
24
+ };
25
+ const toggleShowPassword = () => {
26
+ setShowPassword(prev => !prev);
27
+ };
28
+ return /*#__PURE__*/_jsx(InputContext.Provider, {
29
+ value: {
30
+ inputRef,
31
+ handleFocus,
32
+ handleBlur,
33
+ isFocused,
34
+ isPassword: !!isPassword,
35
+ showPassword,
36
+ toggleShowPassword,
37
+ hasError,
38
+ disabled
39
+ },
40
+ children: /*#__PURE__*/_jsx(InputRootContainer, {
41
+ children: children
42
+ })
43
+ });
44
+ };
45
+ //# sourceMappingURL=input-root.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useRef","useState","InputContext","InputRootContainer","jsx","_jsx","InputRoot","children","isPassword","hasError","disabled","inputRef","isFocused","setIsFocused","showPassword","setShowPassword","handleFocus","current","focus","handleBlur","blur","toggleShowPassword","prev","Provider","value"],"sourceRoot":"../../../../../src","sources":["components/Input/components/input-root.tsx"],"mappings":";;AAAA,SAASA,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAExC,SAASC,YAAY,QAAQ,eAAY;AACzC,SAASC,kBAAkB,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAS/C,OAAO,MAAMC,SAAS,GAAGA,CAAC;EACxBC,QAAQ;EACRC,UAAU;EACVC,QAAQ,GAAG,KAAK;EAChBC,QAAQ,GAAG;AACG,CAAC,KAAK;EACpB;EACA,MAAMC,QAAQ,GAAGX,MAAM,CAAM,IAAI,CAAC;EAClC,MAAM,CAACY,SAAS,EAAEC,YAAY,CAAC,GAAGZ,QAAQ,CAAC,KAAK,CAAC;EACjD,MAAM,CAACa,YAAY,EAAEC,eAAe,CAAC,GAAGd,QAAQ,CAAC,CAACO,UAAU,CAAC;EAE7D,MAAMQ,WAAW,GAAGA,CAAA,KAAM;IACxBL,QAAQ,CAACM,OAAO,EAAEC,KAAK,CAAC,CAAC;IACzBL,YAAY,CAAC,IAAI,CAAC;EACpB,CAAC;EAED,MAAMM,UAAU,GAAGA,CAAA,KAAM;IACvBR,QAAQ,CAACM,OAAO,EAAEG,IAAI,CAAC,CAAC;IACxBP,YAAY,CAAC,KAAK,CAAC;EACrB,CAAC;EAED,MAAMQ,kBAAkB,GAAGA,CAAA,KAAM;IAC/BN,eAAe,CAAEO,IAAI,IAAK,CAACA,IAAI,CAAC;EAClC,CAAC;EAED,oBACEjB,IAAA,CAACH,YAAY,CAACqB,QAAQ;IACpBC,KAAK,EAAE;MACLb,QAAQ;MACRK,WAAW;MACXG,UAAU;MACVP,SAAS;MACTJ,UAAU,EAAE,CAAC,CAACA,UAAU;MACxBM,YAAY;MACZO,kBAAkB;MAClBZ,QAAQ;MACRC;IACF,CAAE;IAAAH,QAAA,eAEFF,IAAA,CAACF,kBAAkB;MAAAI,QAAA,EAAEA;IAAQ,CAAqB;EAAC,CAC9B,CAAC;AAE5B,CAAC","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ import { createContext, useContext } from 'react';
4
+ export const InputContext = /*#__PURE__*/createContext(null);
5
+ export const useInputContext = () => {
6
+ const context = useContext(InputContext);
7
+ if (!context) {
8
+ throw new Error('Input components must be used within an Input.Root');
9
+ }
10
+ return context;
11
+ };
12
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createContext","useContext","InputContext","useInputContext","context","Error"],"sourceRoot":"../../../../src","sources":["components/Input/context.tsx"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,UAAU,QAAQ,OAAO;AAejD,OAAO,MAAMC,YAAY,gBAAGF,aAAa,CAA0B,IAAI,CAAC;AAExE,OAAO,MAAMG,eAAe,GAAGA,CAAA,KAAM;EACnC,MAAMC,OAAO,GAAGH,UAAU,CAACC,YAAY,CAAC;EAExC,IAAI,CAACE,OAAO,EAAE;IACZ,MAAM,IAAIC,KAAK,CAAC,oDAAoD,CAAC;EACvE;EAEA,OAAOD,OAAO;AAChB,CAAC","ignoreList":[]}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ import { InputControl } from "./components/input-control.js";
4
+ import { InputError } from "./components/input-error.js";
5
+ import { InputField } from "./components/input-field.js";
6
+ import { InputIcon } from "./components/input-icon.js";
7
+ import { InputPasswordToggle } from "./components/input-password-toggle.js";
8
+ import { InputRoot } from "./components/input-root.js";
9
+ const Input = {
10
+ Root: InputRoot,
11
+ Field: InputField,
12
+ Error: InputError,
13
+ Control: InputControl,
14
+ Icon: InputIcon,
15
+ PasswordToggle: InputPasswordToggle
16
+ };
17
+ export { Input };
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["InputControl","InputError","InputField","InputIcon","InputPasswordToggle","InputRoot","Input","Root","Field","Error","Control","Icon","PasswordToggle"],"sourceRoot":"../../../../src","sources":["components/Input/index.tsx"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,+BAA4B;AACzD,SAASC,UAAU,QAAQ,6BAA0B;AACrD,SAASC,UAAU,QAAQ,6BAA0B;AACrD,SAASC,SAAS,QAAQ,4BAAyB;AACnD,SAASC,mBAAmB,QAAQ,uCAAoC;AACxE,SAASC,SAAS,QAAQ,4BAAyB;AAEnD,MAAMC,KAAK,GAAG;EACZC,IAAI,EAAEF,SAAS;EACfG,KAAK,EAAEN,UAAU;EACjBO,KAAK,EAAER,UAAU;EACjBS,OAAO,EAAEV,YAAY;EACrBW,IAAI,EAAER,SAAS;EACfS,cAAc,EAAER;AAClB,CAAC;AAED,SAASE,KAAK","ignoreList":[]}
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+
3
+ import styled from '@emotion/native';
4
+ import RNMaskInput from 'react-native-mask-input';
5
+ import { Text } from "../Text/index.js";
6
+ import { getInputBorderColor, getInputShadow } from "./utils.js";
7
+ export const InputRootContainer = styled.View({
8
+ width: '100%'
9
+ });
10
+ export const InputErrorText = styled(Text)({
11
+ color: '#d13033',
12
+ marginTop: 4
13
+ });
14
+ export const StyledMaskInput = styled(RNMaskInput)({
15
+ flex: 1
16
+ });
17
+ export const ErrorExclamation = styled(InputErrorText)({
18
+ fontWeight: 'bold',
19
+ fontSize: 16
20
+ });
21
+ export const InputControlContainer = styled.Pressable(({
22
+ isFocused,
23
+ hasError,
24
+ disabled
25
+ }) => ({
26
+ flexDirection: 'row',
27
+ alignItems: 'center',
28
+ gap: 8,
29
+ borderWidth: isFocused || hasError ? 1.5 : 1,
30
+ borderColor: getInputBorderColor(!!hasError, isFocused),
31
+ borderRadius: 4,
32
+ boxShadow: getInputShadow(!!hasError, isFocused),
33
+ paddingInline: 8,
34
+ paddingBlock: 4,
35
+ backgroundColor: disabled ? '#f2f2f2' : '#fff'
36
+ }));
37
+ export const InputIconContainer = styled.View({
38
+ marginInline: 4
39
+ });
40
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["styled","RNMaskInput","Text","getInputBorderColor","getInputShadow","InputRootContainer","View","width","InputErrorText","color","marginTop","StyledMaskInput","flex","ErrorExclamation","fontWeight","fontSize","InputControlContainer","Pressable","isFocused","hasError","disabled","flexDirection","alignItems","gap","borderWidth","borderColor","borderRadius","boxShadow","paddingInline","paddingBlock","backgroundColor","InputIconContainer","marginInline"],"sourceRoot":"../../../../src","sources":["components/Input/styles.ts"],"mappings":";;AAAA,OAAOA,MAAM,MAAM,iBAAiB;AACpC,OAAOC,WAAW,MAAM,yBAAyB;AAEjD,SAASC,IAAI,QAAQ,kBAAS;AAC9B,SAASC,mBAAmB,EAAEC,cAAc,QAAQ,YAAS;AAE7D,OAAO,MAAMC,kBAAkB,GAAGL,MAAM,CAACM,IAAI,CAAC;EAC5CC,KAAK,EAAE;AACT,CAAC,CAAC;AAEF,OAAO,MAAMC,cAAc,GAAGR,MAAM,CAACE,IAAI,CAAC,CAAC;EACzCO,KAAK,EAAE,SAAS;EAChBC,SAAS,EAAE;AACb,CAAC,CAAC;AAEF,OAAO,MAAMC,eAAe,GAAGX,MAAM,CAACC,WAAW,CAAC,CAAC;EACjDW,IAAI,EAAE;AACR,CAAC,CAAC;AAEF,OAAO,MAAMC,gBAAgB,GAAGb,MAAM,CAACQ,cAAc,CAAC,CAAC;EACrDM,UAAU,EAAE,MAAM;EAClBC,QAAQ,EAAE;AACZ,CAAC,CAAC;AAEF,OAAO,MAAMC,qBAAqB,GAAGhB,MAAM,CAACiB,SAAS,CAIlD,CAAC;EAAEC,SAAS;EAAEC,QAAQ;EAAEC;AAAS,CAAC,MAAM;EACzCC,aAAa,EAAE,KAAK;EACpBC,UAAU,EAAE,QAAQ;EACpBC,GAAG,EAAE,CAAC;EACNC,WAAW,EAAEN,SAAS,IAAIC,QAAQ,GAAG,GAAG,GAAG,CAAC;EAC5CM,WAAW,EAAEtB,mBAAmB,CAAC,CAAC,CAACgB,QAAQ,EAAED,SAAS,CAAC;EACvDQ,YAAY,EAAE,CAAC;EACfC,SAAS,EAAEvB,cAAc,CAAC,CAAC,CAACe,QAAQ,EAAED,SAAS,CAAC;EAChDU,aAAa,EAAE,CAAC;EAChBC,YAAY,EAAE,CAAC;EAEfC,eAAe,EAAEV,QAAQ,GAAG,SAAS,GAAG;AAC1C,CAAC,CAAC,CAAC;AAEH,OAAO,MAAMW,kBAAkB,GAAG/B,MAAM,CAACM,IAAI,CAAC;EAC5C0B,YAAY,EAAE;AAChB,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ export const getInputShadow = (hasError, isFocused) => {
4
+ if (!hasError && !isFocused) {
5
+ return '2px 2px 0 2px rgba(0, 0, 0, 0.06) inset';
6
+ }
7
+ if (hasError) {
8
+ return '0px 0px 3px 0px rgba(255,0,0,0.5)';
9
+ }
10
+ if (isFocused) {
11
+ return '0px 0px 3px 0px rgba(0,4,255,0.5)';
12
+ }
13
+ return 'none';
14
+ };
15
+ export const getInputBorderColor = (hasError, isFocused) => {
16
+ if (hasError) {
17
+ return '#dc4548';
18
+ }
19
+ if (isFocused) {
20
+ return 'rgb(0, 140, 255)';
21
+ }
22
+ return '#ccc';
23
+ };
24
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getInputShadow","hasError","isFocused","getInputBorderColor"],"sourceRoot":"../../../../src","sources":["components/Input/utils.ts"],"mappings":";;AAAA,OAAO,MAAMA,cAAc,GAAGA,CAACC,QAAiB,EAAEC,SAAkB,KAAK;EACvE,IAAI,CAACD,QAAQ,IAAI,CAACC,SAAS,EAAE;IAC3B,OAAO,yCAAyC;EAClD;EAEA,IAAID,QAAQ,EAAE;IACZ,OAAO,mCAAmC;EAC5C;EAEA,IAAIC,SAAS,EAAE;IACb,OAAO,mCAAmC;EAC5C;EAEA,OAAO,MAAM;AACf,CAAC;AAED,OAAO,MAAMC,mBAAmB,GAAGA,CAACF,QAAiB,EAAEC,SAAkB,KAAK;EAC5E,IAAID,QAAQ,EAAE;IACZ,OAAO,SAAS;EAClB;EAEA,IAAIC,SAAS,EAAE;IACb,OAAO,kBAAkB;EAC3B;EAEA,OAAO,MAAM;AACf,CAAC","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export { Margin } from "./styles.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Margin"],"sourceRoot":"../../../../src","sources":["components/Margin/index.tsx"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,aAAU","ignoreList":[]}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ import styled from '@emotion/native';
4
+ export const Margin = styled.View(({
5
+ insets
6
+ }) => ({
7
+ margin: insets.all,
8
+ marginBlock: insets.block,
9
+ marginInline: insets.inline,
10
+ marginBottom: insets.bottom,
11
+ marginLeft: insets.left,
12
+ marginRight: insets.right,
13
+ marginTop: insets.top
14
+ }));
15
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["styled","Margin","View","insets","margin","all","marginBlock","block","marginInline","inline","marginBottom","bottom","marginLeft","left","marginRight","right","marginTop","top"],"sourceRoot":"../../../../src","sources":["components/Margin/styles.ts"],"mappings":";;AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAcpC,OAAO,MAAMC,MAAM,GAAGD,MAAM,CAACE,IAAI,CAAc,CAAC;EAAEC;AAAO,CAAC,MAAM;EAC9DC,MAAM,EAAED,MAAM,CAACE,GAAG;EAClBC,WAAW,EAAEH,MAAM,CAACI,KAAK;EACzBC,YAAY,EAAEL,MAAM,CAACM,MAAM;EAC3BC,YAAY,EAAEP,MAAM,CAACQ,MAAM;EAC3BC,UAAU,EAAET,MAAM,CAACU,IAAI;EACvBC,WAAW,EAAEX,MAAM,CAACY,KAAK;EACzBC,SAAS,EAAEb,MAAM,CAACc;AACpB,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+
3
+ /** biome-ignore-all lint/suspicious/noExplicitAny: . */
4
+ /** biome-ignore-all lint/suspicious/noArrayIndexKey: . */
5
+ import { useEffect, useRef, useState } from 'react';
6
+ import { Flex } from "../Flex/index.js";
7
+ import { InputBox } from "./styles.js";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ export const OTPInput = ({
10
+ length = 6,
11
+ defaultValue = '',
12
+ onComplete,
13
+ hasError = false,
14
+ disabled = false,
15
+ autoFocus = false,
16
+ onlyNumbers = true,
17
+ containerProps,
18
+ ...props
19
+ }) => {
20
+ const [otp, setOtp] = useState(Array(length).fill('').map((_, i) => defaultValue[i] || ''));
21
+ const [focusedIndex, setFocusedIndex] = useState(autoFocus ? 0 : null);
22
+ const inputRefs = useRef([]);
23
+ const handleChangeText = (text, index) => {
24
+ if (disabled) return;
25
+ setOtp(prevOtp => {
26
+ const newOtp = [...prevOtp];
27
+ newOtp[index] = text;
28
+ const newOtpLength = newOtp.join('').length;
29
+ if (newOtpLength === length) {
30
+ onComplete(newOtp);
31
+ inputRefs.current[index]?.blur();
32
+ }
33
+ return newOtp;
34
+ });
35
+ if (index < length - 1 && text) {
36
+ inputRefs.current[index + 1]?.focus();
37
+ }
38
+ };
39
+ const handleKeyPress = (e, index) => {
40
+ if (e.nativeEvent.key === 'Backspace' && !otp[index] && index > 0) {
41
+ inputRefs.current[index - 1]?.focus();
42
+ }
43
+ };
44
+ const handleFocus = index => {
45
+ setFocusedIndex(index);
46
+ };
47
+ const handleBlur = () => {
48
+ setFocusedIndex(null);
49
+ };
50
+ useEffect(() => {
51
+ if (autoFocus && inputRefs.current[0]) {
52
+ inputRefs.current[0]?.focus();
53
+ }
54
+ }, [autoFocus]);
55
+ return /*#__PURE__*/_jsx(Flex, {
56
+ alignContent: "center",
57
+ gap: 8,
58
+ flexWrap: "wrap",
59
+ flexDirection: "row",
60
+ ...containerProps,
61
+ children: Array.from({
62
+ length
63
+ }).map((_, index) => /*#__PURE__*/_jsx(InputBox, {
64
+ ref: ref => {
65
+ inputRefs.current[index] = ref;
66
+ },
67
+ value: otp[index],
68
+ onChangeText: text => handleChangeText(text, index),
69
+ onKeyPress: e => handleKeyPress(e, index),
70
+ onFocus: () => handleFocus(index),
71
+ onBlur: handleBlur,
72
+ isFocused: focusedIndex === index,
73
+ hasError: hasError,
74
+ disabled: disabled,
75
+ hasValue: !!otp[index],
76
+ keyboardType: onlyNumbers ? 'number-pad' : 'default',
77
+ maxLength: 1,
78
+ selectTextOnFocus: true,
79
+ editable: !disabled,
80
+ cursorColor: "#000",
81
+ ...props
82
+ }, index))
83
+ });
84
+ };
85
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useEffect","useRef","useState","Flex","InputBox","jsx","_jsx","OTPInput","length","defaultValue","onComplete","hasError","disabled","autoFocus","onlyNumbers","containerProps","props","otp","setOtp","Array","fill","map","_","i","focusedIndex","setFocusedIndex","inputRefs","handleChangeText","text","index","prevOtp","newOtp","newOtpLength","join","current","blur","focus","handleKeyPress","e","nativeEvent","key","handleFocus","handleBlur","alignContent","gap","flexWrap","flexDirection","children","from","ref","value","onChangeText","onKeyPress","onFocus","onBlur","isFocused","hasValue","keyboardType","maxLength","selectTextOnFocus","editable","cursorColor"],"sourceRoot":"../../../../src","sources":["components/OTPInput/index.tsx"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ import styled from '@emotion/native';
4
+ import { getInputBorderColor, getInputShadow } from "./utils.js";
5
+ export const InputBox = styled.TextInput(({
6
+ isFocused,
7
+ hasError,
8
+ disabled,
9
+ hasValue
10
+ }) => ({
11
+ width: 48,
12
+ height: 56,
13
+ borderWidth: isFocused || hasError ? 1.5 : 1,
14
+ borderColor: getInputBorderColor(!!hasError, isFocused, hasValue),
15
+ borderRadius: 8,
16
+ textAlign: 'center',
17
+ fontSize: 24,
18
+ fontWeight: '600',
19
+ color: disabled ? '#888' : '#000',
20
+ backgroundColor: disabled ? '#f2f2f2' : '#fff',
21
+ boxShadow: getInputShadow(!!hasError, isFocused)
22
+ }));
23
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["styled","getInputBorderColor","getInputShadow","InputBox","TextInput","isFocused","hasError","disabled","hasValue","width","height","borderWidth","borderColor","borderRadius","textAlign","fontSize","fontWeight","color","backgroundColor","boxShadow"],"sourceRoot":"../../../../src","sources":["components/OTPInput/styles.ts"],"mappings":";;AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAEpC,SAASC,mBAAmB,EAAEC,cAAc,QAAQ,YAAS;AAE7D,OAAO,MAAMC,QAAQ,GAAGH,MAAM,CAACI,SAAS,CAKrC,CAAC;EAAEC,SAAS;EAAEC,QAAQ;EAAEC,QAAQ;EAAEC;AAAS,CAAC,MAAM;EACnDC,KAAK,EAAE,EAAE;EACTC,MAAM,EAAE,EAAE;EACVC,WAAW,EAAEN,SAAS,IAAIC,QAAQ,GAAG,GAAG,GAAG,CAAC;EAC5CM,WAAW,EAAEX,mBAAmB,CAAC,CAAC,CAACK,QAAQ,EAAED,SAAS,EAAEG,QAAQ,CAAC;EACjEK,YAAY,EAAE,CAAC;EACfC,SAAS,EAAE,QAAQ;EACnBC,QAAQ,EAAE,EAAE;EACZC,UAAU,EAAE,KAAK;EACjBC,KAAK,EAAEV,QAAQ,GAAG,MAAM,GAAG,MAAM;EACjCW,eAAe,EAAEX,QAAQ,GAAG,SAAS,GAAG,MAAM;EAE9CY,SAAS,EAAEjB,cAAc,CAAC,CAAC,CAACI,QAAQ,EAAED,SAAS;AACjD,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ export const getInputBorderColor = (hasError, isFocused, hasValue) => {
4
+ if (hasError) {
5
+ return '#d13033';
6
+ }
7
+ if (isFocused) {
8
+ return 'rgb(0, 140, 255)';
9
+ }
10
+ if (hasValue) {
11
+ return '#666';
12
+ }
13
+ return '#ccc';
14
+ };
15
+ export const getInputShadow = (hasError, isFocused) => {
16
+ if (hasError) {
17
+ return '0px 0px 3px 0px rgba(255,0,0,0.5)';
18
+ }
19
+ if (isFocused) {
20
+ return '0px 0px 3px 0px rgba(0,4,255,0.5)';
21
+ }
22
+ return 'none';
23
+ };
24
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["getInputBorderColor","hasError","isFocused","hasValue","getInputShadow"],"sourceRoot":"../../../../src","sources":["components/OTPInput/utils.ts"],"mappings":";;AAAA,OAAO,MAAMA,mBAAmB,GAAGA,CACjCC,QAAiB,EACjBC,SAAkB,EAClBC,QAAiB,KACd;EACH,IAAIF,QAAQ,EAAE;IACZ,OAAO,SAAS;EAClB;EAEA,IAAIC,SAAS,EAAE;IACb,OAAO,kBAAkB;EAC3B;EAEA,IAAIC,QAAQ,EAAE;IACZ,OAAO,MAAM;EACf;EAEA,OAAO,MAAM;AACf,CAAC;AAED,OAAO,MAAMC,cAAc,GAAGA,CAACH,QAAiB,EAAEC,SAAkB,KAAK;EACvE,IAAID,QAAQ,EAAE;IACZ,OAAO,mCAAmC;EAC5C;EAEA,IAAIC,SAAS,EAAE;IACb,OAAO,mCAAmC;EAC5C;EAEA,OAAO,MAAM;AACf,CAAC","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export { Padding } from "./styles.js";
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Padding"],"sourceRoot":"../../../../src","sources":["components/Padding/index.tsx"],"mappings":";;AAAA,SAASA,OAAO,QAAQ,aAAU","ignoreList":[]}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ import styled from '@emotion/native';
4
+ export const Padding = styled.View(({
5
+ insets
6
+ }) => ({
7
+ padding: insets.all,
8
+ paddingBlock: insets.block,
9
+ paddingInline: insets.inline,
10
+ paddingBottom: insets.bottom,
11
+ paddingLeft: insets.left,
12
+ paddingRight: insets.right,
13
+ paddingTop: insets.top
14
+ }));
15
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["styled","Padding","View","insets","padding","all","paddingBlock","block","paddingInline","inline","paddingBottom","bottom","paddingLeft","left","paddingRight","right","paddingTop","top"],"sourceRoot":"../../../../src","sources":["components/Padding/styles.ts"],"mappings":";;AAAA,OAAOA,MAAM,MAAM,iBAAiB;AAcpC,OAAO,MAAMC,OAAO,GAAGD,MAAM,CAACE,IAAI,CAAe,CAAC;EAAEC;AAAO,CAAC,MAAM;EAChEC,OAAO,EAAED,MAAM,CAACE,GAAG;EACnBC,YAAY,EAAEH,MAAM,CAACI,KAAK;EAC1BC,aAAa,EAAEL,MAAM,CAACM,MAAM;EAC5BC,aAAa,EAAEP,MAAM,CAACQ,MAAM;EAC5BC,WAAW,EAAET,MAAM,CAACU,IAAI;EACxBC,YAAY,EAAEX,MAAM,CAACY,KAAK;EAC1BC,UAAU,EAAEb,MAAM,CAACc;AACrB,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+
3
+ import { useContext } from 'react';
4
+ import { Text } from "../../Text/index.js";
5
+ import { RadioContext } from "../context.js";
6
+ import { RadioButton, RadioInner, RadioTouchable } from "../styles.js";
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ export const RadioItem = ({
9
+ value,
10
+ children,
11
+ ...props
12
+ }) => {
13
+ const context = useContext(RadioContext);
14
+ if (!context) {
15
+ throw new Error('Radio.Item must be used within Radio.Group');
16
+ }
17
+ const {
18
+ value: selectedValue,
19
+ onChange,
20
+ disabled,
21
+ hasError
22
+ } = context;
23
+ const isSelected = selectedValue === value;
24
+ const handlePress = () => {
25
+ if (!disabled) {
26
+ onChange(value);
27
+ }
28
+ };
29
+ return /*#__PURE__*/_jsxs(RadioTouchable, {
30
+ onPress: handlePress,
31
+ disabled: disabled,
32
+ activeOpacity: 0.8,
33
+ ...props,
34
+ children: [/*#__PURE__*/_jsx(RadioButton, {
35
+ isSelected: isSelected,
36
+ hasError: !!hasError,
37
+ disabled: !!disabled,
38
+ children: /*#__PURE__*/_jsx(RadioInner, {
39
+ isSelected: isSelected,
40
+ disabled: !!disabled
41
+ })
42
+ }), /*#__PURE__*/_jsx(Text, {
43
+ size: 14,
44
+ color: disabled ? '#888' : '#333',
45
+ style: {
46
+ userSelect: 'none'
47
+ },
48
+ children: children
49
+ })]
50
+ });
51
+ };
52
+ //# sourceMappingURL=radio-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useContext","Text","RadioContext","RadioButton","RadioInner","RadioTouchable","jsx","_jsx","jsxs","_jsxs","RadioItem","value","children","props","context","Error","selectedValue","onChange","disabled","hasError","isSelected","handlePress","onPress","activeOpacity","size","color","style","userSelect"],"sourceRoot":"../../../../../src","sources":["components/Radio/components/radio-item.tsx"],"mappings":";;AACA,SAASA,UAAU,QAAQ,OAAO;AAGlC,SAASC,IAAI,QAAQ,qBAAY;AACjC,SAASC,YAAY,QAAQ,eAAY;AACzC,SAASC,WAAW,EAAEC,UAAU,EAAEC,cAAc,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAOpE,OAAO,MAAMC,SAAS,GAAGA,CAAC;EAAEC,KAAK;EAAEC,QAAQ;EAAE,GAAGC;AAAsB,CAAC,KAAK;EAC1E,MAAMC,OAAO,GAAGd,UAAU,CAACE,YAAY,CAAC;EAExC,IAAI,CAACY,OAAO,EAAE;IACZ,MAAM,IAAIC,KAAK,CAAC,4CAA4C,CAAC;EAC/D;EAEA,MAAM;IAAEJ,KAAK,EAAEK,aAAa;IAAEC,QAAQ;IAAEC,QAAQ;IAAEC;EAAS,CAAC,GAAGL,OAAO;EACtE,MAAMM,UAAU,GAAGJ,aAAa,KAAKL,KAAK;EAE1C,MAAMU,WAAW,GAAGA,CAAA,KAAM;IACxB,IAAI,CAACH,QAAQ,EAAE;MACbD,QAAQ,CAACN,KAAK,CAAC;IACjB;EACF,CAAC;EAED,oBACEF,KAAA,CAACJ,cAAc;IACbiB,OAAO,EAAED,WAAY;IACrBH,QAAQ,EAAEA,QAAS;IACnBK,aAAa,EAAE,GAAI;IAAA,GACfV,KAAK;IAAAD,QAAA,gBAETL,IAAA,CAACJ,WAAW;MACViB,UAAU,EAAEA,UAAW;MACvBD,QAAQ,EAAE,CAAC,CAACA,QAAS;MACrBD,QAAQ,EAAE,CAAC,CAACA,QAAS;MAAAN,QAAA,eAErBL,IAAA,CAACH,UAAU;QAACgB,UAAU,EAAEA,UAAW;QAACF,QAAQ,EAAE,CAAC,CAACA;MAAS,CAAE;IAAC,CACjD,CAAC,eACdX,IAAA,CAACN,IAAI;MACHuB,IAAI,EAAE,EAAG;MACTC,KAAK,EAAEP,QAAQ,GAAG,MAAM,GAAG,MAAO;MAClCQ,KAAK,EAAE;QAAEC,UAAU,EAAE;MAAO,CAAE;MAAAf,QAAA,EAE7BA;IAAQ,CACL,CAAC;EAAA,CACO,CAAC;AAErB,CAAC","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ import { createContext } from 'react';
4
+ export const RadioContext = /*#__PURE__*/createContext(null);
5
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createContext","RadioContext"],"sourceRoot":"../../../../src","sources":["components/Radio/context.tsx"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,OAAO;AASrC,OAAO,MAAMC,YAAY,gBAAGD,aAAa,CAA0B,IAAI,CAAC","ignoreList":[]}
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ import { Flex } from "../Flex/index.js";
4
+ import { RadioItem } from "./components/radio-item.js";
5
+ import { RadioContext } from "./context.js";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ const RadioGroup = ({
8
+ value,
9
+ onValueChange,
10
+ disabled = false,
11
+ hasError = false,
12
+ children
13
+ }) => {
14
+ return /*#__PURE__*/_jsx(RadioContext.Provider, {
15
+ value: {
16
+ value,
17
+ onChange: onValueChange,
18
+ disabled,
19
+ hasError
20
+ },
21
+ children: /*#__PURE__*/_jsx(Flex, {
22
+ gap: 12,
23
+ children: children
24
+ })
25
+ });
26
+ };
27
+ export const Radio = Object.assign(RadioGroup, {
28
+ Item: RadioItem
29
+ });
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Flex","RadioItem","RadioContext","jsx","_jsx","RadioGroup","value","onValueChange","disabled","hasError","children","Provider","onChange","gap","Radio","Object","assign","Item"],"sourceRoot":"../../../../src","sources":["components/Radio/index.tsx"],"mappings":";;AAEA,SAASA,IAAI,QAAQ,kBAAS;AAC9B,SAASC,SAAS,QAAQ,4BAAyB;AACnD,SAASC,YAAY,QAAQ,cAAW;AAAC,SAAAC,GAAA,IAAAC,IAAA;AASzC,MAAMC,UAAU,GAAGA,CAAC;EAClBC,KAAK;EACLC,aAAa;EACbC,QAAQ,GAAG,KAAK;EAChBC,QAAQ,GAAG,KAAK;EAChBC;AACe,CAAC,KAAK;EACrB,oBACEN,IAAA,CAACF,YAAY,CAACS,QAAQ;IACpBL,KAAK,EAAE;MAAEA,KAAK;MAAEM,QAAQ,EAAEL,aAAa;MAAEC,QAAQ;MAAEC;IAAS,CAAE;IAAAC,QAAA,eAE9DN,IAAA,CAACJ,IAAI;MAACa,GAAG,EAAE,EAAG;MAAAH,QAAA,EAAEA;IAAQ,CAAO;EAAC,CACX,CAAC;AAE5B,CAAC;AAED,OAAO,MAAMI,KAAK,GAAGC,MAAM,CAACC,MAAM,CAACX,UAAU,EAAE;EAC7CY,IAAI,EAAEhB;AACR,CAAC,CAAC","ignoreList":[]}