react-bootstrap 1.4.2 → 1.5.2

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 (51) hide show
  1. package/cjs/Alert.d.ts +1 -1
  2. package/cjs/Card.d.ts +2 -2
  3. package/cjs/Carousel.d.ts +6 -0
  4. package/cjs/Carousel.js +4 -4
  5. package/cjs/Collapse.js +3 -3
  6. package/cjs/Dropdown.js +5 -8
  7. package/cjs/DropdownMenu.js +16 -11
  8. package/cjs/DropdownToggle.js +1 -3
  9. package/cjs/Fade.js +3 -3
  10. package/cjs/InputGroup.d.ts +1 -0
  11. package/cjs/InputGroup.js +3 -2
  12. package/cjs/ModalTitle.d.ts +1 -1
  13. package/cjs/NavDropdown.js +9 -43
  14. package/cjs/Navbar.d.ts +1 -1
  15. package/cjs/Overlay.js +4 -1
  16. package/cjs/OverlayTrigger.js +2 -1
  17. package/cjs/ProgressBar.js +1 -0
  18. package/cjs/Tab.d.ts +1 -1
  19. package/cjs/TabContainer.d.ts +1 -1
  20. package/cjs/divWithClassName.d.ts +1 -1
  21. package/cjs/helpers.d.ts +1 -0
  22. package/cjs/transitionEndListener.d.ts +1 -0
  23. package/cjs/transitionEndListener.js +29 -0
  24. package/dist/react-bootstrap.js +2626 -2496
  25. package/dist/react-bootstrap.min.js +2 -6
  26. package/dist/react-bootstrap.min.js.LICENSE.txt +5 -0
  27. package/esm/Alert.d.ts +1 -1
  28. package/esm/Card.d.ts +2 -2
  29. package/esm/Carousel.d.ts +6 -0
  30. package/esm/Carousel.js +3 -3
  31. package/esm/Collapse.js +2 -2
  32. package/esm/Dropdown.js +5 -8
  33. package/esm/DropdownMenu.js +16 -12
  34. package/esm/DropdownToggle.js +1 -3
  35. package/esm/Fade.js +2 -2
  36. package/esm/InputGroup.d.ts +1 -0
  37. package/esm/InputGroup.js +3 -2
  38. package/esm/ModalTitle.d.ts +1 -1
  39. package/esm/NavDropdown.js +7 -41
  40. package/esm/Navbar.d.ts +1 -1
  41. package/esm/Overlay.js +4 -1
  42. package/esm/OverlayTrigger.js +2 -1
  43. package/esm/ProgressBar.js +1 -0
  44. package/esm/Tab.d.ts +1 -1
  45. package/esm/TabContainer.d.ts +1 -1
  46. package/esm/divWithClassName.d.ts +1 -1
  47. package/esm/helpers.d.ts +1 -0
  48. package/esm/transitionEndListener.d.ts +1 -0
  49. package/esm/transitionEndListener.js +19 -0
  50. package/package.json +6 -6
  51. package/transitionEndListener/package.json +7 -0
@@ -0,0 +1,5 @@
1
+ /*!
2
+ Copyright (c) 2017 Jed Watson.
3
+ Licensed under the MIT License (MIT), see
4
+ http://jedwatson.github.io/classnames
5
+ */
package/esm/Alert.d.ts CHANGED
@@ -11,7 +11,7 @@ export interface AlertProps extends React.HTMLProps<HTMLDivElement> {
11
11
  closeLabel?: string;
12
12
  transition?: TransitionType;
13
13
  }
14
- declare const AlertHeading: import("./helpers").BsPrefixRefForwardingComponent<React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "className" | "key" | "onKeyDown" | "onSelect" | "role" | "color" | "id" | "lang" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is"> & React.RefAttributes<HTMLDivElement>>, unknown>;
14
+ declare const AlertHeading: import("./helpers").BsPrefixRefForwardingComponent<React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>>, unknown>;
15
15
  declare const AlertLink: import("./helpers").BsPrefixRefForwardingComponent<SafeAnchor, unknown>;
16
16
  declare type Alert = React.ForwardRefExoticComponent<AlertProps> & {
17
17
  Link: typeof AlertLink;
package/esm/Card.d.ts CHANGED
@@ -3,8 +3,8 @@ import CardImg from './CardImg';
3
3
  import { BsPrefixPropsWithChildren, BsPrefixRefForwardingComponent } from './helpers';
4
4
  import { Color, Variant } from './types';
5
5
  declare const CardBody: BsPrefixRefForwardingComponent<"div", unknown>;
6
- declare const CardTitle: BsPrefixRefForwardingComponent<React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "className" | "key" | "onKeyDown" | "onSelect" | "role" | "color" | "id" | "lang" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is"> & React.RefAttributes<HTMLDivElement>>, unknown>;
7
- declare const CardSubtitle: BsPrefixRefForwardingComponent<React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "className" | "key" | "onKeyDown" | "onSelect" | "role" | "color" | "id" | "lang" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is"> & React.RefAttributes<HTMLDivElement>>, unknown>;
6
+ declare const CardTitle: BsPrefixRefForwardingComponent<React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>>, unknown>;
7
+ declare const CardSubtitle: BsPrefixRefForwardingComponent<React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>>, unknown>;
8
8
  declare const CardLink: BsPrefixRefForwardingComponent<"a", unknown>;
9
9
  declare const CardText: BsPrefixRefForwardingComponent<"p", unknown>;
10
10
  declare const CardHeader: BsPrefixRefForwardingComponent<"div", unknown>;
package/esm/Carousel.d.ts CHANGED
@@ -2,6 +2,11 @@ import React from 'react';
2
2
  import CarouselCaption from './CarouselCaption';
3
3
  import CarouselItem from './CarouselItem';
4
4
  import { BsPrefixPropsWithChildren, BsPrefixRefForwardingComponent } from './helpers';
5
+ export interface CarouselRef {
6
+ element: HTMLElement;
7
+ prev: (e?: React.SyntheticEvent) => void;
8
+ next: (e?: React.SyntheticEvent) => void;
9
+ }
5
10
  export interface CarouselProps extends BsPrefixPropsWithChildren, Pick<React.DOMAttributes<HTMLElement>, 'onKeyDown' | 'onMouseOver' | 'onMouseOut' | 'onTouchStart' | 'onTouchMove' | 'onTouchEnd'> {
6
11
  slide?: boolean;
7
12
  fade?: boolean;
@@ -21,6 +26,7 @@ export interface CarouselProps extends BsPrefixPropsWithChildren, Pick<React.DOM
21
26
  prevLabel?: React.ReactNode;
22
27
  nextIcon?: React.ReactNode;
23
28
  nextLabel?: React.ReactNode;
29
+ ref?: React.Ref<CarouselRef>;
24
30
  }
25
31
  declare type Carousel = BsPrefixRefForwardingComponent<'div', CarouselProps> & {
26
32
  Caption: typeof CarouselCaption;
package/esm/Carousel.js CHANGED
@@ -5,7 +5,6 @@ import useUpdateEffect from '@restart/hooks/useUpdateEffect';
5
5
  import useCommittedRef from '@restart/hooks/useCommittedRef';
6
6
  import useTimeout from '@restart/hooks/useTimeout';
7
7
  import classNames from 'classnames';
8
- import transitionEnd from 'dom-helpers/transitionEnd';
9
8
  import Transition from 'react-transition-group/Transition';
10
9
  import PropTypes from 'prop-types';
11
10
  import React, { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
@@ -15,6 +14,7 @@ import CarouselItem from './CarouselItem';
15
14
  import { map, forEach } from './ElementChildren';
16
15
  import SafeAnchor from './SafeAnchor';
17
16
  import { useBootstrapPrefix } from './ThemeProvider';
17
+ import transitionEndListener from './transitionEndListener';
18
18
  import triggerBrowserReflow from './triggerBrowserReflow';
19
19
  var SWIPE_THRESHOLD = 40;
20
20
  var propTypes = {
@@ -29,7 +29,7 @@ var propTypes = {
29
29
  */
30
30
  slide: PropTypes.bool,
31
31
 
32
- /** Cross fade slides instead of the default slide animation */
32
+ /** Animates slides with a crossfade animation instead of the default slide animation */
33
33
  fade: PropTypes.bool,
34
34
 
35
35
  /**
@@ -462,7 +462,7 @@ function CarouselFunc(uncontrolledProps, ref) {
462
462
  in: isActive,
463
463
  onEnter: isActive ? handleEnter : undefined,
464
464
  onEntered: isActive ? handleEntered : undefined,
465
- addEndListener: transitionEnd
465
+ addEndListener: transitionEndListener
466
466
  }, function (status) {
467
467
  return /*#__PURE__*/React.cloneElement(child, {
468
468
  className: classNames(child.props.className, isActive && status !== 'entered' && orderClassName, (status === 'entered' || status === 'exiting') && 'active', (status === 'entering' || status === 'exiting') && directionalClassName)
package/esm/Collapse.js CHANGED
@@ -5,9 +5,9 @@ var _collapseStyles;
5
5
 
6
6
  import classNames from 'classnames';
7
7
  import css from 'dom-helpers/css';
8
- import transitionEnd from 'dom-helpers/transitionEnd';
9
8
  import React, { useMemo } from 'react';
10
9
  import Transition, { ENTERED, ENTERING, EXITED, EXITING } from 'react-transition-group/Transition';
10
+ import transitionEndListener from './transitionEndListener';
11
11
  import createChainedFunction from './createChainedFunction';
12
12
  import triggerBrowserReflow from './triggerBrowserReflow';
13
13
  var MARGINS = {
@@ -83,7 +83,7 @@ var Collapse = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
83
83
  return /*#__PURE__*/React.createElement(Transition // @ts-ignore
84
84
  , _extends({
85
85
  ref: ref,
86
- addEndListener: transitionEnd
86
+ addEndListener: transitionEndListener
87
87
  }, props, {
88
88
  "aria-expanded": props.role ? props.in : null,
89
89
  onEnter: handleEnter,
package/esm/Dropdown.js CHANGED
@@ -51,7 +51,7 @@ var Dropdown = /*#__PURE__*/React.forwardRef(function (pProps, ref) {
51
51
  source = event.type;
52
52
  }
53
53
 
54
- if (event.currentTarget === document) source = 'rootClose';
54
+ if (event.currentTarget === document && (source !== 'keydown' || event.key === 'Escape')) source = 'rootClose';
55
55
 
56
56
  if (onToggle) {
57
57
  onToggle(nextShow, event, {
@@ -73,13 +73,10 @@ var Dropdown = /*#__PURE__*/React.forwardRef(function (pProps, ref) {
73
73
  onToggle: handleToggle,
74
74
  focusFirstItemOnShow: focusFirstItemOnShow,
75
75
  itemSelector: "." + prefix + "-item:not(.disabled):not(:disabled)"
76
- }, function (_ref) {
77
- var dropdownProps = _ref.props;
78
- return /*#__PURE__*/React.createElement(Component, _extends({}, props, dropdownProps, {
79
- ref: ref,
80
- className: classNames(className, show && 'show', (!drop || drop === 'down') && prefix, drop === 'up' && 'dropup', drop === 'right' && 'dropright', drop === 'left' && 'dropleft')
81
- }));
82
- }));
76
+ }, /*#__PURE__*/React.createElement(Component, _extends({}, props, {
77
+ ref: ref,
78
+ className: classNames(className, show && 'show', (!drop || drop === 'down') && prefix, drop === 'up' && 'dropup', drop === 'right' && 'dropright', drop === 'left' && 'dropleft')
79
+ }))));
83
80
  });
84
81
  Dropdown.displayName = 'Dropdown';
85
82
  Dropdown.defaultProps = defaultProps;
@@ -24,8 +24,7 @@ var defaultProps = {
24
24
  align: 'left',
25
25
  alignRight: false,
26
26
  flip: true
27
- }; // TODO: remove this hack
28
-
27
+ };
29
28
  var DropdownMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
30
29
  var bsPrefix = _ref.bsPrefix,
31
30
  className = _ref.className,
@@ -68,7 +67,7 @@ var DropdownMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
68
67
  }
69
68
  }
70
69
 
71
- var _ref2 = useDropdownMenu({
70
+ var _useDropdownMenu = useDropdownMenu({
72
71
  flip: flip,
73
72
  rootCloseEvent: rootCloseEvent,
74
73
  show: showProps,
@@ -78,29 +77,34 @@ var DropdownMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
78
77
  modifiers: marginModifiers.concat((popperConfig == null ? void 0 : popperConfig.modifiers) || [])
79
78
  })
80
79
  }),
81
- hasShown = _ref2.hasShown,
82
- placement = _ref2.placement,
83
- show = _ref2.show,
84
- alignEnd = _ref2.alignEnd,
85
- close = _ref2.close,
86
- menuProps = _ref2.props;
80
+ menuProps = _useDropdownMenu[0],
81
+ _useDropdownMenu$ = _useDropdownMenu[1],
82
+ hasShown = _useDropdownMenu$.hasShown,
83
+ popper = _useDropdownMenu$.popper,
84
+ show = _useDropdownMenu$.show,
85
+ alignEnd = _useDropdownMenu$.alignEnd,
86
+ toggle = _useDropdownMenu$.toggle;
87
87
 
88
88
  menuProps.ref = useMergedRefs(popperRef, useMergedRefs(useWrappedRefWithWarning(ref, 'DropdownMenu'), menuProps.ref));
89
89
  if (!hasShown && !renderOnMount) return null; // For custom components provide additional, non-DOM, props;
90
90
 
91
91
  if (typeof Component !== 'string') {
92
92
  menuProps.show = show;
93
- menuProps.close = close;
93
+
94
+ menuProps.close = function () {
95
+ return toggle == null ? void 0 : toggle(false);
96
+ };
97
+
94
98
  menuProps.alignRight = alignEnd;
95
99
  }
96
100
 
97
101
  var style = props.style;
98
102
 
99
- if (placement) {
103
+ if (popper != null && popper.placement) {
100
104
  // we don't need the default popper style,
101
105
  // menus are display: none when not shown.
102
106
  style = _extends({}, props.style, menuProps.style);
103
- props['x-placement'] = placement;
107
+ props['x-placement'] = popper.placement;
104
108
  }
105
109
 
106
110
  return /*#__PURE__*/React.createElement(Component, _extends({}, props, menuProps, {
@@ -24,14 +24,12 @@ var DropdownToggle = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
24
24
  }
25
25
 
26
26
  var _useDropdownToggle = useDropdownToggle(),
27
- toggleProps = _useDropdownToggle[0],
28
- toggle = _useDropdownToggle[1].toggle;
27
+ toggleProps = _useDropdownToggle[0];
29
28
 
30
29
  toggleProps.ref = useMergedRefs(toggleProps.ref, useWrappedRefWithWarning(ref, 'DropdownToggle')); // This intentionally forwards size and variant (if set) to the
31
30
  // underlying component, to allow it to render size and style variants.
32
31
 
33
32
  return /*#__PURE__*/React.createElement(Component, _extends({
34
- onClick: toggle,
35
33
  className: classNames(className, prefix, split && prefix + "-split")
36
34
  }, toggleProps, props));
37
35
  });
package/esm/Fade.js CHANGED
@@ -4,9 +4,9 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
4
4
  var _fadeStyles;
5
5
 
6
6
  import classNames from 'classnames';
7
- import transitionEnd from 'dom-helpers/transitionEnd';
8
7
  import React, { useCallback } from 'react';
9
8
  import Transition, { ENTERED, ENTERING } from 'react-transition-group/Transition';
9
+ import transitionEndListener from './transitionEndListener';
10
10
  import triggerBrowserReflow from './triggerBrowserReflow';
11
11
  var defaultProps = {
12
12
  in: false,
@@ -27,7 +27,7 @@ var Fade = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
27
27
  }, [props]);
28
28
  return /*#__PURE__*/React.createElement(Transition, _extends({
29
29
  ref: ref,
30
- addEndListener: transitionEnd
30
+ addEndListener: transitionEndListener
31
31
  }, props, {
32
32
  onEnter: handleEnter
33
33
  }), function (status, innerProps) {
@@ -7,6 +7,7 @@ declare const InputGroupCheckbox: (props: any) => JSX.Element;
7
7
  declare const InputGroupRadio: (props: any) => JSX.Element;
8
8
  export interface InputGroupProps extends BsPrefixPropsWithChildren {
9
9
  size?: 'sm' | 'lg';
10
+ hasValidation?: boolean;
10
11
  }
11
12
  declare type InputGroupExtras = {
12
13
  Append: typeof InputGroupAppend;
package/esm/InputGroup.js CHANGED
@@ -33,16 +33,17 @@ var InputGroupRadio = function InputGroupRadio(props) {
33
33
  var InputGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
34
34
  var bsPrefix = _ref.bsPrefix,
35
35
  size = _ref.size,
36
+ hasValidation = _ref.hasValidation,
36
37
  className = _ref.className,
37
38
  _ref$as = _ref.as,
38
39
  Component = _ref$as === void 0 ? 'div' : _ref$as,
39
- props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "size", "className", "as"]);
40
+ props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "size", "hasValidation", "className", "as"]);
40
41
 
41
42
  bsPrefix = useBootstrapPrefix(bsPrefix, 'input-group');
42
43
  return /*#__PURE__*/React.createElement(Component, _extends({
43
44
  ref: ref
44
45
  }, props, {
45
- className: classNames(className, bsPrefix, size && bsPrefix + "-" + size)
46
+ className: classNames(className, bsPrefix, size && bsPrefix + "-" + size, hasValidation && 'has-validation')
46
47
  }));
47
48
  });
48
49
  InputGroup.displayName = 'InputGroup';
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
- declare const _default: import("./helpers").BsPrefixRefForwardingComponent<import("react").ForwardRefExoticComponent<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "className" | "key" | "onKeyDown" | "onSelect" | "role" | "color" | "id" | "lang" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is"> & import("react").RefAttributes<HTMLDivElement>>, unknown>;
2
+ declare const _default: import("./helpers").BsPrefixRefForwardingComponent<import("react").ForwardRefExoticComponent<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & import("react").RefAttributes<HTMLDivElement>>, unknown>;
3
3
  export default _default;
@@ -1,62 +1,29 @@
1
1
  import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
3
+ import classNames from 'classnames';
3
4
  import React from 'react';
4
- import PropTypes from 'prop-types';
5
+ import { useBootstrapPrefix } from './ThemeProvider';
5
6
  import Dropdown from './Dropdown';
6
- import NavItem from './NavItem';
7
7
  import NavLink from './NavLink';
8
- var propTypes = {
9
- /**
10
- * An html id attribute for the Toggle button, necessary for assistive technologies, such as screen readers.
11
- * @type {string|number}
12
- * @required
13
- */
14
- id: PropTypes.any,
15
-
16
- /** An `onClick` handler passed to the Toggle component */
17
- onClick: PropTypes.func,
18
-
19
- /** The content of the non-toggle Button. */
20
- title: PropTypes.node.isRequired,
21
-
22
- /** Disables the toggle NavLink */
23
- disabled: PropTypes.bool,
24
-
25
- /** Style the toggle NavLink as active */
26
- active: PropTypes.bool,
27
-
28
- /** An ARIA accessible role applied to the Menu component. When set to 'menu', The dropdown */
29
- menuRole: PropTypes.string,
30
-
31
- /** Whether to render the dropdown menu in the DOM before the first time it is shown */
32
- renderMenuOnMount: PropTypes.bool,
33
-
34
- /**
35
- * Which event when fired outside the component will cause it to be closed.
36
- *
37
- * _see [DropdownMenu](#menu-props) for more details_
38
- */
39
- rootCloseEvent: PropTypes.string,
40
-
41
- /** @ignore */
42
- bsPrefix: PropTypes.string
43
- };
44
8
  var NavDropdown = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
45
9
  var id = _ref.id,
46
10
  title = _ref.title,
47
11
  children = _ref.children,
48
12
  bsPrefix = _ref.bsPrefix,
13
+ className = _ref.className,
49
14
  rootCloseEvent = _ref.rootCloseEvent,
50
15
  menuRole = _ref.menuRole,
51
16
  disabled = _ref.disabled,
52
17
  active = _ref.active,
53
18
  renderMenuOnMount = _ref.renderMenuOnMount,
54
- props = _objectWithoutPropertiesLoose(_ref, ["id", "title", "children", "bsPrefix", "rootCloseEvent", "menuRole", "disabled", "active", "renderMenuOnMount"]);
19
+ props = _objectWithoutPropertiesLoose(_ref, ["id", "title", "children", "bsPrefix", "className", "rootCloseEvent", "menuRole", "disabled", "active", "renderMenuOnMount"]);
55
20
 
21
+ /* NavItem has no additional logic, it's purely presentational. Can set nav item class here to support "as" */
22
+ var navItemPrefix = useBootstrapPrefix(undefined, 'nav-item');
56
23
  return /*#__PURE__*/React.createElement(Dropdown, _extends({
57
24
  ref: ref
58
25
  }, props, {
59
- as: NavItem
26
+ className: classNames(className, navItemPrefix)
60
27
  }), /*#__PURE__*/React.createElement(Dropdown.Toggle, {
61
28
  id: id,
62
29
  eventKey: null,
@@ -71,7 +38,6 @@ var NavDropdown = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
71
38
  }, children));
72
39
  });
73
40
  NavDropdown.displayName = 'NavDropdown';
74
- NavDropdown.propTypes = propTypes;
75
41
  NavDropdown.Item = Dropdown.Item;
76
42
  NavDropdown.ItemText = Dropdown.ItemText;
77
43
  NavDropdown.Divider = Dropdown.Divider;
package/esm/Navbar.d.ts CHANGED
@@ -8,7 +8,7 @@ export interface NavbarProps extends BsPrefixPropsWithChildren {
8
8
  expand?: boolean | 'sm' | 'md' | 'lg' | 'xl';
9
9
  bg?: string;
10
10
  fixed?: 'top' | 'bottom';
11
- sticky?: 'top' | 'bottom';
11
+ sticky?: 'top';
12
12
  onToggle?: (expanded: boolean) => void;
13
13
  onSelect?: SelectCallback;
14
14
  collapseOnSelect?: boolean;
package/esm/Overlay.js CHANGED
@@ -67,7 +67,10 @@ function Overlay(_ref) {
67
67
  });
68
68
  if (typeof overlay === 'function') return overlay(_extends({}, props, overlayProps, {
69
69
  placement: placement,
70
- show: show,
70
+ show: show
71
+ }, !transition && show && {
72
+ className: 'show'
73
+ }, {
71
74
  popper: popper,
72
75
  arrowProps: arrowProps
73
76
  }));
@@ -36,7 +36,8 @@ function normalizeDelay(delay) {
36
36
  // moving from one child element to another.
37
37
 
38
38
 
39
- function handleMouseOverOut(handler, args, relatedNative) {
39
+ function handleMouseOverOut( // eslint-disable-next-line @typescript-eslint/no-shadow
40
+ handler, args, relatedNative) {
40
41
  var e = args[0];
41
42
  var target = e.currentTarget;
42
43
  var related = e.relatedTarget || e.nativeEvent[relatedNative];
@@ -27,6 +27,7 @@ function onlyProgressBar(props, propName, componentName) {
27
27
  *
28
28
  * see https://github.com/gaearon/react-hot-loader#checking-element-types
29
29
  */
30
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
30
31
 
31
32
 
32
33
  var element = /*#__PURE__*/React.createElement(ProgressBar, null);
package/esm/Tab.d.ts CHANGED
@@ -16,7 +16,7 @@ declare class Tab extends React.Component<TabProps> {
16
16
  (props: import("./TabContainer").TabContainerProps): JSX.Element;
17
17
  propTypes: {
18
18
  id: PropTypes.Validator<string>;
19
- transition: PropTypes.Requireable<string | boolean | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>;
19
+ transition: PropTypes.Requireable<boolean | PropTypes.ReactComponentLike>;
20
20
  mountOnEnter: PropTypes.Requireable<boolean>;
21
21
  unmountOnExit: PropTypes.Requireable<boolean>;
22
22
  generateChildId: PropTypes.Requireable<(...args: any[]) => any>;
@@ -29,7 +29,7 @@ declare const TabContainer: {
29
29
  * @type {{Transition | false}}
30
30
  * @default {Fade}
31
31
  */
32
- transition: PropTypes.Requireable<string | boolean | ((props: any, context?: any) => any) | (new (props: any, context?: any) => any)>;
32
+ transition: PropTypes.Requireable<boolean | PropTypes.ReactComponentLike>;
33
33
  /**
34
34
  * Wait until the first "enter" transition to mount tabs (add them to the DOM)
35
35
  */
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
- declare const _default: (className: string) => React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "className" | "key" | "onKeyDown" | "onSelect" | "role" | "color" | "id" | "lang" | "tabIndex" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "placeholder" | "spellCheck" | "translate" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is"> & React.RefAttributes<HTMLDivElement>>;
2
+ declare const _default: (className: string) => React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>>;
3
3
  export default _default;
package/esm/helpers.d.ts CHANGED
@@ -34,5 +34,6 @@ export interface TransitionCallbacks {
34
34
  export declare type TransitionComponent = React.ComponentType<{
35
35
  in?: boolean;
36
36
  appear?: boolean;
37
+ children: React.ReactElement;
37
38
  } & TransitionCallbacks>;
38
39
  export declare type TransitionType = boolean | TransitionComponent;
@@ -0,0 +1 @@
1
+ export default function transitionEndListener(element: HTMLElement, handler: (e: TransitionEvent) => void): void;
@@ -0,0 +1,19 @@
1
+ import css from 'dom-helpers/css';
2
+ import transitionEnd from 'dom-helpers/transitionEnd';
3
+
4
+ function parseDuration(node, property) {
5
+ var str = css(node, property) || '';
6
+ var mult = str.indexOf('ms') === -1 ? 1000 : 1;
7
+ return parseFloat(str) * mult;
8
+ }
9
+
10
+ export default function transitionEndListener(element, handler) {
11
+ var duration = parseDuration(element, 'transitionDuration');
12
+ var delay = parseDuration(element, 'transitionDelay');
13
+ var remove = transitionEnd(element, function (e) {
14
+ if (e.target === element) {
15
+ remove();
16
+ handler(e);
17
+ }
18
+ }, duration + delay);
19
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-bootstrap",
3
- "version": "1.4.2",
3
+ "version": "1.5.2",
4
4
  "description": "Bootstrap 4 components built with React",
5
5
  "keywords": [
6
6
  "react",
@@ -38,23 +38,23 @@
38
38
  "trailingComma": "all"
39
39
  },
40
40
  "dependencies": {
41
- "@babel/runtime": "^7.4.2",
41
+ "@babel/runtime": "^7.13.8",
42
42
  "@restart/context": "^2.1.4",
43
- "@restart/hooks": "^0.3.21",
43
+ "@restart/hooks": "^0.3.26",
44
44
  "@types/classnames": "^2.2.10",
45
45
  "@types/invariant": "^2.2.33",
46
46
  "@types/prop-types": "^15.7.3",
47
47
  "@types/react": ">=16.9.35",
48
- "@types/react-transition-group": "^4.4.0",
48
+ "@types/react-transition-group": "^4.4.1",
49
49
  "@types/warning": "^3.0.0",
50
50
  "classnames": "^2.2.6",
51
51
  "dom-helpers": "^5.1.2",
52
52
  "invariant": "^2.2.4",
53
53
  "prop-types": "^15.7.2",
54
54
  "prop-types-extra": "^1.1.0",
55
- "react-overlays": "^4.1.0",
55
+ "react-overlays": "^5.0.0",
56
56
  "react-transition-group": "^4.4.1",
57
- "uncontrollable": "^7.0.0",
57
+ "uncontrollable": "^7.2.1",
58
58
  "warning": "^4.0.3"
59
59
  },
60
60
  "peerDependencies": {
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "react-bootstrap/transitionEndListener",
3
+ "private": true,
4
+ "main": "../cjs/transitionEndListener.js",
5
+ "module": "../esm/transitionEndListener.js",
6
+ "types": "../esm/transitionEndListener.d.ts"
7
+ }