ferns-ui 0.47.10 → 1.0.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 (402) hide show
  1. package/dist/Accordion.d.ts +3 -0
  2. package/dist/Accordion.js +38 -0
  3. package/dist/Accordion.js.map +1 -0
  4. package/dist/ActionSheet.d.ts +9 -10
  5. package/dist/ActionSheet.js +8 -6
  6. package/dist/ActionSheet.js.map +1 -1
  7. package/dist/AddressField.d.ts +3 -0
  8. package/dist/AddressField.js +33 -0
  9. package/dist/AddressField.js.map +1 -0
  10. package/dist/Avatar.d.ts +2 -2
  11. package/dist/Avatar.js +132 -96
  12. package/dist/Avatar.js.map +1 -1
  13. package/dist/Badge.d.ts +1 -1
  14. package/dist/Badge.js +95 -20
  15. package/dist/Badge.js.map +1 -1
  16. package/dist/Banner.d.ts +1 -1
  17. package/dist/Banner.js +89 -51
  18. package/dist/Banner.js.map +1 -1
  19. package/dist/Body.js +4 -4
  20. package/dist/Body.js.map +1 -1
  21. package/dist/BooleanField.d.ts +3 -0
  22. package/dist/BooleanField.js +90 -0
  23. package/dist/BooleanField.js.map +1 -0
  24. package/dist/Box.js +80 -80
  25. package/dist/Box.js.map +1 -1
  26. package/dist/Button.d.ts +2 -2
  27. package/dist/Button.js +87 -109
  28. package/dist/Button.js.map +1 -1
  29. package/dist/Card.js +2 -2
  30. package/dist/Card.js.map +1 -1
  31. package/dist/CheckBox.d.ts +2 -2
  32. package/dist/CheckBox.js +23 -35
  33. package/dist/CheckBox.js.map +1 -1
  34. package/dist/Common.d.ts +1129 -413
  35. package/dist/Common.js +39 -3
  36. package/dist/Common.js.map +1 -1
  37. package/dist/CommonIconTypes.d.ts +3 -0
  38. package/dist/CommonIconTypes.js +2 -0
  39. package/dist/CommonIconTypes.js.map +1 -0
  40. package/dist/CustomSelectField.d.ts +3 -0
  41. package/dist/CustomSelectField.js +64 -0
  42. package/dist/CustomSelectField.js.map +1 -0
  43. package/dist/DateTimeActionSheet.d.ts +1 -1
  44. package/dist/DateTimeActionSheet.js +170 -158
  45. package/dist/DateTimeActionSheet.js.map +1 -1
  46. package/dist/DateTimeField.d.ts +3 -3
  47. package/dist/DateTimeField.js +140 -30
  48. package/dist/DateTimeField.js.map +1 -1
  49. package/dist/DateUtilities.js.map +1 -1
  50. package/dist/DateUtilities.test.js +2 -1
  51. package/dist/DateUtilities.test.js.map +1 -1
  52. package/dist/DecimalRangeActionSheet.js +3 -15
  53. package/dist/DecimalRangeActionSheet.js.map +1 -1
  54. package/dist/DismissButton.d.ts +3 -0
  55. package/dist/DismissButton.js +14 -0
  56. package/dist/DismissButton.js.map +1 -0
  57. package/dist/EmailField.d.ts +3 -0
  58. package/dist/EmailField.js +52 -0
  59. package/dist/EmailField.js.map +1 -0
  60. package/dist/ErrorBoundary.d.ts +1 -1
  61. package/dist/ErrorPage.js +2 -2
  62. package/dist/ErrorPage.js.map +1 -1
  63. package/dist/FernsProvider.js +1 -1
  64. package/dist/FernsProvider.js.map +1 -1
  65. package/dist/Field.d.ts +2 -2
  66. package/dist/Field.js +67 -136
  67. package/dist/Field.js.map +1 -1
  68. package/dist/Heading.js +37 -16
  69. package/dist/Heading.js.map +1 -1
  70. package/dist/HeightActionSheet.js +3 -7
  71. package/dist/HeightActionSheet.js.map +1 -1
  72. package/dist/Hyperlink.js +7 -1
  73. package/dist/Hyperlink.js.map +1 -1
  74. package/dist/Icon.d.ts +1 -2
  75. package/dist/Icon.js +8 -10
  76. package/dist/Icon.js.map +1 -1
  77. package/dist/IconButton.d.ts +2 -2
  78. package/dist/IconButton.js +93 -92
  79. package/dist/IconButton.js.map +1 -1
  80. package/dist/InfoTooltipButton.d.ts +1 -1
  81. package/dist/InfoTooltipButton.js +2 -2
  82. package/dist/InfoTooltipButton.js.map +1 -1
  83. package/dist/Link.d.ts +1 -1
  84. package/dist/Link.js +7 -3
  85. package/dist/Link.js.map +1 -1
  86. package/dist/MobileAddressAutoComplete.js +8 -8
  87. package/dist/MobileAddressAutoComplete.js.map +1 -1
  88. package/dist/Modal.d.ts +2 -2
  89. package/dist/Modal.js +95 -80
  90. package/dist/Modal.js.map +1 -1
  91. package/dist/MultiselectField.d.ts +3 -0
  92. package/dist/MultiselectField.js +49 -0
  93. package/dist/MultiselectField.js.map +1 -0
  94. package/dist/NumberField.d.ts +3 -0
  95. package/dist/NumberField.js +49 -0
  96. package/dist/NumberField.js.map +1 -0
  97. package/dist/NumberPickerActionSheet.js +2 -2
  98. package/dist/NumberPickerActionSheet.js.map +1 -1
  99. package/dist/OpenAPIContext.js.map +1 -1
  100. package/dist/Page.js +6 -6
  101. package/dist/Page.js.map +1 -1
  102. package/dist/Pagination.d.ts +2 -8
  103. package/dist/Pagination.js +107 -13
  104. package/dist/Pagination.js.map +1 -1
  105. package/dist/PasswordField.d.ts +2 -0
  106. package/dist/PasswordField.js +6 -0
  107. package/dist/PasswordField.js.map +1 -0
  108. package/dist/PhoneNumberField.d.ts +3 -0
  109. package/dist/PhoneNumberField.js +79 -0
  110. package/dist/PhoneNumberField.js.map +1 -0
  111. package/dist/PickerSelect.d.ts +6 -67
  112. package/dist/PickerSelect.js +145 -115
  113. package/dist/PickerSelect.js.map +1 -1
  114. package/dist/Radio.d.ts +3 -0
  115. package/dist/Radio.js +21 -0
  116. package/dist/Radio.js.map +1 -0
  117. package/dist/RadioField.d.ts +3 -0
  118. package/dist/RadioField.js +22 -0
  119. package/dist/RadioField.js.map +1 -0
  120. package/dist/SegmentedControl.d.ts +1 -1
  121. package/dist/SegmentedControl.js +37 -68
  122. package/dist/SegmentedControl.js.map +1 -1
  123. package/dist/SelectField.d.ts +3 -0
  124. package/dist/SelectField.js +20 -0
  125. package/dist/SelectField.js.map +1 -0
  126. package/dist/SideDrawer.js +8 -2
  127. package/dist/SideDrawer.js.map +1 -1
  128. package/dist/Signature.d.ts +1 -0
  129. package/dist/Signature.js +8 -7
  130. package/dist/Signature.js.map +1 -1
  131. package/dist/Signature.native.js +8 -7
  132. package/dist/Signature.native.js.map +1 -1
  133. package/dist/SignatureField.d.ts +3 -0
  134. package/dist/SignatureField.js +54 -0
  135. package/dist/SignatureField.js.map +1 -0
  136. package/dist/Spinner.js +17 -2
  137. package/dist/Spinner.js.map +1 -1
  138. package/dist/SplitPage.d.ts +1 -1
  139. package/dist/SplitPage.js +10 -10
  140. package/dist/SplitPage.js.map +1 -1
  141. package/dist/SplitPage.native.js +7 -7
  142. package/dist/SplitPage.native.js.map +1 -1
  143. package/dist/TapToEdit.d.ts +3 -3
  144. package/dist/TapToEdit.js +64 -59
  145. package/dist/TapToEdit.js.map +1 -1
  146. package/dist/Text.d.ts +1 -1
  147. package/dist/Text.js +70 -64
  148. package/dist/Text.js.map +1 -1
  149. package/dist/TextArea.d.ts +1 -1
  150. package/dist/TextArea.js +2 -14
  151. package/dist/TextArea.js.map +1 -1
  152. package/dist/TextField.d.ts +2 -2
  153. package/dist/TextField.js +89 -206
  154. package/dist/TextField.js.map +1 -1
  155. package/dist/TextFieldNumberActionSheet.js +2 -2
  156. package/dist/TextFieldNumberActionSheet.js.map +1 -1
  157. package/dist/Theme.d.ts +87 -3
  158. package/dist/Theme.js +197 -98
  159. package/dist/Theme.js.map +1 -1
  160. package/dist/TimezonePicker.js +3 -5
  161. package/dist/TimezonePicker.js.map +1 -1
  162. package/dist/Toast.d.ts +18 -5
  163. package/dist/Toast.js +130 -31
  164. package/dist/Toast.js.map +1 -1
  165. package/dist/Tooltip.d.ts +2 -2
  166. package/dist/Tooltip.js +177 -80
  167. package/dist/Tooltip.js.map +1 -1
  168. package/dist/UnifiedAddressAutoComplete.js +2 -2
  169. package/dist/UnifiedAddressAutoComplete.js.map +1 -1
  170. package/dist/Unifier.js.map +1 -1
  171. package/dist/Utilities.js +5 -3
  172. package/dist/Utilities.js.map +1 -1
  173. package/dist/WebAddressAutocomplete.js +2 -2
  174. package/dist/WebAddressAutocomplete.js.map +1 -1
  175. package/dist/fieldElements/FieldError.d.ts +6 -0
  176. package/dist/fieldElements/FieldError.js +14 -0
  177. package/dist/fieldElements/FieldError.js.map +1 -0
  178. package/dist/fieldElements/FieldHelperText.d.ts +6 -0
  179. package/dist/fieldElements/FieldHelperText.js +11 -0
  180. package/dist/fieldElements/FieldHelperText.js.map +1 -0
  181. package/dist/fieldElements/FieldTitle.d.ts +6 -0
  182. package/dist/fieldElements/FieldTitle.js +19 -0
  183. package/dist/fieldElements/FieldTitle.js.map +1 -0
  184. package/dist/fieldElements/index.d.ts +3 -0
  185. package/dist/fieldElements/index.js +4 -0
  186. package/dist/fieldElements/index.js.map +1 -0
  187. package/dist/icons/MobileIcon.d.ts +3 -0
  188. package/dist/icons/MobileIcon.js +24 -0
  189. package/dist/icons/MobileIcon.js.map +1 -0
  190. package/dist/icons/OfflineIcon.d.ts +3 -0
  191. package/dist/icons/OfflineIcon.js +23 -0
  192. package/dist/icons/OfflineIcon.js.map +1 -0
  193. package/dist/icons/OnlineIcon.d.ts +3 -0
  194. package/dist/icons/OnlineIcon.js +24 -0
  195. package/dist/icons/OnlineIcon.js.map +1 -0
  196. package/dist/icons/OutOfficeIcon.d.ts +3 -0
  197. package/dist/icons/OutOfficeIcon.js +24 -0
  198. package/dist/icons/OutOfficeIcon.js.map +1 -0
  199. package/dist/icons/index.d.ts +4 -0
  200. package/dist/icons/index.js +5 -0
  201. package/dist/icons/index.js.map +1 -0
  202. package/dist/index.d.ts +28 -14
  203. package/dist/index.js +28 -14
  204. package/dist/index.js.map +1 -1
  205. package/dist/setupTests.d.ts +1 -0
  206. package/dist/setupTests.js +1 -1
  207. package/dist/setupTests.js.map +1 -1
  208. package/dist/{Table.d.ts → table/Table.d.ts} +2 -2
  209. package/dist/{Table.js → table/Table.js} +18 -10
  210. package/dist/table/Table.js.map +1 -0
  211. package/dist/table/TableBadge.d.ts +6 -0
  212. package/dist/table/TableBadge.js +22 -0
  213. package/dist/table/TableBadge.js.map +1 -0
  214. package/dist/table/TableBoolean.d.ts +6 -0
  215. package/dist/table/TableBoolean.js +39 -0
  216. package/dist/table/TableBoolean.js.map +1 -0
  217. package/dist/table/TableDate.d.ts +3 -0
  218. package/dist/table/TableDate.js +26 -0
  219. package/dist/table/TableDate.js.map +1 -0
  220. package/dist/{TableHeader.d.ts → table/TableHeader.d.ts} +1 -1
  221. package/dist/{TableHeader.js → table/TableHeader.js} +2 -2
  222. package/dist/table/TableHeader.js.map +1 -0
  223. package/dist/{TableHeaderCell.d.ts → table/TableHeaderCell.d.ts} +2 -2
  224. package/dist/table/TableHeaderCell.js +58 -0
  225. package/dist/table/TableHeaderCell.js.map +1 -0
  226. package/dist/table/TableIconButton.d.ts +3 -0
  227. package/dist/table/TableIconButton.js +42 -0
  228. package/dist/table/TableIconButton.js.map +1 -0
  229. package/dist/table/TableNumber.d.ts +3 -0
  230. package/dist/table/TableNumber.js +18 -0
  231. package/dist/table/TableNumber.js.map +1 -0
  232. package/dist/{TableRow.d.ts → table/TableRow.d.ts} +1 -1
  233. package/dist/table/TableRow.js +28 -0
  234. package/dist/table/TableRow.js.map +1 -0
  235. package/dist/table/TableText.d.ts +3 -0
  236. package/dist/table/TableText.js +18 -0
  237. package/dist/table/TableText.js.map +1 -0
  238. package/dist/table/TableTitle.d.ts +3 -0
  239. package/dist/table/TableTitle.js +22 -0
  240. package/dist/table/TableTitle.js.map +1 -0
  241. package/dist/{tableContext.d.ts → table/tableContext.d.ts} +1 -1
  242. package/dist/table/tableContext.js.map +1 -0
  243. package/package.json +10 -4
  244. package/src/Accordion.tsx +92 -0
  245. package/src/ActionSheet.tsx +8 -5
  246. package/src/AddressField.tsx +122 -0
  247. package/src/Avatar.tsx +193 -147
  248. package/src/Badge.tsx +117 -49
  249. package/src/Banner.tsx +158 -111
  250. package/src/Body.tsx +4 -4
  251. package/src/BooleanField.tsx +122 -0
  252. package/src/Box.tsx +92 -82
  253. package/src/Button.tsx +151 -167
  254. package/src/Card.tsx +2 -2
  255. package/src/CheckBox.tsx +30 -111
  256. package/src/Common.ts +1380 -2059
  257. package/src/CommonIconTypes.ts +2030 -0
  258. package/src/CustomSelectField.tsx +116 -0
  259. package/src/DateTimeActionSheet.tsx +341 -259
  260. package/src/DateTimeField.tsx +168 -61
  261. package/src/DateUtilities.test.ts +6 -2
  262. package/src/DateUtilities.tsx +1 -1
  263. package/src/DecimalRangeActionSheet.tsx +2 -17
  264. package/src/DismissButton.tsx +31 -0
  265. package/src/EmailField.tsx +70 -0
  266. package/src/ErrorPage.tsx +2 -2
  267. package/src/FernsProvider.tsx +1 -1
  268. package/src/Field.tsx +83 -345
  269. package/src/Heading.tsx +44 -16
  270. package/src/HeightActionSheet.tsx +2 -9
  271. package/src/Hyperlink.tsx +8 -1
  272. package/src/Icon.tsx +22 -14
  273. package/src/IconButton.tsx +188 -156
  274. package/src/InfoTooltipButton.tsx +4 -6
  275. package/src/Link.tsx +14 -5
  276. package/src/MobileAddressAutoComplete.tsx +17 -13
  277. package/src/Modal.tsx +214 -190
  278. package/src/MultiselectField.tsx +103 -0
  279. package/src/NumberField.tsx +55 -0
  280. package/src/NumberPickerActionSheet.tsx +1 -4
  281. package/src/OpenAPIContext.tsx +1 -1
  282. package/src/Page.tsx +9 -13
  283. package/src/Pagination.tsx +171 -36
  284. package/src/PasswordField.tsx +7 -0
  285. package/src/PhoneNumberField.tsx +103 -0
  286. package/src/PickerSelect.tsx +169 -151
  287. package/src/Radio.tsx +33 -0
  288. package/src/RadioField.tsx +43 -0
  289. package/src/SegmentedControl.tsx +46 -97
  290. package/src/SelectField.tsx +41 -0
  291. package/src/SideDrawer.tsx +8 -2
  292. package/src/Signature.native.tsx +16 -9
  293. package/src/Signature.tsx +19 -11
  294. package/src/SignatureField.tsx +92 -0
  295. package/src/Spinner.tsx +16 -2
  296. package/src/SplitPage.native.tsx +9 -7
  297. package/src/SplitPage.tsx +11 -12
  298. package/src/TapToEdit.tsx +122 -109
  299. package/src/Text.tsx +79 -69
  300. package/src/TextArea.tsx +2 -2
  301. package/src/TextField.tsx +133 -285
  302. package/src/TextFieldNumberActionSheet.tsx +1 -4
  303. package/src/Theme.tsx +223 -172
  304. package/src/TimezonePicker.tsx +3 -18
  305. package/src/Toast.tsx +193 -70
  306. package/src/Tooltip.tsx +233 -122
  307. package/src/UnifiedAddressAutoComplete.tsx +3 -3
  308. package/src/Unifier.ts +4 -4
  309. package/src/Utilities.tsx +11 -3
  310. package/src/WebAddressAutocomplete.tsx +2 -3
  311. package/src/fieldElements/FieldError.tsx +24 -0
  312. package/src/fieldElements/FieldHelperText.tsx +20 -0
  313. package/src/fieldElements/FieldTitle.tsx +31 -0
  314. package/src/fieldElements/index.tsx +3 -0
  315. package/src/icons/MobileIcon.tsx +41 -0
  316. package/src/icons/OfflineIcon.tsx +38 -0
  317. package/src/icons/OnlineIcon.tsx +40 -0
  318. package/src/icons/OutOfficeIcon.tsx +37 -0
  319. package/src/icons/index.ts +4 -0
  320. package/src/index.tsx +28 -14
  321. package/src/setupTests.ts +1 -0
  322. package/src/{Table.tsx → table/Table.tsx} +24 -14
  323. package/src/table/TableBadge.tsx +46 -0
  324. package/src/table/TableBoolean.tsx +70 -0
  325. package/src/table/TableDate.tsx +38 -0
  326. package/src/{TableHeader.tsx → table/TableHeader.tsx} +3 -3
  327. package/src/table/TableHeaderCell.tsx +93 -0
  328. package/src/table/TableIconButton.tsx +62 -0
  329. package/src/table/TableNumber.tsx +29 -0
  330. package/src/{TableRow.tsx → table/TableRow.tsx} +28 -25
  331. package/src/table/TableText.tsx +29 -0
  332. package/src/table/TableTitle.tsx +32 -0
  333. package/src/{tableContext.tsx → table/tableContext.tsx} +1 -1
  334. package/dist/BlurBox.d.ts +0 -5
  335. package/dist/BlurBox.js +0 -28
  336. package/dist/BlurBox.js.map +0 -1
  337. package/dist/BlurBox.native.d.ts +0 -6
  338. package/dist/BlurBox.native.js +0 -30
  339. package/dist/BlurBox.native.js.map +0 -1
  340. package/dist/CustomSelect.d.ts +0 -3
  341. package/dist/CustomSelect.js +0 -47
  342. package/dist/CustomSelect.js.map +0 -1
  343. package/dist/DateTimeField.android.d.ts +0 -3
  344. package/dist/DateTimeField.android.js +0 -67
  345. package/dist/DateTimeField.android.js.map +0 -1
  346. package/dist/DateTimeField.ios.d.ts +0 -3
  347. package/dist/DateTimeField.ios.js +0 -49
  348. package/dist/DateTimeField.ios.js.map +0 -1
  349. package/dist/FieldWithLabels.d.ts +0 -3
  350. package/dist/FieldWithLabels.js +0 -8
  351. package/dist/FieldWithLabels.js.map +0 -1
  352. package/dist/Form.d.ts +0 -16
  353. package/dist/Form.js +0 -89
  354. package/dist/Form.js.map +0 -1
  355. package/dist/HeaderButtons.d.ts +0 -31
  356. package/dist/HeaderButtons.js +0 -53
  357. package/dist/HeaderButtons.js.map +0 -1
  358. package/dist/Mask.d.ts +0 -2
  359. package/dist/Mask.js +0 -19
  360. package/dist/Mask.js.map +0 -1
  361. package/dist/Pill.d.ts +0 -3
  362. package/dist/Pill.js +0 -8
  363. package/dist/Pill.js.map +0 -1
  364. package/dist/Pog.d.ts +0 -3
  365. package/dist/Pog.js +0 -48
  366. package/dist/Pog.js.map +0 -1
  367. package/dist/ProgressBar.d.ts +0 -3
  368. package/dist/ProgressBar.js +0 -35
  369. package/dist/ProgressBar.js.map +0 -1
  370. package/dist/SelectList.d.ts +0 -27
  371. package/dist/SelectList.js +0 -56
  372. package/dist/SelectList.js.map +0 -1
  373. package/dist/Switch.d.ts +0 -3
  374. package/dist/Switch.js +0 -20
  375. package/dist/Switch.js.map +0 -1
  376. package/dist/Table.js.map +0 -1
  377. package/dist/TableHeader.js.map +0 -1
  378. package/dist/TableHeaderCell.js +0 -36
  379. package/dist/TableHeaderCell.js.map +0 -1
  380. package/dist/TableRow.js +0 -30
  381. package/dist/TableRow.js.map +0 -1
  382. package/dist/WithLabel.d.ts +0 -3
  383. package/dist/WithLabel.js +0 -15
  384. package/dist/WithLabel.js.map +0 -1
  385. package/dist/tableContext.js.map +0 -1
  386. package/src/BlurBox.native.tsx +0 -40
  387. package/src/BlurBox.tsx +0 -31
  388. package/src/CustomSelect.tsx +0 -80
  389. package/src/DateTimeField.android.tsx +0 -103
  390. package/src/DateTimeField.ios.tsx +0 -85
  391. package/src/FieldWithLabels.tsx +0 -36
  392. package/src/Form.tsx +0 -175
  393. package/src/HeaderButtons.tsx +0 -107
  394. package/src/Mask.tsx +0 -21
  395. package/src/Pill.tsx +0 -22
  396. package/src/Pog.tsx +0 -75
  397. package/src/ProgressBar.tsx +0 -47
  398. package/src/SelectList.tsx +0 -109
  399. package/src/Switch.tsx +0 -18
  400. package/src/TableHeaderCell.tsx +0 -72
  401. package/src/WithLabel.tsx +0 -45
  402. /package/dist/{tableContext.js → table/tableContext.js} +0 -0
@@ -0,0 +1,41 @@
1
+ import * as React from "react";
2
+ import Svg, {Path} from "react-native-svg";
3
+
4
+ import {CustomSvgProps} from "../Common";
5
+
6
+ export const MobileIcon = ({doNotDisturb, ...props}: CustomSvgProps) => {
7
+ return (
8
+ <Svg fill="none" height={33} viewBox="0 0 33 45" width={30} {...props}>
9
+ <Path d="M3 7h24v35H3z" fill="#fff" />
10
+ <Path
11
+ d="M8.864 5.5A5.867 5.867 0 0 0 3 11.364v26.182a5.867 5.867 0 0 0 5.864 5.863h15.272A5.867 5.867 0 0 0 30 37.546V11.364A5.867 5.867 0 0 0 24.136 5.5H8.864Zm1.5 7.364h12.272v18.818H10.364V12.864Z"
12
+ fill="#3EA45C"
13
+ stroke="#fff"
14
+ strokeWidth={3}
15
+ />
16
+ <Path
17
+ d="M14.622 37.249h3.768a.789.582 0 0 1 .789.582.789.582 0 0 1-.789.581h-3.779a.789.582 0 0 1-.789-.581.8.582 0 0 1 .8-.582Z"
18
+ fill="#fff"
19
+ stroke="#fff"
20
+ />
21
+ {doNotDisturb && (
22
+ <>
23
+ <Path
24
+ d="M21 4h8l-8 6.857h8"
25
+ stroke="#fff"
26
+ strokeLinecap="round"
27
+ strokeLinejoin="round"
28
+ strokeWidth={8}
29
+ />
30
+ <Path
31
+ d="M21 4h8l-8 6.857h8"
32
+ stroke="#3EA45C"
33
+ strokeLinecap="round"
34
+ strokeLinejoin="round"
35
+ strokeWidth={3}
36
+ />
37
+ </>
38
+ )}
39
+ </Svg>
40
+ );
41
+ };
@@ -0,0 +1,38 @@
1
+ import * as React from "react";
2
+ import Svg, {Path} from "react-native-svg";
3
+
4
+ import {CustomSvgProps} from "../Common";
5
+ export const OfflineIcon = ({doNotDisturb, ...props}: CustomSvgProps) => (
6
+ <Svg fill="none" height={33} width={30} {...props}>
7
+ <Path
8
+ d="M28.5 18c0 7.456-6.044 13.5-13.5 13.5S1.5 25.456 1.5 18 7.544 4.5 15 4.5 28.5 10.544 28.5 18Z"
9
+ fill="#2B6072"
10
+ stroke="#fff"
11
+ strokeWidth={3}
12
+ />
13
+ <Path
14
+ d="M24.5 18a9.5 9.5 0 1 1-19 0 9.5 9.5 0 0 1 19 0Z"
15
+ fill="#fff"
16
+ stroke="#9A9A9A"
17
+ strokeWidth={5}
18
+ />
19
+ {doNotDisturb && (
20
+ <>
21
+ <Path
22
+ d="M18 4h8l-8 6.857h8"
23
+ stroke="#fff"
24
+ strokeLinecap="round"
25
+ strokeLinejoin="round"
26
+ strokeWidth={8}
27
+ />
28
+ <Path
29
+ d="M18 4h8l-8 6.857h8"
30
+ stroke="#9A9A9A"
31
+ strokeLinecap="round"
32
+ strokeLinejoin="round"
33
+ strokeWidth={3}
34
+ />
35
+ </>
36
+ )}
37
+ </Svg>
38
+ );
@@ -0,0 +1,40 @@
1
+ // Generated with https://react-svgr.com/playground/?native=true&typescript=true
2
+
3
+ import * as React from "react";
4
+ import Svg, {Path} from "react-native-svg";
5
+
6
+ import {CustomSvgProps} from "../Common";
7
+
8
+ export const OnlineIcon = ({doNotDisturb, ...props}: CustomSvgProps) => {
9
+ return (
10
+ <Svg fill="none" height="33" width="30" {...props}>
11
+ <Path
12
+ d="M28.5 18c0 7.456-6.044 13.5-13.5 13.5S1.5 25.456 1.5 18 7.544 4.5 15 4.5 28.5 10.544 28.5 18Z"
13
+ fill="#fff"
14
+ stroke="#fff"
15
+ />
16
+ <Path
17
+ d="M26 18c0 6.075-4.925 11-11 11S4 24.075 4 18 8.925 7 15 7s11 4.925 11 11Z"
18
+ fill="#3EA45C"
19
+ />
20
+ {doNotDisturb && (
21
+ <>
22
+ <Path
23
+ d="M18 4h8l-8 6.857h8"
24
+ stroke="#fff"
25
+ strokeLinecap="round"
26
+ strokeLinejoin="round"
27
+ strokeWidth={8}
28
+ />
29
+ <Path
30
+ d="M18 4h8l-8 6.857h8"
31
+ stroke="#3EA45C"
32
+ strokeLinecap="round"
33
+ strokeLinejoin="round"
34
+ strokeWidth={3}
35
+ />
36
+ </>
37
+ )}
38
+ </Svg>
39
+ );
40
+ };
@@ -0,0 +1,37 @@
1
+ import * as React from "react";
2
+ import Svg, {Path} from "react-native-svg";
3
+
4
+ import {CustomSvgProps} from "../Common";
5
+ export const OutOfOfficeIcon = ({doNotDisturb, ...props}: CustomSvgProps) => (
6
+ <Svg fill="none" height={33} width={30} {...props}>
7
+ <Path
8
+ d="M28.5 18c0 7.456-6.044 13.5-13.5 13.5S1.5 25.456 1.5 18 7.544 4.5 15 4.5 28.5 10.544 28.5 18Z"
9
+ fill="#fff"
10
+ stroke="#fff"
11
+ strokeWidth={3}
12
+ />
13
+ <Path
14
+ d="M26 18c0 6.075-4.925 11-11 11S4 24.075 4 18 8.925 7 15 7s11 4.925 11 11Z"
15
+ fill="#D33232"
16
+ />
17
+ <Path d="M9 18h12" stroke="#fff" strokeLinecap="round" strokeWidth={4} />
18
+ {doNotDisturb && (
19
+ <>
20
+ <Path
21
+ d="M18 4h8l-8 6.857h8"
22
+ stroke="#fff"
23
+ strokeLinecap="round"
24
+ strokeLinejoin="round"
25
+ strokeWidth={8}
26
+ />
27
+ <Path
28
+ d="M18 4h8l-8 6.857h8"
29
+ stroke="#D33232"
30
+ strokeLinecap="round"
31
+ strokeLinejoin="round"
32
+ strokeWidth={3}
33
+ />
34
+ </>
35
+ )}
36
+ </Svg>
37
+ );
@@ -0,0 +1,4 @@
1
+ export * from "./MobileIcon";
2
+ export * from "./OfflineIcon";
3
+ export * from "./OnlineIcon";
4
+ export * from "./OutOfficeIcon";
package/src/index.tsx CHANGED
@@ -1,26 +1,29 @@
1
+ export * from "./Accordion";
1
2
  export * from "./ActionSheet";
3
+ export * from "./AddressField";
2
4
  export * from "./Avatar";
3
5
  export * from "./Badge";
4
6
  export * from "./Banner";
5
- export * from "./BlurBox";
6
7
  export * from "./Body";
8
+ export * from "./BooleanField";
7
9
  export * from "./Box";
8
10
  export * from "./Button";
9
11
  export * from "./Card";
10
12
  export * from "./CheckBox";
11
13
  export * from "./Common";
12
14
  export * from "./Constants";
15
+ export * from "./CustomSelectField";
13
16
  export * from "./DateTimeActionSheet";
14
17
  export * from "./DateTimeField";
15
18
  export * from "./DateUtilities";
16
19
  export * from "./DecimalRangeActionSheet";
20
+ export * from "./DismissButton";
21
+ export * from "./EmailField";
17
22
  export * from "./ErrorBoundary";
18
23
  export * from "./ErrorPage";
19
24
  export * from "./FernsProvider";
20
25
  export * from "./Field";
21
26
  export * from "./FlatList";
22
- export * from "./Form";
23
- export * from "./HeaderButtons";
24
27
  export * from "./Heading";
25
28
  export * from "./HeightActionSheet";
26
29
  export * from "./Icon";
@@ -29,29 +32,41 @@ export * from "./Image";
29
32
  export * from "./ImageBackground";
30
33
  export * from "./InfoTooltipButton";
31
34
  export * from "./Link";
32
- export * from "./Mask";
33
35
  export * from "./MediaQuery";
34
36
  export * from "./MobileAddressAutoComplete";
35
37
  export * from "./Modal";
36
38
  export * from "./ModalSheet";
39
+ export * from "./MultiselectField";
40
+ export * from "./NumberField";
37
41
  export * from "./NumberPickerActionSheet";
38
42
  export * from "./OpenAPIContext";
39
43
  export * from "./Page";
40
- export * from "./Pill";
41
- export * from "./ProgressBar";
44
+ export * from "./Pagination";
45
+ export * from "./PasswordField";
46
+ export * from "./PhoneNumberField";
47
+ export * from "./Radio";
48
+ export * from "./RadioField";
42
49
  export * from "./ScrollView";
43
50
  export * from "./SegmentedControl";
44
- export * from "./SelectList";
51
+ export * from "./SelectField";
45
52
  export * from "./SideDrawer";
46
53
  export * from "./Signature";
54
+ export * from "./SignatureField";
47
55
  export * from "./Spinner";
48
56
  export * from "./SplitPage";
49
- export * from "./Switch";
50
- export * from "./Table";
51
- export * from "./tableContext";
52
- export * from "./TableHeader";
53
- export * from "./TableHeaderCell";
54
- export * from "./TableRow";
57
+ export * from "./table/Table";
58
+ export * from "./table/Table";
59
+ export * from "./table/TableBadge";
60
+ export * from "./table/TableBoolean";
61
+ export * from "./table/tableContext";
62
+ export * from "./table/TableDate";
63
+ export * from "./table/TableHeader";
64
+ export * from "./table/TableHeaderCell";
65
+ export * from "./table/TableIconButton";
66
+ export * from "./table/TableNumber";
67
+ export * from "./table/TableRow";
68
+ export * from "./table/TableText";
69
+ export * from "./table/TableTitle";
55
70
  export * from "./TapToEdit";
56
71
  export * from "./Text";
57
72
  export * from "./TextArea";
@@ -64,7 +79,6 @@ export * from "./Unifier";
64
79
  export * from "./useStoredState";
65
80
  export * from "./Utilities";
66
81
  export * from "./WebAddressAutocomplete";
67
- export * from "./WithLabel";
68
82
  // export * from "./Layout";
69
83
  // export * from "./Drawer";
70
84
  // export * from "./Chart";
package/src/setupTests.ts CHANGED
@@ -1 +1,2 @@
1
1
  process.env.TZ = "America/New_York";
2
+ export {};
@@ -2,14 +2,14 @@ import React, {Children, ReactElement, useEffect} from "react";
2
2
  import {ScrollView} from "react-native";
3
3
  import {DimensionValue} from "react-native/Libraries/StyleSheet/StyleSheetTypes";
4
4
 
5
- import {Box} from "./Box";
6
- import {ColumnSortInterface, TableProps} from "./Common";
7
- import {PaginationControl} from "./Pagination";
5
+ import {Box} from "../Box";
6
+ import {ColumnSortInterface, TableProps} from "../Common";
7
+ import {Pagination} from "../Pagination";
8
8
  import {TableContextProvider} from "./tableContext";
9
9
 
10
10
  export const Table = ({
11
11
  children,
12
- columns,
12
+ columns, // see notes in common about table columns width and decide if we need to change this to a more specific type 'size'
13
13
  borderStyle,
14
14
  alternateRowBackground = true,
15
15
  maxHeight,
@@ -17,6 +17,7 @@ export const Table = ({
17
17
  sort,
18
18
  page: propsPage,
19
19
  setPage: propsSetPage,
20
+ totalPages,
20
21
  more,
21
22
  extraControls,
22
23
  }: TableProps): React.ReactElement => {
@@ -37,10 +38,11 @@ export const Table = ({
37
38
  let width: DimensionValue;
38
39
  if (columns.every((column) => typeof column === "number")) {
39
40
  width = columns.reduce((acc, curr) => {
40
- return (acc as number) + (curr as number);
41
+ return (acc as number) + (curr as number) + 8; // 8 for margin between columns;
41
42
  }, 0) as number;
42
43
  if (hasDrawerContents) {
43
- width = (width as number) + 30;
44
+ // Size of IconButton + padding is 56
45
+ width = (width as number) + 56;
44
46
  }
45
47
  } else {
46
48
  width = "100%";
@@ -67,9 +69,18 @@ export const Table = ({
67
69
  stickyHeader={stickyHeader}
68
70
  >
69
71
  <>
70
- <Box flex="grow" maxWidth="100%" width={width}>
72
+ <Box
73
+ flex="grow"
74
+ maxWidth="100%"
75
+ style={{
76
+ position: "relative",
77
+ }}
78
+ width={width}
79
+ >
71
80
  <ScrollView horizontal style={{width, maxWidth: "100%"}}>
81
+ {/* TODO: Replace table scrollview with flat list */}
72
82
  <ScrollView
83
+ // nestedScrollEnabled
73
84
  stickyHeaderIndices={stickyHeader ? [0] : undefined}
74
85
  style={{width, maxWidth: "100%", flex: 1, maxHeight}}
75
86
  >
@@ -77,20 +88,19 @@ export const Table = ({
77
88
  children,
78
89
  (child, index) =>
79
90
  Boolean(child) &&
80
- React.cloneElement(child as any, {
81
- color: index % 2 === 1 && alternateRowBackground ? "lightGray" : "white",
91
+ React.cloneElement(child as ReactElement, {
92
+ color: index % 2 === 1 && alternateRowBackground ? "neutralLight" : "base",
82
93
  })
83
94
  )}
84
95
  </ScrollView>
85
96
  </ScrollView>
86
97
  </Box>
87
- {Boolean(shouldPaginate) && (
88
- <Box alignItems="center" borderTop="gray" direction="row" height={60} paddingX={8}>
89
- <PaginationControl
98
+ {Boolean(shouldPaginate && totalPages !== undefined) && (
99
+ <Box alignItems="center" borderTop="default" direction="row" height={60} paddingX={8}>
100
+ <Pagination
90
101
  page={propsPage ?? page}
91
102
  setPage={propsSetPage ?? setPage}
92
- shouldDisableBackButton={(propsPage ?? page) <= 1}
93
- shouldDisableNextButton={!more}
103
+ totalPages={totalPages!}
94
104
  />
95
105
  {Boolean(extraControls) && extraControls}
96
106
  </Box>
@@ -0,0 +1,46 @@
1
+ import React, {FC, useState} from "react";
2
+ import {View} from "react-native";
3
+
4
+ import {Badge} from "../Badge";
5
+ import {TableBadgeProps} from "../Common";
6
+ import {SelectField} from "../SelectField";
7
+
8
+ export interface TableBadgeHandles {
9
+ handleSave: () => void | Promise<void>;
10
+ }
11
+
12
+ // TODO: Support error state in TableBadge
13
+ export const TableBadge: FC<TableBadgeProps> = ({
14
+ value,
15
+ badgeStatus = "info",
16
+ badgeIconName,
17
+ isEditing = false,
18
+ editingOptions,
19
+ }) => {
20
+ const [selected, setSelected] = useState<string | undefined>(value);
21
+
22
+ const handleChange = (newVal: string | undefined) => {
23
+ if (newVal === "") {
24
+ setSelected(undefined);
25
+ } else {
26
+ setSelected(newVal);
27
+ }
28
+ };
29
+
30
+ return (
31
+ <View
32
+ style={{
33
+ justifyContent: "center",
34
+ alignItems: "center",
35
+ }}
36
+ >
37
+ {isEditing && editingOptions ? (
38
+ <SelectField options={editingOptions} value={selected} onChange={handleChange} />
39
+ ) : (
40
+ <Badge iconName={badgeIconName} secondary status={badgeStatus} value={value} />
41
+ )}
42
+ </View>
43
+ );
44
+ };
45
+
46
+ TableBadge.displayName = "TableBadge";
@@ -0,0 +1,70 @@
1
+ import React, {FC, useCallback, useState} from "react";
2
+ import {TouchableOpacity, View, ViewStyle} from "react-native";
3
+
4
+ import {CheckBox} from "../CheckBox";
5
+ import {TableBooleanProps} from "../Common";
6
+ import {Icon} from "../Icon";
7
+ import {useTheme} from "../Theme";
8
+
9
+ export interface TableBooleanHandles {
10
+ handleSave: () => void | Promise<void>;
11
+ }
12
+
13
+ export const TableBoolean: FC<TableBooleanProps> = ({value, isEditing = false}) => {
14
+ const [checked, setChecked] = useState(value);
15
+ const {theme} = useTheme();
16
+ const valueString = checked ? "checked" : "unchecked";
17
+ const oppositeValueString = checked ? "unchecked" : "checked";
18
+
19
+ const handlePress = useCallback(() => {
20
+ setChecked(!checked);
21
+ }, [checked]);
22
+
23
+ if (isEditing) {
24
+ return (
25
+ <TouchableOpacity
26
+ accessibilityHint={`Tap to change the checkbox from ${oppositeValueString} to ${valueString}`}
27
+ accessibilityLabel={`Checkbox is currently ${valueString}`}
28
+ accessibilityRole="checkbox"
29
+ hitSlop={{top: 10, bottom: 10, left: 10, right: 10}}
30
+ style={
31
+ {
32
+ alignItems: "center",
33
+ justifyContent: "center",
34
+ } as ViewStyle
35
+ }
36
+ onPress={handlePress}
37
+ >
38
+ <CheckBox selected={checked} size="lg" />
39
+ </TouchableOpacity>
40
+ );
41
+ } else {
42
+ return (
43
+ <View
44
+ style={{
45
+ alignItems: "center",
46
+ justifyContent: "center",
47
+ width: "100%",
48
+ }}
49
+ >
50
+ <View
51
+ accessibilityHint={value ? "Checked icon" : "Unchecked icon"}
52
+ accessibilityLabel={`The checkbox is ${valueString}`}
53
+ accessibilityRole="image"
54
+ style={{
55
+ height: 32,
56
+ width: 32,
57
+ borderRadius: 16,
58
+ backgroundColor: value ? theme.surface.successLight : "transparent",
59
+ alignItems: "center",
60
+ justifyContent: "center",
61
+ }}
62
+ >
63
+ <Icon color={value ? "success" : "secondaryLight"} iconName={value ? "check" : "x"} />
64
+ </View>
65
+ </View>
66
+ );
67
+ }
68
+ };
69
+
70
+ TableBoolean.displayName = "TableBoolean";
@@ -0,0 +1,38 @@
1
+ import {DateTime} from "luxon";
2
+ import React, {FC, useState} from "react";
3
+ import {Text} from "react-native";
4
+
5
+ import {TableDateProps} from "../Common";
6
+
7
+ export const TableDate: FC<TableDateProps> = ({value, annotated = false}) => {
8
+ const initialDate =
9
+ typeof value === "string" ? DateTime.fromISO(value) : DateTime.fromJSDate(value);
10
+ const [dateVal] = useState(initialDate);
11
+
12
+ // TODO: Formatting date with annotations should be in DateUtilities and tested.
13
+ const formatDate = (date: DateTime) => {
14
+ const now = DateTime.now();
15
+ const diff = now.diff(date, ["years", "months", "days"]).toObject();
16
+
17
+ let diffString = "";
18
+ if (diff.years) {
19
+ diffString += `${Math.floor(diff.years)} Year${Math.floor(diff.years) > 1 ? "s" : ""} `;
20
+ }
21
+ if (diff.months) {
22
+ diffString += `${Math.floor(diff.months)} Mo${Math.floor(diff.months) > 1 ? "s" : ""} `;
23
+ }
24
+ if (diff.days) {
25
+ diffString += `${Math.floor(diff.days)} Day${Math.floor(diff.days) > 1 ? "s" : ""}`;
26
+ }
27
+
28
+ return `${date.toFormat("MM/dd/yyyy")} (${diffString.trim()})`;
29
+ };
30
+
31
+ return (
32
+ <Text style={{fontSize: 16}}>
33
+ {annotated ? formatDate(dateVal) : dateVal.toFormat("MM/dd/yyyy")}
34
+ </Text>
35
+ );
36
+ };
37
+
38
+ TableDate.displayName = "TableDate";
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
 
3
- import {Box} from "./Box";
4
- import {TableHeaderProps} from "./Common";
3
+ import {Box} from "../Box";
4
+ import {TableHeaderProps} from "../Common";
5
5
  import {TableRow} from "./TableRow";
6
6
 
7
7
  /**
@@ -13,7 +13,7 @@ export const TableHeader = ({
13
13
  color,
14
14
  }: TableHeaderProps): React.ReactElement => {
15
15
  return (
16
- <Box color={color ?? "white"} display={display === "visuallyHidden" ? "none" : "flex"}>
16
+ <Box color={color ?? "base"} display={display === "visuallyHidden" ? "none" : "flex"}>
17
17
  <TableRow headerRow>{children}</TableRow>
18
18
  </Box>
19
19
  );
@@ -0,0 +1,93 @@
1
+ // TableHeaderCell.tsx
2
+ import {FontAwesome6} from "@expo/vector-icons";
3
+ import React, {ReactElement, useCallback} from "react";
4
+ import {View} from "react-native";
5
+
6
+ import {Box} from "../Box";
7
+ import {AlignItems, TableHeaderCellProps} from "../Common";
8
+ import {useTheme} from "../Theme";
9
+ import {useTableContext} from "./tableContext";
10
+ import {TableTitle} from "./TableTitle";
11
+
12
+ /**
13
+ * Use TableHeaderCell to define a header cell in Table.
14
+ */
15
+ export const TableHeaderCell = ({
16
+ children,
17
+ index,
18
+ sortable,
19
+ align = "left",
20
+ title,
21
+ onSortChange,
22
+ }: TableHeaderCellProps): ReactElement => {
23
+ const {theme} = useTheme();
24
+
25
+ const {columns, setSortColumn, sortColumn} = useTableContext();
26
+ const width = columns[index];
27
+ if (!width) {
28
+ console.warn(`No width defined for column ${index} in TableHeaderCell`);
29
+ }
30
+ if (children && title) {
31
+ console.warn("Both children and title are defined in TableHeaderCell. Title will be ignored.");
32
+ }
33
+ if (!children && !title) {
34
+ console.error("Either children or title is required in TableHeaderCell");
35
+ }
36
+
37
+ const sort = sortColumn?.column === index ? sortColumn.direction : undefined;
38
+ let alignItems: AlignItems = "start";
39
+ if (align === "center") {
40
+ alignItems = "center";
41
+ } else if (align === "right") {
42
+ alignItems = "end";
43
+ }
44
+
45
+ const onClick = useCallback(() => {
46
+ // desc => asc => undefined
47
+ const newSort = sort === "desc" ? "asc" : sort === "asc" ? undefined : "desc";
48
+ if (setSortColumn) {
49
+ setSortColumn(newSort ? {column: index, direction: newSort} : undefined);
50
+ }
51
+ onSortChange && onSortChange(newSort);
52
+ }, [index, onSortChange, setSortColumn, sort]);
53
+
54
+ if (sortable && !onSortChange) {
55
+ console.error("onSortChange is required when sortable is true");
56
+ }
57
+ return (
58
+ <Box
59
+ accessibilityHint="changes sort alphabetical order"
60
+ accessibilityLabel="sort"
61
+ alignItems="center"
62
+ direction="row"
63
+ flex="grow"
64
+ justifyContent={alignItems}
65
+ onClick={sortable ? onClick : undefined}
66
+ >
67
+ {Boolean(children) && children}
68
+ {Boolean(title) && <TableTitle align={align} title={title!} />}
69
+ {Boolean(sort) && (
70
+ <Box alignSelf="end" paddingX={2}>
71
+ {/* Make it look like an IconButton, but we can't nest buttons and the whole row is clickable. */}
72
+ <View
73
+ style={{
74
+ alignItems: "center",
75
+ backgroundColor: theme.surface.primary,
76
+ borderRadius: theme.radius.rounded as any,
77
+ justifyContent: "center",
78
+ height: 16,
79
+ width: 16,
80
+ }}
81
+ >
82
+ <FontAwesome6
83
+ color={theme.text.inverted}
84
+ name={sort === "asc" ? "arrow-down" : "arrow-up"}
85
+ size={10}
86
+ solid
87
+ />
88
+ </View>
89
+ </Box>
90
+ )}
91
+ </Box>
92
+ );
93
+ };
@@ -0,0 +1,62 @@
1
+ /* eslint-disable react-native-a11y/has-accessibility-hint */
2
+ // accessibility hint handled in IconButton.tsx
3
+
4
+ import React, {FC} from "react";
5
+ import {View} from "react-native";
6
+
7
+ import {IconButtonProps, IconName, TableIconButtonProps} from "../Common";
8
+ import {IconButton} from "../IconButton";
9
+
10
+ export const TableIconButton: FC<TableIconButtonProps> = ({tableIconButtonName, onClick}) => {
11
+ const iconButtonMap: Record<
12
+ string,
13
+ {
14
+ iconName: IconName;
15
+ variant: IconButtonProps["variant"];
16
+ accessibilityLabel: string;
17
+ accessibilityHint: string;
18
+ }
19
+ > = {
20
+ edit: {
21
+ iconName: "pen-to-square",
22
+ variant: "muted",
23
+ accessibilityLabel: "Edit",
24
+ accessibilityHint: "Edit row",
25
+ },
26
+ saveAndClose: {
27
+ iconName: "check",
28
+ variant: "secondary",
29
+ accessibilityLabel: "Save and close",
30
+ accessibilityHint: "Save and close row",
31
+ },
32
+ insert: {
33
+ iconName: "plus",
34
+ variant: "primary",
35
+ accessibilityLabel: "Insert Data",
36
+ accessibilityHint: "Insert Data",
37
+ },
38
+ drawerOpen: {
39
+ iconName: "chevron-down",
40
+ variant: "muted",
41
+ accessibilityLabel: "Open Drawer for more Data",
42
+ accessibilityHint: "Open Drawer",
43
+ },
44
+ drawerClose: {
45
+ iconName: "chevron-up",
46
+ variant: "secondary",
47
+ accessibilityLabel: "Close Drawer for more Data",
48
+ accessibilityHint: "Close Drawer",
49
+ },
50
+ };
51
+
52
+ return (
53
+ <View style={{justifyContent: "center", alignItems: "center", width: "100%"}}>
54
+ <IconButton
55
+ accessibilityLabel={iconButtonMap[tableIconButtonName].accessibilityLabel}
56
+ iconName={iconButtonMap[tableIconButtonName].iconName}
57
+ variant={iconButtonMap[tableIconButtonName].variant}
58
+ onClick={onClick}
59
+ />
60
+ </View>
61
+ );
62
+ };