@terreno/ui 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (446) hide show
  1. package/LICENSE +203 -0
  2. package/README.md +160 -0
  3. package/dist/Accordion.d.ts +3 -0
  4. package/dist/Accordion.js +30 -0
  5. package/dist/Accordion.js.map +1 -0
  6. package/dist/ActionSheet.d.ts +169 -0
  7. package/dist/ActionSheet.js +637 -0
  8. package/dist/ActionSheet.js.map +1 -0
  9. package/dist/AddressField.d.ts +3 -0
  10. package/dist/AddressField.js +18 -0
  11. package/dist/AddressField.js.map +1 -0
  12. package/dist/Avatar.d.ts +3 -0
  13. package/dist/Avatar.js +189 -0
  14. package/dist/Avatar.js.map +1 -0
  15. package/dist/Badge.d.ts +3 -0
  16. package/dist/Badge.js +100 -0
  17. package/dist/Badge.js.map +1 -0
  18. package/dist/Banner.d.ts +4 -0
  19. package/dist/Banner.js +103 -0
  20. package/dist/Banner.js.map +1 -0
  21. package/dist/Body.d.ts +3 -0
  22. package/dist/Body.js +17 -0
  23. package/dist/Body.js.map +1 -0
  24. package/dist/BooleanField.d.ts +3 -0
  25. package/dist/BooleanField.js +89 -0
  26. package/dist/BooleanField.js.map +1 -0
  27. package/dist/Box.d.ts +3 -0
  28. package/dist/Box.js +289 -0
  29. package/dist/Box.js.map +1 -0
  30. package/dist/Button.d.ts +3 -0
  31. package/dist/Button.js +105 -0
  32. package/dist/Button.js.map +1 -0
  33. package/dist/Card.d.ts +2 -0
  34. package/dist/Card.js +18 -0
  35. package/dist/Card.js.map +1 -0
  36. package/dist/CheckBox.d.ts +3 -0
  37. package/dist/CheckBox.js +28 -0
  38. package/dist/CheckBox.js.map +1 -0
  39. package/dist/Common.d.ts +2325 -0
  40. package/dist/Common.js +47 -0
  41. package/dist/Common.js.map +1 -0
  42. package/dist/CommonIconTypes.d.ts +3 -0
  43. package/dist/CommonIconTypes.js +2 -0
  44. package/dist/CommonIconTypes.js.map +1 -0
  45. package/dist/Constants.d.ts +12685 -0
  46. package/dist/Constants.js +3310 -0
  47. package/dist/Constants.js.map +1 -0
  48. package/dist/CustomSelectField.d.ts +3 -0
  49. package/dist/CustomSelectField.js +59 -0
  50. package/dist/CustomSelectField.js.map +1 -0
  51. package/dist/DataTable.d.ts +3 -0
  52. package/dist/DataTable.js +190 -0
  53. package/dist/DataTable.js.map +1 -0
  54. package/dist/DateTimeActionSheet.d.ts +2 -0
  55. package/dist/DateTimeActionSheet.js +270 -0
  56. package/dist/DateTimeActionSheet.js.map +1 -0
  57. package/dist/DateTimeField.d.ts +3 -0
  58. package/dist/DateTimeField.js +514 -0
  59. package/dist/DateTimeField.js.map +1 -0
  60. package/dist/DateUtilities.d.ts +57 -0
  61. package/dist/DateUtilities.js +308 -0
  62. package/dist/DateUtilities.js.map +1 -0
  63. package/dist/DecimalRangeActionSheet.d.ts +6 -0
  64. package/dist/DecimalRangeActionSheet.js +45 -0
  65. package/dist/DecimalRangeActionSheet.js.map +1 -0
  66. package/dist/DismissButton.d.ts +3 -0
  67. package/dist/DismissButton.js +12 -0
  68. package/dist/DismissButton.js.map +1 -0
  69. package/dist/EmailField.d.ts +3 -0
  70. package/dist/EmailField.js +48 -0
  71. package/dist/EmailField.js.map +1 -0
  72. package/dist/EmojiSelector.d.ts +113 -0
  73. package/dist/EmojiSelector.js +322 -0
  74. package/dist/EmojiSelector.js.map +1 -0
  75. package/dist/ErrorBoundary.d.ts +19 -0
  76. package/dist/ErrorBoundary.js +30 -0
  77. package/dist/ErrorBoundary.js.map +1 -0
  78. package/dist/ErrorPage.d.ts +6 -0
  79. package/dist/ErrorPage.js +15 -0
  80. package/dist/ErrorPage.js.map +1 -0
  81. package/dist/Field.d.ts +3 -0
  82. package/dist/Field.js +80 -0
  83. package/dist/Field.js.map +1 -0
  84. package/dist/FlatList.d.ts +2 -0
  85. package/dist/FlatList.js +3 -0
  86. package/dist/FlatList.js.map +1 -0
  87. package/dist/Heading.d.ts +3 -0
  88. package/dist/Heading.js +43 -0
  89. package/dist/Heading.js.map +1 -0
  90. package/dist/HeightActionSheet.d.ts +11 -0
  91. package/dist/HeightActionSheet.js +46 -0
  92. package/dist/HeightActionSheet.js.map +1 -0
  93. package/dist/Hyperlink.d.ts +30 -0
  94. package/dist/Hyperlink.js +144 -0
  95. package/dist/Hyperlink.js.map +1 -0
  96. package/dist/Icon.d.ts +3 -0
  97. package/dist/Icon.js +15 -0
  98. package/dist/Icon.js.map +1 -0
  99. package/dist/IconButton.d.ts +3 -0
  100. package/dist/IconButton.js +111 -0
  101. package/dist/IconButton.js.map +1 -0
  102. package/dist/Image.d.ts +8 -0
  103. package/dist/Image.js +37 -0
  104. package/dist/Image.js.map +1 -0
  105. package/dist/ImageBackground.d.ts +10 -0
  106. package/dist/ImageBackground.js +9 -0
  107. package/dist/ImageBackground.js.map +1 -0
  108. package/dist/InfoModalIcon.d.ts +3 -0
  109. package/dist/InfoModalIcon.js +10 -0
  110. package/dist/InfoModalIcon.js.map +1 -0
  111. package/dist/InfoTooltipButton.d.ts +3 -0
  112. package/dist/InfoTooltipButton.js +6 -0
  113. package/dist/InfoTooltipButton.js.map +1 -0
  114. package/dist/Link.d.ts +3 -0
  115. package/dist/Link.js +10 -0
  116. package/dist/Link.js.map +1 -0
  117. package/dist/MarkdownView.d.ts +5 -0
  118. package/dist/MarkdownView.js +44 -0
  119. package/dist/MarkdownView.js.map +1 -0
  120. package/dist/MediaQuery.d.ts +4 -0
  121. package/dist/MediaQuery.js +52 -0
  122. package/dist/MediaQuery.js.map +1 -0
  123. package/dist/MobileAddressAutoComplete.d.ts +2 -0
  124. package/dist/MobileAddressAutoComplete.js +54 -0
  125. package/dist/MobileAddressAutoComplete.js.map +1 -0
  126. package/dist/Modal.d.ts +3 -0
  127. package/dist/Modal.js +127 -0
  128. package/dist/Modal.js.map +1 -0
  129. package/dist/ModalSheet.d.ts +6 -0
  130. package/dist/ModalSheet.js +42 -0
  131. package/dist/ModalSheet.js.map +1 -0
  132. package/dist/MultiselectField.d.ts +3 -0
  133. package/dist/MultiselectField.js +45 -0
  134. package/dist/MultiselectField.js.map +1 -0
  135. package/dist/NumberField.d.ts +3 -0
  136. package/dist/NumberField.js +60 -0
  137. package/dist/NumberField.js.map +1 -0
  138. package/dist/NumberPickerActionSheet.d.ts +7 -0
  139. package/dist/NumberPickerActionSheet.js +22 -0
  140. package/dist/NumberPickerActionSheet.js.map +1 -0
  141. package/dist/OpenAPIContext.d.ts +4 -0
  142. package/dist/OpenAPIContext.js +53 -0
  143. package/dist/OpenAPIContext.js.map +1 -0
  144. package/dist/Page.d.ts +7 -0
  145. package/dist/Page.js +24 -0
  146. package/dist/Page.js.map +1 -0
  147. package/dist/Pagination.d.ts +3 -0
  148. package/dist/Pagination.js +106 -0
  149. package/dist/Pagination.js.map +1 -0
  150. package/dist/PasswordField.d.ts +2 -0
  151. package/dist/PasswordField.js +6 -0
  152. package/dist/PasswordField.js.map +1 -0
  153. package/dist/Permissions.d.ts +2 -0
  154. package/dist/Permissions.js +35 -0
  155. package/dist/Permissions.js.map +1 -0
  156. package/dist/PhoneNumberField.d.ts +3 -0
  157. package/dist/PhoneNumberField.js +83 -0
  158. package/dist/PhoneNumberField.js.map +1 -0
  159. package/dist/PickerSelect.d.ts +46 -0
  160. package/dist/PickerSelect.js +306 -0
  161. package/dist/PickerSelect.js.map +1 -0
  162. package/dist/Radio.d.ts +3 -0
  163. package/dist/Radio.js +21 -0
  164. package/dist/Radio.js.map +1 -0
  165. package/dist/RadioField.d.ts +3 -0
  166. package/dist/RadioField.js +16 -0
  167. package/dist/RadioField.js.map +1 -0
  168. package/dist/ScrollView.d.ts +2 -0
  169. package/dist/ScrollView.js +3 -0
  170. package/dist/ScrollView.js.map +1 -0
  171. package/dist/SectionDivider.d.ts +2 -0
  172. package/dist/SectionDivider.js +12 -0
  173. package/dist/SectionDivider.js.map +1 -0
  174. package/dist/SegmentedControl.d.ts +3 -0
  175. package/dist/SegmentedControl.js +65 -0
  176. package/dist/SegmentedControl.js.map +1 -0
  177. package/dist/SelectBadge.d.ts +3 -0
  178. package/dist/SelectBadge.js +166 -0
  179. package/dist/SelectBadge.js.map +1 -0
  180. package/dist/SelectField.d.ts +3 -0
  181. package/dist/SelectField.js +16 -0
  182. package/dist/SelectField.js.map +1 -0
  183. package/dist/SideDrawer.d.ts +3 -0
  184. package/dist/SideDrawer.js +32 -0
  185. package/dist/SideDrawer.js.map +1 -0
  186. package/dist/Signature.d.ts +8 -0
  187. package/dist/Signature.js +21 -0
  188. package/dist/Signature.js.map +1 -0
  189. package/dist/Signature.native.d.ts +8 -0
  190. package/dist/Signature.native.js +26 -0
  191. package/dist/Signature.native.js.map +1 -0
  192. package/dist/SignatureField.d.ts +3 -0
  193. package/dist/SignatureField.js +42 -0
  194. package/dist/SignatureField.js.map +1 -0
  195. package/dist/Slider.d.ts +3 -0
  196. package/dist/Slider.js +78 -0
  197. package/dist/Slider.js.map +1 -0
  198. package/dist/Spinner.d.ts +3 -0
  199. package/dist/Spinner.js +33 -0
  200. package/dist/Spinner.js.map +1 -0
  201. package/dist/SplitPage.d.ts +2 -0
  202. package/dist/SplitPage.js +139 -0
  203. package/dist/SplitPage.js.map +1 -0
  204. package/dist/SplitPage.native.d.ts +2 -0
  205. package/dist/SplitPage.native.js +75 -0
  206. package/dist/SplitPage.native.js.map +1 -0
  207. package/dist/TapToEdit.d.ts +4 -0
  208. package/dist/TapToEdit.js +170 -0
  209. package/dist/TapToEdit.js.map +1 -0
  210. package/dist/TerrenoProvider.d.ts +6 -0
  211. package/dist/TerrenoProvider.js +10 -0
  212. package/dist/TerrenoProvider.js.map +1 -0
  213. package/dist/Text.d.ts +3 -0
  214. package/dist/Text.js +95 -0
  215. package/dist/Text.js.map +1 -0
  216. package/dist/TextArea.d.ts +3 -0
  217. package/dist/TextArea.js +6 -0
  218. package/dist/TextArea.js.map +1 -0
  219. package/dist/TextField.d.ts +3 -0
  220. package/dist/TextField.js +144 -0
  221. package/dist/TextField.js.map +1 -0
  222. package/dist/TextFieldNumberActionSheet.d.ts +7 -0
  223. package/dist/TextFieldNumberActionSheet.js +20 -0
  224. package/dist/TextFieldNumberActionSheet.js.map +1 -0
  225. package/dist/Theme.d.ts +96 -0
  226. package/dist/Theme.js +213 -0
  227. package/dist/Theme.js.map +1 -0
  228. package/dist/TimezonePicker.d.ts +11 -0
  229. package/dist/TimezonePicker.js +27 -0
  230. package/dist/TimezonePicker.js.map +1 -0
  231. package/dist/Toast.d.ts +23 -0
  232. package/dist/Toast.js +157 -0
  233. package/dist/Toast.js.map +1 -0
  234. package/dist/Tooltip.d.ts +3 -0
  235. package/dist/Tooltip.js +289 -0
  236. package/dist/Tooltip.js.map +1 -0
  237. package/dist/UnifiedAddressAutoComplete.d.ts +2 -0
  238. package/dist/UnifiedAddressAutoComplete.js +23 -0
  239. package/dist/UnifiedAddressAutoComplete.js.map +1 -0
  240. package/dist/Unifier.d.ts +43 -0
  241. package/dist/Unifier.js +154 -0
  242. package/dist/Unifier.js.map +1 -0
  243. package/dist/Utilities.d.ts +56 -0
  244. package/dist/Utilities.js +193 -0
  245. package/dist/Utilities.js.map +1 -0
  246. package/dist/WebAddressAutocomplete.d.ts +3 -0
  247. package/dist/WebAddressAutocomplete.js +61 -0
  248. package/dist/WebAddressAutocomplete.js.map +1 -0
  249. package/dist/fieldElements/FieldError.d.ts +6 -0
  250. package/dist/fieldElements/FieldError.js +9 -0
  251. package/dist/fieldElements/FieldError.js.map +1 -0
  252. package/dist/fieldElements/FieldHelperText.d.ts +6 -0
  253. package/dist/fieldElements/FieldHelperText.js +8 -0
  254. package/dist/fieldElements/FieldHelperText.js.map +1 -0
  255. package/dist/fieldElements/FieldTitle.d.ts +6 -0
  256. package/dist/fieldElements/FieldTitle.js +16 -0
  257. package/dist/fieldElements/FieldTitle.js.map +1 -0
  258. package/dist/fieldElements/index.d.ts +3 -0
  259. package/dist/fieldElements/index.js +4 -0
  260. package/dist/fieldElements/index.js.map +1 -0
  261. package/dist/icons/MobileIcon.d.ts +2 -0
  262. package/dist/icons/MobileIcon.js +18 -0
  263. package/dist/icons/MobileIcon.js.map +1 -0
  264. package/dist/icons/OfflineIcon.d.ts +2 -0
  265. package/dist/icons/OfflineIcon.js +18 -0
  266. package/dist/icons/OfflineIcon.js.map +1 -0
  267. package/dist/icons/OnlineIcon.d.ts +2 -0
  268. package/dist/icons/OnlineIcon.js +19 -0
  269. package/dist/icons/OnlineIcon.js.map +1 -0
  270. package/dist/icons/OutOfficeIcon.d.ts +2 -0
  271. package/dist/icons/OutOfficeIcon.js +18 -0
  272. package/dist/icons/OutOfficeIcon.js.map +1 -0
  273. package/dist/icons/index.d.ts +4 -0
  274. package/dist/icons/index.js +5 -0
  275. package/dist/icons/index.js.map +1 -0
  276. package/dist/index.d.ts +1328 -0
  277. package/dist/index.js +89 -0
  278. package/dist/index.js.map +1 -0
  279. package/dist/table/Table.d.ts +3 -0
  280. package/dist/table/Table.js +53 -0
  281. package/dist/table/Table.js.map +1 -0
  282. package/dist/table/TableBadge.d.ts +6 -0
  283. package/dist/table/TableBadge.js +23 -0
  284. package/dist/table/TableBadge.js.map +1 -0
  285. package/dist/table/TableBoolean.d.ts +6 -0
  286. package/dist/table/TableBoolean.js +37 -0
  287. package/dist/table/TableBoolean.js.map +1 -0
  288. package/dist/table/TableDate.d.ts +3 -0
  289. package/dist/table/TableDate.js +27 -0
  290. package/dist/table/TableDate.js.map +1 -0
  291. package/dist/table/TableHeader.d.ts +6 -0
  292. package/dist/table/TableHeader.js +10 -0
  293. package/dist/table/TableHeader.js.map +1 -0
  294. package/dist/table/TableHeaderCell.d.ts +6 -0
  295. package/dist/table/TableHeaderCell.js +54 -0
  296. package/dist/table/TableHeaderCell.js.map +1 -0
  297. package/dist/table/TableIconButton.d.ts +3 -0
  298. package/dist/table/TableIconButton.js +39 -0
  299. package/dist/table/TableIconButton.js.map +1 -0
  300. package/dist/table/TableNumber.d.ts +3 -0
  301. package/dist/table/TableNumber.js +18 -0
  302. package/dist/table/TableNumber.js.map +1 -0
  303. package/dist/table/TableRow.d.ts +6 -0
  304. package/dist/table/TableRow.js +22 -0
  305. package/dist/table/TableRow.js.map +1 -0
  306. package/dist/table/TableText.d.ts +3 -0
  307. package/dist/table/TableText.js +18 -0
  308. package/dist/table/TableText.js.map +1 -0
  309. package/dist/table/TableTitle.d.ts +3 -0
  310. package/dist/table/TableTitle.js +21 -0
  311. package/dist/table/TableTitle.js.map +1 -0
  312. package/dist/table/tableContext.d.ts +5 -0
  313. package/dist/table/tableContext.js +38 -0
  314. package/dist/table/tableContext.js.map +1 -0
  315. package/dist/useStoredState.d.ts +1 -0
  316. package/dist/useStoredState.js +49 -0
  317. package/dist/useStoredState.js.map +1 -0
  318. package/package.json +123 -0
  319. package/src/Accordion.test.tsx +104 -0
  320. package/src/Accordion.tsx +81 -0
  321. package/src/ActionSheet.tsx +881 -0
  322. package/src/AddressField.test.tsx +120 -0
  323. package/src/AddressField.tsx +122 -0
  324. package/src/Avatar.test.tsx +163 -0
  325. package/src/Avatar.tsx +298 -0
  326. package/src/Badge.test.tsx +116 -0
  327. package/src/Badge.tsx +136 -0
  328. package/src/Banner.tsx +200 -0
  329. package/src/Body.tsx +34 -0
  330. package/src/BooleanField.tsx +141 -0
  331. package/src/Box.test.tsx +662 -0
  332. package/src/Box.tsx +368 -0
  333. package/src/Button.tsx +196 -0
  334. package/src/Card.tsx +19 -0
  335. package/src/CheckBox.tsx +45 -0
  336. package/src/Common.ts +2787 -0
  337. package/src/CommonIconTypes.ts +2030 -0
  338. package/src/Constants.ts +3311 -0
  339. package/src/CustomSelectField.tsx +115 -0
  340. package/src/DataTable.tsx +674 -0
  341. package/src/DateTimeActionSheet.tsx +559 -0
  342. package/src/DateTimeField.test.tsx +393 -0
  343. package/src/DateTimeField.tsx +777 -0
  344. package/src/DateUtilities.test.ts +440 -0
  345. package/src/DateUtilities.tsx +370 -0
  346. package/src/DecimalRangeActionSheet.tsx +85 -0
  347. package/src/DismissButton.tsx +31 -0
  348. package/src/EmailField.tsx +66 -0
  349. package/src/EmojiSelector.test.tsx +61 -0
  350. package/src/EmojiSelector.tsx +510 -0
  351. package/src/ErrorBoundary.tsx +37 -0
  352. package/src/ErrorPage.tsx +41 -0
  353. package/src/Field.tsx +101 -0
  354. package/src/FlatList.tsx +2 -0
  355. package/src/Heading.tsx +66 -0
  356. package/src/HeightActionSheet.tsx +91 -0
  357. package/src/Hyperlink.tsx +179 -0
  358. package/src/Icon.tsx +36 -0
  359. package/src/IconButton.tsx +217 -0
  360. package/src/Image.tsx +51 -0
  361. package/src/ImageBackground.tsx +14 -0
  362. package/src/InfoModalIcon.tsx +42 -0
  363. package/src/InfoTooltipButton.tsx +16 -0
  364. package/src/Link.tsx +22 -0
  365. package/src/MarkdownView.tsx +67 -0
  366. package/src/MediaQuery.ts +46 -0
  367. package/src/MobileAddressAutoComplete.tsx +126 -0
  368. package/src/Modal.tsx +300 -0
  369. package/src/ModalSheet.tsx +58 -0
  370. package/src/MultiselectField.tsx +112 -0
  371. package/src/NumberField.tsx +67 -0
  372. package/src/NumberPickerActionSheet.tsx +51 -0
  373. package/src/OpenAPIContext.tsx +74 -0
  374. package/src/Page.tsx +105 -0
  375. package/src/Pagination.tsx +169 -0
  376. package/src/PasswordField.tsx +7 -0
  377. package/src/Permissions.ts +43 -0
  378. package/src/PhoneNumberField.tsx +109 -0
  379. package/src/PickerSelect.tsx +571 -0
  380. package/src/Radio.tsx +33 -0
  381. package/src/RadioField.tsx +43 -0
  382. package/src/ScrollView.tsx +2 -0
  383. package/src/SectionDivider.tsx +18 -0
  384. package/src/SegmentedControl.tsx +126 -0
  385. package/src/SelectBadge.tsx +280 -0
  386. package/src/SelectField.tsx +41 -0
  387. package/src/SideDrawer.tsx +56 -0
  388. package/src/Signature.native.tsx +57 -0
  389. package/src/Signature.tsx +44 -0
  390. package/src/SignatureField.tsx +92 -0
  391. package/src/Slider.tsx +199 -0
  392. package/src/Spinner.tsx +35 -0
  393. package/src/SplitPage.native.tsx +163 -0
  394. package/src/SplitPage.tsx +304 -0
  395. package/src/TapToEdit.tsx +292 -0
  396. package/src/TerrenoProvider.tsx +31 -0
  397. package/src/Text.tsx +123 -0
  398. package/src/TextArea.test.tsx +255 -0
  399. package/src/TextArea.tsx +8 -0
  400. package/src/TextField.test.tsx +487 -0
  401. package/src/TextField.tsx +260 -0
  402. package/src/TextFieldNumberActionSheet.tsx +46 -0
  403. package/src/Theme.tsx +248 -0
  404. package/src/TimezonePicker.tsx +45 -0
  405. package/src/Toast.tsx +234 -0
  406. package/src/Tooltip.tsx +407 -0
  407. package/src/UnifiedAddressAutoComplete.tsx +66 -0
  408. package/src/Unifier.ts +172 -0
  409. package/src/Utilities.tsx +329 -0
  410. package/src/WebAddressAutocomplete.tsx +84 -0
  411. package/src/__snapshots__/Accordion.test.tsx.snap +126 -0
  412. package/src/__snapshots__/AddressField.test.tsx.snap +1197 -0
  413. package/src/__snapshots__/Avatar.test.tsx.snap +57 -0
  414. package/src/__snapshots__/Badge.test.tsx.snap +55 -0
  415. package/src/__snapshots__/Box.test.tsx.snap +162 -0
  416. package/src/__snapshots__/EmojiSelector.test.tsx.snap +422 -0
  417. package/src/__snapshots__/TextArea.test.tsx.snap +521 -0
  418. package/src/__snapshots__/TextField.test.tsx.snap +569 -0
  419. package/src/bunSetup.ts +1235 -0
  420. package/src/fieldElements/FieldError.tsx +24 -0
  421. package/src/fieldElements/FieldHelperText.tsx +20 -0
  422. package/src/fieldElements/FieldTitle.tsx +31 -0
  423. package/src/fieldElements/index.tsx +3 -0
  424. package/src/icons/MobileIcon.tsx +40 -0
  425. package/src/icons/OfflineIcon.tsx +37 -0
  426. package/src/icons/OnlineIcon.tsx +39 -0
  427. package/src/icons/OutOfficeIcon.tsx +36 -0
  428. package/src/icons/index.ts +4 -0
  429. package/src/index.tsx +1375 -0
  430. package/src/polyfill.d.ts +11 -0
  431. package/src/table/Table.tsx +109 -0
  432. package/src/table/TableBadge.tsx +46 -0
  433. package/src/table/TableBoolean.tsx +70 -0
  434. package/src/table/TableDate.tsx +38 -0
  435. package/src/table/TableHeader.tsx +20 -0
  436. package/src/table/TableHeaderCell.tsx +94 -0
  437. package/src/table/TableIconButton.tsx +61 -0
  438. package/src/table/TableNumber.tsx +29 -0
  439. package/src/table/TableRow.tsx +67 -0
  440. package/src/table/TableText.tsx +29 -0
  441. package/src/table/TableTitle.tsx +31 -0
  442. package/src/table/tableContext.tsx +67 -0
  443. package/src/test-utils.tsx +27 -0
  444. package/src/types/react-native-swiper-flatlist.d.ts +56 -0
  445. package/src/useStoredState.test.tsx +143 -0
  446. package/src/useStoredState.ts +56 -0
package/LICENSE ADDED
@@ -0,0 +1,203 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2018 Pinterest Inc.
190
+ Copyright 2020 Josh Gachnang
191
+ Copyright 2022 Flourish Health Inc.
192
+
193
+ Licensed under the Apache License, Version 2.0 (the "License");
194
+ you may not use this file except in compliance with the License.
195
+ You may obtain a copy of the License at
196
+
197
+ http://www.apache.org/licenses/LICENSE-2.0
198
+
199
+ Unless required by applicable law or agreed to in writing, software
200
+ distributed under the License is distributed on an "AS IS" BASIS,
201
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
202
+ See the License for the specific language governing permissions and
203
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,160 @@
1
+ # @terreno/ui
2
+
3
+ [![Netlify Status](https://api.netlify.com/api/v1/badges/ffd05ee5-fbcf-417e-8455-45ea15447361/deploy-status)](https://app.netlify.com/sites/terreno-ui/deploys)
4
+
5
+ ## Why Terreno UI?
6
+ Terreno UI provides a consistent UI for React Native and React Native Web,
7
+ support iOS, Android, and Web all in one simple repo. It has
8
+ theming support and is primarily designed for Expo. It provides an abstraction
9
+ layer over React Native components, making it easier to build responsive
10
+ applications that work across all platforms.
11
+ For example, instead of using ```<div>``` and ```<View>```, you use ```<Box>``` , which
12
+ translates to a flexbox-first layout system.
13
+
14
+ Ideal for designers and developers who value clarity, Terreno UI offers a
15
+ framework for efficient and harmonious designs. Our vision extends beyond a
16
+ User Interface Library to a User Experience Library, including common UX
17
+ patterns like login flows, allowing you to focus on unique aspects of your app.
18
+
19
+ Join us in embracing a design philosophy that prioritizes clarity and
20
+ coherence. With Terreno UI, build stunning applications with seamless
21
+ user experiences across all three platforms is a breeze.
22
+
23
+ ## Our Philosophy
24
+ Terreno UI streamlines design by reducing unnecessary choices, allowing you to
25
+ create beautiful, functional interfaces without distraction. For example,
26
+ buttons come in a limited set of colors, with no options for custom colors,
27
+ ensuring consistency that you decide upfront, rather than with each new
28
+ feature.
29
+
30
+ ## Consistent Layouts
31
+ Our layout system, built around the Box component and other layout elements,
32
+ ensures flexible yet uniform design structures. It's is flexbox-first across
33
+ iOS, Android, and Web, making it easy to create responsive designs that work
34
+ across all platforms.
35
+
36
+ ## Separated Interface Elements
37
+ Terreno UI and interaction components follow a set of guidelines for consistency.
38
+ For instance, you can't add a margin to Text. Instead, you wrap the Text in a
39
+ Box and add the margin to the Box, maintaining a clean and predictable design
40
+ language that separates layout elements from interface and interaction elements.
41
+
42
+ ## Accessibility
43
+ Accessibility is a core principle of Terreno UI. Our components are designed to
44
+ be fully accessible out of the box, following best practices to ensure that
45
+ all users, including those with disabilities, have a seamless experience. Our
46
+ lint rules and required accessibility props will help you build more accessible
47
+ applications by default.
48
+
49
+ ## Developer Experience
50
+ Terreno UI is designed with a TypeScript-first approach, prioritizing an
51
+ excellent developer experience. Our consistent API across all components
52
+ ensures ease of learning and use. This makes it simple to design screens
53
+ that work seamlessly across web and mobile, with built-in support for
54
+ differentiating based on screen size and format.
55
+
56
+ Check out the demo app for easily seeing how the UIs work in iOS/Android/Web
57
+ in apps/demo.
58
+
59
+ You can see the [web demo here](https://terreno-ui.netlify.app)
60
+
61
+ # Installation
62
+
63
+ yarn add @terreno/ui
64
+
65
+ # Usage
66
+
67
+ You must wrap your app in a TerrenoProvider to use the theme, Toasts, and other features.
68
+
69
+ import { TerrenoProvider } from '@terreno/ui';
70
+
71
+ const AppRoot = (): ReactElement => {
72
+ return (
73
+ <SafeAreaProvider>
74
+ <TerrenoProvider>
75
+ <App />
76
+ </TerrenoProvider>
77
+ </SafeAreaProvider>
78
+ );
79
+ };
80
+
81
+ # Cursor Rules
82
+ If you use Cursor or compatible tools, use the rules in .cursor/rules/terreno-ui-usage.md to
83
+ help generate code that uses Terreno UI.
84
+
85
+ ## Dev
86
+
87
+ # Install dependencies
88
+ yarn install
89
+
90
+ # Initial build (including type generation)
91
+ yarn build
92
+
93
+ # Build the UI continuously
94
+ yarn watch
95
+
96
+ # In a separate window, run one of the following to run the demo app:
97
+ yarn web
98
+ yarn ios
99
+ yarn android
100
+
101
+
102
+ ## Dev with other projects
103
+
104
+ If you need to test your changes in another project, you can use this handy bash function:
105
+
106
+ # sync ui to different app
107
+ syncui() {
108
+ cd <PATH>/terreno/packages/ui && yarn build && rsync -avp <PATH>/terreno/packages/ui/dist/* <PATH>/app/node_modules/@terreno/ui/dist/
109
+ }
110
+
111
+ Update the paths to match your project directories. This will build and pack up @terreno/ui like it is being
112
+ send to NPM, then install it from the created tarball in your app. `yarn link` is also an option but React
113
+ Native requires extra configuration to support symlinks.
114
+
115
+ ## Releasing
116
+
117
+ Releases are typically done after each pull request is merged to keep the package up-to-date.
118
+
119
+ ### Publishing a new version
120
+
121
+ 1. Go to the [GitHub releases page](https://github.com/FlourishHealth/terreno/releases)
122
+ 2. Click "Draft a new release"
123
+ 3. Create a new tag with a version number (usually a minor version bump, e.g., `1.11.0`)
124
+ 4. Use the "Generate release notes" button to auto-populate the description
125
+ 5. Click "Publish release"
126
+
127
+ ### What happens automatically
128
+
129
+ After publishing the release, the following happens automatically via `.github/workflows/ui-publish.yml`:
130
+
131
+ 1. The package version in `package.json` is updated to match your release tag
132
+ 2. The package is built and published to NPM (takes a couple of minutes)
133
+ 3. A pull request is automatically created with the version bump
134
+ 4. You'll receive a Slack notification when the release is complete
135
+
136
+ ### Approving the version bump PR
137
+
138
+ After the release is published, you'll get a PR that updates the version in `package.json`. You can approve and merge this PR yourself.
139
+
140
+ ### Using the new version in your app
141
+
142
+ To use your newly released version of @terreno/ui in your app:
143
+
144
+ 1. Navigate to your repository
145
+ 2. Update the `@terreno/ui` version in `app/package.json`:
146
+ ```json
147
+ "@terreno/ui: "1.11.0"
148
+ ```
149
+ 3. Run `bun install` in the `app/` directory
150
+ 4. Create a PR with this change (requires team member approval)
151
+
152
+
153
+ ## Upgrading dependencies
154
+
155
+ To upgrade to the latest Expo and upgrade the related dependencies:
156
+
157
+ yarn upgrades
158
+
159
+ This will upgrade Expo, upgrade Expo packages, sync the changes from apps/demo to packages/ui,
160
+ and update yarn.lock.
@@ -0,0 +1,3 @@
1
+ import { type FC } from "react";
2
+ import type { AccordionProps } from "./Common";
3
+ export declare const Accordion: FC<AccordionProps>;
@@ -0,0 +1,30 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import FontAwesome6 from "@expo/vector-icons/FontAwesome6";
3
+ import { useEffect, useState } from "react";
4
+ import { Pressable, View } from "react-native";
5
+ import { Heading } from "./Heading";
6
+ import { InfoModalIcon } from "./InfoModalIcon";
7
+ import { Text } from "./Text";
8
+ import { useTheme } from "./Theme";
9
+ export const Accordion = ({ children, isCollapsed = false, title, subtitle, includeInfoModal = false, infoModalChildren, infoModalSubtitle, infoModalText, infoModalTitle, onToggle, }) => {
10
+ const { theme } = useTheme();
11
+ const [collapsed, setCollapsed] = useState(false);
12
+ // The external collapse state should override the internal collapse state.
13
+ useEffect(() => {
14
+ setCollapsed(isCollapsed);
15
+ }, [isCollapsed]);
16
+ return (_jsxs(View, { style: {
17
+ borderBottomColor: theme.border.default,
18
+ borderBottomWidth: 2,
19
+ borderTopColor: theme.border.default,
20
+ borderTopWidth: 2,
21
+ padding: 16,
22
+ width: "100%",
23
+ }, children: [_jsxs(View, { style: { alignItems: "center", flexDirection: "row", justifyContent: "space-between" }, children: [_jsxs(View, { style: { flexDirection: "column", gap: 4 }, children: [_jsxs(View, { style: { alignItems: "center", flexDirection: "row" }, children: [_jsx(Heading, { children: title }), includeInfoModal && infoModalTitle && (_jsx(InfoModalIcon, { infoModalChildren: infoModalChildren, infoModalSubtitle: infoModalSubtitle, infoModalText: infoModalText, infoModalTitle: infoModalTitle }))] }), subtitle && _jsx(Text, { children: subtitle })] }), _jsx(View, { children: _jsx(Pressable, { "aria-role": "button", hitSlop: { bottom: 20, left: 20, right: 20, top: 20 }, onPress: () => {
24
+ setCollapsed(!collapsed);
25
+ if (onToggle) {
26
+ onToggle(!collapsed);
27
+ }
28
+ }, testID: "accordion-toggle", children: _jsx(FontAwesome6, { color: theme.text.link, name: collapsed ? "chevron-down" : "chevron-up", selectable: undefined, size: 16 }) }) })] }), collapsed ? null : _jsx(View, { style: { marginTop: 8 }, children: children })] }));
29
+ };
30
+ //# sourceMappingURL=Accordion.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../src/Accordion.tsx"],"names":[],"mappings":"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"}
@@ -0,0 +1,169 @@
1
+ import type React from "react";
2
+ import { Component } from "react";
3
+ import { Animated, type EmitterSubscription, type KeyboardEvent, type LayoutChangeEvent, type NativeScrollEvent, type NativeSyntheticEvent } from "react-native";
4
+ import type { ActionSheetProps } from "./Common";
5
+ export declare const styles: {
6
+ container: {
7
+ alignSelf: "center";
8
+ backgroundColor: string;
9
+ width: "100%";
10
+ };
11
+ indicator: {
12
+ alignSelf: "center";
13
+ backgroundColor: string;
14
+ borderRadius: number;
15
+ height: number;
16
+ marginVertical: number;
17
+ width: number;
18
+ };
19
+ parentContainer: {
20
+ alignItems: "center";
21
+ height: "100%";
22
+ justifyContent: "center";
23
+ width: "100%";
24
+ };
25
+ safearea: {
26
+ left: number;
27
+ position: "absolute";
28
+ top: number;
29
+ };
30
+ scrollView: {
31
+ backgroundColor: string;
32
+ height: "100%";
33
+ width: "100%";
34
+ };
35
+ };
36
+ export declare function getDeviceHeight(statusBarTranslucent: boolean | undefined): number;
37
+ export declare const getElevation: (elevation?: number) => {
38
+ boxShadow?: undefined;
39
+ elevation?: undefined;
40
+ } | {
41
+ boxShadow: string;
42
+ elevation: number;
43
+ };
44
+ export declare const SUPPORTED_ORIENTATIONS: ("portrait" | "portrait-upside-down" | "landscape" | "landscape-left" | "landscape-right")[];
45
+ export declare const waitAsync: (ms: number) => Promise<null>;
46
+ type State = {
47
+ modalVisible: boolean;
48
+ scrollable: boolean;
49
+ layoutHasCalled: boolean;
50
+ keyboard: boolean;
51
+ deviceHeight: number;
52
+ deviceWidth: number;
53
+ portrait: boolean;
54
+ safeAreaInnerHeight: number;
55
+ paddingTop: number;
56
+ };
57
+ declare const defaultProps: {
58
+ animated: boolean;
59
+ bottomOffset: number;
60
+ bounciness: number;
61
+ closable: boolean;
62
+ closeAnimationDuration: number;
63
+ closeOnPressBack: boolean;
64
+ closeOnTouchBackdrop: boolean;
65
+ defaultOverlayOpacity: number;
66
+ delayActionSheetDrawTime: number;
67
+ drawUnderStatusBar: boolean;
68
+ elevation: number;
69
+ extraScroll: number;
70
+ gestureEnabled: boolean;
71
+ indicatorColor: string;
72
+ initialOffsetFromBottom: number;
73
+ keyboardMode: string;
74
+ openAnimationSpeed: number;
75
+ overlayColor: string;
76
+ springOffset: number;
77
+ statusBarTranslucent: boolean;
78
+ };
79
+ type Props = Partial<typeof defaultProps> & ActionSheetProps;
80
+ export declare class ActionSheet extends Component<Props, State, any> {
81
+ static defaultProps: {
82
+ animated: boolean;
83
+ bottomOffset: number;
84
+ bounciness: number;
85
+ closable: boolean;
86
+ closeAnimationDuration: number;
87
+ closeOnPressBack: boolean;
88
+ closeOnTouchBackdrop: boolean;
89
+ defaultOverlayOpacity: number;
90
+ delayActionSheetDrawTime: number;
91
+ drawUnderStatusBar: boolean;
92
+ elevation: number;
93
+ extraScroll: number;
94
+ gestureEnabled: boolean;
95
+ indicatorColor: string;
96
+ initialOffsetFromBottom: number;
97
+ keyboardMode: string;
98
+ openAnimationSpeed: number;
99
+ overlayColor: string;
100
+ springOffset: number;
101
+ statusBarTranslucent: boolean;
102
+ };
103
+ actionSheetHeight: number;
104
+ keyboardDidShowListener: EmitterSubscription | null;
105
+ keyboardDidHideListener: EmitterSubscription | null;
106
+ prevScroll: number;
107
+ timeout: any | null;
108
+ offsetY: number;
109
+ currentOffsetFromBottom: number;
110
+ scrollAnimationEndValue: number;
111
+ hasBounced: boolean;
112
+ layoutHasCalled: boolean;
113
+ isClosing: boolean;
114
+ isRecoiling: boolean;
115
+ isReachedTop: boolean;
116
+ deviceLayoutCalled: boolean;
117
+ scrollViewRef: React.RefObject<any>;
118
+ safeAreaViewRef: React.RefObject<any>;
119
+ transformValue: Animated.Value;
120
+ opacityValue: Animated.Value;
121
+ borderRadius: Animated.Value;
122
+ underlayTranslateY: Animated.Value;
123
+ underlayScale: Animated.Value;
124
+ indicatorTranslateY: Animated.Value;
125
+ constructor(props: ActionSheetProps);
126
+ /**
127
+ * Snap ActionSheet to Offset
128
+ */
129
+ snapToOffset: (offset: number) => void;
130
+ show: () => void;
131
+ hide: () => void;
132
+ /**
133
+ * Open/Close the ActionSheet
134
+ */
135
+ setModalVisible: (visible: boolean) => void;
136
+ _hideAnimation(): void;
137
+ _hideModal: () => void;
138
+ measure: () => Promise<number>;
139
+ _showModal: (event: LayoutChangeEvent) => Promise<void>;
140
+ _openAnimation: (scrollOffset: number) => void;
141
+ _onScrollBegin: () => Promise<void>;
142
+ _onScrollBeginDrag: (event: NativeSyntheticEvent<NativeScrollEvent>) => Promise<void>;
143
+ _applyHeightLimiter(): void;
144
+ _onScrollEnd: (event: NativeSyntheticEvent<NativeScrollEvent>) => Promise<void>;
145
+ updateActionSheetPosition(scrollPosition: number): void;
146
+ _returnToPrevScrollPosition(height: number): void;
147
+ _scrollTo: (y: number, animated?: boolean) => void;
148
+ _onTouchMove: () => void;
149
+ _onTouchStart: () => void;
150
+ _onTouchEnd: () => void;
151
+ _onScroll: (event: NativeSyntheticEvent<NativeScrollEvent>) => void;
152
+ _onRequestClose: () => void;
153
+ _onTouchBackdrop: () => void;
154
+ componentDidMount(): void;
155
+ _onKeyboardShow: (event: KeyboardEvent) => void;
156
+ /**
157
+ * Attach this to any child ScrollView Component's onScrollEndDrag,
158
+ * onMomentumScrollEnd,onScrollAnimationEnd callbacks to handle the ActionSheet
159
+ * closing and bouncing back properly.
160
+ */
161
+ handleChildScrollEnd: () => Promise<void>;
162
+ _onKeyboardHide: () => void;
163
+ componentWillUnmount(): void;
164
+ _onDeviceLayout: (_event: any) => Promise<void>;
165
+ getInitialScrollPosition(): number;
166
+ _keyExtractor: (item: any) => any;
167
+ render(): import("react/jsx-runtime").JSX.Element;
168
+ }
169
+ export {};