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
package/src/Common.ts CHANGED
@@ -1,10 +1,64 @@
1
- import {SaveFormat} from "expo-image-manipulator";
2
- import React, {ReactElement, ReactNode, SyntheticEvent} from "react";
3
- import {ListRenderItemInfo, StyleProp, ViewStyle} from "react-native";
4
- import {DimensionValue, FlexStyle} from "react-native/Libraries/StyleSheet/StyleSheetTypes";
1
+ import {CountryCode} from "libphonenumber-js";
2
+ import React, {ReactElement, ReactNode} from "react";
3
+ import {ListRenderItemInfo, StyleProp, TextStyle, ViewStyle} from "react-native";
4
+ import {DimensionValue} from "react-native/Libraries/StyleSheet/StyleSheetTypes";
5
5
  import {Styles} from "react-native-google-places-autocomplete";
6
+ import {SvgProps} from "react-native-svg";
6
7
 
7
- import {SelectListOptions} from "./SelectList";
8
+ import {
9
+ FontAwesome6BrandNames,
10
+ FontAwesome6RegularNames,
11
+ FontAwesome6SolidNames,
12
+ } from "./CommonIconTypes";
13
+
14
+ export interface AccordionProps {
15
+ /**
16
+ * The content to be displayed inside the accordion.
17
+ */
18
+ children: React.ReactNode;
19
+
20
+ /**
21
+ * If true, an information modal will be included.
22
+ * @default false
23
+ */
24
+ includeInfoModal?: boolean;
25
+
26
+ /**
27
+ * The content of the information modal.
28
+ */
29
+ infoModalChildren?: ModalProps["children"];
30
+
31
+ /**
32
+ * The subtitle of the information modal.
33
+ */
34
+ infoModalSubtitle?: ModalProps["subtitle"];
35
+
36
+ /**
37
+ * The text content of the information modal.
38
+ */
39
+ infoModalText?: ModalProps["text"];
40
+
41
+ /**
42
+ * The title of the information modal.
43
+ */
44
+ infoModalTitle?: ModalProps["title"];
45
+
46
+ /**
47
+ * If true, the accordion will be collapsed.
48
+ * @default true
49
+ */
50
+ isCollapsed?: boolean;
51
+
52
+ /*
53
+ * The subtitle showed below the title of the accordion.
54
+ */
55
+ subtitle?: string;
56
+
57
+ /**
58
+ * The title of the accordion.
59
+ */
60
+ title: string;
61
+ }
8
62
 
9
63
  export interface BaseProfile {
10
64
  email: string;
@@ -14,1645 +68,287 @@ export interface BaseProfile {
14
68
  };
15
69
  }
16
70
 
17
- // For using a theme.
18
- export interface UnifiedTheme {
19
- // TODO: make these configurable.
20
- blue: string;
21
- darkGray: string;
22
- eggplant: string;
23
- gray: string;
24
- green: string;
25
- springGreen: string;
26
- lightGray: string;
27
- maroon: string;
28
- midnight: string;
29
- navy: string;
30
- olive: string;
31
- orange: string;
32
- orchid: string;
33
- pine: string;
34
- purple: string;
35
- red: string;
36
- watermelon: string;
37
- white: string;
38
- black: string;
39
-
40
- info: string;
71
+ export interface ThemePrimitiveColors {
72
+ neutral000: string;
73
+ neutral050: string;
74
+ neutral100: string;
75
+ neutral200: string;
76
+ neutral300: string;
77
+ neutral400: string;
78
+ neutral500: string;
79
+ neutral600: string;
80
+ neutral700: string;
81
+ neutral800: string;
82
+ neutral900: string;
83
+
84
+ primary000: string;
85
+ primary050: string;
86
+ primary100: string;
87
+ primary200: string;
88
+ primary300: string;
89
+ primary400: string;
90
+ primary500: string;
91
+ primary600: string;
92
+ primary700: string;
93
+ primary800: string;
94
+ primary900: string;
95
+
96
+ secondary000: string;
97
+ secondary050: string;
98
+ secondary100: string;
99
+ secondary200: string;
100
+ secondary300: string;
101
+ secondary400: string;
102
+ secondary500: string;
103
+ secondary600: string;
104
+ secondary700: string;
105
+ secondary800: string;
106
+ secondary900: string;
107
+
108
+ accent000: string;
109
+ accent050: string;
110
+ accent100: string;
111
+ accent200: string;
112
+ accent300: string;
113
+ accent400: string;
114
+ accent500: string;
115
+ accent600: string;
116
+ accent700: string;
117
+ accent800: string;
118
+ accent900: string;
119
+
120
+ error000: string;
121
+ error100: string;
122
+ error200: string;
123
+
124
+ warning000: string;
125
+ warning100: string;
126
+ warning200: string;
127
+
128
+ success000: string;
129
+ success100: string;
130
+ success200: string;
131
+ }
132
+
133
+ export interface ThemePrimitiveRadius {
134
+ radiusSm: number;
135
+ radiusMd: number;
136
+ radiusLg: number;
137
+ radiusXl: number;
138
+ radius2xl: number;
139
+ radius3xl: number;
140
+ }
141
+
142
+ export interface ThemePrimitiveSpacing {
143
+ spacing0: number;
144
+ spacing1: number;
145
+ spacing2: number;
146
+ spacing3: number;
147
+ spacing4: number;
148
+ spacing5: number;
149
+ spacing6: number;
150
+ spacing7: number;
151
+ spacing8: number;
152
+ spacing9: number;
153
+ spacing10: number;
154
+ spacing11: number;
155
+ spacing12: number;
156
+ }
157
+
158
+ export type ThemePrimitives = ThemePrimitiveColors & ThemePrimitiveRadius & ThemePrimitiveSpacing;
159
+
160
+ export interface TextThemeConfig {
161
+ primary: keyof ThemePrimitiveColors;
162
+ inverted: keyof ThemePrimitiveColors;
163
+ secondaryLight: keyof ThemePrimitiveColors;
164
+ extraLight: keyof ThemePrimitiveColors;
165
+ secondaryDark: keyof ThemePrimitiveColors;
166
+ link: keyof ThemePrimitiveColors;
167
+ linkLight: keyof ThemePrimitiveColors;
168
+ accent: keyof ThemePrimitiveColors;
169
+ error: keyof ThemePrimitiveColors;
170
+ warning: keyof ThemePrimitiveColors;
171
+ success: keyof ThemePrimitiveColors;
172
+ }
173
+
174
+ export interface SurfaceThemeConfig {
175
+ base: keyof ThemePrimitiveColors;
176
+ primary: keyof ThemePrimitiveColors;
177
+ secondaryLight: keyof ThemePrimitiveColors;
178
+ secondaryDark: keyof ThemePrimitiveColors;
179
+ secondaryExtraDark: keyof ThemePrimitiveColors;
180
+ neutral: keyof ThemePrimitiveColors;
181
+ neutralLight: keyof ThemePrimitiveColors;
182
+ neutralDark: keyof ThemePrimitiveColors;
183
+ disabled: keyof ThemePrimitiveColors;
184
+ error: keyof ThemePrimitiveColors;
185
+ errorLight: keyof ThemePrimitiveColors;
186
+ success: keyof ThemePrimitiveColors;
187
+ successLight: keyof ThemePrimitiveColors;
188
+ warning: keyof ThemePrimitiveColors;
189
+ warningLight: keyof ThemePrimitiveColors;
190
+ }
191
+
192
+ export interface BorderThemeConfig {
193
+ default: keyof ThemePrimitiveColors;
194
+ dark: keyof ThemePrimitiveColors;
195
+ activeNeutral: keyof ThemePrimitiveColors;
196
+ activeAccent: keyof ThemePrimitiveColors;
197
+ hover: keyof ThemePrimitiveColors;
198
+ focus: keyof ThemePrimitiveColors;
199
+ error: keyof ThemePrimitiveColors;
200
+ success: keyof ThemePrimitiveColors;
201
+ warning: keyof ThemePrimitiveColors;
202
+ }
203
+
204
+ export interface StatusThemeConfig {
205
+ active: keyof ThemePrimitiveColors;
206
+ doNotDisturb: keyof ThemePrimitiveColors;
207
+ away: keyof ThemePrimitiveColors;
208
+ }
209
+
210
+ export interface RadiusThemeConfig {
211
+ minimal: keyof ThemePrimitiveRadius;
212
+ default: keyof ThemePrimitiveRadius;
213
+ full: keyof ThemePrimitiveRadius;
214
+ rounded: keyof ThemePrimitiveRadius;
215
+ }
216
+
217
+ export interface SpacingThemeConfig {
218
+ none: keyof ThemePrimitiveSpacing;
219
+ xs: keyof ThemePrimitiveSpacing;
220
+ sm: keyof ThemePrimitiveSpacing;
221
+ md: keyof ThemePrimitiveSpacing;
222
+ lg: keyof ThemePrimitiveSpacing;
223
+ xl: keyof ThemePrimitiveSpacing;
224
+ "2xl": keyof ThemePrimitiveSpacing;
225
+ "3xl": keyof ThemePrimitiveSpacing;
226
+ }
227
+
228
+ export interface TextTheme {
229
+ primary: string;
230
+ inverted: string;
231
+ secondaryLight: string;
232
+ extraLight: string;
233
+ secondaryDark: string;
234
+ link: string;
235
+ linkLight: string;
236
+ accent: string;
41
237
  error: string;
42
238
  warning: string;
43
239
  success: string;
44
- neutral: string;
240
+ }
45
241
 
46
- primaryLighter: string;
47
- primaryLight: string;
242
+ export interface SurfaceTheme {
243
+ base: string;
48
244
  primary: string;
49
- primaryDark: string;
50
- primaryDarker: string;
51
-
52
- secondaryLighter: string;
53
245
  secondaryLight: string;
54
- secondary: string;
55
246
  secondaryDark: string;
56
- secondaryDarker: string;
247
+ secondaryExtraDark: string;
248
+ neutral: string;
249
+ neutralLight: string;
250
+ neutralDark: string;
251
+ disabled: string;
252
+ error: string;
253
+ errorLight: string;
254
+ success: string;
255
+ successLight: string;
256
+ warning: string;
257
+ warningLight: string;
258
+ }
57
259
 
58
- accentLighter: string;
59
- accentLight: string;
60
- accent: string;
61
- accentDark: string;
62
- accentDarker: string;
63
-
64
- tertiaryLighter: string;
65
- tertiaryLight: string;
66
- tertiary: string;
67
- tertiaryDark: string;
68
- tertiaryDarker: string;
69
-
70
- // Support for light and dark mode.
71
- background: string;
72
- backgroundSecondary: string;
73
- textPrimary: string;
74
- textSecondary: string;
75
- textDisabled: string;
76
- divider: string;
260
+ export interface BorderTheme {
261
+ default: string;
262
+ dark: string;
263
+ activeNeutral: string;
264
+ activeAccent: string;
265
+ hover: string;
266
+ focus: string;
267
+ error: string;
268
+ success: string;
269
+ warning: string;
270
+ }
77
271
 
78
- neutral900: string;
79
- neutral800: string;
80
- neutral700: string;
81
- neutral600: string;
82
- neutral500: string;
83
- neutral400: string;
84
- neutral300: string;
85
- neutral200: string;
86
- neutral100: string;
87
- neutral90: string;
88
- neutral80: string;
89
- neutral70: string;
90
- neutral60: string;
91
- neutral50: string;
92
- neutral40: string;
93
- neutral30: string;
94
- neutral20: string;
95
- neutral10: string;
96
-
97
- primaryFont: string;
98
- primaryBoldFont: string;
99
- secondaryFont: string;
100
- secondaryBoldFont: string;
101
- buttonFont: string;
102
- accentFont: string;
103
- accentBoldFont: string;
104
- titleFont: string;
105
- }
106
-
107
- export type Font =
108
- | "primary"
109
- | "primaryBold"
110
- | "secondary"
111
- | "secondaryBold"
112
- | "accent"
113
- | "accentBold"
114
- | "title"
115
- | "button";
272
+ export interface StatusTheme {
273
+ active: string;
274
+ doNotDisturb: string;
275
+ away: string;
276
+ }
116
277
 
117
- // type Sizes = "small" | "xsmall" | "sm" | "small" | "medium" | "lg" | "large";
278
+ export interface RadiusTheme {
279
+ minimal: number;
280
+ default: number;
281
+ full: number;
282
+ rounded: number;
283
+ }
118
284
 
119
- export type Direction = "up" | "right" | "down" | "left";
120
- export type Color =
285
+ export interface SpacingTheme {
286
+ none: number;
287
+ xs: number;
288
+ sm: number;
289
+ md: number;
290
+ lg: number;
291
+ xl: number;
292
+ "2xl": number;
293
+ "3xl": number;
294
+ }
295
+
296
+ export type TextColor = keyof TextTheme;
297
+ export type SurfaceColor = keyof SurfaceTheme;
298
+ export type BorderColor = keyof BorderTheme;
299
+ export type StatusColor = keyof StatusTheme;
300
+ // TODO: Remove ButtonColor. Buttons no longer have colors, only types (called style in Figma)
301
+ export type ButtonColor =
121
302
  | "blue"
122
- | "darkGray"
123
- | "eggplant"
124
303
  | "gray"
125
- | "green"
126
- | "springGreen"
127
- | "lightGray"
128
- | "maroon"
129
- | "midnight"
130
- | "navy"
131
- | "olive"
132
- | "orange"
133
- | "orchid"
134
- | "pine"
135
- | "purple"
136
304
  | "red"
137
- | "watermelon"
305
+ // | "transparent"
138
306
  | "white"
139
- | "black";
140
- export type ThemeColor =
141
- | "primaryLighter"
142
- | "primaryLight"
143
307
  | "primary"
144
- | "primaryDark"
145
- | "primaryDarker"
146
- | "secondaryLighter"
147
- | "secondaryLight"
148
308
  | "secondary"
149
- | "secondaryDark"
150
- | "secondaryDarker"
151
- | "tertiaryLighter"
152
- | "tertiaryLight"
153
- | "tertiary"
154
- | "tertiaryDark"
155
- | "tertiaryDarker"
156
- | "accentLighter"
157
- | "accentLight"
158
309
  | "accent"
159
- | "accentDark"
160
- | "accentDarker"
161
- | "background"
162
- | "backgroundSecondary";
163
- export type NeutralColor =
164
- | "neutral900"
165
- | "neutral800"
166
- | "neutral700"
167
- | "neutral600"
168
- | "neutral500"
169
- | "neutral400"
170
- | "neutral300"
171
- | "neutral200"
172
- | "neutral100"
173
- | "neutral90"
174
- | "neutral80"
175
- | "neutral70"
176
- | "neutral60"
177
- | "neutral50"
178
- | "neutral40"
179
- | "neutral30"
180
- | "neutral20"
181
- | "neutral10";
182
-
183
- export type StatusIndicatorColor = "info" | "error" | "warning" | "success" | "neutral";
184
-
185
- export type AllColors = Color | ThemeColor | NeutralColor | StatusIndicatorColor;
186
-
187
- export interface OnChangeResult {
188
- event?: SyntheticEvent<any>;
189
- value: string;
310
+ | "tertiary"
311
+ | string;
312
+
313
+ // TODO: we may want/need to expand icon color options from just text colors.
314
+ export type IconColor = TextColor;
315
+
316
+ export interface FontTheme {
317
+ primary: string;
318
+ title: string;
319
+ }
320
+ export type Font = keyof FontTheme;
321
+
322
+ // The computed theme object that is passed to the ThemeProvider.
323
+ export interface FernsTheme {
324
+ text: TextTheme;
325
+ surface: SurfaceTheme;
326
+ border: BorderTheme;
327
+ status: StatusTheme;
328
+ radius: RadiusTheme;
329
+ spacing: SpacingTheme;
330
+ font: FontTheme;
331
+ primitives: ThemePrimitives;
332
+ }
333
+
334
+ // A config for generating the theme object from primitives.
335
+ export interface FernsThemeConfig {
336
+ text: TextThemeConfig;
337
+ surface: SurfaceThemeConfig;
338
+ border: BorderThemeConfig;
339
+ status: StatusThemeConfig;
340
+ radius: RadiusThemeConfig;
341
+ spacing: SpacingThemeConfig;
342
+ font: FontTheme;
343
+ primitives: ThemePrimitives;
190
344
  }
191
- export type OnChangeCallback = (result: OnChangeResult) => void;
345
+
346
+ export type Direction = "up" | "right" | "down" | "left";
347
+
348
+ export type OnChangeCallback = (result: string) => void;
192
349
 
193
350
  // Update if we start supporting more icon packs from Expo Icons.
194
- export type IconName = FontAwesome5IconName;
195
-
196
- export type FontAwesome5IconName =
197
- | "500px"
198
- | "accessible-icon"
199
- | "accusoft"
200
- | "acquisitions-incorporated"
201
- | "ad"
202
- | "address-book"
203
- | "address-card"
204
- | "adjust"
205
- | "adn"
206
- | "adversal"
207
- | "affiliatetheme"
208
- | "air-freshener"
209
- | "airbnb"
210
- | "algolia"
211
- | "align-center"
212
- | "align-justify"
213
- | "align-left"
214
- | "align-right"
215
- | "alipay"
216
- | "allergies"
217
- | "amazon"
218
- | "amazon-pay"
219
- | "ambulance"
220
- | "american-sign-language-interpreting"
221
- | "amilia"
222
- | "anchor"
223
- | "android"
224
- | "angellist"
225
- | "angle-double-down"
226
- | "angle-double-left"
227
- | "angle-double-right"
228
- | "angle-double-up"
229
- | "angle-down"
230
- | "angle-left"
231
- | "angle-right"
232
- | "angle-up"
233
- | "angry"
234
- | "angrycreative"
235
- | "angular"
236
- | "ankh"
237
- | "app-store"
238
- | "app-store-ios"
239
- | "apper"
240
- | "apple"
241
- | "apple-alt"
242
- | "apple-pay"
243
- | "archive"
244
- | "archway"
245
- | "arrow-alt-circle-down"
246
- | "arrow-alt-circle-left"
247
- | "arrow-alt-circle-right"
248
- | "arrow-alt-circle-up"
249
- | "arrow-circle-down"
250
- | "arrow-circle-left"
251
- | "arrow-circle-right"
252
- | "arrow-circle-up"
253
- | "arrow-down"
254
- | "arrow-left"
255
- | "arrow-right"
256
- | "arrow-up"
257
- | "arrows-alt"
258
- | "arrows-alt-h"
259
- | "arrows-alt-v"
260
- | "artstation"
261
- | "assistive-listening-systems"
262
- | "asterisk"
263
- | "asymmetrik"
264
- | "at"
265
- | "atlas"
266
- | "atlassian"
267
- | "atom"
268
- | "audible"
269
- | "audio-description"
270
- | "autoprefixer"
271
- | "avianex"
272
- | "aviato"
273
- | "award"
274
- | "aws"
275
- | "baby"
276
- | "baby-carriage"
277
- | "backspace"
278
- | "backward"
279
- | "bacon"
280
- | "bacteria"
281
- | "bacterium"
282
- | "bahai"
283
- | "balance-scale"
284
- | "balance-scale-left"
285
- | "balance-scale-right"
286
- | "ban"
287
- | "band-aid"
288
- | "bandcamp"
289
- | "barcode"
290
- | "bars"
291
- | "baseball-ball"
292
- | "basketball-ball"
293
- | "bath"
294
- | "battery-empty"
295
- | "battery-full"
296
- | "battery-half"
297
- | "battery-quarter"
298
- | "battery-three-quarters"
299
- | "battle-net"
300
- | "bed"
301
- | "beer"
302
- | "behance"
303
- | "behance-square"
304
- | "bell"
305
- | "bell-slash"
306
- | "bezier-curve"
307
- | "bible"
308
- | "bicycle"
309
- | "biking"
310
- | "bimobject"
311
- | "binoculars"
312
- | "biohazard"
313
- | "birthday-cake"
314
- | "bitbucket"
315
- | "bitcoin"
316
- | "bity"
317
- | "black-tie"
318
- | "blackberry"
319
- | "blender"
320
- | "blender-phone"
321
- | "blind"
322
- | "blog"
323
- | "blogger"
324
- | "blogger-b"
325
- | "bluetooth"
326
- | "bluetooth-b"
327
- | "bold"
328
- | "bolt"
329
- | "bomb"
330
- | "bone"
331
- | "bong"
332
- | "book"
333
- | "book-dead"
334
- | "book-medical"
335
- | "book-open"
336
- | "book-reader"
337
- | "bookmark"
338
- | "bootstrap"
339
- | "border-all"
340
- | "border-none"
341
- | "border-style"
342
- | "bowling-ball"
343
- | "box"
344
- | "box-open"
345
- | "box-tissue"
346
- | "boxes"
347
- | "braille"
348
- | "brain"
349
- | "bread-slice"
350
- | "briefcase"
351
- | "briefcase-medical"
352
- | "broadcast-tower"
353
- | "broom"
354
- | "brush"
355
- | "btc"
356
- | "buffer"
357
- | "bug"
358
- | "building"
359
- | "bullhorn"
360
- | "bullseye"
361
- | "burn"
362
- | "buromobelexperte"
363
- | "bus"
364
- | "bus-alt"
365
- | "business-time"
366
- | "buy-n-large"
367
- | "buysellads"
368
- | "calculator"
369
- | "calendar"
370
- | "calendar-alt"
371
- | "calendar-check"
372
- | "calendar-day"
373
- | "calendar-minus"
374
- | "calendar-plus"
375
- | "calendar-times"
376
- | "calendar-week"
377
- | "camera"
378
- | "camera-retro"
379
- | "campground"
380
- | "canadian-maple-leaf"
381
- | "candy-cane"
382
- | "cannabis"
383
- | "capsules"
384
- | "car"
385
- | "car-alt"
386
- | "car-battery"
387
- | "car-crash"
388
- | "car-side"
389
- | "caravan"
390
- | "caret-down"
391
- | "caret-left"
392
- | "caret-right"
393
- | "caret-square-down"
394
- | "caret-square-left"
395
- | "caret-square-right"
396
- | "caret-square-up"
397
- | "caret-up"
398
- | "carrot"
399
- | "cart-arrow-down"
400
- | "cart-plus"
401
- | "cash-register"
402
- | "cat"
403
- | "cc-amazon-pay"
404
- | "cc-amex"
405
- | "cc-apple-pay"
406
- | "cc-diners-club"
407
- | "cc-discover"
408
- | "cc-jcb"
409
- | "cc-mastercard"
410
- | "cc-paypal"
411
- | "cc-stripe"
412
- | "cc-visa"
413
- | "centercode"
414
- | "centos"
415
- | "certificate"
416
- | "chair"
417
- | "chalkboard"
418
- | "chalkboard-teacher"
419
- | "charging-station"
420
- | "chart-area"
421
- | "chart-bar"
422
- | "chart-line"
423
- | "chart-pie"
424
- | "check"
425
- | "check-circle"
426
- | "check-double"
427
- | "check-square"
428
- | "cheese"
429
- | "chess"
430
- | "chess-bishop"
431
- | "chess-board"
432
- | "chess-king"
433
- | "chess-knight"
434
- | "chess-pawn"
435
- | "chess-queen"
436
- | "chess-rook"
437
- | "chevron-circle-down"
438
- | "chevron-circle-left"
439
- | "chevron-circle-right"
440
- | "chevron-circle-up"
441
- | "chevron-down"
442
- | "chevron-left"
443
- | "chevron-right"
444
- | "chevron-up"
445
- | "child"
446
- | "chrome"
447
- | "chromecast"
448
- | "church"
449
- | "circle"
450
- | "circle-notch"
451
- | "city"
452
- | "clinic-medical"
453
- | "clipboard"
454
- | "clipboard-check"
455
- | "clipboard-list"
456
- | "clock"
457
- | "clone"
458
- | "closed-captioning"
459
- | "cloud"
460
- | "cloud-download-alt"
461
- | "cloud-meatball"
462
- | "cloud-moon"
463
- | "cloud-moon-rain"
464
- | "cloud-rain"
465
- | "cloud-showers-heavy"
466
- | "cloud-sun"
467
- | "cloud-sun-rain"
468
- | "cloud-upload-alt"
469
- | "cloudflare"
470
- | "cloudscale"
471
- | "cloudsmith"
472
- | "cloudversify"
473
- | "cocktail"
474
- | "code"
475
- | "code-branch"
476
- | "codepen"
477
- | "codiepie"
478
- | "coffee"
479
- | "cog"
480
- | "cogs"
481
- | "coins"
482
- | "columns"
483
- | "comment"
484
- | "comment-alt"
485
- | "comment-dollar"
486
- | "comment-dots"
487
- | "comment-medical"
488
- | "comment-slash"
489
- | "comments"
490
- | "comments-dollar"
491
- | "compact-disc"
492
- | "compass"
493
- | "compress"
494
- | "compress-alt"
495
- | "compress-arrows-alt"
496
- | "concierge-bell"
497
- | "confluence"
498
- | "connectdevelop"
499
- | "contao"
500
- | "cookie"
501
- | "cookie-bite"
502
- | "copy"
503
- | "copyright"
504
- | "cotton-bureau"
505
- | "couch"
506
- | "cpanel"
507
- | "creative-commons"
508
- | "creative-commons-by"
509
- | "creative-commons-nc"
510
- | "creative-commons-nc-eu"
511
- | "creative-commons-nc-jp"
512
- | "creative-commons-nd"
513
- | "creative-commons-pd"
514
- | "creative-commons-pd-alt"
515
- | "creative-commons-remix"
516
- | "creative-commons-sa"
517
- | "creative-commons-sampling"
518
- | "creative-commons-sampling-plus"
519
- | "creative-commons-share"
520
- | "creative-commons-zero"
521
- | "credit-card"
522
- | "critical-role"
523
- | "crop"
524
- | "crop-alt"
525
- | "cross"
526
- | "crosshairs"
527
- | "crow"
528
- | "crown"
529
- | "crutch"
530
- | "css3"
531
- | "css3-alt"
532
- | "cube"
533
- | "cubes"
534
- | "cut"
535
- | "cuttlefish"
536
- | "d-and-d"
537
- | "d-and-d-beyond"
538
- | "dailymotion"
539
- | "dashcube"
540
- | "database"
541
- | "deaf"
542
- | "deezer"
543
- | "delicious"
544
- | "democrat"
545
- | "deploydog"
546
- | "deskpro"
547
- | "desktop"
548
- | "dev"
549
- | "deviantart"
550
- | "dharmachakra"
551
- | "dhl"
552
- | "diagnoses"
553
- | "diaspora"
554
- | "dice"
555
- | "dice-d20"
556
- | "dice-d6"
557
- | "dice-five"
558
- | "dice-four"
559
- | "dice-one"
560
- | "dice-six"
561
- | "dice-three"
562
- | "dice-two"
563
- | "digg"
564
- | "digital-ocean"
565
- | "digital-tachograph"
566
- | "directions"
567
- | "discord"
568
- | "discourse"
569
- | "disease"
570
- | "divide"
571
- | "dizzy"
572
- | "dna"
573
- | "dochub"
574
- | "docker"
575
- | "dog"
576
- | "dollar-sign"
577
- | "dolly"
578
- | "dolly-flatbed"
579
- | "donate"
580
- | "door-closed"
581
- | "door-open"
582
- | "dot-circle"
583
- | "dove"
584
- | "download"
585
- | "draft2digital"
586
- | "drafting-compass"
587
- | "dragon"
588
- | "draw-polygon"
589
- | "dribbble"
590
- | "dribbble-square"
591
- | "dropbox"
592
- | "drum"
593
- | "drum-steelpan"
594
- | "drumstick-bite"
595
- | "drupal"
596
- | "dumbbell"
597
- | "dumpster"
598
- | "dumpster-fire"
599
- | "dungeon"
600
- | "dyalog"
601
- | "earlybirds"
602
- | "ebay"
603
- | "edge"
604
- | "edge-legacy"
605
- | "edit"
606
- | "egg"
607
- | "eject"
608
- | "elementor"
609
- | "ellipsis-h"
610
- | "ellipsis-v"
611
- | "ello"
612
- | "ember"
613
- | "empire"
614
- | "envelope"
615
- | "envelope-open"
616
- | "envelope-open-text"
617
- | "envelope-square"
618
- | "envira"
619
- | "equals"
620
- | "eraser"
621
- | "erlang"
622
- | "ethereum"
623
- | "ethernet"
624
- | "etsy"
625
- | "euro-sign"
626
- | "evernote"
627
- | "exchange-alt"
628
- | "exclamation"
629
- | "exclamation-circle"
630
- | "exclamation-triangle"
631
- | "expand"
632
- | "expand-alt"
633
- | "expand-arrows-alt"
634
- | "expeditedssl"
635
- | "external-link-alt"
636
- | "external-link-square-alt"
637
- | "eye"
638
- | "eye-dropper"
639
- | "eye-slash"
640
- | "facebook"
641
- | "facebook-f"
642
- | "facebook-messenger"
643
- | "facebook-square"
644
- | "fan"
645
- | "fantasy-flight-games"
646
- | "fast-backward"
647
- | "fast-forward"
648
- | "faucet"
649
- | "fax"
650
- | "feather"
651
- | "feather-alt"
652
- | "fedex"
653
- | "fedora"
654
- | "female"
655
- | "fighter-jet"
656
- | "figma"
657
- | "file"
658
- | "file-alt"
659
- | "file-archive"
660
- | "file-audio"
661
- | "file-code"
662
- | "file-contract"
663
- | "file-csv"
664
- | "file-download"
665
- | "file-excel"
666
- | "file-export"
667
- | "file-image"
668
- | "file-import"
669
- | "file-invoice"
670
- | "file-invoice-dollar"
671
- | "file-medical"
672
- | "file-medical-alt"
673
- | "file-pdf"
674
- | "file-powerpoint"
675
- | "file-prescription"
676
- | "file-signature"
677
- | "file-upload"
678
- | "file-video"
679
- | "file-word"
680
- | "fill"
681
- | "fill-drip"
682
- | "film"
683
- | "filter"
684
- | "fingerprint"
685
- | "fire"
686
- | "fire-alt"
687
- | "fire-extinguisher"
688
- | "firefox"
689
- | "firefox-browser"
690
- | "first-aid"
691
- | "first-order"
692
- | "first-order-alt"
693
- | "firstdraft"
694
- | "fish"
695
- | "fist-raised"
696
- | "flag"
697
- | "flag-checkered"
698
- | "flag-usa"
699
- | "flask"
700
- | "flickr"
701
- | "flipboard"
702
- | "flushed"
703
- | "fly"
704
- | "folder"
705
- | "folder-minus"
706
- | "folder-open"
707
- | "folder-plus"
708
- | "font"
709
- | "font-awesome"
710
- | "font-awesome-alt"
711
- | "font-awesome-flag"
712
- | "font-awesome-logo-full"
713
- | "fonticons"
714
- | "fonticons-fi"
715
- | "football-ball"
716
- | "fort-awesome"
717
- | "fort-awesome-alt"
718
- | "forumbee"
719
- | "forward"
720
- | "foursquare"
721
- | "free-code-camp"
722
- | "freebsd"
723
- | "frog"
724
- | "frown"
725
- | "frown-open"
726
- | "fulcrum"
727
- | "funnel-dollar"
728
- | "futbol"
729
- | "galactic-republic"
730
- | "galactic-senate"
731
- | "gamepad"
732
- | "gas-pump"
733
- | "gavel"
734
- | "gem"
735
- | "genderless"
736
- | "get-pocket"
737
- | "gg"
738
- | "gg-circle"
739
- | "ghost"
740
- | "gift"
741
- | "gifts"
742
- | "git"
743
- | "git-alt"
744
- | "git-square"
745
- | "github"
746
- | "github-alt"
747
- | "github-square"
748
- | "gitkraken"
749
- | "gitlab"
750
- | "gitter"
751
- | "glass-cheers"
752
- | "glass-martini"
753
- | "glass-martini-alt"
754
- | "glass-whiskey"
755
- | "glasses"
756
- | "glide"
757
- | "glide-g"
758
- | "globe"
759
- | "globe-africa"
760
- | "globe-americas"
761
- | "globe-asia"
762
- | "globe-europe"
763
- | "gofore"
764
- | "golf-ball"
765
- | "goodreads"
766
- | "goodreads-g"
767
- | "google"
768
- | "google-drive"
769
- | "google-pay"
770
- | "google-play"
771
- | "google-plus"
772
- | "google-plus-g"
773
- | "google-plus-square"
774
- | "google-wallet"
775
- | "gopuram"
776
- | "graduation-cap"
777
- | "gratipay"
778
- | "grav"
779
- | "greater-than"
780
- | "greater-than-equal"
781
- | "grimace"
782
- | "grin"
783
- | "grin-alt"
784
- | "grin-beam"
785
- | "grin-beam-sweat"
786
- | "grin-hearts"
787
- | "grin-squint"
788
- | "grin-squint-tears"
789
- | "grin-stars"
790
- | "grin-tears"
791
- | "grin-tongue"
792
- | "grin-tongue-squint"
793
- | "grin-tongue-wink"
794
- | "grin-wink"
795
- | "grip-horizontal"
796
- | "grip-lines"
797
- | "grip-lines-vertical"
798
- | "grip-vertical"
799
- | "gripfire"
800
- | "grunt"
801
- | "guilded"
802
- | "guitar"
803
- | "gulp"
804
- | "h-square"
805
- | "hacker-news"
806
- | "hacker-news-square"
807
- | "hackerrank"
808
- | "hamburger"
809
- | "hammer"
810
- | "hamsa"
811
- | "hand-holding"
812
- | "hand-holding-heart"
813
- | "hand-holding-medical"
814
- | "hand-holding-usd"
815
- | "hand-holding-water"
816
- | "hand-lizard"
817
- | "hand-middle-finger"
818
- | "hand-paper"
819
- | "hand-peace"
820
- | "hand-point-down"
821
- | "hand-point-left"
822
- | "hand-point-right"
823
- | "hand-point-up"
824
- | "hand-pointer"
825
- | "hand-rock"
826
- | "hand-scissors"
827
- | "hand-sparkles"
828
- | "hand-spock"
829
- | "hands"
830
- | "hands-helping"
831
- | "hands-wash"
832
- | "handshake"
833
- | "handshake-alt-slash"
834
- | "handshake-slash"
835
- | "hanukiah"
836
- | "hard-hat"
837
- | "hashtag"
838
- | "hat-cowboy"
839
- | "hat-cowboy-side"
840
- | "hat-wizard"
841
- | "hdd"
842
- | "head-side-cough"
843
- | "head-side-cough-slash"
844
- | "head-side-mask"
845
- | "head-side-virus"
846
- | "heading"
847
- | "headphones"
848
- | "headphones-alt"
849
- | "headset"
850
- | "heart"
851
- | "heart-broken"
852
- | "heartbeat"
853
- | "helicopter"
854
- | "highlighter"
855
- | "hiking"
856
- | "hippo"
857
- | "hips"
858
- | "hire-a-helper"
859
- | "history"
860
- | "hive"
861
- | "hockey-puck"
862
- | "holly-berry"
863
- | "home"
864
- | "hooli"
865
- | "hornbill"
866
- | "horse"
867
- | "horse-head"
868
- | "hospital"
869
- | "hospital-alt"
870
- | "hospital-symbol"
871
- | "hospital-user"
872
- | "hot-tub"
873
- | "hotdog"
874
- | "hotel"
875
- | "hotjar"
876
- | "hourglass"
877
- | "hourglass-end"
878
- | "hourglass-half"
879
- | "hourglass-start"
880
- | "house-damage"
881
- | "house-user"
882
- | "houzz"
883
- | "hryvnia"
884
- | "html5"
885
- | "hubspot"
886
- | "i-cursor"
887
- | "ice-cream"
888
- | "icicles"
889
- | "icons"
890
- | "id-badge"
891
- | "id-card"
892
- | "id-card-alt"
893
- | "ideal"
894
- | "igloo"
895
- | "image"
896
- | "images"
897
- | "imdb"
898
- | "inbox"
899
- | "indent"
900
- | "industry"
901
- | "infinity"
902
- | "info"
903
- | "info-circle"
904
- | "innosoft"
905
- | "instagram"
906
- | "instagram-square"
907
- | "instalod"
908
- | "intercom"
909
- | "internet-explorer"
910
- | "invision"
911
- | "ioxhost"
912
- | "italic"
913
- | "itch-io"
914
- | "itunes"
915
- | "itunes-note"
916
- | "java"
917
- | "jedi"
918
- | "jedi-order"
919
- | "jenkins"
920
- | "jira"
921
- | "joget"
922
- | "joint"
923
- | "joomla"
924
- | "journal-whills"
925
- | "js"
926
- | "js-square"
927
- | "jsfiddle"
928
- | "kaaba"
929
- | "kaggle"
930
- | "key"
931
- | "keybase"
932
- | "keyboard"
933
- | "keycdn"
934
- | "khanda"
935
- | "kickstarter"
936
- | "kickstarter-k"
937
- | "kiss"
938
- | "kiss-beam"
939
- | "kiss-wink-heart"
940
- | "kiwi-bird"
941
- | "korvue"
942
- | "landmark"
943
- | "language"
944
- | "laptop"
945
- | "laptop-code"
946
- | "laptop-house"
947
- | "laptop-medical"
948
- | "laravel"
949
- | "lastfm"
950
- | "lastfm-square"
951
- | "laugh"
952
- | "laugh-beam"
953
- | "laugh-squint"
954
- | "laugh-wink"
955
- | "layer-group"
956
- | "leaf"
957
- | "leanpub"
958
- | "lemon"
959
- | "less"
960
- | "less-than"
961
- | "less-than-equal"
962
- | "level-down-alt"
963
- | "level-up-alt"
964
- | "life-ring"
965
- | "lightbulb"
966
- | "line"
967
- | "link"
968
- | "linkedin"
969
- | "linkedin-in"
970
- | "linode"
971
- | "linux"
972
- | "lira-sign"
973
- | "list"
974
- | "list-alt"
975
- | "list-ol"
976
- | "list-ul"
977
- | "location-arrow"
978
- | "lock"
979
- | "lock-open"
980
- | "long-arrow-alt-down"
981
- | "long-arrow-alt-left"
982
- | "long-arrow-alt-right"
983
- | "long-arrow-alt-up"
984
- | "low-vision"
985
- | "luggage-cart"
986
- | "lungs"
987
- | "lungs-virus"
988
- | "lyft"
989
- | "magento"
990
- | "magic"
991
- | "magnet"
992
- | "mail-bulk"
993
- | "mailchimp"
994
- | "male"
995
- | "mandalorian"
996
- | "map"
997
- | "map-marked"
998
- | "map-marked-alt"
999
- | "map-marker"
1000
- | "map-marker-alt"
1001
- | "map-pin"
1002
- | "map-signs"
1003
- | "markdown"
1004
- | "marker"
1005
- | "mars"
1006
- | "mars-double"
1007
- | "mars-stroke"
1008
- | "mars-stroke-h"
1009
- | "mars-stroke-v"
1010
- | "mask"
1011
- | "mastodon"
1012
- | "maxcdn"
1013
- | "mdb"
1014
- | "medal"
1015
- | "medapps"
1016
- | "medium"
1017
- | "medium-m"
1018
- | "medkit"
1019
- | "medrt"
1020
- | "meetup"
1021
- | "megaport"
1022
- | "meh"
1023
- | "meh-blank"
1024
- | "meh-rolling-eyes"
1025
- | "memory"
1026
- | "mendeley"
1027
- | "menorah"
1028
- | "mercury"
1029
- | "meteor"
1030
- | "microblog"
1031
- | "microchip"
1032
- | "microphone"
1033
- | "microphone-alt"
1034
- | "microphone-alt-slash"
1035
- | "microphone-slash"
1036
- | "microscope"
1037
- | "microsoft"
1038
- | "minus"
1039
- | "minus-circle"
1040
- | "minus-square"
1041
- | "mitten"
1042
- | "mix"
1043
- | "mixcloud"
1044
- | "mixer"
1045
- | "mizuni"
1046
- | "mobile"
1047
- | "mobile-alt"
1048
- | "modx"
1049
- | "monero"
1050
- | "money-bill"
1051
- | "money-bill-alt"
1052
- | "money-bill-wave"
1053
- | "money-bill-wave-alt"
1054
- | "money-check"
1055
- | "money-check-alt"
1056
- | "monument"
1057
- | "moon"
1058
- | "mortar-pestle"
1059
- | "mosque"
1060
- | "motorcycle"
1061
- | "mountain"
1062
- | "mouse"
1063
- | "mouse-pointer"
1064
- | "mug-hot"
1065
- | "music"
1066
- | "napster"
1067
- | "neos"
1068
- | "network-wired"
1069
- | "neuter"
1070
- | "newspaper"
1071
- | "nimblr"
1072
- | "node"
1073
- | "node-js"
1074
- | "not-equal"
1075
- | "notes-medical"
1076
- | "npm"
1077
- | "ns8"
1078
- | "nutritionix"
1079
- | "object-group"
1080
- | "object-ungroup"
1081
- | "octopus-deploy"
1082
- | "odnoklassniki"
1083
- | "odnoklassniki-square"
1084
- | "oil-can"
1085
- | "old-republic"
1086
- | "om"
1087
- | "opencart"
1088
- | "openid"
1089
- | "opera"
1090
- | "optin-monster"
1091
- | "orcid"
1092
- | "osi"
1093
- | "otter"
1094
- | "outdent"
1095
- | "page4"
1096
- | "pagelines"
1097
- | "pager"
1098
- | "paint-brush"
1099
- | "paint-roller"
1100
- | "palette"
1101
- | "palfed"
1102
- | "pallet"
1103
- | "paper-plane"
1104
- | "paperclip"
1105
- | "parachute-box"
1106
- | "paragraph"
1107
- | "parking"
1108
- | "passport"
1109
- | "pastafarianism"
1110
- | "paste"
1111
- | "patreon"
1112
- | "pause"
1113
- | "pause-circle"
1114
- | "paw"
1115
- | "paypal"
1116
- | "peace"
1117
- | "pen"
1118
- | "pen-alt"
1119
- | "pen-fancy"
1120
- | "pen-nib"
1121
- | "pen-square"
1122
- | "pencil-alt"
1123
- | "pencil-ruler"
1124
- | "penny-arcade"
1125
- | "people-arrows"
1126
- | "people-carry"
1127
- | "pepper-hot"
1128
- | "perbyte"
1129
- | "percent"
1130
- | "percentage"
1131
- | "periscope"
1132
- | "person-booth"
1133
- | "phabricator"
1134
- | "phoenix-framework"
1135
- | "phoenix-squadron"
1136
- | "phone"
1137
- | "phone-alt"
1138
- | "phone-slash"
1139
- | "phone-square"
1140
- | "phone-square-alt"
1141
- | "phone-volume"
1142
- | "photo-video"
1143
- | "php"
1144
- | "pied-piper"
1145
- | "pied-piper-alt"
1146
- | "pied-piper-hat"
1147
- | "pied-piper-pp"
1148
- | "pied-piper-square"
1149
- | "piggy-bank"
1150
- | "pills"
1151
- | "pinterest"
1152
- | "pinterest-p"
1153
- | "pinterest-square"
1154
- | "pizza-slice"
1155
- | "place-of-worship"
1156
- | "plane"
1157
- | "plane-arrival"
1158
- | "plane-departure"
1159
- | "plane-slash"
1160
- | "play"
1161
- | "play-circle"
1162
- | "playstation"
1163
- | "plug"
1164
- | "plus"
1165
- | "plus-circle"
1166
- | "plus-square"
1167
- | "podcast"
1168
- | "poll"
1169
- | "poll-h"
1170
- | "poo"
1171
- | "poo-storm"
1172
- | "poop"
1173
- | "portrait"
1174
- | "pound-sign"
1175
- | "power-off"
1176
- | "pray"
1177
- | "praying-hands"
1178
- | "prescription"
1179
- | "prescription-bottle"
1180
- | "prescription-bottle-alt"
1181
- | "print"
1182
- | "procedures"
1183
- | "product-hunt"
1184
- | "project-diagram"
1185
- | "pump-medical"
1186
- | "pump-soap"
1187
- | "pushed"
1188
- | "puzzle-piece"
1189
- | "python"
1190
- | "qq"
1191
- | "qrcode"
1192
- | "question"
1193
- | "question-circle"
1194
- | "quidditch"
1195
- | "quinscape"
1196
- | "quora"
1197
- | "quote-left"
1198
- | "quote-right"
1199
- | "quran"
1200
- | "r-project"
1201
- | "radiation"
1202
- | "radiation-alt"
1203
- | "rainbow"
1204
- | "random"
1205
- | "raspberry-pi"
1206
- | "ravelry"
1207
- | "react"
1208
- | "reacteurope"
1209
- | "readme"
1210
- | "rebel"
1211
- | "receipt"
1212
- | "record-vinyl"
1213
- | "recycle"
1214
- | "red-river"
1215
- | "reddit"
1216
- | "reddit-alien"
1217
- | "reddit-square"
1218
- | "redhat"
1219
- | "redo"
1220
- | "redo-alt"
1221
- | "registered"
1222
- | "remove-format"
1223
- | "renren"
1224
- | "reply"
1225
- | "reply-all"
1226
- | "replyd"
1227
- | "republican"
1228
- | "researchgate"
1229
- | "resolving"
1230
- | "restroom"
1231
- | "retweet"
1232
- | "rev"
1233
- | "ribbon"
1234
- | "ring"
1235
- | "road"
1236
- | "robot"
1237
- | "rocket"
1238
- | "rocketchat"
1239
- | "rockrms"
1240
- | "route"
1241
- | "rss"
1242
- | "rss-square"
1243
- | "ruble-sign"
1244
- | "ruler"
1245
- | "ruler-combined"
1246
- | "ruler-horizontal"
1247
- | "ruler-vertical"
1248
- | "running"
1249
- | "rupee-sign"
1250
- | "rust"
1251
- | "sad-cry"
1252
- | "sad-tear"
1253
- | "safari"
1254
- | "salesforce"
1255
- | "sass"
1256
- | "satellite"
1257
- | "satellite-dish"
1258
- | "save"
1259
- | "schlix"
1260
- | "school"
1261
- | "screwdriver"
1262
- | "scribd"
1263
- | "scroll"
1264
- | "sd-card"
1265
- | "search"
1266
- | "search-dollar"
1267
- | "search-location"
1268
- | "search-minus"
1269
- | "search-plus"
1270
- | "searchengin"
1271
- | "seedling"
1272
- | "sellcast"
1273
- | "sellsy"
1274
- | "server"
1275
- | "servicestack"
1276
- | "shapes"
1277
- | "share"
1278
- | "share-alt"
1279
- | "share-alt-square"
1280
- | "share-square"
1281
- | "shekel-sign"
1282
- | "shield-alt"
1283
- | "shield-virus"
1284
- | "ship"
1285
- | "shipping-fast"
1286
- | "shirtsinbulk"
1287
- | "shoe-prints"
1288
- | "shopify"
1289
- | "shopping-bag"
1290
- | "shopping-basket"
1291
- | "shopping-cart"
1292
- | "shopware"
1293
- | "shower"
1294
- | "shuttle-van"
1295
- | "sign"
1296
- | "sign-in-alt"
1297
- | "sign-language"
1298
- | "sign-out-alt"
1299
- | "signal"
1300
- | "signature"
1301
- | "sim-card"
1302
- | "simplybuilt"
1303
- | "sink"
1304
- | "sistrix"
1305
- | "sitemap"
1306
- | "sith"
1307
- | "skating"
1308
- | "sketch"
1309
- | "skiing"
1310
- | "skiing-nordic"
1311
- | "skull"
1312
- | "skull-crossbones"
1313
- | "skyatlas"
1314
- | "skype"
1315
- | "slack"
1316
- | "slack-hash"
1317
- | "slash"
1318
- | "sleigh"
1319
- | "sliders-h"
1320
- | "slideshare"
1321
- | "smile"
1322
- | "smile-beam"
1323
- | "smile-wink"
1324
- | "smog"
1325
- | "smoking"
1326
- | "smoking-ban"
1327
- | "sms"
1328
- | "snapchat"
1329
- | "snapchat-ghost"
1330
- | "snapchat-square"
1331
- | "snowboarding"
1332
- | "snowflake"
1333
- | "snowman"
1334
- | "snowplow"
1335
- | "soap"
1336
- | "socks"
1337
- | "solar-panel"
1338
- | "sort"
1339
- | "sort-alpha-down"
1340
- | "sort-alpha-down-alt"
1341
- | "sort-alpha-up"
1342
- | "sort-alpha-up-alt"
1343
- | "sort-amount-down"
1344
- | "sort-amount-down-alt"
1345
- | "sort-amount-up"
1346
- | "sort-amount-up-alt"
1347
- | "sort-down"
1348
- | "sort-numeric-down"
1349
- | "sort-numeric-down-alt"
1350
- | "sort-numeric-up"
1351
- | "sort-numeric-up-alt"
1352
- | "sort-up"
1353
- | "soundcloud"
1354
- | "sourcetree"
1355
- | "spa"
1356
- | "space-shuttle"
1357
- | "speakap"
1358
- | "speaker-deck"
1359
- | "spell-check"
1360
- | "spider"
1361
- | "spinner"
1362
- | "splotch"
1363
- | "spotify"
1364
- | "spray-can"
1365
- | "square"
1366
- | "square-full"
1367
- | "square-root-alt"
1368
- | "squarespace"
1369
- | "stack-exchange"
1370
- | "stack-overflow"
1371
- | "stackpath"
1372
- | "stamp"
1373
- | "star"
1374
- | "star-and-crescent"
1375
- | "star-half"
1376
- | "star-half-alt"
1377
- | "star-of-david"
1378
- | "star-of-life"
1379
- | "staylinked"
1380
- | "steam"
1381
- | "steam-square"
1382
- | "steam-symbol"
1383
- | "step-backward"
1384
- | "step-forward"
1385
- | "stethoscope"
1386
- | "sticker-mule"
1387
- | "sticky-note"
1388
- | "stop"
1389
- | "stop-circle"
1390
- | "stopwatch"
1391
- | "stopwatch-20"
1392
- | "store"
1393
- | "store-alt"
1394
- | "store-alt-slash"
1395
- | "store-slash"
1396
- | "strava"
1397
- | "stream"
1398
- | "street-view"
1399
- | "strikethrough"
1400
- | "stripe"
1401
- | "stripe-s"
1402
- | "stroopwafel"
1403
- | "studiovinari"
1404
- | "stumbleupon"
1405
- | "stumbleupon-circle"
1406
- | "subscript"
1407
- | "subway"
1408
- | "suitcase"
1409
- | "suitcase-rolling"
1410
- | "sun"
1411
- | "superpowers"
1412
- | "superscript"
1413
- | "supple"
1414
- | "surprise"
1415
- | "suse"
1416
- | "swatchbook"
1417
- | "swift"
1418
- | "swimmer"
1419
- | "swimming-pool"
1420
- | "symfony"
1421
- | "synagogue"
1422
- | "sync"
1423
- | "sync-alt"
1424
- | "syringe"
1425
- | "table"
1426
- | "table-tennis"
1427
- | "tablet"
1428
- | "tablet-alt"
1429
- | "tablets"
1430
- | "tachometer-alt"
1431
- | "tag"
1432
- | "tags"
1433
- | "tape"
1434
- | "tasks"
1435
- | "taxi"
1436
- | "teamspeak"
1437
- | "teeth"
1438
- | "teeth-open"
1439
- | "telegram"
1440
- | "telegram-plane"
1441
- | "temperature-high"
1442
- | "temperature-low"
1443
- | "tencent-weibo"
1444
- | "tenge"
1445
- | "terminal"
1446
- | "text-height"
1447
- | "text-width"
1448
- | "th"
1449
- | "th-large"
1450
- | "th-list"
1451
- | "the-red-yeti"
1452
- | "theater-masks"
1453
- | "themeco"
1454
- | "themeisle"
1455
- | "thermometer"
1456
- | "thermometer-empty"
1457
- | "thermometer-full"
1458
- | "thermometer-half"
1459
- | "thermometer-quarter"
1460
- | "thermometer-three-quarters"
1461
- | "think-peaks"
1462
- | "thumbs-down"
1463
- | "thumbs-up"
1464
- | "thumbtack"
1465
- | "ticket-alt"
1466
- | "tiktok"
1467
- | "times"
1468
- | "times-circle"
1469
- | "tint"
1470
- | "tint-slash"
1471
- | "tired"
1472
- | "toggle-off"
1473
- | "toggle-on"
1474
- | "toilet"
1475
- | "toilet-paper"
1476
- | "toilet-paper-slash"
1477
- | "toolbox"
1478
- | "tools"
1479
- | "tooth"
1480
- | "torah"
1481
- | "torii-gate"
1482
- | "tractor"
1483
- | "trade-federation"
1484
- | "trademark"
1485
- | "traffic-light"
1486
- | "trailer"
1487
- | "train"
1488
- | "tram"
1489
- | "transgender"
1490
- | "transgender-alt"
1491
- | "trash"
1492
- | "trash-alt"
1493
- | "trash-restore"
1494
- | "trash-restore-alt"
1495
- | "tree"
1496
- | "trello"
1497
- | "tripadvisor"
1498
- | "trophy"
1499
- | "truck"
1500
- | "truck-loading"
1501
- | "truck-monster"
1502
- | "truck-moving"
1503
- | "truck-pickup"
1504
- | "tshirt"
1505
- | "tty"
1506
- | "tumblr"
1507
- | "tumblr-square"
1508
- | "tv"
1509
- | "twitch"
1510
- | "twitter"
1511
- | "twitter-square"
1512
- | "typo3"
1513
- | "uber"
1514
- | "ubuntu"
1515
- | "uikit"
1516
- | "umbraco"
1517
- | "umbrella"
1518
- | "umbrella-beach"
1519
- | "uncharted"
1520
- | "underline"
1521
- | "undo"
1522
- | "undo-alt"
1523
- | "uniregistry"
1524
- | "unity"
1525
- | "universal-access"
1526
- | "university"
1527
- | "unlink"
1528
- | "unlock"
1529
- | "unlock-alt"
1530
- | "unsplash"
1531
- | "untappd"
1532
- | "upload"
1533
- | "ups"
1534
- | "usb"
1535
- | "user"
1536
- | "user-alt"
1537
- | "user-alt-slash"
1538
- | "user-astronaut"
1539
- | "user-check"
1540
- | "user-circle"
1541
- | "user-clock"
1542
- | "user-cog"
1543
- | "user-edit"
1544
- | "user-friends"
1545
- | "user-graduate"
1546
- | "user-injured"
1547
- | "user-lock"
1548
- | "user-md"
1549
- | "user-minus"
1550
- | "user-ninja"
1551
- | "user-nurse"
1552
- | "user-plus"
1553
- | "user-secret"
1554
- | "user-shield"
1555
- | "user-slash"
1556
- | "user-tag"
1557
- | "user-tie"
1558
- | "user-times"
1559
- | "users"
1560
- | "users-cog"
1561
- | "users-slash"
1562
- | "usps"
1563
- | "ussunnah"
1564
- | "utensil-spoon"
1565
- | "utensils"
1566
- | "vaadin"
1567
- | "vector-square"
1568
- | "venus"
1569
- | "venus-double"
1570
- | "venus-mars"
1571
- | "vest"
1572
- | "vest-patches"
1573
- | "viacoin"
1574
- | "viadeo"
1575
- | "viadeo-square"
1576
- | "vial"
1577
- | "vials"
1578
- | "viber"
1579
- | "video"
1580
- | "video-slash"
1581
- | "vihara"
1582
- | "vimeo"
1583
- | "vimeo-square"
1584
- | "vimeo-v"
1585
- | "vine"
1586
- | "virus"
1587
- | "virus-slash"
1588
- | "viruses"
1589
- | "vk"
1590
- | "vnv"
1591
- | "voicemail"
1592
- | "volleyball-ball"
1593
- | "volume-down"
1594
- | "volume-mute"
1595
- | "volume-off"
1596
- | "volume-up"
1597
- | "vote-yea"
1598
- | "vr-cardboard"
1599
- | "vuejs"
1600
- | "walking"
1601
- | "wallet"
1602
- | "warehouse"
1603
- | "watchman-monitoring"
1604
- | "water"
1605
- | "wave-square"
1606
- | "waze"
1607
- | "weebly"
1608
- | "weibo"
1609
- | "weight"
1610
- | "weight-hanging"
1611
- | "weixin"
1612
- | "whatsapp"
1613
- | "whatsapp-square"
1614
- | "wheelchair"
1615
- | "whmcs"
1616
- | "wifi"
1617
- | "wikipedia-w"
1618
- | "wind"
1619
- | "window-close"
1620
- | "window-maximize"
1621
- | "window-minimize"
1622
- | "window-restore"
1623
- | "windows"
1624
- | "wine-bottle"
1625
- | "wine-glass"
1626
- | "wine-glass-alt"
1627
- | "wix"
1628
- | "wizards-of-the-coast"
1629
- | "wodu"
1630
- | "wolf-pack-battalion"
1631
- | "won-sign"
1632
- | "wordpress"
1633
- | "wordpress-simple"
1634
- | "wpbeginner"
1635
- | "wpexplorer"
1636
- | "wpforms"
1637
- | "wpressr"
1638
- | "wrench"
1639
- | "x-ray"
1640
- | "xbox"
1641
- | "xing"
1642
- | "xing-square"
1643
- | "y-combinator"
1644
- | "yahoo"
1645
- | "yammer"
1646
- | "yandex"
1647
- | "yandex-international"
1648
- | "yarn"
1649
- | "yelp"
1650
- | "yen-sign"
1651
- | "yin-yang"
1652
- | "yoast"
1653
- | "youtube"
1654
- | "youtube-square"
1655
- | "zhihu";
351
+ export type IconName = FontAwesome6SolidNames | FontAwesome6BrandNames | FontAwesome6RegularNames;
1656
352
 
1657
353
  export type AlignContent = "start" | "end" | "center" | "between" | "around" | "stretch";
1658
354
  export type AlignSelf = "auto" | "start" | "end" | "center" | "baseline" | "stretch";
@@ -1675,7 +371,28 @@ export type SignedUpTo12 =
1675
371
  | -1
1676
372
  | UnsignedUpTo12;
1677
373
  export type Margin = SignedUpTo12 | "auto";
1678
- export const SPACING = 4;
374
+ export const SPACING_MAP = {
375
+ 0: 0,
376
+ 1: 4,
377
+ 2: 8,
378
+ 3: 12,
379
+ 4: 16,
380
+ 5: 24,
381
+ 6: 32,
382
+ 7: 40,
383
+ 8: 48,
384
+ 9: 56,
385
+ 10: 64,
386
+ 11: 72,
387
+ 12: 80,
388
+ };
389
+
390
+ export function getSpacing(spacing: SignedUpTo12) {
391
+ if (spacing < 0) {
392
+ return SPACING_MAP[Math.abs(spacing) as UnsignedUpTo12] * -1;
393
+ }
394
+ return SPACING_MAP[spacing as UnsignedUpTo12];
395
+ }
1679
396
 
1680
397
  export type TextFieldType =
1681
398
  | "date"
@@ -1683,7 +400,7 @@ export type TextFieldType =
1683
400
  | "decimal"
1684
401
  | "decimalRange"
1685
402
  | "email"
1686
- | "height"
403
+ // | "height"
1687
404
  | "password"
1688
405
  | "phoneNumber"
1689
406
  | "number"
@@ -1694,60 +411,33 @@ export type TextFieldType =
1694
411
  | "url"
1695
412
  | "username";
1696
413
 
1697
- export type IconSize = "xs" | "sm" | "md" | "lg" | "xl";
414
+ export type IconSize = "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
1698
415
 
1699
416
  export const iconSizeToNumber = (size?: IconSize) => {
1700
417
  return {
1701
418
  xs: 8,
1702
419
  sm: 12,
1703
- md: 14,
420
+ md: 16,
1704
421
  lg: 20,
1705
- xl: 26,
422
+ xl: 24,
423
+ "2xl": 28,
1706
424
  }[size || "md"];
1707
425
  };
1708
426
 
1709
- export type TextSize = "xs" | "sm" | "md" | "lg";
1710
- export type TextColor =
1711
- | "blue"
1712
- | "darkGray"
1713
- | "eggplant"
1714
- | "gray"
1715
- | "green"
1716
- | "lightGray"
1717
- | "maroon"
1718
- | "midnight"
1719
- | "navy"
1720
- | "olive"
1721
- | "orange"
1722
- | "orchid"
1723
- | "pine"
1724
- | "purple"
1725
- | "red"
1726
- | "watermelon"
1727
- | "white"; // default "darkGray"
1728
-
1729
- export type ButtonColor =
1730
- | "blue"
1731
- | "gray"
1732
- | "red"
1733
- // | "transparent"
1734
- | "white"
1735
- | "primary"
1736
- | "secondary"
1737
- | "accent"
1738
- | "tertiary";
427
+ export type TextSize = "sm" | "md" | "lg" | "xl";
1739
428
 
1740
429
  export type IconPrefix = "far" | "fas";
1741
430
 
1742
- export interface BlurBoxProps extends BoxProps {
1743
- blurType?: "regular" | "dark" | "prominent";
1744
- }
1745
-
1746
431
  export interface LayerProps {
1747
432
  children: ReactChildren;
1748
433
  }
1749
434
 
1750
- export interface BoxProps {
435
+ type AccessibilityProps = {
436
+ accessibilityLabel: string;
437
+ accessibilityHint: string;
438
+ };
439
+
440
+ export interface BoxPropsBase {
1751
441
  alignContent?: AlignContent;
1752
442
  alignItems?: AlignItems;
1753
443
  alignSelf?: AlignSelf;
@@ -1773,6 +463,7 @@ export interface BoxProps {
1773
463
  lgDisplay?: "none" | "flex" | "block" | "inlineBlock" | "visuallyHidden";
1774
464
  fit?: boolean;
1775
465
  flex?: "grow" | "shrink" | "none";
466
+ gap?: SignedUpTo12;
1776
467
  height?: number | string;
1777
468
  justifyContent?: "start" | "end" | "center" | "between" | "around";
1778
469
  left?: boolean;
@@ -1823,7 +514,7 @@ export interface BoxProps {
1823
514
  lgPaddingY?: UnsignedUpTo12;
1824
515
  position?: "static" | "absolute" | "relative" | "fixed";
1825
516
  right?: boolean;
1826
- rounding?: "pill" | "circle" | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
517
+ rounding?: Rounding | "circle";
1827
518
  top?: boolean;
1828
519
  width?: number | string;
1829
520
  wrap?: boolean;
@@ -1836,11 +527,11 @@ export interface BoxProps {
1836
527
  onHoverEnd?: () => void | Promise<void>;
1837
528
  scroll?: boolean;
1838
529
  shadow?: boolean;
1839
- border?: AllColors;
1840
- borderBottom?: AllColors;
1841
- borderTop?: AllColors;
1842
- borderLeft?: AllColors;
1843
- borderRight?: AllColors;
530
+ border?: BorderColor;
531
+ borderBottom?: BorderColor;
532
+ borderTop?: BorderColor;
533
+ borderLeft?: BorderColor;
534
+ borderRight?: BorderColor;
1844
535
 
1845
536
  avoidKeyboard?: boolean;
1846
537
  keyboardOffset?: number;
@@ -1850,7 +541,11 @@ export interface BoxProps {
1850
541
  testID?: string;
1851
542
  }
1852
543
 
1853
- export type BoxColor = AllColors | "transparent";
544
+ // If onClick is provided, add accessibility props.
545
+ export type BoxProps =
546
+ | (BoxPropsBase & {onClick?: undefined})
547
+ | (BoxPropsBase & {onClick: () => void} & AccessibilityProps);
548
+ export type BoxColor = SurfaceColor | "transparent";
1854
549
 
1855
550
  export interface ErrorBoundaryProps {
1856
551
  onError?: (error: Error, stack: any) => void;
@@ -1858,69 +553,31 @@ export interface ErrorBoundaryProps {
1858
553
  }
1859
554
 
1860
555
  export interface IconProps {
1861
- prefix?: IconPrefix; // For support FA solid/regular/light/duotone, as well as other icon packs in the future.
1862
- name: IconName;
1863
- color?: AllColors;
556
+ iconName: IconName;
557
+ type?:
558
+ | "regular"
559
+ | "brand"
560
+ | "solid"
561
+ | "light"
562
+ | "thin"
563
+ | "duotone"
564
+ | "sharpSolid"
565
+ | "sharpLight"
566
+ | "sharp";
567
+ color?: IconColor;
1864
568
  size?: IconSize;
1865
- iconStyle?: any;
1866
- containerStyle?: any;
1867
569
  testID?: string;
1868
570
  }
1869
571
 
1870
- export type TooltipDirection = "top" | "bottom" | "left" | "right";
572
+ export type TooltipPosition = "top" | "bottom" | "left" | "right";
1871
573
 
1872
574
  export type IndicatorDirection = "topLeft" | "topRight" | "bottomLeft" | "bottomRight";
1873
575
 
1874
- export interface PillProps {
1875
- text: string;
1876
- color: AllColors;
1877
- enabled?: boolean;
1878
- onClick: (enabled: boolean) => void;
1879
- }
1880
-
1881
- type BaseSegmentedControlProps = {
576
+ export interface SegmentedControlProps {
1882
577
  items: string[];
1883
- responsive?: boolean;
1884
- size?: "md" | "lg";
1885
- selectLimit?: number;
1886
- };
1887
-
1888
- export type SegmentedControlPropsSingleSelect = BaseSegmentedControlProps & {
1889
- multiselect?: false;
1890
- onChange: ({activeIndex}: {activeIndex: number}) => void;
1891
- selectedItemIndex?: number;
1892
- };
1893
-
1894
- export type SegmentedControlPropsMultiSelect = BaseSegmentedControlProps & {
1895
- multiselect: true;
1896
- onChange: ({activeIndex}: {activeIndex: number[]}) => void;
1897
- selectedItemIndexes?: number[];
1898
- };
1899
-
1900
- export type SegmentedControlProps =
1901
- | SegmentedControlPropsSingleSelect
1902
- | SegmentedControlPropsMultiSelect;
1903
-
1904
- // Shared props for fields with labels, subtext, and error messages.
1905
- export interface FieldWithLabelsProps {
1906
- testID?: string;
1907
- errorMessage?: string;
1908
- errorMessageColor?: AllColors; // Default: red.
1909
- label?: string;
1910
- labelColor?: AllColors;
1911
- helperText?: string;
1912
- helperTextColor?: AllColors;
1913
- children?: ReactChildren;
1914
- }
1915
-
1916
- export interface DateTimeFieldProps extends FieldWithLabelsProps {
1917
- label?: string;
1918
- mode: "date" | "time" | "datetime";
1919
- value: Date;
1920
- onChange: (date: Date) => void;
1921
- dateFormat?: string;
1922
- pickerType?: "default" | "compact" | "inline" | "spinner";
1923
- showTimezone?: boolean; // defaults to true
578
+ size?: "md" | "lg"; // default "md"
579
+ onChange: (activeIndex: number) => void;
580
+ selectedIndex?: number;
1924
581
  }
1925
582
 
1926
583
  export interface TimezonePickerProps {
@@ -1930,93 +587,146 @@ export interface TimezonePickerProps {
1930
587
  width?: number | string; // defaults to 100
1931
588
  }
1932
589
 
1933
- export interface TextFieldProps extends FieldWithLabelsProps {
1934
- innerRef?: any;
1935
- id?: string;
1936
- onChange: OnChangeCallback;
1937
- autoComplete?: "current-password" | "on" | "off" | "username";
1938
- disabled?: boolean;
590
+ // extend TextStyle to include "outline" since it exists for web
591
+ export interface TextStyleWithOutline extends TextStyle {
592
+ outline?: string;
593
+ }
1939
594
 
1940
- idealErrorDirection?: Direction;
1941
- name?: string;
1942
- onBlur?: OnChangeCallback;
1943
- onFocus?: OnChangeCallback;
595
+ interface BaseFieldProps {
596
+ id?: string;
597
+ testID?: string;
598
+ title?: string;
1944
599
  placeholder?: string;
1945
- type?: TextFieldType;
600
+ iconName?: IconName;
601
+ onIconClick?: () => void;
602
+ onBlur?: OnChangeCallback;
603
+ onChange: OnChangeCallback;
604
+ onEnter?: () => void;
605
+ onFocus?: () => void;
606
+ onSubmitEditing?: () => void;
607
+ blurOnSubmit?: boolean;
608
+ disabled?: boolean; // default false
1946
609
  value?: string;
1947
- style?: any;
1948
- // If type === search, indicates whether to show the search icon or spinner
1949
- searching?: boolean;
610
+ }
611
+
612
+ export interface HelperTextProps {
613
+ helperText?: string;
614
+ }
1950
615
 
616
+ export interface ErrorTextProps {
617
+ errorText?: string;
618
+ }
619
+
620
+ export interface TextFieldProps extends BaseFieldProps, HelperTextProps, ErrorTextProps {
621
+ type?: "email" | "password" | "phoneNumber" | "search" | "text" | "url";
622
+
623
+ autoComplete?: "current-password" | "on" | "off" | "username";
1951
624
  returnKeyType?: "done" | "go" | "next" | "search" | "send";
1952
625
 
1953
- // TODO: still needed?
1954
- autoFocus?: boolean;
1955
626
  grow?: boolean;
1956
- // react-native-autofocus
1957
- inputRef?: any;
1958
- onSubmitEditing?: any;
1959
- onEnter?: any;
1960
- // blurOnSubmit defaults to true
1961
- // if blurOnSubmit is false and multiline is true, return will create a new line
1962
- blurOnSubmit?: boolean;
1963
627
  multiline?: boolean;
1964
628
  rows?: number;
1965
- height?: number;
1966
- // Required for type=numberRange
629
+
630
+ inputRef?: any;
631
+ }
632
+
633
+ export interface TextAreaProps extends Omit<TextFieldProps, "multiline" | "type"> {}
634
+
635
+ export interface NumberFieldProps extends BaseFieldProps, HelperTextProps, ErrorTextProps {
636
+ type: "number" | "decimal";
1967
637
  min?: number;
1968
638
  max?: number;
1969
- // Options to translate values
1970
- transformValue?: TransformValueOptions;
1971
639
  }
1972
640
 
1973
- export type TextAreaProps = TextFieldProps;
641
+ export interface NumberRangeFieldProps extends BaseFieldProps, HelperTextProps, ErrorTextProps {
642
+ type: "numberRange" | "decimalRange";
643
+ min: number;
644
+ max: number;
645
+ }
1974
646
 
1975
- export interface SwitchProps extends FieldWithLabelsProps {
1976
- id?: string;
1977
- onChange: (value: boolean) => void;
1978
- disabled?: boolean;
1979
- name?: string;
1980
- switched: boolean;
1981
- // Pattern Addition
1982
- label?: string;
647
+ export interface DateTimeFieldProps extends BaseFieldProps, HelperTextProps, ErrorTextProps {
648
+ type: "date" | "datetime" | "time";
649
+ value?: string; // ISO string always
650
+ onChange: (date: string) => void;
651
+ dateFormat?: string;
652
+ pickerType?: "default" | "compact" | "inline" | "spinner";
653
+ showTimezone?: boolean; // defaults to true
654
+ timezone?: string;
1983
655
  }
1984
656
 
1985
- export interface MaskProps {
1986
- children?: ReactChildren;
1987
- shape?: "circle" | "rounded" | "square";
1988
- height?: number | string;
1989
- width?: number | string;
1990
- maxHeight?: number | string;
1991
- maxWidth?: number | string;
1992
- rounding?: "circle" | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8;
1993
- willChangeTransform?: boolean;
1994
- wash?: boolean;
657
+ export interface EmailFieldProps extends BaseFieldProps, HelperTextProps, ErrorTextProps {}
658
+
659
+ export interface PhoneNumberFieldProps extends BaseFieldProps, HelperTextProps, ErrorTextProps {
660
+ /**
661
+ * Defaults to "US"
662
+ */
663
+ defaultCountryCode?: CountryCode;
1995
664
  }
1996
665
 
1997
- export interface IconRowProps {
1998
- icon: string;
1999
- label: string;
2000
- value: string;
666
+ export interface URLFieldProps extends BaseFieldProps, HelperTextProps, ErrorTextProps {}
667
+
668
+ export interface SearchFieldProps extends BaseFieldProps, HelperTextProps, ErrorTextProps {}
669
+
670
+ export interface PercentFieldProps extends BaseFieldProps, HelperTextProps, ErrorTextProps {}
671
+
672
+ export interface CurrencyFieldProps extends BaseFieldProps, HelperTextProps, ErrorTextProps {}
673
+
674
+ export interface AddressFieldProps
675
+ extends Omit<BaseFieldProps, "value" | "onChange" | "onBlur">,
676
+ HelperTextProps,
677
+ ErrorTextProps {
678
+ includeCounty?: boolean;
679
+ googleMapsApiKey?: string;
680
+ googlePlacesMobileStyles?: Styles;
681
+ value: AddressInterface;
682
+ onChange: (value: AddressInterface) => void;
683
+ onBlur?: (value: AddressInterface) => void;
2001
684
  }
2002
685
 
2003
686
  export interface LinkProps {
2004
687
  href: string;
2005
- inline?: boolean;
2006
- children?: ReactChild;
688
+ text: string;
2007
689
  onClick?: () => void;
2008
- target?: null | "blank";
2009
- }
690
+ // TODO: support target on link
691
+ // target?: null | "blank";
692
+ }
693
+
694
+ export type Rounding =
695
+ | "minimal" // alias "sm"
696
+ | "default" // alias "md"
697
+ | "full" // alias "lg"
698
+ | "rounded" // alias "3xl"
699
+ | "sm"
700
+ | "md"
701
+ | "lg"
702
+ | "xl"
703
+ | "2xl"
704
+ | "3xl";
705
+
706
+ const ROUNDING_MAP = {
707
+ minimal: 2,
708
+ default: 3,
709
+ full: 16,
710
+ rounded: 360,
711
+ sm: 2,
712
+ md: 4,
713
+ lg: 16,
714
+ xl: 32,
715
+ "2xl": 128,
716
+ "3xl": 360,
717
+ };
2010
718
 
2011
- export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | "circle" | "pill";
719
+ export function getRounding(rounding: Rounding) {
720
+ return ROUNDING_MAP[rounding];
721
+ }
2012
722
 
2013
723
  // eslint-disable-next-line @typescript-eslint/no-empty-interface
2014
724
  export interface HeadingProps {
2015
725
  align?: "left" | "right" | "center" | "justify"; // default "left"
2016
726
  children?: React.ReactNode;
2017
- color?: AllColors;
727
+ color?: TextColor;
2018
728
  overflow?: "normal" | "breakWord"; // default "breakWord"
2019
- size?: "sm" | "md" | "lg";
729
+ size?: "sm" | "md" | "lg" | "xl"; // default "sm"
2020
730
  truncate?: boolean; // default false
2021
731
  testID?: string;
2022
732
  }
@@ -2057,22 +767,32 @@ export interface BackButtonInterface {
2057
767
  onBack: () => void;
2058
768
  }
2059
769
 
2060
- export interface CheckBoxProps {
2061
- onChange: ({value}: {value: boolean}) => void;
2062
- checked?: boolean;
770
+ export interface BooleanFieldProps extends HelperTextProps, ErrorTextProps {
771
+ title?: string;
772
+ variant?: "simple" | "title"; // default "simple"
2063
773
  disabled?: boolean;
2064
- hasError?: boolean;
2065
- indeterminate?: boolean;
2066
- name?: string;
2067
- onClick?: any;
2068
- size?: "sm" | "md";
2069
- color?: AllColors;
2070
- radio?: boolean;
774
+ disabledHelperText?: string;
775
+ value: boolean;
776
+ onChange: (value: boolean) => void;
777
+ }
2071
778
 
2072
- label?: string;
2073
- subLabel?: string;
2074
- labelColor?: AllColors;
2075
- testID?: string;
779
+ export interface CheckBoxProps {
780
+ /**
781
+ * The background color of the checkbox.
782
+ * @default "default"
783
+ */
784
+ bgColor?: "default" | "accent" | "black";
785
+
786
+ /**
787
+ * If true, the checkbox is selected.
788
+ */
789
+ selected: boolean;
790
+
791
+ /**
792
+ * The size of the checkbox.
793
+ * @default "md"
794
+ */
795
+ size?: "sm" | "md" | "lg";
2076
796
  }
2077
797
 
2078
798
  interface LayoutRectangle {
@@ -2106,7 +826,7 @@ export interface SplitPageProps {
2106
826
  // boolean to initiate and handle state from the app that has imported ferns-ui
2107
827
  showItemList?: boolean;
2108
828
  loading?: boolean;
2109
- color?: Color;
829
+ color?: SurfaceColor;
2110
830
  keyboardOffset?: number;
2111
831
  renderListViewItem: (itemInfo: ListRenderItemInfo<any>) => ReactElement | null;
2112
832
  renderListViewHeader?: () => ReactElement | null;
@@ -2531,34 +1251,29 @@ export type ActionSheetProps = {
2531
1251
  onPositionChanged?: (hasReachedTop: boolean) => void;
2532
1252
  };
2533
1253
 
2534
- export type AvatarStatus =
2535
- | "online"
2536
- | "offline"
2537
- | "doNotDisturb"
2538
- | "away"
2539
- | "meeting"
2540
- | "vacation"
2541
- | "sick"
2542
- | "outOfOffice"
2543
- | "commuting";
1254
+ export type AvatarStatus = "offline" | "online" | "outOfOffice" | "activeMobile" | "imagePicker";
1255
+
1256
+ export type AvatarImagePickerEvent = {
1257
+ avatarImageFormat?: string;
1258
+ base64?: string;
1259
+ uri?: string;
1260
+ height?: number;
1261
+ width?: number;
1262
+ };
1263
+
1264
+ export interface CustomSvgProps extends SvgProps {
1265
+ doNotDisturb?: boolean;
1266
+ }
2544
1267
 
2545
1268
  export interface AvatarProps {
2546
- // Color for the background of the circle when no src picture is present.
2547
- backgroundColor?: AllColors;
2548
- // Color for the initials when no src picture is present.
2549
- textColor?: AllColors;
2550
1269
  /**
2551
1270
  * The name of the user. This is used for the placeholder treatment if an image is not available.
2552
1271
  */
2553
1272
  name: string;
2554
- /**
2555
- * Override the generated initials from `name`.
2556
- */
2557
- initials?: string;
2558
1273
  /**
2559
1274
  * Adds a white border around Avatar so it's visible when displayed on other images.
2560
1275
  */
2561
- outline?: boolean;
1276
+ hasBorder?: boolean;
2562
1277
  /**
2563
1278
  * xs: 24px, sm: 32px, md: 48px, lg: 64px, xl: 120px.
2564
1279
  */
@@ -2568,137 +1283,262 @@ export interface AvatarProps {
2568
1283
  */
2569
1284
  src?: string;
2570
1285
  /**
2571
- * The fit for the image within the Avatar: "cover" | "contain" | "none".
2572
- * Default is undefined. See Image.tsx for more info
1286
+ * Function to handle the avatar image edit
2573
1287
  */
2574
- imageFit?: "cover" | "contain" | "none";
1288
+ onChange?: (val: AvatarImagePickerEvent) => void;
2575
1289
  /**
2576
- * Allow user to edit the image of the avatar
1290
+ * The status of the user to display with the avatar.
2577
1291
  */
2578
- editAvatarImage?: boolean;
1292
+ status?: AvatarStatus;
2579
1293
  /**
2580
- * Function to handle the avatar image edit
1294
+ * If true, the status will have a "Z" to indicate the user has snoozed notifications.
2581
1295
  */
2582
- onChange?: (val: any) => void;
1296
+ doNotDisturb?: boolean;
2583
1297
  /**
2584
- * Resize image width. If only the width is provided, the image will preserve aspect ratio
1298
+ * Accessibility label for the avatar image.
2585
1299
  */
2586
- avatarImageWidth?: number;
1300
+ accessibilityLabel?: string;
1301
+ }
1302
+
1303
+ export interface BadgeProps {
2587
1304
  /**
2588
- * Resize image height. If avatarImageWidth is also provided, the image aspect ratio may be
2589
- * distorted.
1305
+ * When status is "custom", determines the badge's background color.
2590
1306
  */
2591
- avatarImageHeight?: number;
1307
+ customBackgroundColor?: string;
2592
1308
  /**
2593
- * The image format that the image will be saved as after any edits by the expo-image-manipulator
1309
+ * When status is "custom", determines the badge's border color.
2594
1310
  */
2595
- avatarImageFormat?: SaveFormat;
1311
+ customBorderColor?: string;
2596
1312
  /**
2597
- * The status of the user to display with the avatar.
1313
+ * When status is "custom", determines the badge's icon color
2598
1314
  */
2599
- status?: AvatarStatus;
1315
+ customIconColor?: IconColor;
2600
1316
  /**
2601
- * If true, the status indicator will show a mobile icon instead of a dot, if status is one of
2602
- * "online", "away", "offline", or "doNotDisturb". Will show the normal status icon in other
2603
- * cases.
1317
+ * When status is "custom", determines the badge's icon
2604
1318
  */
2605
- statusMobile?: boolean;
1319
+ customIconName?: IconName;
2606
1320
  /**
2607
- * Text to show when hovering over the avatar image. Only works on web.
1321
+ * When status is "custom", determines the badge's text color.
2608
1322
  */
2609
- statusText?: string;
1323
+ customTextColor?: string;
2610
1324
  /**
2611
- * If edit icon should be present when no image is present
1325
+ * The name of the icon to display in the badge.
2612
1326
  */
2613
- shouldShowEditIconIfNoImage?: boolean;
2614
- }
1327
+ iconName?: IconName;
2615
1328
 
2616
- export interface BadgeProps {
2617
- // If `type` is set to "custom", a custom theme color should be provided.
2618
- color?: AllColors;
2619
- fontColor?: AllColors; // default "white"
2620
- fontWeight?: TextProps["weight"]; // default "bold"
2621
- iconProps?: IconProps;
2622
- // The text to display inside the badge.
2623
- title?: string;
2624
- // Position relative to the text. Top should only be used with headings.
2625
- position?: "bottom" | "top" | "middle"; // default "middle"
2626
- rounding?: Rounding;
2627
- size?: "xs" | "sm" | "md" | "lg"; // default "xs'
2628
- // Some default badge types. Occasionally, a custom badge might be required for different color
2629
- // schemes.
2630
- type?: "info" | "error" | "warning" | "success" | "neutral" | "custom"; // default "info
2631
- }
1329
+ // TODO: improve type discrimination
1330
+ // used for numberOnly variant to display "${maxValue}+" when value is greater than max
2632
1331
 
2633
- export interface BannerProps {
2634
- id: string;
2635
- customButtonProps?: Partial<ButtonProps>;
2636
- color?: BoxColor;
2637
- dismissible?: boolean;
2638
- iconName?: IconName;
2639
- negativeXMargin?: number;
2640
- onClick?: () => void;
2641
- shape?: Rounding;
2642
- subtext?: string;
2643
- text: string;
2644
- textColor?: TextColor;
2645
- type?: "dismiss" | "action" | "permanent" /* deprectiated */ | "customButton";
2646
- width?: number | string;
2647
- }
1332
+ /**
1333
+ * The maximum value to display. Used for "numberOnly" variant to display "${maxValue}+" when
1334
+ * value is greater than max.
1335
+ */
1336
+ maxValue?: number;
2648
1337
 
2649
- export interface BodyProps {
2650
- scroll?: boolean;
2651
- loading?: boolean;
2652
- padding?: UnsignedUpTo12;
2653
- height?: number | string;
2654
- avoidKeyboard?: boolean; // default true
2655
- children?: ReactNode;
2656
- }
1338
+ /**
1339
+ * If true, the badge will have a secondary style.
1340
+ * @default false
1341
+ */
1342
+ secondary?: boolean;
2657
1343
 
2658
- export interface ButtonProps {
2659
- alignSelf?: FlexStyle["alignSelf"];
2660
- text: string;
2661
- // TODO make this work for all colors
2662
- color?: ButtonColor | Color;
2663
- // default gray
2664
- disabled?: boolean; // default false
2665
- inline?: boolean; // default false
2666
- size?: "xs" | "sm" | "md" | "lg"; // default md
2667
- type?: "solid" | "ghost" | "outline"; // default solid
1344
+ /**
1345
+ * The status of the badge. Determines its color and appearance.
1346
+ * @default "info"
1347
+ */
1348
+ status?: "info" | "error" | "warning" | "success" | "neutral" | "custom";
1349
+
1350
+ /**
1351
+ * The text or number to display inside the badge.
1352
+ */
1353
+ value?: number | string;
1354
+
1355
+ /**
1356
+ * The variant of the badge. Determines if it displays an icon or number only.
1357
+ */
1358
+ variant?: "iconOnly" | "numberOnly";
1359
+ }
1360
+
1361
+ type BannerButtonProps = {
1362
+ /**
1363
+ * Text to display on optional banner button, will display button if provided
1364
+ */
1365
+ buttonText: string;
1366
+ /**
1367
+ * Icon to display on optional banner button
1368
+ */
1369
+ buttonIconName?: IconName;
1370
+ };
1371
+
1372
+ export interface BannerPropsBase {
1373
+ /**
1374
+ * Used to identify if banner has been dismissed by the user.
1375
+ */
1376
+ id: string;
1377
+ /**
1378
+ * The text to display in the main body of the banner.
1379
+ */
1380
+ text: string;
1381
+ /**
1382
+ * The status of the banner changes the color of the banner.
1383
+ * @default "info"
1384
+ */
1385
+ status?: "info" | "alert" | "warning";
1386
+ /**
1387
+ * Allows the banner to be dismissed and removed by clicking X button on the right.
1388
+ * @default false
1389
+ */
1390
+ dismissible?: boolean; // default false
1391
+ /**
1392
+ * Renders triangle with exclamation mark icon to the left of banner content.
1393
+ * @default false
1394
+ */
1395
+ hasIcon?: boolean;
1396
+ /**
1397
+ * Function called when optional button on banner is clicked.
1398
+ */
1399
+ buttonOnClick?: () => void | Promise<void>;
1400
+ }
1401
+
1402
+ export type BannerProps =
1403
+ | (BannerPropsBase & {buttonOnClick?: undefined})
1404
+ | (BannerPropsBase & {buttonOnClick: () => void | Promise<void>} & BannerButtonProps);
1405
+
1406
+ export interface BodyProps {
1407
+ scroll?: boolean;
2668
1408
  loading?: boolean;
2669
- onClick: any;
2670
- icon?: IconName;
2671
- iconPrefix?: IconPrefix;
2672
- iconColor?: ButtonColor | Color;
2673
- withConfirmation?: boolean;
1409
+ padding?: UnsignedUpTo12;
1410
+ height?: number | string;
1411
+ avoidKeyboard?: boolean; // default true
1412
+ children?: ReactNode;
1413
+ }
1414
+
1415
+ export interface ButtonProps {
1416
+ /**
1417
+ * The text content of the confirmation modal.
1418
+ * @default "Are you sure you want to continue?"
1419
+ */
2674
1420
  confirmationText?: string;
2675
- confirmationHeading?: string;
2676
- shape?: "rounded" | "pill";
1421
+ /**
1422
+ * If true, the button will be disabled.
1423
+ * @default false
1424
+ */
1425
+ disabled?: boolean;
1426
+ /**
1427
+ * If true, the button will take the full width of its container.
1428
+ * @default false
1429
+ */
1430
+ fullWidth?: boolean;
1431
+ /**
1432
+ * The name of the icon to display in the button.
1433
+ */
1434
+ iconName?: IconName;
1435
+ /**
1436
+ * The position of the icon within the button.
1437
+ * @default "left"
1438
+ */
1439
+ iconPosition?: "left" | "right";
1440
+ /**
1441
+ * If true, a loading spinner will be shown in the button.
1442
+ */
1443
+ loading?: boolean;
1444
+ /**
1445
+ * The title of the confirmation modal.
1446
+ * @default "Confirm"
1447
+ */
1448
+ modalTitle?: string;
1449
+ /**
1450
+ * The subtitle of the confirmation modal.
1451
+ */
1452
+ modalSubTitle?: string;
1453
+ /**
1454
+ * The test ID for the button, used for testing purposes.
1455
+ */
2677
1456
  testID?: string;
2678
- tooltip?: {
2679
- text: string;
2680
- idealDirection?: TooltipDirection;
2681
- };
1457
+ /**
1458
+ * The text content of the button.
1459
+ */
1460
+ text: string;
1461
+ /**
1462
+ * The position of the tooltip.
1463
+ */
1464
+ tooltipIdealPosition?: TooltipPosition;
1465
+ /**
1466
+ * Include an arrow in the tooltip. Pointing to the button.
1467
+ * @default false
1468
+ */
1469
+ tooltipIncludeArrow?: boolean;
1470
+ /**
1471
+ * The text content of the tooltip.
1472
+ */
1473
+ tooltipText?: string;
1474
+ /**
1475
+ * The type of the button, which determines its style.
1476
+ * @default "primary"
1477
+ */
1478
+ variant?: "primary" | "secondary" | "muted" | "outline" | "destructive";
1479
+ /**
1480
+ * If true, a confirmation modal will be shown before the onClick action.
1481
+ */
1482
+ withConfirmation?: boolean;
1483
+ /**
1484
+ * The function to call when the button is clicked.
1485
+ */
1486
+ onClick: () => void | Promise<void>;
2682
1487
  }
2683
1488
 
2684
- export interface CustomSelectProps {
2685
- value: string;
2686
- onChange: (value?: string) => void;
2687
- options: Array<{label: string; value: string}>;
1489
+ export interface CustomSelectFieldProps {
1490
+ /**
1491
+ * The current value of the select field.
1492
+ */
1493
+ value: string | undefined;
1494
+
1495
+ /**
1496
+ * The function to call when the selected value changes.
1497
+ */
1498
+ onChange: (value: string | undefined) => void;
1499
+
1500
+ /**
1501
+ * The options available for selection in the select field.
1502
+ * Each option should have a label and a value.
1503
+ */
1504
+ options: FieldOption[];
1505
+
1506
+ /**
1507
+ * The placeholder text to display when no option is selected.
1508
+ */
1509
+
2688
1510
  placeholder?: string;
1511
+ /**
1512
+ * If true, the select field will be disabled.
1513
+ * @default false
1514
+ */
2689
1515
  disabled?: boolean;
2690
- label?: string;
2691
- labelColor?: string;
1516
+
1517
+ /**
1518
+ * The error text to display if there is an error.
1519
+ */
1520
+ errorText?: string;
1521
+
1522
+ /**
1523
+ * The helper text to display below the select field.
1524
+ */
1525
+ helperText?: string;
1526
+
1527
+ /**
1528
+ * The title of the select field.
1529
+ */
1530
+ title?: string;
2692
1531
  }
1532
+
2693
1533
  export interface DateTimeActionSheetProps {
2694
1534
  value?: string;
2695
- mode?: "date" | "time" | "datetime";
1535
+ type?: "date" | "time" | "datetime";
2696
1536
  // Returns an ISO 8601 string. If mode is "time", the date portion is today.
2697
1537
  onChange: OnChangeCallback;
2698
1538
  actionSheetRef: React.RefObject<any>;
2699
1539
  visible: boolean;
2700
1540
  onDismiss: () => void;
2701
- transformValue?: TransformValueOptions;
1541
+ timezone?: string;
2702
1542
  }
2703
1543
 
2704
1544
  export interface DecimalRangeActionSheetProps {
@@ -2714,57 +1554,53 @@ export interface DecimalRangeActionSheetState {
2714
1554
  decimal: string;
2715
1555
  }
2716
1556
 
1557
+ export interface DismissButtonProps {
1558
+ /**
1559
+ * The accessibility hint describes the results of performing an action on a control or view.
1560
+ * It should be a very brief description of the result of interacting with the button.
1561
+ */
1562
+ accessibilityHint: string;
1563
+
1564
+ /**
1565
+ * The accessibility label attribute identifies the user interface element.
1566
+ * It should be a very brief description of the element, such as "Dismiss".
1567
+ */
1568
+ accessibilityLabel: string;
1569
+ /**
1570
+ * A function to call when the button is clicked,
1571
+ * function should result in hiding the element rendering the dismiss button.
1572
+ */
1573
+ onClick: () => void;
1574
+ /**
1575
+ * Color of the icon on the dismiss button
1576
+ * @default "primary"
1577
+ */
1578
+ color?: IconColor;
1579
+ }
2717
1580
  export interface ErrorPageProps {
2718
1581
  error: Error;
2719
1582
  resetError: () => void;
2720
1583
  }
2721
1584
 
2722
- export interface FieldProps extends FieldWithLabelsProps {
2723
- name?: string;
2724
- label?: string;
2725
- height?: number;
2726
- type?:
2727
- | "address"
2728
- | "boolean"
2729
- | "currency"
2730
- | "customSelect"
2731
- | "date"
2732
- | "datetime"
2733
- | "email"
2734
- | "multiselect"
2735
- | "number"
2736
- | "password"
2737
- | "percent"
2738
- | "phoneNumber"
2739
- | "select"
2740
- | "signature"
2741
- | "text"
2742
- | "textarea"
2743
- | "time"
2744
- | "url";
2745
- rows?: number;
2746
- value?: any;
2747
- onChange?: any;
2748
- onBlur?: any;
2749
- onStart?: any;
2750
- onEnd?: any;
2751
- options?: SelectListOptions;
2752
- placeholder?: string;
2753
- disabled?: boolean;
2754
- useCheckbox?: boolean;
2755
- includeCounty?: boolean;
2756
- googleMapsApiKey?: string;
2757
- googlePlacesMobileStyles?: Styles;
2758
- transformValue?: TransformValueOptions;
2759
- }
2760
-
2761
- export interface FormLineProps {
2762
- name: string;
2763
- value: any;
2764
- onSave: (value: any) => void;
2765
- kind: "boolean" | "string" | "textarea" | "select" | "multiboolean";
2766
- options?: string[];
2767
- }
1585
+ export type FieldProps =
1586
+ | TextFieldProps
1587
+ | NumberFieldProps
1588
+ | NumberRangeFieldProps
1589
+ | DateTimeFieldProps
1590
+ | (MultiselectFieldProps & {type: "multiselect"})
1591
+ | (TextAreaProps & {type: "textarea"})
1592
+ | (SelectFieldProps & {type: "select"})
1593
+ | (CustomSelectFieldProps & {type: "customSelect"})
1594
+ | (EmailFieldProps & {type: "email"})
1595
+ | (PhoneNumberFieldProps & {type: "phoneNumber"})
1596
+ | (BooleanFieldProps & {type: "boolean"})
1597
+ | (RadioFieldProps & {type: "radio"})
1598
+ | (SignatureFieldProps & {type: "signature"})
1599
+ | (SearchFieldProps & {type: "search"})
1600
+ | (AddressFieldProps & {type: "address"});
1601
+ // | (CurrencyFieldProps & {type: "currency"});
1602
+ // | (PercentFieldProps & {type: "percent"});
1603
+ // | URLFieldProps
2768
1604
 
2769
1605
  export interface HeightActionSheetProps {
2770
1606
  value?: string;
@@ -2785,34 +1621,88 @@ export interface HyperlinkProps {
2785
1621
  }
2786
1622
 
2787
1623
  export interface IconButtonProps {
2788
- prefix?: IconPrefix;
2789
- icon: IconName;
1624
+ /**
1625
+ * The accessibility hint describes the results of performing an action on a control or view.
1626
+ * It should be a very brief description of the result of interacting with the button.
1627
+ */
1628
+ accessibilityHint?: string;
1629
+
1630
+ /**
1631
+ * The accessibility label attribute identifies the user interface element.
1632
+ * It should be a very brief description of the element, such as "Add", "Play", "Deleted", etc.
1633
+ */
2790
1634
  accessibilityLabel: string;
2791
- iconColor: "darkGray" | ButtonColor | ThemeColor | Color;
2792
- onClick: () => void;
2793
- size?: IconSize;
2794
- bgColor?:
2795
- | "transparent"
2796
- | "transparentDarkGray"
2797
- | "gray"
2798
- | "lightGray"
2799
- | "white"
2800
- | "primary" // used for active states
2801
- | "background"
2802
- | "backgroundSecondary"; // default transparent
2803
- disabled?: boolean;
2804
- selected?: boolean;
2805
- withConfirmation?: boolean;
2806
- confirmationText?: string;
1635
+
1636
+ /**
1637
+ * The heading of the confirmation modal.
1638
+ * @default "Confirm"
1639
+ */
2807
1640
  confirmationHeading?: string;
2808
- tooltip?: {
2809
- text: string;
2810
- idealDirection?: TooltipDirection;
2811
- };
2812
- indicator?: boolean;
2813
- indicatorNumber?: number;
2814
- indicatorStyle?: {position: IndicatorDirection; color: AllColors};
1641
+
1642
+ /**
1643
+ * The text content of the confirmation modal.
1644
+ * @default "Are you sure you want to continue?"
1645
+ */
1646
+ confirmationText?: string;
1647
+
1648
+ /**
1649
+ * Show a small indicator icon in the lower right corner of the button.
1650
+ */
1651
+ indicator?: "error" | "warning" | "success" | "primary" | "neutral";
1652
+
1653
+ /**
1654
+ * The text or number to display in the indicator. If not provided,
1655
+ * the indicator will be a solid circle.
1656
+ */
1657
+ indicatorText?: number | string;
1658
+
1659
+ /**
1660
+ * The name of the icon to display in the button.
1661
+ */
1662
+ iconName: IconName;
1663
+
1664
+ /**
1665
+ * If true, a loading spinner will be shown in the button.
1666
+ */
1667
+ loading?: boolean;
1668
+
1669
+ /**
1670
+ * The test ID for the button, used for testing purposes.
1671
+ */
2815
1672
  testID?: string;
1673
+
1674
+ /**
1675
+ * The ideal position of the tooltip.
1676
+ */
1677
+ tooltipIdealPosition?: TooltipPosition;
1678
+
1679
+ /**
1680
+ * Include an arrow in the tooltip. Pointing to the button.
1681
+ * @default false
1682
+ */
1683
+ tooltipIncludeArrow?: boolean;
1684
+
1685
+ /**
1686
+ * The text content of the tooltip.
1687
+ */
1688
+ tooltipText?: string;
1689
+
1690
+ /**
1691
+ * The variant of the button, which determines its style.
1692
+ * @default "primary"
1693
+ */
1694
+ variant?: "primary" | "secondary" | "muted" | "destructive" | "navigation";
1695
+
1696
+ /**
1697
+ * If true, a confirmation modal will be shown before the onClick action.
1698
+ * @default false
1699
+ */
1700
+ withConfirmation?: boolean;
1701
+
1702
+ /**
1703
+ * The function to call when the button is clicked.
1704
+ */
1705
+ onClick: () => void | Promise<void>;
2816
1706
  }
2817
1707
 
2818
1708
  export interface InfoTooltipButtonProps {
@@ -2821,29 +1711,55 @@ export interface InfoTooltipButtonProps {
2821
1711
  }
2822
1712
 
2823
1713
  export interface ModalProps {
2824
- onDismiss: () => void;
2825
- visible: boolean;
2826
- // Alignment of the header. Default is "center".
2827
- align?: "center" | "start";
2828
- // Element to render in the middle part of the modal.
1714
+ /**
1715
+ * The content of the modal.
1716
+ */
2829
1717
  children?: React.ReactElement;
2830
- // Element to render in the bottom of the modal. This takes precedence over primaryButton and
2831
- // secondaryButton.
2832
- footer?: React.ReactElement;
2833
- heading?: string;
2834
- size?: "sm" | "md" | "lg";
2835
- subHeading?: string;
2836
- // Renders a primary colored button all the way to the right in the footer, if no footer prop is
2837
- // provided.
2838
- primaryButtonText?: string;
2839
- primaryButtonOnClick?: (value?: any) => void;
1718
+ /**
1719
+ * If true, the primary button will be disabled.
1720
+ * @default false
1721
+ */
2840
1722
  primaryButtonDisabled?: boolean;
2841
- // Renders a gray button to the left of the primary button in the footer, if no footer prop is
2842
- // provided. Requires primaryButtonText to be defined, but is not required itself.
1723
+ /**
1724
+ * The text content of the primary button.
1725
+ */
1726
+ primaryButtonText?: string;
1727
+ /**
1728
+ * The text content of the secondary button.
1729
+ */
2843
1730
  secondaryButtonText?: string;
2844
- secondaryButtonOnClick?: (value?: any) => void;
2845
- // Whether to show a close button in the upper left of modals or action sheets.
2846
- showClose?: boolean;
1731
+ /**
1732
+ * The size of the modal.
1733
+ * @default "sm"
1734
+ */
1735
+ size?: "sm" | "md" | "lg";
1736
+ /**
1737
+ * The subtitle of the modal.
1738
+ */
1739
+ subtitle?: string;
1740
+ /**
1741
+ * The text content of the modal.
1742
+ */
1743
+ text?: string;
1744
+ /**
1745
+ * The title of the modal.
1746
+ */
1747
+ title?: string;
1748
+ /**
1749
+ * If true, the modal will be visible.
1750
+ */
1751
+ visible: boolean;
1752
+ /**
1753
+ */
1754
+ onDismiss: () => void;
1755
+ /**
1756
+ * The function to call when the primary button is clicked.
1757
+ */
1758
+ primaryButtonOnClick?: (value?: any) => void | Promise<void>;
1759
+ /**
1760
+ * The function to call when the secondary button is clicked.
1761
+ */
1762
+ secondaryButtonOnClick?: (value?: any) => void | Promise<void>;
2847
1763
  }
2848
1764
 
2849
1765
  export interface NumberPickerActionSheetProps {
@@ -2865,7 +1781,7 @@ export interface PageProps {
2865
1781
  closeButton?: boolean;
2866
1782
  direction?: "row" | "column";
2867
1783
  padding?: UnsignedUpTo12;
2868
- color?: Color;
1784
+ color?: SurfaceColor;
2869
1785
  maxWidth?: number | string;
2870
1786
  keyboardOffset?: number;
2871
1787
  footer?: any;
@@ -2875,21 +1791,32 @@ export interface PageProps {
2875
1791
  onError?: (error: Error, stack: any) => void;
2876
1792
  }
2877
1793
 
2878
- export interface PogProps {
2879
- active?: boolean;
2880
- bgColor?: "transparent" | "transparentDarkGray" | "gray" | "lightGray" | "white" | "blue";
2881
- focused?: boolean;
2882
- hovered?: boolean;
1794
+ export interface ProgressBarProps {
1795
+ color: SurfaceColor;
1796
+ completed: number;
1797
+ }
1798
+
1799
+ export interface RadioProps {
2883
1800
  selected?: boolean;
2884
- iconColor?: AllColors;
2885
- icon: IconName;
2886
- iconPrefix?: IconPrefix;
2887
- size?: IconSize;
2888
1801
  }
2889
1802
 
2890
- export interface ProgressBarProps {
2891
- color: Color;
2892
- completed: number;
1803
+ export interface RadioFieldProps {
1804
+ title: string;
1805
+ variant?: "leftText" | "rightText"; // default "rightText"
1806
+ value: string;
1807
+ onChange: (value: string) => void;
1808
+ options: FieldOption[];
1809
+ }
1810
+
1811
+ export interface SignatureFieldProps {
1812
+ disabled?: boolean; // default "default"
1813
+ value?: string;
1814
+ onChange: (value: any) => void;
1815
+ title?: string; // default "Signature"
1816
+ onStart?: () => void;
1817
+ onEnd?: () => void;
1818
+ disabledText?: string;
1819
+ errorText?: string;
2893
1820
  }
2894
1821
 
2895
1822
  export interface SideDrawerProps {
@@ -2911,7 +1838,7 @@ export interface SideDrawerProps {
2911
1838
 
2912
1839
  export interface SpinnerProps {
2913
1840
  size?: "sm" | "md";
2914
- color?: Color;
1841
+ color?: "light" | "dark" | "accent" | "secondary";
2915
1842
  }
2916
1843
 
2917
1844
  export type ColumnSortInterface = {
@@ -2928,6 +1855,19 @@ export interface TableProps {
2928
1855
  * Width of columns in the table. This is used to calculate the width of each column.
2929
1856
  * Can be numbers for pixels or strings for percentages.
2930
1857
  */
1858
+ // in figma/ jos documentation for the component, TableTitle,
1859
+ // she included the width as prop size
1860
+ /**
1861
+ * The size of the table title.
1862
+ * Can be one of "sm", "md", "lg", or "xl".
1863
+ */
1864
+ // size: "sm" | "md" | "lg" | "xl";
1865
+ // const width = {
1866
+ // sm: 82,
1867
+ // md: 161,
1868
+ // lg: 233,
1869
+ // xl: 302,
1870
+ // };
2931
1871
  columns: Array<number | string>;
2932
1872
  /**
2933
1873
  * Specify a border width for Table: "sm" is 1px.
@@ -2958,6 +1898,10 @@ export interface TableProps {
2958
1898
  * Set the page outside of the Table
2959
1899
  */
2960
1900
  setPage?: (page: number) => void;
1901
+ /**
1902
+ * Set the total number of pages of the Table
1903
+ */
1904
+ totalPages?: number;
2961
1905
  /**
2962
1906
  * If true, the table will render a next page button. Defaults to true.
2963
1907
  */
@@ -2968,6 +1912,12 @@ export interface TableProps {
2968
1912
  extraControls?: React.ReactElement;
2969
1913
  }
2970
1914
 
1915
+ export interface PaginationProps {
1916
+ page: number;
1917
+ setPage: (page: number) => void;
1918
+ totalPages: number;
1919
+ }
1920
+
2971
1921
  export interface TableHeaderProps {
2972
1922
  /**
2973
1923
  * Must be an instance of TableRow.
@@ -2990,10 +1940,21 @@ export interface TableHeaderCellProps {
2990
1940
  /**
2991
1941
  * The content of the table header cell.
2992
1942
  */
2993
- children: ReactElement;
1943
+ children?: ReactElement;
2994
1944
  index: number;
2995
1945
  sortable?: boolean;
2996
1946
  onSortChange?: (direction: "asc" | "desc" | undefined) => void;
1947
+ /**
1948
+ * The alignment of the text/components in the cell. Most cells should be left aligned,
1949
+ * unless the column is for a badge, icon, or boolean, then center align.
1950
+ * It should be right if the column is right aligned text or numbers.
1951
+ */
1952
+ align?: "left" | "center" | "right";
1953
+ /**
1954
+ * If title is provided, the text will be wrapped in a TableTitle, saving you from having to
1955
+ * wrap the text yourself. Alignments will match between the cell and the title.
1956
+ */
1957
+ title?: string;
2997
1958
  }
2998
1959
 
2999
1960
  export interface TableRowProps {
@@ -3041,18 +2002,14 @@ export interface TableContextProviderProps extends TableContextType {
3041
2002
  export interface TextProps {
3042
2003
  align?: "left" | "right" | "center" | "justify"; // default "left"
3043
2004
  children?: React.ReactNode;
3044
- color?: AllColors;
3045
- inline?: boolean; // default false
2005
+ bold?: boolean; // default false
2006
+ color?: TextColor;
3046
2007
  italic?: boolean; // default false
3047
- onPress?: () => void;
3048
- overflow?: "normal" | "breakWord"; // deprecated
3049
2008
  size?: TextSize; // default "md"
3050
2009
  truncate?: boolean; // default false
3051
- font?: Font;
3052
2010
  underline?: boolean;
3053
2011
  numberOfLines?: number;
3054
2012
  skipLinking?: boolean;
3055
- weight?: "bold" | "normal";
3056
2013
  testID?: string;
3057
2014
  }
3058
2015
 
@@ -3064,64 +2021,168 @@ export interface TextFieldPickerActionSheetProps {
3064
2021
  }
3065
2022
 
3066
2023
  export interface ToastProps {
3067
- message: string;
3068
- data: {
3069
- variant?: "default" | "warning" | "error";
3070
- buttonText?: string;
3071
- buttonOnClick?: () => void | Promise<void>;
3072
- persistent?: boolean;
3073
- onDismiss?: () => void;
3074
- };
2024
+ title: string;
2025
+ variant?: "error" | "info" | "success" | "warning";
2026
+ secondary?: boolean;
2027
+ size?: "sm" | "lg";
2028
+ onDismiss?: () => void;
2029
+ persistent?: boolean;
2030
+ // TODO enforce these should only show if size is "lg" with type discrinimation
2031
+ subtitle?: string;
2032
+ // TODO Add buttons for Toast
2033
+ // buttonText?: string;
2034
+ // buttonOnClick?: () => void | Promise<void>;
3075
2035
  }
3076
2036
 
3077
2037
  export interface TooltipProps {
2038
+ /**
2039
+ * The content of the tooltip.
2040
+ */
3078
2041
  children: React.ReactElement;
3079
- // If text is undefined, the children will be rendered without a tooltip.
2042
+
2043
+ /**
2044
+ * If true, an arrow will be included in the tooltip.
2045
+ * @default false
2046
+ */
2047
+ includeArrow?: boolean;
2048
+
2049
+ /**
2050
+ * The ideal position of the tooltip.
2051
+ * @default "top"
2052
+ */
2053
+ idealPosition?: "top" | "bottom" | "left" | "right";
2054
+
2055
+ /**
2056
+ * The text content of the tooltip. If text is undefined,
2057
+ * the children will be rendered without a tooltip.
2058
+ */
3080
2059
  text?: string;
3081
- idealDirection?: "top" | "bottom" | "left" | "right";
3082
- bgColor?: "white" | "lightGray" | "gray" | "darkGray";
3083
2060
  }
3084
2061
 
3085
2062
  export interface LinkProps extends TextProps {
3086
2063
  href: string;
3087
2064
  }
3088
2065
 
3089
- export interface WithLabelProps {
3090
- children?: ReactChildren;
3091
- show?: boolean;
3092
- label?: string;
3093
- labelInline?: boolean;
3094
- labelColor?: AllColors;
3095
- labelJustifyContent?: JustifyContent;
3096
- labelAlignItems?: AlignItems;
3097
- labelPlacement?: "before" | "after";
3098
- labelSize?: TextSize;
3099
- }
3100
-
3101
- export interface TapToEditProps extends Omit<FieldProps, "onChange" | "value"> {
2066
+ export type TapToEditProps =
2067
+ | (BaseTapToEditProps &
2068
+ Omit<TextFieldProps, "onChange" | "value"> & {
2069
+ type: "password" | "text" | "url";
2070
+ })
2071
+ | (BaseTapToEditProps &
2072
+ Omit<NumberFieldProps, "onChange" | "value"> & {
2073
+ type: "number" | "decimal";
2074
+ })
2075
+ | (BaseTapToEditProps &
2076
+ Omit<NumberRangeFieldProps, "onChange" | "value"> & {
2077
+ type: "numberRange" | "decimalRange";
2078
+ })
2079
+ | (BaseTapToEditProps &
2080
+ Omit<DateTimeFieldProps, "onChange" | "value"> & {
2081
+ type: "date" | "datetime" | "time";
2082
+ })
2083
+ | (BaseTapToEditProps &
2084
+ Omit<MultiselectFieldProps, "onChange" | "value"> & {
2085
+ type: "multiselect";
2086
+ })
2087
+ | (BaseTapToEditProps &
2088
+ Omit<TextAreaProps, "onChange" | "value"> & {
2089
+ type: "textarea";
2090
+ })
2091
+ | (BaseTapToEditProps &
2092
+ Omit<SelectFieldProps, "onChange" | "value"> & {
2093
+ type: "select";
2094
+ })
2095
+ | (BaseTapToEditProps &
2096
+ Omit<CustomSelectFieldProps, "onChange" | "value"> & {
2097
+ type: "customSelect";
2098
+ })
2099
+ | (BaseTapToEditProps &
2100
+ Omit<EmailFieldProps, "onChange" | "value"> & {
2101
+ type: "email";
2102
+ })
2103
+ | (BaseTapToEditProps &
2104
+ Omit<PhoneNumberFieldProps, "onChange" | "value"> & {
2105
+ type: "phoneNumber";
2106
+ })
2107
+ | (BaseTapToEditProps &
2108
+ Omit<BooleanFieldProps, "onChange" | "value"> & {
2109
+ type: "boolean";
2110
+ })
2111
+ | (BaseTapToEditProps &
2112
+ Omit<RadioFieldProps, "onChange" | "value"> & {
2113
+ type: "radio";
2114
+ })
2115
+ | (BaseTapToEditProps &
2116
+ Omit<SignatureFieldProps, "onChange" | "value"> & {
2117
+ type: "signature";
2118
+ })
2119
+ | (BaseTapToEditProps &
2120
+ Omit<SearchFieldProps, "onChange" | "value"> & {
2121
+ type: "search";
2122
+ })
2123
+ | (BaseTapToEditProps &
2124
+ Omit<AddressFieldProps, "onChange" | "value"> & {
2125
+ type: "address";
2126
+ });
2127
+
2128
+ export interface BaseTapToEditProps extends Omit<FieldProps, "onChange" | "value"> {
3102
2129
  title: string;
3103
2130
  value: any;
3104
- // Not required if not editable.
2131
+
2132
+ /**
2133
+ * Not required if not editable.
2134
+ */
3105
2135
  setValue?: (value: any) => void;
3106
- // Not required if not editable.
2136
+
2137
+ /**
2138
+ * Not required if not editable.
2139
+ */
3107
2140
  onSave?: (value: any) => void | Promise<void>;
3108
- // Defaults to true
2141
+
2142
+ /**
2143
+ * If false, the field will not be editable and will be disabled
2144
+ * @default true
2145
+ */
3109
2146
  editable?: boolean;
3110
- // enable edit mode from outside the component
2147
+
2148
+ /**
2149
+ * Enable edit mode from outside the component.
2150
+ */
3111
2151
  isEditing?: boolean;
3112
- // For changing how the non-editing row renders
3113
- rowBoxProps?: Partial<BoxProps>;
3114
2152
  transform?: (value: any) => string;
3115
- fieldComponent?: (setValue: () => void) => ReactElement;
2153
+ /**
2154
+ * Show a confirmation modal before saving the value.
2155
+ * @default false
2156
+ */
3116
2157
  withConfirmation?: boolean;
2158
+
2159
+ /**
2160
+ * The text content of the confirmation modal.
2161
+ * @default "Are you sure you want save your changes?"
2162
+ */
3117
2163
  confirmationText?: string;
3118
- confirmationHeading?: string;
3119
- description?: string;
3120
- openApiModel?: string;
3121
- openApiField?: string;
3122
- showDescriptionAsTooltip?: boolean;
3123
- // Default true. If false, description is shown below the value always.
3124
- onlyShowDescriptionWhileEditing?: boolean;
2164
+
2165
+ /**
2166
+ * The title of the confirmation modal.
2167
+ * @default "Confirm"
2168
+ */
2169
+ confirmationTitle?: string;
2170
+
2171
+ /**
2172
+ * Field helperText, a description of the field surfaced in the UI
2173
+ * @default "Confirm"
2174
+ */
2175
+ helperText?: string;
2176
+
2177
+ /**
2178
+ * Only display the helperText in the UI while editing. if false, the helperText is always shown below the value.
2179
+ * @default true
2180
+ */
2181
+ onlyShowHelperTextWhileEditing?: boolean;
2182
+
2183
+ // openApi to supported in future
2184
+ // openApiModel?: string;
2185
+ // openApiField?: string;
3125
2186
  }
3126
2187
 
3127
2188
  export interface APIError {
@@ -3207,3 +2268,263 @@ export interface ModelAdminCustomComponentProps extends Omit<FieldProps, "name">
3207
2268
  // user: User;
3208
2269
  editing: boolean; // Allow for inline editing of the field.
3209
2270
  }
2271
+
2272
+ export interface MultiselectFieldProps extends HelperTextProps, ErrorTextProps {
2273
+ /**
2274
+ * The available options for the multiselect field.
2275
+ */
2276
+ options: FieldOption[];
2277
+
2278
+ /**
2279
+ * The title of the multiselect field.
2280
+ */
2281
+ title: string;
2282
+
2283
+ /**
2284
+ * The selected values of the multiselect field.
2285
+ */
2286
+ value: string[];
2287
+
2288
+ /**
2289
+ * The variant of the multiselect field, which determines the position of the text.
2290
+ * @default "rightText"
2291
+ */
2292
+ variant?: "rightText" | "leftText";
2293
+
2294
+ /**
2295
+ * The function to call when the selected values change.
2296
+ */
2297
+ onChange: (selected: string[]) => void;
2298
+ }
2299
+
2300
+ export interface TableTitleProps {
2301
+ /**
2302
+ * The text content of the table title.
2303
+ */
2304
+ title: string;
2305
+
2306
+ /**
2307
+ * Most titles should be left aligned, but some may be centered, such as badges or booleans.
2308
+ * It should match the alignment of the column.
2309
+ * @default "left"
2310
+ */
2311
+ align?: "left" | "center" | "right";
2312
+ }
2313
+
2314
+ export interface TableBooleanProps {
2315
+ /**
2316
+ * If true, the component is in editing mode.
2317
+ * @default false
2318
+ */
2319
+ isEditing?: boolean;
2320
+
2321
+ /**
2322
+ * The function to call when the value is saved.
2323
+ */
2324
+ onSave?: () => void | Promise<void>;
2325
+
2326
+ /**
2327
+ * The boolean value to be displayed or edited.
2328
+ */
2329
+ value: boolean;
2330
+ }
2331
+
2332
+ export interface TableDateProps {
2333
+ /**
2334
+ * If true, the date is annotated.
2335
+ * @default false
2336
+ */
2337
+ annotated?: boolean;
2338
+
2339
+ /**
2340
+ * If true, the component is in editing mode.
2341
+ * @default false
2342
+ */
2343
+ isEditing?: boolean;
2344
+
2345
+ /**
2346
+ * The function to call when the value is saved.
2347
+ */
2348
+ onSave?: () => void;
2349
+
2350
+ /**
2351
+ * The date value to be displayed or edited. Can be a string or a Date object.
2352
+ */
2353
+ value: string | Date;
2354
+ }
2355
+
2356
+ export interface TableIconButtonProps {
2357
+ /**
2358
+ * The name of the icon button to display in the table.
2359
+ * Can be one of "edit", "saveAndClose", "insert", "drawerOpen", or "drawerClose".
2360
+ */
2361
+ tableIconButtonName: "edit" | "saveAndClose" | "insert" | "drawerOpen" | "drawerClose";
2362
+
2363
+ /**
2364
+ * The function to call when the icon button is clicked.
2365
+ */
2366
+ onClick: () => void | Promise<void>;
2367
+ }
2368
+
2369
+ export type FieldOption = {
2370
+ /**
2371
+ * The label to display for the option.
2372
+ */
2373
+ label: string;
2374
+
2375
+ /**
2376
+ * The key of the option. Useful for uniquely identifying the option.
2377
+ */
2378
+ key?: string;
2379
+
2380
+ /**
2381
+ * The value of the option.
2382
+ */
2383
+ value: string;
2384
+ };
2385
+
2386
+ // Split up SelectField so if value is passed as a string,
2387
+ export interface SelectFieldPropsBase {
2388
+ /**
2389
+ * If true, the select field will be disabled.
2390
+ * @default false
2391
+ */
2392
+ disabled?: boolean;
2393
+
2394
+ /**
2395
+ * The error text to display if there is an error.
2396
+ */
2397
+ errorText?: string;
2398
+
2399
+ /**
2400
+ * The helper text to display below the select field.
2401
+ */
2402
+ helperText?: string;
2403
+
2404
+ /**
2405
+ * The options available for selection in the select field.
2406
+ * Each option should have a label and a value.
2407
+ */
2408
+ options: FieldOption[];
2409
+
2410
+ /**
2411
+ * The placeholder text to display when no option is selected.
2412
+ */
2413
+ placeholder?: string;
2414
+
2415
+ /**
2416
+ * The title of the select field.
2417
+ */
2418
+ title?: string;
2419
+ }
2420
+
2421
+ export interface SelectFieldPropsWithoutRequire extends SelectFieldPropsBase {
2422
+ /**
2423
+ * Whether the select field should have an empty "---" button to return undefined.
2424
+ * @default false
2425
+ */
2426
+ requireValue?: false;
2427
+
2428
+ /**
2429
+ * The current value of the select field.
2430
+ */
2431
+ value?: string;
2432
+
2433
+ /**
2434
+ * The function to call when the selected value changes.
2435
+ */
2436
+ onChange: (value: string | undefined) => void;
2437
+ }
2438
+
2439
+ export interface SelectFieldPropsWithRequire extends SelectFieldPropsBase {
2440
+ /**
2441
+ * When requireValue is true, the value is required and onChange will return a string.
2442
+ */
2443
+ requireValue: true;
2444
+
2445
+ /**
2446
+ * The current value of the select field.
2447
+ */
2448
+ value: string;
2449
+
2450
+ /**
2451
+ * The function to call when the selected value changes.
2452
+ */
2453
+ onChange: (value: string) => void;
2454
+ }
2455
+
2456
+ export type SelectFieldProps = SelectFieldPropsWithoutRequire | SelectFieldPropsWithRequire;
2457
+
2458
+ export interface TableBadgeProps {
2459
+ /**
2460
+ * The icon name of the badge.
2461
+ */
2462
+ badgeIconName?: BadgeProps["iconName"];
2463
+
2464
+ /**
2465
+ * The status of the badge.
2466
+ * @default "info"
2467
+ */
2468
+ badgeStatus?: BadgeProps["status"];
2469
+
2470
+ /**
2471
+ * If true, the component is in editing mode.
2472
+ * @default false
2473
+ */
2474
+ isEditing?: boolean;
2475
+
2476
+ /**
2477
+ * The options available for editing the badge.
2478
+ */
2479
+ editingOptions?: FieldOption[];
2480
+
2481
+ /**
2482
+ * The function to call when the badge status is saved.
2483
+ */
2484
+ onSave?: (newStatus: string | undefined) => void | Promise<void>;
2485
+
2486
+ /**
2487
+ * The value of the badge.
2488
+ */
2489
+ value: string;
2490
+ }
2491
+
2492
+ export interface TableTextProps {
2493
+ /**
2494
+ * Whether the text field is in editing mode.
2495
+ */
2496
+ isEditing?: boolean;
2497
+ /**
2498
+ * The text to display in the text field.
2499
+ */
2500
+ value: string;
2501
+ /**
2502
+ * Callback to save the text field value.
2503
+ */
2504
+ onSave?: () => void | Promise<void>;
2505
+ /**
2506
+ * The alignment of the text field. Most text fields should be left aligned.
2507
+ * @default "left"
2508
+ */
2509
+ align?: "left" | "center" | "right";
2510
+ }
2511
+
2512
+ export interface TableNumberProps {
2513
+ /**
2514
+ * Whether the text field is in editing mode.
2515
+ */
2516
+ isEditing?: boolean;
2517
+ /**
2518
+ * The number to display in the text field.
2519
+ */
2520
+ value: string;
2521
+ /**
2522
+ * Callback to save the text field value.
2523
+ */
2524
+ onSave?: () => void | Promise<void>;
2525
+ /**
2526
+ * Numbers generally should be right aligned for ease of scanability.
2527
+ * @default "right"
2528
+ */
2529
+ align?: "left" | "right";
2530
+ }