bootstrap-rn 0.4.8 → 0.4.10

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 (539) hide show
  1. package/lib/module/Context.js.map +1 -1
  2. package/lib/module/Provider.js +4 -16
  3. package/lib/module/Provider.js.map +1 -1
  4. package/lib/module/components/Body.js +3 -3
  5. package/lib/module/components/Body.js.map +1 -1
  6. package/lib/module/components/Caret.js +4 -4
  7. package/lib/module/components/Caret.js.map +1 -1
  8. package/lib/module/components/Heading.js +3 -3
  9. package/lib/module/components/Heading.js.map +1 -1
  10. package/lib/module/components/Image.js +3 -3
  11. package/lib/module/components/Image.js.map +1 -1
  12. package/lib/module/components/ImageBackground.js +3 -3
  13. package/lib/module/components/ImageBackground.js.map +1 -1
  14. package/lib/module/components/Label.js +3 -3
  15. package/lib/module/components/Label.js.map +1 -1
  16. package/lib/module/components/Link.js +6 -6
  17. package/lib/module/components/Link.js.map +1 -1
  18. package/lib/module/components/Pressable.js +6 -6
  19. package/lib/module/components/Pressable.js.map +1 -1
  20. package/lib/module/components/ScrollView.js +3 -3
  21. package/lib/module/components/ScrollView.js.map +1 -1
  22. package/lib/module/components/Text.js +3 -3
  23. package/lib/module/components/Text.js.map +1 -1
  24. package/lib/module/components/TextInput.js +3 -3
  25. package/lib/module/components/TextInput.js.map +1 -1
  26. package/lib/module/components/View.js +3 -3
  27. package/lib/module/components/View.js.map +1 -1
  28. package/lib/module/components/alert/Alert.js +5 -5
  29. package/lib/module/components/alert/Alert.js.map +1 -1
  30. package/lib/module/components/badge/Badge.js +3 -3
  31. package/lib/module/components/badge/Badge.js.map +1 -1
  32. package/lib/module/components/breadcrumb/Breadcrumb.js +3 -3
  33. package/lib/module/components/breadcrumb/Breadcrumb.js.map +1 -1
  34. package/lib/module/components/breadcrumb/BreadcrumbItem.js +3 -3
  35. package/lib/module/components/breadcrumb/BreadcrumbItem.js.map +1 -1
  36. package/lib/module/components/button-group/ButtonGroup.js +3 -3
  37. package/lib/module/components/button-group/ButtonGroup.js.map +1 -1
  38. package/lib/module/components/button-group/ButtonToolbar.js +3 -3
  39. package/lib/module/components/button-group/ButtonToolbar.js.map +1 -1
  40. package/lib/module/components/buttons/Button.js +3 -3
  41. package/lib/module/components/buttons/Button.js.map +1 -1
  42. package/lib/module/components/card/Card.js +3 -3
  43. package/lib/module/components/card/Card.js.map +1 -1
  44. package/lib/module/components/card/CardBody.js +3 -3
  45. package/lib/module/components/card/CardBody.js.map +1 -1
  46. package/lib/module/components/card/CardFooter.js +3 -3
  47. package/lib/module/components/card/CardFooter.js.map +1 -1
  48. package/lib/module/components/card/CardHeader.js +3 -3
  49. package/lib/module/components/card/CardHeader.js.map +1 -1
  50. package/lib/module/components/close/CloseButton.js +3 -3
  51. package/lib/module/components/close/CloseButton.js.map +1 -1
  52. package/lib/module/components/collapse/Collapse.js +3 -3
  53. package/lib/module/components/collapse/Collapse.js.map +1 -1
  54. package/lib/module/components/containers/Container.js +3 -3
  55. package/lib/module/components/containers/Container.js.map +1 -1
  56. package/lib/module/components/dropdown/Dropdown.js +3 -3
  57. package/lib/module/components/dropdown/Dropdown.js.map +1 -1
  58. package/lib/module/components/dropdown/DropdownDivider.js +3 -3
  59. package/lib/module/components/dropdown/DropdownDivider.js.map +1 -1
  60. package/lib/module/components/dropdown/DropdownHeader.js +3 -3
  61. package/lib/module/components/dropdown/DropdownHeader.js.map +1 -1
  62. package/lib/module/components/dropdown/DropdownItemText.js +3 -3
  63. package/lib/module/components/dropdown/DropdownItemText.js.map +1 -1
  64. package/lib/module/components/dropdown/DropdownMenu.js +3 -3
  65. package/lib/module/components/dropdown/DropdownMenu.js.map +1 -1
  66. package/lib/module/components/dropdown/useToggleDropdown.js.map +1 -1
  67. package/lib/module/components/forms/Checkbox.js +3 -3
  68. package/lib/module/components/forms/Checkbox.js.map +1 -1
  69. package/lib/module/components/forms/Feedback.js +3 -3
  70. package/lib/module/components/forms/Feedback.js.map +1 -1
  71. package/lib/module/components/forms/FormCheck.js +3 -3
  72. package/lib/module/components/forms/FormCheck.js.map +1 -1
  73. package/lib/module/components/forms/FormCheckInput.js +5 -5
  74. package/lib/module/components/forms/FormCheckInput.js.map +1 -1
  75. package/lib/module/components/forms/FormCheckLabel.js +3 -3
  76. package/lib/module/components/forms/FormCheckLabel.js.map +1 -1
  77. package/lib/module/components/forms/FormLabel.js +3 -3
  78. package/lib/module/components/forms/FormLabel.js.map +1 -1
  79. package/lib/module/components/forms/FormText.js +3 -3
  80. package/lib/module/components/forms/FormText.js.map +1 -1
  81. package/lib/module/components/forms/Input.js +5 -5
  82. package/lib/module/components/forms/Input.js.map +1 -1
  83. package/lib/module/components/forms/Picker.js +5 -5
  84. package/lib/module/components/forms/Picker.js.map +1 -1
  85. package/lib/module/components/forms/PickerItem.js +3 -3
  86. package/lib/module/components/forms/PickerItem.js.map +1 -1
  87. package/lib/module/components/forms/Radio.js +3 -3
  88. package/lib/module/components/forms/Radio.js.map +1 -1
  89. package/lib/module/components/forms/RadioGroup.js +3 -3
  90. package/lib/module/components/forms/RadioGroup.js.map +1 -1
  91. package/lib/module/components/forms/Switch.js +3 -3
  92. package/lib/module/components/forms/Switch.js.map +1 -1
  93. package/lib/module/components/forms/internals/FormCheckInputNative.js +4 -4
  94. package/lib/module/components/forms/internals/FormCheckInputNative.js.map +1 -1
  95. package/lib/module/components/forms/internals/FormCheckInputWeb.js +7 -6
  96. package/lib/module/components/forms/internals/FormCheckInputWeb.js.map +1 -1
  97. package/lib/module/components/forms/internals/PickerNative.js +3 -2
  98. package/lib/module/components/forms/internals/PickerNative.js.map +1 -1
  99. package/lib/module/components/forms/internals/PickerNativeItem.js +3 -3
  100. package/lib/module/components/forms/internals/PickerNativeItem.js.map +1 -1
  101. package/lib/module/components/forms/internals/PickerWeb.js +4 -3
  102. package/lib/module/components/forms/internals/PickerWeb.js.map +1 -1
  103. package/lib/module/components/forms/internals/PickerWebItem.js +3 -3
  104. package/lib/module/components/forms/internals/PickerWebItem.js.map +1 -1
  105. package/lib/module/components/grid/Col.js +3 -3
  106. package/lib/module/components/grid/Col.js.map +1 -1
  107. package/lib/module/components/grid/Row.js +3 -3
  108. package/lib/module/components/grid/Row.js.map +1 -1
  109. package/lib/module/components/helpers/Dialog.web.js +2 -2
  110. package/lib/module/components/helpers/Dialog.web.js.map +1 -1
  111. package/lib/module/components/list-group/ListGroup.js +3 -3
  112. package/lib/module/components/list-group/ListGroup.js.map +1 -1
  113. package/lib/module/components/list-group/ListGroupItem.js +3 -3
  114. package/lib/module/components/list-group/ListGroupItem.js.map +1 -1
  115. package/lib/module/components/list-group/ListGroupItemAction.js +5 -5
  116. package/lib/module/components/list-group/ListGroupItemAction.js.map +1 -1
  117. package/lib/module/components/modal/Modal.js +3 -4
  118. package/lib/module/components/modal/Modal.js.map +1 -1
  119. package/lib/module/components/modal/ModalBody.js +3 -3
  120. package/lib/module/components/modal/ModalBody.js.map +1 -1
  121. package/lib/module/components/modal/ModalFooter.js +3 -3
  122. package/lib/module/components/modal/ModalFooter.js.map +1 -1
  123. package/lib/module/components/modal/ModalHeader.js +3 -3
  124. package/lib/module/components/modal/ModalHeader.js.map +1 -1
  125. package/lib/module/components/modal/ModalTitle.js +3 -3
  126. package/lib/module/components/modal/ModalTitle.js.map +1 -1
  127. package/lib/module/components/nav/Nav.js +3 -3
  128. package/lib/module/components/nav/Nav.js.map +1 -1
  129. package/lib/module/components/nav/NavLink.js +5 -5
  130. package/lib/module/components/nav/NavLink.js.map +1 -1
  131. package/lib/module/components/nav/TabContent.js +3 -3
  132. package/lib/module/components/nav/TabContent.js.map +1 -1
  133. package/lib/module/components/nav/TabPane.js +3 -3
  134. package/lib/module/components/nav/TabPane.js.map +1 -1
  135. package/lib/module/components/navbar/Navbar.js +3 -3
  136. package/lib/module/components/navbar/Navbar.js.map +1 -1
  137. package/lib/module/components/navbar/NavbarBrand.js +3 -3
  138. package/lib/module/components/navbar/NavbarBrand.js.map +1 -1
  139. package/lib/module/components/navbar/NavbarCollapse.js +3 -3
  140. package/lib/module/components/navbar/NavbarCollapse.js.map +1 -1
  141. package/lib/module/components/navbar/NavbarText.js +3 -3
  142. package/lib/module/components/navbar/NavbarText.js.map +1 -1
  143. package/lib/module/components/navbar/NavbarToggler.js +3 -3
  144. package/lib/module/components/navbar/NavbarToggler.js.map +1 -1
  145. package/lib/module/components/offcanvas/Offcanvas.js +3 -3
  146. package/lib/module/components/offcanvas/Offcanvas.js.map +1 -1
  147. package/lib/module/components/offcanvas/OffcanvasBody.js +3 -3
  148. package/lib/module/components/offcanvas/OffcanvasBody.js.map +1 -1
  149. package/lib/module/components/offcanvas/OffcanvasHeader.js +3 -3
  150. package/lib/module/components/offcanvas/OffcanvasHeader.js.map +1 -1
  151. package/lib/module/components/offcanvas/OffcanvasTitle.js +3 -3
  152. package/lib/module/components/offcanvas/OffcanvasTitle.js.map +1 -1
  153. package/lib/module/components/pagination/Pagination.js +3 -3
  154. package/lib/module/components/pagination/Pagination.js.map +1 -1
  155. package/lib/module/components/pagination/PaginationItem.js +3 -3
  156. package/lib/module/components/pagination/PaginationItem.js.map +1 -1
  157. package/lib/module/components/placeholders/Placeholders.js +6 -6
  158. package/lib/module/components/placeholders/Placeholders.js.map +1 -1
  159. package/lib/module/components/popover/Popover.js +3 -3
  160. package/lib/module/components/popover/Popover.js.map +1 -1
  161. package/lib/module/components/popover/PopoverArrow.js +3 -3
  162. package/lib/module/components/popover/PopoverArrow.js.map +1 -1
  163. package/lib/module/components/popover/PopoverBody.js +3 -3
  164. package/lib/module/components/popover/PopoverBody.js.map +1 -1
  165. package/lib/module/components/popover/PopoverHeader.js +3 -3
  166. package/lib/module/components/popover/PopoverHeader.js.map +1 -1
  167. package/lib/module/components/popover/injectPopover.js +3 -2
  168. package/lib/module/components/popover/injectPopover.js.map +1 -1
  169. package/lib/module/components/progress/Progress.js +3 -3
  170. package/lib/module/components/progress/Progress.js.map +1 -1
  171. package/lib/module/components/progress/ProgressBar.js +3 -3
  172. package/lib/module/components/progress/ProgressBar.js.map +1 -1
  173. package/lib/module/components/spinners/Spinner.js +3 -3
  174. package/lib/module/components/spinners/Spinner.js.map +1 -1
  175. package/lib/module/components/toasts/Toast.js +3 -3
  176. package/lib/module/components/toasts/Toast.js.map +1 -1
  177. package/lib/module/components/toasts/ToastBody.js +3 -3
  178. package/lib/module/components/toasts/ToastBody.js.map +1 -1
  179. package/lib/module/components/toasts/ToastContainer.js +3 -3
  180. package/lib/module/components/toasts/ToastContainer.js.map +1 -1
  181. package/lib/module/components/toasts/ToastHeader.js +3 -3
  182. package/lib/module/components/toasts/ToastHeader.js.map +1 -1
  183. package/lib/module/components/tooltip/Tooltip.js +3 -3
  184. package/lib/module/components/tooltip/Tooltip.js.map +1 -1
  185. package/lib/module/components/tooltip/TooltipArrow.js +3 -3
  186. package/lib/module/components/tooltip/TooltipArrow.js.map +1 -1
  187. package/lib/module/components/tooltip/TooltipInner.js +3 -3
  188. package/lib/module/components/tooltip/TooltipInner.js.map +1 -1
  189. package/lib/module/components/tooltip/injectTooltip.js +3 -2
  190. package/lib/module/components/tooltip/injectTooltip.js.map +1 -1
  191. package/lib/module/components/type/Blockquote.js +3 -3
  192. package/lib/module/components/type/Blockquote.js.map +1 -1
  193. package/lib/module/components/type/Code.js +3 -3
  194. package/lib/module/components/type/Code.js.map +1 -1
  195. package/lib/module/components/type/DisplayHeading.js +3 -2
  196. package/lib/module/components/type/DisplayHeading.js.map +1 -1
  197. package/lib/module/components/type/Paragraph.js +3 -3
  198. package/lib/module/components/type/Paragraph.js.map +1 -1
  199. package/lib/module/hooks/useAction.js +12 -5
  200. package/lib/module/hooks/useAction.js.map +1 -1
  201. package/lib/module/hooks/useFocusRing.js +1 -1
  202. package/lib/module/hooks/useModifier.js +7 -4
  203. package/lib/module/hooks/useModifier.js.map +1 -1
  204. package/lib/module/hooks/useScrollbarEffects.js +8 -5
  205. package/lib/module/hooks/useScrollbarEffects.js.map +1 -1
  206. package/lib/module/hooks/useScrollbarEffects.web.js +21 -19
  207. package/lib/module/hooks/useScrollbarEffects.web.js.map +1 -1
  208. package/lib/module/hooks/useScrollbarOffset.js +10 -0
  209. package/lib/module/hooks/useScrollbarOffset.js.map +1 -0
  210. package/lib/module/index.js +2 -2
  211. package/lib/module/index.js.map +1 -1
  212. package/lib/module/utils.js.map +1 -1
  213. package/lib/typescript/Context.d.ts +4 -9
  214. package/lib/typescript/Context.d.ts.map +1 -1
  215. package/lib/typescript/Provider.d.ts.map +1 -1
  216. package/lib/typescript/components/Body.d.ts +2 -2
  217. package/lib/typescript/components/Body.d.ts.map +1 -1
  218. package/lib/typescript/components/Caret.d.ts +2 -2
  219. package/lib/typescript/components/Caret.d.ts.map +1 -1
  220. package/lib/typescript/components/Heading.d.ts +2 -2
  221. package/lib/typescript/components/Heading.d.ts.map +1 -1
  222. package/lib/typescript/components/Image.d.ts +1 -1
  223. package/lib/typescript/components/Image.d.ts.map +1 -1
  224. package/lib/typescript/components/ImageBackground.d.ts +1 -1
  225. package/lib/typescript/components/ImageBackground.d.ts.map +1 -1
  226. package/lib/typescript/components/Label.d.ts +2 -2
  227. package/lib/typescript/components/Label.d.ts.map +1 -1
  228. package/lib/typescript/components/Link.d.ts +2 -2
  229. package/lib/typescript/components/Link.d.ts.map +1 -1
  230. package/lib/typescript/components/Pressable.d.ts +1 -1
  231. package/lib/typescript/components/Pressable.d.ts.map +1 -1
  232. package/lib/typescript/components/ScrollView.d.ts +1 -1
  233. package/lib/typescript/components/ScrollView.d.ts.map +1 -1
  234. package/lib/typescript/components/Text.d.ts +1 -1
  235. package/lib/typescript/components/Text.d.ts.map +1 -1
  236. package/lib/typescript/components/TextInput.d.ts +1 -1
  237. package/lib/typescript/components/TextInput.d.ts.map +1 -1
  238. package/lib/typescript/components/View.d.ts +1 -1
  239. package/lib/typescript/components/View.d.ts.map +1 -1
  240. package/lib/typescript/components/alert/Alert.d.ts +2 -2
  241. package/lib/typescript/components/alert/Alert.d.ts.map +1 -1
  242. package/lib/typescript/components/badge/Badge.d.ts +2 -2
  243. package/lib/typescript/components/badge/Badge.d.ts.map +1 -1
  244. package/lib/typescript/components/breadcrumb/Breadcrumb.d.ts +5 -3
  245. package/lib/typescript/components/breadcrumb/Breadcrumb.d.ts.map +1 -1
  246. package/lib/typescript/components/breadcrumb/BreadcrumbItem.d.ts +2 -2
  247. package/lib/typescript/components/breadcrumb/BreadcrumbItem.d.ts.map +1 -1
  248. package/lib/typescript/components/button-group/ButtonGroup.d.ts +2 -2
  249. package/lib/typescript/components/button-group/ButtonGroup.d.ts.map +1 -1
  250. package/lib/typescript/components/button-group/ButtonToolbar.d.ts +2 -2
  251. package/lib/typescript/components/button-group/ButtonToolbar.d.ts.map +1 -1
  252. package/lib/typescript/components/buttons/Button.d.ts +3 -2
  253. package/lib/typescript/components/buttons/Button.d.ts.map +1 -1
  254. package/lib/typescript/components/card/Card.d.ts +9 -5
  255. package/lib/typescript/components/card/Card.d.ts.map +1 -1
  256. package/lib/typescript/components/card/CardBody.d.ts +2 -2
  257. package/lib/typescript/components/card/CardBody.d.ts.map +1 -1
  258. package/lib/typescript/components/card/CardFooter.d.ts +2 -2
  259. package/lib/typescript/components/card/CardFooter.d.ts.map +1 -1
  260. package/lib/typescript/components/card/CardHeader.d.ts +2 -2
  261. package/lib/typescript/components/card/CardHeader.d.ts.map +1 -1
  262. package/lib/typescript/components/close/CloseButton.d.ts +2 -2
  263. package/lib/typescript/components/close/CloseButton.d.ts.map +1 -1
  264. package/lib/typescript/components/collapse/Collapse.d.ts +3 -2
  265. package/lib/typescript/components/collapse/Collapse.d.ts.map +1 -1
  266. package/lib/typescript/components/containers/Container.d.ts +2 -2
  267. package/lib/typescript/components/containers/Container.d.ts.map +1 -1
  268. package/lib/typescript/components/dropdown/Dropdown.d.ts +11 -6
  269. package/lib/typescript/components/dropdown/Dropdown.d.ts.map +1 -1
  270. package/lib/typescript/components/dropdown/DropdownDivider.d.ts +2 -2
  271. package/lib/typescript/components/dropdown/DropdownDivider.d.ts.map +1 -1
  272. package/lib/typescript/components/dropdown/DropdownHeader.d.ts +2 -2
  273. package/lib/typescript/components/dropdown/DropdownHeader.d.ts.map +1 -1
  274. package/lib/typescript/components/dropdown/DropdownItemText.d.ts +2 -2
  275. package/lib/typescript/components/dropdown/DropdownItemText.d.ts.map +1 -1
  276. package/lib/typescript/components/dropdown/DropdownMenu.d.ts +2 -2
  277. package/lib/typescript/components/dropdown/DropdownMenu.d.ts.map +1 -1
  278. package/lib/typescript/components/dropdown/useToggleDropdown.d.ts +4 -3
  279. package/lib/typescript/components/dropdown/useToggleDropdown.d.ts.map +1 -1
  280. package/lib/typescript/components/forms/Checkbox.d.ts +2 -1
  281. package/lib/typescript/components/forms/Checkbox.d.ts.map +1 -1
  282. package/lib/typescript/components/forms/Feedback.d.ts +2 -2
  283. package/lib/typescript/components/forms/Feedback.d.ts.map +1 -1
  284. package/lib/typescript/components/forms/FormCheck.d.ts +5 -3
  285. package/lib/typescript/components/forms/FormCheck.d.ts.map +1 -1
  286. package/lib/typescript/components/forms/FormCheckInput.d.ts +2 -1
  287. package/lib/typescript/components/forms/FormCheckInput.d.ts.map +1 -1
  288. package/lib/typescript/components/forms/FormCheckLabel.d.ts +2 -1
  289. package/lib/typescript/components/forms/FormCheckLabel.d.ts.map +1 -1
  290. package/lib/typescript/components/forms/FormLabel.d.ts +2 -1
  291. package/lib/typescript/components/forms/FormLabel.d.ts.map +1 -1
  292. package/lib/typescript/components/forms/FormText.d.ts +2 -2
  293. package/lib/typescript/components/forms/FormText.d.ts.map +1 -1
  294. package/lib/typescript/components/forms/Input.d.ts +2 -2
  295. package/lib/typescript/components/forms/Input.d.ts.map +1 -1
  296. package/lib/typescript/components/forms/Picker.d.ts +5 -4
  297. package/lib/typescript/components/forms/Picker.d.ts.map +1 -1
  298. package/lib/typescript/components/forms/PickerItem.d.ts +2 -2
  299. package/lib/typescript/components/forms/PickerItem.d.ts.map +1 -1
  300. package/lib/typescript/components/forms/Radio.d.ts +5 -2
  301. package/lib/typescript/components/forms/Radio.d.ts.map +1 -1
  302. package/lib/typescript/components/forms/RadioGroup.d.ts +2 -2
  303. package/lib/typescript/components/forms/RadioGroup.d.ts.map +1 -1
  304. package/lib/typescript/components/forms/Switch.d.ts +2 -1
  305. package/lib/typescript/components/forms/Switch.d.ts.map +1 -1
  306. package/lib/typescript/components/forms/internals/FormCheckInputNative.d.ts +2 -1
  307. package/lib/typescript/components/forms/internals/FormCheckInputNative.d.ts.map +1 -1
  308. package/lib/typescript/components/forms/internals/FormCheckInputWeb.d.ts +2 -1
  309. package/lib/typescript/components/forms/internals/FormCheckInputWeb.d.ts.map +1 -1
  310. package/lib/typescript/components/forms/internals/PickerNative.d.ts +2 -1
  311. package/lib/typescript/components/forms/internals/PickerNative.d.ts.map +1 -1
  312. package/lib/typescript/components/forms/internals/PickerNativeItem.d.ts +2 -2
  313. package/lib/typescript/components/forms/internals/PickerNativeItem.d.ts.map +1 -1
  314. package/lib/typescript/components/forms/internals/PickerWeb.d.ts +2 -1
  315. package/lib/typescript/components/forms/internals/PickerWeb.d.ts.map +1 -1
  316. package/lib/typescript/components/forms/internals/PickerWebItem.d.ts +2 -2
  317. package/lib/typescript/components/forms/internals/PickerWebItem.d.ts.map +1 -1
  318. package/lib/typescript/components/grid/Col.d.ts +2 -2
  319. package/lib/typescript/components/grid/Col.d.ts.map +1 -1
  320. package/lib/typescript/components/grid/Row.d.ts +2 -2
  321. package/lib/typescript/components/grid/Row.d.ts.map +1 -1
  322. package/lib/typescript/components/list-group/ListGroup.d.ts +7 -4
  323. package/lib/typescript/components/list-group/ListGroup.d.ts.map +1 -1
  324. package/lib/typescript/components/list-group/ListGroupItem.d.ts +2 -2
  325. package/lib/typescript/components/list-group/ListGroupItem.d.ts.map +1 -1
  326. package/lib/typescript/components/list-group/ListGroupItemAction.d.ts +2 -2
  327. package/lib/typescript/components/list-group/ListGroupItemAction.d.ts.map +1 -1
  328. package/lib/typescript/components/modal/Modal.d.ts +13 -7
  329. package/lib/typescript/components/modal/Modal.d.ts.map +1 -1
  330. package/lib/typescript/components/modal/ModalBody.d.ts +3 -2
  331. package/lib/typescript/components/modal/ModalBody.d.ts.map +1 -1
  332. package/lib/typescript/components/modal/ModalFooter.d.ts +2 -2
  333. package/lib/typescript/components/modal/ModalFooter.d.ts.map +1 -1
  334. package/lib/typescript/components/modal/ModalHeader.d.ts +2 -2
  335. package/lib/typescript/components/modal/ModalHeader.d.ts.map +1 -1
  336. package/lib/typescript/components/modal/ModalTitle.d.ts +2 -2
  337. package/lib/typescript/components/modal/ModalTitle.d.ts.map +1 -1
  338. package/lib/typescript/components/nav/Nav.d.ts +5 -3
  339. package/lib/typescript/components/nav/Nav.d.ts.map +1 -1
  340. package/lib/typescript/components/nav/NavLink.d.ts +2 -2
  341. package/lib/typescript/components/nav/NavLink.d.ts.map +1 -1
  342. package/lib/typescript/components/nav/Tab.d.ts +4 -2
  343. package/lib/typescript/components/nav/Tab.d.ts.map +1 -1
  344. package/lib/typescript/components/nav/TabContent.d.ts +2 -2
  345. package/lib/typescript/components/nav/TabContent.d.ts.map +1 -1
  346. package/lib/typescript/components/nav/TabPane.d.ts +2 -2
  347. package/lib/typescript/components/nav/TabPane.d.ts.map +1 -1
  348. package/lib/typescript/components/navbar/Navbar.d.ts +11 -6
  349. package/lib/typescript/components/navbar/Navbar.d.ts.map +1 -1
  350. package/lib/typescript/components/navbar/NavbarBrand.d.ts +2 -2
  351. package/lib/typescript/components/navbar/NavbarBrand.d.ts.map +1 -1
  352. package/lib/typescript/components/navbar/NavbarCollapse.d.ts +2 -2
  353. package/lib/typescript/components/navbar/NavbarCollapse.d.ts.map +1 -1
  354. package/lib/typescript/components/navbar/NavbarText.d.ts +2 -2
  355. package/lib/typescript/components/navbar/NavbarText.d.ts.map +1 -1
  356. package/lib/typescript/components/navbar/NavbarToggler.d.ts +2 -1
  357. package/lib/typescript/components/navbar/NavbarToggler.d.ts.map +1 -1
  358. package/lib/typescript/components/offcanvas/Offcanvas.d.ts +10 -6
  359. package/lib/typescript/components/offcanvas/Offcanvas.d.ts.map +1 -1
  360. package/lib/typescript/components/offcanvas/OffcanvasBody.d.ts +2 -2
  361. package/lib/typescript/components/offcanvas/OffcanvasBody.d.ts.map +1 -1
  362. package/lib/typescript/components/offcanvas/OffcanvasHeader.d.ts +2 -2
  363. package/lib/typescript/components/offcanvas/OffcanvasHeader.d.ts.map +1 -1
  364. package/lib/typescript/components/offcanvas/OffcanvasTitle.d.ts +2 -2
  365. package/lib/typescript/components/offcanvas/OffcanvasTitle.d.ts.map +1 -1
  366. package/lib/typescript/components/pagination/Pagination.d.ts +5 -3
  367. package/lib/typescript/components/pagination/Pagination.d.ts.map +1 -1
  368. package/lib/typescript/components/pagination/PaginationItem.d.ts +2 -2
  369. package/lib/typescript/components/pagination/PaginationItem.d.ts.map +1 -1
  370. package/lib/typescript/components/placeholders/Placeholders.d.ts +2 -2
  371. package/lib/typescript/components/placeholders/Placeholders.d.ts.map +1 -1
  372. package/lib/typescript/components/popover/Popover.d.ts +9 -5
  373. package/lib/typescript/components/popover/Popover.d.ts.map +1 -1
  374. package/lib/typescript/components/popover/PopoverArrow.d.ts +2 -2
  375. package/lib/typescript/components/popover/PopoverArrow.d.ts.map +1 -1
  376. package/lib/typescript/components/popover/PopoverBody.d.ts +2 -2
  377. package/lib/typescript/components/popover/PopoverBody.d.ts.map +1 -1
  378. package/lib/typescript/components/popover/PopoverHeader.d.ts +2 -2
  379. package/lib/typescript/components/popover/PopoverHeader.d.ts.map +1 -1
  380. package/lib/typescript/components/popover/injectPopover.d.ts +5 -1
  381. package/lib/typescript/components/popover/injectPopover.d.ts.map +1 -1
  382. package/lib/typescript/components/progress/Progress.d.ts +5 -3
  383. package/lib/typescript/components/progress/Progress.d.ts.map +1 -1
  384. package/lib/typescript/components/progress/ProgressBar.d.ts +2 -2
  385. package/lib/typescript/components/progress/ProgressBar.d.ts.map +1 -1
  386. package/lib/typescript/components/spinners/Spinner.d.ts +2 -2
  387. package/lib/typescript/components/spinners/Spinner.d.ts.map +1 -1
  388. package/lib/typescript/components/toasts/Toast.d.ts +7 -4
  389. package/lib/typescript/components/toasts/Toast.d.ts.map +1 -1
  390. package/lib/typescript/components/toasts/ToastBody.d.ts +2 -2
  391. package/lib/typescript/components/toasts/ToastBody.d.ts.map +1 -1
  392. package/lib/typescript/components/toasts/ToastContainer.d.ts +3 -2
  393. package/lib/typescript/components/toasts/ToastContainer.d.ts.map +1 -1
  394. package/lib/typescript/components/toasts/ToastHeader.d.ts +2 -2
  395. package/lib/typescript/components/toasts/ToastHeader.d.ts.map +1 -1
  396. package/lib/typescript/components/tooltip/Tooltip.d.ts +7 -4
  397. package/lib/typescript/components/tooltip/Tooltip.d.ts.map +1 -1
  398. package/lib/typescript/components/tooltip/TooltipArrow.d.ts +2 -2
  399. package/lib/typescript/components/tooltip/TooltipArrow.d.ts.map +1 -1
  400. package/lib/typescript/components/tooltip/TooltipInner.d.ts +2 -2
  401. package/lib/typescript/components/tooltip/TooltipInner.d.ts.map +1 -1
  402. package/lib/typescript/components/tooltip/injectTooltip.d.ts +5 -1
  403. package/lib/typescript/components/tooltip/injectTooltip.d.ts.map +1 -1
  404. package/lib/typescript/components/type/Blockquote.d.ts +2 -2
  405. package/lib/typescript/components/type/Blockquote.d.ts.map +1 -1
  406. package/lib/typescript/components/type/Code.d.ts +2 -2
  407. package/lib/typescript/components/type/Code.d.ts.map +1 -1
  408. package/lib/typescript/components/type/DisplayHeading.d.ts +5 -2
  409. package/lib/typescript/components/type/DisplayHeading.d.ts.map +1 -1
  410. package/lib/typescript/components/type/Paragraph.d.ts +2 -2
  411. package/lib/typescript/components/type/Paragraph.d.ts.map +1 -1
  412. package/lib/typescript/hooks/useAction.d.ts +3 -3
  413. package/lib/typescript/hooks/useAction.d.ts.map +1 -1
  414. package/lib/typescript/hooks/useModifier.d.ts +3 -1
  415. package/lib/typescript/hooks/useModifier.d.ts.map +1 -1
  416. package/lib/typescript/hooks/useScrollbarEffects.d.ts +3 -3
  417. package/lib/typescript/hooks/useScrollbarEffects.d.ts.map +1 -1
  418. package/lib/typescript/hooks/useScrollbarEffects.web.d.ts +3 -3
  419. package/lib/typescript/hooks/useScrollbarEffects.web.d.ts.map +1 -1
  420. package/lib/typescript/hooks/useScrollbarOffset.d.ts +2 -0
  421. package/lib/typescript/hooks/useScrollbarOffset.d.ts.map +1 -0
  422. package/lib/typescript/index.d.ts +3 -3
  423. package/lib/typescript/index.d.ts.map +1 -1
  424. package/lib/typescript/utils.d.ts +1 -1
  425. package/lib/typescript/utils.d.ts.map +1 -1
  426. package/package.json +1 -1
  427. package/src/Context.ts +4 -8
  428. package/src/Provider.tsx +4 -21
  429. package/src/components/Body.tsx +66 -68
  430. package/src/components/Caret.tsx +109 -111
  431. package/src/components/Heading.tsx +47 -49
  432. package/src/components/Image.tsx +3 -5
  433. package/src/components/ImageBackground.tsx +9 -10
  434. package/src/components/Label.tsx +32 -34
  435. package/src/components/Link.tsx +101 -101
  436. package/src/components/Pressable.tsx +161 -167
  437. package/src/components/ScrollView.tsx +76 -75
  438. package/src/components/Text.tsx +3 -4
  439. package/src/components/TextInput.tsx +36 -39
  440. package/src/components/View.tsx +3 -5
  441. package/src/components/alert/Alert.tsx +79 -80
  442. package/src/components/badge/Badge.tsx +41 -43
  443. package/src/components/breadcrumb/Breadcrumb.tsx +54 -56
  444. package/src/components/breadcrumb/BreadcrumbItem.tsx +80 -81
  445. package/src/components/button-group/ButtonGroup.tsx +42 -46
  446. package/src/components/button-group/ButtonToolbar.tsx +32 -34
  447. package/src/components/buttons/Button.tsx +3 -4
  448. package/src/components/card/Card.tsx +44 -46
  449. package/src/components/card/CardBody.tsx +38 -40
  450. package/src/components/card/CardFooter.tsx +42 -44
  451. package/src/components/card/CardHeader.tsx +43 -45
  452. package/src/components/close/CloseButton.tsx +53 -54
  453. package/src/components/collapse/Collapse.tsx +29 -31
  454. package/src/components/containers/Container.tsx +116 -118
  455. package/src/components/dropdown/Dropdown.tsx +3 -4
  456. package/src/components/dropdown/DropdownDivider.tsx +30 -32
  457. package/src/components/dropdown/DropdownHeader.tsx +40 -42
  458. package/src/components/dropdown/DropdownItemText.tsx +35 -37
  459. package/src/components/dropdown/DropdownMenu.tsx +109 -112
  460. package/src/components/dropdown/useToggleDropdown.ts +3 -4
  461. package/src/components/forms/Checkbox.tsx +13 -15
  462. package/src/components/forms/Feedback.tsx +38 -40
  463. package/src/components/forms/FormCheck.tsx +68 -69
  464. package/src/components/forms/FormCheckInput.tsx +74 -81
  465. package/src/components/forms/FormCheckLabel.tsx +69 -71
  466. package/src/components/forms/FormLabel.tsx +41 -43
  467. package/src/components/forms/FormText.tsx +36 -38
  468. package/src/components/forms/Input.tsx +5 -6
  469. package/src/components/forms/Picker.tsx +5 -6
  470. package/src/components/forms/PickerItem.tsx +3 -5
  471. package/src/components/forms/Radio.tsx +7 -7
  472. package/src/components/forms/RadioGroup.tsx +3 -4
  473. package/src/components/forms/Switch.tsx +13 -15
  474. package/src/components/forms/internals/FormCheckInputNative.tsx +49 -51
  475. package/src/components/forms/internals/FormCheckInputWeb.tsx +11 -11
  476. package/src/components/forms/internals/PickerNative.tsx +84 -84
  477. package/src/components/forms/internals/PickerNativeItem.tsx +29 -31
  478. package/src/components/forms/internals/PickerWeb.tsx +4 -3
  479. package/src/components/forms/internals/PickerWebItem.tsx +15 -17
  480. package/src/components/grid/Col.tsx +96 -97
  481. package/src/components/grid/Row.tsx +32 -34
  482. package/src/components/helpers/Dialog.web.tsx +2 -2
  483. package/src/components/list-group/ListGroup.tsx +75 -77
  484. package/src/components/list-group/ListGroupItem.tsx +150 -151
  485. package/src/components/list-group/ListGroupItemAction.tsx +190 -193
  486. package/src/components/modal/Modal.tsx +91 -96
  487. package/src/components/modal/ModalBody.tsx +26 -27
  488. package/src/components/modal/ModalFooter.tsx +38 -42
  489. package/src/components/modal/ModalHeader.tsx +37 -41
  490. package/src/components/modal/ModalTitle.tsx +3 -5
  491. package/src/components/nav/Nav.tsx +104 -106
  492. package/src/components/nav/NavLink.tsx +266 -267
  493. package/src/components/nav/TabContent.tsx +12 -14
  494. package/src/components/nav/TabPane.tsx +50 -52
  495. package/src/components/navbar/Navbar.tsx +89 -90
  496. package/src/components/navbar/NavbarBrand.tsx +78 -80
  497. package/src/components/navbar/NavbarCollapse.tsx +61 -63
  498. package/src/components/navbar/NavbarText.tsx +43 -45
  499. package/src/components/navbar/NavbarToggler.tsx +34 -36
  500. package/src/components/offcanvas/Offcanvas.tsx +4 -5
  501. package/src/components/offcanvas/OffcanvasBody.tsx +28 -29
  502. package/src/components/offcanvas/OffcanvasHeader.tsx +53 -55
  503. package/src/components/offcanvas/OffcanvasTitle.tsx +21 -23
  504. package/src/components/pagination/Pagination.tsx +37 -39
  505. package/src/components/pagination/PaginationItem.tsx +42 -43
  506. package/src/components/placeholders/Placeholders.tsx +30 -34
  507. package/src/components/popover/Popover.tsx +3 -4
  508. package/src/components/popover/PopoverArrow.tsx +25 -29
  509. package/src/components/popover/PopoverBody.tsx +37 -41
  510. package/src/components/popover/PopoverHeader.tsx +46 -48
  511. package/src/components/popover/injectPopover.tsx +69 -68
  512. package/src/components/progress/Progress.tsx +64 -65
  513. package/src/components/progress/ProgressBar.tsx +62 -70
  514. package/src/components/spinners/Spinner.tsx +161 -156
  515. package/src/components/toasts/Toast.tsx +65 -67
  516. package/src/components/toasts/ToastBody.tsx +39 -41
  517. package/src/components/toasts/ToastContainer.tsx +17 -19
  518. package/src/components/toasts/ToastHeader.tsx +55 -59
  519. package/src/components/tooltip/Tooltip.tsx +3 -4
  520. package/src/components/tooltip/TooltipArrow.tsx +21 -25
  521. package/src/components/tooltip/TooltipInner.tsx +37 -41
  522. package/src/components/tooltip/injectTooltip.tsx +67 -66
  523. package/src/components/type/Blockquote.tsx +43 -45
  524. package/src/components/type/Code.tsx +37 -39
  525. package/src/components/type/DisplayHeading.tsx +38 -38
  526. package/src/components/type/Paragraph.tsx +40 -42
  527. package/src/hooks/useAction.ts +84 -78
  528. package/src/hooks/useFocusRing.ts +1 -1
  529. package/src/hooks/useModifier.ts +23 -21
  530. package/src/hooks/useScrollbarEffects.ts +8 -7
  531. package/src/hooks/useScrollbarEffects.web.ts +26 -30
  532. package/src/hooks/useScrollbarOffset.ts +12 -0
  533. package/src/index.ts +3 -3
  534. package/src/utils.ts +1 -1
  535. package/lib/module/hooks/useFixedElement.js +0 -17
  536. package/lib/module/hooks/useFixedElement.js.map +0 -1
  537. package/lib/typescript/hooks/useFixedElement.d.ts +0 -2
  538. package/lib/typescript/hooks/useFixedElement.d.ts.map +0 -1
  539. package/src/hooks/useFixedElement.ts +0 -18
@@ -1,71 +1,69 @@
1
- import React from 'react';
2
- import StyleSheet from '../../style/StyleSheet';
3
- import css from '../../style/css';
4
- import { getStyles, each } from '../../utils';
5
- import Label, { LabelProps } from '../Label';
6
- import { FORM_VALIDATION_STATES } from '../../theme/proxies';
7
- import useForcedContext from '../../hooks/useForcedContext';
8
- import FormCheckContext from './FormCheckContext';
9
- import type { FormValidationState, ThemeVariables } from '../../types';
10
- import type { ViewRef } from '../View';
11
-
12
- export interface FormCheckLabelProps extends LabelProps {}
13
-
14
- const styles = StyleSheet.create({
15
- '.form-check-input:disabled ~ .form-check-label': css`
16
- @include platform(web) {
17
- cursor: default;
18
- }
19
- opacity: $form-check-label-disabled-opacity;
20
- `,
21
- '.form-check-label': css`
22
- flex-shrink: 1; // added for bootstrap-rn
23
-
24
- @include platform(web) {
25
- cursor: $form-check-label-cursor;
26
- }
27
- `,
28
- '.form-check-label --text': css`
29
- color: $form-check-label-color;
30
- `,
31
- ...each(FORM_VALIDATION_STATES, (state, data: FormValidationState) => ({
32
- [`.form-check-input:${state} ~ .form-check-label --text`]: css`
33
- color: ${(t: ThemeVariables) => data(t).color};
34
- `,
35
- })),
36
- });
37
-
38
- const FormCheckLabel = React.forwardRef<ViewRef, FormCheckLabelProps>(
39
- (props, ref) => {
40
- const { children, style, textStyle, ...elementProps } = props;
41
-
42
- const { disabled, valid, invalid } = useForcedContext(FormCheckContext);
43
-
44
- const classes = getStyles(styles, [
45
- disabled && '.form-check-input:disabled ~ .form-check-label',
46
- '.form-check-label',
47
- ]);
48
-
49
- const textClasses = getStyles(styles, [
50
- '.form-check-label --text',
51
- // validation
52
- valid && '.form-check-input:valid ~ .form-check-label --text',
53
- invalid && '.form-check-input:invalid ~ .form-check-label --text',
54
- ]);
55
-
56
- return (
57
- <Label
58
- {...elementProps}
59
- ref={ref}
60
- style={[classes, style]}
61
- textStyle={[textClasses, textStyle]}
62
- >
63
- {children}
64
- </Label>
65
- );
66
- },
67
- );
68
-
69
- FormCheckLabel.displayName = 'FormCheckLabel';
70
-
71
- export default FormCheckLabel;
1
+ import React from 'react';
2
+ import StyleSheet from '../../style/StyleSheet';
3
+ import css from '../../style/css';
4
+ import { getStyles, each } from '../../utils';
5
+ import Label, { LabelProps } from '../Label';
6
+ import { FORM_VALIDATION_STATES } from '../../theme/proxies';
7
+ import useForcedContext from '../../hooks/useForcedContext';
8
+ import FormCheckContext from './FormCheckContext';
9
+ import type { FormValidationState, ThemeVariables } from '../../types';
10
+ import type { ViewRef } from '../View';
11
+
12
+ export interface FormCheckLabelProps extends LabelProps {}
13
+
14
+ const styles = StyleSheet.create({
15
+ '.form-check-input:disabled ~ .form-check-label': css`
16
+ @include platform(web) {
17
+ cursor: default;
18
+ }
19
+ opacity: $form-check-label-disabled-opacity;
20
+ `,
21
+ '.form-check-label': css`
22
+ flex-shrink: 1; // added for bootstrap-rn
23
+
24
+ @include platform(web) {
25
+ cursor: $form-check-label-cursor;
26
+ }
27
+ `,
28
+ '.form-check-label --text': css`
29
+ color: $form-check-label-color;
30
+ `,
31
+ ...each(FORM_VALIDATION_STATES, (state, data: FormValidationState) => ({
32
+ [`.form-check-input:${state} ~ .form-check-label --text`]: css`
33
+ color: ${(t: ThemeVariables) => data(t).color};
34
+ `,
35
+ })),
36
+ });
37
+
38
+ function FormCheckLabel(
39
+ props: FormCheckLabelProps & React.RefAttributes<ViewRef>,
40
+ ) {
41
+ const { ref, children, style, textStyle, ...elementProps } = props;
42
+
43
+ const { disabled, valid, invalid } = useForcedContext(FormCheckContext);
44
+
45
+ const classes = getStyles(styles, [
46
+ disabled && '.form-check-input:disabled ~ .form-check-label',
47
+ '.form-check-label',
48
+ ]);
49
+
50
+ const textClasses = getStyles(styles, [
51
+ '.form-check-label --text',
52
+ // validation
53
+ valid && '.form-check-input:valid ~ .form-check-label --text',
54
+ invalid && '.form-check-input:invalid ~ .form-check-label --text',
55
+ ]);
56
+
57
+ return (
58
+ <Label
59
+ {...elementProps}
60
+ ref={ref}
61
+ style={[classes, style]}
62
+ textStyle={[textClasses, textStyle]}
63
+ >
64
+ {children}
65
+ </Label>
66
+ );
67
+ }
68
+
69
+ export default FormCheckLabel;
@@ -1,43 +1,41 @@
1
- import React from 'react';
2
- import StyleSheet from '../../style/StyleSheet';
3
- import css from '../../style/css';
4
- import Label, { LabelProps } from '../Label';
5
- import { getStyles } from '../../utils';
6
- import type { ViewRef } from '../View';
7
-
8
- export interface FormLabelProps extends LabelProps {}
9
-
10
- const styles = StyleSheet.create({
11
- '.form-label': css`
12
- margin-bottom: $form-label-margin-bottom;
13
- `,
14
- '.form-label --text': css`
15
- font-size: $form-label-font-size;
16
- line-height: $form-label-font-size * $line-height-base; // added for bootstrap-rn
17
- font-style: $form-label-font-style;
18
- font-weight: $form-label-font-weight;
19
- color: $form-label-color;
20
- `,
21
- });
22
-
23
- const FormLabel = React.forwardRef<ViewRef, FormLabelProps>((props, ref) => {
24
- const { children, style, textStyle, ...elementProps } = props;
25
-
26
- const classes = getStyles(styles, ['.form-label']);
27
- const textClasses = getStyles(styles, ['.form-label --text']);
28
-
29
- return (
30
- <Label
31
- {...elementProps}
32
- ref={ref}
33
- style={[classes, style]}
34
- textStyle={[textClasses, textStyle]}
35
- >
36
- {children}
37
- </Label>
38
- );
39
- });
40
-
41
- FormLabel.displayName = 'FormLabel';
42
-
43
- export default FormLabel;
1
+ import React from 'react';
2
+ import StyleSheet from '../../style/StyleSheet';
3
+ import css from '../../style/css';
4
+ import Label, { LabelProps } from '../Label';
5
+ import { getStyles } from '../../utils';
6
+ import type { ViewRef } from '../View';
7
+
8
+ export interface FormLabelProps extends LabelProps {}
9
+
10
+ const styles = StyleSheet.create({
11
+ '.form-label': css`
12
+ margin-bottom: $form-label-margin-bottom;
13
+ `,
14
+ '.form-label --text': css`
15
+ font-size: $form-label-font-size;
16
+ line-height: $form-label-font-size * $line-height-base; // added for bootstrap-rn
17
+ font-style: $form-label-font-style;
18
+ font-weight: $form-label-font-weight;
19
+ color: $form-label-color;
20
+ `,
21
+ });
22
+
23
+ function FormLabel(props: FormLabelProps & React.RefAttributes<ViewRef>) {
24
+ const { ref, children, style, textStyle, ...elementProps } = props;
25
+
26
+ const classes = getStyles(styles, ['.form-label']);
27
+ const textClasses = getStyles(styles, ['.form-label --text']);
28
+
29
+ return (
30
+ <Label
31
+ {...elementProps}
32
+ ref={ref}
33
+ style={[classes, style]}
34
+ textStyle={[textClasses, textStyle]}
35
+ >
36
+ {children}
37
+ </Label>
38
+ );
39
+ }
40
+
41
+ export default FormLabel;
@@ -1,38 +1,36 @@
1
- import React from 'react';
2
- import StyleSheet from '../../style/StyleSheet';
3
- import css from '../../style/css';
4
- import View, { ViewProps, ViewRef } from '../View';
5
- import Text from '../Text';
6
- import { getStyles } from '../../utils';
7
-
8
- export interface FormTextProps extends ViewProps {}
9
-
10
- const styles = StyleSheet.create({
11
- '.form-text': css`
12
- margin-top: $form-text-margin-top;
13
- `,
14
- '.form-text --text': css`
15
- font-size: $form-text-font-size;
16
- font-style: $form-text-font-style;
17
- font-weight: $form-text-font-weight;
18
- color: $form-text-color;
19
- `,
20
- });
21
-
22
- const FormText = React.forwardRef<ViewRef, FormTextProps>((props, ref) => {
23
- const { children, style, textStyle, ...elementProps } = props;
24
-
25
- const classes = getStyles(styles, ['.form-text']);
26
- const textClasses = getStyles(styles, ['.form-text --text']);
27
-
28
- // composite component
29
- return (
30
- <View {...elementProps} ref={ref} style={[classes, style]}>
31
- <Text style={[textClasses, textStyle]}>{children}</Text>
32
- </View>
33
- );
34
- });
35
-
36
- FormText.displayName = 'FormText';
37
-
38
- export default FormText;
1
+ import React from 'react';
2
+ import StyleSheet from '../../style/StyleSheet';
3
+ import css from '../../style/css';
4
+ import View, { ViewProps, ViewRef } from '../View';
5
+ import Text from '../Text';
6
+ import { getStyles } from '../../utils';
7
+
8
+ export interface FormTextProps extends ViewProps {}
9
+
10
+ const styles = StyleSheet.create({
11
+ '.form-text': css`
12
+ margin-top: $form-text-margin-top;
13
+ `,
14
+ '.form-text --text': css`
15
+ font-size: $form-text-font-size;
16
+ font-style: $form-text-font-style;
17
+ font-weight: $form-text-font-weight;
18
+ color: $form-text-color;
19
+ `,
20
+ });
21
+
22
+ function FormText(props: FormTextProps & React.RefAttributes<ViewRef>) {
23
+ const { ref, children, style, textStyle, ...elementProps } = props;
24
+
25
+ const classes = getStyles(styles, ['.form-text']);
26
+ const textClasses = getStyles(styles, ['.form-text --text']);
27
+
28
+ // composite component
29
+ return (
30
+ <View {...elementProps} ref={ref} style={[classes, style]}>
31
+ <Text style={[textClasses, textStyle]}>{children}</Text>
32
+ </View>
33
+ );
34
+ }
35
+
36
+ export default FormText;
@@ -170,10 +170,11 @@ const styles = StyleSheet.create({
170
170
  })),
171
171
  });
172
172
 
173
- const Input = React.forwardRef<TextInputRef, InputProps>((props, ref) => {
174
- const [modifierProps, modifierRef] = useModifier('useFormField', props, ref);
173
+ function Input(props: InputProps & React.RefAttributes<TextInputRef>) {
174
+ const modifierProps = useModifier('useFormField', props);
175
175
 
176
176
  const {
177
+ ref,
177
178
  size,
178
179
  placeholderTextColor = StyleSheet.value('input-placeholder-color'),
179
180
  multiline = false,
@@ -204,7 +205,7 @@ const Input = React.forwardRef<TextInputRef, InputProps>((props, ref) => {
204
205
  return (
205
206
  <TextInput
206
207
  {...elementProps}
207
- ref={modifierRef}
208
+ ref={ref}
208
209
  placeholderTextColor={placeholderTextColor}
209
210
  multiline={multiline}
210
211
  disabled={disabled}
@@ -213,8 +214,6 @@ const Input = React.forwardRef<TextInputRef, InputProps>((props, ref) => {
213
214
  style={[classes, style]}
214
215
  />
215
216
  );
216
- });
217
-
218
- Input.displayName = 'Input';
217
+ }
219
218
 
220
219
  export default Input;
@@ -115,10 +115,11 @@ const styles = StyleSheet.create({
115
115
  })),
116
116
  });
117
117
 
118
- const Picker = React.forwardRef<PressableRef, PickerProps>((props, ref) => {
119
- const [modifierProps, modifierRef] = useModifier('useFormField', props, ref);
118
+ function Picker(props: PickerProps & React.RefAttributes<PressableRef>) {
119
+ const modifierProps = useModifier('useFormField', props);
120
120
 
121
121
  const {
122
+ ref,
122
123
  children,
123
124
  onFocus = () => {},
124
125
  onBlur = () => {},
@@ -163,7 +164,7 @@ const Picker = React.forwardRef<PressableRef, PickerProps>((props, ref) => {
163
164
  <PickerContext.Provider value={contextValue}>
164
165
  <BasePicker
165
166
  {...elementProps}
166
- ref={modifierRef}
167
+ ref={ref}
167
168
  placeholderTextColor={placeholderTextColor}
168
169
  onFocus={(event) => {
169
170
  setFocused(true);
@@ -184,9 +185,7 @@ const Picker = React.forwardRef<PressableRef, PickerProps>((props, ref) => {
184
185
  </BasePicker>
185
186
  </PickerContext.Provider>
186
187
  );
187
- });
188
-
189
- Picker.displayName = 'Picker';
188
+ }
190
189
 
191
190
  export default Object.assign(Picker, {
192
191
  Item: PickerItem,
@@ -12,8 +12,8 @@ export interface PickerItemProps extends ViewProps {
12
12
  disabled?: boolean;
13
13
  }
14
14
 
15
- const PickerItem = React.forwardRef<ViewRef, PickerItemProps>((props, ref) => {
16
- const { label, value, disabled = false } = props;
15
+ function PickerItem(props: PickerItemProps & React.RefAttributes<ViewRef>) {
16
+ const { ref, label, value, disabled = false } = props;
17
17
 
18
18
  const { useNativeComponent } = useForcedContext(PickerContext);
19
19
 
@@ -25,8 +25,6 @@ const PickerItem = React.forwardRef<ViewRef, PickerItemProps>((props, ref) => {
25
25
  return (
26
26
  <BasePickerItem ref={ref} label={label} value={value} disabled={disabled} />
27
27
  );
28
- });
29
-
30
- PickerItem.displayName = 'PickerItem';
28
+ }
31
29
 
32
30
  export default PickerItem;
@@ -5,13 +5,15 @@ import FormCheckInput, { FormCheckInputProps } from './FormCheckInput';
5
5
  import RadioGroup from './RadioGroup';
6
6
  import RadioContext from './RadioContext';
7
7
 
8
- export interface RadioProps
9
- extends Omit<FormCheckInputProps, 'value' | 'type'> {
8
+ export interface RadioProps extends Omit<
9
+ FormCheckInputProps,
10
+ 'value' | 'type'
11
+ > {
10
12
  value: boolean | number | string | object | null;
11
13
  }
12
14
 
13
- const Radio = React.forwardRef<PressableRef, RadioProps>((props, ref) => {
14
- const { value, ...elementProps } = props;
15
+ function Radio(props: RadioProps & React.RefAttributes<PressableRef>) {
16
+ const { ref, value, ...elementProps } = props;
15
17
 
16
18
  const { selectedValue, onValueChange, disabled } =
17
19
  useForcedContext(RadioContext);
@@ -28,9 +30,7 @@ const Radio = React.forwardRef<PressableRef, RadioProps>((props, ref) => {
28
30
  disabled={disabled}
29
31
  />
30
32
  );
31
- });
32
-
33
- Radio.displayName = 'Radio';
33
+ }
34
34
 
35
35
  export default Object.assign(Radio, {
36
36
  Group: RadioGroup,
@@ -10,8 +10,9 @@ export interface RadioGroupProps extends ViewProps {
10
10
  disabled?: boolean;
11
11
  }
12
12
 
13
- const RadioGroup = React.forwardRef<ViewRef, RadioGroupProps>((props, ref) => {
13
+ function RadioGroup(props: RadioGroupProps & React.RefAttributes<ViewRef>) {
14
14
  const {
15
+ ref,
15
16
  children,
16
17
  selectedValue,
17
18
  onValueChange = () => {},
@@ -35,8 +36,6 @@ const RadioGroup = React.forwardRef<ViewRef, RadioGroupProps>((props, ref) => {
35
36
  </RadioContext.Provider>
36
37
  </View>
37
38
  );
38
- });
39
-
40
- RadioGroup.displayName = 'RadioGroup';
39
+ }
41
40
 
42
41
  export default RadioGroup;
@@ -1,15 +1,13 @@
1
- import React from 'react';
2
- import type { PressableRef } from '../Pressable';
3
- import FormCheckInput, { FormCheckInputProps } from './FormCheckInput';
4
-
5
- export interface SwitchProps extends Omit<FormCheckInputProps, 'type'> {}
6
-
7
- const Switch = React.forwardRef<PressableRef, SwitchProps>((props, ref) => {
8
- const { ...elementProps } = props;
9
-
10
- return <FormCheckInput {...elementProps} ref={ref} type="switch" />;
11
- });
12
-
13
- Switch.displayName = 'Switch';
14
-
15
- export default Switch;
1
+ import React from 'react';
2
+ import type { PressableRef } from '../Pressable';
3
+ import FormCheckInput, { FormCheckInputProps } from './FormCheckInput';
4
+
5
+ export interface SwitchProps extends Omit<FormCheckInputProps, 'type'> {}
6
+
7
+ function Switch(props: SwitchProps & React.RefAttributes<PressableRef>) {
8
+ const { ref, ...elementProps } = props;
9
+
10
+ return <FormCheckInput {...elementProps} ref={ref} type="switch" />;
11
+ }
12
+
13
+ export default Switch;
@@ -1,51 +1,49 @@
1
- import React, { forwardRef } from 'react';
2
- import type { ViewStyle } from 'react-native';
3
- import Pressable, { PressableRef } from '../../Pressable';
4
- import useBackground from '../../../hooks/useBackground';
5
- import type { FormCheckInputProps } from '../FormCheckInput';
6
-
7
- export interface FormCheckInputNativeProps extends FormCheckInputProps {
8
- style: ViewStyle[];
9
- }
10
-
11
- const FormCheckInputNative = forwardRef<
12
- PressableRef,
13
- FormCheckInputNativeProps
14
- >((props, ref) => {
15
- const {
16
- type,
17
- value,
18
- onValueChange: handleValueChange,
19
- onFocus = () => {},
20
- onBlur = () => {},
21
- hitSlop = 8,
22
- disabled = false,
23
- style,
24
- id,
25
- } = props;
26
-
27
- const inputBackground = useBackground(style);
28
-
29
- return (
30
- <Pressable
31
- ref={ref}
32
- role={type}
33
- aria-checked={value}
34
- onPress={() => {
35
- if (handleValueChange) handleValueChange(!value);
36
- }}
37
- onFocus={onFocus}
38
- onBlur={onBlur}
39
- hitSlop={hitSlop}
40
- disabled={disabled}
41
- style={inputBackground.style}
42
- id={id}
43
- >
44
- {inputBackground.element}
45
- </Pressable>
46
- );
47
- });
48
-
49
- FormCheckInputNative.displayName = 'FormCheckInputNative';
50
-
51
- export default FormCheckInputNative;
1
+ import React from 'react';
2
+ import type { ViewStyle } from 'react-native';
3
+ import Pressable, { PressableRef } from '../../Pressable';
4
+ import useBackground from '../../../hooks/useBackground';
5
+ import type { FormCheckInputProps } from '../FormCheckInput';
6
+
7
+ export interface FormCheckInputNativeProps extends FormCheckInputProps {
8
+ style: ViewStyle[];
9
+ }
10
+
11
+ function FormCheckInputNative(
12
+ props: FormCheckInputNativeProps & React.RefAttributes<PressableRef>,
13
+ ) {
14
+ const {
15
+ ref,
16
+ type,
17
+ value,
18
+ onValueChange: handleValueChange,
19
+ onFocus = () => {},
20
+ onBlur = () => {},
21
+ hitSlop = 8,
22
+ disabled = false,
23
+ style,
24
+ id,
25
+ } = props;
26
+
27
+ const inputBackground = useBackground(style);
28
+
29
+ return (
30
+ <Pressable
31
+ ref={ref}
32
+ role={type}
33
+ aria-checked={value}
34
+ onPress={() => {
35
+ if (handleValueChange) handleValueChange(!value);
36
+ }}
37
+ onFocus={onFocus}
38
+ onBlur={onBlur}
39
+ hitSlop={hitSlop}
40
+ disabled={disabled}
41
+ style={inputBackground.style}
42
+ id={id}
43
+ >
44
+ {inputBackground.element}
45
+ </Pressable>
46
+ );
47
+ }
48
+
49
+ export default FormCheckInputNative;
@@ -31,16 +31,18 @@ type InputProps = {
31
31
  id?: string;
32
32
  };
33
33
 
34
- const Input = React.forwardRef<HTMLInputElement, InputProps>(
35
- ({ style, ...props }, ref) =>
36
- createElement('input', { ...props, ref, style: [styles.reboot, style] }),
37
- );
34
+ const Input = ({
35
+ ref,
36
+ style,
37
+ ...props
38
+ }: InputProps & React.RefAttributes<HTMLInputElement>) =>
39
+ createElement('input', { ...props, ref, style: [styles.reboot, style] });
38
40
 
39
- const FormCheckInputWeb = React.forwardRef<
40
- PressableRef,
41
- FormCheckInputWebProps
42
- >((props, ref) => {
41
+ function FormCheckInputWeb(
42
+ props: FormCheckInputWebProps & React.RefAttributes<PressableRef>,
43
+ ) {
43
44
  const {
45
+ ref,
44
46
  type,
45
47
  value,
46
48
  onValueChange: handleValueChange,
@@ -72,8 +74,6 @@ const FormCheckInputWeb = React.forwardRef<
72
74
  autoFocus={autoFocus}
73
75
  />
74
76
  );
75
- });
76
-
77
- FormCheckInputWeb.displayName = 'FormCheckInputWeb';
77
+ }
78
78
 
79
79
  export default FormCheckInputWeb;