react-bootstrap 2.5.0-beta.1 → 2.6.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 (87) hide show
  1. package/cjs/AbstractNav.d.ts +15 -0
  2. package/cjs/AbstractNavItem.d.ts +19 -0
  3. package/cjs/AccordionCollapse.d.ts +3 -0
  4. package/cjs/AccordionCollapse.js +3 -0
  5. package/cjs/AccordionToggle.d.ts +11 -0
  6. package/cjs/CardColumns.d.ts +2 -0
  7. package/cjs/CardContext.d.ts +6 -0
  8. package/cjs/CardDeck.d.ts +2 -0
  9. package/cjs/CardImg.d.ts +1 -1
  10. package/cjs/Carousel.d.ts +1 -1
  11. package/cjs/CloseButton.d.ts +1 -1
  12. package/cjs/CloseButton.js +3 -0
  13. package/cjs/Form.d.ts +6 -6
  14. package/cjs/FormFile.d.ts +23 -0
  15. package/cjs/FormFileInput.d.ts +10 -0
  16. package/cjs/FormFileLabel.d.ts +7 -0
  17. package/cjs/Jumbotron.d.ts +7 -0
  18. package/cjs/ListGroup.d.ts +1 -1
  19. package/cjs/ListGroupItem.js +3 -0
  20. package/cjs/Media.d.ts +8 -0
  21. package/cjs/Modal.js +1 -1
  22. package/cjs/Nav.d.ts +1 -1
  23. package/cjs/Navbar.d.ts +1 -1
  24. package/cjs/NavbarOffcanvas.js +2 -1
  25. package/cjs/Offcanvas.d.ts +1 -0
  26. package/cjs/Offcanvas.js +4 -2
  27. package/cjs/OverlayTrigger.d.ts +5 -5
  28. package/cjs/PageItem.js +0 -1
  29. package/cjs/PopoverContent.d.ts +5 -0
  30. package/cjs/PopoverTitle.d.ts +5 -0
  31. package/cjs/ResponsiveEmbed.d.ts +9 -0
  32. package/cjs/SafeAnchor.d.ts +17 -0
  33. package/cjs/SelectableContext.d.ts +5 -0
  34. package/cjs/Spinner.d.ts +1 -1
  35. package/cjs/Spinner.js +1 -1
  36. package/cjs/Tab.d.ts +2 -2
  37. package/cjs/TabContainer.d.ts +2 -2
  38. package/cjs/TabContext.d.ts +12 -0
  39. package/cjs/Tabs.d.ts +3 -3
  40. package/cjs/safeFindDOMNode.d.ts +1 -1
  41. package/cjs/types.d.ts +1 -1
  42. package/cjs/usePopperMarginModifiers.d.ts +4 -0
  43. package/dist/react-bootstrap.js +125 -275
  44. package/dist/react-bootstrap.min.js +1 -1
  45. package/esm/AbstractNav.d.ts +15 -0
  46. package/esm/AbstractNavItem.d.ts +19 -0
  47. package/esm/AccordionCollapse.d.ts +3 -0
  48. package/esm/AccordionCollapse.js +4 -0
  49. package/esm/AccordionToggle.d.ts +11 -0
  50. package/esm/CardColumns.d.ts +2 -0
  51. package/esm/CardContext.d.ts +6 -0
  52. package/esm/CardDeck.d.ts +2 -0
  53. package/esm/CardImg.d.ts +1 -1
  54. package/esm/Carousel.d.ts +1 -1
  55. package/esm/CloseButton.d.ts +1 -1
  56. package/esm/CloseButton.js +3 -0
  57. package/esm/Form.d.ts +6 -6
  58. package/esm/FormFile.d.ts +23 -0
  59. package/esm/FormFileInput.d.ts +10 -0
  60. package/esm/FormFileLabel.d.ts +7 -0
  61. package/esm/Jumbotron.d.ts +7 -0
  62. package/esm/ListGroup.d.ts +1 -1
  63. package/esm/ListGroupItem.js +2 -0
  64. package/esm/Media.d.ts +8 -0
  65. package/esm/Modal.js +1 -1
  66. package/esm/Nav.d.ts +1 -1
  67. package/esm/Navbar.d.ts +1 -1
  68. package/esm/NavbarOffcanvas.js +2 -1
  69. package/esm/Offcanvas.d.ts +1 -0
  70. package/esm/Offcanvas.js +4 -2
  71. package/esm/OverlayTrigger.d.ts +5 -5
  72. package/esm/PageItem.js +0 -1
  73. package/esm/PopoverContent.d.ts +5 -0
  74. package/esm/PopoverTitle.d.ts +5 -0
  75. package/esm/ResponsiveEmbed.d.ts +9 -0
  76. package/esm/SafeAnchor.d.ts +17 -0
  77. package/esm/SelectableContext.d.ts +5 -0
  78. package/esm/Spinner.d.ts +1 -1
  79. package/esm/Spinner.js +1 -1
  80. package/esm/Tab.d.ts +2 -2
  81. package/esm/TabContainer.d.ts +2 -2
  82. package/esm/TabContext.d.ts +12 -0
  83. package/esm/Tabs.d.ts +3 -3
  84. package/esm/safeFindDOMNode.d.ts +1 -1
  85. package/esm/types.d.ts +1 -1
  86. package/esm/usePopperMarginModifiers.d.ts +4 -0
  87. package/package.json +2 -2
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { BsPrefixRefForwardingComponent } from './helpers';
3
+ interface AbstractNavProps {
4
+ activeKey?: any;
5
+ as?: React.ElementType;
6
+ getControlledId?: any;
7
+ getControllerId?: any;
8
+ onKeyDown?: any;
9
+ onSelect?: any;
10
+ parentOnSelect?: any;
11
+ role?: string;
12
+ }
13
+ declare type AbstractNav = BsPrefixRefForwardingComponent<'ul', AbstractNavProps>;
14
+ declare const AbstractNav: AbstractNav;
15
+ export default AbstractNav;
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import { BsPrefixRefForwardingComponent } from './helpers';
3
+ import { EventKey } from './types';
4
+ interface AbstractNavItemProps {
5
+ active?: boolean;
6
+ as: React.ElementType;
7
+ className?: string;
8
+ disabled?: boolean;
9
+ eventKey?: EventKey;
10
+ href?: string;
11
+ role?: string;
12
+ id?: string;
13
+ tabIndex?: number;
14
+ onClick?: (e: any) => void;
15
+ onSelect?: (navKey: string, e: any) => void;
16
+ }
17
+ declare type AbstractNavItem = BsPrefixRefForwardingComponent<'div', AbstractNavItemProps>;
18
+ declare const AbstractNavItem: AbstractNavItem;
19
+ export default AbstractNavItem;
@@ -3,5 +3,8 @@ import { BsPrefixRefForwardingComponent, BsPrefixProps } from './helpers';
3
3
  export interface AccordionCollapseProps extends BsPrefixProps, CollapseProps {
4
4
  eventKey: string;
5
5
  }
6
+ /**
7
+ * This component accepts all of [`Collapse`'s props](/utilities/transitions/#collapse-props).
8
+ */
6
9
  declare const AccordionCollapse: BsPrefixRefForwardingComponent<'div', AccordionCollapseProps>;
7
10
  export default AccordionCollapse;
@@ -5,6 +5,10 @@ import { useBootstrapPrefix } from './ThemeProvider';
5
5
  import Collapse from './Collapse';
6
6
  import AccordionContext, { isAccordionItemSelected } from './AccordionContext';
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
+
9
+ /**
10
+ * This component accepts all of [`Collapse`'s props](/utilities/transitions/#collapse-props).
11
+ */
8
12
  const AccordionCollapse = /*#__PURE__*/React.forwardRef(({
9
13
  as: Component = 'div',
10
14
  bsPrefix,
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { BsPrefixPropsWithChildren, BsPrefixRefForwardingComponent } from './helpers';
3
+ declare type EventHandler = React.EventHandler<React.SyntheticEvent>;
4
+ export interface AccordionToggleProps extends BsPrefixPropsWithChildren {
5
+ eventKey: string;
6
+ onClick?: EventHandler;
7
+ }
8
+ declare type AccordionToggle = BsPrefixRefForwardingComponent<'div', AccordionToggleProps>;
9
+ export declare function useAccordionToggle(eventKey: string, onClick?: EventHandler): EventHandler;
10
+ declare const AccordionToggle: AccordionToggle;
11
+ export default AccordionToggle;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("./helpers").BsPrefixRefForwardingComponent<"div", unknown>;
2
+ export default _default;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface CardContextType {
3
+ cardHeaderBsPrefix: string;
4
+ }
5
+ declare const context: React.Context<CardContextType | null>;
6
+ export default context;
@@ -0,0 +1,2 @@
1
+ declare const _default: import("./helpers").BsPrefixRefForwardingComponent<"div", unknown>;
2
+ export default _default;
package/esm/CardImg.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3
3
  export interface CardImgProps extends BsPrefixProps, React.ImgHTMLAttributes<HTMLImageElement> {
4
- variant?: 'top' | 'bottom';
4
+ variant?: 'top' | 'bottom' | string;
5
5
  }
6
6
  declare const CardImg: BsPrefixRefForwardingComponent<'img', CardImgProps>;
7
7
  export default CardImg;
package/esm/Carousel.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3
- export declare type CarouselVariant = 'dark';
3
+ export declare type CarouselVariant = 'dark' | string;
4
4
  export interface CarouselRef {
5
5
  element?: HTMLElement;
6
6
  prev: (e?: React.SyntheticEvent) => void;
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- export declare type CloseButtonVariant = 'white';
2
+ export declare type CloseButtonVariant = 'white' | string;
3
3
  export interface CloseButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
4
  variant?: CloseButtonVariant;
5
5
  }
@@ -3,7 +3,10 @@ import * as React from 'react';
3
3
  import classNames from 'classnames';
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
5
  const propTypes = {
6
+ /** An accessible label indicating the relevant information about the Close Button. */
6
7
  'aria-label': PropTypes.string,
8
+
9
+ /** A callback fired after the Close Button is clicked. */
7
10
  onClick: PropTypes.func,
8
11
 
9
12
  /**
package/esm/Form.d.ts CHANGED
@@ -73,18 +73,18 @@ declare const _default: BsPrefixRefForwardingComponent<"form", FormProps> & {
73
73
  is?: string | undefined;
74
74
  'aria-activedescendant'?: string | undefined;
75
75
  'aria-atomic'?: (boolean | "true" | "false") | undefined;
76
- 'aria-autocomplete'?: "list" | "none" | "inline" | "both" | undefined;
76
+ 'aria-autocomplete'?: "list" | "none" | "both" | "inline" | undefined;
77
77
  'aria-busy'?: (boolean | "true" | "false") | undefined;
78
78
  'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
79
79
  'aria-colcount'?: number | undefined;
80
80
  'aria-colindex'?: number | undefined;
81
81
  'aria-colspan'?: number | undefined;
82
82
  'aria-controls'?: string | undefined;
83
- 'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "location" | "date" | undefined;
83
+ 'aria-current'?: boolean | "time" | "true" | "false" | "page" | "step" | "date" | "location" | undefined;
84
84
  'aria-describedby'?: string | undefined;
85
85
  'aria-details'?: string | undefined;
86
86
  'aria-disabled'?: (boolean | "true" | "false") | undefined;
87
- 'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
87
+ 'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
88
88
  'aria-errormessage'?: string | undefined;
89
89
  'aria-expanded'?: (boolean | "true" | "false") | undefined;
90
90
  'aria-flowto'?: string | undefined;
@@ -106,7 +106,7 @@ declare const _default: BsPrefixRefForwardingComponent<"form", FormProps> & {
106
106
  'aria-posinset'?: number | undefined;
107
107
  'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
108
108
  'aria-readonly'?: (boolean | "true" | "false") | undefined;
109
- 'aria-relevant'?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
109
+ 'aria-relevant'?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
110
110
  'aria-required'?: (boolean | "true" | "false") | undefined;
111
111
  'aria-roledescription'?: string | undefined;
112
112
  'aria-rowcount'?: number | undefined;
@@ -286,13 +286,12 @@ declare const _default: BsPrefixRefForwardingComponent<"form", FormProps> & {
286
286
  label?: React.ReactNode;
287
287
  pattern?: string | undefined;
288
288
  list?: string | undefined;
289
- inline?: boolean | undefined;
290
- step?: string | number | undefined;
291
289
  bsPrefix?: string | undefined;
292
290
  height?: string | number | undefined;
293
291
  width?: string | number | undefined;
294
292
  reverse?: boolean | undefined;
295
293
  size?: number | undefined;
294
+ inline?: boolean | undefined;
296
295
  multiple?: boolean | undefined;
297
296
  as?: React.ElementType<any> | undefined;
298
297
  autoComplete?: string | undefined;
@@ -309,6 +308,7 @@ declare const _default: BsPrefixRefForwardingComponent<"form", FormProps> & {
309
308
  enterKeyHint?: "search" | "next" | "enter" | "done" | "go" | "previous" | "send" | undefined;
310
309
  readOnly?: boolean | undefined;
311
310
  required?: boolean | undefined;
311
+ step?: string | number | undefined;
312
312
  feedback?: React.ReactNode;
313
313
  isValid?: boolean | undefined;
314
314
  isInvalid?: boolean | undefined;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import FormFileInput from './FormFileInput';
3
+ import FormFileLabel from './FormFileLabel';
4
+ import { BsCustomPrefixProps, BsPrefixPropsWithChildren, BsPrefixRefForwardingComponent } from './helpers';
5
+ export interface FormFileProps extends BsPrefixPropsWithChildren, BsCustomPrefixProps, Pick<React.HTMLAttributes<HTMLElement>, 'style'> {
6
+ inputAs?: React.ElementType;
7
+ id?: string;
8
+ disabled?: boolean;
9
+ label?: React.ReactNode;
10
+ custom?: boolean;
11
+ isValid?: boolean;
12
+ isInvalid?: boolean;
13
+ feedback?: React.ReactNode;
14
+ feedbackTooltip?: boolean;
15
+ lang?: string;
16
+ 'data-browse'?: any;
17
+ }
18
+ declare type FormFile = BsPrefixRefForwardingComponent<'input', FormFileProps> & {
19
+ Input: typeof FormFileInput;
20
+ Label: typeof FormFileLabel;
21
+ };
22
+ declare const FormFile: FormFile;
23
+ export default FormFile;
@@ -0,0 +1,10 @@
1
+ import { BsCustomPrefixProps, BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
2
+ export interface FormFileInputProps extends BsPrefixProps, BsCustomPrefixProps {
3
+ id?: string;
4
+ isValid?: boolean;
5
+ isInvalid?: boolean;
6
+ lang?: string;
7
+ }
8
+ declare type FormFileInput = BsPrefixRefForwardingComponent<'input', FormFileInputProps>;
9
+ declare const FormFileInput: FormFileInput;
10
+ export default FormFileInput;
@@ -0,0 +1,7 @@
1
+ import { BsCustomPrefixProps, BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
2
+ export interface FormFileLabelProps extends BsPrefixProps, BsCustomPrefixProps {
3
+ htmlFor?: string;
4
+ }
5
+ declare type FormFileLabel = BsPrefixRefForwardingComponent<'label', FormFileLabelProps>;
6
+ declare const FormFileLabel: FormFileLabel;
7
+ export default FormFileLabel;
@@ -0,0 +1,7 @@
1
+ import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
2
+ export interface JumbotronProps extends BsPrefixProps {
3
+ fluid?: boolean;
4
+ }
5
+ declare type Jumbotron = BsPrefixRefForwardingComponent<'div', JumbotronProps>;
6
+ declare const Jumbotron: Jumbotron;
7
+ export default Jumbotron;
@@ -2,7 +2,7 @@ import { NavProps as BaseNavProps } from '@restart/ui/Nav';
2
2
  import { EventKey } from '@restart/ui/types';
3
3
  import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
4
4
  export interface ListGroupProps extends BsPrefixProps, BaseNavProps {
5
- variant?: 'flush';
5
+ variant?: 'flush' | string;
6
6
  horizontal?: boolean | string | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
7
7
  defaultActiveKey?: EventKey;
8
8
  numbered?: boolean;
@@ -1,5 +1,6 @@
1
1
  import classNames from 'classnames';
2
2
  import * as React from 'react';
3
+ import warning from 'warning';
3
4
  import useEventCallback from '@restart/hooks/useEventCallback';
4
5
  import { useNavItem } from '@restart/ui/NavItem';
5
6
  import { makeEventKey } from '@restart/ui/SelectableContext';
@@ -39,6 +40,7 @@ const ListGroupItem = /*#__PURE__*/React.forwardRef(({
39
40
 
40
41
 
41
42
  const Component = as || (action ? props.href ? 'a' : 'button' : 'div');
43
+ process.env.NODE_ENV !== "production" ? warning(as || !(!action && props.href), '`action=false` and `href` should not be used together.') : void 0;
42
44
  return /*#__PURE__*/_jsx(Component, {
43
45
  ref: ref,
44
46
  ...props,
package/esm/Media.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
2
+ declare const MediaBody: BsPrefixRefForwardingComponent<"div", unknown>;
3
+ declare type MediaProps = BsPrefixProps;
4
+ declare type Media = BsPrefixRefForwardingComponent<'div', MediaProps> & {
5
+ Body: typeof MediaBody;
6
+ };
7
+ declare const Media: Media;
8
+ export default Media;
package/esm/Modal.js CHANGED
@@ -219,7 +219,7 @@ const Modal = /*#__PURE__*/React.forwardRef(({
219
219
  role: "dialog",
220
220
  ...dialogProps,
221
221
  style: baseModalStyle,
222
- className: classNames(className, bsPrefix, animateStaticModal && `${bsPrefix}-static`),
222
+ className: classNames(className, bsPrefix, animateStaticModal && `${bsPrefix}-static`, !animation && 'show'),
223
223
  onClick: backdrop ? handleClick : undefined,
224
224
  onMouseUp: handleMouseUp,
225
225
  "aria-label": ariaLabel,
package/esm/Nav.d.ts CHANGED
@@ -4,7 +4,7 @@ import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
4
4
  export interface NavProps extends BsPrefixProps, BaseNavProps {
5
5
  navbarBsPrefix?: string;
6
6
  cardHeaderBsPrefix?: string;
7
- variant?: 'tabs' | 'pills';
7
+ variant?: 'tabs' | 'pills' | string;
8
8
  defaultActiveKey?: EventKey;
9
9
  fill?: boolean;
10
10
  justify?: boolean;
package/esm/Navbar.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { SelectCallback } from '@restart/ui/types';
3
3
  import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
4
4
  export interface NavbarProps extends BsPrefixProps, Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'> {
5
- variant?: 'light' | 'dark';
5
+ variant?: 'light' | 'dark' | string;
6
6
  expand?: boolean | string | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
7
7
  bg?: string;
8
8
  fixed?: 'top' | 'bottom';
@@ -8,7 +8,8 @@ const NavbarOffcanvas = /*#__PURE__*/React.forwardRef((props, ref) => {
8
8
  return /*#__PURE__*/_jsx(Offcanvas, {
9
9
  ref: ref,
10
10
  show: !!(context != null && context.expanded),
11
- ...props
11
+ ...props,
12
+ renderStaticNode: true
12
13
  });
13
14
  });
14
15
  NavbarOffcanvas.displayName = 'NavbarOffcanvas';
@@ -8,6 +8,7 @@ export interface OffcanvasProps extends Omit<BaseModalProps, 'role' | 'renderBac
8
8
  scroll?: boolean;
9
9
  placement?: OffcanvasPlacement;
10
10
  responsive?: 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | string;
11
+ renderStaticNode?: boolean;
11
12
  }
12
13
  declare const _default: BsPrefixRefForwardingComponent<"div", OffcanvasProps> & {
13
14
  Body: BsPrefixRefForwardingComponent<"div", unknown>;
package/esm/Offcanvas.js CHANGED
@@ -24,7 +24,8 @@ const defaultProps = {
24
24
  autoFocus: true,
25
25
  enforceFocus: true,
26
26
  restoreFocus: true,
27
- placement: 'start'
27
+ placement: 'start',
28
+ renderStaticNode: false
28
29
  };
29
30
 
30
31
  function DialogTransition(props) {
@@ -66,6 +67,7 @@ const Offcanvas = /*#__PURE__*/React.forwardRef(({
66
67
  onExited,
67
68
  backdropClassName,
68
69
  manager: propsManager,
70
+ renderStaticNode,
69
71
  ...props
70
72
  }, ref) => {
71
73
  const modalManager = useRef();
@@ -125,7 +127,7 @@ const Offcanvas = /*#__PURE__*/React.forwardRef(({
125
127
  });
126
128
 
127
129
  return /*#__PURE__*/_jsxs(_Fragment, {
128
- children: [!showOffcanvas && renderDialog({}), /*#__PURE__*/_jsx(ModalContext.Provider, {
130
+ children: [!showOffcanvas && (responsive || renderStaticNode) && renderDialog({}), /*#__PURE__*/_jsx(ModalContext.Provider, {
129
131
  value: modalContext,
130
132
  children: /*#__PURE__*/_jsx(BaseModal, {
131
133
  show: showOffcanvas,
@@ -27,7 +27,7 @@ export interface OverlayTriggerProps extends Omit<OverlayProps, 'children' | 'ta
27
27
  declare function OverlayTrigger({ trigger, overlay, children, popperConfig, show: propsShow, defaultShow, onToggle, delay: propsDelay, placement, flip, ...props }: OverlayTriggerProps): JSX.Element;
28
28
  declare namespace OverlayTrigger {
29
29
  var propTypes: {
30
- children: PropTypes.Validator<((...args: any[]) => any) | PropTypes.ReactElementLike>;
30
+ children: PropTypes.Validator<NonNullable<NonNullable<((...args: any[]) => any) | PropTypes.ReactElementLike | null | undefined>>>;
31
31
  /**
32
32
  * Specify which action or actions trigger Overlay visibility
33
33
  *
@@ -35,14 +35,14 @@ declare namespace OverlayTrigger {
35
35
  *
36
36
  * @type {'hover' | 'click' |'focus' | Array<'hover' | 'click' |'focus'>}
37
37
  */
38
- trigger: PropTypes.Requireable<string | (string | null | undefined)[]>;
38
+ trigger: PropTypes.Requireable<NonNullable<string | (string | null | undefined)[] | null | undefined>>;
39
39
  /**
40
40
  * A millisecond delay amount to show and hide the Overlay once triggered
41
41
  */
42
- delay: PropTypes.Requireable<number | PropTypes.InferProps<{
42
+ delay: PropTypes.Requireable<NonNullable<number | PropTypes.InferProps<{
43
43
  show: PropTypes.Requireable<number>;
44
44
  hide: PropTypes.Requireable<number>;
45
- }>>;
45
+ }> | null | undefined>>;
46
46
  /**
47
47
  * The visibility of the Overlay. `show` is a _controlled_ prop so should be paired
48
48
  * with `onToggle` to avoid breaking user interactions.
@@ -72,7 +72,7 @@ declare namespace OverlayTrigger {
72
72
  /**
73
73
  * An element or text to overlay next to the target.
74
74
  */
75
- overlay: PropTypes.Requireable<((...args: any[]) => any) | PropTypes.ReactElementLike>;
75
+ overlay: PropTypes.Requireable<NonNullable<((...args: any[]) => any) | PropTypes.ReactElementLike | null | undefined>>;
76
76
  /**
77
77
  * A Popper.js config object passed to the the underlying popper instance.
78
78
  */
package/esm/PageItem.js CHANGED
@@ -28,7 +28,6 @@ const PageItem = /*#__PURE__*/React.forwardRef(({
28
28
  }),
29
29
  children: /*#__PURE__*/_jsxs(Component, {
30
30
  className: "page-link",
31
- disabled: disabled,
32
31
  ...props,
33
32
  children: [children, active && activeLabel && /*#__PURE__*/_jsx("span", {
34
33
  className: "visually-hidden",
@@ -0,0 +1,5 @@
1
+ import { BsPrefixPropsWithChildren, BsPrefixRefForwardingComponent } from './helpers';
2
+ declare type PopoverContentProps = BsPrefixPropsWithChildren;
3
+ declare type PopoverContent = BsPrefixRefForwardingComponent<'div', PopoverContentProps>;
4
+ declare const PopoverContent: PopoverContent;
5
+ export default PopoverContent;
@@ -0,0 +1,5 @@
1
+ import { BsPrefixPropsWithChildren, BsPrefixRefForwardingComponent } from './helpers';
2
+ declare type PopoverTitleProps = BsPrefixPropsWithChildren;
3
+ declare type PopoverTitle = BsPrefixRefForwardingComponent<'div', PopoverTitleProps>;
4
+ declare const PopoverTitle: PopoverTitle;
5
+ export default PopoverTitle;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { BsPrefixPropsWithChildren, BsPrefixRefForwardingComponent } from './helpers';
3
+ export interface ResponsiveEmbedProps extends BsPrefixPropsWithChildren {
4
+ children: React.ReactChild;
5
+ aspectRatio?: '21by9' | '16by9' | '4by3' | '1by1';
6
+ }
7
+ declare type ResponsiveEmbed = BsPrefixRefForwardingComponent<'div', ResponsiveEmbedProps>;
8
+ declare const ResponsiveEmbed: ResponsiveEmbed;
9
+ export default ResponsiveEmbed;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3
+ export interface SafeAnchorProps extends React.HTMLAttributes<HTMLElement>, BsPrefixProps {
4
+ href?: string;
5
+ disabled?: boolean;
6
+ tabIndex?: number;
7
+ }
8
+ declare type SafeAnchor = BsPrefixRefForwardingComponent<'a', SafeAnchorProps>;
9
+ /**
10
+ * There are situations due to browser quirks or Bootstrap CSS where
11
+ * an anchor tag is needed, when semantically a button tag is the
12
+ * better choice. SafeAnchor ensures that when an anchor is used like a
13
+ * button its accessible. It also emulates input `disabled` behavior for
14
+ * links, which is usually desirable for Buttons, NavItems, DropdownItems, etc.
15
+ */
16
+ declare const SafeAnchor: SafeAnchor;
17
+ export default SafeAnchor;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ declare type SelectableContextType = (key: string | null, event: any) => void;
3
+ declare const SelectableContext: React.Context<SelectableContextType | null>;
4
+ export declare const makeEventKey: (eventKey?: string | number | null | undefined, href?: string | null) => string | null;
5
+ export default SelectableContext;
package/esm/Spinner.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { BsPrefixProps, BsPrefixRefForwardingComponent } from './helpers';
3
3
  import { Variant } from './types';
4
4
  export interface SpinnerProps extends React.HTMLAttributes<HTMLElement>, BsPrefixProps {
5
- animation: 'border' | 'grow';
5
+ animation?: 'border' | 'grow';
6
6
  size?: 'sm';
7
7
  variant?: Variant;
8
8
  }
package/esm/Spinner.js CHANGED
@@ -5,7 +5,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
5
5
  const Spinner = /*#__PURE__*/React.forwardRef(({
6
6
  bsPrefix,
7
7
  variant,
8
- animation,
8
+ animation = 'border',
9
9
  size,
10
10
  // Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
11
11
  as: Component = 'div',
package/esm/Tab.d.ts CHANGED
@@ -12,12 +12,12 @@ declare const _default: React.FC<TabProps> & {
12
12
  ({ transition, ...props }: import("./TabContainer").TabContainerProps): JSX.Element;
13
13
  propTypes: {
14
14
  id: PropTypes.Requireable<string>;
15
- transition: PropTypes.Requireable<boolean | PropTypes.ReactComponentLike>;
15
+ transition: PropTypes.Requireable<NonNullable<boolean | PropTypes.ReactComponentLike | null | undefined>>;
16
16
  mountOnEnter: PropTypes.Requireable<boolean>;
17
17
  unmountOnExit: PropTypes.Requireable<boolean>;
18
18
  generateChildId: PropTypes.Requireable<(...args: any[]) => any>;
19
19
  onSelect: PropTypes.Requireable<(...args: any[]) => any>;
20
- activeKey: PropTypes.Requireable<string | number>;
20
+ activeKey: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
21
21
  };
22
22
  displayName: string;
23
23
  };
@@ -22,7 +22,7 @@ declare const TabContainer: {
22
22
  * @type {{Transition | false}}
23
23
  * @default {Fade}
24
24
  */
25
- transition: PropTypes.Requireable<boolean | PropTypes.ReactComponentLike>;
25
+ transition: PropTypes.Requireable<NonNullable<boolean | PropTypes.ReactComponentLike | null | undefined>>;
26
26
  /**
27
27
  * Wait until the first "enter" transition to mount tabs (add them to the DOM)
28
28
  */
@@ -54,7 +54,7 @@ declare const TabContainer: {
54
54
  *
55
55
  * @controllable onSelect
56
56
  */
57
- activeKey: PropTypes.Requireable<string | number>;
57
+ activeKey: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
58
58
  };
59
59
  displayName: string;
60
60
  };
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export interface TabContextType {
3
+ onSelect: any;
4
+ activeKey: any;
5
+ transition: any;
6
+ mountOnEnter: boolean;
7
+ unmountOnExit: boolean;
8
+ getControlledId: (key: any) => any;
9
+ getControllerId: (key: any) => any;
10
+ }
11
+ declare const TabContext: React.Context<TabContextType | null>;
12
+ export default TabContext;
package/esm/Tabs.d.ts CHANGED
@@ -14,9 +14,9 @@ declare const Tabs: {
14
14
  *
15
15
  * @controllable onSelect
16
16
  */
17
- activeKey: PropTypes.Requireable<string | number>;
17
+ activeKey: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
18
18
  /** The default active key that is selected on start */
19
- defaultActiveKey: PropTypes.Requireable<string | number>;
19
+ defaultActiveKey: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
20
20
  /**
21
21
  * Navigation style
22
22
  *
@@ -32,7 +32,7 @@ declare const Tabs: {
32
32
  * @type {Transition | false}
33
33
  * @default {Fade}
34
34
  */
35
- transition: PropTypes.Requireable<boolean | PropTypes.ReactComponentLike>;
35
+ transition: PropTypes.Requireable<NonNullable<boolean | PropTypes.ReactComponentLike | null | undefined>>;
36
36
  /**
37
37
  * HTML id attribute, required if no `generateChildId` prop
38
38
  * is specified.
@@ -1,2 +1,2 @@
1
1
  /// <reference types="react" />
2
- export default function safeFindDOMNode(componentOrElement: React.ComponentClass | Element | null | undefined): Element | Text | null;
2
+ export default function safeFindDOMNode(componentOrElement: React.Component | Element | null | undefined): Element | Text | null;
package/esm/types.d.ts CHANGED
@@ -17,7 +17,7 @@ export declare type ResponsiveAlignProp = {
17
17
  xxl: AlignDirection;
18
18
  } | Record<string, AlignDirection>;
19
19
  export declare type AlignType = AlignDirection | ResponsiveAlignProp;
20
- export declare const alignPropType: PropTypes.Requireable<object | AlignDirection>;
20
+ export declare const alignPropType: PropTypes.Requireable<NonNullable<object | AlignDirection | null | undefined>>;
21
21
  export declare type RootCloseEvent = 'click' | 'mousedown';
22
22
  export declare type GapValue = 0 | 1 | 2 | 3 | 4 | 5;
23
23
  export interface PopperRef {
@@ -0,0 +1,4 @@
1
+ export default function usePopperMarginModifiers(): [
2
+ (overlay: HTMLDivElement) => void,
3
+ Array<Record<string, unknown>>
4
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-bootstrap",
3
- "version": "2.5.0-beta.1",
3
+ "version": "2.6.0",
4
4
  "description": "Bootstrap 5 components built with React",
5
5
  "keywords": [
6
6
  "bootstrap",
@@ -37,7 +37,7 @@
37
37
  "dependencies": {
38
38
  "@babel/runtime": "^7.17.2",
39
39
  "@restart/hooks": "^0.4.6",
40
- "@restart/ui": "^1.3.0",
40
+ "@restart/ui": "^1.4.1",
41
41
  "@types/react-transition-group": "^4.4.4",
42
42
  "classnames": "^2.3.1",
43
43
  "dom-helpers": "^5.2.1",