react-bootstrap 1.0.0-beta.12 → 1.0.0-beta.16

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 (465) hide show
  1. package/AbstractNav/package.json +6 -0
  2. package/AbstractNavItem/package.json +6 -0
  3. package/Accordion/package.json +7 -0
  4. package/AccordionCollapse/package.json +7 -0
  5. package/AccordionContext/package.json +6 -0
  6. package/AccordionToggle/package.json +7 -0
  7. package/AccordionToggle.d.ts +5 -0
  8. package/Alert/package.json +7 -0
  9. package/Alert.d.ts +4 -3
  10. package/Badge/package.json +7 -0
  11. package/Badge.d.ts +5 -2
  12. package/BootstrapModalManager/package.json +6 -0
  13. package/Breadcrumb/package.json +7 -0
  14. package/BreadcrumbItem/package.json +7 -0
  15. package/Button/package.json +7 -0
  16. package/ButtonGroup/package.json +7 -0
  17. package/ButtonToolbar/package.json +7 -0
  18. package/Card/package.json +7 -0
  19. package/CardColumns/package.json +7 -0
  20. package/CardContext/package.json +6 -0
  21. package/CardDeck/package.json +7 -0
  22. package/CardGroup/package.json +7 -0
  23. package/CardImg/package.json +7 -0
  24. package/Carousel/package.json +7 -0
  25. package/CarouselCaption/package.json +7 -0
  26. package/CarouselItem/package.json +7 -0
  27. package/CloseButton/package.json +7 -0
  28. package/Col/package.json +7 -0
  29. package/Collapse/package.json +7 -0
  30. package/Container/package.json +7 -0
  31. package/Dropdown/package.json +7 -0
  32. package/DropdownButton/package.json +7 -0
  33. package/DropdownItem/package.json +7 -0
  34. package/DropdownItem.d.ts +8 -3
  35. package/DropdownMenu/package.json +7 -0
  36. package/DropdownToggle/package.json +7 -0
  37. package/DropdownToggle.d.ts +4 -3
  38. package/ElementChildren/package.json +6 -0
  39. package/Fade/package.json +7 -0
  40. package/Feedback/package.json +7 -0
  41. package/Figure/package.json +7 -0
  42. package/FigureCaption/package.json +7 -0
  43. package/FigureImage/package.json +7 -0
  44. package/Form/package.json +7 -0
  45. package/FormCheck/package.json +7 -0
  46. package/FormCheck.d.ts +2 -3
  47. package/FormCheckInput/package.json +7 -0
  48. package/FormCheckInput.d.ts +3 -4
  49. package/FormCheckLabel/package.json +7 -0
  50. package/FormContext/package.json +6 -0
  51. package/FormControl/package.json +7 -0
  52. package/FormControl.d.ts +9 -6
  53. package/FormGroup/package.json +7 -0
  54. package/FormGroup.d.ts +2 -3
  55. package/FormLabel/package.json +7 -0
  56. package/FormText/package.json +7 -0
  57. package/Image/package.json +7 -0
  58. package/InputGroup/package.json +7 -0
  59. package/Jumbotron/package.json +7 -0
  60. package/ListGroup/package.json +7 -0
  61. package/ListGroupItem/package.json +7 -0
  62. package/Media/package.json +7 -0
  63. package/Modal/package.json +7 -0
  64. package/Modal.d.ts +2 -0
  65. package/ModalBody/package.json +7 -0
  66. package/ModalContext/package.json +6 -0
  67. package/ModalDialog/package.json +7 -0
  68. package/ModalFooter/package.json +7 -0
  69. package/ModalHeader/package.json +7 -0
  70. package/ModalTitle/package.json +7 -0
  71. package/Nav/package.json +7 -0
  72. package/NavContext/package.json +6 -0
  73. package/NavDropdown/package.json +7 -0
  74. package/NavItem/package.json +7 -0
  75. package/NavLink/package.json +7 -0
  76. package/NavLink.d.ts +8 -3
  77. package/Navbar/package.json +7 -0
  78. package/NavbarBrand/package.json +7 -0
  79. package/NavbarCollapse/package.json +7 -0
  80. package/NavbarContext/package.json +6 -0
  81. package/NavbarToggle/package.json +7 -0
  82. package/Overlay/package.json +7 -0
  83. package/OverlayTrigger/package.json +7 -0
  84. package/OverlayTrigger.d.ts +1 -0
  85. package/PageItem/package.json +7 -0
  86. package/Pagination/package.json +7 -0
  87. package/Popover/package.json +7 -0
  88. package/Popover.d.ts +1 -0
  89. package/PopoverContent/package.json +7 -0
  90. package/PopoverTitle/package.json +7 -0
  91. package/ProgressBar/package.json +7 -0
  92. package/README.md +9 -9
  93. package/ResponsiveEmbed/package.json +7 -0
  94. package/Row/package.json +7 -0
  95. package/SafeAnchor/package.json +7 -0
  96. package/SafeAnchor.d.ts +1 -1
  97. package/SelectableContext/package.json +6 -0
  98. package/Spinner/package.json +7 -0
  99. package/Spinner.d.ts +1 -1
  100. package/SplitButton/package.json +7 -0
  101. package/Switch/package.json +6 -0
  102. package/Tab/package.json +7 -0
  103. package/TabContainer/package.json +7 -0
  104. package/TabContent/package.json +7 -0
  105. package/TabContext/package.json +6 -0
  106. package/TabPane/package.json +7 -0
  107. package/Table/package.json +7 -0
  108. package/Tabs/package.json +7 -0
  109. package/Tabs.d.ts +8 -3
  110. package/ThemeProvider/package.json +7 -0
  111. package/Toast/package.json +7 -0
  112. package/ToastBody/package.json +7 -0
  113. package/ToastContext/package.json +6 -0
  114. package/ToastHeader/package.json +7 -0
  115. package/ToggleButton/package.json +7 -0
  116. package/ToggleButton.d.ts +5 -5
  117. package/ToggleButtonGroup/package.json +7 -0
  118. package/ToggleButtonGroup.d.ts +4 -3
  119. package/Tooltip/package.json +7 -0
  120. package/{AbstractNav.js → cjs/AbstractNav.js} +18 -16
  121. package/{AbstractNavItem.js → cjs/AbstractNavItem.js} +0 -0
  122. package/{Accordion.js → cjs/Accordion.js} +0 -0
  123. package/{AccordionCollapse.js → cjs/AccordionCollapse.js} +0 -0
  124. package/{AccordionContext.js → cjs/AccordionContext.js} +0 -0
  125. package/cjs/AccordionToggle.js +50 -0
  126. package/{Alert.js → cjs/Alert.js} +2 -2
  127. package/{Badge.js → cjs/Badge.js} +4 -2
  128. package/{utils → cjs}/BootstrapModalManager.js +9 -5
  129. package/{Breadcrumb.js → cjs/Breadcrumb.js} +0 -0
  130. package/{BreadcrumbItem.js → cjs/BreadcrumbItem.js} +0 -0
  131. package/{Button.js → cjs/Button.js} +0 -0
  132. package/{ButtonGroup.js → cjs/ButtonGroup.js} +0 -0
  133. package/{ButtonToolbar.js → cjs/ButtonToolbar.js} +0 -0
  134. package/{Card.js → cjs/Card.js} +2 -2
  135. package/{CardColumns.js → cjs/CardColumns.js} +1 -1
  136. package/{CardContext.js → cjs/CardContext.js} +0 -0
  137. package/{CardDeck.js → cjs/CardDeck.js} +1 -1
  138. package/{CardGroup.js → cjs/CardGroup.js} +1 -1
  139. package/{CardImg.js → cjs/CardImg.js} +0 -0
  140. package/{Carousel.js → cjs/Carousel.js} +9 -9
  141. package/{CarouselCaption.js → cjs/CarouselCaption.js} +1 -1
  142. package/{CarouselItem.js → cjs/CarouselItem.js} +1 -1
  143. package/{CloseButton.js → cjs/CloseButton.js} +0 -0
  144. package/{Col.js → cjs/Col.js} +0 -0
  145. package/{Collapse.js → cjs/Collapse.js} +7 -7
  146. package/{Container.js → cjs/Container.js} +0 -0
  147. package/{Dropdown.js → cjs/Dropdown.js} +5 -5
  148. package/{DropdownButton.js → cjs/DropdownButton.js} +0 -0
  149. package/{DropdownItem.js → cjs/DropdownItem.js} +0 -0
  150. package/{DropdownMenu.js → cjs/DropdownMenu.js} +39 -46
  151. package/cjs/DropdownToggle.js +59 -0
  152. package/{utils → cjs}/ElementChildren.js +0 -0
  153. package/{Fade.js → cjs/Fade.js} +4 -4
  154. package/{Feedback.js → cjs/Feedback.js} +0 -0
  155. package/{Figure.js → cjs/Figure.js} +1 -1
  156. package/{FigureCaption.js → cjs/FigureCaption.js} +1 -1
  157. package/{FigureImage.js → cjs/FigureImage.js} +0 -0
  158. package/{Form.js → cjs/Form.js} +9 -6
  159. package/{FormCheck.js → cjs/FormCheck.js} +17 -10
  160. package/{FormCheckInput.js → cjs/FormCheckInput.js} +9 -6
  161. package/{FormCheckLabel.js → cjs/FormCheckLabel.js} +5 -9
  162. package/{FormContext.js → cjs/FormContext.js} +0 -0
  163. package/{FormControl.js → cjs/FormControl.js} +0 -0
  164. package/{FormGroup.js → cjs/FormGroup.js} +0 -0
  165. package/{FormLabel.js → cjs/FormLabel.js} +0 -0
  166. package/{FormText.js → cjs/FormText.js} +0 -0
  167. package/cjs/Image.js +47 -0
  168. package/{InputGroup.js → cjs/InputGroup.js} +1 -1
  169. package/{Jumbotron.js → cjs/Jumbotron.js} +0 -0
  170. package/{ListGroup.js → cjs/ListGroup.js} +16 -3
  171. package/{ListGroupItem.js → cjs/ListGroupItem.js} +0 -0
  172. package/{Media.js → cjs/Media.js} +1 -1
  173. package/{Modal.js → cjs/Modal.js} +13 -11
  174. package/{ModalBody.js → cjs/ModalBody.js} +1 -1
  175. package/{ModalContext.js → cjs/ModalContext.js} +0 -0
  176. package/{ModalDialog.js → cjs/ModalDialog.js} +1 -1
  177. package/{ModalFooter.js → cjs/ModalFooter.js} +1 -1
  178. package/{ModalHeader.js → cjs/ModalHeader.js} +0 -0
  179. package/{ModalTitle.js → cjs/ModalTitle.js} +2 -2
  180. package/{Nav.js → cjs/Nav.js} +0 -0
  181. package/{NavContext.js → cjs/NavContext.js} +0 -0
  182. package/cjs/NavDropdown.js +90 -0
  183. package/{NavItem.js → cjs/NavItem.js} +0 -0
  184. package/{NavLink.js → cjs/NavLink.js} +0 -0
  185. package/{Navbar.js → cjs/Navbar.js} +1 -1
  186. package/{NavbarBrand.js → cjs/NavbarBrand.js} +0 -0
  187. package/{NavbarCollapse.js → cjs/NavbarCollapse.js} +0 -0
  188. package/{NavbarContext.js → cjs/NavbarContext.js} +0 -0
  189. package/{NavbarToggle.js → cjs/NavbarToggle.js} +1 -1
  190. package/{Overlay.js → cjs/Overlay.js} +0 -0
  191. package/{OverlayTrigger.js → cjs/OverlayTrigger.js} +2 -1
  192. package/{PageItem.js → cjs/PageItem.js} +7 -4
  193. package/cjs/Pagination.js +52 -0
  194. package/{Popover.js → cjs/Popover.js} +9 -10
  195. package/{PopoverContent.js → cjs/PopoverContent.js} +0 -0
  196. package/{PopoverTitle.js → cjs/PopoverTitle.js} +0 -0
  197. package/cjs/ProgressBar.js +149 -0
  198. package/cjs/ResponsiveEmbed.js +44 -0
  199. package/{Row.js → cjs/Row.js} +0 -0
  200. package/{SafeAnchor.js → cjs/SafeAnchor.js} +1 -1
  201. package/{SelectableContext.js → cjs/SelectableContext.js} +0 -0
  202. package/{Spinner.js → cjs/Spinner.js} +0 -0
  203. package/{SplitButton.js → cjs/SplitButton.js} +0 -0
  204. package/cjs/Switch.js +26 -0
  205. package/{Tab.js → cjs/Tab.js} +0 -0
  206. package/cjs/TabContainer.js +60 -0
  207. package/cjs/TabContent.js +34 -0
  208. package/{TabContext.js → cjs/TabContext.js} +0 -0
  209. package/{TabPane.js → cjs/TabPane.js} +0 -0
  210. package/cjs/Table.js +54 -0
  211. package/{Tabs.js → cjs/Tabs.js} +2 -3
  212. package/{ThemeProvider.js → cjs/ThemeProvider.js} +0 -0
  213. package/{Toast.js → cjs/Toast.js} +0 -0
  214. package/{ToastBody.js → cjs/ToastBody.js} +1 -1
  215. package/{ToastContext.js → cjs/ToastContext.js} +0 -0
  216. package/{ToastHeader.js → cjs/ToastHeader.js} +0 -0
  217. package/cjs/ToggleButton.js +67 -0
  218. package/cjs/ToggleButtonGroup.js +90 -0
  219. package/{Tooltip.js → cjs/Tooltip.js} +0 -0
  220. package/{utils → cjs}/createChainedFunction.js +0 -0
  221. package/{utils → cjs}/createWithBsPrefix.js +3 -3
  222. package/{utils → cjs}/divWithClassName.js +0 -0
  223. package/{index.js → cjs/index.js} +14 -2
  224. package/{utils → cjs}/triggerBrowserReflow.js +0 -0
  225. package/cjs/useWrappedRefWithWarning.js +24 -0
  226. package/createChainedFunction/package.json +6 -0
  227. package/createWithBsPrefix/package.json +6 -0
  228. package/dist/react-bootstrap.js +9369 -11849
  229. package/dist/react-bootstrap.min.js +4 -18
  230. package/divWithClassName/package.json +6 -0
  231. package/{es → esm}/AbstractNav.js +17 -15
  232. package/{es → esm}/AbstractNavItem.js +0 -0
  233. package/{es → esm}/Accordion.d.ts +0 -0
  234. package/{es → esm}/Accordion.js +0 -0
  235. package/{es → esm}/AccordionCollapse.d.ts +0 -0
  236. package/{es → esm}/AccordionCollapse.js +0 -0
  237. package/{es → esm}/AccordionContext.js +0 -0
  238. package/{es → esm}/AccordionToggle.d.ts +5 -0
  239. package/{es → esm}/AccordionToggle.js +16 -2
  240. package/{es → esm}/Alert.d.ts +4 -3
  241. package/{es → esm}/Alert.js +2 -2
  242. package/{es → esm}/Badge.d.ts +5 -2
  243. package/{es → esm}/Badge.js +4 -2
  244. package/{es/utils → esm}/BootstrapModalManager.js +9 -5
  245. package/{es → esm}/Breadcrumb.d.ts +0 -0
  246. package/{es → esm}/Breadcrumb.js +0 -0
  247. package/{es → esm}/BreadcrumbItem.d.ts +0 -0
  248. package/{es → esm}/BreadcrumbItem.js +0 -0
  249. package/{es → esm}/Button.d.ts +0 -0
  250. package/{es → esm}/Button.js +0 -0
  251. package/{es → esm}/ButtonGroup.d.ts +0 -0
  252. package/{es → esm}/ButtonGroup.js +0 -0
  253. package/{es → esm}/ButtonToolbar.d.ts +0 -0
  254. package/{es → esm}/ButtonToolbar.js +0 -0
  255. package/{es → esm}/Card.d.ts +0 -0
  256. package/{es → esm}/Card.js +2 -2
  257. package/{es → esm}/CardColumns.d.ts +0 -0
  258. package/esm/CardColumns.js +2 -0
  259. package/{es → esm}/CardContext.js +0 -0
  260. package/{es → esm}/CardDeck.d.ts +0 -0
  261. package/esm/CardDeck.js +2 -0
  262. package/{es → esm}/CardGroup.d.ts +0 -0
  263. package/esm/CardGroup.js +2 -0
  264. package/{es → esm}/CardImg.d.ts +0 -0
  265. package/{es → esm}/CardImg.js +0 -0
  266. package/{es → esm}/Carousel.d.ts +0 -0
  267. package/{es → esm}/Carousel.js +6 -6
  268. package/{es → esm}/CarouselCaption.d.ts +0 -0
  269. package/{es → esm}/CarouselCaption.js +1 -1
  270. package/{es → esm}/CarouselItem.d.ts +0 -0
  271. package/esm/CarouselItem.js +2 -0
  272. package/{es → esm}/CloseButton.d.ts +0 -0
  273. package/{es → esm}/CloseButton.js +0 -0
  274. package/{es → esm}/Col.d.ts +0 -0
  275. package/{es → esm}/Col.js +0 -0
  276. package/{es → esm}/Collapse.d.ts +0 -0
  277. package/{es → esm}/Collapse.js +6 -6
  278. package/{es → esm}/Container.d.ts +0 -0
  279. package/{es → esm}/Container.js +0 -0
  280. package/{es → esm}/Dropdown.d.ts +0 -0
  281. package/{es → esm}/Dropdown.js +4 -4
  282. package/{es → esm}/DropdownButton.d.ts +0 -0
  283. package/{es → esm}/DropdownButton.js +0 -0
  284. package/{es → esm}/DropdownItem.d.ts +8 -3
  285. package/{es → esm}/DropdownItem.js +0 -0
  286. package/{es → esm}/DropdownMenu.d.ts +0 -0
  287. package/esm/DropdownMenu.js +69 -0
  288. package/esm/DropdownToggle.d.ts +18 -0
  289. package/esm/DropdownToggle.js +40 -0
  290. package/{es/utils → esm}/ElementChildren.js +0 -0
  291. package/{es → esm}/Fade.d.ts +0 -0
  292. package/{es → esm}/Fade.js +3 -3
  293. package/{es → esm}/Feedback.d.ts +0 -0
  294. package/{es → esm}/Feedback.js +0 -0
  295. package/{es → esm}/Figure.d.ts +0 -0
  296. package/{es → esm}/Figure.js +1 -1
  297. package/{es → esm}/FigureCaption.d.ts +0 -0
  298. package/esm/FigureCaption.js +5 -0
  299. package/{es → esm}/FigureImage.d.ts +0 -0
  300. package/{es → esm}/FigureImage.js +0 -0
  301. package/{es → esm}/Form.d.ts +0 -0
  302. package/{es → esm}/Form.js +6 -4
  303. package/{es → esm}/FormCheck.d.ts +2 -3
  304. package/{es → esm}/FormCheck.js +14 -8
  305. package/{es → esm}/FormCheckInput.d.ts +3 -4
  306. package/{es → esm}/FormCheckInput.js +8 -6
  307. package/{es → esm}/FormCheckLabel.d.ts +0 -0
  308. package/{es → esm}/FormCheckLabel.js +5 -9
  309. package/{es → esm}/FormContext.js +0 -0
  310. package/{es → esm}/FormControl.d.ts +9 -6
  311. package/{es → esm}/FormControl.js +0 -0
  312. package/{es → esm}/FormGroup.d.ts +2 -3
  313. package/{es → esm}/FormGroup.js +0 -0
  314. package/{es → esm}/FormLabel.d.ts +0 -0
  315. package/{es → esm}/FormLabel.js +0 -0
  316. package/{es → esm}/FormText.d.ts +0 -0
  317. package/{es → esm}/FormText.js +0 -0
  318. package/{es → esm}/Image.d.ts +0 -0
  319. package/esm/Image.js +32 -0
  320. package/{es → esm}/InputGroup.d.ts +0 -0
  321. package/{es → esm}/InputGroup.js +1 -1
  322. package/{es → esm}/Jumbotron.d.ts +0 -0
  323. package/{es → esm}/Jumbotron.js +0 -0
  324. package/{es → esm}/ListGroup.d.ts +0 -0
  325. package/{es → esm}/ListGroup.js +15 -3
  326. package/{es → esm}/ListGroupItem.d.ts +0 -0
  327. package/{es → esm}/ListGroupItem.js +0 -0
  328. package/{es → esm}/Media.d.ts +0 -0
  329. package/{es → esm}/Media.js +1 -1
  330. package/{es → esm}/Modal.d.ts +2 -0
  331. package/{es → esm}/Modal.js +9 -8
  332. package/{es → esm}/ModalBody.d.ts +0 -0
  333. package/esm/ModalBody.js +2 -0
  334. package/{es → esm}/ModalContext.js +0 -0
  335. package/{es → esm}/ModalDialog.d.ts +0 -0
  336. package/{es → esm}/ModalDialog.js +1 -1
  337. package/{es → esm}/ModalFooter.d.ts +0 -0
  338. package/esm/ModalFooter.js +2 -0
  339. package/{es → esm}/ModalHeader.d.ts +0 -0
  340. package/{es → esm}/ModalHeader.js +0 -0
  341. package/{es → esm}/ModalTitle.d.ts +0 -0
  342. package/{es → esm}/ModalTitle.js +2 -2
  343. package/{es → esm}/Nav.d.ts +0 -0
  344. package/{es → esm}/Nav.js +0 -0
  345. package/{es → esm}/NavContext.js +0 -0
  346. package/{es → esm}/NavDropdown.d.ts +0 -0
  347. package/esm/NavDropdown.js +73 -0
  348. package/{es → esm}/NavItem.d.ts +0 -0
  349. package/{es → esm}/NavItem.js +0 -0
  350. package/esm/NavLink.d.ts +25 -0
  351. package/{es → esm}/NavLink.js +0 -0
  352. package/{es → esm}/Navbar.d.ts +0 -0
  353. package/{es → esm}/Navbar.js +1 -1
  354. package/{es → esm}/NavbarBrand.d.ts +0 -0
  355. package/{es → esm}/NavbarBrand.js +0 -0
  356. package/{es → esm}/NavbarCollapse.d.ts +0 -0
  357. package/{es → esm}/NavbarCollapse.js +0 -0
  358. package/{es → esm}/NavbarContext.js +0 -0
  359. package/{es → esm}/NavbarToggle.d.ts +0 -0
  360. package/{es → esm}/NavbarToggle.js +1 -1
  361. package/{es → esm}/Overlay.d.ts +0 -0
  362. package/{es → esm}/Overlay.js +0 -0
  363. package/{es → esm}/OverlayTrigger.d.ts +1 -0
  364. package/{es → esm}/OverlayTrigger.js +3 -1
  365. package/{es → esm}/PageItem.d.ts +0 -0
  366. package/{es → esm}/PageItem.js +5 -2
  367. package/{es → esm}/Pagination.d.ts +0 -0
  368. package/esm/Pagination.js +36 -0
  369. package/{es → esm}/Popover.d.ts +1 -0
  370. package/{es → esm}/Popover.js +10 -13
  371. package/{es → esm}/PopoverContent.d.ts +0 -0
  372. package/{es → esm}/PopoverContent.js +0 -0
  373. package/{es → esm}/PopoverTitle.d.ts +0 -0
  374. package/{es → esm}/PopoverTitle.js +0 -0
  375. package/{es → esm}/ProgressBar.d.ts +0 -0
  376. package/esm/ProgressBar.js +131 -0
  377. package/{es → esm}/ResponsiveEmbed.d.ts +0 -0
  378. package/esm/ResponsiveEmbed.js +27 -0
  379. package/{es → esm}/Row.d.ts +0 -0
  380. package/{es → esm}/Row.js +0 -0
  381. package/{es → esm}/SafeAnchor.d.ts +1 -1
  382. package/{es → esm}/SafeAnchor.js +1 -1
  383. package/{es → esm}/SelectableContext.js +0 -0
  384. package/{es → esm}/Spinner.d.ts +1 -1
  385. package/{es → esm}/Spinner.js +0 -0
  386. package/{es → esm}/SplitButton.d.ts +0 -0
  387. package/{es → esm}/SplitButton.js +0 -0
  388. package/esm/Switch.js +13 -0
  389. package/{es → esm}/Tab.d.ts +0 -0
  390. package/{es → esm}/Tab.js +0 -0
  391. package/{es → esm}/TabContainer.d.ts +0 -0
  392. package/esm/TabContainer.js +47 -0
  393. package/{es → esm}/TabContent.d.ts +0 -0
  394. package/esm/TabContent.js +20 -0
  395. package/{es → esm}/TabContext.js +0 -0
  396. package/{es → esm}/TabPane.d.ts +0 -0
  397. package/{es → esm}/TabPane.js +0 -0
  398. package/{es → esm}/Table.d.ts +0 -0
  399. package/esm/Table.js +39 -0
  400. package/{es → esm}/Tabs.d.ts +8 -3
  401. package/{es → esm}/Tabs.js +2 -3
  402. package/{es → esm}/ThemeProvider.d.ts +0 -0
  403. package/{es → esm}/ThemeProvider.js +0 -0
  404. package/{es → esm}/Toast.d.ts +0 -0
  405. package/{es → esm}/Toast.js +0 -0
  406. package/{es → esm}/ToastBody.d.ts +0 -0
  407. package/esm/ToastBody.js +2 -0
  408. package/{es → esm}/ToastContext.js +0 -0
  409. package/{es → esm}/ToastHeader.d.ts +0 -0
  410. package/{es → esm}/ToastHeader.js +0 -0
  411. package/{es → esm}/ToggleButton.d.ts +5 -5
  412. package/esm/ToggleButton.js +51 -0
  413. package/{es → esm}/ToggleButtonGroup.d.ts +4 -3
  414. package/esm/ToggleButtonGroup.js +70 -0
  415. package/{es → esm}/Tooltip.d.ts +0 -0
  416. package/{es → esm}/Tooltip.js +0 -0
  417. package/{es/utils → esm}/createChainedFunction.js +0 -0
  418. package/{es/utils → esm}/createWithBsPrefix.js +2 -2
  419. package/{es/utils → esm}/divWithClassName.js +0 -0
  420. package/{es → esm}/helpers.d.ts +6 -0
  421. package/{es → esm}/index.d.ts +2 -0
  422. package/{es → esm}/index.js +7 -2
  423. package/{es/utils → esm}/triggerBrowserReflow.js +0 -0
  424. package/esm/useWrappedRefWithWarning.js +12 -0
  425. package/helpers.d.ts +6 -0
  426. package/index.d.ts +2 -0
  427. package/package.json +18 -10
  428. package/triggerBrowserReflow/package.json +6 -0
  429. package/useWrappedRefWithWarning/package.json +6 -0
  430. package/AccordionToggle.js +0 -32
  431. package/DropdownToggle.js +0 -86
  432. package/Image.js +0 -59
  433. package/NavDropdown.js +0 -67
  434. package/Pagination.js +0 -67
  435. package/ProgressBar.js +0 -161
  436. package/ResponsiveEmbed.js +0 -60
  437. package/TabContainer.js +0 -96
  438. package/TabContent.js +0 -50
  439. package/Table.js +0 -70
  440. package/ToggleButton.js +0 -100
  441. package/ToggleButtonGroup.js +0 -111
  442. package/es/CardColumns.js +0 -2
  443. package/es/CardDeck.js +0 -2
  444. package/es/CardGroup.js +0 -2
  445. package/es/CarouselItem.js +0 -2
  446. package/es/DropdownMenu.js +0 -78
  447. package/es/DropdownToggle.d.ts +0 -17
  448. package/es/DropdownToggle.js +0 -66
  449. package/es/FigureCaption.js +0 -5
  450. package/es/Image.js +0 -44
  451. package/es/ModalBody.js +0 -2
  452. package/es/ModalFooter.js +0 -2
  453. package/es/NavDropdown.js +0 -53
  454. package/es/NavLink.d.ts +0 -20
  455. package/es/Pagination.js +0 -51
  456. package/es/ProgressBar.js +0 -142
  457. package/es/ResponsiveEmbed.js +0 -42
  458. package/es/TabContainer.js +0 -81
  459. package/es/TabContent.js +0 -36
  460. package/es/Table.js +0 -55
  461. package/es/ToastBody.js +0 -2
  462. package/es/ToggleButton.js +0 -86
  463. package/es/ToggleButtonGroup.js +0 -93
  464. package/es/useAccordionToggle.js +0 -16
  465. package/useAccordionToggle.js +0 -29
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "react-bootstrap/divWithClassName",
3
+ "private": true,
4
+ "main": "../cjs/divWithClassName.js",
5
+ "module": "../esm/divWithClassName.js"
6
+ }
@@ -1,17 +1,15 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- import React, { useEffect, useState, useRef, useContext } from 'react';
4
- import qsa from 'dom-helpers/query/querySelectorAll';
3
+ import qsa from 'dom-helpers/querySelectorAll';
4
+ import React, { useContext, useEffect, useRef } from 'react';
5
+ import useForceUpdate from '@restart/hooks/useForceUpdate';
5
6
  import useMergedRefs from '@restart/hooks/useMergedRefs';
6
- import SelectableContext, { makeEventKey } from './SelectableContext';
7
7
  import NavContext from './NavContext';
8
+ import SelectableContext, { makeEventKey } from './SelectableContext';
8
9
  import TabContext from './TabContext';
9
10
 
10
11
  var noop = function noop() {};
11
12
 
12
- var defaultProps = {
13
- role: 'tablist'
14
- };
15
13
  var AbstractNav = React.forwardRef(function (_ref, ref) {
16
14
  var _ref$as = _ref.as,
17
15
  Component = _ref$as === void 0 ? 'ul' : _ref$as,
@@ -21,20 +19,21 @@ var AbstractNav = React.forwardRef(function (_ref, ref) {
21
19
  onKeyDown = _ref.onKeyDown,
22
20
  props = _objectWithoutPropertiesLoose(_ref, ["as", "onSelect", "activeKey", "role", "onKeyDown"]);
23
21
 
22
+ // A ref and forceUpdate for refocus, b/c we only want to trigger when needed
23
+ // and don't want to reset the set in the effect
24
+ var forceUpdate = useForceUpdate();
25
+ var needsRefocusRef = useRef(false);
24
26
  var parentOnSelect = useContext(SelectableContext);
25
27
  var tabContext = useContext(TabContext);
26
28
  var getControlledId, getControllerId;
27
29
 
28
30
  if (tabContext) {
31
+ role = role || 'tablist';
29
32
  activeKey = tabContext.activeKey;
30
33
  getControlledId = tabContext.getControlledId;
31
34
  getControllerId = tabContext.getControllerId;
32
35
  }
33
36
 
34
- var _useState = useState(false),
35
- needsRefocus = _useState[0],
36
- setRefocus = _useState[1];
37
-
38
37
  var listNode = useRef(null);
39
38
 
40
39
  var getNextActiveChild = function getNextActiveChild(offset) {
@@ -77,15 +76,18 @@ var AbstractNav = React.forwardRef(function (_ref, ref) {
77
76
  if (!nextActiveChild) return;
78
77
  event.preventDefault();
79
78
  handleSelect(nextActiveChild.dataset.rbEventKey, event);
80
- setRefocus(true);
79
+ needsRefocusRef.current = true;
80
+ forceUpdate();
81
81
  };
82
82
 
83
83
  useEffect(function () {
84
- if (listNode.current && needsRefocus) {
84
+ if (listNode.current && needsRefocusRef.current) {
85
85
  var activeChild = listNode.current.querySelector('[data-rb-event-key].active');
86
86
  if (activeChild) activeChild.focus();
87
87
  }
88
- }, [listNode, needsRefocus]);
88
+
89
+ needsRefocusRef.current = false;
90
+ });
89
91
  var mergedRef = useMergedRefs(ref, listNode);
90
92
  return React.createElement(SelectableContext.Provider, {
91
93
  value: handleSelect
@@ -99,8 +101,8 @@ var AbstractNav = React.forwardRef(function (_ref, ref) {
99
101
  }
100
102
  }, React.createElement(Component, _extends({}, props, {
101
103
  onKeyDown: handleKeyDown,
102
- ref: mergedRef
104
+ ref: mergedRef,
105
+ role: role
103
106
  }))));
104
107
  });
105
- AbstractNav.defaultProps = defaultProps;
106
108
  export default AbstractNav;
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -7,6 +7,11 @@ export interface AccordionToggleProps {
7
7
  onClick?: (event?: React.SyntheticEvent) => void;
8
8
  }
9
9
 
10
+ export function useAccordionToggle(
11
+ eventKey: string,
12
+ onClick: (event?: React.SyntheticEvent) => void,
13
+ ): (event?: React.SyntheticEvent) => void;
14
+
10
15
  declare class AccordionToggle<
11
16
  As extends React.ElementType = 'button'
12
17
  > extends BsPrefixComponent<As, AccordionToggleProps> {}
@@ -1,7 +1,21 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
- import React from 'react';
4
- import useAccordionToggle from './useAccordionToggle';
3
+ import React, { useContext } from 'react';
4
+ import SelectableContext from './SelectableContext';
5
+ import AccordionContext from './AccordionContext';
6
+ export function useAccordionToggle(eventKey, onClick) {
7
+ var contextEventKey = useContext(AccordionContext);
8
+ var onSelect = useContext(SelectableContext);
9
+ return function (e) {
10
+ /*
11
+ Compare the event key in context with the given event key.
12
+ If they are the same, then collapse the component.
13
+ */
14
+ var eventKeyPassed = eventKey === contextEventKey ? null : eventKey;
15
+ onSelect(eventKeyPassed, e);
16
+ if (onClick) onClick(e);
17
+ };
18
+ }
5
19
  var AccordionToggle = React.forwardRef(function (_ref, ref) {
6
20
  var _ref$as = _ref.as,
7
21
  Component = _ref$as === void 0 ? 'button' : _ref$as,
@@ -1,11 +1,12 @@
1
1
  import * as React from 'react';
2
2
 
3
- import SafeAnchor from './SafeAnchor';
3
+ import SafeAnchor, { SafeAnchorProps } from './SafeAnchor';
4
4
 
5
- import { BsPrefixComponent } from './helpers';
5
+ import { BsPrefixComponent, BsPrefixComponentClass } from './helpers';
6
6
 
7
7
  export class AlertLink<
8
- As extends React.ElementType = typeof SafeAnchor
8
+ // Need to use BsPrefixComponentClass to get proper type checking.
9
+ As extends React.ElementType = BsPrefixComponentClass<'a', SafeAnchorProps>
9
10
  > extends BsPrefixComponent<As> {}
10
11
 
11
12
  export class AlertHeading<
@@ -4,8 +4,8 @@ import classNames from 'classnames';
4
4
  import React from 'react';
5
5
  import { useUncontrolled } from 'uncontrollable';
6
6
  import useEventCallback from '@restart/hooks/useEventCallback';
7
- import createWithBsPrefix from './utils/createWithBsPrefix';
8
- import divWithClassName from './utils/divWithClassName';
7
+ import createWithBsPrefix from './createWithBsPrefix';
8
+ import divWithClassName from './divWithClassName';
9
9
  import { useBootstrapPrefix } from './ThemeProvider';
10
10
  import Fade from './Fade';
11
11
  import CloseButton from './CloseButton';
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
+ import { BsPrefixComponent } from './helpers';
2
3
 
3
- export interface BadgeProps extends React.HTMLProps<HTMLSpanElement> {
4
+ export interface BadgeProps {
4
5
  bsPrefix?: string;
5
6
  variant?:
6
7
  | 'primary'
@@ -14,6 +15,8 @@ export interface BadgeProps extends React.HTMLProps<HTMLSpanElement> {
14
15
  pill?: boolean;
15
16
  }
16
17
 
17
- declare const Badge: React.ForwardRefExoticComponent<BadgeProps>;
18
+ declare class Badge<
19
+ As extends React.ElementType = 'span'
20
+ > extends BsPrefixComponent<As, BadgeProps> {}
18
21
 
19
22
  export default Badge;
@@ -11,10 +11,12 @@ var Badge = React.forwardRef(function (_ref, ref) {
11
11
  variant = _ref.variant,
12
12
  pill = _ref.pill,
13
13
  className = _ref.className,
14
- props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "variant", "pill", "className"]);
14
+ _ref$as = _ref.as,
15
+ Component = _ref$as === void 0 ? 'span' : _ref$as,
16
+ props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "variant", "pill", "className", "as"]);
15
17
 
16
18
  var prefix = useBootstrapPrefix(bsPrefix, 'badge');
17
- return React.createElement("span", _extends({
19
+ return React.createElement(Component, _extends({
18
20
  ref: ref
19
21
  }, props, {
20
22
  className: classNames(className, prefix, pill && prefix + "-pill", variant && prefix + "-" + variant)
@@ -1,7 +1,7 @@
1
1
  import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";
2
- import qsa from 'dom-helpers/query/querySelectorAll';
3
- import css from 'dom-helpers/style';
4
- import getScrollbarSize from 'dom-helpers/util/scrollbarSize';
2
+ import css from 'dom-helpers/css';
3
+ import qsa from 'dom-helpers/querySelectorAll';
4
+ import getScrollbarSize from 'dom-helpers/scrollbarSize';
5
5
  import ModalManager from 'react-overlays/ModalManager';
6
6
  var Selector = {
7
7
  FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
@@ -24,17 +24,21 @@ function (_ModalManager) {
24
24
  _this = _ModalManager.call.apply(_ModalManager, [this].concat(args)) || this;
25
25
 
26
26
  _this.adjustAndStore = function (prop, element, adjust) {
27
+ var _css;
28
+
27
29
  var actual = element.style[prop];
28
30
  element.dataset[prop] = actual;
29
- css(element, prop, parseFloat(css(element, prop)) + adjust + "px");
31
+ css(element, (_css = {}, _css[prop] = parseFloat(css(element, prop)) + adjust + "px", _css));
30
32
  };
31
33
 
32
34
  _this.restore = function (prop, element) {
33
35
  var value = element.dataset[prop];
34
36
 
35
37
  if (value !== undefined) {
38
+ var _css2;
39
+
36
40
  delete element.dataset[prop];
37
- css(element, prop, value);
41
+ css(element, (_css2 = {}, _css2[prop] = value, _css2));
38
42
  }
39
43
  };
40
44
 
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -3,8 +3,8 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
3
3
  import classNames from 'classnames';
4
4
  import React, { useMemo } from 'react';
5
5
  import { useBootstrapPrefix } from './ThemeProvider';
6
- import createWithBsPrefix from './utils/createWithBsPrefix';
7
- import divWithClassName from './utils/divWithClassName';
6
+ import createWithBsPrefix from './createWithBsPrefix';
7
+ import divWithClassName from './divWithClassName';
8
8
  import CardContext from './CardContext';
9
9
  import CardImg from './CardImg';
10
10
  var DivStyledAsH5 = divWithClassName('h5');
File without changes
@@ -0,0 +1,2 @@
1
+ import createWithBsPrefix from './createWithBsPrefix';
2
+ export default createWithBsPrefix('card-columns');
File without changes
File without changes
@@ -0,0 +1,2 @@
1
+ import createWithBsPrefix from './createWithBsPrefix';
2
+ export default createWithBsPrefix('card-deck');
File without changes
@@ -0,0 +1,2 @@
1
+ import createWithBsPrefix from './createWithBsPrefix';
2
+ export default createWithBsPrefix('card-group');
File without changes
File without changes
File without changes
@@ -2,16 +2,16 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
3
  import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";
4
4
  import classNames from 'classnames';
5
- import styles from 'dom-helpers/style';
6
- import transition from 'dom-helpers/transition';
5
+ import styles from 'dom-helpers/css';
6
+ import transitionEnd from 'dom-helpers/transitionEnd';
7
7
  import React, { cloneElement } from 'react';
8
8
  import { uncontrollable } from 'uncontrollable';
9
9
  import CarouselCaption from './CarouselCaption';
10
10
  import CarouselItem from './CarouselItem';
11
+ import { forEach, map } from './ElementChildren';
11
12
  import SafeAnchor from './SafeAnchor';
12
- import { map, forEach } from './utils/ElementChildren';
13
- import triggerBrowserReflow from './utils/triggerBrowserReflow';
14
13
  import { createBootstrapComponent } from './ThemeProvider';
14
+ import triggerBrowserReflow from './triggerBrowserReflow';
15
15
 
16
16
  var countChildren = function countChildren(c) {
17
17
  return React.Children.toArray(c).filter(React.isValidElement).length;
@@ -226,7 +226,7 @@ function (_React$Component) {
226
226
  prevClasses: classNames('active', directionalClassName),
227
227
  currentClasses: classNames(orderClassName, directionalClassName)
228
228
  }, function () {
229
- return transition.end(nextElement, function () {
229
+ return transitionEnd(nextElement, function () {
230
230
  _this2.safeSetState({
231
231
  prevClasses: '',
232
232
  currentClasses: 'active'
@@ -395,7 +395,7 @@ function (_React$Component) {
395
395
  var current = index === activeIndex;
396
396
  var previous = index === previousActiveIndex;
397
397
  return cloneElement(child, {
398
- className: classNames(child.props.className, bsPrefix + "-item", current && currentClasses, previous && prevClasses)
398
+ className: classNames(child.props.className, current && currentClasses, previous && prevClasses)
399
399
  });
400
400
  })), controls && this.renderControls({
401
401
  wrap: wrap,
File without changes
@@ -1,4 +1,4 @@
1
- import createWithBsPrefix from './utils/createWithBsPrefix';
1
+ import createWithBsPrefix from './createWithBsPrefix';
2
2
  export default createWithBsPrefix('carousel-caption', {
3
3
  Component: 'div'
4
4
  });
File without changes
@@ -0,0 +1,2 @@
1
+ import createWithBsPrefix from './createWithBsPrefix';
2
+ export default createWithBsPrefix('carousel-item');
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -5,12 +5,12 @@ import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";
5
5
  var _collapseStyles;
6
6
 
7
7
  import classNames from 'classnames';
8
- import css from 'dom-helpers/style';
8
+ import css from 'dom-helpers/css';
9
+ import transitionEnd from 'dom-helpers/transitionEnd';
9
10
  import React from 'react';
10
- import onEnd from 'dom-helpers/transition/end';
11
- import Transition, { EXITED, ENTERED, ENTERING, EXITING } from 'react-transition-group/Transition';
12
- import triggerBrowserReflow from './utils/triggerBrowserReflow';
13
- import createChainedFunction from './utils/createChainedFunction';
11
+ import Transition, { ENTERED, ENTERING, EXITED, EXITING } from 'react-transition-group/Transition';
12
+ import createChainedFunction from './createChainedFunction';
13
+ import triggerBrowserReflow from './triggerBrowserReflow';
14
14
  var MARGINS = {
15
15
  height: ['marginTop', 'marginBottom'],
16
16
  width: ['marginLeft', 'marginRight']
@@ -111,7 +111,7 @@ function (_React$Component) {
111
111
  var handleExit = createChainedFunction(this.handleExit, onExit);
112
112
  var handleExiting = createChainedFunction(this.handleExiting, onExiting);
113
113
  return React.createElement(Transition, _extends({
114
- addEndListener: onEnd
114
+ addEndListener: transitionEnd
115
115
  }, props, {
116
116
  "aria-expanded": props.role ? props.in : null,
117
117
  onEnter: handleEnter,
File without changes
File without changes
File without changes
@@ -5,12 +5,12 @@ import React, { useContext } from 'react';
5
5
  import BaseDropdown from 'react-overlays/Dropdown';
6
6
  import { useUncontrolled } from 'uncontrollable';
7
7
  import useEventCallback from '@restart/hooks/useEventCallback';
8
- import { useBootstrapPrefix } from './ThemeProvider';
8
+ import DropdownItem from './DropdownItem';
9
9
  import DropdownMenu from './DropdownMenu';
10
10
  import DropdownToggle from './DropdownToggle';
11
- import DropdownItem from './DropdownItem';
12
11
  import SelectableContext from './SelectableContext';
13
- import createWithBsPrefix from './utils/createWithBsPrefix';
12
+ import { useBootstrapPrefix } from './ThemeProvider';
13
+ import createWithBsPrefix from './createWithBsPrefix';
14
14
  var defaultProps = {
15
15
  navbar: false
16
16
  };
@@ -50,7 +50,7 @@ var Dropdown = React.forwardRef(function (uncontrolledProps, ref) {
50
50
  });
51
51
  return React.createElement(SelectableContext.Provider, {
52
52
  value: handleSelect
53
- }, React.createElement(BaseDropdown.ControlledComponent, {
53
+ }, React.createElement(BaseDropdown, {
54
54
  drop: drop,
55
55
  show: show,
56
56
  alignEnd: alignRight,
File without changes
File without changes
@@ -1,8 +1,12 @@
1
1
  import * as React from 'react';
2
2
 
3
- import SafeAnchor from './SafeAnchor';
3
+ import SafeAnchor, { SafeAnchorProps } from './SafeAnchor';
4
4
 
5
- import { BsPrefixComponent, SelectCallback } from './helpers';
5
+ import {
6
+ BsPrefixComponent,
7
+ SelectCallback,
8
+ BsPrefixComponentClass,
9
+ } from './helpers';
6
10
 
7
11
  export interface DropdownItemProps {
8
12
  active?: boolean;
@@ -14,7 +18,8 @@ export interface DropdownItemProps {
14
18
  }
15
19
 
16
20
  declare class DropdownItem<
17
- As extends React.ElementType = typeof SafeAnchor
21
+ // Need to use BsPrefixComponentClass to get proper type checking.
22
+ As extends React.ElementType = BsPrefixComponentClass<'a', SafeAnchorProps>
18
23
  > extends BsPrefixComponent<As, DropdownItemProps> {}
19
24
 
20
25
  export default DropdownItem;
File without changes
File without changes
@@ -0,0 +1,69 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ import classNames from 'classnames';
4
+ import React, { useContext } from 'react';
5
+ import { useDropdownMenu } from 'react-overlays/DropdownMenu';
6
+ import useMergedRefs from '@restart/hooks/useMergedRefs';
7
+ import NavbarContext from './NavbarContext';
8
+ import { useBootstrapPrefix } from './ThemeProvider';
9
+ import useWrappedRefWithWarning from './useWrappedRefWithWarning';
10
+ var defaultProps = {
11
+ alignRight: false,
12
+ flip: true
13
+ };
14
+ var DropdownMenu = React.forwardRef(function (_ref, ref) {
15
+ var bsPrefix = _ref.bsPrefix,
16
+ className = _ref.className,
17
+ alignRight = _ref.alignRight,
18
+ rootCloseEvent = _ref.rootCloseEvent,
19
+ flip = _ref.flip,
20
+ popperConfig = _ref.popperConfig,
21
+ showProps = _ref.show,
22
+ _ref$as = _ref.as,
23
+ Component = _ref$as === void 0 ? 'div' : _ref$as,
24
+ props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "className", "alignRight", "rootCloseEvent", "flip", "popperConfig", "show", "as"]);
25
+
26
+ var isNavbar = useContext(NavbarContext);
27
+ var prefix = useBootstrapPrefix(bsPrefix, 'dropdown-menu');
28
+
29
+ var _useDropdownMenu = useDropdownMenu({
30
+ flip: flip,
31
+ popperConfig: popperConfig,
32
+ rootCloseEvent: rootCloseEvent,
33
+ show: showProps,
34
+ alignEnd: alignRight,
35
+ usePopper: !isNavbar
36
+ }),
37
+ hasShown = _useDropdownMenu.hasShown,
38
+ placement = _useDropdownMenu.placement,
39
+ show = _useDropdownMenu.show,
40
+ alignEnd = _useDropdownMenu.alignEnd,
41
+ close = _useDropdownMenu.close,
42
+ menuProps = _useDropdownMenu.props;
43
+
44
+ menuProps.ref = useMergedRefs(menuProps.ref, useWrappedRefWithWarning(ref, 'DropdownMenu'));
45
+ if (!hasShown) return null; // For custom components provide additional, non-DOM, props;
46
+
47
+ if (typeof Component !== 'string') {
48
+ menuProps.show = show;
49
+ menuProps.close = close;
50
+ menuProps.alignRight = alignEnd;
51
+ }
52
+
53
+ var style = props.style;
54
+
55
+ if (placement) {
56
+ // we don't need the default popper style,
57
+ // menus are display: none when not shown.
58
+ style = _extends({}, style, {}, menuProps.style);
59
+ props['x-placement'] = placement;
60
+ }
61
+
62
+ return React.createElement(Component, _extends({}, props, menuProps, {
63
+ style: style,
64
+ className: classNames(className, prefix, show && 'show', alignEnd && prefix + "-right")
65
+ }));
66
+ });
67
+ DropdownMenu.displayName = 'DropdownMenu';
68
+ DropdownMenu.defaultProps = defaultProps;
69
+ export default DropdownMenu;
@@ -0,0 +1,18 @@
1
+ import * as React from 'react';
2
+
3
+ import Button, { ButtonProps } from './Button';
4
+
5
+ import { BsPrefixComponent, BsPrefixComponentClass } from './helpers';
6
+
7
+ export interface DropdownToggleProps {
8
+ id: string;
9
+ split?: boolean;
10
+ childBsPrefix?: string;
11
+ }
12
+
13
+ declare class DropdownToggle<
14
+ // Need to use BsPrefixComponentClass to get proper type checking.
15
+ As extends React.ElementType = BsPrefixComponentClass<'button', ButtonProps>
16
+ > extends BsPrefixComponent<As, DropdownToggleProps> {}
17
+
18
+ export default DropdownToggle;
@@ -0,0 +1,40 @@
1
+ import _extends from "@babel/runtime/helpers/esm/extends";
2
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ import classNames from 'classnames';
4
+ import isRequiredForA11y from 'prop-types-extra/lib/isRequiredForA11y';
5
+ import React from 'react';
6
+ import { useDropdownToggle } from 'react-overlays/DropdownToggle';
7
+ import useMergedRefs from '@restart/hooks/useMergedRefs';
8
+ import Button from './Button';
9
+ import { useBootstrapPrefix } from './ThemeProvider';
10
+ import useWrappedRefWithWarning from './useWrappedRefWithWarning';
11
+ var DropdownToggle = React.forwardRef(function (_ref, ref) {
12
+ var bsPrefix = _ref.bsPrefix,
13
+ split = _ref.split,
14
+ className = _ref.className,
15
+ children = _ref.children,
16
+ childBsPrefix = _ref.childBsPrefix,
17
+ _ref$as = _ref.as,
18
+ Component = _ref$as === void 0 ? Button : _ref$as,
19
+ props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "split", "className", "children", "childBsPrefix", "as"]);
20
+
21
+ var prefix = useBootstrapPrefix(bsPrefix, 'dropdown-toggle');
22
+
23
+ if (childBsPrefix !== undefined) {
24
+ props.bsPrefix = childBsPrefix;
25
+ }
26
+
27
+ var _useDropdownToggle = useDropdownToggle(),
28
+ toggleProps = _useDropdownToggle[0],
29
+ toggle = _useDropdownToggle[1].toggle;
30
+
31
+ toggleProps.ref = useMergedRefs(toggleProps.ref, useWrappedRefWithWarning(ref, 'DropdownToggle')); // This intentionally forwards size and variant (if set) to the
32
+ // underlying component, to allow it to render size and style variants.
33
+
34
+ return React.createElement(Component, _extends({
35
+ onClick: toggle,
36
+ className: classNames(className, prefix, split && prefix + "-split")
37
+ }, toggleProps, props), children);
38
+ });
39
+ DropdownToggle.displayName = 'DropdownToggle';
40
+ export default DropdownToggle;
File without changes
File without changes
@@ -4,10 +4,10 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
4
4
  var _fadeStyles;
5
5
 
6
6
  import classNames from 'classnames';
7
+ import transitionEnd from 'dom-helpers/transitionEnd';
7
8
  import React, { useCallback } from 'react';
8
9
  import Transition, { ENTERED, ENTERING } from 'react-transition-group/Transition';
9
- import onEnd from 'dom-helpers/transition/end';
10
- import triggerBrowserReflow from './utils/triggerBrowserReflow';
10
+ import triggerBrowserReflow from './triggerBrowserReflow';
11
11
  var defaultProps = {
12
12
  in: false,
13
13
  timeout: 300,
@@ -27,7 +27,7 @@ var Fade = React.forwardRef(function (_ref, ref) {
27
27
  }, [props]);
28
28
  return React.createElement(Transition, _extends({
29
29
  ref: ref,
30
- addEndListener: onEnd
30
+ addEndListener: transitionEnd
31
31
  }, props, {
32
32
  onEnter: handleEnter
33
33
  }), function (status, innerProps) {
File without changes
File without changes