react-bootstrap 2.10.10 → 3.0.0-beta.1

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 (834) hide show
  1. package/CHANGELOG.md +1374 -0
  2. package/cjs/AbstractModalHeader.d.ts +23 -5
  3. package/cjs/AbstractModalHeader.js +1 -1
  4. package/cjs/Accordion.d.ts +43 -14
  5. package/cjs/Accordion.js +3 -3
  6. package/cjs/AccordionBody.d.ts +12 -4
  7. package/cjs/AccordionBody.js +3 -3
  8. package/cjs/AccordionButton.d.ts +11 -5
  9. package/cjs/AccordionButton.js +7 -34
  10. package/cjs/AccordionCollapse.d.ts +16 -6
  11. package/cjs/AccordionCollapse.js +3 -3
  12. package/cjs/AccordionContext.d.ts +2 -2
  13. package/cjs/AccordionContext.js +1 -1
  14. package/cjs/AccordionHeader.d.ts +11 -3
  15. package/cjs/AccordionHeader.js +3 -3
  16. package/cjs/AccordionItem.d.ts +14 -3
  17. package/cjs/AccordionItem.js +3 -3
  18. package/cjs/AccordionItemContext.js +1 -1
  19. package/cjs/Alert.d.ts +51 -13
  20. package/cjs/Alert.js +3 -3
  21. package/cjs/AlertHeading.d.ts +11 -3
  22. package/cjs/AlertHeading.js +3 -3
  23. package/cjs/AlertLink.d.ts +11 -3
  24. package/cjs/AlertLink.js +3 -3
  25. package/cjs/Anchor.d.ts +1 -1
  26. package/cjs/Badge.d.ts +28 -7
  27. package/cjs/Badge.js +3 -3
  28. package/cjs/BootstrapModalManager.d.ts +1 -1
  29. package/cjs/Breadcrumb.d.ts +21 -6
  30. package/cjs/Breadcrumb.js +3 -3
  31. package/cjs/BreadcrumbItem.d.ts +36 -9
  32. package/cjs/BreadcrumbItem.js +3 -3
  33. package/cjs/Button.d.ts +42 -8
  34. package/cjs/Button.js +3 -3
  35. package/cjs/ButtonGroup.d.ts +25 -5
  36. package/cjs/ButtonGroup.js +3 -3
  37. package/cjs/ButtonToolbar.d.ts +11 -2
  38. package/cjs/ButtonToolbar.js +3 -3
  39. package/cjs/Card.d.ts +44 -17
  40. package/cjs/Card.js +3 -3
  41. package/cjs/CardBody.d.ts +11 -3
  42. package/cjs/CardBody.js +3 -3
  43. package/cjs/CardFooter.d.ts +11 -3
  44. package/cjs/CardFooter.js +3 -3
  45. package/cjs/CardGroup.d.ts +11 -3
  46. package/cjs/CardGroup.js +3 -3
  47. package/cjs/CardHeader.d.ts +11 -3
  48. package/cjs/CardHeader.js +3 -3
  49. package/cjs/CardHeaderContext.js +1 -1
  50. package/cjs/CardImg.d.ts +14 -3
  51. package/cjs/CardImg.js +3 -3
  52. package/cjs/CardImgOverlay.d.ts +11 -3
  53. package/cjs/CardImgOverlay.js +3 -3
  54. package/cjs/CardLink.d.ts +11 -3
  55. package/cjs/CardLink.js +3 -3
  56. package/cjs/CardSubtitle.d.ts +11 -3
  57. package/cjs/CardSubtitle.js +3 -3
  58. package/cjs/CardText.d.ts +11 -3
  59. package/cjs/CardText.js +3 -3
  60. package/cjs/CardTitle.d.ts +11 -3
  61. package/cjs/CardTitle.js +3 -3
  62. package/cjs/Carousel.d.ts +127 -27
  63. package/cjs/Carousel.js +9 -12
  64. package/cjs/CarouselCaption.d.ts +11 -3
  65. package/cjs/CarouselCaption.js +3 -3
  66. package/cjs/CarouselItem.d.ts +15 -4
  67. package/cjs/CarouselItem.js +3 -3
  68. package/cjs/CloseButton.d.ts +10 -1
  69. package/cjs/CloseButton.js +3 -17
  70. package/cjs/Col.d.ts +40 -20
  71. package/cjs/Col.js +7 -48
  72. package/cjs/Collapse.d.ts +45 -10
  73. package/cjs/Collapse.js +3 -3
  74. package/cjs/Container.d.ts +15 -4
  75. package/cjs/Container.js +3 -3
  76. package/cjs/Dropdown.d.ts +10 -17
  77. package/cjs/Dropdown.js +3 -4
  78. package/cjs/DropdownButton.d.ts +42 -11
  79. package/cjs/DropdownButton.js +1 -56
  80. package/cjs/DropdownContext.d.ts +1 -1
  81. package/cjs/DropdownContext.js +1 -1
  82. package/cjs/DropdownDivider.d.ts +15 -3
  83. package/cjs/DropdownDivider.js +3 -3
  84. package/cjs/DropdownHeader.d.ts +15 -3
  85. package/cjs/DropdownHeader.js +3 -3
  86. package/cjs/DropdownItem.d.ts +28 -4
  87. package/cjs/DropdownItem.js +3 -3
  88. package/cjs/DropdownItemText.d.ts +11 -3
  89. package/cjs/DropdownItemText.js +3 -3
  90. package/cjs/DropdownMenu.d.ts +55 -12
  91. package/cjs/DropdownMenu.js +3 -4
  92. package/cjs/DropdownToggle.d.ts +20 -4
  93. package/cjs/DropdownToggle.js +3 -3
  94. package/cjs/ElementChildren.js +2 -2
  95. package/cjs/Fade.d.ts +31 -7
  96. package/cjs/Fade.js +3 -3
  97. package/cjs/Feedback.d.ts +15 -6
  98. package/cjs/Feedback.js +3 -16
  99. package/cjs/Figure.d.ts +12 -4
  100. package/cjs/Figure.js +3 -3
  101. package/cjs/FigureCaption.d.ts +11 -3
  102. package/cjs/FigureCaption.js +3 -3
  103. package/cjs/FigureImage.d.ts +1 -1
  104. package/cjs/FigureImage.js +4 -5
  105. package/cjs/FloatingLabel.d.ts +19 -5
  106. package/cjs/FloatingLabel.js +3 -3
  107. package/cjs/Form.d.ts +159 -135
  108. package/cjs/Form.js +3 -22
  109. package/cjs/FormCheck.d.ts +81 -15
  110. package/cjs/FormCheck.js +3 -3
  111. package/cjs/FormCheckInput.d.ts +27 -6
  112. package/cjs/FormCheckInput.js +3 -3
  113. package/cjs/FormCheckLabel.d.ts +9 -2
  114. package/cjs/FormCheckLabel.js +3 -3
  115. package/cjs/FormContext.js +1 -1
  116. package/cjs/FormControl.d.ts +59 -14
  117. package/cjs/FormControl.js +3 -3
  118. package/cjs/FormFloating.d.ts +11 -3
  119. package/cjs/FormFloating.js +3 -3
  120. package/cjs/FormGroup.d.ts +11 -4
  121. package/cjs/FormGroup.js +1 -1
  122. package/cjs/FormLabel.d.ts +29 -6
  123. package/cjs/FormLabel.js +3 -3
  124. package/cjs/FormRange.d.ts +13 -2
  125. package/cjs/FormRange.js +3 -3
  126. package/cjs/FormSelect.d.ts +39 -7
  127. package/cjs/FormSelect.js +3 -3
  128. package/cjs/FormText.d.ts +16 -4
  129. package/cjs/FormText.js +3 -3
  130. package/cjs/Image.d.ts +7 -15
  131. package/cjs/Image.js +6 -28
  132. package/cjs/InputGroup.d.ts +22 -6
  133. package/cjs/InputGroup.js +3 -3
  134. package/cjs/InputGroupContext.js +1 -1
  135. package/cjs/InputGroupText.d.ts +11 -3
  136. package/cjs/InputGroupText.js +3 -3
  137. package/cjs/ListGroup.d.ts +35 -10
  138. package/cjs/ListGroup.js +3 -3
  139. package/cjs/ListGroupItem.d.ts +34 -7
  140. package/cjs/ListGroupItem.js +3 -3
  141. package/cjs/Modal.d.ts +53 -16
  142. package/cjs/Modal.js +4 -4
  143. package/cjs/ModalBody.d.ts +11 -3
  144. package/cjs/ModalBody.js +3 -3
  145. package/cjs/ModalContext.js +2 -1
  146. package/cjs/ModalDialog.d.ts +29 -6
  147. package/cjs/ModalDialog.js +4 -4
  148. package/cjs/ModalFooter.d.ts +11 -3
  149. package/cjs/ModalFooter.js +3 -3
  150. package/cjs/ModalHeader.d.ts +6 -3
  151. package/cjs/ModalHeader.js +3 -3
  152. package/cjs/ModalTitle.d.ts +11 -3
  153. package/cjs/ModalTitle.js +3 -3
  154. package/cjs/Nav.d.ts +49 -15
  155. package/cjs/Nav.js +3 -3
  156. package/cjs/NavContext.d.ts +1 -1
  157. package/cjs/NavContext.js +1 -1
  158. package/cjs/NavDropdown.d.ts +44 -15
  159. package/cjs/NavDropdown.js +3 -3
  160. package/cjs/NavItem.d.ts +11 -3
  161. package/cjs/NavItem.js +3 -3
  162. package/cjs/NavLink.d.ts +33 -4
  163. package/cjs/NavLink.js +3 -3
  164. package/cjs/Navbar.d.ts +103 -18
  165. package/cjs/Navbar.js +3 -3
  166. package/cjs/NavbarBrand.d.ts +15 -4
  167. package/cjs/NavbarBrand.js +3 -3
  168. package/cjs/NavbarCollapse.d.ts +6 -3
  169. package/cjs/NavbarCollapse.js +1 -1
  170. package/cjs/NavbarContext.js +1 -1
  171. package/cjs/NavbarOffcanvas.d.ts +3 -2
  172. package/cjs/NavbarOffcanvas.js +1 -2
  173. package/cjs/NavbarText.d.ts +11 -3
  174. package/cjs/NavbarText.js +3 -3
  175. package/cjs/NavbarToggle.d.ts +19 -4
  176. package/cjs/NavbarToggle.js +3 -3
  177. package/cjs/Offcanvas.d.ts +27 -12
  178. package/cjs/Offcanvas.js +46 -43
  179. package/cjs/OffcanvasBody.d.ts +11 -3
  180. package/cjs/OffcanvasBody.js +3 -3
  181. package/cjs/OffcanvasHeader.d.ts +6 -3
  182. package/cjs/OffcanvasHeader.js +3 -3
  183. package/cjs/OffcanvasTitle.d.ts +11 -3
  184. package/cjs/OffcanvasTitle.js +3 -3
  185. package/cjs/OffcanvasToggling.d.ts +32 -8
  186. package/cjs/OffcanvasToggling.js +3 -3
  187. package/cjs/Overlay.d.ts +24 -7
  188. package/cjs/Overlay.js +5 -6
  189. package/cjs/OverlayTrigger.d.ts +50 -12
  190. package/cjs/OverlayTrigger.js +3 -8
  191. package/cjs/PageItem.d.ts +31 -9
  192. package/cjs/PageItem.js +4 -4
  193. package/cjs/Pagination.d.ts +14 -4
  194. package/cjs/Pagination.js +3 -3
  195. package/cjs/Placeholder.d.ts +14 -5
  196. package/cjs/Placeholder.js +1 -1
  197. package/cjs/PlaceholderButton.d.ts +19 -5
  198. package/cjs/PlaceholderButton.js +1 -1
  199. package/cjs/Popover.d.ts +41 -12
  200. package/cjs/Popover.js +3 -3
  201. package/cjs/PopoverBody.d.ts +11 -3
  202. package/cjs/PopoverBody.js +3 -3
  203. package/cjs/PopoverHeader.d.ts +11 -3
  204. package/cjs/PopoverHeader.js +3 -3
  205. package/cjs/ProgressBar.d.ts +44 -11
  206. package/cjs/ProgressBar.js +4 -33
  207. package/cjs/Ratio.d.ts +13 -3
  208. package/cjs/Ratio.js +3 -3
  209. package/cjs/Row.d.ts +41 -9
  210. package/cjs/Row.js +3 -3
  211. package/cjs/Spinner.d.ts +30 -7
  212. package/cjs/Spinner.js +3 -3
  213. package/cjs/SplitButton.d.ts +38 -12
  214. package/cjs/SplitButton.js +1 -59
  215. package/cjs/Stack.d.ts +27 -7
  216. package/cjs/Stack.js +4 -4
  217. package/cjs/Switch.d.ts +4 -4
  218. package/cjs/Switch.js +1 -1
  219. package/cjs/Tab.d.ts +18 -16
  220. package/cjs/Tab.js +0 -21
  221. package/cjs/TabContainer.d.ts +50 -55
  222. package/cjs/TabContent.d.ts +11 -3
  223. package/cjs/TabContent.js +3 -3
  224. package/cjs/TabPane.d.ts +36 -9
  225. package/cjs/TabPane.js +3 -3
  226. package/cjs/Table.d.ts +42 -9
  227. package/cjs/Table.js +3 -3
  228. package/cjs/Tabs.d.ts +10 -4
  229. package/cjs/Tabs.js +1 -1
  230. package/cjs/ThemeProvider.d.ts +24 -5
  231. package/cjs/ThemeProvider.js +1 -1
  232. package/cjs/Toast.d.ts +47 -13
  233. package/cjs/Toast.js +3 -3
  234. package/cjs/ToastBody.d.ts +11 -3
  235. package/cjs/ToastBody.js +3 -3
  236. package/cjs/ToastContainer.d.ts +19 -5
  237. package/cjs/ToastContainer.js +3 -3
  238. package/cjs/ToastContext.js +2 -1
  239. package/cjs/ToastFade.d.ts +1 -1
  240. package/cjs/ToastFade.js +1 -1
  241. package/cjs/ToastHeader.d.ts +20 -6
  242. package/cjs/ToastHeader.js +3 -3
  243. package/cjs/ToggleButton.d.ts +38 -7
  244. package/cjs/ToggleButton.js +3 -3
  245. package/cjs/ToggleButtonGroup.d.ts +51 -3
  246. package/cjs/ToggleButtonGroup.js +1 -1
  247. package/cjs/Tooltip.d.ts +35 -7
  248. package/cjs/Tooltip.js +3 -3
  249. package/cjs/TransitionWrapper.d.ts +1 -1
  250. package/cjs/TransitionWrapper.js +3 -7
  251. package/cjs/createUtilityClasses.d.ts +0 -2
  252. package/cjs/createUtilityClasses.js +2 -14
  253. package/cjs/createWithBsPrefix.d.ts +2 -2
  254. package/cjs/createWithBsPrefix.js +3 -3
  255. package/cjs/divWithClassName.js +3 -3
  256. package/cjs/getTabTransitionComponent.d.ts +1 -1
  257. package/cjs/helpers.d.ts +0 -20
  258. package/cjs/helpers.js +0 -8
  259. package/cjs/index.d.ts +2 -3
  260. package/cjs/index.js +5 -8
  261. package/cjs/package.json +1 -0
  262. package/cjs/types.d.ts +338 -3
  263. package/cjs/types.js +1 -16
  264. package/cjs/useAccordionButton.d.ts +4 -0
  265. package/cjs/useAccordionButton.js +37 -0
  266. package/cjs/useCol.d.ts +7 -0
  267. package/cjs/useCol.js +49 -0
  268. package/cjs/useOverlayOffset.d.ts +1 -1
  269. package/cjs/usePlaceholder.d.ts +16 -5
  270. package/cjs/usePlaceholder.js +4 -4
  271. package/lib/AbstractModalHeader.d.ts +28 -0
  272. package/{esm → lib}/AbstractModalHeader.js +1 -2
  273. package/lib/Accordion.d.ts +47 -0
  274. package/{esm → lib}/Accordion.js +2 -2
  275. package/lib/AccordionBody.d.ts +15 -0
  276. package/{esm → lib}/AccordionBody.js +2 -2
  277. package/lib/AccordionButton.d.ts +14 -0
  278. package/{esm → lib}/AccordionButton.js +3 -30
  279. package/lib/AccordionCollapse.d.ts +22 -0
  280. package/{esm → lib}/AccordionCollapse.js +2 -2
  281. package/{esm → lib}/AccordionContext.d.ts +2 -2
  282. package/lib/AccordionHeader.d.ts +14 -0
  283. package/{esm → lib}/AccordionHeader.js +2 -2
  284. package/lib/AccordionItem.d.ts +18 -0
  285. package/{esm → lib}/AccordionItem.js +2 -2
  286. package/lib/Alert.d.ts +57 -0
  287. package/{esm → lib}/Alert.js +3 -4
  288. package/lib/AlertHeading.d.ts +14 -0
  289. package/{esm → lib}/AlertHeading.js +2 -2
  290. package/lib/AlertLink.d.ts +14 -0
  291. package/{esm → lib}/AlertLink.js +2 -2
  292. package/lib/Anchor.d.ts +3 -0
  293. package/lib/Badge.d.ts +31 -0
  294. package/{esm → lib}/Badge.js +2 -2
  295. package/{esm → lib}/BootstrapModalManager.d.ts +1 -1
  296. package/lib/Breadcrumb.d.ts +25 -0
  297. package/{esm → lib}/Breadcrumb.js +2 -2
  298. package/lib/BreadcrumbItem.d.ts +39 -0
  299. package/{esm → lib}/BreadcrumbItem.js +2 -2
  300. package/lib/Button.d.ts +45 -0
  301. package/{esm → lib}/Button.js +2 -2
  302. package/lib/ButtonGroup.d.ts +28 -0
  303. package/{esm → lib}/ButtonGroup.js +2 -2
  304. package/lib/ButtonToolbar.d.ts +15 -0
  305. package/{esm → lib}/ButtonToolbar.js +2 -2
  306. package/lib/Card.d.ts +48 -0
  307. package/{esm → lib}/Card.js +2 -2
  308. package/lib/CardBody.d.ts +14 -0
  309. package/{esm → lib}/CardBody.js +2 -2
  310. package/lib/CardFooter.d.ts +14 -0
  311. package/{esm → lib}/CardFooter.js +2 -2
  312. package/lib/CardGroup.d.ts +14 -0
  313. package/{esm → lib}/CardGroup.js +2 -2
  314. package/lib/CardHeader.d.ts +14 -0
  315. package/{esm → lib}/CardHeader.js +2 -2
  316. package/lib/CardImg.d.ts +18 -0
  317. package/{esm → lib}/CardImg.js +2 -2
  318. package/lib/CardImgOverlay.d.ts +14 -0
  319. package/{esm → lib}/CardImgOverlay.js +2 -2
  320. package/lib/CardLink.d.ts +14 -0
  321. package/{esm → lib}/CardLink.js +2 -2
  322. package/lib/CardSubtitle.d.ts +14 -0
  323. package/{esm → lib}/CardSubtitle.js +2 -2
  324. package/lib/CardText.d.ts +14 -0
  325. package/{esm → lib}/CardText.js +2 -2
  326. package/lib/CardTitle.d.ts +14 -0
  327. package/{esm → lib}/CardTitle.js +2 -2
  328. package/lib/Carousel.d.ts +136 -0
  329. package/{esm → lib}/Carousel.js +9 -14
  330. package/lib/CarouselCaption.d.ts +14 -0
  331. package/{esm → lib}/CarouselCaption.js +2 -2
  332. package/lib/CarouselItem.d.ts +18 -0
  333. package/{esm → lib}/CarouselItem.js +2 -2
  334. package/{esm → lib}/CloseButton.d.ts +10 -1
  335. package/lib/CloseButton.js +17 -0
  336. package/lib/Col.d.ts +48 -0
  337. package/lib/Col.js +23 -0
  338. package/lib/Collapse.d.ts +52 -0
  339. package/{esm → lib}/Collapse.js +2 -2
  340. package/lib/Container.d.ts +18 -0
  341. package/{esm → lib}/Container.js +2 -2
  342. package/lib/Dropdown.d.ts +14 -0
  343. package/{esm → lib}/Dropdown.js +2 -3
  344. package/lib/DropdownButton.d.ts +55 -0
  345. package/lib/DropdownButton.js +51 -0
  346. package/{esm → lib}/DropdownContext.d.ts +1 -1
  347. package/lib/DropdownDivider.d.ts +18 -0
  348. package/{esm → lib}/DropdownDivider.js +2 -2
  349. package/lib/DropdownHeader.d.ts +18 -0
  350. package/{esm → lib}/DropdownHeader.js +2 -2
  351. package/lib/DropdownItem.d.ts +30 -0
  352. package/{esm → lib}/DropdownItem.js +2 -2
  353. package/lib/DropdownItemText.d.ts +14 -0
  354. package/{esm → lib}/DropdownItemText.js +2 -2
  355. package/lib/DropdownMenu.d.ts +61 -0
  356. package/{esm → lib}/DropdownMenu.js +2 -3
  357. package/lib/DropdownToggle.d.ts +28 -0
  358. package/{esm → lib}/DropdownToggle.js +2 -2
  359. package/{esm → lib}/ElementChildren.js +1 -1
  360. package/lib/Fade.d.ts +39 -0
  361. package/{esm → lib}/Fade.js +2 -2
  362. package/lib/Feedback.d.ts +19 -0
  363. package/{esm → lib}/Feedback.js +2 -15
  364. package/lib/Figure.d.ts +17 -0
  365. package/{esm → lib}/Figure.js +2 -2
  366. package/lib/FigureCaption.d.ts +14 -0
  367. package/{esm → lib}/FigureCaption.js +2 -2
  368. package/{esm → lib}/FigureImage.d.ts +1 -1
  369. package/{esm → lib}/FigureImage.js +3 -4
  370. package/lib/FloatingLabel.d.ts +23 -0
  371. package/{esm → lib}/FloatingLabel.js +3 -4
  372. package/{esm → lib}/Form.d.ts +159 -135
  373. package/{esm → lib}/Form.js +2 -21
  374. package/lib/FormCheck.d.ts +88 -0
  375. package/{esm → lib}/FormCheck.js +3 -5
  376. package/lib/FormCheckInput.d.ts +31 -0
  377. package/{esm → lib}/FormCheckInput.js +2 -2
  378. package/{esm → lib}/FormCheckLabel.d.ts +9 -2
  379. package/{esm → lib}/FormCheckLabel.js +2 -2
  380. package/lib/FormControl.d.ts +64 -0
  381. package/{esm → lib}/FormControl.js +2 -2
  382. package/lib/FormFloating.d.ts +14 -0
  383. package/{esm → lib}/FormFloating.js +2 -2
  384. package/lib/FormGroup.d.ts +14 -0
  385. package/lib/FormLabel.d.ts +39 -0
  386. package/{esm → lib}/FormLabel.js +2 -2
  387. package/lib/FormRange.d.ts +17 -0
  388. package/{esm → lib}/FormRange.js +2 -2
  389. package/lib/FormSelect.d.ts +42 -0
  390. package/{esm → lib}/FormSelect.js +2 -2
  391. package/lib/FormText.d.ts +19 -0
  392. package/{esm → lib}/FormText.js +2 -2
  393. package/lib/Image.d.ts +25 -0
  394. package/lib/Image.js +24 -0
  395. package/lib/InputGroup.d.ts +29 -0
  396. package/{esm → lib}/InputGroup.js +2 -2
  397. package/lib/InputGroupText.d.ts +14 -0
  398. package/{esm → lib}/InputGroupText.js +2 -2
  399. package/lib/ListGroup.d.ts +38 -0
  400. package/{esm → lib}/ListGroup.js +2 -2
  401. package/lib/ListGroupItem.d.ts +38 -0
  402. package/{esm → lib}/ListGroupItem.js +2 -2
  403. package/lib/Modal.d.ts +63 -0
  404. package/{esm → lib}/Modal.js +3 -3
  405. package/lib/ModalBody.d.ts +14 -0
  406. package/{esm → lib}/ModalBody.js +2 -2
  407. package/{esm → lib}/ModalContext.js +1 -0
  408. package/lib/ModalDialog.d.ts +34 -0
  409. package/{esm → lib}/ModalDialog.js +3 -3
  410. package/lib/ModalFooter.d.ts +14 -0
  411. package/{esm → lib}/ModalFooter.js +2 -2
  412. package/{esm → lib}/ModalHeader.d.ts +6 -3
  413. package/{esm → lib}/ModalHeader.js +2 -2
  414. package/lib/ModalTitle.d.ts +14 -0
  415. package/{esm → lib}/ModalTitle.js +2 -2
  416. package/lib/Nav.d.ts +52 -0
  417. package/{esm → lib}/Nav.js +2 -2
  418. package/{esm → lib}/NavContext.d.ts +1 -1
  419. package/lib/NavDropdown.d.ts +49 -0
  420. package/{esm → lib}/NavDropdown.js +3 -4
  421. package/lib/NavItem.d.ts +14 -0
  422. package/{esm → lib}/NavItem.js +2 -2
  423. package/lib/NavLink.d.ts +35 -0
  424. package/{esm → lib}/NavLink.js +2 -2
  425. package/lib/Navbar.d.ts +108 -0
  426. package/{esm → lib}/Navbar.js +2 -2
  427. package/lib/NavbarBrand.d.ts +18 -0
  428. package/{esm → lib}/NavbarBrand.js +2 -2
  429. package/{esm → lib}/NavbarCollapse.d.ts +6 -3
  430. package/{esm → lib}/NavbarOffcanvas.d.ts +3 -2
  431. package/{esm → lib}/NavbarOffcanvas.js +0 -1
  432. package/lib/NavbarText.d.ts +14 -0
  433. package/{esm → lib}/NavbarText.js +2 -2
  434. package/lib/NavbarToggle.d.ts +22 -0
  435. package/{esm → lib}/NavbarToggle.js +2 -2
  436. package/lib/Offcanvas.d.ts +33 -0
  437. package/{esm → lib}/Offcanvas.js +46 -45
  438. package/lib/OffcanvasBody.d.ts +14 -0
  439. package/{esm → lib}/OffcanvasBody.js +2 -2
  440. package/{esm → lib}/OffcanvasHeader.d.ts +6 -3
  441. package/{esm → lib}/OffcanvasHeader.js +2 -2
  442. package/lib/OffcanvasTitle.d.ts +14 -0
  443. package/{esm → lib}/OffcanvasTitle.js +2 -2
  444. package/lib/OffcanvasToggling.d.ts +39 -0
  445. package/{esm → lib}/OffcanvasToggling.js +2 -2
  446. package/lib/Overlay.d.ts +41 -0
  447. package/{esm → lib}/Overlay.js +4 -5
  448. package/lib/OverlayTrigger.d.ts +67 -0
  449. package/{esm → lib}/OverlayTrigger.js +3 -10
  450. package/lib/PageItem.d.ts +39 -0
  451. package/{esm → lib}/PageItem.js +4 -5
  452. package/{esm → lib}/Pagination.d.ts +14 -4
  453. package/{esm → lib}/Pagination.js +2 -2
  454. package/lib/Placeholder.d.ts +17 -0
  455. package/lib/PlaceholderButton.d.ts +22 -0
  456. package/lib/Popover.d.ts +48 -0
  457. package/{esm → lib}/Popover.js +3 -4
  458. package/lib/PopoverBody.d.ts +14 -0
  459. package/{esm → lib}/PopoverBody.js +2 -2
  460. package/lib/PopoverHeader.d.ts +14 -0
  461. package/{esm → lib}/PopoverHeader.js +2 -2
  462. package/lib/ProgressBar.d.ts +48 -0
  463. package/{esm → lib}/ProgressBar.js +3 -32
  464. package/lib/Ratio.d.ts +19 -0
  465. package/{esm → lib}/Ratio.js +2 -2
  466. package/lib/Row.d.ts +49 -0
  467. package/{esm → lib}/Row.js +2 -2
  468. package/lib/Spinner.d.ts +33 -0
  469. package/{esm → lib}/Spinner.js +2 -2
  470. package/lib/SplitButton.d.ts +53 -0
  471. package/lib/SplitButton.js +67 -0
  472. package/lib/Stack.d.ts +31 -0
  473. package/{esm → lib}/Stack.js +3 -3
  474. package/{esm → lib}/Switch.d.ts +4 -4
  475. package/lib/Tab.d.ts +29 -0
  476. package/lib/Tab.js +11 -0
  477. package/lib/TabContainer.d.ts +56 -0
  478. package/lib/TabContent.d.ts +14 -0
  479. package/{esm → lib}/TabContent.js +2 -2
  480. package/lib/TabPane.d.ts +39 -0
  481. package/{esm → lib}/TabPane.js +2 -2
  482. package/lib/Table.d.ts +46 -0
  483. package/{esm → lib}/Table.js +2 -2
  484. package/lib/Tabs.d.ts +15 -0
  485. package/{esm → lib}/Tabs.js +1 -2
  486. package/{esm → lib}/ThemeProvider.d.ts +24 -5
  487. package/lib/Toast.d.ts +52 -0
  488. package/{esm → lib}/Toast.js +2 -2
  489. package/lib/ToastBody.d.ts +14 -0
  490. package/{esm → lib}/ToastBody.js +2 -2
  491. package/lib/ToastContainer.d.ts +23 -0
  492. package/{esm → lib}/ToastContainer.js +2 -2
  493. package/{esm → lib}/ToastContext.js +1 -0
  494. package/{esm → lib}/ToastFade.d.ts +1 -1
  495. package/lib/ToastHeader.d.ts +24 -0
  496. package/{esm → lib}/ToastHeader.js +3 -4
  497. package/lib/ToggleButton.d.ts +46 -0
  498. package/{esm → lib}/ToggleButton.js +3 -5
  499. package/lib/ToggleButtonGroup.d.ts +71 -0
  500. package/lib/Tooltip.d.ts +43 -0
  501. package/{esm → lib}/Tooltip.js +3 -4
  502. package/{esm → lib}/TransitionWrapper.d.ts +1 -1
  503. package/{esm → lib}/TransitionWrapper.js +2 -6
  504. package/{esm → lib}/createUtilityClasses.d.ts +0 -2
  505. package/{esm → lib}/createUtilityClasses.js +0 -11
  506. package/{esm → lib}/createWithBsPrefix.d.ts +2 -2
  507. package/{esm → lib}/createWithBsPrefix.js +2 -2
  508. package/{esm → lib}/divWithClassName.js +4 -4
  509. package/{esm → lib}/getTabTransitionComponent.d.ts +1 -1
  510. package/lib/helpers.d.ts +4 -0
  511. package/{esm → lib}/helpers.js +0 -5
  512. package/{esm → lib}/index.d.ts +2 -3
  513. package/{esm → lib}/index.js +3 -3
  514. package/lib/package.json +1 -0
  515. package/lib/types.d.ts +364 -0
  516. package/lib/types.js +1 -0
  517. package/lib/useAccordionButton.d.ts +4 -0
  518. package/lib/useAccordionButton.js +32 -0
  519. package/lib/useCol.d.ts +7 -0
  520. package/{esm/Col.js → lib/useCol.js} +4 -25
  521. package/{esm → lib}/useOverlayOffset.d.ts +1 -1
  522. package/lib/usePlaceholder.d.ts +21 -0
  523. package/{esm → lib}/usePlaceholder.js +3 -3
  524. package/package.json +94 -17
  525. package/AbstractModalHeader/package.json +0 -7
  526. package/Accordion/package.json +0 -7
  527. package/AccordionBody/package.json +0 -7
  528. package/AccordionButton/package.json +0 -7
  529. package/AccordionCollapse/package.json +0 -7
  530. package/AccordionContext/package.json +0 -7
  531. package/AccordionHeader/package.json +0 -7
  532. package/AccordionItem/package.json +0 -7
  533. package/AccordionItemContext/package.json +0 -7
  534. package/Alert/package.json +0 -7
  535. package/AlertHeading/package.json +0 -7
  536. package/AlertLink/package.json +0 -7
  537. package/Anchor/package.json +0 -7
  538. package/Badge/package.json +0 -7
  539. package/BootstrapModalManager/package.json +0 -7
  540. package/Breadcrumb/package.json +0 -7
  541. package/BreadcrumbItem/package.json +0 -7
  542. package/Button/package.json +0 -7
  543. package/ButtonGroup/package.json +0 -7
  544. package/ButtonToolbar/package.json +0 -7
  545. package/Card/package.json +0 -7
  546. package/CardBody/package.json +0 -7
  547. package/CardFooter/package.json +0 -7
  548. package/CardGroup/package.json +0 -7
  549. package/CardHeader/package.json +0 -7
  550. package/CardHeaderContext/package.json +0 -7
  551. package/CardImg/package.json +0 -7
  552. package/CardImgOverlay/package.json +0 -7
  553. package/CardLink/package.json +0 -7
  554. package/CardSubtitle/package.json +0 -7
  555. package/CardText/package.json +0 -7
  556. package/CardTitle/package.json +0 -7
  557. package/Carousel/package.json +0 -7
  558. package/CarouselCaption/package.json +0 -7
  559. package/CarouselItem/package.json +0 -7
  560. package/CloseButton/package.json +0 -7
  561. package/Col/package.json +0 -7
  562. package/Collapse/package.json +0 -7
  563. package/Container/package.json +0 -7
  564. package/Dropdown/package.json +0 -7
  565. package/DropdownButton/package.json +0 -7
  566. package/DropdownContext/package.json +0 -7
  567. package/DropdownDivider/package.json +0 -7
  568. package/DropdownHeader/package.json +0 -7
  569. package/DropdownItem/package.json +0 -7
  570. package/DropdownItemText/package.json +0 -7
  571. package/DropdownMenu/package.json +0 -7
  572. package/DropdownToggle/package.json +0 -7
  573. package/ElementChildren/package.json +0 -7
  574. package/Fade/package.json +0 -7
  575. package/Feedback/package.json +0 -7
  576. package/Figure/package.json +0 -7
  577. package/FigureCaption/package.json +0 -7
  578. package/FigureImage/package.json +0 -7
  579. package/FloatingLabel/package.json +0 -7
  580. package/Form/package.json +0 -7
  581. package/FormCheck/package.json +0 -7
  582. package/FormCheckInput/package.json +0 -7
  583. package/FormCheckLabel/package.json +0 -7
  584. package/FormContext/package.json +0 -7
  585. package/FormControl/package.json +0 -7
  586. package/FormFloating/package.json +0 -7
  587. package/FormGroup/package.json +0 -7
  588. package/FormLabel/package.json +0 -7
  589. package/FormRange/package.json +0 -7
  590. package/FormSelect/package.json +0 -7
  591. package/FormText/package.json +0 -7
  592. package/Image/package.json +0 -7
  593. package/InputGroup/package.json +0 -7
  594. package/InputGroupContext/package.json +0 -7
  595. package/InputGroupText/package.json +0 -7
  596. package/ListGroup/package.json +0 -7
  597. package/ListGroupItem/package.json +0 -7
  598. package/Modal/package.json +0 -7
  599. package/ModalBody/package.json +0 -7
  600. package/ModalContext/package.json +0 -7
  601. package/ModalDialog/package.json +0 -7
  602. package/ModalFooter/package.json +0 -7
  603. package/ModalHeader/package.json +0 -7
  604. package/ModalTitle/package.json +0 -7
  605. package/Nav/package.json +0 -7
  606. package/NavContext/package.json +0 -7
  607. package/NavDropdown/package.json +0 -7
  608. package/NavItem/package.json +0 -7
  609. package/NavLink/package.json +0 -7
  610. package/Navbar/package.json +0 -7
  611. package/NavbarBrand/package.json +0 -7
  612. package/NavbarCollapse/package.json +0 -7
  613. package/NavbarContext/package.json +0 -7
  614. package/NavbarOffcanvas/package.json +0 -7
  615. package/NavbarText/package.json +0 -7
  616. package/NavbarToggle/package.json +0 -7
  617. package/Offcanvas/package.json +0 -7
  618. package/OffcanvasBody/package.json +0 -7
  619. package/OffcanvasHeader/package.json +0 -7
  620. package/OffcanvasTitle/package.json +0 -7
  621. package/OffcanvasToggling/package.json +0 -7
  622. package/Overlay/package.json +0 -7
  623. package/OverlayTrigger/package.json +0 -7
  624. package/PageItem/package.json +0 -7
  625. package/Pagination/package.json +0 -7
  626. package/Placeholder/package.json +0 -7
  627. package/PlaceholderButton/package.json +0 -7
  628. package/Popover/package.json +0 -7
  629. package/PopoverBody/package.json +0 -7
  630. package/PopoverHeader/package.json +0 -7
  631. package/ProgressBar/package.json +0 -7
  632. package/Ratio/package.json +0 -7
  633. package/Row/package.json +0 -7
  634. package/SSRProvider/package.json +0 -7
  635. package/Spinner/package.json +0 -7
  636. package/SplitButton/package.json +0 -7
  637. package/Stack/package.json +0 -7
  638. package/Switch/package.json +0 -7
  639. package/Tab/package.json +0 -7
  640. package/TabContainer/package.json +0 -7
  641. package/TabContent/package.json +0 -7
  642. package/TabPane/package.json +0 -7
  643. package/Table/package.json +0 -7
  644. package/Tabs/package.json +0 -7
  645. package/ThemeProvider/package.json +0 -7
  646. package/Toast/package.json +0 -7
  647. package/ToastBody/package.json +0 -7
  648. package/ToastContainer/package.json +0 -7
  649. package/ToastContext/package.json +0 -7
  650. package/ToastFade/package.json +0 -7
  651. package/ToastHeader/package.json +0 -7
  652. package/ToggleButton/package.json +0 -7
  653. package/ToggleButtonGroup/package.json +0 -7
  654. package/Tooltip/package.json +0 -7
  655. package/TransitionWrapper/package.json +0 -7
  656. package/cjs/SSRProvider.d.ts +0 -4
  657. package/cjs/SSRProvider.js +0 -7
  658. package/cjs/safeFindDOMNode.d.ts +0 -1
  659. package/cjs/safeFindDOMNode.js +0 -15
  660. package/createChainedFunction/package.json +0 -7
  661. package/createUtilityClasses/package.json +0 -7
  662. package/createWithBsPrefix/package.json +0 -7
  663. package/dist/react-bootstrap.js +0 -16921
  664. package/dist/react-bootstrap.min.js +0 -2
  665. package/dist/react-bootstrap.min.js.LICENSE.txt +0 -15
  666. package/divWithClassName/package.json +0 -7
  667. package/esm/AbstractModalHeader.d.ts +0 -10
  668. package/esm/Accordion.d.ts +0 -18
  669. package/esm/AccordionBody.d.ts +0 -7
  670. package/esm/AccordionButton.d.ts +0 -8
  671. package/esm/AccordionCollapse.d.ts +0 -12
  672. package/esm/AccordionHeader.d.ts +0 -6
  673. package/esm/AccordionItem.d.ts +0 -7
  674. package/esm/Alert.d.ts +0 -19
  675. package/esm/AlertHeading.d.ts +0 -6
  676. package/esm/AlertLink.d.ts +0 -6
  677. package/esm/Anchor.d.ts +0 -3
  678. package/esm/Badge.d.ts +0 -10
  679. package/esm/Breadcrumb.d.ts +0 -10
  680. package/esm/BreadcrumbItem.d.ts +0 -12
  681. package/esm/Button.d.ts +0 -11
  682. package/esm/ButtonGroup.d.ts +0 -8
  683. package/esm/ButtonToolbar.d.ts +0 -6
  684. package/esm/Card.d.ts +0 -21
  685. package/esm/CardBody.d.ts +0 -6
  686. package/esm/CardFooter.d.ts +0 -6
  687. package/esm/CardGroup.d.ts +0 -6
  688. package/esm/CardHeader.d.ts +0 -6
  689. package/esm/CardImg.d.ts +0 -7
  690. package/esm/CardImgOverlay.d.ts +0 -6
  691. package/esm/CardLink.d.ts +0 -6
  692. package/esm/CardSubtitle.d.ts +0 -6
  693. package/esm/CardText.d.ts +0 -6
  694. package/esm/CardTitle.d.ts +0 -6
  695. package/esm/Carousel.d.ts +0 -36
  696. package/esm/CarouselCaption.d.ts +0 -6
  697. package/esm/CarouselItem.d.ts +0 -7
  698. package/esm/CloseButton.js +0 -31
  699. package/esm/Col.d.ts +0 -28
  700. package/esm/Collapse.d.ts +0 -17
  701. package/esm/Container.d.ts +0 -7
  702. package/esm/Dropdown.d.ts +0 -21
  703. package/esm/DropdownButton.d.ts +0 -24
  704. package/esm/DropdownButton.js +0 -107
  705. package/esm/DropdownDivider.d.ts +0 -6
  706. package/esm/DropdownHeader.d.ts +0 -6
  707. package/esm/DropdownItem.d.ts +0 -6
  708. package/esm/DropdownItemText.d.ts +0 -6
  709. package/esm/DropdownMenu.d.ts +0 -18
  710. package/esm/DropdownToggle.d.ts +0 -12
  711. package/esm/Fade.d.ts +0 -15
  712. package/esm/Feedback.d.ts +0 -10
  713. package/esm/Figure.d.ts +0 -9
  714. package/esm/FigureCaption.d.ts +0 -6
  715. package/esm/FloatingLabel.d.ts +0 -9
  716. package/esm/FormCheck.d.ts +0 -22
  717. package/esm/FormCheckInput.d.ts +0 -10
  718. package/esm/FormControl.d.ts +0 -19
  719. package/esm/FormFloating.d.ts +0 -6
  720. package/esm/FormGroup.d.ts +0 -7
  721. package/esm/FormLabel.d.ts +0 -16
  722. package/esm/FormRange.d.ts +0 -6
  723. package/esm/FormSelect.d.ts +0 -10
  724. package/esm/FormText.d.ts +0 -7
  725. package/esm/Image.d.ts +0 -33
  726. package/esm/Image.js +0 -47
  727. package/esm/InputGroup.d.ts +0 -13
  728. package/esm/InputGroupText.d.ts +0 -6
  729. package/esm/ListGroup.d.ts +0 -13
  730. package/esm/ListGroupItem.d.ts +0 -11
  731. package/esm/Modal.d.ts +0 -26
  732. package/esm/ModalBody.d.ts +0 -6
  733. package/esm/ModalDialog.d.ts +0 -11
  734. package/esm/ModalFooter.d.ts +0 -6
  735. package/esm/ModalTitle.d.ts +0 -6
  736. package/esm/Nav.d.ts +0 -18
  737. package/esm/NavDropdown.d.ts +0 -20
  738. package/esm/NavItem.d.ts +0 -6
  739. package/esm/NavLink.d.ts +0 -6
  740. package/esm/Navbar.d.ts +0 -23
  741. package/esm/NavbarBrand.d.ts +0 -7
  742. package/esm/NavbarText.d.ts +0 -6
  743. package/esm/NavbarToggle.d.ts +0 -7
  744. package/esm/Offcanvas.d.ts +0 -18
  745. package/esm/OffcanvasBody.d.ts +0 -6
  746. package/esm/OffcanvasTitle.d.ts +0 -6
  747. package/esm/OffcanvasToggling.d.ts +0 -15
  748. package/esm/Overlay.d.ts +0 -24
  749. package/esm/OverlayTrigger.d.ts +0 -29
  750. package/esm/PageItem.d.ts +0 -17
  751. package/esm/Placeholder.d.ts +0 -8
  752. package/esm/PlaceholderButton.d.ts +0 -8
  753. package/esm/Popover.d.ts +0 -19
  754. package/esm/PopoverBody.d.ts +0 -6
  755. package/esm/PopoverHeader.d.ts +0 -6
  756. package/esm/ProgressBar.d.ts +0 -15
  757. package/esm/Ratio.d.ts +0 -9
  758. package/esm/Row.d.ts +0 -17
  759. package/esm/SSRProvider.d.ts +0 -4
  760. package/esm/SSRProvider.js +0 -2
  761. package/esm/Spinner.d.ts +0 -10
  762. package/esm/SplitButton.d.ts +0 -27
  763. package/esm/SplitButton.js +0 -126
  764. package/esm/Stack.d.ts +0 -11
  765. package/esm/Tab.d.ts +0 -27
  766. package/esm/Tab.js +0 -32
  767. package/esm/TabContainer.d.ts +0 -61
  768. package/esm/TabContent.d.ts +0 -6
  769. package/esm/TabPane.d.ts +0 -12
  770. package/esm/Table.d.ts +0 -13
  771. package/esm/Tabs.d.ts +0 -9
  772. package/esm/Toast.d.ts +0 -18
  773. package/esm/ToastBody.d.ts +0 -6
  774. package/esm/ToastContainer.d.ts +0 -9
  775. package/esm/ToastHeader.d.ts +0 -10
  776. package/esm/ToggleButton.d.ts +0 -15
  777. package/esm/ToggleButtonGroup.d.ts +0 -23
  778. package/esm/Tooltip.d.ts +0 -15
  779. package/esm/helpers.d.ts +0 -24
  780. package/esm/safeFindDOMNode.d.ts +0 -1
  781. package/esm/safeFindDOMNode.js +0 -9
  782. package/esm/types.d.ts +0 -29
  783. package/esm/types.js +0 -13
  784. package/esm/usePlaceholder.d.ts +0 -10
  785. package/getInitialPopperStyles/package.json +0 -7
  786. package/getTabTransitionComponent/package.json +0 -7
  787. package/helpers/package.json +0 -7
  788. package/safeFindDOMNode/package.json +0 -7
  789. package/transitionEndListener/package.json +0 -7
  790. package/triggerBrowserReflow/package.json +0 -7
  791. package/types/package.json +0 -7
  792. package/useOverlayOffset/package.json +0 -7
  793. package/usePlaceholder/package.json +0 -7
  794. package/useWrappedRefWithWarning/package.json +0 -7
  795. /package/{esm → lib}/AccordionContext.js +0 -0
  796. /package/{esm → lib}/AccordionItemContext.d.ts +0 -0
  797. /package/{esm → lib}/AccordionItemContext.js +0 -0
  798. /package/{esm → lib}/Anchor.js +0 -0
  799. /package/{esm → lib}/BootstrapModalManager.js +0 -0
  800. /package/{esm → lib}/CardHeaderContext.d.ts +0 -0
  801. /package/{esm → lib}/CardHeaderContext.js +0 -0
  802. /package/{esm → lib}/DropdownContext.js +0 -0
  803. /package/{esm → lib}/ElementChildren.d.ts +0 -0
  804. /package/{esm → lib}/FormContext.d.ts +0 -0
  805. /package/{esm → lib}/FormContext.js +0 -0
  806. /package/{esm → lib}/FormGroup.js +0 -0
  807. /package/{esm → lib}/InputGroupContext.d.ts +0 -0
  808. /package/{esm → lib}/InputGroupContext.js +0 -0
  809. /package/{esm → lib}/ModalContext.d.ts +0 -0
  810. /package/{esm → lib}/NavContext.js +0 -0
  811. /package/{esm → lib}/NavbarCollapse.js +0 -0
  812. /package/{esm → lib}/NavbarContext.d.ts +0 -0
  813. /package/{esm → lib}/NavbarContext.js +0 -0
  814. /package/{esm → lib}/Placeholder.js +0 -0
  815. /package/{esm → lib}/PlaceholderButton.js +0 -0
  816. /package/{esm → lib}/Switch.js +0 -0
  817. /package/{esm → lib}/TabContainer.js +0 -0
  818. /package/{esm → lib}/ThemeProvider.js +0 -0
  819. /package/{esm → lib}/ToastContext.d.ts +0 -0
  820. /package/{esm → lib}/ToastFade.js +0 -0
  821. /package/{esm → lib}/ToggleButtonGroup.js +0 -0
  822. /package/{esm → lib}/createChainedFunction.d.ts +0 -0
  823. /package/{esm → lib}/createChainedFunction.js +0 -0
  824. /package/{esm → lib}/divWithClassName.d.ts +0 -0
  825. /package/{esm → lib}/getInitialPopperStyles.d.ts +0 -0
  826. /package/{esm → lib}/getInitialPopperStyles.js +0 -0
  827. /package/{esm → lib}/getTabTransitionComponent.js +0 -0
  828. /package/{esm → lib}/transitionEndListener.d.ts +0 -0
  829. /package/{esm → lib}/transitionEndListener.js +0 -0
  830. /package/{esm → lib}/triggerBrowserReflow.d.ts +0 -0
  831. /package/{esm → lib}/triggerBrowserReflow.js +0 -0
  832. /package/{esm → lib}/useOverlayOffset.js +0 -0
  833. /package/{esm → lib}/useWrappedRefWithWarning.d.ts +0 -0
  834. /package/{esm → lib}/useWrappedRefWithWarning.js +0 -0
package/cjs/Form.js CHANGED
@@ -3,8 +3,7 @@
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
  exports.__esModule = true;
5
5
  exports.default = void 0;
6
- var _classnames = _interopRequireDefault(require("classnames"));
7
- var _propTypes = _interopRequireDefault(require("prop-types"));
6
+ var _clsx = _interopRequireDefault(require("clsx"));
8
7
  var React = _interopRequireWildcard(require("react"));
9
8
  var _FormCheck = _interopRequireDefault(require("./FormCheck"));
10
9
  var _FormControl = _interopRequireDefault(require("./FormControl"));
@@ -18,24 +17,7 @@ var _Switch = _interopRequireDefault(require("./Switch"));
18
17
  var _FloatingLabel = _interopRequireDefault(require("./FloatingLabel"));
19
18
  var _jsxRuntime = require("react/jsx-runtime");
20
19
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
21
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
22
- const propTypes = {
23
- /**
24
- * The Form `ref` will be forwarded to the underlying element,
25
- * which means, unless it's rendered `as` a composite component,
26
- * it will be a DOM node, when resolved.
27
- *
28
- * @type {ReactRef}
29
- * @alias ref
30
- */
31
- _ref: _propTypes.default.any,
32
- /**
33
- * Mark a form as having been validated. Setting it to `true` will
34
- * toggle any validation styles on the forms elements.
35
- */
36
- validated: _propTypes.default.bool,
37
- as: _propTypes.default.elementType
38
- };
20
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
39
21
  const Form = /*#__PURE__*/React.forwardRef(({
40
22
  className,
41
23
  validated,
@@ -45,10 +27,9 @@ const Form = /*#__PURE__*/React.forwardRef(({
45
27
  }, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
46
28
  ...props,
47
29
  ref: ref,
48
- className: (0, _classnames.default)(className, validated && 'was-validated')
30
+ className: (0, _clsx.default)(className, validated && 'was-validated')
49
31
  }));
50
32
  Form.displayName = 'Form';
51
- Form.propTypes = propTypes;
52
33
  var _default = exports.default = Object.assign(Form, {
53
34
  Group: _FormGroup.default,
54
35
  Control: _FormControl.default,
@@ -1,22 +1,88 @@
1
1
  import * as React from 'react';
2
- import { FeedbackType } from './Feedback';
3
- import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
2
+ import type { DynamicRefForwardingComponent } from '@restart/ui/types';
3
+ import { type FeedbackType } from './Feedback';
4
4
  export type FormCheckType = 'checkbox' | 'radio' | 'switch';
5
- export interface FormCheckProps extends BsPrefixProps, React.InputHTMLAttributes<HTMLInputElement> {
6
- inline?: boolean;
7
- reverse?: boolean;
8
- disabled?: boolean;
9
- label?: React.ReactNode;
10
- type?: FormCheckType;
11
- isValid?: boolean;
5
+ export interface FormCheckProps extends React.InputHTMLAttributes<HTMLInputElement> {
6
+ /**
7
+ * Element used to render the component.
8
+ */
9
+ as?: React.ElementType | undefined;
10
+ /**
11
+ * @default 'form-check'
12
+ */
13
+ bsPrefix?: string | undefined;
14
+ /**
15
+ * bsPrefix override for the base switch class.
16
+ *
17
+ * @default 'form-switch'
18
+ */
19
+ bsSwitchPrefix?: string | undefined;
20
+ /**
21
+ * A HTML id attribute, necessary for proper form accessibility.
22
+ * An id is recommended for allowing label clicks to toggle the check control.
23
+ *
24
+ * This is **required** when `type="switch"` due to how they are rendered.
25
+ */
26
+ id?: string | undefined;
27
+ /**
28
+ * Provide a function child to manually handle the layout of the FormCheck's inner components.
29
+ *
30
+ * ```jsx
31
+ * <FormCheck>
32
+ * <FormCheck.Input isInvalid type={radio} />
33
+ * <FormCheck.Label>Allow us to contact you?</FormCheck.Label>
34
+ * <Feedback type="invalid">Yo this is required</Feedback>
35
+ * </FormCheck>
36
+ * ```
37
+ */
38
+ children?: React.ReactNode | undefined;
39
+ /**
40
+ * Groups controls horizontally with other `FormCheck`s.
41
+ */
42
+ inline?: boolean | undefined;
43
+ /**
44
+ * Put your checkboxes, radios, and switches on the opposite side.
45
+ */
46
+ reverse?: boolean | undefined;
47
+ /**
48
+ * Disables the control.
49
+ */
50
+ disabled?: boolean | undefined;
51
+ /**
52
+ * `title` attribute for the underlying `FormCheckLabel`.
53
+ */
54
+ title?: string | undefined;
55
+ /**
56
+ * Label for the control.
57
+ */
58
+ label?: React.ReactNode | undefined;
59
+ /**
60
+ * The type of checkable.
61
+ */
62
+ type?: FormCheckType | undefined;
63
+ /**
64
+ * Manually style the input as valid
65
+ */
66
+ isValid?: boolean | undefined;
67
+ /**
68
+ * Manually style the input as invalid
69
+ */
12
70
  isInvalid?: boolean;
13
- feedbackTooltip?: boolean;
14
- feedback?: React.ReactNode;
15
- feedbackType?: FeedbackType;
16
- bsSwitchPrefix?: string;
71
+ /**
72
+ * Display feedback as a tooltip.
73
+ */
74
+ feedbackTooltip?: boolean | undefined;
75
+ /**
76
+ * A message to display when the input is in a validation state
77
+ */
78
+ feedback?: React.ReactNode | undefined;
79
+ /**
80
+ * Specify whether the feedback is for valid or invalid fields
81
+ */
82
+ feedbackType?: FeedbackType | undefined;
17
83
  }
18
- declare const _default: BsPrefixRefForwardingComponent<"input", FormCheckProps> & {
19
- Input: BsPrefixRefForwardingComponent<"input", import("./FormCheckInput").FormCheckInputProps>;
84
+ declare const _default: DynamicRefForwardingComponent<"input", FormCheckProps> & {
85
+ Input: DynamicRefForwardingComponent<"input", import("./FormCheckInput").FormCheckInputProps>;
20
86
  Label: React.ForwardRefExoticComponent<import("./FormCheckLabel").FormCheckLabelProps & React.RefAttributes<HTMLLabelElement>>;
21
87
  };
22
88
  export default _default;
package/cjs/FormCheck.js CHANGED
@@ -4,7 +4,7 @@
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
5
  exports.__esModule = true;
6
6
  exports.default = void 0;
7
- var _classnames = _interopRequireDefault(require("classnames"));
7
+ var _clsx = _interopRequireDefault(require("clsx"));
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var React = _react;
10
10
  var _Feedback = _interopRequireDefault(require("./Feedback"));
@@ -15,7 +15,7 @@ var _ThemeProvider = require("./ThemeProvider");
15
15
  var _ElementChildren = require("./ElementChildren");
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
17
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
18
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
19
19
  const FormCheck = /*#__PURE__*/React.forwardRef(({
20
20
  id,
21
21
  bsPrefix,
@@ -60,7 +60,7 @@ const FormCheck = /*#__PURE__*/React.forwardRef(({
60
60
  value: innerFormContext,
61
61
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
62
62
  style: style,
63
- className: (0, _classnames.default)(className, hasLabel && bsPrefix, inline && `${bsPrefix}-inline`, reverse && `${bsPrefix}-reverse`, type === 'switch' && bsSwitchPrefix),
63
+ className: (0, _clsx.default)(className, hasLabel && bsPrefix, inline && `${bsPrefix}-inline`, reverse && `${bsPrefix}-reverse`, type === 'switch' && bsSwitchPrefix),
64
64
  children: children || /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
65
65
  children: [input, hasLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormCheckLabel.default, {
66
66
  title: title,
@@ -1,10 +1,31 @@
1
1
  import * as React from 'react';
2
- import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
2
+ import type { DynamicRefForwardingComponent } from '@restart/ui/types';
3
3
  type FormCheckInputType = 'checkbox' | 'radio';
4
- export interface FormCheckInputProps extends BsPrefixProps, React.InputHTMLAttributes<HTMLInputElement> {
5
- type?: FormCheckInputType;
6
- isValid?: boolean;
7
- isInvalid?: boolean;
4
+ export interface FormCheckInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
5
+ /**
6
+ * Element used to render the component.
7
+ */
8
+ as?: React.ElementType | undefined;
9
+ /**
10
+ * @default 'form-check-input'
11
+ */
12
+ bsPrefix?: string | undefined;
13
+ /**
14
+ * A HTML id attribute, necessary for proper form accessibility.
15
+ */
16
+ id?: string | undefined;
17
+ /**
18
+ * The type of checkable.
19
+ */
20
+ type?: FormCheckInputType | undefined;
21
+ /**
22
+ * Manually style the input as valid
23
+ */
24
+ isValid?: boolean | undefined;
25
+ /**
26
+ * Manually style the input as invalid
27
+ */
28
+ isInvalid?: boolean | undefined;
8
29
  }
9
- declare const FormCheckInput: BsPrefixRefForwardingComponent<'input', FormCheckInputProps>;
30
+ declare const FormCheckInput: DynamicRefForwardingComponent<'input', FormCheckInputProps>;
10
31
  export default FormCheckInput;
@@ -4,14 +4,14 @@
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
5
  exports.__esModule = true;
6
6
  exports.default = void 0;
7
- var _classnames = _interopRequireDefault(require("classnames"));
7
+ var _clsx = _interopRequireDefault(require("clsx"));
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var React = _react;
10
10
  var _FormContext = _interopRequireDefault(require("./FormContext"));
11
11
  var _ThemeProvider = require("./ThemeProvider");
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
15
  const FormCheckInput = /*#__PURE__*/React.forwardRef(({
16
16
  id,
17
17
  bsPrefix,
@@ -32,7 +32,7 @@ const FormCheckInput = /*#__PURE__*/React.forwardRef(({
32
32
  ref: ref,
33
33
  type: type,
34
34
  id: id || controlId,
35
- className: (0, _classnames.default)(className, bsPrefix, isValid && 'is-valid', isInvalid && 'is-invalid')
35
+ className: (0, _clsx.default)(className, bsPrefix, isValid && 'is-valid', isInvalid && 'is-invalid')
36
36
  });
37
37
  });
38
38
  FormCheckInput.displayName = 'FormCheckInput';
@@ -1,6 +1,13 @@
1
1
  import * as React from 'react';
2
- import { BsPrefixProps } from './helpers';
3
- export interface FormCheckLabelProps extends React.LabelHTMLAttributes<HTMLLabelElement>, BsPrefixProps {
2
+ export interface FormCheckLabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
3
+ /**
4
+ * @default 'form-check-label'
5
+ */
6
+ bsPrefix?: string | undefined;
7
+ /**
8
+ * The HTML for attribute for associating the label with an input
9
+ */
10
+ htmlFor?: string | undefined;
4
11
  }
5
12
  declare const FormCheckLabel: React.ForwardRefExoticComponent<FormCheckLabelProps & React.RefAttributes<HTMLLabelElement>>;
6
13
  export default FormCheckLabel;
@@ -4,14 +4,14 @@
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
5
  exports.__esModule = true;
6
6
  exports.default = void 0;
7
- var _classnames = _interopRequireDefault(require("classnames"));
7
+ var _clsx = _interopRequireDefault(require("clsx"));
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var React = _react;
10
10
  var _FormContext = _interopRequireDefault(require("./FormContext"));
11
11
  var _ThemeProvider = require("./ThemeProvider");
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
15
  const FormCheckLabel = /*#__PURE__*/React.forwardRef(({
16
16
  bsPrefix,
17
17
  className,
@@ -26,7 +26,7 @@ const FormCheckLabel = /*#__PURE__*/React.forwardRef(({
26
26
  ...props,
27
27
  ref: ref,
28
28
  htmlFor: htmlFor || controlId,
29
- className: (0, _classnames.default)(className, bsPrefix)
29
+ className: (0, _clsx.default)(className, bsPrefix)
30
30
  });
31
31
  });
32
32
  FormCheckLabel.displayName = 'FormCheckLabel';
@@ -5,7 +5,7 @@ exports.__esModule = true;
5
5
  exports.default = void 0;
6
6
  var React = _interopRequireWildcard(require("react"));
7
7
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
8
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
8
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
9
9
  // TODO
10
10
 
11
11
  const FormContext = /*#__PURE__*/React.createContext({});
@@ -1,19 +1,64 @@
1
1
  import * as React from 'react';
2
- import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
2
+ import type { DynamicRefForwardingComponent } from '@restart/ui/types';
3
3
  type FormControlElement = HTMLInputElement | HTMLTextAreaElement;
4
- export interface FormControlProps extends BsPrefixProps, Omit<React.InputHTMLAttributes<FormControlElement>, 'size'> {
5
- htmlSize?: number;
6
- size?: 'sm' | 'lg';
7
- plaintext?: boolean;
8
- readOnly?: boolean;
9
- disabled?: boolean;
10
- value?: string | string[] | number;
11
- onChange?: React.ChangeEventHandler<FormControlElement>;
12
- type?: string;
13
- isValid?: boolean;
14
- isInvalid?: boolean;
4
+ export interface FormControlProps extends Omit<React.InputHTMLAttributes<FormControlElement>, 'size'> {
5
+ /**
6
+ * Element used to render the component.
7
+ */
8
+ as?: React.ElementType | undefined;
9
+ /**
10
+ * @default 'form-control'
11
+ */
12
+ bsPrefix?: string | undefined;
13
+ /**
14
+ * The size attribute of the underlying HTML element.
15
+ * Specifies the visible width in characters if `as` is `'input'`.
16
+ */
17
+ htmlSize?: number | undefined;
18
+ /**
19
+ * Input size variants
20
+ */
21
+ size?: 'sm' | 'lg' | undefined;
22
+ /**
23
+ * Render the input as plain text. Generally used along side `readOnly`.
24
+ */
25
+ plaintext?: boolean | undefined;
26
+ /**
27
+ * Make the control readonly
28
+ */
29
+ readOnly?: boolean | undefined;
30
+ /**
31
+ * Make the control disabled
32
+ */
33
+ disabled?: boolean | undefined;
34
+ /**
35
+ * The `value` attribute of underlying input
36
+ *
37
+ * @controllable onChange
38
+ * */
39
+ value?: string | string[] | number | undefined;
40
+ /**
41
+ * A callback fired when the `value` prop changes
42
+ */
43
+ onChange?: React.ChangeEventHandler<FormControlElement> | undefined;
44
+ /**
45
+ * The HTML input `type`, which is only relevant if `as` is `'input'` (the default).
46
+ */
47
+ type?: string | undefined;
48
+ /**
49
+ * Uses `controlId` from `<FormGroup>` if not explicitly specified.
50
+ */
51
+ id?: string | undefined;
52
+ /**
53
+ * Add "valid" validation styles to the control
54
+ */
55
+ isValid?: boolean | undefined;
56
+ /**
57
+ * Add "invalid" validation styles to the control and accompanying label
58
+ */
59
+ isInvalid?: boolean | undefined;
15
60
  }
16
- declare const _default: BsPrefixRefForwardingComponent<"input", FormControlProps> & {
17
- Feedback: BsPrefixRefForwardingComponent<"div", import("./Feedback").FeedbackProps>;
61
+ declare const _default: DynamicRefForwardingComponent<"input", FormControlProps> & {
62
+ Feedback: DynamicRefForwardingComponent<"div", import("./Feedback").FeedbackProps>;
18
63
  };
19
64
  export default _default;
@@ -4,7 +4,7 @@
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
5
  exports.__esModule = true;
6
6
  exports.default = void 0;
7
- var _classnames = _interopRequireDefault(require("classnames"));
7
+ var _clsx = _interopRequireDefault(require("clsx"));
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var React = _react;
10
10
  var _warning = _interopRequireDefault(require("warning"));
@@ -13,7 +13,7 @@ var _FormContext = _interopRequireDefault(require("./FormContext"));
13
13
  var _ThemeProvider = require("./ThemeProvider");
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
15
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
16
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
17
  const FormControl = /*#__PURE__*/React.forwardRef(({
18
18
  bsPrefix,
19
19
  type,
@@ -41,7 +41,7 @@ const FormControl = /*#__PURE__*/React.forwardRef(({
41
41
  ref: ref,
42
42
  readOnly: readOnly,
43
43
  id: id || controlId,
44
- className: (0, _classnames.default)(className, plaintext ? `${bsPrefix}-plaintext` : bsPrefix, size && `${bsPrefix}-${size}`, type === 'color' && `${bsPrefix}-color`, isValid && 'is-valid', isInvalid && 'is-invalid')
44
+ className: (0, _clsx.default)(className, plaintext ? `${bsPrefix}-plaintext` : bsPrefix, size && `${bsPrefix}-${size}`, type === 'color' && `${bsPrefix}-color`, isValid && 'is-valid', isInvalid && 'is-invalid')
45
45
  });
46
46
  });
47
47
  FormControl.displayName = 'FormControl';
@@ -1,6 +1,14 @@
1
1
  import * as React from 'react';
2
- import type { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3
- export interface FormFloatingProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
2
+ import type { DynamicRefForwardingComponent } from '@restart/ui/types';
3
+ export interface FormFloatingProps extends React.HTMLAttributes<HTMLElement> {
4
+ /**
5
+ * Element used to render the component.
6
+ */
7
+ as?: React.ElementType | undefined;
8
+ /**
9
+ * @default 'form-floating'
10
+ */
11
+ bsPrefix?: string | undefined;
4
12
  }
5
- declare const FormFloating: BsPrefixRefForwardingComponent<'div', FormFloatingProps>;
13
+ declare const FormFloating: DynamicRefForwardingComponent<'div', FormFloatingProps>;
6
14
  export default FormFloating;
@@ -5,11 +5,11 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
5
5
  exports.__esModule = true;
6
6
  exports.default = void 0;
7
7
  var React = _interopRequireWildcard(require("react"));
8
- var _classnames = _interopRequireDefault(require("classnames"));
8
+ var _clsx = _interopRequireDefault(require("clsx"));
9
9
  var _ThemeProvider = require("./ThemeProvider");
10
10
  var _jsxRuntime = require("react/jsx-runtime");
11
11
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
12
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
13
  const FormFloating = /*#__PURE__*/React.forwardRef(({
14
14
  className,
15
15
  bsPrefix,
@@ -19,7 +19,7 @@ const FormFloating = /*#__PURE__*/React.forwardRef(({
19
19
  bsPrefix = (0, _ThemeProvider.useBootstrapPrefix)(bsPrefix, 'form-floating');
20
20
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(Component, {
21
21
  ref: ref,
22
- className: (0, _classnames.default)(className, bsPrefix),
22
+ className: (0, _clsx.default)(className, bsPrefix),
23
23
  ...props
24
24
  });
25
25
  });
@@ -1,7 +1,14 @@
1
1
  import * as React from 'react';
2
- import { AsProp, BsPrefixRefForwardingComponent } from './helpers';
3
- export interface FormGroupProps extends React.HTMLAttributes<HTMLElement>, AsProp {
4
- controlId?: string;
2
+ import type { DynamicRefForwardingComponent } from '@restart/ui/types';
3
+ export interface FormGroupProps extends React.HTMLAttributes<HTMLElement> {
4
+ /**
5
+ * Element used to render the component.
6
+ */
7
+ as?: React.ElementType | undefined;
8
+ /**
9
+ * Sets `id` on `<FormControl>` and `htmlFor` on `<FormGroup.Label>`.
10
+ */
11
+ controlId?: string | undefined;
5
12
  }
6
- declare const FormGroup: BsPrefixRefForwardingComponent<'div', FormGroupProps>;
13
+ declare const FormGroup: DynamicRefForwardingComponent<'div', FormGroupProps>;
7
14
  export default FormGroup;
package/cjs/FormGroup.js CHANGED
@@ -8,7 +8,7 @@ var React = _react;
8
8
  var _FormContext = _interopRequireDefault(require("./FormContext"));
9
9
  var _jsxRuntime = require("react/jsx-runtime");
10
10
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
11
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
11
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
12
  const FormGroup = /*#__PURE__*/React.forwardRef(({
13
13
  controlId,
14
14
  // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
@@ -1,16 +1,39 @@
1
1
  import * as React from 'react';
2
- import { ColProps } from './Col';
3
- import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
4
- interface FormLabelBaseProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
5
- htmlFor?: string;
6
- visuallyHidden?: boolean;
2
+ import type { DynamicRefForwardingComponent } from '@restart/ui/types';
3
+ import { type ColProps } from './Col';
4
+ interface FormLabelBaseProps extends React.HTMLAttributes<HTMLElement> {
5
+ /**
6
+ * Element used to render the component.
7
+ */
8
+ as?: React.ElementType | undefined;
9
+ /**
10
+ * @default 'form-label'
11
+ */
12
+ bsPrefix?: string | undefined;
13
+ /**
14
+ * Uses `controlId` from `<FormGroup>` if not explicitly specified.
15
+ */
16
+ htmlFor?: string | undefined;
17
+ /**
18
+ * Hides the label visually while still allowing it to be
19
+ * read by assistive technologies.
20
+ */
21
+ visuallyHidden?: boolean | undefined;
7
22
  }
8
23
  export interface FormLabelOwnProps extends FormLabelBaseProps {
24
+ /**
25
+ * Renders the FormLabel as a `<Col>` component (accepting all the same props),
26
+ * as well as adding additional styling for horizontal forms.
27
+ */
9
28
  column?: false;
10
29
  }
11
30
  export interface FormLabelWithColProps extends FormLabelBaseProps, ColProps {
31
+ /**
32
+ * Renders the FormLabel as a `<Col>` component (accepting all the same props),
33
+ * as well as adding additional styling for horizontal forms.
34
+ */
12
35
  column: true | 'sm' | 'lg';
13
36
  }
14
37
  export type FormLabelProps = FormLabelWithColProps | FormLabelOwnProps;
15
- declare const FormLabel: BsPrefixRefForwardingComponent<'label', FormLabelProps>;
38
+ declare const FormLabel: DynamicRefForwardingComponent<'label', FormLabelProps>;
16
39
  export default FormLabel;
package/cjs/FormLabel.js CHANGED
@@ -4,7 +4,7 @@
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
5
  exports.__esModule = true;
6
6
  exports.default = void 0;
7
- var _classnames = _interopRequireDefault(require("classnames"));
7
+ var _clsx = _interopRequireDefault(require("clsx"));
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var React = _react;
10
10
  var _warning = _interopRequireDefault(require("warning"));
@@ -13,7 +13,7 @@ var _FormContext = _interopRequireDefault(require("./FormContext"));
13
13
  var _ThemeProvider = require("./ThemeProvider");
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
15
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
16
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
17
  const FormLabel = /*#__PURE__*/React.forwardRef(({
18
18
  // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
19
19
  as: Component = 'label',
@@ -30,7 +30,7 @@ const FormLabel = /*#__PURE__*/React.forwardRef(({
30
30
  bsPrefix = (0, _ThemeProvider.useBootstrapPrefix)(bsPrefix, 'form-label');
31
31
  let columnClass = 'col-form-label';
32
32
  if (typeof column === 'string') columnClass = `${columnClass} ${columnClass}-${column}`;
33
- const classes = (0, _classnames.default)(className, bsPrefix, visuallyHidden && 'visually-hidden', column && columnClass);
33
+ const classes = (0, _clsx.default)(className, bsPrefix, visuallyHidden && 'visually-hidden', column && columnClass);
34
34
  process.env.NODE_ENV !== "production" ? (0, _warning.default)(controlId == null || !htmlFor, '`controlId` is ignored on `<FormLabel>` when `htmlFor` is specified.') : void 0;
35
35
  htmlFor = htmlFor || controlId;
36
36
  if (column) return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Col.default, {
@@ -1,6 +1,17 @@
1
1
  import * as React from 'react';
2
- import { BsPrefixOnlyProps } from './helpers';
3
- export interface FormRangeProps extends BsPrefixOnlyProps, Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
2
+ export interface FormRangeProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'type'> {
3
+ /**
4
+ * Element used to render the component.
5
+ */
6
+ as?: React.ElementType | undefined;
7
+ /**
8
+ * @default 'form-range'
9
+ */
10
+ bsPrefix?: string | undefined;
11
+ /**
12
+ * Uses `controlId` from `<FormGroup>` if not explicitly specified.
13
+ */
14
+ id?: string | undefined;
4
15
  }
5
16
  declare const FormRange: React.ForwardRefExoticComponent<FormRangeProps & React.RefAttributes<HTMLInputElement>>;
6
17
  export default FormRange;
package/cjs/FormRange.js CHANGED
@@ -4,14 +4,14 @@
4
4
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
5
5
  exports.__esModule = true;
6
6
  exports.default = void 0;
7
- var _classnames = _interopRequireDefault(require("classnames"));
7
+ var _clsx = _interopRequireDefault(require("clsx"));
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var React = _react;
10
10
  var _ThemeProvider = require("./ThemeProvider");
11
11
  var _FormContext = _interopRequireDefault(require("./FormContext"));
12
12
  var _jsxRuntime = require("react/jsx-runtime");
13
13
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
14
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
15
15
  const FormRange = /*#__PURE__*/React.forwardRef(({
16
16
  bsPrefix,
17
17
  className,
@@ -26,7 +26,7 @@ const FormRange = /*#__PURE__*/React.forwardRef(({
26
26
  ...props,
27
27
  type: "range",
28
28
  ref: ref,
29
- className: (0, _classnames.default)(className, bsPrefix),
29
+ className: (0, _clsx.default)(className, bsPrefix),
30
30
  id: id || controlId
31
31
  });
32
32
  });