@acvl/mobile-components 0.0.0-stage → 0.0.2

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 (322) hide show
  1. package/README.md +147 -2
  2. package/assets/fonts/Inter_400Regular.ttf +0 -0
  3. package/assets/fonts/Inter_500Medium.ttf +0 -0
  4. package/assets/fonts/Inter_600SemiBold.ttf +0 -0
  5. package/assets/fonts/Inter_700Bold.ttf +0 -0
  6. package/assets/fonts/Inter_800ExtraBold.ttf +0 -0
  7. package/assets/fonts/Inter_900Black.ttf +0 -0
  8. package/assets/fonts/OFL.txt +93 -0
  9. package/lib/module/camara/CampoDeFotos.js +124 -0
  10. package/lib/module/camara/CampoDeFotos.js.map +1 -0
  11. package/lib/module/camara/elegir.js +104 -0
  12. package/lib/module/camara/elegir.js.map +1 -0
  13. package/lib/module/camara/index.js +10 -0
  14. package/lib/module/camara/index.js.map +1 -0
  15. package/lib/module/camara/reducir.js +93 -0
  16. package/lib/module/camara/reducir.js.map +1 -0
  17. package/lib/module/componentes/AccionesDelEncabezado.js +212 -0
  18. package/lib/module/componentes/AccionesDelEncabezado.js.map +1 -0
  19. package/lib/module/componentes/BotonDeAvatar.js +55 -0
  20. package/lib/module/componentes/BotonDeAvatar.js.map +1 -0
  21. package/lib/module/componentes/BotonGrande.js +105 -0
  22. package/lib/module/componentes/BotonGrande.js.map +1 -0
  23. package/lib/module/componentes/CabeceraEmpujada.js +101 -0
  24. package/lib/module/componentes/CabeceraEmpujada.js.map +1 -0
  25. package/lib/module/componentes/Chip.js +77 -0
  26. package/lib/module/componentes/Chip.js.map +1 -0
  27. package/lib/module/componentes/ContenidoDePantalla.js +56 -0
  28. package/lib/module/componentes/ContenidoDePantalla.js.map +1 -0
  29. package/lib/module/componentes/EstadoVacio.js +65 -0
  30. package/lib/module/componentes/EstadoVacio.js.map +1 -0
  31. package/lib/module/componentes/Foto.js +106 -0
  32. package/lib/module/componentes/Foto.js.map +1 -0
  33. package/lib/module/componentes/IconoDeRenglon.js +44 -0
  34. package/lib/module/componentes/IconoDeRenglon.js.map +1 -0
  35. package/lib/module/componentes/Logo.js +44 -0
  36. package/lib/module/componentes/Logo.js.map +1 -0
  37. package/lib/module/componentes/Nota.js +51 -0
  38. package/lib/module/componentes/Nota.js.map +1 -0
  39. package/lib/module/componentes/OpcionesExcluyentes.js +69 -0
  40. package/lib/module/componentes/OpcionesExcluyentes.js.map +1 -0
  41. package/lib/module/componentes/PantallaDeError.js +84 -0
  42. package/lib/module/componentes/PantallaDeError.js.map +1 -0
  43. package/lib/module/componentes/Pestanas.js +87 -0
  44. package/lib/module/componentes/Pestanas.js.map +1 -0
  45. package/lib/module/componentes/Rotulo.js +28 -0
  46. package/lib/module/componentes/Rotulo.js.map +1 -0
  47. package/lib/module/componentes/RotuloDeSeccion.js +87 -0
  48. package/lib/module/componentes/RotuloDeSeccion.js.map +1 -0
  49. package/lib/module/componentes/Tarjeta.js +63 -0
  50. package/lib/module/componentes/Tarjeta.js.map +1 -0
  51. package/lib/module/componentes/TarjetaDeDatos.js +79 -0
  52. package/lib/module/componentes/TarjetaDeDatos.js.map +1 -0
  53. package/lib/module/componentes/TiraDeFotos.js +184 -0
  54. package/lib/module/componentes/TiraDeFotos.js.map +1 -0
  55. package/lib/module/componentes/VisorDeFoto.js +171 -0
  56. package/lib/module/componentes/VisorDeFoto.js.map +1 -0
  57. package/lib/module/componentes/logos/bola-blanca.png +0 -0
  58. package/lib/module/componentes/logos/bola.png +0 -0
  59. package/lib/module/componentes/logos/logo-blanco.png +0 -0
  60. package/lib/module/componentes/logos/logo.png +0 -0
  61. package/lib/module/dialogos/HostDeDialogos.js +170 -0
  62. package/lib/module/dialogos/HostDeDialogos.js.map +1 -0
  63. package/lib/module/dialogos/dialogos.js +112 -0
  64. package/lib/module/dialogos/dialogos.js.map +1 -0
  65. package/lib/module/formularios/CampoDeSeleccion.js +72 -0
  66. package/lib/module/formularios/CampoDeSeleccion.js.map +1 -0
  67. package/lib/module/formularios/SelectorDeOpcion.js +406 -0
  68. package/lib/module/formularios/SelectorDeOpcion.js.map +1 -0
  69. package/lib/module/formularios/TextoDeAccesoControlado.js +73 -0
  70. package/lib/module/formularios/TextoDeAccesoControlado.js.map +1 -0
  71. package/lib/module/formularios/campos.js +501 -0
  72. package/lib/module/formularios/campos.js.map +1 -0
  73. package/lib/module/formularios/controlados.js +199 -0
  74. package/lib/module/formularios/controlados.js.map +1 -0
  75. package/lib/module/formularios/errores.js +91 -0
  76. package/lib/module/formularios/errores.js.map +1 -0
  77. package/lib/module/formularios/guardado.js +78 -0
  78. package/lib/module/formularios/guardado.js.map +1 -0
  79. package/lib/module/formularios/useBusqueda.js +22 -0
  80. package/lib/module/formularios/useBusqueda.js.map +1 -0
  81. package/lib/module/fotos/elegir.js +105 -0
  82. package/lib/module/fotos/elegir.js.map +1 -0
  83. package/lib/module/fotos/index.js +9 -0
  84. package/lib/module/fotos/index.js.map +1 -0
  85. package/lib/module/hoja/HojaDeLista.js +211 -0
  86. package/lib/module/hoja/HojaDeLista.js.map +1 -0
  87. package/lib/module/hoja/HojaInferior.js +112 -0
  88. package/lib/module/hoja/HojaInferior.js.map +1 -0
  89. package/lib/module/hoja/index.js +8 -0
  90. package/lib/module/hoja/index.js.map +1 -0
  91. package/lib/module/hoja/useMasDeLaFicha.js +48 -0
  92. package/lib/module/hoja/useMasDeLaFicha.js.map +1 -0
  93. package/lib/module/index.js +67 -0
  94. package/lib/module/index.js.map +1 -0
  95. package/lib/module/listas/HojaDeFiltros.js +270 -0
  96. package/lib/module/listas/HojaDeFiltros.js.map +1 -0
  97. package/lib/module/listas/ListaPaginada.js +103 -0
  98. package/lib/module/listas/ListaPaginada.js.map +1 -0
  99. package/lib/module/listas/TarjetaDeslizable.js +118 -0
  100. package/lib/module/listas/TarjetaDeslizable.js.map +1 -0
  101. package/lib/module/listas/paginado.js +11 -0
  102. package/lib/module/listas/paginado.js.map +1 -0
  103. package/lib/module/listas/piezas.js +666 -0
  104. package/lib/module/listas/piezas.js.map +1 -0
  105. package/lib/module/navegacion/BarraDePestanas.js +162 -0
  106. package/lib/module/navegacion/BarraDePestanas.js.map +1 -0
  107. package/lib/module/navegacion/BotonDeBarra.js +58 -0
  108. package/lib/module/navegacion/BotonDeBarra.js.map +1 -0
  109. package/lib/module/navegacion/encabezado.js +103 -0
  110. package/lib/module/navegacion/encabezado.js.map +1 -0
  111. package/lib/module/pantallas/PantallaDeAcceso.js +195 -0
  112. package/lib/module/pantallas/PantallaDeAcceso.js.map +1 -0
  113. package/lib/module/pantallas/PantallaDeEdicion.js +121 -0
  114. package/lib/module/pantallas/PantallaDeEdicion.js.map +1 -0
  115. package/lib/module/pantallas/PantallaDeFicha.js +94 -0
  116. package/lib/module/pantallas/PantallaDeFicha.js.map +1 -0
  117. package/lib/module/pantallas/PantallaDeHistorial.js +328 -0
  118. package/lib/module/pantallas/PantallaDeHistorial.js.map +1 -0
  119. package/lib/module/pantallas/PantallaDePerfil.js +137 -0
  120. package/lib/module/pantallas/PantallaDePerfil.js.map +1 -0
  121. package/lib/module/tema/ProveedorDeTema.js +122 -0
  122. package/lib/module/tema/ProveedorDeTema.js.map +1 -0
  123. package/lib/module/tema/estilos.js +54 -0
  124. package/lib/module/tema/estilos.js.map +1 -0
  125. package/lib/module/tema/fuentes.js +28 -0
  126. package/lib/module/tema/fuentes.js.map +1 -0
  127. package/lib/module/tema/index.js +8 -0
  128. package/lib/module/tema/index.js.map +1 -0
  129. package/lib/module/tema/paleta.js +107 -0
  130. package/lib/module/tema/paleta.js.map +1 -0
  131. package/lib/module/tema/tipografia.js +32 -0
  132. package/lib/module/tema/tipografia.js.map +1 -0
  133. package/lib/module/texto.js +48 -0
  134. package/lib/module/texto.js.map +1 -0
  135. package/lib/typescript/src/camara/CampoDeFotos.d.ts +30 -0
  136. package/lib/typescript/src/camara/CampoDeFotos.d.ts.map +1 -0
  137. package/lib/typescript/src/camara/elegir.d.ts +47 -0
  138. package/lib/typescript/src/camara/elegir.d.ts.map +1 -0
  139. package/lib/typescript/src/camara/index.d.ts +4 -0
  140. package/lib/typescript/src/camara/index.d.ts.map +1 -0
  141. package/lib/typescript/src/camara/reducir.d.ts +32 -0
  142. package/lib/typescript/src/camara/reducir.d.ts.map +1 -0
  143. package/lib/typescript/src/componentes/AccionesDelEncabezado.d.ts +34 -0
  144. package/lib/typescript/src/componentes/AccionesDelEncabezado.d.ts.map +1 -0
  145. package/lib/typescript/src/componentes/BotonDeAvatar.d.ts +17 -0
  146. package/lib/typescript/src/componentes/BotonDeAvatar.d.ts.map +1 -0
  147. package/lib/typescript/src/componentes/BotonGrande.d.ts +26 -0
  148. package/lib/typescript/src/componentes/BotonGrande.d.ts.map +1 -0
  149. package/lib/typescript/src/componentes/CabeceraEmpujada.d.ts +18 -0
  150. package/lib/typescript/src/componentes/CabeceraEmpujada.d.ts.map +1 -0
  151. package/lib/typescript/src/componentes/Chip.d.ts +14 -0
  152. package/lib/typescript/src/componentes/Chip.d.ts.map +1 -0
  153. package/lib/typescript/src/componentes/ContenidoDePantalla.d.ts +17 -0
  154. package/lib/typescript/src/componentes/ContenidoDePantalla.d.ts.map +1 -0
  155. package/lib/typescript/src/componentes/EstadoVacio.d.ts +17 -0
  156. package/lib/typescript/src/componentes/EstadoVacio.d.ts.map +1 -0
  157. package/lib/typescript/src/componentes/Foto.d.ts +41 -0
  158. package/lib/typescript/src/componentes/Foto.d.ts.map +1 -0
  159. package/lib/typescript/src/componentes/IconoDeRenglon.d.ts +25 -0
  160. package/lib/typescript/src/componentes/IconoDeRenglon.d.ts.map +1 -0
  161. package/lib/typescript/src/componentes/Logo.d.ts +13 -0
  162. package/lib/typescript/src/componentes/Logo.d.ts.map +1 -0
  163. package/lib/typescript/src/componentes/Nota.d.ts +7 -0
  164. package/lib/typescript/src/componentes/Nota.d.ts.map +1 -0
  165. package/lib/typescript/src/componentes/OpcionesExcluyentes.d.ts +14 -0
  166. package/lib/typescript/src/componentes/OpcionesExcluyentes.d.ts.map +1 -0
  167. package/lib/typescript/src/componentes/PantallaDeError.d.ts +23 -0
  168. package/lib/typescript/src/componentes/PantallaDeError.d.ts.map +1 -0
  169. package/lib/typescript/src/componentes/Pestanas.d.ts +28 -0
  170. package/lib/typescript/src/componentes/Pestanas.d.ts.map +1 -0
  171. package/lib/typescript/src/componentes/Rotulo.d.ts +6 -0
  172. package/lib/typescript/src/componentes/Rotulo.d.ts.map +1 -0
  173. package/lib/typescript/src/componentes/RotuloDeSeccion.d.ts +20 -0
  174. package/lib/typescript/src/componentes/RotuloDeSeccion.d.ts.map +1 -0
  175. package/lib/typescript/src/componentes/Tarjeta.d.ts +25 -0
  176. package/lib/typescript/src/componentes/Tarjeta.d.ts.map +1 -0
  177. package/lib/typescript/src/componentes/TarjetaDeDatos.d.ts +13 -0
  178. package/lib/typescript/src/componentes/TarjetaDeDatos.d.ts.map +1 -0
  179. package/lib/typescript/src/componentes/TiraDeFotos.d.ts +36 -0
  180. package/lib/typescript/src/componentes/TiraDeFotos.d.ts.map +1 -0
  181. package/lib/typescript/src/componentes/VisorDeFoto.d.ts +23 -0
  182. package/lib/typescript/src/componentes/VisorDeFoto.d.ts.map +1 -0
  183. package/lib/typescript/src/dialogos/HostDeDialogos.d.ts +14 -0
  184. package/lib/typescript/src/dialogos/HostDeDialogos.d.ts.map +1 -0
  185. package/lib/typescript/src/dialogos/dialogos.d.ts +65 -0
  186. package/lib/typescript/src/dialogos/dialogos.d.ts.map +1 -0
  187. package/lib/typescript/src/formularios/CampoDeSeleccion.d.ts +24 -0
  188. package/lib/typescript/src/formularios/CampoDeSeleccion.d.ts.map +1 -0
  189. package/lib/typescript/src/formularios/SelectorDeOpcion.d.ts +59 -0
  190. package/lib/typescript/src/formularios/SelectorDeOpcion.d.ts.map +1 -0
  191. package/lib/typescript/src/formularios/TextoDeAccesoControlado.d.ts +18 -0
  192. package/lib/typescript/src/formularios/TextoDeAccesoControlado.d.ts.map +1 -0
  193. package/lib/typescript/src/formularios/campos.d.ts +113 -0
  194. package/lib/typescript/src/formularios/campos.d.ts.map +1 -0
  195. package/lib/typescript/src/formularios/controlados.d.ts +29 -0
  196. package/lib/typescript/src/formularios/controlados.d.ts.map +1 -0
  197. package/lib/typescript/src/formularios/errores.d.ts +36 -0
  198. package/lib/typescript/src/formularios/errores.d.ts.map +1 -0
  199. package/lib/typescript/src/formularios/guardado.d.ts +36 -0
  200. package/lib/typescript/src/formularios/guardado.d.ts.map +1 -0
  201. package/lib/typescript/src/formularios/useBusqueda.d.ts +7 -0
  202. package/lib/typescript/src/formularios/useBusqueda.d.ts.map +1 -0
  203. package/lib/typescript/src/fotos/elegir.d.ts +28 -0
  204. package/lib/typescript/src/fotos/elegir.d.ts.map +1 -0
  205. package/lib/typescript/src/fotos/index.d.ts +3 -0
  206. package/lib/typescript/src/fotos/index.d.ts.map +1 -0
  207. package/lib/typescript/src/hoja/HojaDeLista.d.ts +50 -0
  208. package/lib/typescript/src/hoja/HojaDeLista.d.ts.map +1 -0
  209. package/lib/typescript/src/hoja/HojaInferior.d.ts +21 -0
  210. package/lib/typescript/src/hoja/HojaInferior.d.ts.map +1 -0
  211. package/lib/typescript/src/hoja/index.d.ts +4 -0
  212. package/lib/typescript/src/hoja/index.d.ts.map +1 -0
  213. package/lib/typescript/src/hoja/useMasDeLaFicha.d.ts +27 -0
  214. package/lib/typescript/src/hoja/useMasDeLaFicha.d.ts.map +1 -0
  215. package/lib/typescript/src/index.d.ts +46 -0
  216. package/lib/typescript/src/index.d.ts.map +1 -0
  217. package/lib/typescript/src/listas/HojaDeFiltros.d.ts +76 -0
  218. package/lib/typescript/src/listas/HojaDeFiltros.d.ts.map +1 -0
  219. package/lib/typescript/src/listas/ListaPaginada.d.ts +39 -0
  220. package/lib/typescript/src/listas/ListaPaginada.d.ts.map +1 -0
  221. package/lib/typescript/src/listas/TarjetaDeslizable.d.ts +33 -0
  222. package/lib/typescript/src/listas/TarjetaDeslizable.d.ts.map +1 -0
  223. package/lib/typescript/src/listas/paginado.d.ts +16 -0
  224. package/lib/typescript/src/listas/paginado.d.ts.map +1 -0
  225. package/lib/typescript/src/listas/piezas.d.ts +157 -0
  226. package/lib/typescript/src/listas/piezas.d.ts.map +1 -0
  227. package/lib/typescript/src/navegacion/BarraDePestanas.d.ts +57 -0
  228. package/lib/typescript/src/navegacion/BarraDePestanas.d.ts.map +1 -0
  229. package/lib/typescript/src/navegacion/BotonDeBarra.d.ts +15 -0
  230. package/lib/typescript/src/navegacion/BotonDeBarra.d.ts.map +1 -0
  231. package/lib/typescript/src/navegacion/encabezado.d.ts +44 -0
  232. package/lib/typescript/src/navegacion/encabezado.d.ts.map +1 -0
  233. package/lib/typescript/src/pantallas/PantallaDeAcceso.d.ts +32 -0
  234. package/lib/typescript/src/pantallas/PantallaDeAcceso.d.ts.map +1 -0
  235. package/lib/typescript/src/pantallas/PantallaDeEdicion.d.ts +38 -0
  236. package/lib/typescript/src/pantallas/PantallaDeEdicion.d.ts.map +1 -0
  237. package/lib/typescript/src/pantallas/PantallaDeFicha.d.ts +35 -0
  238. package/lib/typescript/src/pantallas/PantallaDeFicha.d.ts.map +1 -0
  239. package/lib/typescript/src/pantallas/PantallaDeHistorial.d.ts +65 -0
  240. package/lib/typescript/src/pantallas/PantallaDeHistorial.d.ts.map +1 -0
  241. package/lib/typescript/src/pantallas/PantallaDePerfil.d.ts +19 -0
  242. package/lib/typescript/src/pantallas/PantallaDePerfil.d.ts.map +1 -0
  243. package/lib/typescript/src/tema/ProveedorDeTema.d.ts +32 -0
  244. package/lib/typescript/src/tema/ProveedorDeTema.d.ts.map +1 -0
  245. package/lib/typescript/src/tema/estilos.d.ts +31 -0
  246. package/lib/typescript/src/tema/estilos.d.ts.map +1 -0
  247. package/lib/typescript/src/tema/fuentes.d.ts +20 -0
  248. package/lib/typescript/src/tema/fuentes.d.ts.map +1 -0
  249. package/lib/typescript/src/tema/index.d.ts +6 -0
  250. package/lib/typescript/src/tema/index.d.ts.map +1 -0
  251. package/lib/typescript/src/tema/paleta.d.ts +86 -0
  252. package/lib/typescript/src/tema/paleta.d.ts.map +1 -0
  253. package/lib/typescript/src/tema/tipografia.d.ts +29 -0
  254. package/lib/typescript/src/tema/tipografia.d.ts.map +1 -0
  255. package/lib/typescript/src/texto.d.ts +16 -0
  256. package/lib/typescript/src/texto.d.ts.map +1 -0
  257. package/package.json +140 -5
  258. package/src/camara/CampoDeFotos.tsx +132 -0
  259. package/src/camara/elegir.ts +113 -0
  260. package/src/camara/index.ts +15 -0
  261. package/src/camara/reducir.ts +87 -0
  262. package/src/componentes/AccionesDelEncabezado.tsx +247 -0
  263. package/src/componentes/BotonDeAvatar.tsx +59 -0
  264. package/src/componentes/BotonGrande.tsx +100 -0
  265. package/src/componentes/CabeceraEmpujada.tsx +69 -0
  266. package/src/componentes/Chip.tsx +60 -0
  267. package/src/componentes/ContenidoDePantalla.tsx +53 -0
  268. package/src/componentes/EstadoVacio.tsx +45 -0
  269. package/src/componentes/Foto.tsx +92 -0
  270. package/src/componentes/IconoDeRenglon.tsx +42 -0
  271. package/src/componentes/Logo.tsx +34 -0
  272. package/src/componentes/Nota.tsx +37 -0
  273. package/src/componentes/OpcionesExcluyentes.tsx +62 -0
  274. package/src/componentes/PantallaDeError.tsx +76 -0
  275. package/src/componentes/Pestanas.tsx +86 -0
  276. package/src/componentes/Rotulo.tsx +21 -0
  277. package/src/componentes/RotuloDeSeccion.tsx +71 -0
  278. package/src/componentes/Tarjeta.tsx +58 -0
  279. package/src/componentes/TarjetaDeDatos.tsx +62 -0
  280. package/src/componentes/TiraDeFotos.tsx +189 -0
  281. package/src/componentes/VisorDeFoto.tsx +181 -0
  282. package/src/componentes/logos/bola-blanca.png +0 -0
  283. package/src/componentes/logos/bola.png +0 -0
  284. package/src/componentes/logos/logo-blanco.png +0 -0
  285. package/src/componentes/logos/logo.png +0 -0
  286. package/src/dialogos/HostDeDialogos.tsx +172 -0
  287. package/src/dialogos/dialogos.ts +148 -0
  288. package/src/formularios/CampoDeSeleccion.tsx +60 -0
  289. package/src/formularios/SelectorDeOpcion.tsx +407 -0
  290. package/src/formularios/TextoDeAccesoControlado.tsx +72 -0
  291. package/src/formularios/campos.tsx +497 -0
  292. package/src/formularios/controlados.tsx +200 -0
  293. package/src/formularios/errores.ts +105 -0
  294. package/src/formularios/guardado.ts +76 -0
  295. package/src/formularios/useBusqueda.ts +19 -0
  296. package/src/fotos/elegir.ts +116 -0
  297. package/src/fotos/index.ts +6 -0
  298. package/src/hoja/HojaDeLista.tsx +214 -0
  299. package/src/hoja/HojaInferior.tsx +103 -0
  300. package/src/hoja/index.ts +5 -0
  301. package/src/hoja/useMasDeLaFicha.tsx +63 -0
  302. package/src/index.ts +151 -0
  303. package/src/listas/HojaDeFiltros.tsx +286 -0
  304. package/src/listas/ListaPaginada.tsx +117 -0
  305. package/src/listas/TarjetaDeslizable.tsx +126 -0
  306. package/src/listas/paginado.ts +15 -0
  307. package/src/listas/piezas.tsx +670 -0
  308. package/src/navegacion/BarraDePestanas.tsx +198 -0
  309. package/src/navegacion/BotonDeBarra.tsx +61 -0
  310. package/src/navegacion/encabezado.tsx +88 -0
  311. package/src/pantallas/PantallaDeAcceso.tsx +184 -0
  312. package/src/pantallas/PantallaDeEdicion.tsx +116 -0
  313. package/src/pantallas/PantallaDeFicha.tsx +115 -0
  314. package/src/pantallas/PantallaDeHistorial.tsx +293 -0
  315. package/src/pantallas/PantallaDePerfil.tsx +126 -0
  316. package/src/tema/ProveedorDeTema.tsx +150 -0
  317. package/src/tema/estilos.ts +51 -0
  318. package/src/tema/fuentes.ts +20 -0
  319. package/src/tema/index.ts +10 -0
  320. package/src/tema/paleta.ts +147 -0
  321. package/src/tema/tipografia.ts +29 -0
  322. package/src/texto.tsx +44 -0
@@ -0,0 +1,63 @@
1
+ import HojaInferior from "./HojaInferior";
2
+ import MaterialCommunityIcons from "@expo/vector-icons/MaterialCommunityIcons";
3
+ import React from "react";
4
+ import { FilaConContador, SeccionDeFicha } from "../listas/piezas";
5
+
6
+ /** Una lista de «Más»: su renglón con contador y lo que abre en la hoja. */
7
+ export interface ListaDeLaFicha {
8
+ clave: string;
9
+ titulo: string;
10
+ icono: React.ComponentProps<typeof MaterialCommunityIcons>["name"];
11
+ /** `null` mientras se cuenta. */
12
+ cuantos: number | null;
13
+ /** Lo que acompaña al número: «2 vencidas», «1 pendiente». */
14
+ detalle?: string | null;
15
+ /** Lo que enseña la hoja; sólo se monta abierta. */
16
+ contenido: React.ReactNode;
17
+ }
18
+
19
+ /**
20
+ * «Más» de una ficha (un tracto, un cliente): lo que cuelga de ella, un renglón con cuántos hay
21
+ * que abre su hoja desde abajo (`HojaInferior`). Devuelve la sección (`seccion`, dentro del
22
+ * scroll) y la hoja (`hoja`, encima de la ficha, en `PantallaDeFicha.encima`).
23
+ *
24
+ * Quien llama pasa sólo las listas que se ven (cada una con su permiso); sin ninguna, la sección
25
+ * no se pinta.
26
+ */
27
+ export function useMasDeLaFicha(listas: ListaDeLaFicha[], subtitulo?: string) {
28
+ // Lo que enseña se queda al cerrarla, para que su título no se vacíe mientras baja.
29
+ const [clave, setClave] = React.useState<string | null>(null);
30
+ const [abierta, setAbierta] = React.useState(false);
31
+ const cerrar = React.useCallback(() => setAbierta(false), []);
32
+ const elegida = listas.find((l) => l.clave === clave);
33
+
34
+ const seccion = listas.length ? (
35
+ <SeccionDeFicha titulo="Más">
36
+ {listas.map((l) => (
37
+ <FilaConContador
38
+ key={l.clave}
39
+ icono={l.icono}
40
+ etiqueta={l.titulo}
41
+ cuantos={l.cuantos}
42
+ detalle={l.detalle}
43
+ onPress={() => {
44
+ setClave(l.clave);
45
+ setAbierta(true);
46
+ }}
47
+ />
48
+ ))}
49
+ </SeccionDeFicha>
50
+ ) : null;
51
+
52
+ const hoja = (
53
+ <HojaInferior
54
+ abierta={abierta && Boolean(elegida)}
55
+ onCerrar={cerrar}
56
+ titulo={elegida?.titulo ?? ""}
57
+ subtitulo={subtitulo}
58
+ >
59
+ {abierta ? elegida?.contenido : null}
60
+ </HojaInferior>
61
+ );
62
+ return { seccion, hoja };
63
+ }
package/src/index.ts ADDED
@@ -0,0 +1,151 @@
1
+ // ==============================|| TEMA ||============================== //
2
+
3
+ export * from "./tema";
4
+ export { Text, TextInput } from "./texto";
5
+
6
+ // ==============================|| COMPONENTES ||============================== //
7
+
8
+ export {
9
+ default as AccionesDelEncabezado,
10
+ type AccionDelEncabezado,
11
+ } from "./componentes/AccionesDelEncabezado";
12
+ export { default as BotonDeAvatar, inicialesDe } from "./componentes/BotonDeAvatar";
13
+ export { default as BotonGrande } from "./componentes/BotonGrande";
14
+ export { default as CabeceraEmpujada } from "./componentes/CabeceraEmpujada";
15
+ export { default as Chip, type TonoDeChip } from "./componentes/Chip";
16
+ export { default as ContenidoDePantalla } from "./componentes/ContenidoDePantalla";
17
+ export { default as EstadoVacio } from "./componentes/EstadoVacio";
18
+ export {
19
+ default as Foto,
20
+ ProveedorDeFotos,
21
+ type BajarFoto,
22
+ type FotoAVer,
23
+ } from "./componentes/Foto";
24
+ export { default as IconoDeRenglon } from "./componentes/IconoDeRenglon";
25
+ export { Logo, LogoCompleto } from "./componentes/Logo";
26
+ export { default as Nota } from "./componentes/Nota";
27
+ export { default as OpcionesExcluyentes } from "./componentes/OpcionesExcluyentes";
28
+ export {
29
+ default as PantallaDeError,
30
+ type PropsDePantallaDeError,
31
+ } from "./componentes/PantallaDeError";
32
+ export { default as Pestanas, type Pestana } from "./componentes/Pestanas";
33
+ export { default as Rotulo } from "./componentes/Rotulo";
34
+ export { default as RotuloDeSeccion } from "./componentes/RotuloDeSeccion";
35
+ export { default as Tarjeta } from "./componentes/Tarjeta";
36
+ export { default as TarjetaDeDatos } from "./componentes/TarjetaDeDatos";
37
+ export { default as TiraDeFotos, type FotoDeLaTira } from "./componentes/TiraDeFotos";
38
+ export { default as VisorDeFoto } from "./componentes/VisorDeFoto";
39
+
40
+ // ==============================|| DIÁLOGOS ||============================== //
41
+
42
+ export {
43
+ avisar,
44
+ confirmar,
45
+ mostrarDialogo,
46
+ type BotonDeDialogo,
47
+ type Dialogo,
48
+ type EstiloDeBoton,
49
+ } from "./dialogos/dialogos";
50
+ export { default as HostDeDialogos } from "./dialogos/HostDeDialogos";
51
+
52
+ // ==============================|| NAVEGACIÓN ||============================== //
53
+
54
+ export { default as BarraDePestanas, HUECO_DE_LA_BARRA } from "./navegacion/BarraDePestanas";
55
+ export type { IconoDePestana } from "./navegacion/BotonDeBarra";
56
+ export {
57
+ ALTO_DEL_ENCABEZADO,
58
+ TituloDelEncabezado,
59
+ useOpcionesDelEncabezado,
60
+ } from "./navegacion/encabezado";
61
+
62
+ // ==============================|| FORMULARIOS ||============================== //
63
+
64
+ export {
65
+ CampoDeFecha,
66
+ CampoDeFechaHora,
67
+ CampoDeOpciones,
68
+ CampoDeTelefono,
69
+ CampoDeTexto,
70
+ CampoInterruptor,
71
+ Campo,
72
+ ErrorDelCampo,
73
+ } from "./formularios/campos";
74
+ export { default as CampoDeSeleccion, CampoDeVarias } from "./formularios/CampoDeSeleccion";
75
+ export {
76
+ FechaControlada,
77
+ FechaHoraControlada,
78
+ InterruptorControlado,
79
+ OpcionesControladas,
80
+ SeleccionControlada,
81
+ TelefonoControlado,
82
+ TextoControlado,
83
+ VariasControladas,
84
+ type CampoAtado,
85
+ type SinValor,
86
+ } from "./formularios/controlados";
87
+ export { mensajeDeError, setErrors } from "./formularios/errores";
88
+ export {
89
+ fechaONula,
90
+ isoONulo,
91
+ mismoInstante,
92
+ soloLoQueCambio,
93
+ textoONulo,
94
+ useGuardado,
95
+ volcarErrores,
96
+ } from "./formularios/guardado";
97
+ export {
98
+ default as SelectorDeOpcion,
99
+ SelectorDeVarias,
100
+ type Opcion,
101
+ type PropsDeSelectorDeOpcion,
102
+ type PropsDeSelectorDeVarias,
103
+ } from "./formularios/SelectorDeOpcion";
104
+ export { default as TextoDeAccesoControlado } from "./formularios/TextoDeAccesoControlado";
105
+ export { useBusqueda } from "./formularios/useBusqueda";
106
+
107
+ // ==============================|| LISTAS Y FICHAS ||============================== //
108
+
109
+ export {
110
+ default as HojaDeFiltros,
111
+ InterruptorDeFiltro,
112
+ OpcionDeFiltro,
113
+ OpcionesMultiples,
114
+ OrdenDeLista,
115
+ type CampoDeOrden,
116
+ SeccionDeFiltros,
117
+ } from "./listas/HojaDeFiltros";
118
+ export { default as ListaPaginada, type ConsultaPaginada } from "./listas/ListaPaginada";
119
+ export { renglonesDe, type Pagina } from "./listas/paginado";
120
+ export {
121
+ AvisoDeRecortados,
122
+ Buscador,
123
+ CabeceraDeLista,
124
+ EstadoDeHoja,
125
+ FilaConContador,
126
+ RenglonDeContacto,
127
+ RenglonDeDireccion,
128
+ RenglonDeHoja,
129
+ RenglonDeLiga,
130
+ SeccionDeFicha,
131
+ TarjetaDeLista,
132
+ type FiltrosDeCabecera,
133
+ } from "./listas/piezas";
134
+ export { default as TarjetaDeslizable, type AccionDeslizable } from "./listas/TarjetaDeslizable";
135
+
136
+ // ==============================|| PANTALLAS ||============================== //
137
+
138
+ export {
139
+ default as PantallaDeAcceso,
140
+ type DatosDeAcceso,
141
+ type ResultadoDeAcceso,
142
+ } from "./pantallas/PantallaDeAcceso";
143
+ export { EsperaDeEdicion, FormularioDeEdicion } from "./pantallas/PantallaDeEdicion";
144
+ export { default as PantallaDeFicha } from "./pantallas/PantallaDeFicha";
145
+ export {
146
+ default as PantallaDeHistorial,
147
+ TarjetaDeEvento,
148
+ type EventoDeHistorial,
149
+ type Historial,
150
+ } from "./pantallas/PantallaDeHistorial";
151
+ export { default as PantallaDePerfil } from "./pantallas/PantallaDePerfil";
@@ -0,0 +1,286 @@
1
+ import BotonGrande from "../componentes/BotonGrande";
2
+ import IconoDeRenglon from "../componentes/IconoDeRenglon";
3
+ import { crearEstilos, renglon, tipografia, usePaleta } from "../tema";
4
+ import { Text } from "../texto";
5
+ import MaterialIcons from "@expo/vector-icons/MaterialIcons";
6
+ import React from "react";
7
+ import { Modal, Pressable, ScrollView, Switch, TouchableOpacity, View } from "react-native";
8
+ import { useSafeAreaInsets } from "react-native-safe-area-context";
9
+
10
+ /**
11
+ * La hoja de filtros y orden de una lista (viajes, recursos), a pantalla completa
12
+ * como la del mapa: con la letra al 180% un menú deja ver dos opciones. Se aplica al tocar, sin
13
+ * «Aplicar»; el botón de abajo dice cuántos renglones quedan. Cada lista pone sus secciones.
14
+ */
15
+ export default function HojaDeFiltros({
16
+ abierta,
17
+ onCerrar,
18
+ hayAlgo,
19
+ onQuitar,
20
+ visibles,
21
+ nombres,
22
+ children,
23
+ }: {
24
+ abierta: boolean;
25
+ onCerrar: () => void;
26
+ /** Si hay algo puesto (un filtro o un orden distinto): ofrece «Quitar». */
27
+ hayAlgo: boolean;
28
+ onQuitar: () => void;
29
+ /** Cuántos quedan con todo lo puesto; `null` mientras se cuentan. */
30
+ visibles: number | null;
31
+ /** Cómo se dice uno y varios: `["viaje", "viajes"]`. */
32
+ nombres: readonly [string, string];
33
+ children: React.ReactNode;
34
+ }) {
35
+ const c = usePaleta();
36
+ const styles = useStyles();
37
+ const insets = useSafeAreaInsets();
38
+ return (
39
+ <Modal visible={abierta} animationType="slide" onRequestClose={onCerrar}>
40
+ <View style={[styles.hoja, { paddingTop: insets.top + 10 }]}>
41
+ <View style={styles.cabecera}>
42
+ <TouchableOpacity onPress={onCerrar} accessibilityLabel="Cerrar">
43
+ <MaterialIcons name="arrow-back" size={45} color={c.primary} />
44
+ </TouchableOpacity>
45
+ <Text style={styles.titulo}>Filtros</Text>
46
+ {hayAlgo ? (
47
+ <TouchableOpacity onPress={onQuitar}>
48
+ <Text style={styles.limpiar}>Quitar</Text>
49
+ </TouchableOpacity>
50
+ ) : null}
51
+ </View>
52
+
53
+ <ScrollView contentContainerStyle={styles.contenido}>{children}</ScrollView>
54
+
55
+ <View style={{ paddingBottom: insets.bottom + 16 }}>
56
+ <BotonGrande onPress={onCerrar}>
57
+ {visibles === null
58
+ ? "Listo"
59
+ : `Ver ${visibles} ${visibles === 1 ? nombres[0] : nombres[1]}`}
60
+ </BotonGrande>
61
+ </View>
62
+ </View>
63
+ </Modal>
64
+ );
65
+ }
66
+
67
+ /** El rótulo de una sección de la hoja. */
68
+ export function SeccionDeFiltros({ children }: { children: string }) {
69
+ const styles = useStyles();
70
+ return <Text style={styles.seccion}>{children}</Text>;
71
+ }
72
+
73
+ /** Una opción como renglón: casilla (de varias) o círculo (de una), como la hoja del mapa. */
74
+ export function OpcionDeFiltro({
75
+ texto,
76
+ elegida,
77
+ unica = false,
78
+ onPress,
79
+ }: {
80
+ texto: string;
81
+ elegida: boolean;
82
+ unica?: boolean;
83
+ onPress: () => void;
84
+ }) {
85
+ const c = usePaleta();
86
+ const styles = useStyles();
87
+ return (
88
+ <Pressable
89
+ onPress={onPress}
90
+ accessibilityRole={unica ? "radio" : "checkbox"}
91
+ accessibilityState={{ checked: elegida }}
92
+ style={[styles.opcion, elegida && styles.opcionElegida]}
93
+ >
94
+ <IconoDeRenglon
95
+ name={
96
+ unica
97
+ ? elegida
98
+ ? "radiobox-marked"
99
+ : "radiobox-blank"
100
+ : elegida
101
+ ? "checkbox-marked"
102
+ : "checkbox-blank-outline"
103
+ }
104
+ fontSize={tipografia.subtitulo}
105
+ color={elegida ? c.primary : c.secondary}
106
+ />
107
+ <Text style={styles.opcionTexto}>{texto}</Text>
108
+ </Pressable>
109
+ );
110
+ }
111
+
112
+ /** Varias opciones de un mismo filtro, cada una se prende y se apaga sola. */
113
+ export function OpcionesMultiples<V extends string | number>({
114
+ titulo,
115
+ opciones,
116
+ elegidas,
117
+ onCambiar,
118
+ }: {
119
+ titulo: string;
120
+ opciones: readonly { value: V; label: string }[];
121
+ elegidas: V[];
122
+ onCambiar: (elegidas: V[]) => void;
123
+ }) {
124
+ return (
125
+ <>
126
+ <SeccionDeFiltros>{titulo}</SeccionDeFiltros>
127
+ {opciones.map((o) => (
128
+ <OpcionDeFiltro
129
+ key={String(o.value)}
130
+ texto={o.label}
131
+ elegida={elegidas.includes(o.value)}
132
+ onPress={() =>
133
+ onCambiar(
134
+ elegidas.includes(o.value)
135
+ ? elegidas.filter((v) => v !== o.value)
136
+ : [...elegidas, o.value],
137
+ )
138
+ }
139
+ />
140
+ ))}
141
+ </>
142
+ );
143
+ }
144
+
145
+ /** Un filtro de sí o no: el renglón entero lo alterna, no sólo el interruptor. */
146
+ export function InterruptorDeFiltro({
147
+ texto,
148
+ prendido,
149
+ onCambiar,
150
+ }: {
151
+ texto: string;
152
+ prendido: boolean;
153
+ onCambiar: (prendido: boolean) => void;
154
+ }) {
155
+ const c = usePaleta();
156
+ const styles = useStyles();
157
+ return (
158
+ <Pressable
159
+ onPress={() => onCambiar(!prendido)}
160
+ accessibilityRole="switch"
161
+ accessibilityState={{ checked: prendido }}
162
+ style={[styles.opcion, styles.interruptor, prendido && styles.opcionElegida]}
163
+ >
164
+ <Text style={styles.opcionTexto}>{texto}</Text>
165
+ <Switch
166
+ value={prendido}
167
+ onValueChange={onCambiar}
168
+ trackColor={{ true: c.primaryLight }}
169
+ thumbColor={prendido ? c.primary : undefined}
170
+ />
171
+ </Pressable>
172
+ );
173
+ }
174
+
175
+ /** Un campo por el que se ordena una lista. */
176
+ export interface CampoDeOrden {
177
+ /** El `ordering` sin signo: `codigo`. */
178
+ value: string;
179
+ label: string;
180
+ /**
181
+ * Cómo se dicen sus dos sentidos. «Ascendente» no dice nada de una fecha ni de un importe:
182
+ * ahí van «Antiguos primero» / «Recientes primero», «Menor primero» / «Mayor primero».
183
+ */
184
+ sentidos?: { asc: string; desc: string };
185
+ /**
186
+ * El sentido con el que arranca al elegirlo: lo más nuevo y lo más grande arriba, el texto
187
+ * alfabético. Sin esto conserva el del campo de antes.
188
+ */
189
+ primero?: "asc" | "desc";
190
+ }
191
+
192
+ /**
193
+ * «Ordenar por» y su sentido. `orden` es el `ordering` que se manda (`-codigo`), o `undefined` si
194
+ * se deja el del servidor; con `porOmision`, ese «sin orden» se ofrece como opción.
195
+ */
196
+ export function OrdenDeLista({
197
+ campos,
198
+ orden,
199
+ onOrdenar,
200
+ porOmision,
201
+ }: {
202
+ campos: readonly CampoDeOrden[];
203
+ orden: string | undefined;
204
+ /** El nuevo `ordering`, o `null` para el del servidor. */
205
+ onOrdenar: (orden: string | null) => void;
206
+ porOmision?: string;
207
+ }) {
208
+ const descendente = orden?.startsWith("-") ?? false;
209
+ const campo = orden?.replace(/^-/, "");
210
+ const elegido = campos.find((c) => c.value === campo);
211
+ const sentidos = elegido?.sentidos ?? { asc: "Ascendente", desc: "Descendente" };
212
+ // El sentido con el que arranca va primero: en una fecha se lee «Recientes primero» antes
213
+ // que «Antiguos primero».
214
+ const ordenDeSentidos: ("asc" | "desc")[] =
215
+ elegido?.primero === "desc" ? ["desc", "asc"] : ["asc", "desc"];
216
+ return (
217
+ <>
218
+ <SeccionDeFiltros>Ordenar por</SeccionDeFiltros>
219
+ {porOmision ? (
220
+ <OpcionDeFiltro
221
+ texto={porOmision}
222
+ unica
223
+ elegida={orden === undefined}
224
+ onPress={() => onOrdenar(null)}
225
+ />
226
+ ) : null}
227
+ {campos.map((c) => (
228
+ <OpcionDeFiltro
229
+ key={c.value}
230
+ texto={c.label}
231
+ unica
232
+ elegida={campo === c.value}
233
+ onPress={() => {
234
+ // Volver a tocar el elegido no le cambia el sentido.
235
+ if (campo === c.value) return;
236
+ const desc = c.primero ? c.primero === "desc" : descendente;
237
+ onOrdenar(`${desc ? "-" : ""}${c.value}`);
238
+ }}
239
+ />
240
+ ))}
241
+ {campo !== undefined ? (
242
+ <>
243
+ <SeccionDeFiltros>Sentido</SeccionDeFiltros>
244
+ {ordenDeSentidos.map((sentido) => (
245
+ <OpcionDeFiltro
246
+ key={sentido}
247
+ texto={sentidos[sentido]}
248
+ unica
249
+ elegida={descendente === (sentido === "desc")}
250
+ onPress={() => onOrdenar(sentido === "desc" ? `-${campo}` : campo)}
251
+ />
252
+ ))}
253
+ </>
254
+ ) : null}
255
+ </>
256
+ );
257
+ }
258
+
259
+ const useStyles = crearEstilos((c) => ({
260
+ hoja: { flex: 1, backgroundColor: c.fondo, paddingHorizontal: 18, gap: 12 },
261
+ cabecera: { flexDirection: "row", alignItems: "center", gap: 8 },
262
+ titulo: { flex: 1, fontSize: tipografia.titulo, fontWeight: "900", color: c.primary },
263
+ limpiar: { ...renglon(tipografia.cuerpo), fontWeight: "700", color: c.primary },
264
+ contenido: { gap: 8, paddingBottom: 16 },
265
+ seccion: {
266
+ ...renglon(tipografia.etiqueta),
267
+ fontWeight: "800",
268
+ color: c.secondary,
269
+ textTransform: "uppercase",
270
+ letterSpacing: 0.8,
271
+ marginTop: 10,
272
+ },
273
+ opcion: {
274
+ flexDirection: "row",
275
+ alignItems: "flex-start",
276
+ gap: 10,
277
+ backgroundColor: c.superficie,
278
+ borderRadius: 14,
279
+ borderWidth: 2,
280
+ borderColor: c.secondaryLighter,
281
+ padding: 12,
282
+ },
283
+ opcionElegida: { borderColor: c.primary, backgroundColor: c.primaryWash },
284
+ interruptor: { alignItems: "center" },
285
+ opcionTexto: { flex: 1, ...renglon(tipografia.subtitulo), fontWeight: "700", color: c.texto },
286
+ }));
@@ -0,0 +1,117 @@
1
+ import BotonGrande from "../componentes/BotonGrande";
2
+ import EstadoVacio from "../componentes/EstadoVacio";
3
+ import { crearEstilos, renglon, tipografia, usePaleta } from "../tema";
4
+ import { HUECO_DE_LA_BARRA } from "../navegacion/BarraDePestanas";
5
+ import { Text } from "../texto";
6
+ import type MaterialCommunityIcons from "@expo/vector-icons/MaterialCommunityIcons";
7
+ import React from "react";
8
+ import { ActivityIndicator, FlatList, RefreshControl } from "react-native";
9
+ import { renglonesDe, type Pagina } from "./paginado";
10
+
11
+ /** Lo que la lista lee de un `use…InfiniteQuery` de RTK Query. */
12
+ export interface ConsultaPaginada<T> {
13
+ data?: { pages: Pagina<T>[] };
14
+ isLoading: boolean;
15
+ isError: boolean;
16
+ isFetching: boolean;
17
+ isFetchingNextPage: boolean;
18
+ hasNextPage: boolean;
19
+ fetchNextPage: () => unknown;
20
+ refetch: () => unknown;
21
+ }
22
+
23
+ interface Props<T> {
24
+ consulta: ConsultaPaginada<T>;
25
+ renderItem: (item: T) => React.ReactElement;
26
+ llave: (item: T) => string | number;
27
+ /** Lo que se dice sin renglones: «Ningún viaje en curso». */
28
+ vacio: {
29
+ icono: React.ComponentProps<typeof MaterialCommunityIcons>["name"];
30
+ titulo: string;
31
+ texto?: string;
32
+ };
33
+ /** Cómo se cuentan: `["viaje", "viajes"]` → «128 viajes». */
34
+ nombres: [string, string];
35
+ }
36
+
37
+ /**
38
+ * Una lista **paginada con scroll infinito**: pide la página siguiente al acercarse
39
+ * al final, se refresca jalando hacia abajo y dice cuántos hay en total. Lo que la llena es de
40
+ * quien la usa (`renderItem`); el buscador y las pestañas van arriba, fuera de ella.
41
+ *
42
+ * Deja libre lo que tapa la barra de pestañas, que flota sobre la pantalla.
43
+ */
44
+ export default function ListaPaginada<T>({
45
+ consulta,
46
+ renderItem,
47
+ llave,
48
+ vacio,
49
+ nombres,
50
+ }: Props<T>) {
51
+ const c = usePaleta();
52
+ const styles = useStyles();
53
+ const renglones = renglonesDe(consulta.data);
54
+ const total = consulta.data?.pages[0]?.count;
55
+
56
+ if (consulta.isLoading) {
57
+ return <ActivityIndicator color={c.primary} size="large" style={styles.cargando} />;
58
+ }
59
+ if (consulta.isError && !consulta.data) {
60
+ return (
61
+ <EstadoVacio
62
+ icono="cloud-off-outline"
63
+ titulo="No se pudo cargar"
64
+ texto="Revisa tu señal e intenta de nuevo."
65
+ >
66
+ <BotonGrande icono="refresh" onPress={() => consulta.refetch()}>
67
+ Reintentar
68
+ </BotonGrande>
69
+ </EstadoVacio>
70
+ );
71
+ }
72
+
73
+ return (
74
+ <FlatList
75
+ data={renglones}
76
+ keyExtractor={(item) => String(llave(item))}
77
+ renderItem={({ item }) => renderItem(item)}
78
+ contentContainerStyle={[styles.contenido, !renglones.length && styles.vacia]}
79
+ ListHeaderComponent={
80
+ total !== undefined && renglones.length ? (
81
+ <Text style={styles.total}>
82
+ {total === 1 ? `1 ${nombres[0]}` : `${total} ${nombres[1]}`}
83
+ </Text>
84
+ ) : null
85
+ }
86
+ ListEmptyComponent={
87
+ <EstadoVacio icono={vacio.icono} titulo={vacio.titulo} texto={vacio.texto} />
88
+ }
89
+ ListFooterComponent={
90
+ consulta.isFetchingNextPage ? (
91
+ <ActivityIndicator color={c.primary} style={styles.mas} />
92
+ ) : null
93
+ }
94
+ onEndReachedThreshold={0.5}
95
+ onEndReached={() => {
96
+ if (consulta.hasNextPage && !consulta.isFetching) consulta.fetchNextPage();
97
+ }}
98
+ refreshControl={
99
+ <RefreshControl
100
+ refreshing={consulta.isFetching && !consulta.isFetchingNextPage}
101
+ onRefresh={() => consulta.refetch()}
102
+ colors={[c.primary]}
103
+ progressBackgroundColor={c.superficie}
104
+ />
105
+ }
106
+ keyboardShouldPersistTaps="handled"
107
+ />
108
+ );
109
+ }
110
+
111
+ const useStyles = crearEstilos((c) => ({
112
+ cargando: { marginTop: 40 },
113
+ contenido: { gap: 10, paddingBottom: HUECO_DE_LA_BARRA },
114
+ vacia: { flexGrow: 1 },
115
+ total: { ...renglon(tipografia.secundario), color: c.secondary },
116
+ mas: { marginVertical: 16 },
117
+ }));