bootstrap-rn 0.4.8 → 0.4.9

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 (528) 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 -4
  17. package/lib/module/components/Link.js.map +1 -1
  18. package/lib/module/components/Pressable.js +7 -4
  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/forms/Checkbox.js +3 -3
  67. package/lib/module/components/forms/Checkbox.js.map +1 -1
  68. package/lib/module/components/forms/Feedback.js +3 -3
  69. package/lib/module/components/forms/Feedback.js.map +1 -1
  70. package/lib/module/components/forms/FormCheck.js +3 -3
  71. package/lib/module/components/forms/FormCheck.js.map +1 -1
  72. package/lib/module/components/forms/FormCheckInput.js +6 -4
  73. package/lib/module/components/forms/FormCheckInput.js.map +1 -1
  74. package/lib/module/components/forms/FormCheckLabel.js +3 -3
  75. package/lib/module/components/forms/FormCheckLabel.js.map +1 -1
  76. package/lib/module/components/forms/FormLabel.js +3 -3
  77. package/lib/module/components/forms/FormLabel.js.map +1 -1
  78. package/lib/module/components/forms/FormText.js +3 -3
  79. package/lib/module/components/forms/FormText.js.map +1 -1
  80. package/lib/module/components/forms/Input.js +6 -4
  81. package/lib/module/components/forms/Input.js.map +1 -1
  82. package/lib/module/components/forms/Picker.js +6 -4
  83. package/lib/module/components/forms/Picker.js.map +1 -1
  84. package/lib/module/components/forms/PickerItem.js +3 -3
  85. package/lib/module/components/forms/PickerItem.js.map +1 -1
  86. package/lib/module/components/forms/Radio.js +3 -3
  87. package/lib/module/components/forms/Radio.js.map +1 -1
  88. package/lib/module/components/forms/RadioGroup.js +3 -3
  89. package/lib/module/components/forms/RadioGroup.js.map +1 -1
  90. package/lib/module/components/forms/Switch.js +3 -3
  91. package/lib/module/components/forms/Switch.js.map +1 -1
  92. package/lib/module/components/forms/internals/FormCheckInputNative.js +4 -4
  93. package/lib/module/components/forms/internals/FormCheckInputNative.js.map +1 -1
  94. package/lib/module/components/forms/internals/FormCheckInputWeb.js +7 -6
  95. package/lib/module/components/forms/internals/FormCheckInputWeb.js.map +1 -1
  96. package/lib/module/components/forms/internals/PickerNative.js +3 -2
  97. package/lib/module/components/forms/internals/PickerNative.js.map +1 -1
  98. package/lib/module/components/forms/internals/PickerNativeItem.js +3 -3
  99. package/lib/module/components/forms/internals/PickerNativeItem.js.map +1 -1
  100. package/lib/module/components/forms/internals/PickerWeb.js +4 -3
  101. package/lib/module/components/forms/internals/PickerWeb.js.map +1 -1
  102. package/lib/module/components/forms/internals/PickerWebItem.js +3 -3
  103. package/lib/module/components/forms/internals/PickerWebItem.js.map +1 -1
  104. package/lib/module/components/grid/Col.js +3 -3
  105. package/lib/module/components/grid/Col.js.map +1 -1
  106. package/lib/module/components/grid/Row.js +3 -3
  107. package/lib/module/components/grid/Row.js.map +1 -1
  108. package/lib/module/components/helpers/Dialog.web.js +2 -2
  109. package/lib/module/components/helpers/Dialog.web.js.map +1 -1
  110. package/lib/module/components/list-group/ListGroup.js +3 -3
  111. package/lib/module/components/list-group/ListGroup.js.map +1 -1
  112. package/lib/module/components/list-group/ListGroupItem.js +3 -3
  113. package/lib/module/components/list-group/ListGroupItem.js.map +1 -1
  114. package/lib/module/components/list-group/ListGroupItemAction.js +6 -4
  115. package/lib/module/components/list-group/ListGroupItemAction.js.map +1 -1
  116. package/lib/module/components/modal/Modal.js +3 -4
  117. package/lib/module/components/modal/Modal.js.map +1 -1
  118. package/lib/module/components/modal/ModalBody.js +3 -3
  119. package/lib/module/components/modal/ModalBody.js.map +1 -1
  120. package/lib/module/components/modal/ModalFooter.js +3 -3
  121. package/lib/module/components/modal/ModalFooter.js.map +1 -1
  122. package/lib/module/components/modal/ModalHeader.js +3 -3
  123. package/lib/module/components/modal/ModalHeader.js.map +1 -1
  124. package/lib/module/components/modal/ModalTitle.js +3 -3
  125. package/lib/module/components/modal/ModalTitle.js.map +1 -1
  126. package/lib/module/components/nav/Nav.js +3 -3
  127. package/lib/module/components/nav/Nav.js.map +1 -1
  128. package/lib/module/components/nav/NavLink.js +6 -4
  129. package/lib/module/components/nav/NavLink.js.map +1 -1
  130. package/lib/module/components/nav/TabContent.js +3 -3
  131. package/lib/module/components/nav/TabContent.js.map +1 -1
  132. package/lib/module/components/nav/TabPane.js +3 -3
  133. package/lib/module/components/nav/TabPane.js.map +1 -1
  134. package/lib/module/components/navbar/Navbar.js +3 -3
  135. package/lib/module/components/navbar/Navbar.js.map +1 -1
  136. package/lib/module/components/navbar/NavbarBrand.js +3 -3
  137. package/lib/module/components/navbar/NavbarBrand.js.map +1 -1
  138. package/lib/module/components/navbar/NavbarCollapse.js +3 -3
  139. package/lib/module/components/navbar/NavbarCollapse.js.map +1 -1
  140. package/lib/module/components/navbar/NavbarText.js +3 -3
  141. package/lib/module/components/navbar/NavbarText.js.map +1 -1
  142. package/lib/module/components/navbar/NavbarToggler.js +3 -3
  143. package/lib/module/components/navbar/NavbarToggler.js.map +1 -1
  144. package/lib/module/components/offcanvas/Offcanvas.js +3 -3
  145. package/lib/module/components/offcanvas/Offcanvas.js.map +1 -1
  146. package/lib/module/components/offcanvas/OffcanvasBody.js +3 -3
  147. package/lib/module/components/offcanvas/OffcanvasBody.js.map +1 -1
  148. package/lib/module/components/offcanvas/OffcanvasHeader.js +3 -3
  149. package/lib/module/components/offcanvas/OffcanvasHeader.js.map +1 -1
  150. package/lib/module/components/offcanvas/OffcanvasTitle.js +3 -3
  151. package/lib/module/components/offcanvas/OffcanvasTitle.js.map +1 -1
  152. package/lib/module/components/pagination/Pagination.js +3 -3
  153. package/lib/module/components/pagination/Pagination.js.map +1 -1
  154. package/lib/module/components/pagination/PaginationItem.js +3 -3
  155. package/lib/module/components/pagination/PaginationItem.js.map +1 -1
  156. package/lib/module/components/placeholders/Placeholders.js +6 -6
  157. package/lib/module/components/placeholders/Placeholders.js.map +1 -1
  158. package/lib/module/components/popover/Popover.js +3 -3
  159. package/lib/module/components/popover/Popover.js.map +1 -1
  160. package/lib/module/components/popover/PopoverArrow.js +3 -3
  161. package/lib/module/components/popover/PopoverArrow.js.map +1 -1
  162. package/lib/module/components/popover/PopoverBody.js +3 -3
  163. package/lib/module/components/popover/PopoverBody.js.map +1 -1
  164. package/lib/module/components/popover/PopoverHeader.js +3 -3
  165. package/lib/module/components/popover/PopoverHeader.js.map +1 -1
  166. package/lib/module/components/popover/injectPopover.js +3 -2
  167. package/lib/module/components/popover/injectPopover.js.map +1 -1
  168. package/lib/module/components/progress/Progress.js +3 -3
  169. package/lib/module/components/progress/Progress.js.map +1 -1
  170. package/lib/module/components/progress/ProgressBar.js +3 -3
  171. package/lib/module/components/progress/ProgressBar.js.map +1 -1
  172. package/lib/module/components/spinners/Spinner.js +3 -3
  173. package/lib/module/components/spinners/Spinner.js.map +1 -1
  174. package/lib/module/components/toasts/Toast.js +3 -3
  175. package/lib/module/components/toasts/Toast.js.map +1 -1
  176. package/lib/module/components/toasts/ToastBody.js +3 -3
  177. package/lib/module/components/toasts/ToastBody.js.map +1 -1
  178. package/lib/module/components/toasts/ToastContainer.js +3 -3
  179. package/lib/module/components/toasts/ToastContainer.js.map +1 -1
  180. package/lib/module/components/toasts/ToastHeader.js +3 -3
  181. package/lib/module/components/toasts/ToastHeader.js.map +1 -1
  182. package/lib/module/components/tooltip/Tooltip.js +3 -3
  183. package/lib/module/components/tooltip/Tooltip.js.map +1 -1
  184. package/lib/module/components/tooltip/TooltipArrow.js +3 -3
  185. package/lib/module/components/tooltip/TooltipArrow.js.map +1 -1
  186. package/lib/module/components/tooltip/TooltipInner.js +3 -3
  187. package/lib/module/components/tooltip/TooltipInner.js.map +1 -1
  188. package/lib/module/components/tooltip/injectTooltip.js +3 -2
  189. package/lib/module/components/tooltip/injectTooltip.js.map +1 -1
  190. package/lib/module/components/type/Blockquote.js +3 -3
  191. package/lib/module/components/type/Blockquote.js.map +1 -1
  192. package/lib/module/components/type/Code.js +3 -3
  193. package/lib/module/components/type/Code.js.map +1 -1
  194. package/lib/module/components/type/DisplayHeading.js +3 -2
  195. package/lib/module/components/type/DisplayHeading.js.map +1 -1
  196. package/lib/module/components/type/Paragraph.js +3 -3
  197. package/lib/module/components/type/Paragraph.js.map +1 -1
  198. package/lib/module/hooks/useFocusRing.js +1 -1
  199. package/lib/module/hooks/useScrollbarEffects.js +8 -5
  200. package/lib/module/hooks/useScrollbarEffects.js.map +1 -1
  201. package/lib/module/hooks/useScrollbarEffects.web.js +21 -19
  202. package/lib/module/hooks/useScrollbarEffects.web.js.map +1 -1
  203. package/lib/module/hooks/useScrollbarOffset.js +10 -0
  204. package/lib/module/hooks/useScrollbarOffset.js.map +1 -0
  205. package/lib/module/index.js +2 -2
  206. package/lib/module/index.js.map +1 -1
  207. package/lib/module/utils.js.map +1 -1
  208. package/lib/typescript/Context.d.ts +4 -9
  209. package/lib/typescript/Context.d.ts.map +1 -1
  210. package/lib/typescript/Provider.d.ts.map +1 -1
  211. package/lib/typescript/components/Body.d.ts +2 -2
  212. package/lib/typescript/components/Body.d.ts.map +1 -1
  213. package/lib/typescript/components/Caret.d.ts +2 -2
  214. package/lib/typescript/components/Caret.d.ts.map +1 -1
  215. package/lib/typescript/components/Heading.d.ts +2 -2
  216. package/lib/typescript/components/Heading.d.ts.map +1 -1
  217. package/lib/typescript/components/Image.d.ts +1 -1
  218. package/lib/typescript/components/Image.d.ts.map +1 -1
  219. package/lib/typescript/components/ImageBackground.d.ts +1 -1
  220. package/lib/typescript/components/ImageBackground.d.ts.map +1 -1
  221. package/lib/typescript/components/Label.d.ts +2 -2
  222. package/lib/typescript/components/Label.d.ts.map +1 -1
  223. package/lib/typescript/components/Link.d.ts +2 -2
  224. package/lib/typescript/components/Link.d.ts.map +1 -1
  225. package/lib/typescript/components/Pressable.d.ts +1 -1
  226. package/lib/typescript/components/Pressable.d.ts.map +1 -1
  227. package/lib/typescript/components/ScrollView.d.ts +1 -1
  228. package/lib/typescript/components/ScrollView.d.ts.map +1 -1
  229. package/lib/typescript/components/Text.d.ts +1 -1
  230. package/lib/typescript/components/Text.d.ts.map +1 -1
  231. package/lib/typescript/components/TextInput.d.ts +1 -1
  232. package/lib/typescript/components/TextInput.d.ts.map +1 -1
  233. package/lib/typescript/components/View.d.ts +1 -1
  234. package/lib/typescript/components/View.d.ts.map +1 -1
  235. package/lib/typescript/components/alert/Alert.d.ts +2 -2
  236. package/lib/typescript/components/alert/Alert.d.ts.map +1 -1
  237. package/lib/typescript/components/badge/Badge.d.ts +2 -2
  238. package/lib/typescript/components/badge/Badge.d.ts.map +1 -1
  239. package/lib/typescript/components/breadcrumb/Breadcrumb.d.ts +5 -3
  240. package/lib/typescript/components/breadcrumb/Breadcrumb.d.ts.map +1 -1
  241. package/lib/typescript/components/breadcrumb/BreadcrumbItem.d.ts +2 -2
  242. package/lib/typescript/components/breadcrumb/BreadcrumbItem.d.ts.map +1 -1
  243. package/lib/typescript/components/button-group/ButtonGroup.d.ts +2 -2
  244. package/lib/typescript/components/button-group/ButtonGroup.d.ts.map +1 -1
  245. package/lib/typescript/components/button-group/ButtonToolbar.d.ts +2 -2
  246. package/lib/typescript/components/button-group/ButtonToolbar.d.ts.map +1 -1
  247. package/lib/typescript/components/buttons/Button.d.ts +3 -2
  248. package/lib/typescript/components/buttons/Button.d.ts.map +1 -1
  249. package/lib/typescript/components/card/Card.d.ts +9 -5
  250. package/lib/typescript/components/card/Card.d.ts.map +1 -1
  251. package/lib/typescript/components/card/CardBody.d.ts +2 -2
  252. package/lib/typescript/components/card/CardBody.d.ts.map +1 -1
  253. package/lib/typescript/components/card/CardFooter.d.ts +2 -2
  254. package/lib/typescript/components/card/CardFooter.d.ts.map +1 -1
  255. package/lib/typescript/components/card/CardHeader.d.ts +2 -2
  256. package/lib/typescript/components/card/CardHeader.d.ts.map +1 -1
  257. package/lib/typescript/components/close/CloseButton.d.ts +2 -2
  258. package/lib/typescript/components/close/CloseButton.d.ts.map +1 -1
  259. package/lib/typescript/components/collapse/Collapse.d.ts +3 -2
  260. package/lib/typescript/components/collapse/Collapse.d.ts.map +1 -1
  261. package/lib/typescript/components/containers/Container.d.ts +2 -2
  262. package/lib/typescript/components/containers/Container.d.ts.map +1 -1
  263. package/lib/typescript/components/dropdown/Dropdown.d.ts +11 -6
  264. package/lib/typescript/components/dropdown/Dropdown.d.ts.map +1 -1
  265. package/lib/typescript/components/dropdown/DropdownDivider.d.ts +2 -2
  266. package/lib/typescript/components/dropdown/DropdownDivider.d.ts.map +1 -1
  267. package/lib/typescript/components/dropdown/DropdownHeader.d.ts +2 -2
  268. package/lib/typescript/components/dropdown/DropdownHeader.d.ts.map +1 -1
  269. package/lib/typescript/components/dropdown/DropdownItemText.d.ts +2 -2
  270. package/lib/typescript/components/dropdown/DropdownItemText.d.ts.map +1 -1
  271. package/lib/typescript/components/dropdown/DropdownMenu.d.ts +2 -2
  272. package/lib/typescript/components/dropdown/DropdownMenu.d.ts.map +1 -1
  273. package/lib/typescript/components/dropdown/useToggleDropdown.d.ts +2 -2
  274. package/lib/typescript/components/dropdown/useToggleDropdown.d.ts.map +1 -1
  275. package/lib/typescript/components/forms/Checkbox.d.ts +2 -1
  276. package/lib/typescript/components/forms/Checkbox.d.ts.map +1 -1
  277. package/lib/typescript/components/forms/Feedback.d.ts +2 -2
  278. package/lib/typescript/components/forms/Feedback.d.ts.map +1 -1
  279. package/lib/typescript/components/forms/FormCheck.d.ts +5 -3
  280. package/lib/typescript/components/forms/FormCheck.d.ts.map +1 -1
  281. package/lib/typescript/components/forms/FormCheckInput.d.ts +2 -1
  282. package/lib/typescript/components/forms/FormCheckInput.d.ts.map +1 -1
  283. package/lib/typescript/components/forms/FormCheckLabel.d.ts +2 -1
  284. package/lib/typescript/components/forms/FormCheckLabel.d.ts.map +1 -1
  285. package/lib/typescript/components/forms/FormLabel.d.ts +2 -1
  286. package/lib/typescript/components/forms/FormLabel.d.ts.map +1 -1
  287. package/lib/typescript/components/forms/FormText.d.ts +2 -2
  288. package/lib/typescript/components/forms/FormText.d.ts.map +1 -1
  289. package/lib/typescript/components/forms/Input.d.ts +2 -2
  290. package/lib/typescript/components/forms/Input.d.ts.map +1 -1
  291. package/lib/typescript/components/forms/Picker.d.ts +5 -4
  292. package/lib/typescript/components/forms/Picker.d.ts.map +1 -1
  293. package/lib/typescript/components/forms/PickerItem.d.ts +2 -2
  294. package/lib/typescript/components/forms/PickerItem.d.ts.map +1 -1
  295. package/lib/typescript/components/forms/Radio.d.ts +5 -2
  296. package/lib/typescript/components/forms/Radio.d.ts.map +1 -1
  297. package/lib/typescript/components/forms/RadioGroup.d.ts +2 -2
  298. package/lib/typescript/components/forms/RadioGroup.d.ts.map +1 -1
  299. package/lib/typescript/components/forms/Switch.d.ts +2 -1
  300. package/lib/typescript/components/forms/Switch.d.ts.map +1 -1
  301. package/lib/typescript/components/forms/internals/FormCheckInputNative.d.ts +2 -1
  302. package/lib/typescript/components/forms/internals/FormCheckInputNative.d.ts.map +1 -1
  303. package/lib/typescript/components/forms/internals/FormCheckInputWeb.d.ts +2 -1
  304. package/lib/typescript/components/forms/internals/FormCheckInputWeb.d.ts.map +1 -1
  305. package/lib/typescript/components/forms/internals/PickerNative.d.ts +2 -1
  306. package/lib/typescript/components/forms/internals/PickerNative.d.ts.map +1 -1
  307. package/lib/typescript/components/forms/internals/PickerNativeItem.d.ts +2 -2
  308. package/lib/typescript/components/forms/internals/PickerNativeItem.d.ts.map +1 -1
  309. package/lib/typescript/components/forms/internals/PickerWeb.d.ts +2 -1
  310. package/lib/typescript/components/forms/internals/PickerWeb.d.ts.map +1 -1
  311. package/lib/typescript/components/forms/internals/PickerWebItem.d.ts +2 -2
  312. package/lib/typescript/components/forms/internals/PickerWebItem.d.ts.map +1 -1
  313. package/lib/typescript/components/grid/Col.d.ts +2 -2
  314. package/lib/typescript/components/grid/Col.d.ts.map +1 -1
  315. package/lib/typescript/components/grid/Row.d.ts +2 -2
  316. package/lib/typescript/components/grid/Row.d.ts.map +1 -1
  317. package/lib/typescript/components/list-group/ListGroup.d.ts +7 -4
  318. package/lib/typescript/components/list-group/ListGroup.d.ts.map +1 -1
  319. package/lib/typescript/components/list-group/ListGroupItem.d.ts +2 -2
  320. package/lib/typescript/components/list-group/ListGroupItem.d.ts.map +1 -1
  321. package/lib/typescript/components/list-group/ListGroupItemAction.d.ts +2 -2
  322. package/lib/typescript/components/list-group/ListGroupItemAction.d.ts.map +1 -1
  323. package/lib/typescript/components/modal/Modal.d.ts +13 -7
  324. package/lib/typescript/components/modal/Modal.d.ts.map +1 -1
  325. package/lib/typescript/components/modal/ModalBody.d.ts +3 -2
  326. package/lib/typescript/components/modal/ModalBody.d.ts.map +1 -1
  327. package/lib/typescript/components/modal/ModalFooter.d.ts +2 -2
  328. package/lib/typescript/components/modal/ModalFooter.d.ts.map +1 -1
  329. package/lib/typescript/components/modal/ModalHeader.d.ts +2 -2
  330. package/lib/typescript/components/modal/ModalHeader.d.ts.map +1 -1
  331. package/lib/typescript/components/modal/ModalTitle.d.ts +2 -2
  332. package/lib/typescript/components/modal/ModalTitle.d.ts.map +1 -1
  333. package/lib/typescript/components/nav/Nav.d.ts +5 -3
  334. package/lib/typescript/components/nav/Nav.d.ts.map +1 -1
  335. package/lib/typescript/components/nav/NavLink.d.ts +2 -2
  336. package/lib/typescript/components/nav/NavLink.d.ts.map +1 -1
  337. package/lib/typescript/components/nav/Tab.d.ts +4 -2
  338. package/lib/typescript/components/nav/Tab.d.ts.map +1 -1
  339. package/lib/typescript/components/nav/TabContent.d.ts +2 -2
  340. package/lib/typescript/components/nav/TabContent.d.ts.map +1 -1
  341. package/lib/typescript/components/nav/TabPane.d.ts +2 -2
  342. package/lib/typescript/components/nav/TabPane.d.ts.map +1 -1
  343. package/lib/typescript/components/navbar/Navbar.d.ts +11 -6
  344. package/lib/typescript/components/navbar/Navbar.d.ts.map +1 -1
  345. package/lib/typescript/components/navbar/NavbarBrand.d.ts +2 -2
  346. package/lib/typescript/components/navbar/NavbarBrand.d.ts.map +1 -1
  347. package/lib/typescript/components/navbar/NavbarCollapse.d.ts +2 -2
  348. package/lib/typescript/components/navbar/NavbarCollapse.d.ts.map +1 -1
  349. package/lib/typescript/components/navbar/NavbarText.d.ts +2 -2
  350. package/lib/typescript/components/navbar/NavbarText.d.ts.map +1 -1
  351. package/lib/typescript/components/navbar/NavbarToggler.d.ts +2 -1
  352. package/lib/typescript/components/navbar/NavbarToggler.d.ts.map +1 -1
  353. package/lib/typescript/components/offcanvas/Offcanvas.d.ts +10 -6
  354. package/lib/typescript/components/offcanvas/Offcanvas.d.ts.map +1 -1
  355. package/lib/typescript/components/offcanvas/OffcanvasBody.d.ts +2 -2
  356. package/lib/typescript/components/offcanvas/OffcanvasBody.d.ts.map +1 -1
  357. package/lib/typescript/components/offcanvas/OffcanvasHeader.d.ts +2 -2
  358. package/lib/typescript/components/offcanvas/OffcanvasHeader.d.ts.map +1 -1
  359. package/lib/typescript/components/offcanvas/OffcanvasTitle.d.ts +2 -2
  360. package/lib/typescript/components/offcanvas/OffcanvasTitle.d.ts.map +1 -1
  361. package/lib/typescript/components/pagination/Pagination.d.ts +5 -3
  362. package/lib/typescript/components/pagination/Pagination.d.ts.map +1 -1
  363. package/lib/typescript/components/pagination/PaginationItem.d.ts +2 -2
  364. package/lib/typescript/components/pagination/PaginationItem.d.ts.map +1 -1
  365. package/lib/typescript/components/placeholders/Placeholders.d.ts +2 -2
  366. package/lib/typescript/components/placeholders/Placeholders.d.ts.map +1 -1
  367. package/lib/typescript/components/popover/Popover.d.ts +9 -5
  368. package/lib/typescript/components/popover/Popover.d.ts.map +1 -1
  369. package/lib/typescript/components/popover/PopoverArrow.d.ts +2 -2
  370. package/lib/typescript/components/popover/PopoverArrow.d.ts.map +1 -1
  371. package/lib/typescript/components/popover/PopoverBody.d.ts +2 -2
  372. package/lib/typescript/components/popover/PopoverBody.d.ts.map +1 -1
  373. package/lib/typescript/components/popover/PopoverHeader.d.ts +2 -2
  374. package/lib/typescript/components/popover/PopoverHeader.d.ts.map +1 -1
  375. package/lib/typescript/components/popover/injectPopover.d.ts +5 -1
  376. package/lib/typescript/components/popover/injectPopover.d.ts.map +1 -1
  377. package/lib/typescript/components/progress/Progress.d.ts +5 -3
  378. package/lib/typescript/components/progress/Progress.d.ts.map +1 -1
  379. package/lib/typescript/components/progress/ProgressBar.d.ts +2 -2
  380. package/lib/typescript/components/progress/ProgressBar.d.ts.map +1 -1
  381. package/lib/typescript/components/spinners/Spinner.d.ts +2 -2
  382. package/lib/typescript/components/spinners/Spinner.d.ts.map +1 -1
  383. package/lib/typescript/components/toasts/Toast.d.ts +7 -4
  384. package/lib/typescript/components/toasts/Toast.d.ts.map +1 -1
  385. package/lib/typescript/components/toasts/ToastBody.d.ts +2 -2
  386. package/lib/typescript/components/toasts/ToastBody.d.ts.map +1 -1
  387. package/lib/typescript/components/toasts/ToastContainer.d.ts +3 -2
  388. package/lib/typescript/components/toasts/ToastContainer.d.ts.map +1 -1
  389. package/lib/typescript/components/toasts/ToastHeader.d.ts +2 -2
  390. package/lib/typescript/components/toasts/ToastHeader.d.ts.map +1 -1
  391. package/lib/typescript/components/tooltip/Tooltip.d.ts +7 -4
  392. package/lib/typescript/components/tooltip/Tooltip.d.ts.map +1 -1
  393. package/lib/typescript/components/tooltip/TooltipArrow.d.ts +2 -2
  394. package/lib/typescript/components/tooltip/TooltipArrow.d.ts.map +1 -1
  395. package/lib/typescript/components/tooltip/TooltipInner.d.ts +2 -2
  396. package/lib/typescript/components/tooltip/TooltipInner.d.ts.map +1 -1
  397. package/lib/typescript/components/tooltip/injectTooltip.d.ts +5 -1
  398. package/lib/typescript/components/tooltip/injectTooltip.d.ts.map +1 -1
  399. package/lib/typescript/components/type/Blockquote.d.ts +2 -2
  400. package/lib/typescript/components/type/Blockquote.d.ts.map +1 -1
  401. package/lib/typescript/components/type/Code.d.ts +2 -2
  402. package/lib/typescript/components/type/Code.d.ts.map +1 -1
  403. package/lib/typescript/components/type/DisplayHeading.d.ts +5 -2
  404. package/lib/typescript/components/type/DisplayHeading.d.ts.map +1 -1
  405. package/lib/typescript/components/type/Paragraph.d.ts +2 -2
  406. package/lib/typescript/components/type/Paragraph.d.ts.map +1 -1
  407. package/lib/typescript/hooks/useScrollbarEffects.d.ts +3 -3
  408. package/lib/typescript/hooks/useScrollbarEffects.d.ts.map +1 -1
  409. package/lib/typescript/hooks/useScrollbarEffects.web.d.ts +3 -3
  410. package/lib/typescript/hooks/useScrollbarEffects.web.d.ts.map +1 -1
  411. package/lib/typescript/hooks/useScrollbarOffset.d.ts +2 -0
  412. package/lib/typescript/hooks/useScrollbarOffset.d.ts.map +1 -0
  413. package/lib/typescript/index.d.ts +3 -3
  414. package/lib/typescript/index.d.ts.map +1 -1
  415. package/lib/typescript/utils.d.ts +1 -1
  416. package/lib/typescript/utils.d.ts.map +1 -1
  417. package/package.json +1 -1
  418. package/src/Context.ts +4 -7
  419. package/src/Provider.tsx +4 -21
  420. package/src/components/Body.tsx +66 -68
  421. package/src/components/Caret.tsx +109 -111
  422. package/src/components/Heading.tsx +47 -49
  423. package/src/components/Image.tsx +3 -5
  424. package/src/components/ImageBackground.tsx +9 -10
  425. package/src/components/Label.tsx +32 -34
  426. package/src/components/Link.tsx +104 -101
  427. package/src/components/Pressable.tsx +167 -167
  428. package/src/components/ScrollView.tsx +76 -75
  429. package/src/components/Text.tsx +3 -4
  430. package/src/components/TextInput.tsx +36 -39
  431. package/src/components/View.tsx +3 -5
  432. package/src/components/alert/Alert.tsx +79 -80
  433. package/src/components/badge/Badge.tsx +41 -43
  434. package/src/components/breadcrumb/Breadcrumb.tsx +54 -56
  435. package/src/components/breadcrumb/BreadcrumbItem.tsx +80 -81
  436. package/src/components/button-group/ButtonGroup.tsx +42 -46
  437. package/src/components/button-group/ButtonToolbar.tsx +32 -34
  438. package/src/components/buttons/Button.tsx +3 -4
  439. package/src/components/card/Card.tsx +44 -46
  440. package/src/components/card/CardBody.tsx +38 -40
  441. package/src/components/card/CardFooter.tsx +42 -44
  442. package/src/components/card/CardHeader.tsx +43 -45
  443. package/src/components/close/CloseButton.tsx +53 -54
  444. package/src/components/collapse/Collapse.tsx +29 -31
  445. package/src/components/containers/Container.tsx +116 -118
  446. package/src/components/dropdown/Dropdown.tsx +3 -4
  447. package/src/components/dropdown/DropdownDivider.tsx +30 -32
  448. package/src/components/dropdown/DropdownHeader.tsx +40 -42
  449. package/src/components/dropdown/DropdownItemText.tsx +35 -37
  450. package/src/components/dropdown/DropdownMenu.tsx +109 -112
  451. package/src/components/dropdown/useToggleDropdown.ts +1 -1
  452. package/src/components/forms/Checkbox.tsx +13 -15
  453. package/src/components/forms/Feedback.tsx +38 -40
  454. package/src/components/forms/FormCheck.tsx +68 -69
  455. package/src/components/forms/FormCheckInput.tsx +78 -81
  456. package/src/components/forms/FormCheckLabel.tsx +69 -71
  457. package/src/components/forms/FormLabel.tsx +41 -43
  458. package/src/components/forms/FormText.tsx +36 -38
  459. package/src/components/forms/Input.tsx +10 -5
  460. package/src/components/forms/Picker.tsx +10 -5
  461. package/src/components/forms/PickerItem.tsx +3 -5
  462. package/src/components/forms/Radio.tsx +7 -7
  463. package/src/components/forms/RadioGroup.tsx +3 -4
  464. package/src/components/forms/Switch.tsx +13 -15
  465. package/src/components/forms/internals/FormCheckInputNative.tsx +49 -51
  466. package/src/components/forms/internals/FormCheckInputWeb.tsx +11 -11
  467. package/src/components/forms/internals/PickerNative.tsx +84 -84
  468. package/src/components/forms/internals/PickerNativeItem.tsx +29 -31
  469. package/src/components/forms/internals/PickerWeb.tsx +4 -3
  470. package/src/components/forms/internals/PickerWebItem.tsx +15 -17
  471. package/src/components/grid/Col.tsx +96 -97
  472. package/src/components/grid/Row.tsx +32 -34
  473. package/src/components/helpers/Dialog.web.tsx +2 -2
  474. package/src/components/list-group/ListGroup.tsx +75 -77
  475. package/src/components/list-group/ListGroupItem.tsx +150 -151
  476. package/src/components/list-group/ListGroupItemAction.tsx +194 -193
  477. package/src/components/modal/Modal.tsx +91 -96
  478. package/src/components/modal/ModalBody.tsx +26 -27
  479. package/src/components/modal/ModalFooter.tsx +38 -42
  480. package/src/components/modal/ModalHeader.tsx +37 -41
  481. package/src/components/modal/ModalTitle.tsx +3 -5
  482. package/src/components/nav/Nav.tsx +104 -106
  483. package/src/components/nav/NavLink.tsx +272 -267
  484. package/src/components/nav/TabContent.tsx +12 -14
  485. package/src/components/nav/TabPane.tsx +50 -52
  486. package/src/components/navbar/Navbar.tsx +89 -90
  487. package/src/components/navbar/NavbarBrand.tsx +78 -80
  488. package/src/components/navbar/NavbarCollapse.tsx +61 -63
  489. package/src/components/navbar/NavbarText.tsx +43 -45
  490. package/src/components/navbar/NavbarToggler.tsx +34 -36
  491. package/src/components/offcanvas/Offcanvas.tsx +4 -5
  492. package/src/components/offcanvas/OffcanvasBody.tsx +28 -29
  493. package/src/components/offcanvas/OffcanvasHeader.tsx +53 -55
  494. package/src/components/offcanvas/OffcanvasTitle.tsx +21 -23
  495. package/src/components/pagination/Pagination.tsx +37 -39
  496. package/src/components/pagination/PaginationItem.tsx +42 -43
  497. package/src/components/placeholders/Placeholders.tsx +30 -34
  498. package/src/components/popover/Popover.tsx +3 -4
  499. package/src/components/popover/PopoverArrow.tsx +25 -29
  500. package/src/components/popover/PopoverBody.tsx +37 -41
  501. package/src/components/popover/PopoverHeader.tsx +46 -48
  502. package/src/components/popover/injectPopover.tsx +69 -68
  503. package/src/components/progress/Progress.tsx +64 -65
  504. package/src/components/progress/ProgressBar.tsx +62 -70
  505. package/src/components/spinners/Spinner.tsx +161 -156
  506. package/src/components/toasts/Toast.tsx +65 -67
  507. package/src/components/toasts/ToastBody.tsx +39 -41
  508. package/src/components/toasts/ToastContainer.tsx +17 -19
  509. package/src/components/toasts/ToastHeader.tsx +55 -59
  510. package/src/components/tooltip/Tooltip.tsx +3 -4
  511. package/src/components/tooltip/TooltipArrow.tsx +21 -25
  512. package/src/components/tooltip/TooltipInner.tsx +37 -41
  513. package/src/components/tooltip/injectTooltip.tsx +67 -66
  514. package/src/components/type/Blockquote.tsx +43 -45
  515. package/src/components/type/Code.tsx +37 -39
  516. package/src/components/type/DisplayHeading.tsx +38 -38
  517. package/src/components/type/Paragraph.tsx +40 -42
  518. package/src/hooks/useFocusRing.ts +1 -1
  519. package/src/hooks/useScrollbarEffects.ts +8 -7
  520. package/src/hooks/useScrollbarEffects.web.ts +26 -30
  521. package/src/hooks/useScrollbarOffset.ts +12 -0
  522. package/src/index.ts +3 -3
  523. package/src/utils.ts +1 -1
  524. package/lib/module/hooks/useFixedElement.js +0 -17
  525. package/lib/module/hooks/useFixedElement.js.map +0 -1
  526. package/lib/typescript/hooks/useFixedElement.d.ts +0 -2
  527. package/lib/typescript/hooks/useFixedElement.d.ts.map +0 -1
  528. package/src/hooks/useFixedElement.ts +0 -18
@@ -1,59 +1,55 @@
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 { subtract } from '../../theme/functions';
6
- import { getStyles } from '../../utils';
7
- import type { ThemeVariables } from '../../types';
8
-
9
- export interface ToastHeaderProps extends ViewProps {}
10
-
11
- const styles = StyleSheet.create({
12
- '.toast-header': css`
13
- display: flex;
14
- flex-direction: row; // added for bootstrap-rn
15
- align-items: center;
16
- padding: $toast-padding-y $toast-padding-x;
17
- background-color: $toast-header-background-color;
18
- // background-clip: padding-box;
19
- border-bottom-width: $toast-border-width;
20
- border-style: solid;
21
- border-color: $toast-header-border-color;
22
- border-top-left-radius: ${subtract(
23
- (t: ThemeVariables) => t['toast-border-radius'],
24
- (t: ThemeVariables) => t['toast-border-width'],
25
- )};
26
- border-top-right-radius: ${subtract(
27
- (t: ThemeVariables) => t['toast-border-radius'],
28
- (t: ThemeVariables) => t['toast-border-width'],
29
- )};
30
- `,
31
- '.toast-header --text': css`
32
- color: $toast-header-color;
33
- `,
34
- });
35
-
36
- const ToastHeader = React.forwardRef<ViewRef, ToastHeaderProps>(
37
- (props, ref) => {
38
- const { children, style, textStyle, ...elementProps } = props;
39
-
40
- const classes = getStyles(styles, ['.toast-header']);
41
-
42
- const textClasses = getStyles(styles, ['.toast-header --text']);
43
-
44
- return (
45
- <View
46
- {...elementProps}
47
- ref={ref}
48
- style={[classes, style]}
49
- textStyle={[textClasses, textStyle]}
50
- >
51
- {children}
52
- </View>
53
- );
54
- },
55
- );
56
-
57
- ToastHeader.displayName = 'ToastHeader';
58
-
59
- export default ToastHeader;
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 { subtract } from '../../theme/functions';
6
+ import { getStyles } from '../../utils';
7
+ import type { ThemeVariables } from '../../types';
8
+
9
+ export interface ToastHeaderProps extends ViewProps {}
10
+
11
+ const styles = StyleSheet.create({
12
+ '.toast-header': css`
13
+ display: flex;
14
+ flex-direction: row; // added for bootstrap-rn
15
+ align-items: center;
16
+ padding: $toast-padding-y $toast-padding-x;
17
+ background-color: $toast-header-background-color;
18
+ // background-clip: padding-box;
19
+ border-bottom-width: $toast-border-width;
20
+ border-style: solid;
21
+ border-color: $toast-header-border-color;
22
+ border-top-left-radius: ${subtract(
23
+ (t: ThemeVariables) => t['toast-border-radius'],
24
+ (t: ThemeVariables) => t['toast-border-width'],
25
+ )};
26
+ border-top-right-radius: ${subtract(
27
+ (t: ThemeVariables) => t['toast-border-radius'],
28
+ (t: ThemeVariables) => t['toast-border-width'],
29
+ )};
30
+ `,
31
+ '.toast-header --text': css`
32
+ color: $toast-header-color;
33
+ `,
34
+ });
35
+
36
+ function ToastHeader(props: ToastHeaderProps & React.RefAttributes<ViewRef>) {
37
+ const { ref, children, style, textStyle, ...elementProps } = props;
38
+
39
+ const classes = getStyles(styles, ['.toast-header']);
40
+
41
+ const textClasses = getStyles(styles, ['.toast-header --text']);
42
+
43
+ return (
44
+ <View
45
+ {...elementProps}
46
+ ref={ref}
47
+ style={[classes, style]}
48
+ textStyle={[textClasses, textStyle]}
49
+ >
50
+ {children}
51
+ </View>
52
+ );
53
+ }
54
+
55
+ export default ToastHeader;
@@ -32,8 +32,9 @@ const styles = StyleSheet.create({
32
32
  `,
33
33
  });
34
34
 
35
- const Tooltip = React.forwardRef<ViewRef, TooltipProps>((props, ref) => {
35
+ function Tooltip(props: TooltipProps & React.RefAttributes<ViewRef>) {
36
36
  const {
37
+ ref,
37
38
  children,
38
39
  placement = 'top',
39
40
  floating,
@@ -69,9 +70,7 @@ const Tooltip = React.forwardRef<ViewRef, TooltipProps>((props, ref) => {
69
70
  </TooltipContext.Provider>
70
71
  </View>
71
72
  );
72
- });
73
-
74
- Tooltip.displayName = 'Tooltip';
73
+ }
75
74
 
76
75
  export default Object.assign(Tooltip, {
77
76
  Arrow: TooltipArrow,
@@ -103,34 +103,30 @@ const transformPlacement = (placement: OverlayPlacement) => {
103
103
  return placement;
104
104
  };
105
105
 
106
- const TooltipArrow = React.forwardRef<ViewRef, TooltipArrowProps>(
107
- (props, ref) => {
108
- const { style, ...elementProps } = props;
106
+ function TooltipArrow(props: TooltipArrowProps & React.RefAttributes<ViewRef>) {
107
+ const { ref, style, ...elementProps } = props;
109
108
 
110
- const context = useForcedContext(TooltipContext);
109
+ const context = useForcedContext(TooltipContext);
111
110
 
112
- // For some reason the classes are named start/end, but they always define
113
- // the overlay on the left/right placement, so it has no effect on RTL.
114
- // Hint: RTL is already handled by the useOverlay hook.
115
- const placement = transformPlacement(context.placement);
111
+ // For some reason the classes are named start/end, but they always define
112
+ // the overlay on the left/right placement, so it has no effect on RTL.
113
+ // Hint: RTL is already handled by the useOverlay hook.
114
+ const placement = transformPlacement(context.placement);
116
115
 
117
- const classes = getStyles(styles, [
118
- '.tooltip-arrow',
119
- context.floating && `.bs-tooltip-${placement} .tooltip-arrow`,
120
- ]);
121
- const beforeClasses = getStyles(styles, [
122
- '.tooltip-arrow::before',
123
- context.floating && `.bs-tooltip-${placement} .tooltip-arrow::before`,
124
- ]);
116
+ const classes = getStyles(styles, [
117
+ '.tooltip-arrow',
118
+ context.floating && `.bs-tooltip-${placement} .tooltip-arrow`,
119
+ ]);
120
+ const beforeClasses = getStyles(styles, [
121
+ '.tooltip-arrow::before',
122
+ context.floating && `.bs-tooltip-${placement} .tooltip-arrow::before`,
123
+ ]);
125
124
 
126
- return (
127
- <View {...elementProps} ref={ref} style={[classes, style]}>
128
- <View style={beforeClasses} />
129
- </View>
130
- );
131
- },
132
- );
133
-
134
- TooltipArrow.displayName = 'TooltipArrow';
125
+ return (
126
+ <View {...elementProps} ref={ref} style={[classes, style]}>
127
+ <View style={beforeClasses} />
128
+ </View>
129
+ );
130
+ }
135
131
 
136
132
  export default TooltipArrow;
@@ -1,41 +1,37 @@
1
- import React from 'react';
2
- import StyleSheet from '../../style/StyleSheet';
3
- import { getStyles } from '../../utils';
4
- import css from '../../style/css';
5
- import View, { ViewProps, ViewRef } from '../View';
6
- import Text from '../Text';
7
-
8
- export interface TooltipInnerProps extends ViewProps {}
9
-
10
- const styles = StyleSheet.create({
11
- '.tooltip-inner': css`
12
- max-width: $tooltip-max-width;
13
- padding: $tooltip-padding-y $tooltip-padding-x;
14
- background-color: $tooltip-bg;
15
- border-radius: $tooltip-border-radius;
16
- `,
17
- '.tooltip-inner --text': css`
18
- color: $tooltip-color;
19
- text-align: center;
20
- `,
21
- });
22
-
23
- const TooltipInner = React.forwardRef<ViewRef, TooltipInnerProps>(
24
- (props, ref) => {
25
- const { children, style, textStyle, ...elementProps } = props;
26
-
27
- const classes = getStyles(styles, ['.tooltip-inner']);
28
- const textClasses = getStyles(styles, ['.tooltip-inner --text']);
29
-
30
- // composite component
31
- return (
32
- <View {...elementProps} ref={ref} style={[classes, style]}>
33
- <Text style={[textClasses, textStyle]}>{children}</Text>
34
- </View>
35
- );
36
- },
37
- );
38
-
39
- TooltipInner.displayName = 'TooltipInner';
40
-
41
- export default TooltipInner;
1
+ import React from 'react';
2
+ import StyleSheet from '../../style/StyleSheet';
3
+ import { getStyles } from '../../utils';
4
+ import css from '../../style/css';
5
+ import View, { ViewProps, ViewRef } from '../View';
6
+ import Text from '../Text';
7
+
8
+ export interface TooltipInnerProps extends ViewProps {}
9
+
10
+ const styles = StyleSheet.create({
11
+ '.tooltip-inner': css`
12
+ max-width: $tooltip-max-width;
13
+ padding: $tooltip-padding-y $tooltip-padding-x;
14
+ background-color: $tooltip-bg;
15
+ border-radius: $tooltip-border-radius;
16
+ `,
17
+ '.tooltip-inner --text': css`
18
+ color: $tooltip-color;
19
+ text-align: center;
20
+ `,
21
+ });
22
+
23
+ function TooltipInner(props: TooltipInnerProps & React.RefAttributes<ViewRef>) {
24
+ const { ref, children, style, textStyle, ...elementProps } = props;
25
+
26
+ const classes = getStyles(styles, ['.tooltip-inner']);
27
+ const textClasses = getStyles(styles, ['.tooltip-inner --text']);
28
+
29
+ // composite component
30
+ return (
31
+ <View {...elementProps} ref={ref} style={[classes, style]}>
32
+ <Text style={[textClasses, textStyle]}>{children}</Text>
33
+ </View>
34
+ );
35
+ }
36
+
37
+ export default TooltipInner;
@@ -24,77 +24,78 @@ export interface InjectTooltipProps extends OverlayProps {
24
24
  export default function injectTooltip<Props>(
25
25
  Target: React.ComponentType<Props>,
26
26
  ) {
27
- const OverlayTooltip = React.forwardRef<ViewRef, Props & InjectTooltipProps>(
28
- (props, ref) => {
29
- const {
30
- tooltip: {
31
- title,
32
- trigger = 'hover focus',
33
- placement = 'top',
34
- ...tooltipProps
35
- },
36
- defaultVisible = false,
37
- visible: controlledVisible,
38
- onToggle = () => {},
39
- ...elementProps
40
- } = props;
27
+ function OverlayTooltip(
28
+ props: Props & InjectTooltipProps & React.RefAttributes<ViewRef>,
29
+ ) {
30
+ const {
31
+ ref,
32
+ tooltip: {
33
+ title,
34
+ trigger = 'hover focus',
35
+ placement = 'top',
36
+ ...tooltipProps
37
+ },
38
+ defaultVisible = false,
39
+ visible: controlledVisible,
40
+ onToggle = () => {},
41
+ ...elementProps
42
+ } = props;
41
43
 
42
- const offset = normalizeNumber(StyleSheet.value('tooltip-arrow-height'));
44
+ const offset = normalizeNumber(StyleSheet.value('tooltip-arrow-height'));
43
45
 
44
- const overlay = useOverlay({
45
- defaultVisible,
46
- controlledVisible,
47
- onToggle,
48
- offset,
49
- align: 'center',
50
- placement,
51
- trigger,
52
- });
46
+ const overlay = useOverlay({
47
+ defaultVisible,
48
+ controlledVisible,
49
+ onToggle,
50
+ offset,
51
+ align: 'center',
52
+ placement,
53
+ trigger,
54
+ });
53
55
 
54
- if ('maxWidth' in overlay.content.style) {
55
- // @ts-expect-error We remove maxWidth, because maxWidth is set as style on Tooltip component.
56
- delete overlay.content.style.maxWidth;
57
- }
56
+ if ('maxWidth' in overlay.content.style) {
57
+ // @ts-expect-error We remove maxWidth, because maxWidth is set as style on Tooltip component.
58
+ delete overlay.content.style.maxWidth;
59
+ }
58
60
 
59
- return (
60
- <>
61
- <Target
62
- {...(elementProps as Props)}
63
- {...overlay.trigger.getProps(elementProps)}
64
- ref={concatRefs(ref, overlay.trigger.ref)}
65
- {...optional(overlay.visible, {
66
- 'aria-describedby': overlay.identifier,
67
- })}
68
- />
69
- {overlay.visible && (
70
- <Portal name={overlay.identifier}>
71
- <BackdropHandler
72
- onClose={() => {
73
- overlay.setVisible(false);
74
- }}
61
+ return (
62
+ <>
63
+ <Target
64
+ {...(elementProps as Props)}
65
+ {...overlay.trigger.getProps(elementProps)}
66
+ ref={concatRefs(ref, overlay.trigger.ref)}
67
+ {...optional(overlay.visible, {
68
+ 'aria-describedby': overlay.identifier,
69
+ })}
70
+ />
71
+ {overlay.visible && (
72
+ <Portal name={overlay.identifier}>
73
+ <BackdropHandler
74
+ onClose={() => {
75
+ overlay.setVisible(false);
76
+ }}
77
+ />
78
+ <Tooltip
79
+ {...tooltipProps}
80
+ {...overlay.content.getProps(tooltipProps)}
81
+ ref={overlay.content.ref}
82
+ id={overlay.identifier}
83
+ placement={overlay.placement}
84
+ style={overlay.content.style}
85
+ floating
86
+ >
87
+ <Tooltip.Arrow
88
+ {...overlay.arrow.getProps({})}
89
+ ref={overlay.arrow.ref}
90
+ style={overlay.arrow.style}
75
91
  />
76
- <Tooltip
77
- {...tooltipProps}
78
- {...overlay.content.getProps(tooltipProps)}
79
- ref={overlay.content.ref}
80
- id={overlay.identifier}
81
- placement={overlay.placement}
82
- style={overlay.content.style}
83
- floating
84
- >
85
- <Tooltip.Arrow
86
- {...overlay.arrow.getProps({})}
87
- ref={overlay.arrow.ref}
88
- style={overlay.arrow.style}
89
- />
90
- <Tooltip.Inner>{title}</Tooltip.Inner>
91
- </Tooltip>
92
- </Portal>
93
- )}
94
- </>
95
- );
96
- },
97
- );
92
+ <Tooltip.Inner>{title}</Tooltip.Inner>
93
+ </Tooltip>
94
+ </Portal>
95
+ )}
96
+ </>
97
+ );
98
+ }
98
99
 
99
100
  OverlayTooltip.displayName = 'Overlay(Tooltip)';
100
101
 
@@ -1,45 +1,43 @@
1
- import React from 'react';
2
- import { Platform } from 'react-native';
3
- import StyleSheet from '../../style/StyleSheet';
4
- import css from '../../style/css';
5
- import View, { ViewProps, ViewRef } from '../View';
6
- import { getStyles } from '../../utils';
7
-
8
- export interface BlockquoteProps extends ViewProps {}
9
-
10
- const styles = StyleSheet.create({
11
- blockquote: css`
12
- margin-bottom: $blockquote-margin-y;
13
- `,
14
- 'blockquote --text': css`
15
- font-size: $blockquote-font-size;
16
- `,
17
- });
18
-
19
- const Blockquote = React.forwardRef<ViewRef, BlockquoteProps>((props, ref) => {
20
- const { children, style, textStyle, ...elementProps } = props;
21
-
22
- const classes = getStyles(styles, ['blockquote']);
23
-
24
- const textClasses = getStyles(styles, ['blockquote --text']);
25
-
26
- // Accessiblity role blockquote is only supported on web.
27
- const role = Platform.OS === 'web' ? 'blockquote' : undefined;
28
-
29
- return (
30
- <View
31
- {...elementProps}
32
- ref={ref}
33
- // @ts-expect-error web only role
34
- role={role}
35
- style={[classes, style]}
36
- textStyle={[textClasses, textStyle]}
37
- >
38
- {children}
39
- </View>
40
- );
41
- });
42
-
43
- Blockquote.displayName = 'Blockquote';
44
-
45
- export default Blockquote;
1
+ import React from 'react';
2
+ import { Platform } from 'react-native';
3
+ import StyleSheet from '../../style/StyleSheet';
4
+ import css from '../../style/css';
5
+ import View, { ViewProps, ViewRef } from '../View';
6
+ import { getStyles } from '../../utils';
7
+
8
+ export interface BlockquoteProps extends ViewProps {}
9
+
10
+ const styles = StyleSheet.create({
11
+ blockquote: css`
12
+ margin-bottom: $blockquote-margin-y;
13
+ `,
14
+ 'blockquote --text': css`
15
+ font-size: $blockquote-font-size;
16
+ `,
17
+ });
18
+
19
+ function Blockquote(props: BlockquoteProps & React.RefAttributes<ViewRef>) {
20
+ const { ref, children, style, textStyle, ...elementProps } = props;
21
+
22
+ const classes = getStyles(styles, ['blockquote']);
23
+
24
+ const textClasses = getStyles(styles, ['blockquote --text']);
25
+
26
+ // Accessiblity role blockquote is only supported on web.
27
+ const role = Platform.OS === 'web' ? 'blockquote' : undefined;
28
+
29
+ return (
30
+ <View
31
+ {...elementProps}
32
+ ref={ref}
33
+ // @ts-expect-error web only role
34
+ role={role}
35
+ style={[classes, style]}
36
+ textStyle={[textClasses, textStyle]}
37
+ >
38
+ {children}
39
+ </View>
40
+ );
41
+ }
42
+
43
+ export default Blockquote;
@@ -1,39 +1,37 @@
1
- import React from 'react';
2
- import { Platform } from 'react-native';
3
- import StyleSheet from '../../style/StyleSheet';
4
- import css from '../../style/css';
5
- import Text, { TextProps, TextRef } from '../Text';
6
- import { getStyles } from '../../utils';
7
-
8
- export interface CodeProps extends TextProps {}
9
-
10
- const styles = StyleSheet.create({
11
- code: css`
12
- font-family: $font-family-code;
13
- font-size: $code-font-size;
14
- color: $code-color;
15
- @include platform(web) {
16
- word-wrap: break-word;
17
- }
18
- `,
19
- });
20
-
21
- const Code = React.forwardRef<TextRef, CodeProps>((props, ref) => {
22
- const { children, style, ...elementProps } = props;
23
-
24
- const classes = getStyles(styles, ['code']);
25
-
26
- // Accessiblity role code is only supported on web.
27
- const role = Platform.OS === 'web' ? 'code' : undefined;
28
-
29
- return (
30
- // @ts-expect-error web only role
31
- <Text {...elementProps} ref={ref} role={role} style={[classes, style]}>
32
- {children}
33
- </Text>
34
- );
35
- });
36
-
37
- Code.displayName = 'Code';
38
-
39
- export default Code;
1
+ import React from 'react';
2
+ import { Platform } from 'react-native';
3
+ import StyleSheet from '../../style/StyleSheet';
4
+ import css from '../../style/css';
5
+ import Text, { TextProps, TextRef } from '../Text';
6
+ import { getStyles } from '../../utils';
7
+
8
+ export interface CodeProps extends TextProps {}
9
+
10
+ const styles = StyleSheet.create({
11
+ code: css`
12
+ font-family: $font-family-code;
13
+ font-size: $code-font-size;
14
+ color: $code-color;
15
+ @include platform(web) {
16
+ word-wrap: break-word;
17
+ }
18
+ `,
19
+ });
20
+
21
+ function Code(props: CodeProps & React.RefAttributes<TextRef>) {
22
+ const { ref, children, style, ...elementProps } = props;
23
+
24
+ const classes = getStyles(styles, ['code']);
25
+
26
+ // Accessiblity role code is only supported on web.
27
+ const role = Platform.OS === 'web' ? 'code' : undefined;
28
+
29
+ return (
30
+ // @ts-expect-error web only role
31
+ <Text {...elementProps} ref={ref} role={role} style={[classes, style]}>
32
+ {children}
33
+ </Text>
34
+ );
35
+ }
36
+
37
+ export default Code;
@@ -1,38 +1,38 @@
1
- import React from 'react';
2
- import StyleSheet from '../../style/StyleSheet';
3
- import css from '../../style/css';
4
- import Heading from '../Heading';
5
- import { DISPLAY_FONT_SIZES } from '../../theme/proxies';
6
- import { getStyles, each } from '../../utils';
7
- import { TextProps, TextRef } from '../Text';
8
-
9
- export interface DisplayHeadingProps extends TextProps {
10
- size: keyof typeof DISPLAY_FONT_SIZES;
11
- }
12
-
13
- const styles = StyleSheet.create({
14
- ...each(DISPLAY_FONT_SIZES, (size, value) => ({
15
- [`.display-${size}`]: css`
16
- font-size: ${value};
17
- line-height: ${value} * $headings-line-height;
18
- `,
19
- })),
20
- });
21
-
22
- const DisplayHeading = React.forwardRef<TextRef, DisplayHeadingProps>(
23
- (props, ref) => {
24
- const { children, size, style, ...elementProps } = props;
25
-
26
- const classes = getStyles(styles, [`.display-${size}`]);
27
-
28
- return (
29
- <Heading {...elementProps} ref={ref} size={1} style={[classes, style]}>
30
- {children}
31
- </Heading>
32
- );
33
- },
34
- );
35
-
36
- DisplayHeading.displayName = 'Heading';
37
-
38
- export default DisplayHeading;
1
+ import React from 'react';
2
+ import StyleSheet from '../../style/StyleSheet';
3
+ import css from '../../style/css';
4
+ import Heading from '../Heading';
5
+ import { DISPLAY_FONT_SIZES } from '../../theme/proxies';
6
+ import { getStyles, each } from '../../utils';
7
+ import { TextProps, TextRef } from '../Text';
8
+
9
+ export interface DisplayHeadingProps extends TextProps {
10
+ size: keyof typeof DISPLAY_FONT_SIZES;
11
+ }
12
+
13
+ const styles = StyleSheet.create({
14
+ ...each(DISPLAY_FONT_SIZES, (size, value) => ({
15
+ [`.display-${size}`]: css`
16
+ font-size: ${value};
17
+ line-height: ${value} * $headings-line-height;
18
+ `,
19
+ })),
20
+ });
21
+
22
+ function DisplayHeading(
23
+ props: DisplayHeadingProps & React.RefAttributes<TextRef>,
24
+ ) {
25
+ const { ref, children, size, style, ...elementProps } = props;
26
+
27
+ const classes = getStyles(styles, [`.display-${size}`]);
28
+
29
+ return (
30
+ <Heading {...elementProps} ref={ref} size={1} style={[classes, style]}>
31
+ {children}
32
+ </Heading>
33
+ );
34
+ }
35
+
36
+ DisplayHeading.displayName = 'Heading';
37
+
38
+ export default DisplayHeading;