ferns-ui 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 (521) hide show
  1. package/LICENSE +203 -0
  2. package/README.md +22 -0
  3. package/dist/ActionSheet.d.ts +490 -0
  4. package/dist/ActionSheet.js +647 -0
  5. package/dist/ActionSheet.js.map +1 -0
  6. package/dist/Banner.d.ts +27 -0
  7. package/dist/Banner.js +56 -0
  8. package/dist/Banner.js.map +1 -0
  9. package/dist/Banner.stories.d.ts +1 -0
  10. package/dist/Banner.stories.js +13 -0
  11. package/dist/Banner.stories.js.map +1 -0
  12. package/dist/BlurBox.d.ts +5 -0
  13. package/dist/BlurBox.js +28 -0
  14. package/dist/BlurBox.js.map +1 -0
  15. package/dist/BlurBox.native.d.ts +6 -0
  16. package/dist/BlurBox.native.js +30 -0
  17. package/dist/BlurBox.native.js.map +1 -0
  18. package/dist/Body.d.ts +6 -0
  19. package/dist/Body.js +21 -0
  20. package/dist/Body.js.map +1 -0
  21. package/dist/Box.d.ts +18 -0
  22. package/dist/Box.js +228 -0
  23. package/dist/Box.js.map +1 -0
  24. package/dist/Box.stories.d.ts +1 -0
  25. package/dist/Box.stories.js +45 -0
  26. package/dist/Box.stories.js.map +1 -0
  27. package/dist/Button.d.ts +20 -0
  28. package/dist/Button.js +103 -0
  29. package/dist/Button.js.map +1 -0
  30. package/dist/Button.stories.d.ts +1 -0
  31. package/dist/Button.stories.js +41 -0
  32. package/dist/Button.stories.js.map +1 -0
  33. package/dist/Card.d.ts +5 -0
  34. package/dist/Card.js +8 -0
  35. package/dist/Card.js.map +1 -0
  36. package/dist/Card.stories.d.ts +6 -0
  37. package/dist/Card.stories.js +18 -0
  38. package/dist/Card.stories.js.map +1 -0
  39. package/dist/CheckBox.d.ts +6 -0
  40. package/dist/CheckBox.js +27 -0
  41. package/dist/CheckBox.js.map +1 -0
  42. package/dist/CheckBox.stories.d.ts +1 -0
  43. package/dist/CheckBox.stories.js +28 -0
  44. package/dist/CheckBox.stories.js.map +1 -0
  45. package/dist/Common.d.ts +868 -0
  46. package/dist/Common.js +46 -0
  47. package/dist/Common.js.map +1 -0
  48. package/dist/DateTimeActionSheet.d.ts +15 -0
  49. package/dist/DateTimeActionSheet.js +28 -0
  50. package/dist/DateTimeActionSheet.js.map +1 -0
  51. package/dist/DecimalRangeActionSheet.d.ts +18 -0
  52. package/dist/DecimalRangeActionSheet.js +65 -0
  53. package/dist/DecimalRangeActionSheet.js.map +1 -0
  54. package/dist/ErrorBoundary.d.ts +19 -0
  55. package/dist/ErrorBoundary.js +31 -0
  56. package/dist/ErrorBoundary.js.map +1 -0
  57. package/dist/ErrorPage.d.ts +10 -0
  58. package/dist/ErrorPage.js +20 -0
  59. package/dist/ErrorPage.js.map +1 -0
  60. package/dist/Field.d.ts +15 -0
  61. package/dist/Field.js +136 -0
  62. package/dist/Field.js.map +1 -0
  63. package/dist/Field.stories.d.ts +6 -0
  64. package/dist/Field.stories.js +38 -0
  65. package/dist/Field.stories.js.map +1 -0
  66. package/dist/FieldWithLabels.d.ts +3 -0
  67. package/dist/FieldWithLabels.js +8 -0
  68. package/dist/FieldWithLabels.js.map +1 -0
  69. package/dist/FlatList.d.ts +2 -0
  70. package/dist/FlatList.js +3 -0
  71. package/dist/FlatList.js.map +1 -0
  72. package/dist/Form.d.ts +22 -0
  73. package/dist/Form.js +89 -0
  74. package/dist/Form.js.map +1 -0
  75. package/dist/Form.stories.d.ts +6 -0
  76. package/dist/Form.stories.js +36 -0
  77. package/dist/Form.stories.js.map +1 -0
  78. package/dist/HeaderButtons.d.ts +31 -0
  79. package/dist/HeaderButtons.js +53 -0
  80. package/dist/HeaderButtons.js.map +1 -0
  81. package/dist/HeaderButtons.stories.d.ts +6 -0
  82. package/dist/HeaderButtons.stories.js +6 -0
  83. package/dist/HeaderButtons.stories.js.map +1 -0
  84. package/dist/Heading.d.ts +11 -0
  85. package/dist/Heading.js +46 -0
  86. package/dist/Heading.js.map +1 -0
  87. package/dist/Heading.stories.d.ts +1 -0
  88. package/dist/Heading.stories.js +22 -0
  89. package/dist/Heading.stories.js.map +1 -0
  90. package/dist/HeightActionSheet.d.ts +16 -0
  91. package/dist/HeightActionSheet.js +58 -0
  92. package/dist/HeightActionSheet.js.map +1 -0
  93. package/dist/Icon.d.ts +9 -0
  94. package/dist/Icon.js +125 -0
  95. package/dist/Icon.js.map +1 -0
  96. package/dist/Icon.stories.d.ts +1 -0
  97. package/dist/Icon.stories.js +30 -0
  98. package/dist/Icon.stories.js.map +1 -0
  99. package/dist/IconButton.d.ts +5 -0
  100. package/dist/IconButton.js +41 -0
  101. package/dist/IconButton.js.map +1 -0
  102. package/dist/IconButton.stories.d.ts +1 -0
  103. package/dist/IconButton.stories.js +16 -0
  104. package/dist/IconButton.stories.js.map +1 -0
  105. package/dist/Image.d.ts +8 -0
  106. package/dist/Image.js +37 -0
  107. package/dist/Image.js.map +1 -0
  108. package/dist/ImageBackground.d.ts +9 -0
  109. package/dist/ImageBackground.js +8 -0
  110. package/dist/ImageBackground.js.map +1 -0
  111. package/dist/Layer.d.ts +9 -0
  112. package/dist/Layer.js +12 -0
  113. package/dist/Layer.js.map +1 -0
  114. package/dist/Link.d.ts +9 -0
  115. package/dist/Link.js +12 -0
  116. package/dist/Link.js.map +1 -0
  117. package/dist/Link.stories.d.ts +1 -0
  118. package/dist/Link.stories.js +18 -0
  119. package/dist/Link.stories.js.map +1 -0
  120. package/dist/Mask.d.ts +5 -0
  121. package/dist/Mask.js +22 -0
  122. package/dist/Mask.js.map +1 -0
  123. package/dist/Mask.stories.d.ts +1 -0
  124. package/dist/Mask.stories.js +28 -0
  125. package/dist/Mask.stories.js.map +1 -0
  126. package/dist/MediaQuery.d.ts +2 -0
  127. package/dist/MediaQuery.js +33 -0
  128. package/dist/MediaQuery.js.map +1 -0
  129. package/dist/Meta.d.ts +5 -0
  130. package/dist/Meta.js +7 -0
  131. package/dist/Meta.js.map +1 -0
  132. package/dist/ModalSheet.d.ts +7 -0
  133. package/dist/ModalSheet.js +42 -0
  134. package/dist/ModalSheet.js.map +1 -0
  135. package/dist/NumberPickerActionSheet.d.ts +16 -0
  136. package/dist/NumberPickerActionSheet.js +29 -0
  137. package/dist/NumberPickerActionSheet.js.map +1 -0
  138. package/dist/Page.d.ts +26 -0
  139. package/dist/Page.js +38 -0
  140. package/dist/Page.js.map +1 -0
  141. package/dist/Permissions.d.ts +2 -0
  142. package/dist/Permissions.js +35 -0
  143. package/dist/Permissions.js.map +1 -0
  144. package/dist/PickerSelect.d.ts +174 -0
  145. package/dist/PickerSelect.js +426 -0
  146. package/dist/PickerSelect.js.map +1 -0
  147. package/dist/Pill.d.ts +5 -0
  148. package/dist/Pill.js +10 -0
  149. package/dist/Pill.js.map +1 -0
  150. package/dist/Pill.stories.d.ts +1 -0
  151. package/dist/Pill.stories.js +38 -0
  152. package/dist/Pill.stories.js.map +1 -0
  153. package/dist/Pog.d.ts +15 -0
  154. package/dist/Pog.js +144 -0
  155. package/dist/Pog.js.map +1 -0
  156. package/dist/ProgressBar.d.ts +9 -0
  157. package/dist/ProgressBar.js +41 -0
  158. package/dist/ProgressBar.js.map +1 -0
  159. package/dist/ScrollView.d.ts +2 -0
  160. package/dist/ScrollView.js +3 -0
  161. package/dist/ScrollView.js.map +1 -0
  162. package/dist/SegmentedControl.d.ts +6 -0
  163. package/dist/SegmentedControl.js +18 -0
  164. package/dist/SegmentedControl.js.map +1 -0
  165. package/dist/SegmentedControl.stories.d.ts +1 -0
  166. package/dist/SegmentedControl.stories.js +31 -0
  167. package/dist/SegmentedControl.stories.js.map +1 -0
  168. package/dist/SelectList.d.ts +22 -0
  169. package/dist/SelectList.js +28 -0
  170. package/dist/SelectList.js.map +1 -0
  171. package/dist/SelectList.stories.d.ts +1 -0
  172. package/dist/SelectList.stories.js +26 -0
  173. package/dist/SelectList.stories.js.map +1 -0
  174. package/dist/Spinner.d.ts +21 -0
  175. package/dist/Spinner.js +58 -0
  176. package/dist/Spinner.js.map +1 -0
  177. package/dist/Spinner.stories.d.ts +1 -0
  178. package/dist/Spinner.stories.js +12 -0
  179. package/dist/Spinner.stories.js.map +1 -0
  180. package/dist/SplitPage.d.ts +31 -0
  181. package/dist/SplitPage.js +51 -0
  182. package/dist/SplitPage.js.map +1 -0
  183. package/dist/SplitPage.stories.d.ts +1 -0
  184. package/dist/SplitPage.stories.js +15 -0
  185. package/dist/SplitPage.stories.js.map +1 -0
  186. package/dist/StorybookContainer.d.ts +4 -0
  187. package/dist/StorybookContainer.js +8 -0
  188. package/dist/StorybookContainer.js.map +1 -0
  189. package/dist/Switch.d.ts +5 -0
  190. package/dist/Switch.js +10 -0
  191. package/dist/Switch.js.map +1 -0
  192. package/dist/Switch.stories.d.ts +1 -0
  193. package/dist/Switch.stories.js +34 -0
  194. package/dist/Switch.stories.js.map +1 -0
  195. package/dist/TapToEdit.d.ts +12 -0
  196. package/dist/TapToEdit.js +32 -0
  197. package/dist/TapToEdit.js.map +1 -0
  198. package/dist/Text.d.ts +11 -0
  199. package/dist/Text.js +85 -0
  200. package/dist/Text.js.map +1 -0
  201. package/dist/Text.stories.d.ts +1 -0
  202. package/dist/Text.stories.js +37 -0
  203. package/dist/Text.stories.js.map +1 -0
  204. package/dist/TextArea.d.ts +6 -0
  205. package/dist/TextArea.js +12 -0
  206. package/dist/TextArea.js.map +1 -0
  207. package/dist/TextArea.stories.d.ts +10 -0
  208. package/dist/TextArea.stories.js +24 -0
  209. package/dist/TextArea.stories.js.map +1 -0
  210. package/dist/TextField.d.ts +48 -0
  211. package/dist/TextField.js +207 -0
  212. package/dist/TextField.js.map +1 -0
  213. package/dist/TextField.stories.d.ts +6 -0
  214. package/dist/TextField.stories.js +18 -0
  215. package/dist/TextField.stories.js.map +1 -0
  216. package/dist/TextFieldNumberActionSheet.d.ts +15 -0
  217. package/dist/TextFieldNumberActionSheet.js +28 -0
  218. package/dist/TextFieldNumberActionSheet.js.map +1 -0
  219. package/dist/UnifiedScreens.d.ts +9 -0
  220. package/dist/UnifiedScreens.js +25 -0
  221. package/dist/UnifiedScreens.js.map +1 -0
  222. package/dist/Unifier.d.ts +40 -0
  223. package/dist/Unifier.js +203 -0
  224. package/dist/Unifier.js.map +1 -0
  225. package/dist/Utilities.d.ts +31 -0
  226. package/dist/Utilities.js +74 -0
  227. package/dist/Utilities.js.map +1 -0
  228. package/dist/WithLabel.d.ts +5 -0
  229. package/dist/WithLabel.js +27 -0
  230. package/dist/WithLabel.js.map +1 -0
  231. package/dist/dist/ActionSheet.d.ts +139 -0
  232. package/dist/dist/ActionSheet.js +637 -0
  233. package/dist/dist/ActionSheet.js.map +1 -0
  234. package/dist/dist/Banner.d.ts +12 -0
  235. package/dist/dist/Banner.js +49 -0
  236. package/dist/dist/Banner.js.map +1 -0
  237. package/dist/dist/Banner.stories.d.ts +1 -0
  238. package/dist/dist/Banner.stories.js +9 -0
  239. package/dist/dist/Banner.stories.js.map +1 -0
  240. package/dist/dist/BlurBox.d.ts +7 -0
  241. package/dist/dist/BlurBox.js +29 -0
  242. package/dist/dist/BlurBox.js.map +1 -0
  243. package/dist/dist/BlurBox.native.d.ts +9 -0
  244. package/dist/dist/BlurBox.native.js +32 -0
  245. package/dist/dist/BlurBox.native.js.map +1 -0
  246. package/dist/dist/Body.d.ts +12 -0
  247. package/dist/dist/Body.js +19 -0
  248. package/dist/dist/Body.js.map +1 -0
  249. package/dist/dist/Box.d.ts +205 -0
  250. package/dist/dist/Box.js +229 -0
  251. package/dist/dist/Box.js.map +1 -0
  252. package/dist/dist/Box.stories.d.ts +1 -0
  253. package/dist/dist/Box.stories.js +37 -0
  254. package/dist/dist/Box.stories.js.map +1 -0
  255. package/dist/dist/Button.d.ts +16 -0
  256. package/dist/dist/Button.js +98 -0
  257. package/dist/dist/Button.js.map +1 -0
  258. package/dist/dist/Button.stories.d.ts +13 -0
  259. package/dist/dist/Button.stories.js +26 -0
  260. package/dist/dist/Button.stories.js.map +1 -0
  261. package/dist/dist/Card.d.ts +6 -0
  262. package/dist/dist/Card.js +9 -0
  263. package/dist/dist/Card.js.map +1 -0
  264. package/dist/dist/Card.stories.d.ts +6 -0
  265. package/dist/dist/Card.stories.js +11 -0
  266. package/dist/dist/Card.stories.js.map +1 -0
  267. package/dist/dist/CheckBox.d.ts +8 -0
  268. package/dist/dist/CheckBox.js +23 -0
  269. package/dist/dist/CheckBox.js.map +1 -0
  270. package/dist/dist/CheckBox.stories.d.ts +1 -0
  271. package/dist/dist/CheckBox.stories.js +22 -0
  272. package/dist/dist/CheckBox.stories.js.map +1 -0
  273. package/dist/dist/Common.d.ts +5 -0
  274. package/dist/dist/Common.js +47 -0
  275. package/dist/dist/Common.js.map +1 -0
  276. package/dist/dist/DateTimeActionSheet.d.ts +5 -0
  277. package/dist/dist/DateTimeActionSheet.js +24 -0
  278. package/dist/dist/DateTimeActionSheet.js.map +1 -0
  279. package/dist/dist/DecimalRangeActionSheet.d.ts +9 -0
  280. package/dist/dist/DecimalRangeActionSheet.js +57 -0
  281. package/dist/dist/DecimalRangeActionSheet.js.map +1 -0
  282. package/dist/dist/ErrorBoundary.d.ts +12 -0
  283. package/dist/dist/ErrorBoundary.js +32 -0
  284. package/dist/dist/ErrorBoundary.js.map +1 -0
  285. package/dist/dist/ErrorPage.d.ts +7 -0
  286. package/dist/dist/ErrorPage.js +15 -0
  287. package/dist/dist/ErrorPage.js.map +1 -0
  288. package/dist/dist/Field.d.ts +17 -0
  289. package/dist/dist/Field.js +136 -0
  290. package/dist/dist/Field.js.map +1 -0
  291. package/dist/dist/Field.stories.d.ts +6 -0
  292. package/dist/dist/Field.stories.js +25 -0
  293. package/dist/dist/Field.stories.js.map +1 -0
  294. package/dist/dist/FieldWithLabels.d.ts +10 -0
  295. package/dist/dist/FieldWithLabels.js +7 -0
  296. package/dist/dist/FieldWithLabels.js.map +1 -0
  297. package/dist/dist/FlatList.d.ts +1 -0
  298. package/dist/dist/FlatList.js +4 -0
  299. package/dist/dist/FlatList.js.map +1 -0
  300. package/dist/dist/Form.d.ts +15 -0
  301. package/dist/dist/Form.js +56 -0
  302. package/dist/dist/Form.js.map +1 -0
  303. package/dist/dist/Form.stories.d.ts +6 -0
  304. package/dist/dist/Form.stories.js +27 -0
  305. package/dist/dist/Form.stories.js.map +1 -0
  306. package/dist/dist/HeaderButtons.d.ts +39 -0
  307. package/dist/dist/HeaderButtons.js +50 -0
  308. package/dist/dist/HeaderButtons.js.map +1 -0
  309. package/dist/dist/HeaderButtons.stories.d.ts +6 -0
  310. package/dist/dist/HeaderButtons.stories.js +7 -0
  311. package/dist/dist/HeaderButtons.stories.js.map +1 -0
  312. package/dist/dist/Heading.d.ts +32 -0
  313. package/dist/dist/Heading.js +47 -0
  314. package/dist/dist/Heading.js.map +1 -0
  315. package/dist/dist/Heading.stories.d.ts +1 -0
  316. package/dist/dist/Heading.stories.js +11 -0
  317. package/dist/dist/Heading.stories.js.map +1 -0
  318. package/dist/dist/HeightActionSheet.d.ts +9 -0
  319. package/dist/dist/HeightActionSheet.js +50 -0
  320. package/dist/dist/HeightActionSheet.js.map +1 -0
  321. package/dist/dist/Icon.d.ts +12 -0
  322. package/dist/dist/Icon.js +126 -0
  323. package/dist/dist/Icon.js.map +1 -0
  324. package/dist/dist/Icon.stories.d.ts +1 -0
  325. package/dist/dist/Icon.stories.js +11 -0
  326. package/dist/dist/Icon.stories.js.map +1 -0
  327. package/dist/dist/IconButton.d.ts +42 -0
  328. package/dist/dist/IconButton.js +41 -0
  329. package/dist/dist/IconButton.js.map +1 -0
  330. package/dist/dist/IconButton.stories.d.ts +1 -0
  331. package/dist/dist/IconButton.stories.js +8 -0
  332. package/dist/dist/IconButton.stories.js.map +1 -0
  333. package/dist/dist/Image.d.ts +9 -0
  334. package/dist/dist/Image.js +37 -0
  335. package/dist/dist/Image.js.map +1 -0
  336. package/dist/dist/ImageBackground.d.ts +6 -0
  337. package/dist/dist/ImageBackground.js +9 -0
  338. package/dist/dist/ImageBackground.js.map +1 -0
  339. package/dist/dist/Layer.d.ts +5 -0
  340. package/dist/dist/Layer.js +13 -0
  341. package/dist/dist/Layer.js.map +1 -0
  342. package/dist/dist/Link.d.ts +7 -0
  343. package/dist/dist/Link.js +13 -0
  344. package/dist/dist/Link.js.map +1 -0
  345. package/dist/dist/Link.stories.d.ts +1 -0
  346. package/dist/dist/Link.stories.js +8 -0
  347. package/dist/dist/Link.stories.js.map +1 -0
  348. package/dist/dist/Mask.d.ts +5 -0
  349. package/dist/dist/Mask.js +23 -0
  350. package/dist/dist/Mask.js.map +1 -0
  351. package/dist/dist/Mask.stories.d.ts +1 -0
  352. package/dist/dist/Mask.stories.js +13 -0
  353. package/dist/dist/Mask.stories.js.map +1 -0
  354. package/dist/dist/MediaQuery.d.ts +2 -0
  355. package/dist/dist/MediaQuery.js +34 -0
  356. package/dist/dist/MediaQuery.js.map +1 -0
  357. package/dist/dist/Meta.d.ts +6 -0
  358. package/dist/dist/Meta.js +8 -0
  359. package/dist/dist/Meta.js.map +1 -0
  360. package/dist/dist/ModalSheet.d.ts +3 -0
  361. package/dist/dist/ModalSheet.js +43 -0
  362. package/dist/dist/ModalSheet.js.map +1 -0
  363. package/dist/dist/NumberPickerActionSheet.d.ts +5 -0
  364. package/dist/dist/NumberPickerActionSheet.js +25 -0
  365. package/dist/dist/NumberPickerActionSheet.js.map +1 -0
  366. package/dist/dist/Page.d.ts +9 -0
  367. package/dist/dist/Page.js +26 -0
  368. package/dist/dist/Page.js.map +1 -0
  369. package/dist/dist/Permissions.d.ts +1 -0
  370. package/dist/dist/Permissions.js +36 -0
  371. package/dist/dist/Permissions.js.map +1 -0
  372. package/dist/dist/PickerSelect.d.ts +172 -0
  373. package/dist/dist/PickerSelect.js +403 -0
  374. package/dist/dist/PickerSelect.js.map +1 -0
  375. package/dist/dist/Pill.d.ts +7 -0
  376. package/dist/dist/Pill.js +10 -0
  377. package/dist/dist/Pill.js.map +1 -0
  378. package/dist/dist/Pill.stories.d.ts +1 -0
  379. package/dist/dist/Pill.stories.js +36 -0
  380. package/dist/dist/Pill.stories.js.map +1 -0
  381. package/dist/dist/Pog.d.ts +7 -0
  382. package/dist/dist/Pog.js +144 -0
  383. package/dist/dist/Pog.js.map +1 -0
  384. package/dist/dist/ProgressBar.d.ts +16 -0
  385. package/dist/dist/ProgressBar.js +40 -0
  386. package/dist/dist/ProgressBar.js.map +1 -0
  387. package/dist/dist/ScrollView.d.ts +1 -0
  388. package/dist/dist/ScrollView.js +4 -0
  389. package/dist/dist/ScrollView.js.map +1 -0
  390. package/dist/dist/SegmentedControl.d.ts +9 -0
  391. package/dist/dist/SegmentedControl.js +18 -0
  392. package/dist/dist/SegmentedControl.js.map +1 -0
  393. package/dist/dist/SegmentedControl.stories.d.ts +1 -0
  394. package/dist/dist/SegmentedControl.stories.js +32 -0
  395. package/dist/dist/SegmentedControl.stories.js.map +1 -0
  396. package/dist/dist/SelectList.d.ts +9 -0
  397. package/dist/dist/SelectList.js +29 -0
  398. package/dist/dist/SelectList.js.map +1 -0
  399. package/dist/dist/SelectList.stories.d.ts +1 -0
  400. package/dist/dist/SelectList.stories.js +24 -0
  401. package/dist/dist/SelectList.stories.js.map +1 -0
  402. package/dist/dist/Spinner.d.ts +44 -0
  403. package/dist/dist/Spinner.js +58 -0
  404. package/dist/dist/Spinner.js.map +1 -0
  405. package/dist/dist/Spinner.stories.d.ts +1 -0
  406. package/dist/dist/Spinner.stories.js +10 -0
  407. package/dist/dist/Spinner.stories.js.map +1 -0
  408. package/dist/dist/SplitPage.d.ts +7 -0
  409. package/dist/dist/SplitPage.js +20 -0
  410. package/dist/dist/SplitPage.js.map +1 -0
  411. package/dist/dist/SplitPage.stories.d.ts +1 -0
  412. package/dist/dist/SplitPage.stories.js +7 -0
  413. package/dist/dist/SplitPage.stories.js.map +1 -0
  414. package/dist/dist/StorybookContainer.d.ts +7 -0
  415. package/dist/dist/StorybookContainer.js +9 -0
  416. package/dist/dist/StorybookContainer.js.map +1 -0
  417. package/dist/dist/Switch.d.ts +6 -0
  418. package/dist/dist/Switch.js +10 -0
  419. package/dist/dist/Switch.js.map +1 -0
  420. package/dist/dist/Switch.stories.d.ts +1 -0
  421. package/dist/dist/Switch.stories.js +27 -0
  422. package/dist/dist/Switch.stories.js.map +1 -0
  423. package/dist/dist/TapToEdit.d.ts +9 -0
  424. package/dist/dist/TapToEdit.js +27 -0
  425. package/dist/dist/TapToEdit.js.map +1 -0
  426. package/dist/dist/Text.d.ts +36 -0
  427. package/dist/dist/Text.js +86 -0
  428. package/dist/dist/Text.js.map +1 -0
  429. package/dist/dist/Text.stories.d.ts +1 -0
  430. package/dist/dist/Text.stories.js +13 -0
  431. package/dist/dist/Text.stories.js.map +1 -0
  432. package/dist/dist/TextArea.d.ts +6 -0
  433. package/dist/dist/TextArea.js +13 -0
  434. package/dist/dist/TextArea.js.map +1 -0
  435. package/dist/dist/TextArea.stories.d.ts +12 -0
  436. package/dist/dist/TextArea.stories.js +21 -0
  437. package/dist/dist/TextArea.stories.js.map +1 -0
  438. package/dist/dist/TextField.d.ts +47 -0
  439. package/dist/dist/TextField.js +199 -0
  440. package/dist/dist/TextField.js.map +1 -0
  441. package/dist/dist/TextField.stories.d.ts +6 -0
  442. package/dist/dist/TextField.stories.js +15 -0
  443. package/dist/dist/TextField.stories.js.map +1 -0
  444. package/dist/dist/TextFieldNumberActionSheet.d.ts +5 -0
  445. package/dist/dist/TextFieldNumberActionSheet.js +24 -0
  446. package/dist/dist/TextFieldNumberActionSheet.js.map +1 -0
  447. package/dist/dist/UnifiedScreens.d.ts +2 -0
  448. package/dist/dist/UnifiedScreens.js +26 -0
  449. package/dist/dist/UnifiedScreens.js.map +1 -0
  450. package/dist/dist/Unifier.d.ts +131 -0
  451. package/dist/dist/Unifier.js +198 -0
  452. package/dist/dist/Unifier.js.map +1 -0
  453. package/dist/dist/Utilities.d.ts +51 -0
  454. package/dist/dist/Utilities.js +77 -0
  455. package/dist/dist/Utilities.js.map +1 -0
  456. package/dist/dist/WithLabel.d.ts +6 -0
  457. package/dist/dist/WithLabel.js +23 -0
  458. package/dist/dist/WithLabel.js.map +1 -0
  459. package/dist/dist/index.d.ts +43 -0
  460. package/dist/dist/index.js +49 -0
  461. package/dist/dist/index.js.map +1 -0
  462. package/dist/index.d.ts +1284 -0
  463. package/dist/index.js +49 -0
  464. package/dist/index.js.map +1 -0
  465. package/package.json +197 -0
  466. package/src/ActionSheet.tsx +1234 -0
  467. package/src/Banner.tsx +124 -0
  468. package/src/BlurBox.native.tsx +40 -0
  469. package/src/BlurBox.tsx +31 -0
  470. package/src/Body.tsx +32 -0
  471. package/src/Box.tsx +277 -0
  472. package/src/Button.tsx +139 -0
  473. package/src/Card.tsx +23 -0
  474. package/src/CheckBox.tsx +93 -0
  475. package/src/Common.ts +1376 -0
  476. package/src/DateTimeActionSheet.tsx +61 -0
  477. package/src/DecimalRangeActionSheet.tsx +113 -0
  478. package/src/ErrorBoundary.tsx +39 -0
  479. package/src/ErrorPage.tsx +44 -0
  480. package/src/Field.tsx +194 -0
  481. package/src/FieldWithLabels.tsx +36 -0
  482. package/src/FlatList.tsx +2 -0
  483. package/src/Form.tsx +182 -0
  484. package/src/HeaderButtons.tsx +107 -0
  485. package/src/Heading.tsx +53 -0
  486. package/src/HeightActionSheet.tsx +104 -0
  487. package/src/Icon.tsx +139 -0
  488. package/src/IconButton.tsx +52 -0
  489. package/src/Image.tsx +50 -0
  490. package/src/ImageBackground.tsx +13 -0
  491. package/src/Layer.tsx +17 -0
  492. package/src/Link.tsx +17 -0
  493. package/src/Mask.tsx +24 -0
  494. package/src/MediaQuery.ts +28 -0
  495. package/src/Meta.tsx +9 -0
  496. package/src/ModalSheet.tsx +58 -0
  497. package/src/NumberPickerActionSheet.tsx +66 -0
  498. package/src/Page.tsx +134 -0
  499. package/src/Permissions.ts +44 -0
  500. package/src/PickerSelect.tsx +673 -0
  501. package/src/Pill.tsx +24 -0
  502. package/src/Pog.tsx +211 -0
  503. package/src/ProgressBar.tsx +55 -0
  504. package/src/ScrollView.tsx +2 -0
  505. package/src/SegmentedControl.tsx +51 -0
  506. package/src/SelectList.tsx +48 -0
  507. package/src/Spinner.tsx +69 -0
  508. package/src/SplitPage.tsx +115 -0
  509. package/src/Switch.tsx +19 -0
  510. package/src/TapToEdit.tsx +48 -0
  511. package/src/Text.tsx +92 -0
  512. package/src/TextArea.tsx +15 -0
  513. package/src/TextField.tsx +291 -0
  514. package/src/TextFieldNumberActionSheet.tsx +61 -0
  515. package/src/UnifiedScreens.ts +24 -0
  516. package/src/Unifier.ts +268 -0
  517. package/src/Utilities.tsx +161 -0
  518. package/src/WithLabel.tsx +46 -0
  519. package/src/index.tsx +1332 -0
  520. package/src/polyfill.d.ts +11 -0
  521. package/tsconfig.json +29 -0
package/src/Common.ts ADDED
@@ -0,0 +1,1376 @@
1
+ import {SyntheticEvent} from "react";
2
+
3
+ import {SelectListOptions} from "./SelectList";
4
+
5
+ export interface BaseProfile {
6
+ email: string;
7
+ id: string;
8
+ backOffice: {
9
+ testUser?: boolean;
10
+ };
11
+ }
12
+
13
+ export interface TrackingConfig {
14
+ MIXPANEL_TOKEN: string;
15
+ SENTRY_WEB_DSN: string;
16
+ SENTRY_MOBILE_DSN: string;
17
+ USER_PROPERTY_KEYS: string[];
18
+ }
19
+
20
+ export interface IConfig extends TrackingConfig {
21
+ FEEDBACK_URL: string;
22
+ PRIVACY_POLICY_URL: string;
23
+ // The collection name to store profiles in for Firebase/redux.
24
+ PROFILE_COLLECTION: string;
25
+ TERMS_URL: string;
26
+ BASE_URL: string;
27
+ PRODUCTION: boolean;
28
+
29
+ // Useful for generating:
30
+ // http://paletton.com/#uid=72Q0u0kw0u8khBrpJx0z7nUEPiG
31
+ primaryLighterColor: string;
32
+ primaryLightColor: string;
33
+ primaryColor: string;
34
+ primaryDarkColor: string;
35
+ primaryDarkerColor: string;
36
+
37
+ secondaryLighterColor: string;
38
+ secondaryLightColor: string;
39
+ secondaryColor: string;
40
+ secondaryDarkColor: string;
41
+ secondaryDarkerColor: string;
42
+
43
+ accentLighterColor: string;
44
+ accentLightColor: string;
45
+ accentColor: string;
46
+ accentDarkColor: string;
47
+ accentDarkerColor: string;
48
+
49
+ tertiaryLighterColor: string;
50
+ tertiaryLightColor: string;
51
+ tertiaryColor: string;
52
+ tertiaryDarkColor: string;
53
+ tertiaryDarkerColor: string;
54
+
55
+ // firebaseConfig: any;
56
+
57
+ neutral900: string;
58
+ neutral800: string;
59
+ neutral700: string;
60
+ neutral600: string;
61
+ neutral500: string;
62
+ neutral400: string;
63
+ neutral300: string;
64
+ neutral200: string;
65
+ neutral100: string;
66
+ neutral90: string;
67
+ neutral80: string;
68
+ neutral70: string;
69
+ neutral60: string;
70
+ neutral50: string;
71
+ neutral40: string;
72
+ neutral30: string;
73
+ neutral20: string;
74
+ neutral10: string;
75
+ }
76
+
77
+ // For using a theme.
78
+ export interface UnifiedTheme {
79
+ // TODO: make these configurable.
80
+ blue: string;
81
+ darkGray: string;
82
+ eggplant: string;
83
+ gray: string;
84
+ green: string;
85
+ lightGray: string;
86
+ maroon: string;
87
+ midnight: string;
88
+ navy: string;
89
+ olive: string;
90
+ orange: string;
91
+ orchid: string;
92
+ pine: string;
93
+ purple: string;
94
+ red: string;
95
+ watermelon: string;
96
+ white: string;
97
+ black: string;
98
+
99
+ primaryLighter: string;
100
+ primaryLight: string;
101
+ primary: string;
102
+ primaryDark: string;
103
+ primaryDarker: string;
104
+
105
+ secondaryLighter: string;
106
+ secondaryLight: string;
107
+ secondary: string;
108
+ secondaryDark: string;
109
+ secondaryDarker: string;
110
+
111
+ accentLighter: string;
112
+ accentLight: string;
113
+ accent: string;
114
+ accentDark: string;
115
+ accentDarker: string;
116
+
117
+ tertiaryLighter: string;
118
+ tertiaryLight: string;
119
+ tertiary: string;
120
+ tertiaryDark: string;
121
+ tertiaryDarker: string;
122
+
123
+ neutral900: string;
124
+ neutral800: string;
125
+ neutral700: string;
126
+ neutral600: string;
127
+ neutral500: string;
128
+ neutral400: string;
129
+ neutral300: string;
130
+ neutral200: string;
131
+ neutral100: string;
132
+ neutral90: string;
133
+ neutral80: string;
134
+ neutral70: string;
135
+ neutral60: string;
136
+ neutral50: string;
137
+ neutral40: string;
138
+ neutral30: string;
139
+ neutral20: string;
140
+ neutral10: string;
141
+
142
+ primaryFont: string;
143
+ primaryBoldFont: string;
144
+ secondaryFont: string;
145
+ secondaryBoldFont: string;
146
+ buttonFont: string;
147
+ accentFont: string;
148
+ accentBoldFont: string;
149
+ titleFont: string;
150
+ }
151
+
152
+ export type Font =
153
+ | "primary"
154
+ | "primaryBold"
155
+ | "secondary"
156
+ | "secondaryBold"
157
+ | "accent"
158
+ | "accentBold"
159
+ | "title"
160
+ | "button";
161
+
162
+ // type Sizes = "small" | "xsmall" | "sm" | "small" | "medium" | "lg" | "large";
163
+ export type Direction = "up" | "right" | "down" | "left";
164
+ export type Color =
165
+ | "blue"
166
+ | "darkGray"
167
+ | "eggplant"
168
+ | "gray"
169
+ | "green"
170
+ | "lightGray"
171
+ | "maroon"
172
+ | "midnight"
173
+ | "navy"
174
+ | "olive"
175
+ | "orange"
176
+ | "orchid"
177
+ | "pine"
178
+ | "purple"
179
+ | "red"
180
+ | "watermelon"
181
+ | "white"
182
+ | "black";
183
+ export type ThemeColor =
184
+ | "primaryLighter"
185
+ | "primaryLight"
186
+ | "primary"
187
+ | "primaryDark"
188
+ | "primaryDarker"
189
+ | "secondaryLighter"
190
+ | "secondaryLight"
191
+ | "secondary"
192
+ | "secondaryDark"
193
+ | "secondaryDarker"
194
+ | "tertiaryLighter"
195
+ | "tertiaryLight"
196
+ | "tertiary"
197
+ | "tertiaryDark"
198
+ | "tertiaryDarker"
199
+ | "accentLighter"
200
+ | "accentLight"
201
+ | "accent"
202
+ | "accentDark"
203
+ | "accentDarker";
204
+ export type NeutralColor =
205
+ | "neutral900"
206
+ | "neutral800"
207
+ | "neutral700"
208
+ | "neutral600"
209
+ | "neutral500"
210
+ | "neutral400"
211
+ | "neutral300"
212
+ | "neutral200"
213
+ | "neutral100"
214
+ | "neutral90"
215
+ | "neutral80"
216
+ | "neutral70"
217
+ | "neutral60"
218
+ | "neutral50"
219
+ | "neutral40"
220
+ | "neutral30"
221
+ | "neutral20"
222
+ | "neutral10";
223
+ export type AllColors = Color | ThemeColor | NeutralColor;
224
+
225
+ export interface OnChangeResult {
226
+ event?: SyntheticEvent<any>;
227
+ value: string;
228
+ }
229
+ export type OnChangeCallback = (result: OnChangeResult) => void;
230
+ export type IconName =
231
+ | "heart"
232
+ | "chevron-left"
233
+ | "hat-chef"
234
+ | "book"
235
+ | "list-alt"
236
+ | "carrot"
237
+ | "comment"
238
+ | "user-circle"
239
+ | "fire"
240
+ | "chart-pie"
241
+ | "knife-kitchen"
242
+ | "oven"
243
+ | "clock"
244
+ | "utensils-alt"
245
+ | "search"
246
+ | "chevron-right"
247
+ | "plus"
248
+ | "ellipsis-v"
249
+ | "paper-plane"
250
+ | "exclamation-circle"
251
+ | "edit";
252
+
253
+ export type GestaltIconName =
254
+ | "add"
255
+ | "add-circle"
256
+ | "add-pin"
257
+ | "arrow-back"
258
+ | "arrow-circle-forward"
259
+ | "arrow-down"
260
+ | "arrow-forward"
261
+ | "arrow-up"
262
+ | "bell"
263
+ | "camera"
264
+ | "cancel"
265
+ | "check"
266
+ | "check-circle"
267
+ | "circle-outline"
268
+ | "clear"
269
+ | "clock"
270
+ | "cog"
271
+ | "compass"
272
+ | "dash"
273
+ | "edit"
274
+ | "ellipsis"
275
+ | "ellipsis-circle-outline"
276
+ | "facebook"
277
+ | "face-happy"
278
+ | "face-sad"
279
+ | "face-smiley"
280
+ | "filter"
281
+ | "flag"
282
+ | "flashlight"
283
+ | "globe"
284
+ | "graph-bar"
285
+ | "handle"
286
+ | "heart"
287
+ | "heart-broken"
288
+ | "knoop"
289
+ | "lightbulb"
290
+ | "link"
291
+ | "location"
292
+ | "lock"
293
+ | "menu"
294
+ | "move"
295
+ | "pause"
296
+ | "people"
297
+ | "person"
298
+ | "person-add"
299
+ | "pin"
300
+ | "pin-hide"
301
+ | "pinterest"
302
+ | "play"
303
+ | "question-mark"
304
+ | "remove"
305
+ | "report"
306
+ | "search"
307
+ | "shopping-bag"
308
+ | "smiley"
309
+ | "smiley-outline"
310
+ | "send"
311
+ | "share"
312
+ | "sound"
313
+ | "speech"
314
+ | "speech-ellipsis"
315
+ | "tag";
316
+
317
+ export type AlignContent = "start" | "end" | "center" | "between" | "around" | "stretch";
318
+ export type AlignSelf = "auto" | "start" | "end" | "center" | "baseline" | "stretch";
319
+ export type AlignItems = "start" | "end" | "center" | "baseline" | "stretch";
320
+ export type JustifyContent = "start" | "end" | "center" | "between" | "around";
321
+
322
+ export type UnsignedUpTo12 = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
323
+ export type SignedUpTo12 =
324
+ | -12
325
+ | -11
326
+ | -10
327
+ | -9
328
+ | -8
329
+ | -7
330
+ | -6
331
+ | -5
332
+ | -4
333
+ | -3
334
+ | -2
335
+ | -1
336
+ | UnsignedUpTo12;
337
+ export type Margin = SignedUpTo12 | "auto";
338
+ export const SPACING = 4;
339
+
340
+ export type TextFieldType =
341
+ | "date"
342
+ | "email"
343
+ | "number"
344
+ | "numberRange"
345
+ | "decimalRange"
346
+ | "decimal"
347
+ | "username"
348
+ | "password"
349
+ | "search"
350
+ | "text"
351
+ | "url"
352
+ | "height";
353
+
354
+ export type IconSize = "xs" | "sm" | "md" | "lg" | "xl";
355
+
356
+ export const iconSizeToNumber = (size?: IconSize) => {
357
+ return {
358
+ xs: 8,
359
+ sm: 12,
360
+ md: 14,
361
+ lg: 20,
362
+ xl: 26,
363
+ }[size || "md"];
364
+ };
365
+
366
+ export const iconNumberToSize = (size = 16): IconSize => {
367
+ let iconSize: IconSize;
368
+ if (size < 8) {
369
+ iconSize = "xs";
370
+ } else if (size < 12) {
371
+ iconSize = "sm";
372
+ } else if (size < 14) {
373
+ iconSize = "md";
374
+ } else if (size < 20) {
375
+ iconSize = "lg";
376
+ } else {
377
+ iconSize = "xl";
378
+ }
379
+ return iconSize;
380
+ };
381
+
382
+ export function getSectionColor(section: "Breakfast" | "Lunch" | "Dinner" | "Snack" | "workouts") {
383
+ return ({
384
+ Breakfast: "orchid",
385
+ Lunch: "blue",
386
+ Dinner: "orange",
387
+ Snack: "red",
388
+ "Second Snack": "red",
389
+ Workout: "pine",
390
+ workouts: "pine",
391
+ }[section] || "blue") as Color;
392
+ }
393
+
394
+ export type TextSize = "sm" | "md" | "lg";
395
+ export type TextColor =
396
+ | "blue"
397
+ | "darkGray"
398
+ | "eggplant"
399
+ | "gray"
400
+ | "green"
401
+ | "lightGray"
402
+ | "maroon"
403
+ | "midnight"
404
+ | "navy"
405
+ | "olive"
406
+ | "orange"
407
+ | "orchid"
408
+ | "pine"
409
+ | "purple"
410
+ | "red"
411
+ | "watermelon"
412
+ | "white"; // default "darkGray"
413
+
414
+ export type ButtonColor =
415
+ | "blue"
416
+ | "gray"
417
+ | "red"
418
+ // | "transparent"
419
+ | "white"
420
+ | "primary"
421
+ | "secondary"
422
+ | "accent"
423
+ | "tertiary";
424
+ // | "twitter"
425
+ // | "facebook"
426
+ // | "google";
427
+
428
+ export type IconPrefix = "far" | "fal" | "fas" | "fab";
429
+ // | "ant"
430
+ // | "entypo"
431
+ // | "evil"
432
+ // | "material"
433
+ // | "material-community";
434
+ // | "ionicon"
435
+ // | "octicon"
436
+ // | "zocial"
437
+ // | "simple-line"
438
+ // | "feather";
439
+
440
+ export interface TextProps {
441
+ align?: "left" | "right" | "center" | "justify"; // default "left"
442
+ children?: React.ReactNode;
443
+ color?: AllColors;
444
+
445
+ inline?: boolean; // default false
446
+ italic?: boolean; // default false
447
+ overflow?: "normal" | "breakWord"; // default "breakWord"
448
+ size?: TextSize; // default "md"
449
+ truncate?: boolean; // default false
450
+ font?: Font;
451
+ underline?: boolean;
452
+
453
+ numberOfLines?: number;
454
+ skipLinking?: boolean;
455
+ weight?: "bold" | "normal";
456
+ }
457
+
458
+ export interface ActionBannerProps {
459
+ /** The text to show in the banner. */
460
+ text: string;
461
+ color?: AllColors;
462
+ textColor?: TextColor;
463
+ negativeXMargin?: number;
464
+ onClick: () => void;
465
+ shape?: Rounding;
466
+ }
467
+
468
+ export interface BlurBoxProps extends BoxProps {
469
+ blurType?: "regular" | "dark" | "prominent";
470
+ }
471
+
472
+ export interface LayerProps {
473
+ children: React.ReactNode;
474
+ }
475
+
476
+ export interface ModalProps {
477
+ header?: React.ReactNode;
478
+ accessibilityModalLabel: string;
479
+ children?: React.ReactNode;
480
+ closeOnOutsideClick?: boolean;
481
+ footer?: React.ReactNode;
482
+ heading?: string | React.ReactNode;
483
+ onDismiss: () => void;
484
+ role?: "alertdialog" | "dialog";
485
+ size?: "sm" | "md" | "lg" | number;
486
+ }
487
+
488
+ export interface BoxProps {
489
+ alignContent?: AlignContent;
490
+ alignItems?: AlignItems;
491
+ alignSelf?: AlignSelf;
492
+ bottom?: boolean;
493
+ children?: React.ReactNode;
494
+ color?: BoxColor;
495
+ column?: UnsignedUpTo12;
496
+ smColumn?: UnsignedUpTo12;
497
+ mdColumn?: UnsignedUpTo12;
498
+ lgColumn?: UnsignedUpTo12;
499
+ dangerouslySetInlineStyle?: {
500
+ __style: {
501
+ [key: string]: any;
502
+ };
503
+ };
504
+ direction?: "row" | "column";
505
+ smDirection?: "row" | "column";
506
+ mdDirection?: "row" | "column";
507
+ lgDirection?: "row" | "column";
508
+ display?: "none" | "flex" | "block" | "inlineBlock" | "visuallyHidden";
509
+ smDisplay?: "none" | "flex" | "block" | "inlineBlock" | "visuallyHidden";
510
+ mdDisplay?: "none" | "flex" | "block" | "inlineBlock" | "visuallyHidden";
511
+ lgDisplay?: "none" | "flex" | "block" | "inlineBlock" | "visuallyHidden";
512
+ fit?: boolean;
513
+ flex?: "grow" | "shrink" | "none";
514
+ height?: number | string;
515
+ justifyContent?: "start" | "end" | "center" | "between" | "around";
516
+ left?: boolean;
517
+ margin?: SignedUpTo12;
518
+ smMargin?: SignedUpTo12;
519
+ mdMargin?: SignedUpTo12;
520
+ lgMargin?: SignedUpTo12;
521
+ marginBottom?: SignedUpTo12;
522
+ smMarginBottom?: SignedUpTo12;
523
+ mdMarginBottom?: SignedUpTo12;
524
+ lgMarginBottom?: SignedUpTo12;
525
+ marginEnd?: SignedUpTo12;
526
+ smMarginEnd?: SignedUpTo12;
527
+ mdMarginEnd?: SignedUpTo12;
528
+ lgMarginEnd?: SignedUpTo12;
529
+ marginLeft?: SignedUpTo12;
530
+ smMarginLeft?: SignedUpTo12;
531
+ mdMarginLeft?: SignedUpTo12;
532
+ lgMarginLeft?: SignedUpTo12;
533
+ marginRight?: SignedUpTo12;
534
+ smMarginRight?: SignedUpTo12;
535
+ mdMarginRight?: SignedUpTo12;
536
+ lgMarginRight?: SignedUpTo12;
537
+ marginStart?: SignedUpTo12;
538
+ smMarginStart?: SignedUpTo12;
539
+ mdMarginStart?: SignedUpTo12;
540
+ lgMarginStart?: SignedUpTo12;
541
+ marginTop?: SignedUpTo12;
542
+ smMarginTop?: SignedUpTo12;
543
+ mdMarginTop?: SignedUpTo12;
544
+ lgMarginTop?: SignedUpTo12;
545
+ maxHeight?: number | string;
546
+ maxWidth?: number | string;
547
+ minHeight?: number | string;
548
+ minWidth?: number | string;
549
+ overflow?: "visible" | "hidden" | "scroll" | "scrollX" | "scrollY" | "auto";
550
+ padding?: UnsignedUpTo12;
551
+ smPadding?: UnsignedUpTo12;
552
+ mdPadding?: UnsignedUpTo12;
553
+ lgPadding?: UnsignedUpTo12;
554
+ paddingX?: UnsignedUpTo12;
555
+ smPaddingX?: UnsignedUpTo12;
556
+ mdPaddingX?: UnsignedUpTo12;
557
+ lgPaddingX?: UnsignedUpTo12;
558
+ paddingY?: UnsignedUpTo12;
559
+ smPaddingY?: UnsignedUpTo12;
560
+ mdPaddingY?: UnsignedUpTo12;
561
+ lgPaddingY?: UnsignedUpTo12;
562
+ position?: "static" | "absolute" | "relative" | "fixed";
563
+ right?: boolean;
564
+ rounding?: "pill" | "circle" | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
565
+ top?: boolean;
566
+ width?: number | string;
567
+ wrap?: boolean;
568
+
569
+ // Pattern additions
570
+ onClick?: any;
571
+ className?: any;
572
+ style?: any;
573
+
574
+ // Pattern Addition. Adds keyboard aware scrollview
575
+ scroll?: boolean;
576
+ // Pattern Addition. Shadows!
577
+ shadow?: boolean;
578
+ border?: AllColors;
579
+ avoidKeyboard?: boolean;
580
+ keyboardOffset?: number;
581
+ scrollRef?: any;
582
+ onScroll?: (offsetY: number) => void;
583
+ onLayout?: (event: any) => void;
584
+ }
585
+
586
+ export type BoxColor = AllColors | "transparent";
587
+
588
+ export interface ButtonProps {
589
+ text: string;
590
+ // TODO make this work for all colors
591
+ color?: ButtonColor | Color;
592
+ // default gray
593
+ disabled?: boolean; // default false
594
+ inline?: boolean; // default false
595
+ size?: "sm" | "md" | "lg"; // default md
596
+
597
+ // Pattern Addition
598
+ type?: "solid" | "ghost" | "outline";
599
+ loading?: boolean;
600
+ onClick: any;
601
+ icon?: GestaltIconName | string;
602
+ iconPrefix?: IconPrefix;
603
+ iconColor?: ButtonColor | Color;
604
+ }
605
+
606
+ export interface DrawerProps {
607
+ animationOpenTime: number;
608
+ animationCloseTime: number;
609
+ direction: Direction;
610
+ dismissWhenTouchOutside?: boolean;
611
+ fadeOpacity?: number;
612
+ drawerScreenWidth: number;
613
+ drawerScreenHeight: number;
614
+ style?: any;
615
+ parent: any;
616
+ dismiss?: any;
617
+ }
618
+
619
+ export type DrawerDirection = "left" | "right" | "bottom" | "top";
620
+
621
+ export interface ErrorBoundaryProps {
622
+ onError?: (error: Error, stack: any) => void;
623
+ }
624
+
625
+ export interface FaceBookButtonProps {
626
+ errorMessageColor?: "red" | "white";
627
+ signUp: boolean;
628
+ }
629
+
630
+ export interface IconProps {
631
+ prefix: IconPrefix;
632
+ name: string;
633
+ color?: AllColors;
634
+ size?: number;
635
+ iconStyle?: any;
636
+ containerStyle?: any;
637
+ }
638
+
639
+ export interface IconButtonProps {
640
+ prefix?: IconPrefix;
641
+ icon: GestaltIconName | string;
642
+ accessibilityLabel: string;
643
+ iconColor: "darkGray" | ButtonColor | ThemeColor | Color;
644
+ onClick: () => void;
645
+ size?: IconSize;
646
+ bgColor?: "transparent" | "transparentDarkGray" | "gray" | "lightGray" | "white"; // default transparent
647
+ disabled?: boolean;
648
+ selected?: boolean;
649
+ }
650
+
651
+ export interface NavigatorProps {
652
+ config?: any;
653
+ }
654
+
655
+ export interface PillProps {
656
+ text: string;
657
+ color: AllColors;
658
+ enabled?: boolean;
659
+ onClick: (enabled: boolean) => void;
660
+ }
661
+
662
+ export interface SegmentedControlProps {
663
+ items: (string | React.ReactNode)[];
664
+ onChange: ({activeIndex}: {activeIndex: number}) => void;
665
+ selectedItemIndex: number;
666
+ responsive?: boolean;
667
+ size?: "md" | "lg"; // defaults to md
668
+ }
669
+
670
+ // Shared props for fields with labels, subtext, and error messages.
671
+ export interface FieldWithLabelsProps {
672
+ errorMessage?: string;
673
+ errorMessageColor?: AllColors; // Default: red.
674
+ label?: string;
675
+ labelColor?: AllColors;
676
+ helperText?: string;
677
+ helperTextColor?: AllColors;
678
+ children?: React.ReactNode;
679
+ }
680
+
681
+ export interface FieldProps extends FieldWithLabelsProps {
682
+ name: string;
683
+ label?: string;
684
+ subLabel?: string;
685
+ initialValue?: any;
686
+ handleChange: any;
687
+ // Additional validation
688
+ validate?: (value: any) => boolean;
689
+ validateErrorMessage?: string;
690
+ type?:
691
+ | "boolean"
692
+ | "email"
693
+ | "text"
694
+ | "textarea"
695
+ | "number"
696
+ | "currency"
697
+ | "percent"
698
+ | "select"
699
+ | "password"
700
+ | "url"
701
+ | "date";
702
+ rows?: number;
703
+ options?: SelectListOptions;
704
+ placeholder?: string;
705
+ disabled?: boolean;
706
+ }
707
+
708
+ export interface TextFieldProps extends FieldWithLabelsProps {
709
+ id?: string;
710
+ onChange: OnChangeCallback;
711
+ autoComplete?: "current-password" | "on" | "off" | "username";
712
+ disabled?: boolean;
713
+
714
+ idealErrorDirection?: Direction;
715
+ name?: string;
716
+ onBlur?: OnChangeCallback;
717
+ onFocus?: OnChangeCallback;
718
+ placeholder?: string;
719
+ type?: TextFieldType;
720
+ value?: string;
721
+ style?: any;
722
+ // If type === search, indicates whether to show the search icon or spinner
723
+ searching?: boolean;
724
+
725
+ returnKeyType?: "done" | "go" | "next" | "search" | "send";
726
+
727
+ // TODO: still needed?
728
+ autoFocus?: boolean;
729
+ grow?: boolean;
730
+ // react-native-autofocus
731
+ inputRef?: any;
732
+ onSubmitEditing?: any;
733
+ onEnter?: any;
734
+ multiline?: boolean;
735
+ rows?: number;
736
+ height?: number;
737
+ paddingX?: number;
738
+ paddingY?: number;
739
+
740
+ // Required for type=numberRange
741
+ min?: number;
742
+ max?: number;
743
+ }
744
+
745
+ export type TextAreaProps = TextFieldProps;
746
+
747
+ export interface WithLabelProps {
748
+ children: React.ReactNode;
749
+ show?: boolean;
750
+ label?: string;
751
+ labelInline?: boolean;
752
+ labelColor?: AllColors;
753
+ labelJustifyContent?: JustifyContent;
754
+ labelPlacement?: "before" | "after";
755
+ labelSize?: TextSize;
756
+ }
757
+
758
+ export interface SubmittingFormProps {
759
+ onSubmitEditting: () => void;
760
+ }
761
+
762
+ export interface SwitchProps extends FieldWithLabelsProps {
763
+ id?: string;
764
+ onChange: (value: boolean) => void;
765
+ disabled?: boolean;
766
+ name?: string;
767
+ switched: boolean;
768
+ // Pattern Addition
769
+ label?: string;
770
+ }
771
+
772
+ export interface SpinnerProps {
773
+ size?: "sm" | "md";
774
+ color?: Color;
775
+ }
776
+
777
+ export interface MaskProps {
778
+ children?: React.ReactNode;
779
+ shape?: "circle" | "rounded" | "square";
780
+ height?: number | string;
781
+ width?: number | string;
782
+ maxHeight?: number | string;
783
+ maxWidth?: number | string;
784
+ rounding?: "circle" | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
785
+ willChangeTransform?: boolean;
786
+ wash?: boolean;
787
+ }
788
+
789
+ export interface IconRowProps {
790
+ icon: string;
791
+ label: string;
792
+ value: string;
793
+ }
794
+
795
+ export interface LinkProps {
796
+ href: string;
797
+ inline?: boolean;
798
+ children?: React.ReactNode;
799
+ onClick?: () => void;
800
+ target?: null | "blank";
801
+ }
802
+
803
+ export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | "circle" | "pill";
804
+
805
+ // eslint-disable-next-line @typescript-eslint/no-empty-interface
806
+ export interface HeadingProps {
807
+ align?: "left" | "right" | "center" | "justify"; // default "left"
808
+ children?: React.ReactNode;
809
+ color?: AllColors;
810
+ overflow?: "normal" | "breakWord"; // default "breakWord"
811
+ size?: "sm" | "md" | "lg";
812
+ truncate?: boolean; // default false
813
+ }
814
+
815
+ export interface MetaProps {
816
+ itemProp?: string;
817
+ content?: string;
818
+ itemType?: string;
819
+ key?: string;
820
+ property?: string;
821
+ }
822
+
823
+ export interface ImageProps {
824
+ alt?: string;
825
+ color: BoxColor;
826
+ naturalHeight?: number;
827
+ naturalWidth?: number;
828
+ maxWidth?: number;
829
+ maxHeight?: number;
830
+ src: string;
831
+ children?: React.ReactNode;
832
+ fit?: "cover" | "contain" | "none";
833
+ onError?: () => void;
834
+ onLoad?: () => void;
835
+ size?: string;
836
+ srcSet?: string;
837
+ fullWidth?: boolean;
838
+ style?: any;
839
+ }
840
+
841
+ export interface SearchButtonProps {
842
+ color: ButtonColor;
843
+ onClick: () => void;
844
+ }
845
+
846
+ export interface BackButtonInterface {
847
+ onBack: () => void;
848
+ }
849
+
850
+ export interface CheckBoxProps {
851
+ id: string;
852
+ onChange: ({value}: {value: boolean}) => void;
853
+ checked?: boolean;
854
+ disabled?: boolean;
855
+ hasError?: boolean;
856
+ indeterminate?: boolean;
857
+ name?: string;
858
+ onClick?: any;
859
+ size?: "sm" | "md";
860
+ color?: AllColors;
861
+ radio?: boolean;
862
+
863
+ label?: string;
864
+ subLabel?: string;
865
+ labelColor?: AllColors;
866
+ }
867
+
868
+ export interface BodyProps {
869
+ scroll?: boolean;
870
+ loading?: boolean;
871
+ useBox?: boolean; // defaults false
872
+ style?: any;
873
+ padding?: UnsignedUpTo12;
874
+ height?: number | string;
875
+ avoidKeyboard?: boolean; // default true
876
+ }
877
+
878
+ export interface ChatPaneProps {
879
+ messagesView: any;
880
+ textFormView: any;
881
+ ref: any;
882
+ }
883
+
884
+ export interface ScrollViewProps {
885
+ scrollTo?: (
886
+ y?: number | {x?: number; y?: number; animated?: boolean},
887
+ x?: number,
888
+ animated?: boolean
889
+ ) => void;
890
+ /**
891
+ * These styles will be applied to the scroll view content container which
892
+ * wraps all of the child views. Example:
893
+ *
894
+ * return (
895
+ * <ScrollView contentContainerStyle={styles.contentContainer}>
896
+ * </ScrollView>
897
+ * );
898
+ * ...
899
+ * const styles = StyleSheet.create({
900
+ * contentContainer: {
901
+ * paddingVertical: 20
902
+ * }
903
+ * });
904
+ */
905
+ contentContainerStyle?: any;
906
+
907
+ /**
908
+ * When true the scroll view's children are arranged horizontally in a row
909
+ * instead of vertically in a column. The default value is false.
910
+ */
911
+ horizontal?: boolean | null;
912
+
913
+ /**
914
+ * If sticky headers should stick at the bottom instead of the top of the
915
+ * ScrollView. This is usually used with inverted ScrollViews.
916
+ */
917
+ // invertStickyHeaders?: boolean;
918
+
919
+ /**
920
+ * Determines whether the keyboard gets dismissed in response to a drag.
921
+ * - 'none' (the default) drags do not dismiss the keyboard.
922
+ * - 'onDrag' the keyboard is dismissed when a drag begins.
923
+ * - 'interactive' the keyboard is dismissed interactively with the drag
924
+ * and moves in synchrony with the touch; dragging upwards cancels the
925
+ * dismissal.
926
+ */
927
+ // keyboardDismissMode?: "none" | "interactive" | "on-drag";
928
+
929
+ /**
930
+ * Determines when the keyboard should stay visible after a tap.
931
+ * - 'never' (the default), tapping outside of the focused text input when the keyboard is up dismisses the keyboard. When this happens, children won't receive the tap.
932
+ * - 'always', the keyboard will not dismiss automatically, and the scroll view will not catch taps, but children of the scroll view can catch taps.
933
+ * - 'handled', the keyboard will not dismiss automatically when the tap was handled by a children, (or captured by an ancestor).
934
+ * - false, deprecated, use 'never' instead
935
+ * - true, deprecated, use 'always' instead
936
+ */
937
+ keyboardShouldPersistTaps?: boolean | "always" | "never" | "handled";
938
+
939
+ /**
940
+ * Called when scrollable content view of the ScrollView changes.
941
+ * Handler function is passed the content width and content height as parameters: (contentWidth, contentHeight)
942
+ * It's implemented using onLayout handler attached to the content container which this ScrollView renders.
943
+ *
944
+ */
945
+ // onContentSizeChange?: (w: number, h: number) => void;
946
+
947
+ /**
948
+ * Fires at most once per frame during scrolling.
949
+ * The frequency of the events can be contolled using the scrollEventThrottle prop.
950
+ */
951
+ onScroll?: (event: any) => void;
952
+
953
+ /**
954
+ * Fires if a user initiates a scroll gesture.
955
+ */
956
+ // onScrollBeginDrag?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
957
+
958
+ /**
959
+ * Fires when a user has finished scrolling.
960
+ */
961
+ // onScrollEndDrag?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
962
+
963
+ /**
964
+ * Fires when scroll view has finished moving
965
+ */
966
+ // onMomentumScrollEnd?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
967
+
968
+ /**
969
+ * Fires when scroll view has begun moving
970
+ */
971
+ // onMomentumScrollBegin?: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
972
+
973
+ /**
974
+ * When true the scroll view stops on multiples of the scroll view's size
975
+ * when scrolling. This can be used for horizontal pagination. The default
976
+ * value is false.
977
+ */
978
+ // pagingEnabled?: boolean;
979
+
980
+ /**
981
+ * When false, the content does not scroll. The default value is true
982
+ */
983
+ // scrollEnabled?: boolean; // true
984
+
985
+ /**
986
+ * Experimental: When true offscreen child views (whose `overflow` value is
987
+ * `hidden`) are removed from their native backing superview when offscreen.
988
+ * This canimprove scrolling performance on long lists. The default value is
989
+ * false.
990
+ */
991
+ // removeClippedSubviews?: boolean;
992
+
993
+ /**
994
+ * When true, shows a horizontal scroll indicator.
995
+ */
996
+ // showsHorizontalScrollIndicator?: boolean;
997
+
998
+ /**
999
+ * When true, shows a vertical scroll indicator.
1000
+ */
1001
+ // showsVerticalScrollIndicator?: boolean;
1002
+
1003
+ /**
1004
+ * Style
1005
+ */
1006
+ style?: any;
1007
+
1008
+ /**
1009
+ * A RefreshControl component, used to provide pull-to-refresh
1010
+ * functionality for the ScrollView.
1011
+ */
1012
+ // refreshControl?: React.ReactElement<RefreshControlProps>;
1013
+
1014
+ /**
1015
+ * When `snapToInterval` is set, `snapToAlignment` will define the relationship of the the snapping to the scroll view.
1016
+ * - `start` (the default) will align the snap at the left (horizontal) or top (vertical)
1017
+ * - `center` will align the snap in the center
1018
+ * - `end` will align the snap at the right (horizontal) or bottom (vertical)
1019
+ */
1020
+ // snapToAlignment?: "start" | "center" | "end";
1021
+
1022
+ /**
1023
+ * When set, causes the scroll view to stop at multiples of the value of `snapToInterval`.
1024
+ * This can be used for paginating through children that have lengths smaller than the scroll view.
1025
+ * Used in combination with `snapToAlignment` and `decelerationRate="fast"`. Overrides less
1026
+ * configurable `pagingEnabled` prop.
1027
+ */
1028
+ // snapToInterval?: number;
1029
+
1030
+ /**
1031
+ * When set, causes the scroll view to stop at the defined offsets. This can be used for
1032
+ * paginating through variously sized children that have lengths smaller than the scroll view.
1033
+ * Typically used in combination with `decelerationRate="fast"`. Overrides less configurable
1034
+ * `pagingEnabled` and `snapToInterval` props.
1035
+ */
1036
+ // snapToOffsets?: number[];
1037
+
1038
+ /**
1039
+ * Use in conjuction with `snapToOffsets`. By default, the beginning of the list counts as a
1040
+ * snap offset. Set `snapToStart` to false to disable this behavior and allow the list to scroll
1041
+ * freely between its start and the first `snapToOffsets` offset. The default value is true.
1042
+ */
1043
+ // snapToStart?: boolean;
1044
+
1045
+ /**
1046
+ * Use in conjuction with `snapToOffsets`. By default, the end of the list counts as a snap
1047
+ * offset. Set `snapToEnd` to false to disable this behavior and allow the list to scroll freely
1048
+ * between its end and the last `snapToOffsets` offset. The default value is true.
1049
+ */
1050
+ // snapToEnd?: boolean;
1051
+
1052
+ /**
1053
+ * When true, the scroll view stops on the next index (in relation to scroll position at release)
1054
+ * regardless of how fast the gesture is. This can be used for horizontal pagination when the page
1055
+ * is less than the width of the ScrollView. The default value is false.
1056
+ */
1057
+ // disableIntervalMomentum?: boolean;
1058
+
1059
+ /**
1060
+ * When true, the default JS pan responder on the ScrollView is disabled, and full control over
1061
+ * touches inside the ScrollView is left to its child components. This is particularly useful
1062
+ * if `snapToInterval` is enabled, since it does not follow typical touch patterns. Do not use
1063
+ * this on regular ScrollView use cases without `snapToInterval` as it may cause unexpected
1064
+ * touches to occur while scrolling. The default value is false.
1065
+ */
1066
+ // disableScrollViewPanResponder?: boolean;
1067
+ // scrollToEnd(options?: {animated: boolean}): void;
1068
+ // getScrollResponder(): JSX.Element;
1069
+ // getScrollableNode(): any;
1070
+ }
1071
+
1072
+ type ItemT = any;
1073
+ type ViewStyle = any;
1074
+ interface StyleProp {
1075
+ [key: string]: any;
1076
+ }
1077
+
1078
+ interface LayoutRectangle {
1079
+ x: number;
1080
+ y: number;
1081
+ width: number;
1082
+ height: number;
1083
+ }
1084
+
1085
+ interface LayoutChangeEvent {
1086
+ nativeEvent: {
1087
+ layout: LayoutRectangle;
1088
+ };
1089
+ }
1090
+
1091
+ interface RenderItemData {
1092
+ item: any;
1093
+ index: number;
1094
+ }
1095
+
1096
+ export interface FlatListProps extends ScrollViewProps {
1097
+ /**
1098
+ * Rendered in between each item, but not at the top or bottom
1099
+ */
1100
+ ItemSeparatorComponent?: React.ComponentType<any> | null;
1101
+
1102
+ /**
1103
+ * Rendered when the list is empty.
1104
+ */
1105
+ ListEmptyComponent?: React.ComponentType<any> | React.ReactElement | null;
1106
+
1107
+ /**
1108
+ * Rendered at the very end of the list.
1109
+ */
1110
+ ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null;
1111
+
1112
+ /**
1113
+ * Styling for internal View for ListFooterComponent
1114
+ */
1115
+ ListFooterComponentStyle?: ViewStyle | null;
1116
+
1117
+ /**
1118
+ * Rendered at the very beginning of the list.
1119
+ */
1120
+ ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null;
1121
+
1122
+ /**
1123
+ * Styling for internal View for ListHeaderComponent
1124
+ */
1125
+ ListHeaderComponentStyle?: ViewStyle | null;
1126
+
1127
+ /**
1128
+ * Optional custom style for multi-item rows generated when numColumns > 1
1129
+ */
1130
+ columnWrapperStyle?: StyleProp;
1131
+
1132
+ /**
1133
+ * Determines when the keyboard should stay visible after a tap.
1134
+ * - 'never' (the default), tapping outside of the focused text input when the keyboard is up dismisses the keyboard. When this happens, children won't receive the tap.
1135
+ * - 'always', the keyboard will not dismiss automatically, and the scroll view will not catch taps, but children of the scroll view can catch taps.
1136
+ * - 'handled', the keyboard will not dismiss automatically when the tap was handled by a children, (or captured by an ancestor).
1137
+ * - false, deprecated, use 'never' instead
1138
+ * - true, deprecated, use 'always' instead
1139
+ */
1140
+ keyboardShouldPersistTaps?: boolean | "always" | "never" | "handled";
1141
+
1142
+ /**
1143
+ * Multiple columns can only be rendered with `horizontal={false}` and will zig-zag like a `flexWrap` layout.
1144
+ * Items should all be the same height - masonry layouts are not supported.
1145
+ */
1146
+ numColumns?: number;
1147
+
1148
+ /**
1149
+ * The default accessor functions assume this is an Array<{key: string}> but you can override
1150
+ * getItem, getItemCount, and keyExtractor to handle any type of index-based data.
1151
+ */
1152
+ data?: any;
1153
+
1154
+ /**
1155
+ * `debug` will turn on extra logging and visual overlays to aid with debugging both usage and
1156
+ * implementation, but with a significant perf hit.
1157
+ */
1158
+ debug?: boolean;
1159
+
1160
+ /**
1161
+ * DEPRECATED: Virtualization provides significant performance and memory optimizations, but fully
1162
+ * unmounts react instances that are outside of the render window. You should only need to disable
1163
+ * this for debugging purposes.
1164
+ */
1165
+ disableVirtualization?: boolean;
1166
+
1167
+ /**
1168
+ * A marker property for telling the list to re-render (since it implements `PureComponent`). If
1169
+ * any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the
1170
+ * `data` prop, stick it here and treat it immutably.
1171
+ */
1172
+ extraData?: any;
1173
+
1174
+ /**
1175
+ * A generic accessor for extracting an item from any sort of data blob.
1176
+ */
1177
+ getItem?: (data: any, index: number) => ItemT;
1178
+
1179
+ /**
1180
+ * Determines how many items are in the data blob.
1181
+ */
1182
+ getItemCount?: (data: any) => number;
1183
+
1184
+ getItemLayout?: (
1185
+ data: any,
1186
+ index: number
1187
+ ) => {
1188
+ length: number;
1189
+ offset: number;
1190
+ index: number;
1191
+ };
1192
+
1193
+ horizontal?: boolean | null;
1194
+
1195
+ /**
1196
+ * How many items to render in the initial batch. This should be enough to fill the screen but not
1197
+ * much more. Note these items will never be unmounted as part of the windowed rendering in order
1198
+ * to improve perceived performance of scroll-to-top actions.
1199
+ */
1200
+ initialNumToRender?: number;
1201
+
1202
+ /**
1203
+ * Instead of starting at the top with the first item, start at `initialScrollIndex`. This
1204
+ * disables the "scroll to top" optimization that keeps the first `initialNumToRender` items
1205
+ * always rendered and immediately renders the items starting at this initial index. Requires
1206
+ * `getItemLayout` to be implemented.
1207
+ */
1208
+ initialScrollIndex?: number | null;
1209
+
1210
+ /**
1211
+ * Reverses the direction of scroll. Uses scale transforms of -1.
1212
+ */
1213
+ inverted?: boolean | null;
1214
+
1215
+ keyExtractor?: (item: ItemT, index: number) => string;
1216
+
1217
+ listKey?: string;
1218
+
1219
+ /**
1220
+ * The maximum number of items to render in each incremental render batch. The more rendered at
1221
+ * once, the better the fill rate, but responsiveness my suffer because rendering content may
1222
+ * interfere with responding to button taps or other interactions.
1223
+ */
1224
+ maxToRenderPerBatch?: number;
1225
+
1226
+ onEndReached?: ((info: {distanceFromEnd: number}) => void) | null;
1227
+
1228
+ onEndReachedThreshold?: number | null;
1229
+
1230
+ onLayout?: (event: LayoutChangeEvent) => void;
1231
+
1232
+ /**
1233
+ * If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality. Make
1234
+ * sure to also set the `refreshing` prop correctly.
1235
+ */
1236
+ onRefresh?: (() => void) | null;
1237
+
1238
+ /**
1239
+ * Used to handle failures when scrolling to an index that has not been measured yet.
1240
+ * Recommended action is to either compute your own offset and `scrollTo` it, or scroll as far
1241
+ * as possible and then try again after more items have been rendered.
1242
+ */
1243
+ onScrollToIndexFailed?: (info: {
1244
+ index: number;
1245
+ highestMeasuredFrameIndex: number;
1246
+ averageItemLength: number;
1247
+ }) => void;
1248
+
1249
+ /**
1250
+ * Called when the viewability of rows changes, as defined by the
1251
+ * `viewabilityConfig` prop.
1252
+ */
1253
+ onViewableItemsChanged?: ((info: {viewableItems: any[]; changed: any[]}) => void) | null;
1254
+
1255
+ /**
1256
+ * Set this when offset is needed for the loading indicator to show correctly.
1257
+ * @platform android
1258
+ */
1259
+ progressViewOffset?: number;
1260
+
1261
+ /**
1262
+ * Set this true while waiting for new data from a refresh.
1263
+ */
1264
+ refreshing?: boolean | null;
1265
+
1266
+ /**
1267
+ * Note: may have bugs (missing content) in some circumstances - use at your own risk.
1268
+ *
1269
+ * This may improve scroll performance for large lists.
1270
+ */
1271
+ removeClippedSubviews?: boolean;
1272
+
1273
+ /**
1274
+ * Render a custom scroll component, e.g. with a differently styled `RefreshControl`.
1275
+ */
1276
+ renderScrollComponent?: (props: ScrollViewProps) => React.ReactElement<ScrollViewProps>;
1277
+
1278
+ /**
1279
+ * Amount of time between low-pri item render batches, e.g. for rendering items quite a ways off
1280
+ * screen. Similar fill rate/responsiveness tradeoff as `maxToRenderPerBatch`.
1281
+ */
1282
+ updateCellsBatchingPeriod?: number;
1283
+
1284
+ viewabilityConfig?: any;
1285
+
1286
+ viewabilityConfigCallbackPairs?: any;
1287
+
1288
+ /**
1289
+ * Determines the maximum number of items rendered outside of the visible area, in units of
1290
+ * visible lengths. So if your list fills the screen, then `windowSize={21}` (the default) will
1291
+ * render the visible screen area plus up to 10 screens above and 10 below the viewport. Reducing
1292
+ * this number will reduce memory consumption and may improve performance, but will increase the
1293
+ * chance that fast scrolling may reveal momentary blank areas of unrendered content.
1294
+ */
1295
+ windowSize?: number;
1296
+
1297
+ renderItem: (info: RenderItemData) => React.ReactElement | null;
1298
+ }
1299
+
1300
+ export interface PickerProps {
1301
+ onValueChange?: (itemValue: any, itemPosition: number) => void;
1302
+ selectedValue?: any;
1303
+ style?: StyleProp;
1304
+ testId?: string;
1305
+ itemStyle?: StyleProp;
1306
+ enabled?: boolean;
1307
+ mode?: "dialog" | "dropdown";
1308
+ prompt?: string;
1309
+ }
1310
+
1311
+ export type LogLevel = "fatal" | "error" | "warning" | "info" | "debug" | "critical";
1312
+ export type PermissionKind =
1313
+ | "location"
1314
+ | "locationAlways"
1315
+ | "camera"
1316
+ | "microphone"
1317
+ | "photo"
1318
+ | "contacts"
1319
+ | "event"
1320
+ | "reminder"
1321
+ | "bluetooth"
1322
+ | "notification"
1323
+ | "backgroundRefresh"
1324
+ | "speechRecognition"
1325
+ | "mediaLibrary"
1326
+ | "motion";
1327
+ export type PermissionStatus =
1328
+ | "authorized"
1329
+ | "denied"
1330
+ | "softDenied"
1331
+ | "restricted"
1332
+ | "undetermined";
1333
+
1334
+ export interface TrackingProperties {
1335
+ [name: string]: any;
1336
+ }
1337
+
1338
+ export function isTestUser(profile?: BaseProfile) {
1339
+ return (
1340
+ profile &&
1341
+ profile.email &&
1342
+ (profile.email.indexOf("nang.io") > -1 || profile.email.indexOf("example.com") > -1)
1343
+ );
1344
+ }
1345
+
1346
+ export interface TrackerInterface {
1347
+ initFinished: boolean;
1348
+ init: (config: TrackingConfig) => void;
1349
+ trackPages: () => void;
1350
+ setUser: (user: BaseProfile) => void;
1351
+ setUserProperty: (property: string, value: string | {object: {[id: string]: any}}) => void;
1352
+ track: (eventName: string, properties?: TrackingProperties) => void;
1353
+ trackNavigation: (screen: string, properties?: TrackingProperties) => void;
1354
+ trackLogin: (method: string, success: boolean, properties?: TrackingProperties) => void;
1355
+ trackSignup: (method: string, success: boolean, properties?: TrackingProperties) => void;
1356
+ trackSignOut: () => void;
1357
+ log: (message: string, properties?: TrackingProperties, level?: LogLevel) => void;
1358
+ error: (message: string, properties?: TrackingProperties) => void;
1359
+ warn: (message: string, properties?: TrackingProperties) => void;
1360
+ debug: (message: string, properties?: TrackingProperties) => void;
1361
+ handleErrorAlert: (text: string, exception?: Error, showAlert?: boolean) => void;
1362
+ trackPermission: (kind: PermissionKind, status: PermissionStatus, requested: boolean) => void;
1363
+ updateAppInfo: () => void;
1364
+ }
1365
+
1366
+ export interface NavConfig {
1367
+ url?: string;
1368
+ wrapper?: (component: any) => any;
1369
+ store?: any;
1370
+ provider?: any;
1371
+ }
1372
+
1373
+ export interface ProgressBarProps {
1374
+ color: Color;
1375
+ completed: number;
1376
+ }