react-bootstrap 2.8.0 → 2.9.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 (337) hide show
  1. package/AlertHeading/package.json +7 -0
  2. package/AlertLink/package.json +7 -0
  3. package/CardBody/package.json +7 -0
  4. package/CardFooter/package.json +7 -0
  5. package/CardImgOverlay/package.json +7 -0
  6. package/CardLink/package.json +7 -0
  7. package/CardSubtitle/package.json +7 -0
  8. package/CardText/package.json +7 -0
  9. package/CardTitle/package.json +7 -0
  10. package/DropdownDivider/package.json +7 -0
  11. package/DropdownHeader/package.json +7 -0
  12. package/DropdownItemText/package.json +7 -0
  13. package/InputGroupText/package.json +7 -0
  14. package/NavbarText/package.json +7 -0
  15. package/cjs/AbstractModalHeader.js +1 -0
  16. package/cjs/Accordion.js +1 -0
  17. package/cjs/AccordionBody.js +1 -0
  18. package/cjs/AccordionButton.js +1 -0
  19. package/cjs/AccordionCollapse.js +1 -0
  20. package/cjs/AccordionContext.js +1 -0
  21. package/cjs/AccordionHeader.js +1 -0
  22. package/cjs/AccordionItem.js +1 -0
  23. package/cjs/AccordionItemContext.js +1 -0
  24. package/cjs/Alert.d.ts +2 -2
  25. package/cjs/Alert.js +5 -13
  26. package/cjs/AlertHeading.d.ts +6 -0
  27. package/cjs/AlertHeading.js +32 -0
  28. package/cjs/AlertLink.d.ts +6 -0
  29. package/cjs/AlertLink.js +30 -0
  30. package/cjs/Badge.js +1 -0
  31. package/cjs/Breadcrumb.js +1 -0
  32. package/cjs/BreadcrumbItem.js +1 -0
  33. package/cjs/Button.js +1 -0
  34. package/cjs/ButtonGroup.js +1 -0
  35. package/cjs/ButtonToolbar.js +1 -0
  36. package/cjs/Card.d.ts +7 -7
  37. package/cjs/Card.js +17 -28
  38. package/cjs/CardBody.d.ts +6 -0
  39. package/cjs/CardBody.js +29 -0
  40. package/cjs/CardFooter.d.ts +6 -0
  41. package/cjs/CardFooter.js +29 -0
  42. package/cjs/CardGroup.d.ts +6 -2
  43. package/cjs/CardGroup.js +22 -2
  44. package/cjs/CardHeader.js +1 -0
  45. package/cjs/CardHeaderContext.js +1 -0
  46. package/cjs/CardImg.js +1 -0
  47. package/cjs/CardImgOverlay.d.ts +6 -0
  48. package/cjs/CardImgOverlay.js +29 -0
  49. package/cjs/CardLink.d.ts +6 -0
  50. package/cjs/CardLink.js +29 -0
  51. package/cjs/CardSubtitle.d.ts +6 -0
  52. package/cjs/CardSubtitle.js +31 -0
  53. package/cjs/CardText.d.ts +6 -0
  54. package/cjs/CardText.js +29 -0
  55. package/cjs/CardTitle.d.ts +6 -0
  56. package/cjs/CardTitle.js +31 -0
  57. package/cjs/Carousel.d.ts +1 -1
  58. package/cjs/Carousel.js +1 -0
  59. package/cjs/CarouselCaption.d.ts +6 -2
  60. package/cjs/CarouselCaption.js +22 -2
  61. package/cjs/CarouselItem.js +1 -0
  62. package/cjs/Col.js +1 -0
  63. package/cjs/Container.js +1 -0
  64. package/cjs/Dropdown.d.ts +4 -4
  65. package/cjs/Dropdown.js +7 -18
  66. package/cjs/DropdownContext.js +1 -0
  67. package/cjs/DropdownDivider.d.ts +6 -0
  68. package/cjs/DropdownDivider.js +31 -0
  69. package/cjs/DropdownHeader.d.ts +6 -0
  70. package/cjs/DropdownHeader.js +31 -0
  71. package/cjs/DropdownItem.d.ts +2 -2
  72. package/cjs/DropdownItem.js +1 -0
  73. package/cjs/DropdownItemText.d.ts +6 -0
  74. package/cjs/DropdownItemText.js +29 -0
  75. package/cjs/DropdownMenu.js +1 -0
  76. package/cjs/DropdownToggle.js +1 -0
  77. package/cjs/Figure.d.ts +7 -4
  78. package/cjs/Figure.js +20 -3
  79. package/cjs/FigureCaption.d.ts +5 -1
  80. package/cjs/FigureCaption.js +20 -3
  81. package/cjs/FloatingLabel.js +1 -0
  82. package/cjs/Form.d.ts +1 -1
  83. package/cjs/FormCheck.js +1 -0
  84. package/cjs/FormCheckInput.js +1 -0
  85. package/cjs/FormCheckLabel.js +1 -0
  86. package/cjs/FormContext.js +1 -0
  87. package/cjs/FormControl.js +2 -12
  88. package/cjs/FormFloating.d.ts +6 -2
  89. package/cjs/FormFloating.js +22 -2
  90. package/cjs/FormLabel.js +1 -0
  91. package/cjs/FormRange.js +1 -0
  92. package/cjs/FormSelect.js +1 -0
  93. package/cjs/FormText.js +1 -0
  94. package/cjs/Image.js +1 -0
  95. package/cjs/InputGroup.d.ts +4 -3
  96. package/cjs/InputGroup.js +5 -7
  97. package/cjs/InputGroupContext.js +1 -0
  98. package/cjs/InputGroupText.d.ts +6 -0
  99. package/cjs/InputGroupText.js +29 -0
  100. package/cjs/ListGroup.js +1 -0
  101. package/cjs/ListGroupItem.js +1 -0
  102. package/cjs/Modal.d.ts +3 -3
  103. package/cjs/Modal.js +1 -0
  104. package/cjs/ModalBody.d.ts +6 -2
  105. package/cjs/ModalBody.js +22 -2
  106. package/cjs/ModalContext.js +1 -0
  107. package/cjs/ModalDialog.js +1 -0
  108. package/cjs/ModalFooter.d.ts +6 -2
  109. package/cjs/ModalFooter.js +22 -2
  110. package/cjs/ModalHeader.js +1 -0
  111. package/cjs/ModalTitle.d.ts +6 -3
  112. package/cjs/ModalTitle.js +21 -3
  113. package/cjs/Nav.d.ts +1 -1
  114. package/cjs/Nav.js +1 -0
  115. package/cjs/NavContext.js +1 -0
  116. package/cjs/NavDropdown.d.ts +4 -4
  117. package/cjs/NavDropdown.js +1 -0
  118. package/cjs/NavItem.d.ts +6 -2
  119. package/cjs/NavItem.js +22 -2
  120. package/cjs/NavLink.js +1 -0
  121. package/cjs/Navbar.d.ts +1 -1
  122. package/cjs/Navbar.js +3 -5
  123. package/cjs/NavbarBrand.js +1 -0
  124. package/cjs/NavbarCollapse.js +1 -0
  125. package/cjs/NavbarContext.js +1 -0
  126. package/cjs/NavbarOffcanvas.js +1 -0
  127. package/cjs/NavbarText.d.ts +6 -0
  128. package/cjs/NavbarText.js +29 -0
  129. package/cjs/NavbarToggle.js +1 -0
  130. package/cjs/Offcanvas.d.ts +2 -2
  131. package/cjs/Offcanvas.js +1 -0
  132. package/cjs/OffcanvasBody.d.ts +6 -2
  133. package/cjs/OffcanvasBody.js +22 -2
  134. package/cjs/OffcanvasHeader.js +1 -0
  135. package/cjs/OffcanvasTitle.d.ts +6 -3
  136. package/cjs/OffcanvasTitle.js +21 -3
  137. package/cjs/OffcanvasToggling.js +1 -0
  138. package/cjs/Overlay.js +4 -2
  139. package/cjs/OverlayTrigger.js +1 -0
  140. package/cjs/Pagination.js +1 -0
  141. package/cjs/Popover.d.ts +2 -2
  142. package/cjs/Popover.js +1 -0
  143. package/cjs/PopoverBody.d.ts +6 -2
  144. package/cjs/PopoverBody.js +22 -2
  145. package/cjs/PopoverHeader.d.ts +6 -2
  146. package/cjs/PopoverHeader.js +22 -2
  147. package/cjs/ProgressBar.js +1 -0
  148. package/cjs/Ratio.js +1 -0
  149. package/cjs/Row.js +1 -0
  150. package/cjs/Spinner.js +1 -0
  151. package/cjs/Stack.js +1 -0
  152. package/cjs/Tab.d.ts +1 -1
  153. package/cjs/Tab.js +0 -6
  154. package/cjs/TabContent.d.ts +6 -2
  155. package/cjs/TabContent.js +22 -2
  156. package/cjs/TabPane.js +1 -0
  157. package/cjs/Table.js +1 -0
  158. package/cjs/ThemeProvider.js +1 -0
  159. package/cjs/Toast.d.ts +1 -1
  160. package/cjs/Toast.js +1 -0
  161. package/cjs/ToastBody.d.ts +6 -2
  162. package/cjs/ToastBody.js +22 -2
  163. package/cjs/ToastContainer.js +1 -0
  164. package/cjs/ToastContext.js +1 -0
  165. package/cjs/ToastHeader.js +1 -0
  166. package/cjs/ToggleButton.d.ts +1 -0
  167. package/cjs/ToggleButton.js +1 -0
  168. package/cjs/Tooltip.js +1 -0
  169. package/cjs/TransitionWrapper.js +1 -0
  170. package/cjs/createWithBsPrefix.js +1 -0
  171. package/cjs/index.d.ts +71 -9
  172. package/cjs/index.js +68 -15
  173. package/cjs/useOverlayOffset.js +1 -0
  174. package/cjs/usePlaceholder.js +1 -0
  175. package/dist/react-bootstrap.js +1199 -490
  176. package/dist/react-bootstrap.min.js +1 -1
  177. package/esm/AbstractModalHeader.js +2 -0
  178. package/esm/Accordion.js +2 -0
  179. package/esm/AccordionBody.js +2 -0
  180. package/esm/AccordionButton.js +2 -0
  181. package/esm/AccordionCollapse.js +2 -0
  182. package/esm/AccordionContext.js +2 -0
  183. package/esm/AccordionHeader.js +2 -0
  184. package/esm/AccordionItem.js +2 -0
  185. package/esm/AccordionItemContext.js +2 -0
  186. package/esm/Alert.d.ts +2 -2
  187. package/esm/Alert.js +4 -11
  188. package/esm/AlertHeading.d.ts +6 -0
  189. package/esm/AlertHeading.js +24 -0
  190. package/esm/AlertLink.d.ts +6 -0
  191. package/esm/AlertLink.js +22 -0
  192. package/esm/Badge.js +2 -0
  193. package/esm/Breadcrumb.js +2 -0
  194. package/esm/BreadcrumbItem.js +2 -0
  195. package/esm/Button.js +2 -0
  196. package/esm/ButtonGroup.js +2 -0
  197. package/esm/ButtonToolbar.js +2 -0
  198. package/esm/Card.d.ts +7 -7
  199. package/esm/Card.js +10 -20
  200. package/esm/CardBody.d.ts +6 -0
  201. package/esm/CardBody.js +21 -0
  202. package/esm/CardFooter.d.ts +6 -0
  203. package/esm/CardFooter.js +21 -0
  204. package/esm/CardGroup.d.ts +6 -2
  205. package/esm/CardGroup.js +21 -2
  206. package/esm/CardHeader.js +2 -0
  207. package/esm/CardHeaderContext.js +2 -0
  208. package/esm/CardImg.js +2 -0
  209. package/esm/CardImgOverlay.d.ts +6 -0
  210. package/esm/CardImgOverlay.js +21 -0
  211. package/esm/CardLink.d.ts +6 -0
  212. package/esm/CardLink.js +21 -0
  213. package/esm/CardSubtitle.d.ts +6 -0
  214. package/esm/CardSubtitle.js +23 -0
  215. package/esm/CardText.d.ts +6 -0
  216. package/esm/CardText.js +21 -0
  217. package/esm/CardTitle.d.ts +6 -0
  218. package/esm/CardTitle.js +23 -0
  219. package/esm/Carousel.d.ts +1 -1
  220. package/esm/Carousel.js +2 -0
  221. package/esm/CarouselCaption.d.ts +6 -2
  222. package/esm/CarouselCaption.js +21 -2
  223. package/esm/CarouselItem.js +2 -0
  224. package/esm/Col.js +2 -0
  225. package/esm/Container.js +2 -0
  226. package/esm/Dropdown.d.ts +4 -4
  227. package/esm/Dropdown.js +5 -15
  228. package/esm/DropdownContext.js +2 -0
  229. package/esm/DropdownDivider.d.ts +6 -0
  230. package/esm/DropdownDivider.js +23 -0
  231. package/esm/DropdownHeader.d.ts +6 -0
  232. package/esm/DropdownHeader.js +23 -0
  233. package/esm/DropdownItem.d.ts +2 -2
  234. package/esm/DropdownItem.js +2 -0
  235. package/esm/DropdownItemText.d.ts +6 -0
  236. package/esm/DropdownItemText.js +21 -0
  237. package/esm/DropdownMenu.js +2 -0
  238. package/esm/DropdownToggle.js +2 -0
  239. package/esm/Figure.d.ts +7 -4
  240. package/esm/Figure.js +19 -3
  241. package/esm/FigureCaption.d.ts +5 -1
  242. package/esm/FigureCaption.js +19 -3
  243. package/esm/FloatingLabel.js +2 -0
  244. package/esm/Form.d.ts +1 -1
  245. package/esm/FormCheck.js +2 -0
  246. package/esm/FormCheckInput.js +2 -0
  247. package/esm/FormCheckLabel.js +2 -0
  248. package/esm/FormContext.js +2 -0
  249. package/esm/FormControl.js +3 -12
  250. package/esm/FormFloating.d.ts +6 -2
  251. package/esm/FormFloating.js +21 -2
  252. package/esm/FormLabel.js +2 -0
  253. package/esm/FormRange.js +2 -0
  254. package/esm/FormSelect.js +2 -0
  255. package/esm/FormText.js +2 -0
  256. package/esm/Image.js +2 -0
  257. package/esm/InputGroup.d.ts +4 -3
  258. package/esm/InputGroup.js +3 -4
  259. package/esm/InputGroupContext.js +2 -0
  260. package/esm/InputGroupText.d.ts +6 -0
  261. package/esm/InputGroupText.js +21 -0
  262. package/esm/ListGroup.js +2 -0
  263. package/esm/ListGroupItem.js +2 -0
  264. package/esm/Modal.d.ts +3 -3
  265. package/esm/Modal.js +2 -0
  266. package/esm/ModalBody.d.ts +6 -2
  267. package/esm/ModalBody.js +21 -2
  268. package/esm/ModalContext.js +2 -0
  269. package/esm/ModalDialog.js +2 -0
  270. package/esm/ModalFooter.d.ts +6 -2
  271. package/esm/ModalFooter.js +21 -2
  272. package/esm/ModalHeader.js +2 -0
  273. package/esm/ModalTitle.d.ts +6 -3
  274. package/esm/ModalTitle.js +21 -4
  275. package/esm/Nav.d.ts +1 -1
  276. package/esm/Nav.js +2 -0
  277. package/esm/NavContext.js +2 -0
  278. package/esm/NavDropdown.d.ts +4 -4
  279. package/esm/NavDropdown.js +2 -0
  280. package/esm/NavItem.d.ts +6 -2
  281. package/esm/NavItem.js +21 -2
  282. package/esm/NavLink.js +2 -0
  283. package/esm/Navbar.d.ts +1 -1
  284. package/esm/Navbar.js +3 -4
  285. package/esm/NavbarBrand.js +2 -0
  286. package/esm/NavbarCollapse.js +2 -0
  287. package/esm/NavbarContext.js +2 -0
  288. package/esm/NavbarOffcanvas.js +2 -0
  289. package/esm/NavbarText.d.ts +6 -0
  290. package/esm/NavbarText.js +21 -0
  291. package/esm/NavbarToggle.js +2 -0
  292. package/esm/Offcanvas.d.ts +2 -2
  293. package/esm/Offcanvas.js +2 -0
  294. package/esm/OffcanvasBody.d.ts +6 -2
  295. package/esm/OffcanvasBody.js +21 -2
  296. package/esm/OffcanvasHeader.js +2 -0
  297. package/esm/OffcanvasTitle.d.ts +6 -3
  298. package/esm/OffcanvasTitle.js +21 -4
  299. package/esm/OffcanvasToggling.js +2 -0
  300. package/esm/Overlay.js +5 -2
  301. package/esm/OverlayTrigger.js +2 -0
  302. package/esm/Pagination.js +2 -0
  303. package/esm/Popover.d.ts +2 -2
  304. package/esm/Popover.js +2 -0
  305. package/esm/PopoverBody.d.ts +6 -2
  306. package/esm/PopoverBody.js +21 -2
  307. package/esm/PopoverHeader.d.ts +6 -2
  308. package/esm/PopoverHeader.js +21 -2
  309. package/esm/ProgressBar.js +2 -0
  310. package/esm/Ratio.js +2 -0
  311. package/esm/Row.js +2 -0
  312. package/esm/Spinner.js +2 -0
  313. package/esm/Stack.js +2 -0
  314. package/esm/Tab.d.ts +1 -1
  315. package/esm/Tab.js +0 -5
  316. package/esm/TabContent.d.ts +6 -2
  317. package/esm/TabContent.js +21 -2
  318. package/esm/TabPane.js +2 -0
  319. package/esm/Table.js +2 -0
  320. package/esm/ThemeProvider.js +2 -0
  321. package/esm/Toast.d.ts +1 -1
  322. package/esm/Toast.js +2 -0
  323. package/esm/ToastBody.d.ts +6 -2
  324. package/esm/ToastBody.js +21 -2
  325. package/esm/ToastContainer.js +2 -0
  326. package/esm/ToastContext.js +2 -0
  327. package/esm/ToastHeader.js +2 -0
  328. package/esm/ToggleButton.d.ts +1 -0
  329. package/esm/ToggleButton.js +2 -0
  330. package/esm/Tooltip.js +2 -0
  331. package/esm/TransitionWrapper.js +2 -0
  332. package/esm/createWithBsPrefix.js +2 -0
  333. package/esm/index.d.ts +71 -9
  334. package/esm/index.js +33 -7
  335. package/esm/useOverlayOffset.js +2 -0
  336. package/esm/usePlaceholder.js +2 -0
  337. package/package.json +4 -4
package/esm/Dropdown.js CHANGED
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import classNames from 'classnames';
2
4
  import * as React from 'react';
3
5
  import { useContext, useMemo } from 'react';
@@ -5,28 +7,16 @@ import BaseDropdown from '@restart/ui/Dropdown';
5
7
  import { useUncontrolled } from 'uncontrollable';
6
8
  import useEventCallback from '@restart/hooks/useEventCallback';
7
9
  import DropdownContext from './DropdownContext';
10
+ import DropdownDivider from './DropdownDivider';
11
+ import DropdownHeader from './DropdownHeader';
8
12
  import DropdownItem from './DropdownItem';
13
+ import DropdownItemText from './DropdownItemText';
9
14
  import DropdownMenu, { getDropdownMenuPlacement } from './DropdownMenu';
10
15
  import DropdownToggle from './DropdownToggle';
11
16
  import InputGroupContext from './InputGroupContext';
12
17
  import { useBootstrapPrefix, useIsRTL } from './ThemeProvider';
13
- import createWithBsPrefix from './createWithBsPrefix';
14
18
  import { alignPropType } from './types';
15
19
  import { jsx as _jsx } from "react/jsx-runtime";
16
- const DropdownHeader = createWithBsPrefix('dropdown-header', {
17
- defaultProps: {
18
- role: 'heading'
19
- }
20
- });
21
- const DropdownDivider = createWithBsPrefix('dropdown-divider', {
22
- Component: 'hr',
23
- defaultProps: {
24
- role: 'separator'
25
- }
26
- });
27
- const DropdownItemText = createWithBsPrefix('dropdown-item-text', {
28
- Component: 'span'
29
- });
30
20
  const Dropdown = /*#__PURE__*/React.forwardRef((pProps, ref) => {
31
21
  const {
32
22
  bsPrefix,
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import * as React from 'react';
2
4
  const DropdownContext = /*#__PURE__*/React.createContext({});
3
5
  DropdownContext.displayName = 'DropdownContext';
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import type { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3
+ export interface DropdownDividerProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
4
+ }
5
+ declare const DropdownDivider: BsPrefixRefForwardingComponent<'hr', DropdownDividerProps>;
6
+ export default DropdownDivider;
@@ -0,0 +1,23 @@
1
+ "use client";
2
+
3
+ import * as React from 'react';
4
+ import classNames from 'classnames';
5
+ import { useBootstrapPrefix } from './ThemeProvider';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ const DropdownDivider = /*#__PURE__*/React.forwardRef(({
8
+ className,
9
+ bsPrefix,
10
+ as: Component = 'hr',
11
+ role = 'separator',
12
+ ...props
13
+ }, ref) => {
14
+ bsPrefix = useBootstrapPrefix(bsPrefix, 'dropdown-divider');
15
+ return /*#__PURE__*/_jsx(Component, {
16
+ ref: ref,
17
+ className: classNames(className, bsPrefix),
18
+ role: role,
19
+ ...props
20
+ });
21
+ });
22
+ DropdownDivider.displayName = 'DropdownDivider';
23
+ export default DropdownDivider;
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import type { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3
+ export interface DropdownHeaderProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
4
+ }
5
+ declare const DropdownHeader: BsPrefixRefForwardingComponent<'div', DropdownHeaderProps>;
6
+ export default DropdownHeader;
@@ -0,0 +1,23 @@
1
+ "use client";
2
+
3
+ import * as React from 'react';
4
+ import classNames from 'classnames';
5
+ import { useBootstrapPrefix } from './ThemeProvider';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ const DropdownHeader = /*#__PURE__*/React.forwardRef(({
8
+ className,
9
+ bsPrefix,
10
+ as: Component = 'div',
11
+ role = 'heading',
12
+ ...props
13
+ }, ref) => {
14
+ bsPrefix = useBootstrapPrefix(bsPrefix, 'dropdown-header');
15
+ return /*#__PURE__*/_jsx(Component, {
16
+ ref: ref,
17
+ className: classNames(className, bsPrefix),
18
+ role: role,
19
+ ...props
20
+ });
21
+ });
22
+ DropdownHeader.displayName = 'DropdownHeader';
23
+ export default DropdownHeader;
@@ -1,6 +1,6 @@
1
- import BaseDropdownItem, { DropdownItemProps as BaseDropdownItemProps } from '@restart/ui/DropdownItem';
1
+ import { DropdownItemProps as BaseDropdownItemProps } from '@restart/ui/DropdownItem';
2
2
  import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3
3
  export interface DropdownItemProps extends BaseDropdownItemProps, BsPrefixProps {
4
4
  }
5
- declare const DropdownItem: BsPrefixRefForwardingComponent<typeof BaseDropdownItem, DropdownItemProps>;
5
+ declare const DropdownItem: BsPrefixRefForwardingComponent<'a', DropdownItemProps>;
6
6
  export default DropdownItem;
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import classNames from 'classnames';
2
4
  import * as React from 'react';
3
5
  import { useDropdownItem } from '@restart/ui/DropdownItem';
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import type { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3
+ export interface DropdownItemTextProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
4
+ }
5
+ declare const DropdownItemText: BsPrefixRefForwardingComponent<'span', DropdownItemTextProps>;
6
+ export default DropdownItemText;
@@ -0,0 +1,21 @@
1
+ "use client";
2
+
3
+ import * as React from 'react';
4
+ import classNames from 'classnames';
5
+ import { useBootstrapPrefix } from './ThemeProvider';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ const DropdownItemText = /*#__PURE__*/React.forwardRef(({
8
+ className,
9
+ bsPrefix,
10
+ as: Component = 'span',
11
+ ...props
12
+ }, ref) => {
13
+ bsPrefix = useBootstrapPrefix(bsPrefix, 'dropdown-item-text');
14
+ return /*#__PURE__*/_jsx(Component, {
15
+ ref: ref,
16
+ className: classNames(className, bsPrefix),
17
+ ...props
18
+ });
19
+ });
20
+ DropdownItemText.displayName = 'DropdownItemText';
21
+ export default DropdownItemText;
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import classNames from 'classnames';
2
4
  import * as React from 'react';
3
5
  import { useContext } from 'react';
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import useMergedRefs from '@restart/hooks/useMergedRefs';
2
4
  import DropdownContext from '@restart/ui/DropdownContext';
3
5
  import { useDropdownToggle } from '@restart/ui/DropdownToggle';
package/esm/Figure.d.ts CHANGED
@@ -1,6 +1,9 @@
1
- /// <reference types="react" />
2
- declare const _default: import("./helpers").BsPrefixRefForwardingComponent<"figure", unknown> & {
3
- Image: import("react").ForwardRefExoticComponent<import("./Image").ImageProps & import("react").RefAttributes<HTMLImageElement>>;
4
- Caption: import("./helpers").BsPrefixRefForwardingComponent<"figcaption", unknown>;
1
+ import * as React from 'react';
2
+ import type { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3
+ export interface FigureProps extends BsPrefixProps, React.AnchorHTMLAttributes<HTMLElement> {
4
+ }
5
+ declare const _default: BsPrefixRefForwardingComponent<"figure", FigureProps> & {
6
+ Image: React.ForwardRefExoticComponent<import("./Image").ImageProps & React.RefAttributes<HTMLImageElement>>;
7
+ Caption: BsPrefixRefForwardingComponent<"figcaption", import("./FigureCaption").FigureCaptionProps>;
5
8
  };
6
9
  export default _default;
package/esm/Figure.js CHANGED
@@ -1,9 +1,25 @@
1
- import createWithBsPrefix from './createWithBsPrefix';
1
+ "use client";
2
+
3
+ import * as React from 'react';
4
+ import classNames from 'classnames';
2
5
  import FigureImage from './FigureImage';
3
6
  import FigureCaption from './FigureCaption';
4
- const Figure = createWithBsPrefix('figure', {
5
- Component: 'figure'
7
+ import { useBootstrapPrefix } from './ThemeProvider';
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ const Figure = /*#__PURE__*/React.forwardRef(({
10
+ className,
11
+ bsPrefix,
12
+ as: Component = 'figure',
13
+ ...props
14
+ }, ref) => {
15
+ bsPrefix = useBootstrapPrefix(bsPrefix, 'figure');
16
+ return /*#__PURE__*/_jsx(Component, {
17
+ ref: ref,
18
+ className: classNames(className, bsPrefix),
19
+ ...props
20
+ });
6
21
  });
22
+ Figure.displayName = 'Figure';
7
23
  export default Object.assign(Figure, {
8
24
  Image: FigureImage,
9
25
  Caption: FigureCaption
@@ -1,2 +1,6 @@
1
- declare const FigureCaption: import("./helpers").BsPrefixRefForwardingComponent<"figcaption", unknown>;
1
+ import * as React from 'react';
2
+ import type { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3
+ export interface FigureCaptionProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
4
+ }
5
+ declare const FigureCaption: BsPrefixRefForwardingComponent<'figcaption', FigureCaptionProps>;
2
6
  export default FigureCaption;
@@ -1,5 +1,21 @@
1
- import createWithBsPrefix from './createWithBsPrefix';
2
- const FigureCaption = createWithBsPrefix('figure-caption', {
3
- Component: 'figcaption'
1
+ "use client";
2
+
3
+ import * as React from 'react';
4
+ import classNames from 'classnames';
5
+ import { useBootstrapPrefix } from './ThemeProvider';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ const FigureCaption = /*#__PURE__*/React.forwardRef(({
8
+ className,
9
+ bsPrefix,
10
+ as: Component = 'figcaption',
11
+ ...props
12
+ }, ref) => {
13
+ bsPrefix = useBootstrapPrefix(bsPrefix, 'figure-caption');
14
+ return /*#__PURE__*/_jsx(Component, {
15
+ ref: ref,
16
+ className: classNames(className, bsPrefix),
17
+ ...props
18
+ });
4
19
  });
20
+ FigureCaption.displayName = 'FigureCaption';
5
21
  export default FigureCaption;
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import classNames from 'classnames';
2
4
  import * as React from 'react';
3
5
  import FormGroup from './FormGroup';
package/esm/Form.d.ts CHANGED
@@ -8,7 +8,7 @@ declare const _default: BsPrefixRefForwardingComponent<"form", FormProps> & {
8
8
  Control: BsPrefixRefForwardingComponent<"input", import("./FormControl").FormControlProps> & {
9
9
  Feedback: BsPrefixRefForwardingComponent<"div", import("./Feedback").FeedbackProps>;
10
10
  };
11
- Floating: BsPrefixRefForwardingComponent<"div", unknown>;
11
+ Floating: BsPrefixRefForwardingComponent<"div", import("./FormFloating").FormFloatingProps>;
12
12
  Check: BsPrefixRefForwardingComponent<"input", import("./FormCheck").FormCheckProps> & {
13
13
  Input: BsPrefixRefForwardingComponent<"input", import("./FormCheckInput").FormCheckInputProps>;
14
14
  Label: React.ForwardRefExoticComponent<import("./FormCheckLabel").FormCheckLabelProps & React.RefAttributes<HTMLLabelElement>>;
package/esm/FormCheck.js CHANGED
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import classNames from 'classnames';
2
4
  import * as React from 'react';
3
5
  import { useContext, useMemo } from 'react';
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import classNames from 'classnames';
2
4
  import * as React from 'react';
3
5
  import { useContext } from 'react';
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import classNames from 'classnames';
2
4
  import * as React from 'react';
3
5
  import { useContext } from 'react';
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import * as React from 'react';
2
4
 
3
5
  // TODO
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import classNames from 'classnames';
2
4
  import * as React from 'react';
3
5
  import { useContext } from 'react';
@@ -25,17 +27,6 @@ const FormControl = /*#__PURE__*/React.forwardRef(({
25
27
  controlId
26
28
  } = useContext(FormContext);
27
29
  bsPrefix = useBootstrapPrefix(bsPrefix, 'form-control');
28
- let classes;
29
- if (plaintext) {
30
- classes = {
31
- [`${bsPrefix}-plaintext`]: true
32
- };
33
- } else {
34
- classes = {
35
- [bsPrefix]: true,
36
- [`${bsPrefix}-${size}`]: size
37
- };
38
- }
39
30
  process.env.NODE_ENV !== "production" ? warning(controlId == null || !id, '`controlId` is ignored on `<FormControl>` when `id` is specified.') : void 0;
40
31
  return /*#__PURE__*/_jsx(Component, {
41
32
  ...props,
@@ -44,7 +35,7 @@ const FormControl = /*#__PURE__*/React.forwardRef(({
44
35
  ref: ref,
45
36
  readOnly: readOnly,
46
37
  id: id || controlId,
47
- className: classNames(className, classes, isValid && `is-valid`, isInvalid && `is-invalid`, type === 'color' && `${bsPrefix}-color`)
38
+ className: classNames(className, plaintext ? `${bsPrefix}-plaintext` : bsPrefix, size && `${bsPrefix}-${size}`, type === 'color' && `${bsPrefix}-color`, isValid && 'is-valid', isInvalid && 'is-invalid')
48
39
  });
49
40
  });
50
41
  FormControl.displayName = 'FormControl';
@@ -1,2 +1,6 @@
1
- declare const _default: import("./helpers").BsPrefixRefForwardingComponent<"div", unknown>;
2
- export default _default;
1
+ import * as React from 'react';
2
+ import type { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3
+ export interface FormFloatingProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
4
+ }
5
+ declare const FormFloating: BsPrefixRefForwardingComponent<'div', FormFloatingProps>;
6
+ export default FormFloating;
@@ -1,2 +1,21 @@
1
- import createWithBsPrefix from './createWithBsPrefix';
2
- export default createWithBsPrefix('form-floating');
1
+ "use client";
2
+
3
+ import * as React from 'react';
4
+ import classNames from 'classnames';
5
+ import { useBootstrapPrefix } from './ThemeProvider';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ const FormFloating = /*#__PURE__*/React.forwardRef(({
8
+ className,
9
+ bsPrefix,
10
+ as: Component = 'div',
11
+ ...props
12
+ }, ref) => {
13
+ bsPrefix = useBootstrapPrefix(bsPrefix, 'form-floating');
14
+ return /*#__PURE__*/_jsx(Component, {
15
+ ref: ref,
16
+ className: classNames(className, bsPrefix),
17
+ ...props
18
+ });
19
+ });
20
+ FormFloating.displayName = 'FormFloating';
21
+ export default FormFloating;
package/esm/FormLabel.js CHANGED
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import classNames from 'classnames';
2
4
  import * as React from 'react';
3
5
  import { useContext } from 'react';
package/esm/FormRange.js CHANGED
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import classNames from 'classnames';
2
4
  import * as React from 'react';
3
5
  import { useContext } from 'react';
package/esm/FormSelect.js CHANGED
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import classNames from 'classnames';
2
4
  import * as React from 'react';
3
5
  import { useContext } from 'react';
package/esm/FormText.js CHANGED
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import classNames from 'classnames';
2
4
  import * as React from 'react';
3
5
  import { useBootstrapPrefix } from './ThemeProvider';
package/esm/Image.js CHANGED
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import classNames from 'classnames';
2
4
  import * as React from 'react';
3
5
  import PropTypes from 'prop-types';
@@ -1,12 +1,13 @@
1
1
  import * as React from 'react';
2
+ import { type FormCheckInputProps } from './FormCheckInput';
2
3
  import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3
4
  export interface InputGroupProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
4
5
  size?: 'sm' | 'lg';
5
6
  hasValidation?: boolean;
6
7
  }
7
8
  declare const _default: BsPrefixRefForwardingComponent<"div", InputGroupProps> & {
8
- Text: BsPrefixRefForwardingComponent<"span", unknown>;
9
- Radio: (props: any) => JSX.Element;
10
- Checkbox: (props: any) => JSX.Element;
9
+ Text: BsPrefixRefForwardingComponent<"span", import("./InputGroupText").InputGroupTextProps>;
10
+ Radio: (props: FormCheckInputProps) => JSX.Element;
11
+ Checkbox: (props: FormCheckInputProps) => JSX.Element;
11
12
  };
12
13
  export default _default;
package/esm/InputGroup.js CHANGED
@@ -1,14 +1,13 @@
1
+ "use client";
2
+
1
3
  import classNames from 'classnames';
2
4
  import * as React from 'react';
3
5
  import { useMemo } from 'react';
4
- import createWithBsPrefix from './createWithBsPrefix';
5
6
  import { useBootstrapPrefix } from './ThemeProvider';
6
7
  import FormCheckInput from './FormCheckInput';
7
8
  import InputGroupContext from './InputGroupContext';
9
+ import InputGroupText from './InputGroupText';
8
10
  import { jsx as _jsx } from "react/jsx-runtime";
9
- const InputGroupText = createWithBsPrefix('input-group-text', {
10
- Component: 'span'
11
- });
12
11
  const InputGroupCheckbox = props => /*#__PURE__*/_jsx(InputGroupText, {
13
12
  children: /*#__PURE__*/_jsx(FormCheckInput, {
14
13
  type: "checkbox",
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import * as React from 'react';
2
4
  const context = /*#__PURE__*/React.createContext(null);
3
5
  context.displayName = 'InputGroupContext';
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import type { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3
+ export interface InputGroupTextProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
4
+ }
5
+ declare const InputGroupText: BsPrefixRefForwardingComponent<'span', InputGroupTextProps>;
6
+ export default InputGroupText;
@@ -0,0 +1,21 @@
1
+ "use client";
2
+
3
+ import * as React from 'react';
4
+ import classNames from 'classnames';
5
+ import { useBootstrapPrefix } from './ThemeProvider';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ const InputGroupText = /*#__PURE__*/React.forwardRef(({
8
+ className,
9
+ bsPrefix,
10
+ as: Component = 'span',
11
+ ...props
12
+ }, ref) => {
13
+ bsPrefix = useBootstrapPrefix(bsPrefix, 'input-group-text');
14
+ return /*#__PURE__*/_jsx(Component, {
15
+ ref: ref,
16
+ className: classNames(className, bsPrefix),
17
+ ...props
18
+ });
19
+ });
20
+ InputGroupText.displayName = 'InputGroupText';
21
+ export default InputGroupText;
package/esm/ListGroup.js CHANGED
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import classNames from 'classnames';
2
4
  import * as React from 'react';
3
5
  import warning from 'warning';
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import classNames from 'classnames';
2
4
  import * as React from 'react';
3
5
  import warning from 'warning';
package/esm/Modal.d.ts CHANGED
@@ -15,10 +15,10 @@ export interface ModalProps extends Omit<BaseModalProps, 'role' | 'renderBackdro
15
15
  [other: string]: any;
16
16
  }
17
17
  declare const _default: BsPrefixRefForwardingComponent<"div", ModalProps> & {
18
- Body: BsPrefixRefForwardingComponent<"div", unknown>;
18
+ Body: BsPrefixRefForwardingComponent<"div", import("./ModalBody").ModalBodyProps>;
19
19
  Header: React.ForwardRefExoticComponent<import("./ModalHeader").ModalHeaderProps & React.RefAttributes<HTMLDivElement>>;
20
- Title: BsPrefixRefForwardingComponent<React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>, unknown>;
21
- Footer: BsPrefixRefForwardingComponent<"div", unknown>;
20
+ Title: BsPrefixRefForwardingComponent<"span", import("./ModalTitle").ModalTitleProps>;
21
+ Footer: BsPrefixRefForwardingComponent<"div", import("./ModalFooter").ModalFooterProps>;
22
22
  Dialog: React.ForwardRefExoticComponent<import("./ModalDialog").ModalDialogProps & React.RefAttributes<HTMLDivElement>>;
23
23
  TRANSITION_DURATION: number;
24
24
  BACKDROP_TRANSITION_DURATION: number;
package/esm/Modal.js CHANGED
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import classNames from 'classnames';
2
4
  import addEventListener from 'dom-helpers/addEventListener';
3
5
  import canUseDOM from 'dom-helpers/canUseDOM';
@@ -1,2 +1,6 @@
1
- declare const _default: import("./helpers").BsPrefixRefForwardingComponent<"div", unknown>;
2
- export default _default;
1
+ import * as React from 'react';
2
+ import type { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3
+ export interface ModalBodyProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
4
+ }
5
+ declare const ModalBody: BsPrefixRefForwardingComponent<'div', ModalBodyProps>;
6
+ export default ModalBody;
package/esm/ModalBody.js CHANGED
@@ -1,2 +1,21 @@
1
- import createWithBsPrefix from './createWithBsPrefix';
2
- export default createWithBsPrefix('modal-body');
1
+ "use client";
2
+
3
+ import * as React from 'react';
4
+ import classNames from 'classnames';
5
+ import { useBootstrapPrefix } from './ThemeProvider';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ const ModalBody = /*#__PURE__*/React.forwardRef(({
8
+ className,
9
+ bsPrefix,
10
+ as: Component = 'div',
11
+ ...props
12
+ }, ref) => {
13
+ bsPrefix = useBootstrapPrefix(bsPrefix, 'modal-body');
14
+ return /*#__PURE__*/_jsx(Component, {
15
+ ref: ref,
16
+ className: classNames(className, bsPrefix),
17
+ ...props
18
+ });
19
+ });
20
+ ModalBody.displayName = 'ModalBody';
21
+ export default ModalBody;
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import * as React from 'react';
2
4
  const ModalContext = /*#__PURE__*/React.createContext({
3
5
  // eslint-disable-next-line @typescript-eslint/no-empty-function
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import classNames from 'classnames';
2
4
  import * as React from 'react';
3
5
  import { useBootstrapPrefix } from './ThemeProvider';
@@ -1,2 +1,6 @@
1
- declare const _default: import("./helpers").BsPrefixRefForwardingComponent<"div", unknown>;
2
- export default _default;
1
+ import * as React from 'react';
2
+ import type { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3
+ export interface ModalFooterProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
4
+ }
5
+ declare const ModalFooter: BsPrefixRefForwardingComponent<'div', ModalFooterProps>;
6
+ export default ModalFooter;
@@ -1,2 +1,21 @@
1
- import createWithBsPrefix from './createWithBsPrefix';
2
- export default createWithBsPrefix('modal-footer');
1
+ "use client";
2
+
3
+ import * as React from 'react';
4
+ import classNames from 'classnames';
5
+ import { useBootstrapPrefix } from './ThemeProvider';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ const ModalFooter = /*#__PURE__*/React.forwardRef(({
8
+ className,
9
+ bsPrefix,
10
+ as: Component = 'div',
11
+ ...props
12
+ }, ref) => {
13
+ bsPrefix = useBootstrapPrefix(bsPrefix, 'modal-footer');
14
+ return /*#__PURE__*/_jsx(Component, {
15
+ ref: ref,
16
+ className: classNames(className, bsPrefix),
17
+ ...props
18
+ });
19
+ });
20
+ ModalFooter.displayName = 'ModalFooter';
21
+ export default ModalFooter;
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  import classNames from 'classnames';
2
4
  import * as React from 'react';
3
5
  import { useBootstrapPrefix } from './ThemeProvider';
@@ -1,3 +1,6 @@
1
- /// <reference types="react" />
2
- declare const _default: import("./helpers").BsPrefixRefForwardingComponent<import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>, unknown>;
3
- export default _default;
1
+ import * as React from 'react';
2
+ import type { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3
+ export interface ModalTitleProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
4
+ }
5
+ declare const ModalTitle: BsPrefixRefForwardingComponent<'span', ModalTitleProps>;
6
+ export default ModalTitle;