react-bootstrap 2.9.0-beta.0 → 2.9.0

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 (185) 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/Alert.d.ts +2 -2
  16. package/cjs/Alert.js +4 -13
  17. package/cjs/AlertHeading.d.ts +6 -0
  18. package/cjs/AlertHeading.js +32 -0
  19. package/cjs/AlertLink.d.ts +6 -0
  20. package/cjs/AlertLink.js +30 -0
  21. package/cjs/Card.d.ts +7 -7
  22. package/cjs/Card.js +16 -28
  23. package/cjs/CardBody.d.ts +6 -0
  24. package/cjs/CardBody.js +29 -0
  25. package/cjs/CardFooter.d.ts +6 -0
  26. package/cjs/CardFooter.js +29 -0
  27. package/cjs/CardGroup.d.ts +6 -2
  28. package/cjs/CardGroup.js +22 -2
  29. package/cjs/CardImgOverlay.d.ts +6 -0
  30. package/cjs/CardImgOverlay.js +29 -0
  31. package/cjs/CardLink.d.ts +6 -0
  32. package/cjs/CardLink.js +29 -0
  33. package/cjs/CardSubtitle.d.ts +6 -0
  34. package/cjs/CardSubtitle.js +31 -0
  35. package/cjs/CardText.d.ts +6 -0
  36. package/cjs/CardText.js +29 -0
  37. package/cjs/CardTitle.d.ts +6 -0
  38. package/cjs/CardTitle.js +31 -0
  39. package/cjs/Carousel.d.ts +1 -1
  40. package/cjs/CarouselCaption.d.ts +6 -2
  41. package/cjs/CarouselCaption.js +22 -2
  42. package/cjs/Dropdown.d.ts +4 -4
  43. package/cjs/Dropdown.js +6 -18
  44. package/cjs/DropdownDivider.d.ts +6 -0
  45. package/cjs/DropdownDivider.js +31 -0
  46. package/cjs/DropdownHeader.d.ts +6 -0
  47. package/cjs/DropdownHeader.js +31 -0
  48. package/cjs/DropdownItem.d.ts +2 -2
  49. package/cjs/DropdownItemText.d.ts +6 -0
  50. package/cjs/DropdownItemText.js +29 -0
  51. package/cjs/Figure.d.ts +7 -4
  52. package/cjs/Figure.js +20 -3
  53. package/cjs/FigureCaption.d.ts +5 -1
  54. package/cjs/FigureCaption.js +20 -3
  55. package/cjs/Form.d.ts +1 -1
  56. package/cjs/FormControl.js +1 -12
  57. package/cjs/FormFloating.d.ts +6 -2
  58. package/cjs/FormFloating.js +22 -2
  59. package/cjs/InputGroup.d.ts +4 -3
  60. package/cjs/InputGroup.js +4 -7
  61. package/cjs/InputGroupText.d.ts +6 -0
  62. package/cjs/InputGroupText.js +29 -0
  63. package/cjs/Modal.d.ts +3 -3
  64. package/cjs/ModalBody.d.ts +6 -2
  65. package/cjs/ModalBody.js +22 -2
  66. package/cjs/ModalFooter.d.ts +6 -2
  67. package/cjs/ModalFooter.js +22 -2
  68. package/cjs/ModalTitle.d.ts +6 -3
  69. package/cjs/ModalTitle.js +21 -3
  70. package/cjs/Nav.d.ts +1 -1
  71. package/cjs/NavDropdown.d.ts +4 -4
  72. package/cjs/NavItem.d.ts +6 -2
  73. package/cjs/NavItem.js +22 -2
  74. package/cjs/Navbar.d.ts +1 -1
  75. package/cjs/Navbar.js +2 -5
  76. package/cjs/NavbarText.d.ts +6 -0
  77. package/cjs/NavbarText.js +29 -0
  78. package/cjs/Offcanvas.d.ts +2 -2
  79. package/cjs/OffcanvasBody.d.ts +6 -2
  80. package/cjs/OffcanvasBody.js +22 -2
  81. package/cjs/OffcanvasTitle.d.ts +6 -3
  82. package/cjs/OffcanvasTitle.js +21 -3
  83. package/cjs/Overlay.js +3 -2
  84. package/cjs/Popover.d.ts +2 -2
  85. package/cjs/PopoverBody.d.ts +6 -2
  86. package/cjs/PopoverBody.js +22 -2
  87. package/cjs/PopoverHeader.d.ts +6 -2
  88. package/cjs/PopoverHeader.js +22 -2
  89. package/cjs/Tab.d.ts +1 -1
  90. package/cjs/TabContent.d.ts +6 -2
  91. package/cjs/TabContent.js +22 -2
  92. package/cjs/Toast.d.ts +3 -3
  93. package/cjs/Toast.js +12 -0
  94. package/cjs/ToastBody.d.ts +6 -2
  95. package/cjs/ToastBody.js +22 -2
  96. package/cjs/ToggleButton.d.ts +1 -0
  97. package/cjs/index.d.ts +71 -9
  98. package/cjs/index.js +68 -15
  99. package/dist/react-bootstrap.js +1115 -452
  100. package/dist/react-bootstrap.min.js +1 -1
  101. package/esm/Alert.d.ts +2 -2
  102. package/esm/Alert.js +2 -11
  103. package/esm/AlertHeading.d.ts +6 -0
  104. package/esm/AlertHeading.js +24 -0
  105. package/esm/AlertLink.d.ts +6 -0
  106. package/esm/AlertLink.js +22 -0
  107. package/esm/Card.d.ts +7 -7
  108. package/esm/Card.js +8 -20
  109. package/esm/CardBody.d.ts +6 -0
  110. package/esm/CardBody.js +21 -0
  111. package/esm/CardFooter.d.ts +6 -0
  112. package/esm/CardFooter.js +21 -0
  113. package/esm/CardGroup.d.ts +6 -2
  114. package/esm/CardGroup.js +21 -2
  115. package/esm/CardImgOverlay.d.ts +6 -0
  116. package/esm/CardImgOverlay.js +21 -0
  117. package/esm/CardLink.d.ts +6 -0
  118. package/esm/CardLink.js +21 -0
  119. package/esm/CardSubtitle.d.ts +6 -0
  120. package/esm/CardSubtitle.js +23 -0
  121. package/esm/CardText.d.ts +6 -0
  122. package/esm/CardText.js +21 -0
  123. package/esm/CardTitle.d.ts +6 -0
  124. package/esm/CardTitle.js +23 -0
  125. package/esm/Carousel.d.ts +1 -1
  126. package/esm/CarouselCaption.d.ts +6 -2
  127. package/esm/CarouselCaption.js +21 -2
  128. package/esm/Dropdown.d.ts +4 -4
  129. package/esm/Dropdown.js +3 -15
  130. package/esm/DropdownDivider.d.ts +6 -0
  131. package/esm/DropdownDivider.js +23 -0
  132. package/esm/DropdownHeader.d.ts +6 -0
  133. package/esm/DropdownHeader.js +23 -0
  134. package/esm/DropdownItem.d.ts +2 -2
  135. package/esm/DropdownItemText.d.ts +6 -0
  136. package/esm/DropdownItemText.js +21 -0
  137. package/esm/Figure.d.ts +7 -4
  138. package/esm/Figure.js +19 -3
  139. package/esm/FigureCaption.d.ts +5 -1
  140. package/esm/FigureCaption.js +19 -3
  141. package/esm/Form.d.ts +1 -1
  142. package/esm/FormControl.js +1 -12
  143. package/esm/FormFloating.d.ts +6 -2
  144. package/esm/FormFloating.js +21 -2
  145. package/esm/InputGroup.d.ts +4 -3
  146. package/esm/InputGroup.js +1 -4
  147. package/esm/InputGroupText.d.ts +6 -0
  148. package/esm/InputGroupText.js +21 -0
  149. package/esm/Modal.d.ts +3 -3
  150. package/esm/ModalBody.d.ts +6 -2
  151. package/esm/ModalBody.js +21 -2
  152. package/esm/ModalFooter.d.ts +6 -2
  153. package/esm/ModalFooter.js +21 -2
  154. package/esm/ModalTitle.d.ts +6 -3
  155. package/esm/ModalTitle.js +21 -4
  156. package/esm/Nav.d.ts +1 -1
  157. package/esm/NavDropdown.d.ts +4 -4
  158. package/esm/NavItem.d.ts +6 -2
  159. package/esm/NavItem.js +21 -2
  160. package/esm/Navbar.d.ts +1 -1
  161. package/esm/Navbar.js +1 -4
  162. package/esm/NavbarText.d.ts +6 -0
  163. package/esm/NavbarText.js +21 -0
  164. package/esm/Offcanvas.d.ts +2 -2
  165. package/esm/OffcanvasBody.d.ts +6 -2
  166. package/esm/OffcanvasBody.js +21 -2
  167. package/esm/OffcanvasTitle.d.ts +6 -3
  168. package/esm/OffcanvasTitle.js +21 -4
  169. package/esm/Overlay.js +3 -2
  170. package/esm/Popover.d.ts +2 -2
  171. package/esm/PopoverBody.d.ts +6 -2
  172. package/esm/PopoverBody.js +21 -2
  173. package/esm/PopoverHeader.d.ts +6 -2
  174. package/esm/PopoverHeader.js +21 -2
  175. package/esm/Tab.d.ts +1 -1
  176. package/esm/TabContent.d.ts +6 -2
  177. package/esm/TabContent.js +21 -2
  178. package/esm/Toast.d.ts +3 -3
  179. package/esm/Toast.js +12 -0
  180. package/esm/ToastBody.d.ts +6 -2
  181. package/esm/ToastBody.js +21 -2
  182. package/esm/ToggleButton.d.ts +1 -0
  183. package/esm/index.d.ts +71 -9
  184. package/esm/index.js +33 -7
  185. package/package.json +1 -1
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;
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>>;
@@ -27,17 +27,6 @@ const FormControl = /*#__PURE__*/React.forwardRef(({
27
27
  controlId
28
28
  } = useContext(FormContext);
29
29
  bsPrefix = useBootstrapPrefix(bsPrefix, 'form-control');
30
- let classes;
31
- if (plaintext) {
32
- classes = {
33
- [`${bsPrefix}-plaintext`]: true
34
- };
35
- } else {
36
- classes = {
37
- [bsPrefix]: true,
38
- [`${bsPrefix}-${size}`]: size
39
- };
40
- }
41
30
  process.env.NODE_ENV !== "production" ? warning(controlId == null || !id, '`controlId` is ignored on `<FormControl>` when `id` is specified.') : void 0;
42
31
  return /*#__PURE__*/_jsx(Component, {
43
32
  ...props,
@@ -46,7 +35,7 @@ const FormControl = /*#__PURE__*/React.forwardRef(({
46
35
  ref: ref,
47
36
  readOnly: readOnly,
48
37
  id: id || controlId,
49
- 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')
50
39
  });
51
40
  });
52
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;
@@ -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
@@ -3,14 +3,11 @@
3
3
  import classNames from 'classnames';
4
4
  import * as React from 'react';
5
5
  import { useMemo } from 'react';
6
- import createWithBsPrefix from './createWithBsPrefix';
7
6
  import { useBootstrapPrefix } from './ThemeProvider';
8
7
  import FormCheckInput from './FormCheckInput';
9
8
  import InputGroupContext from './InputGroupContext';
9
+ import InputGroupText from './InputGroupText';
10
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
- const InputGroupText = createWithBsPrefix('input-group-text', {
12
- Component: 'span'
13
- });
14
11
  const InputGroupCheckbox = props => /*#__PURE__*/_jsx(InputGroupText, {
15
12
  children: /*#__PURE__*/_jsx(FormCheckInput, {
16
13
  type: "checkbox",
@@ -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/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;
@@ -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,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,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;
package/esm/ModalTitle.js CHANGED
@@ -1,6 +1,23 @@
1
- import createWithBsPrefix from './createWithBsPrefix';
1
+ "use client";
2
+
3
+ import * as React from 'react';
4
+ import classNames from 'classnames';
2
5
  import divWithClassName from './divWithClassName';
6
+ import { useBootstrapPrefix } from './ThemeProvider';
7
+ import { jsx as _jsx } from "react/jsx-runtime";
3
8
  const DivStyledAsH4 = divWithClassName('h4');
4
- export default createWithBsPrefix('modal-title', {
5
- Component: DivStyledAsH4
6
- });
9
+ const ModalTitle = /*#__PURE__*/React.forwardRef(({
10
+ className,
11
+ bsPrefix,
12
+ as: Component = DivStyledAsH4,
13
+ ...props
14
+ }, ref) => {
15
+ bsPrefix = useBootstrapPrefix(bsPrefix, 'modal-title');
16
+ return /*#__PURE__*/_jsx(Component, {
17
+ ref: ref,
18
+ className: classNames(className, bsPrefix),
19
+ ...props
20
+ });
21
+ });
22
+ ModalTitle.displayName = 'ModalTitle';
23
+ export default ModalTitle;
package/esm/Nav.d.ts CHANGED
@@ -12,7 +12,7 @@ export interface NavProps extends BsPrefixProps, BaseNavProps {
12
12
  navbarScroll?: boolean;
13
13
  }
14
14
  declare const _default: BsPrefixRefForwardingComponent<"div", NavProps> & {
15
- Item: BsPrefixRefForwardingComponent<"div", unknown>;
15
+ Item: BsPrefixRefForwardingComponent<"div", import("./NavItem").NavItemProps>;
16
16
  Link: BsPrefixRefForwardingComponent<"a", import("./NavLink").NavLinkProps>;
17
17
  };
18
18
  export default _default;
@@ -12,9 +12,9 @@ export interface NavDropdownProps extends Omit<DropdownProps, 'title'> {
12
12
  menuVariant?: DropdownMenuVariant;
13
13
  }
14
14
  declare const _default: BsPrefixRefForwardingComponent<"div", NavDropdownProps> & {
15
- Item: BsPrefixRefForwardingComponent<import("@restart/ui/esm/types").DynamicRefForwardingComponent<React.ForwardRefExoticComponent<import("@restart/ui/esm/Button").ButtonProps & React.RefAttributes<HTMLElement>>, import("@restart/ui/esm/DropdownItem").DropdownItemProps>, import("./DropdownItem").DropdownItemProps>;
16
- ItemText: BsPrefixRefForwardingComponent<"span", unknown>;
17
- Divider: BsPrefixRefForwardingComponent<"hr", unknown>;
18
- Header: BsPrefixRefForwardingComponent<"div", unknown>;
15
+ Item: BsPrefixRefForwardingComponent<"a", import("./DropdownItem").DropdownItemProps>;
16
+ ItemText: BsPrefixRefForwardingComponent<"span", import("./DropdownItemText").DropdownItemTextProps>;
17
+ Divider: BsPrefixRefForwardingComponent<"hr", import("./DropdownDivider").DropdownDividerProps>;
18
+ Header: BsPrefixRefForwardingComponent<"div", import("./DropdownHeader").DropdownHeaderProps>;
19
19
  };
20
20
  export default _default;
package/esm/NavItem.d.ts CHANGED
@@ -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 NavItemProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
4
+ }
5
+ declare const NavItem: BsPrefixRefForwardingComponent<'div', NavItemProps>;
6
+ export default NavItem;
package/esm/NavItem.js CHANGED
@@ -1,2 +1,21 @@
1
- import createWithBsPrefix from './createWithBsPrefix';
2
- export default createWithBsPrefix('nav-item');
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 NavItem = /*#__PURE__*/React.forwardRef(({
8
+ className,
9
+ bsPrefix,
10
+ as: Component = 'div',
11
+ ...props
12
+ }, ref) => {
13
+ bsPrefix = useBootstrapPrefix(bsPrefix, 'nav-item');
14
+ return /*#__PURE__*/_jsx(Component, {
15
+ ref: ref,
16
+ className: classNames(className, bsPrefix),
17
+ ...props
18
+ });
19
+ });
20
+ NavItem.displayName = 'NavItem';
21
+ export default NavItem;
package/esm/Navbar.d.ts CHANGED
@@ -16,7 +16,7 @@ declare const _default: BsPrefixRefForwardingComponent<"nav", NavbarProps> & {
16
16
  Brand: BsPrefixRefForwardingComponent<"a", import("./NavbarBrand").NavbarBrandProps>;
17
17
  Collapse: React.ForwardRefExoticComponent<import("./NavbarCollapse").NavbarCollapseProps & React.RefAttributes<HTMLDivElement>>;
18
18
  Offcanvas: React.ForwardRefExoticComponent<Omit<import("./NavbarOffcanvas").NavbarOffcanvasProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
19
- Text: BsPrefixRefForwardingComponent<"span", unknown>;
19
+ Text: BsPrefixRefForwardingComponent<"span", import("./NavbarText").NavbarTextProps>;
20
20
  Toggle: BsPrefixRefForwardingComponent<"button", import("./NavbarToggle").NavbarToggleProps>;
21
21
  };
22
22
  export default _default;
package/esm/Navbar.js CHANGED
@@ -5,17 +5,14 @@ import * as React from 'react';
5
5
  import { useCallback, useMemo } from 'react';
6
6
  import SelectableContext from '@restart/ui/SelectableContext';
7
7
  import { useUncontrolled } from 'uncontrollable';
8
- import createWithBsPrefix from './createWithBsPrefix';
9
8
  import NavbarBrand from './NavbarBrand';
10
9
  import NavbarCollapse from './NavbarCollapse';
11
10
  import NavbarToggle from './NavbarToggle';
12
11
  import NavbarOffcanvas from './NavbarOffcanvas';
13
12
  import { useBootstrapPrefix } from './ThemeProvider';
14
13
  import NavbarContext from './NavbarContext';
14
+ import NavbarText from './NavbarText';
15
15
  import { jsx as _jsx } from "react/jsx-runtime";
16
- const NavbarText = createWithBsPrefix('navbar-text', {
17
- Component: 'span'
18
- });
19
16
  const Navbar = /*#__PURE__*/React.forwardRef((props, ref) => {
20
17
  const {
21
18
  bsPrefix: initialBsPrefix,
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import type { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3
+ export interface NavbarTextProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
4
+ }
5
+ declare const NavbarText: BsPrefixRefForwardingComponent<'span', NavbarTextProps>;
6
+ export default NavbarText;
@@ -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 NavbarText = /*#__PURE__*/React.forwardRef(({
8
+ className,
9
+ bsPrefix,
10
+ as: Component = 'span',
11
+ ...props
12
+ }, ref) => {
13
+ bsPrefix = useBootstrapPrefix(bsPrefix, 'navbar-text');
14
+ return /*#__PURE__*/_jsx(Component, {
15
+ ref: ref,
16
+ className: classNames(className, bsPrefix),
17
+ ...props
18
+ });
19
+ });
20
+ NavbarText.displayName = 'NavbarText';
21
+ export default NavbarText;
@@ -11,8 +11,8 @@ export interface OffcanvasProps extends Omit<BaseModalProps, 'role' | 'renderBac
11
11
  renderStaticNode?: boolean;
12
12
  }
13
13
  declare const _default: BsPrefixRefForwardingComponent<"div", OffcanvasProps> & {
14
- Body: BsPrefixRefForwardingComponent<"div", unknown>;
14
+ Body: BsPrefixRefForwardingComponent<"div", import("./OffcanvasBody").OffcanvasBodyProps>;
15
15
  Header: React.ForwardRefExoticComponent<import("./OffcanvasHeader").OffcanvasHeaderProps & React.RefAttributes<HTMLDivElement>>;
16
- Title: BsPrefixRefForwardingComponent<React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>, unknown>;
16
+ Title: BsPrefixRefForwardingComponent<"div", import("./OffcanvasTitle").OffcanvasTitleProps>;
17
17
  };
18
18
  export default _default;
@@ -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 OffcanvasBodyProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
4
+ }
5
+ declare const OffcanvasBody: BsPrefixRefForwardingComponent<'div', OffcanvasBodyProps>;
6
+ export default OffcanvasBody;
@@ -1,2 +1,21 @@
1
- import createWithBsPrefix from './createWithBsPrefix';
2
- export default createWithBsPrefix('offcanvas-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 OffcanvasBody = /*#__PURE__*/React.forwardRef(({
8
+ className,
9
+ bsPrefix,
10
+ as: Component = 'div',
11
+ ...props
12
+ }, ref) => {
13
+ bsPrefix = useBootstrapPrefix(bsPrefix, 'offcanvas-body');
14
+ return /*#__PURE__*/_jsx(Component, {
15
+ ref: ref,
16
+ className: classNames(className, bsPrefix),
17
+ ...props
18
+ });
19
+ });
20
+ OffcanvasBody.displayName = 'OffcanvasBody';
21
+ export default OffcanvasBody;
@@ -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 OffcanvasTitleProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
4
+ }
5
+ declare const OffcanvasTitle: BsPrefixRefForwardingComponent<'div', OffcanvasTitleProps>;
6
+ export default OffcanvasTitle;
@@ -1,6 +1,23 @@
1
- import createWithBsPrefix from './createWithBsPrefix';
1
+ "use client";
2
+
3
+ import * as React from 'react';
4
+ import classNames from 'classnames';
2
5
  import divWithClassName from './divWithClassName';
6
+ import { useBootstrapPrefix } from './ThemeProvider';
7
+ import { jsx as _jsx } from "react/jsx-runtime";
3
8
  const DivStyledAsH5 = divWithClassName('h5');
4
- export default createWithBsPrefix('offcanvas-title', {
5
- Component: DivStyledAsH5
6
- });
9
+ const OffcanvasTitle = /*#__PURE__*/React.forwardRef(({
10
+ className,
11
+ bsPrefix,
12
+ as: Component = DivStyledAsH5,
13
+ ...props
14
+ }, ref) => {
15
+ bsPrefix = useBootstrapPrefix(bsPrefix, 'offcanvas-title');
16
+ return /*#__PURE__*/_jsx(Component, {
17
+ ref: ref,
18
+ className: classNames(className, bsPrefix),
19
+ ...props
20
+ });
21
+ });
22
+ OffcanvasTitle.displayName = 'OffcanvasTitle';
23
+ export default OffcanvasTitle;
package/esm/Overlay.js CHANGED
@@ -40,10 +40,11 @@ const Overlay = /*#__PURE__*/React.forwardRef(({
40
40
  popperConfig == null ? void 0 : popperConfig.onFirstUpdate == null ? void 0 : popperConfig.onFirstUpdate(state);
41
41
  });
42
42
  useIsomorphicEffect(() => {
43
- if (firstRenderedState) {
43
+ if (firstRenderedState && outerProps.target) {
44
+ // Must wait for target element to resolve before updating popper.
44
45
  popperRef.current.scheduleUpdate == null ? void 0 : popperRef.current.scheduleUpdate();
45
46
  }
46
- }, [firstRenderedState]);
47
+ }, [firstRenderedState, outerProps.target]);
47
48
  useEffect(() => {
48
49
  if (!outerShow) {
49
50
  setFirstRenderedState(null);
package/esm/Popover.d.ts CHANGED
@@ -12,8 +12,8 @@ export interface PopoverProps extends React.HTMLAttributes<HTMLDivElement>, BsPr
12
12
  hasDoneInitialMeasure?: boolean;
13
13
  }
14
14
  declare const _default: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLDivElement>> & {
15
- Header: import("./helpers").BsPrefixRefForwardingComponent<"div", unknown>;
16
- Body: import("./helpers").BsPrefixRefForwardingComponent<"div", unknown>;
15
+ Header: import("./helpers").BsPrefixRefForwardingComponent<"div", import("./PopoverHeader").PopoverHeaderProps>;
16
+ Body: import("./helpers").BsPrefixRefForwardingComponent<"div", import("./PopoverBody").PopoverBodyProps>;
17
17
  POPPER_OFFSET: readonly [0, 8];
18
18
  };
19
19
  export default _default;
@@ -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 PopoverBodyProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
4
+ }
5
+ declare const PopoverBody: BsPrefixRefForwardingComponent<'div', PopoverBodyProps>;
6
+ export default PopoverBody;
@@ -1,2 +1,21 @@
1
- import createWithBsPrefix from './createWithBsPrefix';
2
- export default createWithBsPrefix('popover-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 PopoverBody = /*#__PURE__*/React.forwardRef(({
8
+ className,
9
+ bsPrefix,
10
+ as: Component = 'div',
11
+ ...props
12
+ }, ref) => {
13
+ bsPrefix = useBootstrapPrefix(bsPrefix, 'popover-body');
14
+ return /*#__PURE__*/_jsx(Component, {
15
+ ref: ref,
16
+ className: classNames(className, bsPrefix),
17
+ ...props
18
+ });
19
+ });
20
+ PopoverBody.displayName = 'PopoverBody';
21
+ export default PopoverBody;
@@ -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 PopoverHeaderProps extends BsPrefixProps, React.HTMLAttributes<HTMLElement> {
4
+ }
5
+ declare const PopoverHeader: BsPrefixRefForwardingComponent<'div', PopoverHeaderProps>;
6
+ export default PopoverHeader;
@@ -1,2 +1,21 @@
1
- import createWithBsPrefix from './createWithBsPrefix';
2
- export default createWithBsPrefix('popover-header');
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 PopoverHeader = /*#__PURE__*/React.forwardRef(({
8
+ className,
9
+ bsPrefix,
10
+ as: Component = 'div',
11
+ ...props
12
+ }, ref) => {
13
+ bsPrefix = useBootstrapPrefix(bsPrefix, 'popover-header');
14
+ return /*#__PURE__*/_jsx(Component, {
15
+ ref: ref,
16
+ className: classNames(className, bsPrefix),
17
+ ...props
18
+ });
19
+ });
20
+ PopoverHeader.displayName = 'PopoverHeader';
21
+ export default PopoverHeader;