react-bootstrap 1.0.0-beta.12 → 1.0.0-beta.16
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.
- package/AbstractNav/package.json +6 -0
- package/AbstractNavItem/package.json +6 -0
- package/Accordion/package.json +7 -0
- package/AccordionCollapse/package.json +7 -0
- package/AccordionContext/package.json +6 -0
- package/AccordionToggle/package.json +7 -0
- package/AccordionToggle.d.ts +5 -0
- package/Alert/package.json +7 -0
- package/Alert.d.ts +4 -3
- package/Badge/package.json +7 -0
- package/Badge.d.ts +5 -2
- package/BootstrapModalManager/package.json +6 -0
- package/Breadcrumb/package.json +7 -0
- package/BreadcrumbItem/package.json +7 -0
- package/Button/package.json +7 -0
- package/ButtonGroup/package.json +7 -0
- package/ButtonToolbar/package.json +7 -0
- package/Card/package.json +7 -0
- package/CardColumns/package.json +7 -0
- package/CardContext/package.json +6 -0
- package/CardDeck/package.json +7 -0
- package/CardGroup/package.json +7 -0
- package/CardImg/package.json +7 -0
- package/Carousel/package.json +7 -0
- package/CarouselCaption/package.json +7 -0
- package/CarouselItem/package.json +7 -0
- package/CloseButton/package.json +7 -0
- package/Col/package.json +7 -0
- package/Collapse/package.json +7 -0
- package/Container/package.json +7 -0
- package/Dropdown/package.json +7 -0
- package/DropdownButton/package.json +7 -0
- package/DropdownItem/package.json +7 -0
- package/DropdownItem.d.ts +8 -3
- package/DropdownMenu/package.json +7 -0
- package/DropdownToggle/package.json +7 -0
- package/DropdownToggle.d.ts +4 -3
- package/ElementChildren/package.json +6 -0
- package/Fade/package.json +7 -0
- package/Feedback/package.json +7 -0
- package/Figure/package.json +7 -0
- package/FigureCaption/package.json +7 -0
- package/FigureImage/package.json +7 -0
- package/Form/package.json +7 -0
- package/FormCheck/package.json +7 -0
- package/FormCheck.d.ts +2 -3
- package/FormCheckInput/package.json +7 -0
- package/FormCheckInput.d.ts +3 -4
- package/FormCheckLabel/package.json +7 -0
- package/FormContext/package.json +6 -0
- package/FormControl/package.json +7 -0
- package/FormControl.d.ts +9 -6
- package/FormGroup/package.json +7 -0
- package/FormGroup.d.ts +2 -3
- package/FormLabel/package.json +7 -0
- package/FormText/package.json +7 -0
- package/Image/package.json +7 -0
- package/InputGroup/package.json +7 -0
- package/Jumbotron/package.json +7 -0
- package/ListGroup/package.json +7 -0
- package/ListGroupItem/package.json +7 -0
- package/Media/package.json +7 -0
- package/Modal/package.json +7 -0
- package/Modal.d.ts +2 -0
- package/ModalBody/package.json +7 -0
- package/ModalContext/package.json +6 -0
- package/ModalDialog/package.json +7 -0
- package/ModalFooter/package.json +7 -0
- package/ModalHeader/package.json +7 -0
- package/ModalTitle/package.json +7 -0
- package/Nav/package.json +7 -0
- package/NavContext/package.json +6 -0
- package/NavDropdown/package.json +7 -0
- package/NavItem/package.json +7 -0
- package/NavLink/package.json +7 -0
- package/NavLink.d.ts +8 -3
- package/Navbar/package.json +7 -0
- package/NavbarBrand/package.json +7 -0
- package/NavbarCollapse/package.json +7 -0
- package/NavbarContext/package.json +6 -0
- package/NavbarToggle/package.json +7 -0
- package/Overlay/package.json +7 -0
- package/OverlayTrigger/package.json +7 -0
- package/OverlayTrigger.d.ts +1 -0
- package/PageItem/package.json +7 -0
- package/Pagination/package.json +7 -0
- package/Popover/package.json +7 -0
- package/Popover.d.ts +1 -0
- package/PopoverContent/package.json +7 -0
- package/PopoverTitle/package.json +7 -0
- package/ProgressBar/package.json +7 -0
- package/README.md +9 -9
- package/ResponsiveEmbed/package.json +7 -0
- package/Row/package.json +7 -0
- package/SafeAnchor/package.json +7 -0
- package/SafeAnchor.d.ts +1 -1
- package/SelectableContext/package.json +6 -0
- package/Spinner/package.json +7 -0
- package/Spinner.d.ts +1 -1
- package/SplitButton/package.json +7 -0
- package/Switch/package.json +6 -0
- package/Tab/package.json +7 -0
- package/TabContainer/package.json +7 -0
- package/TabContent/package.json +7 -0
- package/TabContext/package.json +6 -0
- package/TabPane/package.json +7 -0
- package/Table/package.json +7 -0
- package/Tabs/package.json +7 -0
- package/Tabs.d.ts +8 -3
- package/ThemeProvider/package.json +7 -0
- package/Toast/package.json +7 -0
- package/ToastBody/package.json +7 -0
- package/ToastContext/package.json +6 -0
- package/ToastHeader/package.json +7 -0
- package/ToggleButton/package.json +7 -0
- package/ToggleButton.d.ts +5 -5
- package/ToggleButtonGroup/package.json +7 -0
- package/ToggleButtonGroup.d.ts +4 -3
- package/Tooltip/package.json +7 -0
- package/{AbstractNav.js → cjs/AbstractNav.js} +18 -16
- package/{AbstractNavItem.js → cjs/AbstractNavItem.js} +0 -0
- package/{Accordion.js → cjs/Accordion.js} +0 -0
- package/{AccordionCollapse.js → cjs/AccordionCollapse.js} +0 -0
- package/{AccordionContext.js → cjs/AccordionContext.js} +0 -0
- package/cjs/AccordionToggle.js +50 -0
- package/{Alert.js → cjs/Alert.js} +2 -2
- package/{Badge.js → cjs/Badge.js} +4 -2
- package/{utils → cjs}/BootstrapModalManager.js +9 -5
- package/{Breadcrumb.js → cjs/Breadcrumb.js} +0 -0
- package/{BreadcrumbItem.js → cjs/BreadcrumbItem.js} +0 -0
- package/{Button.js → cjs/Button.js} +0 -0
- package/{ButtonGroup.js → cjs/ButtonGroup.js} +0 -0
- package/{ButtonToolbar.js → cjs/ButtonToolbar.js} +0 -0
- package/{Card.js → cjs/Card.js} +2 -2
- package/{CardColumns.js → cjs/CardColumns.js} +1 -1
- package/{CardContext.js → cjs/CardContext.js} +0 -0
- package/{CardDeck.js → cjs/CardDeck.js} +1 -1
- package/{CardGroup.js → cjs/CardGroup.js} +1 -1
- package/{CardImg.js → cjs/CardImg.js} +0 -0
- package/{Carousel.js → cjs/Carousel.js} +9 -9
- package/{CarouselCaption.js → cjs/CarouselCaption.js} +1 -1
- package/{CarouselItem.js → cjs/CarouselItem.js} +1 -1
- package/{CloseButton.js → cjs/CloseButton.js} +0 -0
- package/{Col.js → cjs/Col.js} +0 -0
- package/{Collapse.js → cjs/Collapse.js} +7 -7
- package/{Container.js → cjs/Container.js} +0 -0
- package/{Dropdown.js → cjs/Dropdown.js} +5 -5
- package/{DropdownButton.js → cjs/DropdownButton.js} +0 -0
- package/{DropdownItem.js → cjs/DropdownItem.js} +0 -0
- package/{DropdownMenu.js → cjs/DropdownMenu.js} +39 -46
- package/cjs/DropdownToggle.js +59 -0
- package/{utils → cjs}/ElementChildren.js +0 -0
- package/{Fade.js → cjs/Fade.js} +4 -4
- package/{Feedback.js → cjs/Feedback.js} +0 -0
- package/{Figure.js → cjs/Figure.js} +1 -1
- package/{FigureCaption.js → cjs/FigureCaption.js} +1 -1
- package/{FigureImage.js → cjs/FigureImage.js} +0 -0
- package/{Form.js → cjs/Form.js} +9 -6
- package/{FormCheck.js → cjs/FormCheck.js} +17 -10
- package/{FormCheckInput.js → cjs/FormCheckInput.js} +9 -6
- package/{FormCheckLabel.js → cjs/FormCheckLabel.js} +5 -9
- package/{FormContext.js → cjs/FormContext.js} +0 -0
- package/{FormControl.js → cjs/FormControl.js} +0 -0
- package/{FormGroup.js → cjs/FormGroup.js} +0 -0
- package/{FormLabel.js → cjs/FormLabel.js} +0 -0
- package/{FormText.js → cjs/FormText.js} +0 -0
- package/cjs/Image.js +47 -0
- package/{InputGroup.js → cjs/InputGroup.js} +1 -1
- package/{Jumbotron.js → cjs/Jumbotron.js} +0 -0
- package/{ListGroup.js → cjs/ListGroup.js} +16 -3
- package/{ListGroupItem.js → cjs/ListGroupItem.js} +0 -0
- package/{Media.js → cjs/Media.js} +1 -1
- package/{Modal.js → cjs/Modal.js} +13 -11
- package/{ModalBody.js → cjs/ModalBody.js} +1 -1
- package/{ModalContext.js → cjs/ModalContext.js} +0 -0
- package/{ModalDialog.js → cjs/ModalDialog.js} +1 -1
- package/{ModalFooter.js → cjs/ModalFooter.js} +1 -1
- package/{ModalHeader.js → cjs/ModalHeader.js} +0 -0
- package/{ModalTitle.js → cjs/ModalTitle.js} +2 -2
- package/{Nav.js → cjs/Nav.js} +0 -0
- package/{NavContext.js → cjs/NavContext.js} +0 -0
- package/cjs/NavDropdown.js +90 -0
- package/{NavItem.js → cjs/NavItem.js} +0 -0
- package/{NavLink.js → cjs/NavLink.js} +0 -0
- package/{Navbar.js → cjs/Navbar.js} +1 -1
- package/{NavbarBrand.js → cjs/NavbarBrand.js} +0 -0
- package/{NavbarCollapse.js → cjs/NavbarCollapse.js} +0 -0
- package/{NavbarContext.js → cjs/NavbarContext.js} +0 -0
- package/{NavbarToggle.js → cjs/NavbarToggle.js} +1 -1
- package/{Overlay.js → cjs/Overlay.js} +0 -0
- package/{OverlayTrigger.js → cjs/OverlayTrigger.js} +2 -1
- package/{PageItem.js → cjs/PageItem.js} +7 -4
- package/cjs/Pagination.js +52 -0
- package/{Popover.js → cjs/Popover.js} +9 -10
- package/{PopoverContent.js → cjs/PopoverContent.js} +0 -0
- package/{PopoverTitle.js → cjs/PopoverTitle.js} +0 -0
- package/cjs/ProgressBar.js +149 -0
- package/cjs/ResponsiveEmbed.js +44 -0
- package/{Row.js → cjs/Row.js} +0 -0
- package/{SafeAnchor.js → cjs/SafeAnchor.js} +1 -1
- package/{SelectableContext.js → cjs/SelectableContext.js} +0 -0
- package/{Spinner.js → cjs/Spinner.js} +0 -0
- package/{SplitButton.js → cjs/SplitButton.js} +0 -0
- package/cjs/Switch.js +26 -0
- package/{Tab.js → cjs/Tab.js} +0 -0
- package/cjs/TabContainer.js +60 -0
- package/cjs/TabContent.js +34 -0
- package/{TabContext.js → cjs/TabContext.js} +0 -0
- package/{TabPane.js → cjs/TabPane.js} +0 -0
- package/cjs/Table.js +54 -0
- package/{Tabs.js → cjs/Tabs.js} +2 -3
- package/{ThemeProvider.js → cjs/ThemeProvider.js} +0 -0
- package/{Toast.js → cjs/Toast.js} +0 -0
- package/{ToastBody.js → cjs/ToastBody.js} +1 -1
- package/{ToastContext.js → cjs/ToastContext.js} +0 -0
- package/{ToastHeader.js → cjs/ToastHeader.js} +0 -0
- package/cjs/ToggleButton.js +67 -0
- package/cjs/ToggleButtonGroup.js +90 -0
- package/{Tooltip.js → cjs/Tooltip.js} +0 -0
- package/{utils → cjs}/createChainedFunction.js +0 -0
- package/{utils → cjs}/createWithBsPrefix.js +3 -3
- package/{utils → cjs}/divWithClassName.js +0 -0
- package/{index.js → cjs/index.js} +14 -2
- package/{utils → cjs}/triggerBrowserReflow.js +0 -0
- package/cjs/useWrappedRefWithWarning.js +24 -0
- package/createChainedFunction/package.json +6 -0
- package/createWithBsPrefix/package.json +6 -0
- package/dist/react-bootstrap.js +9369 -11849
- package/dist/react-bootstrap.min.js +4 -18
- package/divWithClassName/package.json +6 -0
- package/{es → esm}/AbstractNav.js +17 -15
- package/{es → esm}/AbstractNavItem.js +0 -0
- package/{es → esm}/Accordion.d.ts +0 -0
- package/{es → esm}/Accordion.js +0 -0
- package/{es → esm}/AccordionCollapse.d.ts +0 -0
- package/{es → esm}/AccordionCollapse.js +0 -0
- package/{es → esm}/AccordionContext.js +0 -0
- package/{es → esm}/AccordionToggle.d.ts +5 -0
- package/{es → esm}/AccordionToggle.js +16 -2
- package/{es → esm}/Alert.d.ts +4 -3
- package/{es → esm}/Alert.js +2 -2
- package/{es → esm}/Badge.d.ts +5 -2
- package/{es → esm}/Badge.js +4 -2
- package/{es/utils → esm}/BootstrapModalManager.js +9 -5
- package/{es → esm}/Breadcrumb.d.ts +0 -0
- package/{es → esm}/Breadcrumb.js +0 -0
- package/{es → esm}/BreadcrumbItem.d.ts +0 -0
- package/{es → esm}/BreadcrumbItem.js +0 -0
- package/{es → esm}/Button.d.ts +0 -0
- package/{es → esm}/Button.js +0 -0
- package/{es → esm}/ButtonGroup.d.ts +0 -0
- package/{es → esm}/ButtonGroup.js +0 -0
- package/{es → esm}/ButtonToolbar.d.ts +0 -0
- package/{es → esm}/ButtonToolbar.js +0 -0
- package/{es → esm}/Card.d.ts +0 -0
- package/{es → esm}/Card.js +2 -2
- package/{es → esm}/CardColumns.d.ts +0 -0
- package/esm/CardColumns.js +2 -0
- package/{es → esm}/CardContext.js +0 -0
- package/{es → esm}/CardDeck.d.ts +0 -0
- package/esm/CardDeck.js +2 -0
- package/{es → esm}/CardGroup.d.ts +0 -0
- package/esm/CardGroup.js +2 -0
- package/{es → esm}/CardImg.d.ts +0 -0
- package/{es → esm}/CardImg.js +0 -0
- package/{es → esm}/Carousel.d.ts +0 -0
- package/{es → esm}/Carousel.js +6 -6
- package/{es → esm}/CarouselCaption.d.ts +0 -0
- package/{es → esm}/CarouselCaption.js +1 -1
- package/{es → esm}/CarouselItem.d.ts +0 -0
- package/esm/CarouselItem.js +2 -0
- package/{es → esm}/CloseButton.d.ts +0 -0
- package/{es → esm}/CloseButton.js +0 -0
- package/{es → esm}/Col.d.ts +0 -0
- package/{es → esm}/Col.js +0 -0
- package/{es → esm}/Collapse.d.ts +0 -0
- package/{es → esm}/Collapse.js +6 -6
- package/{es → esm}/Container.d.ts +0 -0
- package/{es → esm}/Container.js +0 -0
- package/{es → esm}/Dropdown.d.ts +0 -0
- package/{es → esm}/Dropdown.js +4 -4
- package/{es → esm}/DropdownButton.d.ts +0 -0
- package/{es → esm}/DropdownButton.js +0 -0
- package/{es → esm}/DropdownItem.d.ts +8 -3
- package/{es → esm}/DropdownItem.js +0 -0
- package/{es → esm}/DropdownMenu.d.ts +0 -0
- package/esm/DropdownMenu.js +69 -0
- package/esm/DropdownToggle.d.ts +18 -0
- package/esm/DropdownToggle.js +40 -0
- package/{es/utils → esm}/ElementChildren.js +0 -0
- package/{es → esm}/Fade.d.ts +0 -0
- package/{es → esm}/Fade.js +3 -3
- package/{es → esm}/Feedback.d.ts +0 -0
- package/{es → esm}/Feedback.js +0 -0
- package/{es → esm}/Figure.d.ts +0 -0
- package/{es → esm}/Figure.js +1 -1
- package/{es → esm}/FigureCaption.d.ts +0 -0
- package/esm/FigureCaption.js +5 -0
- package/{es → esm}/FigureImage.d.ts +0 -0
- package/{es → esm}/FigureImage.js +0 -0
- package/{es → esm}/Form.d.ts +0 -0
- package/{es → esm}/Form.js +6 -4
- package/{es → esm}/FormCheck.d.ts +2 -3
- package/{es → esm}/FormCheck.js +14 -8
- package/{es → esm}/FormCheckInput.d.ts +3 -4
- package/{es → esm}/FormCheckInput.js +8 -6
- package/{es → esm}/FormCheckLabel.d.ts +0 -0
- package/{es → esm}/FormCheckLabel.js +5 -9
- package/{es → esm}/FormContext.js +0 -0
- package/{es → esm}/FormControl.d.ts +9 -6
- package/{es → esm}/FormControl.js +0 -0
- package/{es → esm}/FormGroup.d.ts +2 -3
- package/{es → esm}/FormGroup.js +0 -0
- package/{es → esm}/FormLabel.d.ts +0 -0
- package/{es → esm}/FormLabel.js +0 -0
- package/{es → esm}/FormText.d.ts +0 -0
- package/{es → esm}/FormText.js +0 -0
- package/{es → esm}/Image.d.ts +0 -0
- package/esm/Image.js +32 -0
- package/{es → esm}/InputGroup.d.ts +0 -0
- package/{es → esm}/InputGroup.js +1 -1
- package/{es → esm}/Jumbotron.d.ts +0 -0
- package/{es → esm}/Jumbotron.js +0 -0
- package/{es → esm}/ListGroup.d.ts +0 -0
- package/{es → esm}/ListGroup.js +15 -3
- package/{es → esm}/ListGroupItem.d.ts +0 -0
- package/{es → esm}/ListGroupItem.js +0 -0
- package/{es → esm}/Media.d.ts +0 -0
- package/{es → esm}/Media.js +1 -1
- package/{es → esm}/Modal.d.ts +2 -0
- package/{es → esm}/Modal.js +9 -8
- package/{es → esm}/ModalBody.d.ts +0 -0
- package/esm/ModalBody.js +2 -0
- package/{es → esm}/ModalContext.js +0 -0
- package/{es → esm}/ModalDialog.d.ts +0 -0
- package/{es → esm}/ModalDialog.js +1 -1
- package/{es → esm}/ModalFooter.d.ts +0 -0
- package/esm/ModalFooter.js +2 -0
- package/{es → esm}/ModalHeader.d.ts +0 -0
- package/{es → esm}/ModalHeader.js +0 -0
- package/{es → esm}/ModalTitle.d.ts +0 -0
- package/{es → esm}/ModalTitle.js +2 -2
- package/{es → esm}/Nav.d.ts +0 -0
- package/{es → esm}/Nav.js +0 -0
- package/{es → esm}/NavContext.js +0 -0
- package/{es → esm}/NavDropdown.d.ts +0 -0
- package/esm/NavDropdown.js +73 -0
- package/{es → esm}/NavItem.d.ts +0 -0
- package/{es → esm}/NavItem.js +0 -0
- package/esm/NavLink.d.ts +25 -0
- package/{es → esm}/NavLink.js +0 -0
- package/{es → esm}/Navbar.d.ts +0 -0
- package/{es → esm}/Navbar.js +1 -1
- package/{es → esm}/NavbarBrand.d.ts +0 -0
- package/{es → esm}/NavbarBrand.js +0 -0
- package/{es → esm}/NavbarCollapse.d.ts +0 -0
- package/{es → esm}/NavbarCollapse.js +0 -0
- package/{es → esm}/NavbarContext.js +0 -0
- package/{es → esm}/NavbarToggle.d.ts +0 -0
- package/{es → esm}/NavbarToggle.js +1 -1
- package/{es → esm}/Overlay.d.ts +0 -0
- package/{es → esm}/Overlay.js +0 -0
- package/{es → esm}/OverlayTrigger.d.ts +1 -0
- package/{es → esm}/OverlayTrigger.js +3 -1
- package/{es → esm}/PageItem.d.ts +0 -0
- package/{es → esm}/PageItem.js +5 -2
- package/{es → esm}/Pagination.d.ts +0 -0
- package/esm/Pagination.js +36 -0
- package/{es → esm}/Popover.d.ts +1 -0
- package/{es → esm}/Popover.js +10 -13
- package/{es → esm}/PopoverContent.d.ts +0 -0
- package/{es → esm}/PopoverContent.js +0 -0
- package/{es → esm}/PopoverTitle.d.ts +0 -0
- package/{es → esm}/PopoverTitle.js +0 -0
- package/{es → esm}/ProgressBar.d.ts +0 -0
- package/esm/ProgressBar.js +131 -0
- package/{es → esm}/ResponsiveEmbed.d.ts +0 -0
- package/esm/ResponsiveEmbed.js +27 -0
- package/{es → esm}/Row.d.ts +0 -0
- package/{es → esm}/Row.js +0 -0
- package/{es → esm}/SafeAnchor.d.ts +1 -1
- package/{es → esm}/SafeAnchor.js +1 -1
- package/{es → esm}/SelectableContext.js +0 -0
- package/{es → esm}/Spinner.d.ts +1 -1
- package/{es → esm}/Spinner.js +0 -0
- package/{es → esm}/SplitButton.d.ts +0 -0
- package/{es → esm}/SplitButton.js +0 -0
- package/esm/Switch.js +13 -0
- package/{es → esm}/Tab.d.ts +0 -0
- package/{es → esm}/Tab.js +0 -0
- package/{es → esm}/TabContainer.d.ts +0 -0
- package/esm/TabContainer.js +47 -0
- package/{es → esm}/TabContent.d.ts +0 -0
- package/esm/TabContent.js +20 -0
- package/{es → esm}/TabContext.js +0 -0
- package/{es → esm}/TabPane.d.ts +0 -0
- package/{es → esm}/TabPane.js +0 -0
- package/{es → esm}/Table.d.ts +0 -0
- package/esm/Table.js +39 -0
- package/{es → esm}/Tabs.d.ts +8 -3
- package/{es → esm}/Tabs.js +2 -3
- package/{es → esm}/ThemeProvider.d.ts +0 -0
- package/{es → esm}/ThemeProvider.js +0 -0
- package/{es → esm}/Toast.d.ts +0 -0
- package/{es → esm}/Toast.js +0 -0
- package/{es → esm}/ToastBody.d.ts +0 -0
- package/esm/ToastBody.js +2 -0
- package/{es → esm}/ToastContext.js +0 -0
- package/{es → esm}/ToastHeader.d.ts +0 -0
- package/{es → esm}/ToastHeader.js +0 -0
- package/{es → esm}/ToggleButton.d.ts +5 -5
- package/esm/ToggleButton.js +51 -0
- package/{es → esm}/ToggleButtonGroup.d.ts +4 -3
- package/esm/ToggleButtonGroup.js +70 -0
- package/{es → esm}/Tooltip.d.ts +0 -0
- package/{es → esm}/Tooltip.js +0 -0
- package/{es/utils → esm}/createChainedFunction.js +0 -0
- package/{es/utils → esm}/createWithBsPrefix.js +2 -2
- package/{es/utils → esm}/divWithClassName.js +0 -0
- package/{es → esm}/helpers.d.ts +6 -0
- package/{es → esm}/index.d.ts +2 -0
- package/{es → esm}/index.js +7 -2
- package/{es/utils → esm}/triggerBrowserReflow.js +0 -0
- package/esm/useWrappedRefWithWarning.js +12 -0
- package/helpers.d.ts +6 -0
- package/index.d.ts +2 -0
- package/package.json +18 -10
- package/triggerBrowserReflow/package.json +6 -0
- package/useWrappedRefWithWarning/package.json +6 -0
- package/AccordionToggle.js +0 -32
- package/DropdownToggle.js +0 -86
- package/Image.js +0 -59
- package/NavDropdown.js +0 -67
- package/Pagination.js +0 -67
- package/ProgressBar.js +0 -161
- package/ResponsiveEmbed.js +0 -60
- package/TabContainer.js +0 -96
- package/TabContent.js +0 -50
- package/Table.js +0 -70
- package/ToggleButton.js +0 -100
- package/ToggleButtonGroup.js +0 -111
- package/es/CardColumns.js +0 -2
- package/es/CardDeck.js +0 -2
- package/es/CardGroup.js +0 -2
- package/es/CarouselItem.js +0 -2
- package/es/DropdownMenu.js +0 -78
- package/es/DropdownToggle.d.ts +0 -17
- package/es/DropdownToggle.js +0 -66
- package/es/FigureCaption.js +0 -5
- package/es/Image.js +0 -44
- package/es/ModalBody.js +0 -2
- package/es/ModalFooter.js +0 -2
- package/es/NavDropdown.js +0 -53
- package/es/NavLink.d.ts +0 -20
- package/es/Pagination.js +0 -51
- package/es/ProgressBar.js +0 -142
- package/es/ResponsiveEmbed.js +0 -42
- package/es/TabContainer.js +0 -81
- package/es/TabContent.js +0 -36
- package/es/Table.js +0 -55
- package/es/ToastBody.js +0 -2
- package/es/ToggleButton.js +0 -86
- package/es/ToggleButtonGroup.js +0 -93
- package/es/useAccordionToggle.js +0 -16
- package/useAccordionToggle.js +0 -29
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import qsa from 'dom-helpers/querySelectorAll';
|
|
4
|
+
import React, { useContext, useEffect, useRef } from 'react';
|
|
5
|
+
import useForceUpdate from '@restart/hooks/useForceUpdate';
|
|
5
6
|
import useMergedRefs from '@restart/hooks/useMergedRefs';
|
|
6
|
-
import SelectableContext, { makeEventKey } from './SelectableContext';
|
|
7
7
|
import NavContext from './NavContext';
|
|
8
|
+
import SelectableContext, { makeEventKey } from './SelectableContext';
|
|
8
9
|
import TabContext from './TabContext';
|
|
9
10
|
|
|
10
11
|
var noop = function noop() {};
|
|
11
12
|
|
|
12
|
-
var defaultProps = {
|
|
13
|
-
role: 'tablist'
|
|
14
|
-
};
|
|
15
13
|
var AbstractNav = React.forwardRef(function (_ref, ref) {
|
|
16
14
|
var _ref$as = _ref.as,
|
|
17
15
|
Component = _ref$as === void 0 ? 'ul' : _ref$as,
|
|
@@ -21,20 +19,21 @@ var AbstractNav = React.forwardRef(function (_ref, ref) {
|
|
|
21
19
|
onKeyDown = _ref.onKeyDown,
|
|
22
20
|
props = _objectWithoutPropertiesLoose(_ref, ["as", "onSelect", "activeKey", "role", "onKeyDown"]);
|
|
23
21
|
|
|
22
|
+
// A ref and forceUpdate for refocus, b/c we only want to trigger when needed
|
|
23
|
+
// and don't want to reset the set in the effect
|
|
24
|
+
var forceUpdate = useForceUpdate();
|
|
25
|
+
var needsRefocusRef = useRef(false);
|
|
24
26
|
var parentOnSelect = useContext(SelectableContext);
|
|
25
27
|
var tabContext = useContext(TabContext);
|
|
26
28
|
var getControlledId, getControllerId;
|
|
27
29
|
|
|
28
30
|
if (tabContext) {
|
|
31
|
+
role = role || 'tablist';
|
|
29
32
|
activeKey = tabContext.activeKey;
|
|
30
33
|
getControlledId = tabContext.getControlledId;
|
|
31
34
|
getControllerId = tabContext.getControllerId;
|
|
32
35
|
}
|
|
33
36
|
|
|
34
|
-
var _useState = useState(false),
|
|
35
|
-
needsRefocus = _useState[0],
|
|
36
|
-
setRefocus = _useState[1];
|
|
37
|
-
|
|
38
37
|
var listNode = useRef(null);
|
|
39
38
|
|
|
40
39
|
var getNextActiveChild = function getNextActiveChild(offset) {
|
|
@@ -77,15 +76,18 @@ var AbstractNav = React.forwardRef(function (_ref, ref) {
|
|
|
77
76
|
if (!nextActiveChild) return;
|
|
78
77
|
event.preventDefault();
|
|
79
78
|
handleSelect(nextActiveChild.dataset.rbEventKey, event);
|
|
80
|
-
|
|
79
|
+
needsRefocusRef.current = true;
|
|
80
|
+
forceUpdate();
|
|
81
81
|
};
|
|
82
82
|
|
|
83
83
|
useEffect(function () {
|
|
84
|
-
if (listNode.current &&
|
|
84
|
+
if (listNode.current && needsRefocusRef.current) {
|
|
85
85
|
var activeChild = listNode.current.querySelector('[data-rb-event-key].active');
|
|
86
86
|
if (activeChild) activeChild.focus();
|
|
87
87
|
}
|
|
88
|
-
|
|
88
|
+
|
|
89
|
+
needsRefocusRef.current = false;
|
|
90
|
+
});
|
|
89
91
|
var mergedRef = useMergedRefs(ref, listNode);
|
|
90
92
|
return React.createElement(SelectableContext.Provider, {
|
|
91
93
|
value: handleSelect
|
|
@@ -99,8 +101,8 @@ var AbstractNav = React.forwardRef(function (_ref, ref) {
|
|
|
99
101
|
}
|
|
100
102
|
}, React.createElement(Component, _extends({}, props, {
|
|
101
103
|
onKeyDown: handleKeyDown,
|
|
102
|
-
ref: mergedRef
|
|
104
|
+
ref: mergedRef,
|
|
105
|
+
role: role
|
|
103
106
|
}))));
|
|
104
107
|
});
|
|
105
|
-
AbstractNav.defaultProps = defaultProps;
|
|
106
108
|
export default AbstractNav;
|
|
File without changes
|
|
File without changes
|
package/{es → esm}/Accordion.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -7,6 +7,11 @@ export interface AccordionToggleProps {
|
|
|
7
7
|
onClick?: (event?: React.SyntheticEvent) => void;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
export function useAccordionToggle(
|
|
11
|
+
eventKey: string,
|
|
12
|
+
onClick: (event?: React.SyntheticEvent) => void,
|
|
13
|
+
): (event?: React.SyntheticEvent) => void;
|
|
14
|
+
|
|
10
15
|
declare class AccordionToggle<
|
|
11
16
|
As extends React.ElementType = 'button'
|
|
12
17
|
> extends BsPrefixComponent<As, AccordionToggleProps> {}
|
|
@@ -1,7 +1,21 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import
|
|
3
|
+
import React, { useContext } from 'react';
|
|
4
|
+
import SelectableContext from './SelectableContext';
|
|
5
|
+
import AccordionContext from './AccordionContext';
|
|
6
|
+
export function useAccordionToggle(eventKey, onClick) {
|
|
7
|
+
var contextEventKey = useContext(AccordionContext);
|
|
8
|
+
var onSelect = useContext(SelectableContext);
|
|
9
|
+
return function (e) {
|
|
10
|
+
/*
|
|
11
|
+
Compare the event key in context with the given event key.
|
|
12
|
+
If they are the same, then collapse the component.
|
|
13
|
+
*/
|
|
14
|
+
var eventKeyPassed = eventKey === contextEventKey ? null : eventKey;
|
|
15
|
+
onSelect(eventKeyPassed, e);
|
|
16
|
+
if (onClick) onClick(e);
|
|
17
|
+
};
|
|
18
|
+
}
|
|
5
19
|
var AccordionToggle = React.forwardRef(function (_ref, ref) {
|
|
6
20
|
var _ref$as = _ref.as,
|
|
7
21
|
Component = _ref$as === void 0 ? 'button' : _ref$as,
|
package/{es → esm}/Alert.d.ts
RENAMED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
import SafeAnchor from './SafeAnchor';
|
|
3
|
+
import SafeAnchor, { SafeAnchorProps } from './SafeAnchor';
|
|
4
4
|
|
|
5
|
-
import { BsPrefixComponent } from './helpers';
|
|
5
|
+
import { BsPrefixComponent, BsPrefixComponentClass } from './helpers';
|
|
6
6
|
|
|
7
7
|
export class AlertLink<
|
|
8
|
-
|
|
8
|
+
// Need to use BsPrefixComponentClass to get proper type checking.
|
|
9
|
+
As extends React.ElementType = BsPrefixComponentClass<'a', SafeAnchorProps>
|
|
9
10
|
> extends BsPrefixComponent<As> {}
|
|
10
11
|
|
|
11
12
|
export class AlertHeading<
|
package/{es → esm}/Alert.js
RENAMED
|
@@ -4,8 +4,8 @@ import classNames from 'classnames';
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { useUncontrolled } from 'uncontrollable';
|
|
6
6
|
import useEventCallback from '@restart/hooks/useEventCallback';
|
|
7
|
-
import createWithBsPrefix from './
|
|
8
|
-
import divWithClassName from './
|
|
7
|
+
import createWithBsPrefix from './createWithBsPrefix';
|
|
8
|
+
import divWithClassName from './divWithClassName';
|
|
9
9
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
10
10
|
import Fade from './Fade';
|
|
11
11
|
import CloseButton from './CloseButton';
|
package/{es → esm}/Badge.d.ts
RENAMED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { BsPrefixComponent } from './helpers';
|
|
2
3
|
|
|
3
|
-
export interface BadgeProps
|
|
4
|
+
export interface BadgeProps {
|
|
4
5
|
bsPrefix?: string;
|
|
5
6
|
variant?:
|
|
6
7
|
| 'primary'
|
|
@@ -14,6 +15,8 @@ export interface BadgeProps extends React.HTMLProps<HTMLSpanElement> {
|
|
|
14
15
|
pill?: boolean;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
|
-
declare
|
|
18
|
+
declare class Badge<
|
|
19
|
+
As extends React.ElementType = 'span'
|
|
20
|
+
> extends BsPrefixComponent<As, BadgeProps> {}
|
|
18
21
|
|
|
19
22
|
export default Badge;
|
package/{es → esm}/Badge.js
RENAMED
|
@@ -11,10 +11,12 @@ var Badge = React.forwardRef(function (_ref, ref) {
|
|
|
11
11
|
variant = _ref.variant,
|
|
12
12
|
pill = _ref.pill,
|
|
13
13
|
className = _ref.className,
|
|
14
|
-
|
|
14
|
+
_ref$as = _ref.as,
|
|
15
|
+
Component = _ref$as === void 0 ? 'span' : _ref$as,
|
|
16
|
+
props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "variant", "pill", "className", "as"]);
|
|
15
17
|
|
|
16
18
|
var prefix = useBootstrapPrefix(bsPrefix, 'badge');
|
|
17
|
-
return React.createElement(
|
|
19
|
+
return React.createElement(Component, _extends({
|
|
18
20
|
ref: ref
|
|
19
21
|
}, props, {
|
|
20
22
|
className: classNames(className, prefix, pill && prefix + "-pill", variant && prefix + "-" + variant)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import getScrollbarSize from 'dom-helpers/
|
|
2
|
+
import css from 'dom-helpers/css';
|
|
3
|
+
import qsa from 'dom-helpers/querySelectorAll';
|
|
4
|
+
import getScrollbarSize from 'dom-helpers/scrollbarSize';
|
|
5
5
|
import ModalManager from 'react-overlays/ModalManager';
|
|
6
6
|
var Selector = {
|
|
7
7
|
FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',
|
|
@@ -24,17 +24,21 @@ function (_ModalManager) {
|
|
|
24
24
|
_this = _ModalManager.call.apply(_ModalManager, [this].concat(args)) || this;
|
|
25
25
|
|
|
26
26
|
_this.adjustAndStore = function (prop, element, adjust) {
|
|
27
|
+
var _css;
|
|
28
|
+
|
|
27
29
|
var actual = element.style[prop];
|
|
28
30
|
element.dataset[prop] = actual;
|
|
29
|
-
css(element,
|
|
31
|
+
css(element, (_css = {}, _css[prop] = parseFloat(css(element, prop)) + adjust + "px", _css));
|
|
30
32
|
};
|
|
31
33
|
|
|
32
34
|
_this.restore = function (prop, element) {
|
|
33
35
|
var value = element.dataset[prop];
|
|
34
36
|
|
|
35
37
|
if (value !== undefined) {
|
|
38
|
+
var _css2;
|
|
39
|
+
|
|
36
40
|
delete element.dataset[prop];
|
|
37
|
-
css(element, prop,
|
|
41
|
+
css(element, (_css2 = {}, _css2[prop] = value, _css2));
|
|
38
42
|
}
|
|
39
43
|
};
|
|
40
44
|
|
|
File without changes
|
package/{es → esm}/Breadcrumb.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/{es → esm}/Button.d.ts
RENAMED
|
File without changes
|
package/{es → esm}/Button.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/{es → esm}/Card.d.ts
RENAMED
|
File without changes
|
package/{es → esm}/Card.js
RENAMED
|
@@ -3,8 +3,8 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWith
|
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import React, { useMemo } from 'react';
|
|
5
5
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
6
|
-
import createWithBsPrefix from './
|
|
7
|
-
import divWithClassName from './
|
|
6
|
+
import createWithBsPrefix from './createWithBsPrefix';
|
|
7
|
+
import divWithClassName from './divWithClassName';
|
|
8
8
|
import CardContext from './CardContext';
|
|
9
9
|
import CardImg from './CardImg';
|
|
10
10
|
var DivStyledAsH5 = divWithClassName('h5');
|
|
File without changes
|
|
File without changes
|
package/{es → esm}/CardDeck.d.ts
RENAMED
|
File without changes
|
package/esm/CardDeck.js
ADDED
|
File without changes
|
package/esm/CardGroup.js
ADDED
package/{es → esm}/CardImg.d.ts
RENAMED
|
File without changes
|
package/{es → esm}/CardImg.js
RENAMED
|
File without changes
|
package/{es → esm}/Carousel.d.ts
RENAMED
|
File without changes
|
package/{es → esm}/Carousel.js
RENAMED
|
@@ -2,16 +2,16 @@ import _extends from "@babel/runtime/helpers/esm/extends";
|
|
|
2
2
|
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
3
|
import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
-
import styles from 'dom-helpers/
|
|
6
|
-
import
|
|
5
|
+
import styles from 'dom-helpers/css';
|
|
6
|
+
import transitionEnd from 'dom-helpers/transitionEnd';
|
|
7
7
|
import React, { cloneElement } from 'react';
|
|
8
8
|
import { uncontrollable } from 'uncontrollable';
|
|
9
9
|
import CarouselCaption from './CarouselCaption';
|
|
10
10
|
import CarouselItem from './CarouselItem';
|
|
11
|
+
import { forEach, map } from './ElementChildren';
|
|
11
12
|
import SafeAnchor from './SafeAnchor';
|
|
12
|
-
import { map, forEach } from './utils/ElementChildren';
|
|
13
|
-
import triggerBrowserReflow from './utils/triggerBrowserReflow';
|
|
14
13
|
import { createBootstrapComponent } from './ThemeProvider';
|
|
14
|
+
import triggerBrowserReflow from './triggerBrowserReflow';
|
|
15
15
|
|
|
16
16
|
var countChildren = function countChildren(c) {
|
|
17
17
|
return React.Children.toArray(c).filter(React.isValidElement).length;
|
|
@@ -226,7 +226,7 @@ function (_React$Component) {
|
|
|
226
226
|
prevClasses: classNames('active', directionalClassName),
|
|
227
227
|
currentClasses: classNames(orderClassName, directionalClassName)
|
|
228
228
|
}, function () {
|
|
229
|
-
return
|
|
229
|
+
return transitionEnd(nextElement, function () {
|
|
230
230
|
_this2.safeSetState({
|
|
231
231
|
prevClasses: '',
|
|
232
232
|
currentClasses: 'active'
|
|
@@ -395,7 +395,7 @@ function (_React$Component) {
|
|
|
395
395
|
var current = index === activeIndex;
|
|
396
396
|
var previous = index === previousActiveIndex;
|
|
397
397
|
return cloneElement(child, {
|
|
398
|
-
className: classNames(child.props.className,
|
|
398
|
+
className: classNames(child.props.className, current && currentClasses, previous && prevClasses)
|
|
399
399
|
});
|
|
400
400
|
})), controls && this.renderControls({
|
|
401
401
|
wrap: wrap,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/{es → esm}/Col.d.ts
RENAMED
|
File without changes
|
package/{es → esm}/Col.js
RENAMED
|
File without changes
|
package/{es → esm}/Collapse.d.ts
RENAMED
|
File without changes
|
package/{es → esm}/Collapse.js
RENAMED
|
@@ -5,12 +5,12 @@ import _inheritsLoose from "@babel/runtime/helpers/esm/inheritsLoose";
|
|
|
5
5
|
var _collapseStyles;
|
|
6
6
|
|
|
7
7
|
import classNames from 'classnames';
|
|
8
|
-
import css from 'dom-helpers/
|
|
8
|
+
import css from 'dom-helpers/css';
|
|
9
|
+
import transitionEnd from 'dom-helpers/transitionEnd';
|
|
9
10
|
import React from 'react';
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import triggerBrowserReflow from './
|
|
13
|
-
import createChainedFunction from './utils/createChainedFunction';
|
|
11
|
+
import Transition, { ENTERED, ENTERING, EXITED, EXITING } from 'react-transition-group/Transition';
|
|
12
|
+
import createChainedFunction from './createChainedFunction';
|
|
13
|
+
import triggerBrowserReflow from './triggerBrowserReflow';
|
|
14
14
|
var MARGINS = {
|
|
15
15
|
height: ['marginTop', 'marginBottom'],
|
|
16
16
|
width: ['marginLeft', 'marginRight']
|
|
@@ -111,7 +111,7 @@ function (_React$Component) {
|
|
|
111
111
|
var handleExit = createChainedFunction(this.handleExit, onExit);
|
|
112
112
|
var handleExiting = createChainedFunction(this.handleExiting, onExiting);
|
|
113
113
|
return React.createElement(Transition, _extends({
|
|
114
|
-
addEndListener:
|
|
114
|
+
addEndListener: transitionEnd
|
|
115
115
|
}, props, {
|
|
116
116
|
"aria-expanded": props.role ? props.in : null,
|
|
117
117
|
onEnter: handleEnter,
|
|
File without changes
|
package/{es → esm}/Container.js
RENAMED
|
File without changes
|
package/{es → esm}/Dropdown.d.ts
RENAMED
|
File without changes
|
package/{es → esm}/Dropdown.js
RENAMED
|
@@ -5,12 +5,12 @@ import React, { useContext } from 'react';
|
|
|
5
5
|
import BaseDropdown from 'react-overlays/Dropdown';
|
|
6
6
|
import { useUncontrolled } from 'uncontrollable';
|
|
7
7
|
import useEventCallback from '@restart/hooks/useEventCallback';
|
|
8
|
-
import
|
|
8
|
+
import DropdownItem from './DropdownItem';
|
|
9
9
|
import DropdownMenu from './DropdownMenu';
|
|
10
10
|
import DropdownToggle from './DropdownToggle';
|
|
11
|
-
import DropdownItem from './DropdownItem';
|
|
12
11
|
import SelectableContext from './SelectableContext';
|
|
13
|
-
import
|
|
12
|
+
import { useBootstrapPrefix } from './ThemeProvider';
|
|
13
|
+
import createWithBsPrefix from './createWithBsPrefix';
|
|
14
14
|
var defaultProps = {
|
|
15
15
|
navbar: false
|
|
16
16
|
};
|
|
@@ -50,7 +50,7 @@ var Dropdown = React.forwardRef(function (uncontrolledProps, ref) {
|
|
|
50
50
|
});
|
|
51
51
|
return React.createElement(SelectableContext.Provider, {
|
|
52
52
|
value: handleSelect
|
|
53
|
-
}, React.createElement(BaseDropdown
|
|
53
|
+
}, React.createElement(BaseDropdown, {
|
|
54
54
|
drop: drop,
|
|
55
55
|
show: show,
|
|
56
56
|
alignEnd: alignRight,
|
|
File without changes
|
|
File without changes
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
|
|
3
|
-
import SafeAnchor from './SafeAnchor';
|
|
3
|
+
import SafeAnchor, { SafeAnchorProps } from './SafeAnchor';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
BsPrefixComponent,
|
|
7
|
+
SelectCallback,
|
|
8
|
+
BsPrefixComponentClass,
|
|
9
|
+
} from './helpers';
|
|
6
10
|
|
|
7
11
|
export interface DropdownItemProps {
|
|
8
12
|
active?: boolean;
|
|
@@ -14,7 +18,8 @@ export interface DropdownItemProps {
|
|
|
14
18
|
}
|
|
15
19
|
|
|
16
20
|
declare class DropdownItem<
|
|
17
|
-
|
|
21
|
+
// Need to use BsPrefixComponentClass to get proper type checking.
|
|
22
|
+
As extends React.ElementType = BsPrefixComponentClass<'a', SafeAnchorProps>
|
|
18
23
|
> extends BsPrefixComponent<As, DropdownItemProps> {}
|
|
19
24
|
|
|
20
25
|
export default DropdownItem;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import React, { useContext } from 'react';
|
|
5
|
+
import { useDropdownMenu } from 'react-overlays/DropdownMenu';
|
|
6
|
+
import useMergedRefs from '@restart/hooks/useMergedRefs';
|
|
7
|
+
import NavbarContext from './NavbarContext';
|
|
8
|
+
import { useBootstrapPrefix } from './ThemeProvider';
|
|
9
|
+
import useWrappedRefWithWarning from './useWrappedRefWithWarning';
|
|
10
|
+
var defaultProps = {
|
|
11
|
+
alignRight: false,
|
|
12
|
+
flip: true
|
|
13
|
+
};
|
|
14
|
+
var DropdownMenu = React.forwardRef(function (_ref, ref) {
|
|
15
|
+
var bsPrefix = _ref.bsPrefix,
|
|
16
|
+
className = _ref.className,
|
|
17
|
+
alignRight = _ref.alignRight,
|
|
18
|
+
rootCloseEvent = _ref.rootCloseEvent,
|
|
19
|
+
flip = _ref.flip,
|
|
20
|
+
popperConfig = _ref.popperConfig,
|
|
21
|
+
showProps = _ref.show,
|
|
22
|
+
_ref$as = _ref.as,
|
|
23
|
+
Component = _ref$as === void 0 ? 'div' : _ref$as,
|
|
24
|
+
props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "className", "alignRight", "rootCloseEvent", "flip", "popperConfig", "show", "as"]);
|
|
25
|
+
|
|
26
|
+
var isNavbar = useContext(NavbarContext);
|
|
27
|
+
var prefix = useBootstrapPrefix(bsPrefix, 'dropdown-menu');
|
|
28
|
+
|
|
29
|
+
var _useDropdownMenu = useDropdownMenu({
|
|
30
|
+
flip: flip,
|
|
31
|
+
popperConfig: popperConfig,
|
|
32
|
+
rootCloseEvent: rootCloseEvent,
|
|
33
|
+
show: showProps,
|
|
34
|
+
alignEnd: alignRight,
|
|
35
|
+
usePopper: !isNavbar
|
|
36
|
+
}),
|
|
37
|
+
hasShown = _useDropdownMenu.hasShown,
|
|
38
|
+
placement = _useDropdownMenu.placement,
|
|
39
|
+
show = _useDropdownMenu.show,
|
|
40
|
+
alignEnd = _useDropdownMenu.alignEnd,
|
|
41
|
+
close = _useDropdownMenu.close,
|
|
42
|
+
menuProps = _useDropdownMenu.props;
|
|
43
|
+
|
|
44
|
+
menuProps.ref = useMergedRefs(menuProps.ref, useWrappedRefWithWarning(ref, 'DropdownMenu'));
|
|
45
|
+
if (!hasShown) return null; // For custom components provide additional, non-DOM, props;
|
|
46
|
+
|
|
47
|
+
if (typeof Component !== 'string') {
|
|
48
|
+
menuProps.show = show;
|
|
49
|
+
menuProps.close = close;
|
|
50
|
+
menuProps.alignRight = alignEnd;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
var style = props.style;
|
|
54
|
+
|
|
55
|
+
if (placement) {
|
|
56
|
+
// we don't need the default popper style,
|
|
57
|
+
// menus are display: none when not shown.
|
|
58
|
+
style = _extends({}, style, {}, menuProps.style);
|
|
59
|
+
props['x-placement'] = placement;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return React.createElement(Component, _extends({}, props, menuProps, {
|
|
63
|
+
style: style,
|
|
64
|
+
className: classNames(className, prefix, show && 'show', alignEnd && prefix + "-right")
|
|
65
|
+
}));
|
|
66
|
+
});
|
|
67
|
+
DropdownMenu.displayName = 'DropdownMenu';
|
|
68
|
+
DropdownMenu.defaultProps = defaultProps;
|
|
69
|
+
export default DropdownMenu;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
import Button, { ButtonProps } from './Button';
|
|
4
|
+
|
|
5
|
+
import { BsPrefixComponent, BsPrefixComponentClass } from './helpers';
|
|
6
|
+
|
|
7
|
+
export interface DropdownToggleProps {
|
|
8
|
+
id: string;
|
|
9
|
+
split?: boolean;
|
|
10
|
+
childBsPrefix?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
declare class DropdownToggle<
|
|
14
|
+
// Need to use BsPrefixComponentClass to get proper type checking.
|
|
15
|
+
As extends React.ElementType = BsPrefixComponentClass<'button', ButtonProps>
|
|
16
|
+
> extends BsPrefixComponent<As, DropdownToggleProps> {}
|
|
17
|
+
|
|
18
|
+
export default DropdownToggle;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import isRequiredForA11y from 'prop-types-extra/lib/isRequiredForA11y';
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import { useDropdownToggle } from 'react-overlays/DropdownToggle';
|
|
7
|
+
import useMergedRefs from '@restart/hooks/useMergedRefs';
|
|
8
|
+
import Button from './Button';
|
|
9
|
+
import { useBootstrapPrefix } from './ThemeProvider';
|
|
10
|
+
import useWrappedRefWithWarning from './useWrappedRefWithWarning';
|
|
11
|
+
var DropdownToggle = React.forwardRef(function (_ref, ref) {
|
|
12
|
+
var bsPrefix = _ref.bsPrefix,
|
|
13
|
+
split = _ref.split,
|
|
14
|
+
className = _ref.className,
|
|
15
|
+
children = _ref.children,
|
|
16
|
+
childBsPrefix = _ref.childBsPrefix,
|
|
17
|
+
_ref$as = _ref.as,
|
|
18
|
+
Component = _ref$as === void 0 ? Button : _ref$as,
|
|
19
|
+
props = _objectWithoutPropertiesLoose(_ref, ["bsPrefix", "split", "className", "children", "childBsPrefix", "as"]);
|
|
20
|
+
|
|
21
|
+
var prefix = useBootstrapPrefix(bsPrefix, 'dropdown-toggle');
|
|
22
|
+
|
|
23
|
+
if (childBsPrefix !== undefined) {
|
|
24
|
+
props.bsPrefix = childBsPrefix;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var _useDropdownToggle = useDropdownToggle(),
|
|
28
|
+
toggleProps = _useDropdownToggle[0],
|
|
29
|
+
toggle = _useDropdownToggle[1].toggle;
|
|
30
|
+
|
|
31
|
+
toggleProps.ref = useMergedRefs(toggleProps.ref, useWrappedRefWithWarning(ref, 'DropdownToggle')); // This intentionally forwards size and variant (if set) to the
|
|
32
|
+
// underlying component, to allow it to render size and style variants.
|
|
33
|
+
|
|
34
|
+
return React.createElement(Component, _extends({
|
|
35
|
+
onClick: toggle,
|
|
36
|
+
className: classNames(className, prefix, split && prefix + "-split")
|
|
37
|
+
}, toggleProps, props), children);
|
|
38
|
+
});
|
|
39
|
+
DropdownToggle.displayName = 'DropdownToggle';
|
|
40
|
+
export default DropdownToggle;
|
|
File without changes
|
package/{es → esm}/Fade.d.ts
RENAMED
|
File without changes
|
package/{es → esm}/Fade.js
RENAMED
|
@@ -4,10 +4,10 @@ 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';
|
|
7
8
|
import React, { useCallback } from 'react';
|
|
8
9
|
import Transition, { ENTERED, ENTERING } from 'react-transition-group/Transition';
|
|
9
|
-
import
|
|
10
|
-
import triggerBrowserReflow from './utils/triggerBrowserReflow';
|
|
10
|
+
import triggerBrowserReflow from './triggerBrowserReflow';
|
|
11
11
|
var defaultProps = {
|
|
12
12
|
in: false,
|
|
13
13
|
timeout: 300,
|
|
@@ -27,7 +27,7 @@ var Fade = React.forwardRef(function (_ref, ref) {
|
|
|
27
27
|
}, [props]);
|
|
28
28
|
return React.createElement(Transition, _extends({
|
|
29
29
|
ref: ref,
|
|
30
|
-
addEndListener:
|
|
30
|
+
addEndListener: transitionEnd
|
|
31
31
|
}, props, {
|
|
32
32
|
onEnter: handleEnter
|
|
33
33
|
}), function (status, innerProps) {
|
package/{es → esm}/Feedback.d.ts
RENAMED
|
File without changes
|
package/{es → esm}/Feedback.js
RENAMED
|
File without changes
|