react-bootstrap 2.10.10 → 3.0.0-beta.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.
- package/CHANGELOG.md +1385 -0
- package/cjs/AbstractModalHeader.d.ts +23 -5
- package/cjs/AbstractModalHeader.js +1 -1
- package/cjs/Accordion.d.ts +43 -14
- package/cjs/Accordion.js +3 -3
- package/cjs/AccordionBody.d.ts +12 -4
- package/cjs/AccordionBody.js +3 -3
- package/cjs/AccordionButton.d.ts +11 -5
- package/cjs/AccordionButton.js +7 -34
- package/cjs/AccordionCollapse.d.ts +16 -6
- package/cjs/AccordionCollapse.js +3 -3
- package/cjs/AccordionContext.d.ts +2 -2
- package/cjs/AccordionContext.js +1 -1
- package/cjs/AccordionHeader.d.ts +11 -3
- package/cjs/AccordionHeader.js +3 -3
- package/cjs/AccordionItem.d.ts +14 -3
- package/cjs/AccordionItem.js +3 -3
- package/cjs/AccordionItemContext.js +1 -1
- package/cjs/Alert.d.ts +51 -13
- package/cjs/Alert.js +3 -3
- package/cjs/AlertHeading.d.ts +11 -3
- package/cjs/AlertHeading.js +3 -3
- package/cjs/AlertLink.d.ts +11 -3
- package/cjs/AlertLink.js +3 -3
- package/cjs/Anchor.d.ts +1 -1
- package/cjs/Badge.d.ts +28 -7
- package/cjs/Badge.js +3 -3
- package/cjs/BootstrapModalManager.d.ts +1 -1
- package/cjs/Breadcrumb.d.ts +21 -6
- package/cjs/Breadcrumb.js +3 -3
- package/cjs/BreadcrumbItem.d.ts +36 -9
- package/cjs/BreadcrumbItem.js +3 -3
- package/cjs/Button.d.ts +42 -8
- package/cjs/Button.js +3 -3
- package/cjs/ButtonGroup.d.ts +25 -5
- package/cjs/ButtonGroup.js +3 -3
- package/cjs/ButtonToolbar.d.ts +11 -2
- package/cjs/ButtonToolbar.js +3 -3
- package/cjs/Card.d.ts +44 -17
- package/cjs/Card.js +3 -3
- package/cjs/CardBody.d.ts +11 -3
- package/cjs/CardBody.js +3 -3
- package/cjs/CardFooter.d.ts +11 -3
- package/cjs/CardFooter.js +3 -3
- package/cjs/CardGroup.d.ts +11 -3
- package/cjs/CardGroup.js +3 -3
- package/cjs/CardHeader.d.ts +11 -3
- package/cjs/CardHeader.js +3 -3
- package/cjs/CardHeaderContext.js +1 -1
- package/cjs/CardImg.d.ts +14 -3
- package/cjs/CardImg.js +3 -3
- package/cjs/CardImgOverlay.d.ts +11 -3
- package/cjs/CardImgOverlay.js +3 -3
- package/cjs/CardLink.d.ts +11 -3
- package/cjs/CardLink.js +3 -3
- package/cjs/CardSubtitle.d.ts +11 -3
- package/cjs/CardSubtitle.js +3 -3
- package/cjs/CardText.d.ts +11 -3
- package/cjs/CardText.js +3 -3
- package/cjs/CardTitle.d.ts +11 -3
- package/cjs/CardTitle.js +3 -3
- package/cjs/Carousel.d.ts +127 -27
- package/cjs/Carousel.js +9 -12
- package/cjs/CarouselCaption.d.ts +11 -3
- package/cjs/CarouselCaption.js +3 -3
- package/cjs/CarouselItem.d.ts +15 -4
- package/cjs/CarouselItem.js +3 -3
- package/cjs/CloseButton.d.ts +10 -1
- package/cjs/CloseButton.js +3 -17
- package/cjs/Col.d.ts +40 -20
- package/cjs/Col.js +7 -47
- package/cjs/Collapse.d.ts +45 -10
- package/cjs/Collapse.js +3 -3
- package/cjs/Container.d.ts +15 -4
- package/cjs/Container.js +3 -3
- package/cjs/Dropdown.d.ts +10 -17
- package/cjs/Dropdown.js +3 -4
- package/cjs/DropdownButton.d.ts +42 -11
- package/cjs/DropdownButton.js +1 -56
- package/cjs/DropdownContext.d.ts +1 -1
- package/cjs/DropdownContext.js +1 -1
- package/cjs/DropdownDivider.d.ts +15 -3
- package/cjs/DropdownDivider.js +3 -3
- package/cjs/DropdownHeader.d.ts +15 -3
- package/cjs/DropdownHeader.js +3 -3
- package/cjs/DropdownItem.d.ts +28 -4
- package/cjs/DropdownItem.js +3 -3
- package/cjs/DropdownItemText.d.ts +11 -3
- package/cjs/DropdownItemText.js +3 -3
- package/cjs/DropdownMenu.d.ts +55 -12
- package/cjs/DropdownMenu.js +3 -4
- package/cjs/DropdownToggle.d.ts +20 -4
- package/cjs/DropdownToggle.js +3 -3
- package/cjs/ElementChildren.js +2 -2
- package/cjs/Fade.d.ts +31 -7
- package/cjs/Fade.js +3 -3
- package/cjs/Feedback.d.ts +15 -6
- package/cjs/Feedback.js +3 -16
- package/cjs/Figure.d.ts +12 -4
- package/cjs/Figure.js +3 -3
- package/cjs/FigureCaption.d.ts +11 -3
- package/cjs/FigureCaption.js +3 -3
- package/cjs/FigureImage.d.ts +1 -1
- package/cjs/FigureImage.js +4 -5
- package/cjs/FloatingLabel.d.ts +19 -5
- package/cjs/FloatingLabel.js +3 -3
- package/cjs/Form.d.ts +159 -135
- package/cjs/Form.js +3 -22
- package/cjs/FormCheck.d.ts +81 -15
- package/cjs/FormCheck.js +3 -3
- package/cjs/FormCheckInput.d.ts +27 -6
- package/cjs/FormCheckInput.js +3 -3
- package/cjs/FormCheckLabel.d.ts +9 -2
- package/cjs/FormCheckLabel.js +3 -3
- package/cjs/FormContext.js +1 -1
- package/cjs/FormControl.d.ts +59 -14
- package/cjs/FormControl.js +3 -3
- package/cjs/FormFloating.d.ts +11 -3
- package/cjs/FormFloating.js +3 -3
- package/cjs/FormGroup.d.ts +11 -4
- package/cjs/FormGroup.js +1 -1
- package/cjs/FormLabel.d.ts +29 -6
- package/cjs/FormLabel.js +3 -3
- package/cjs/FormRange.d.ts +13 -2
- package/cjs/FormRange.js +3 -3
- package/cjs/FormSelect.d.ts +39 -7
- package/cjs/FormSelect.js +3 -3
- package/cjs/FormText.d.ts +16 -4
- package/cjs/FormText.js +3 -3
- package/cjs/Image.d.ts +7 -15
- package/cjs/Image.js +6 -28
- package/cjs/InputGroup.d.ts +22 -6
- package/cjs/InputGroup.js +3 -3
- package/cjs/InputGroupContext.js +1 -1
- package/cjs/InputGroupText.d.ts +11 -3
- package/cjs/InputGroupText.js +3 -3
- package/cjs/ListGroup.d.ts +35 -10
- package/cjs/ListGroup.js +3 -3
- package/cjs/ListGroupItem.d.ts +34 -7
- package/cjs/ListGroupItem.js +3 -3
- package/cjs/Modal.d.ts +53 -16
- package/cjs/Modal.js +4 -4
- package/cjs/ModalBody.d.ts +11 -3
- package/cjs/ModalBody.js +3 -3
- package/cjs/ModalContext.js +2 -1
- package/cjs/ModalDialog.d.ts +29 -6
- package/cjs/ModalDialog.js +4 -4
- package/cjs/ModalFooter.d.ts +11 -3
- package/cjs/ModalFooter.js +3 -3
- package/cjs/ModalHeader.d.ts +6 -3
- package/cjs/ModalHeader.js +3 -3
- package/cjs/ModalTitle.d.ts +11 -3
- package/cjs/ModalTitle.js +3 -3
- package/cjs/Nav.d.ts +49 -15
- package/cjs/Nav.js +3 -3
- package/cjs/NavContext.d.ts +1 -1
- package/cjs/NavContext.js +1 -1
- package/cjs/NavDropdown.d.ts +44 -15
- package/cjs/NavDropdown.js +3 -3
- package/cjs/NavItem.d.ts +11 -3
- package/cjs/NavItem.js +3 -3
- package/cjs/NavLink.d.ts +33 -4
- package/cjs/NavLink.js +3 -3
- package/cjs/Navbar.d.ts +103 -18
- package/cjs/Navbar.js +3 -3
- package/cjs/NavbarBrand.d.ts +15 -4
- package/cjs/NavbarBrand.js +3 -3
- package/cjs/NavbarCollapse.d.ts +6 -3
- package/cjs/NavbarCollapse.js +1 -1
- package/cjs/NavbarContext.js +1 -1
- package/cjs/NavbarOffcanvas.d.ts +3 -2
- package/cjs/NavbarOffcanvas.js +1 -2
- package/cjs/NavbarText.d.ts +11 -3
- package/cjs/NavbarText.js +3 -3
- package/cjs/NavbarToggle.d.ts +19 -4
- package/cjs/NavbarToggle.js +3 -3
- package/cjs/Offcanvas.d.ts +27 -12
- package/cjs/Offcanvas.js +46 -43
- package/cjs/OffcanvasBody.d.ts +11 -3
- package/cjs/OffcanvasBody.js +3 -3
- package/cjs/OffcanvasHeader.d.ts +6 -3
- package/cjs/OffcanvasHeader.js +3 -3
- package/cjs/OffcanvasTitle.d.ts +11 -3
- package/cjs/OffcanvasTitle.js +3 -3
- package/cjs/OffcanvasToggling.d.ts +32 -8
- package/cjs/OffcanvasToggling.js +3 -3
- package/cjs/Overlay.d.ts +24 -7
- package/cjs/Overlay.js +5 -6
- package/cjs/OverlayTrigger.d.ts +50 -12
- package/cjs/OverlayTrigger.js +3 -8
- package/cjs/PageItem.d.ts +31 -9
- package/cjs/PageItem.js +4 -4
- package/cjs/Pagination.d.ts +14 -4
- package/cjs/Pagination.js +3 -3
- package/cjs/Placeholder.d.ts +14 -5
- package/cjs/Placeholder.js +1 -1
- package/cjs/PlaceholderButton.d.ts +19 -5
- package/cjs/PlaceholderButton.js +1 -1
- package/cjs/Popover.d.ts +41 -12
- package/cjs/Popover.js +3 -3
- package/cjs/PopoverBody.d.ts +11 -3
- package/cjs/PopoverBody.js +3 -3
- package/cjs/PopoverHeader.d.ts +11 -3
- package/cjs/PopoverHeader.js +3 -3
- package/cjs/ProgressBar.d.ts +44 -11
- package/cjs/ProgressBar.js +4 -33
- package/cjs/Ratio.d.ts +13 -3
- package/cjs/Ratio.js +3 -3
- package/cjs/Row.d.ts +41 -9
- package/cjs/Row.js +3 -3
- package/cjs/Spinner.d.ts +30 -7
- package/cjs/Spinner.js +3 -3
- package/cjs/SplitButton.d.ts +38 -12
- package/cjs/SplitButton.js +1 -59
- package/cjs/Stack.d.ts +27 -7
- package/cjs/Stack.js +4 -4
- package/cjs/Switch.d.ts +4 -4
- package/cjs/Switch.js +1 -1
- package/cjs/Tab.d.ts +18 -16
- package/cjs/Tab.js +0 -21
- package/cjs/TabContainer.d.ts +50 -55
- package/cjs/TabContent.d.ts +11 -3
- package/cjs/TabContent.js +3 -3
- package/cjs/TabPane.d.ts +36 -9
- package/cjs/TabPane.js +3 -3
- package/cjs/Table.d.ts +42 -9
- package/cjs/Table.js +3 -3
- package/cjs/Tabs.d.ts +10 -4
- package/cjs/Tabs.js +1 -1
- package/cjs/ThemeProvider.d.ts +24 -5
- package/cjs/ThemeProvider.js +1 -1
- package/cjs/Toast.d.ts +47 -13
- package/cjs/Toast.js +3 -3
- package/cjs/ToastBody.d.ts +11 -3
- package/cjs/ToastBody.js +3 -3
- package/cjs/ToastContainer.d.ts +19 -5
- package/cjs/ToastContainer.js +3 -3
- package/cjs/ToastContext.js +2 -1
- package/cjs/ToastFade.d.ts +1 -1
- package/cjs/ToastFade.js +1 -1
- package/cjs/ToastHeader.d.ts +20 -6
- package/cjs/ToastHeader.js +3 -3
- package/cjs/ToggleButton.d.ts +38 -7
- package/cjs/ToggleButton.js +3 -3
- package/cjs/ToggleButtonGroup.d.ts +51 -3
- package/cjs/ToggleButtonGroup.js +1 -1
- package/cjs/Tooltip.d.ts +35 -7
- package/cjs/Tooltip.js +3 -3
- package/cjs/TransitionWrapper.d.ts +1 -1
- package/cjs/TransitionWrapper.js +3 -7
- package/cjs/createUtilityClasses.d.ts +0 -2
- package/cjs/createUtilityClasses.js +2 -14
- package/cjs/createWithBsPrefix.d.ts +2 -2
- package/cjs/createWithBsPrefix.js +3 -3
- package/cjs/divWithClassName.js +3 -3
- package/cjs/getTabTransitionComponent.d.ts +1 -1
- package/cjs/helpers.d.ts +0 -20
- package/cjs/helpers.js +0 -8
- package/cjs/index.d.ts +2 -3
- package/cjs/index.js +5 -8
- package/cjs/package.json +1 -0
- package/cjs/types.d.ts +338 -3
- package/cjs/types.js +1 -16
- package/cjs/useAccordionButton.d.ts +4 -0
- package/cjs/useAccordionButton.js +37 -0
- package/cjs/useCol.d.ts +7 -0
- package/cjs/useCol.js +49 -0
- package/cjs/useOverlayOffset.d.ts +1 -1
- package/cjs/usePlaceholder.d.ts +16 -5
- package/cjs/usePlaceholder.js +4 -4
- package/lib/AbstractModalHeader.d.ts +28 -0
- package/{esm → lib}/AbstractModalHeader.js +1 -2
- package/lib/Accordion.d.ts +47 -0
- package/{esm → lib}/Accordion.js +2 -2
- package/lib/AccordionBody.d.ts +15 -0
- package/{esm → lib}/AccordionBody.js +2 -2
- package/lib/AccordionButton.d.ts +14 -0
- package/{esm → lib}/AccordionButton.js +3 -30
- package/lib/AccordionCollapse.d.ts +22 -0
- package/{esm → lib}/AccordionCollapse.js +2 -2
- package/{esm → lib}/AccordionContext.d.ts +2 -2
- package/lib/AccordionHeader.d.ts +14 -0
- package/{esm → lib}/AccordionHeader.js +2 -2
- package/lib/AccordionItem.d.ts +18 -0
- package/{esm → lib}/AccordionItem.js +2 -2
- package/lib/Alert.d.ts +57 -0
- package/{esm → lib}/Alert.js +3 -4
- package/lib/AlertHeading.d.ts +14 -0
- package/{esm → lib}/AlertHeading.js +2 -2
- package/lib/AlertLink.d.ts +14 -0
- package/{esm → lib}/AlertLink.js +2 -2
- package/lib/Anchor.d.ts +3 -0
- package/lib/Badge.d.ts +31 -0
- package/{esm → lib}/Badge.js +2 -2
- package/{esm → lib}/BootstrapModalManager.d.ts +1 -1
- package/lib/Breadcrumb.d.ts +25 -0
- package/{esm → lib}/Breadcrumb.js +2 -2
- package/lib/BreadcrumbItem.d.ts +39 -0
- package/{esm → lib}/BreadcrumbItem.js +2 -2
- package/lib/Button.d.ts +45 -0
- package/{esm → lib}/Button.js +2 -2
- package/lib/ButtonGroup.d.ts +28 -0
- package/{esm → lib}/ButtonGroup.js +2 -2
- package/lib/ButtonToolbar.d.ts +15 -0
- package/{esm → lib}/ButtonToolbar.js +2 -2
- package/lib/Card.d.ts +48 -0
- package/{esm → lib}/Card.js +2 -2
- package/lib/CardBody.d.ts +14 -0
- package/{esm → lib}/CardBody.js +2 -2
- package/lib/CardFooter.d.ts +14 -0
- package/{esm → lib}/CardFooter.js +2 -2
- package/lib/CardGroup.d.ts +14 -0
- package/{esm → lib}/CardGroup.js +2 -2
- package/lib/CardHeader.d.ts +14 -0
- package/{esm → lib}/CardHeader.js +2 -2
- package/lib/CardImg.d.ts +18 -0
- package/{esm → lib}/CardImg.js +2 -2
- package/lib/CardImgOverlay.d.ts +14 -0
- package/{esm → lib}/CardImgOverlay.js +2 -2
- package/lib/CardLink.d.ts +14 -0
- package/{esm → lib}/CardLink.js +2 -2
- package/lib/CardSubtitle.d.ts +14 -0
- package/{esm → lib}/CardSubtitle.js +2 -2
- package/lib/CardText.d.ts +14 -0
- package/{esm → lib}/CardText.js +2 -2
- package/lib/CardTitle.d.ts +14 -0
- package/{esm → lib}/CardTitle.js +2 -2
- package/lib/Carousel.d.ts +136 -0
- package/{esm → lib}/Carousel.js +9 -14
- package/lib/CarouselCaption.d.ts +14 -0
- package/{esm → lib}/CarouselCaption.js +2 -2
- package/lib/CarouselItem.d.ts +18 -0
- package/{esm → lib}/CarouselItem.js +2 -2
- package/{esm → lib}/CloseButton.d.ts +10 -1
- package/lib/CloseButton.js +17 -0
- package/lib/Col.d.ts +48 -0
- package/lib/Col.js +25 -0
- package/lib/Collapse.d.ts +52 -0
- package/{esm → lib}/Collapse.js +2 -2
- package/lib/Container.d.ts +18 -0
- package/{esm → lib}/Container.js +2 -2
- package/lib/Dropdown.d.ts +14 -0
- package/{esm → lib}/Dropdown.js +2 -3
- package/lib/DropdownButton.d.ts +55 -0
- package/lib/DropdownButton.js +51 -0
- package/{esm → lib}/DropdownContext.d.ts +1 -1
- package/lib/DropdownDivider.d.ts +18 -0
- package/{esm → lib}/DropdownDivider.js +2 -2
- package/lib/DropdownHeader.d.ts +18 -0
- package/{esm → lib}/DropdownHeader.js +2 -2
- package/lib/DropdownItem.d.ts +30 -0
- package/{esm → lib}/DropdownItem.js +2 -2
- package/lib/DropdownItemText.d.ts +14 -0
- package/{esm → lib}/DropdownItemText.js +2 -2
- package/lib/DropdownMenu.d.ts +61 -0
- package/{esm → lib}/DropdownMenu.js +2 -3
- package/lib/DropdownToggle.d.ts +28 -0
- package/{esm → lib}/DropdownToggle.js +2 -2
- package/{esm → lib}/ElementChildren.js +1 -1
- package/lib/Fade.d.ts +39 -0
- package/{esm → lib}/Fade.js +2 -2
- package/lib/Feedback.d.ts +19 -0
- package/{esm → lib}/Feedback.js +2 -15
- package/lib/Figure.d.ts +17 -0
- package/{esm → lib}/Figure.js +2 -2
- package/lib/FigureCaption.d.ts +14 -0
- package/{esm → lib}/FigureCaption.js +2 -2
- package/{esm → lib}/FigureImage.d.ts +1 -1
- package/{esm → lib}/FigureImage.js +3 -4
- package/lib/FloatingLabel.d.ts +23 -0
- package/{esm → lib}/FloatingLabel.js +3 -4
- package/{esm → lib}/Form.d.ts +159 -135
- package/{esm → lib}/Form.js +2 -21
- package/lib/FormCheck.d.ts +88 -0
- package/{esm → lib}/FormCheck.js +3 -5
- package/lib/FormCheckInput.d.ts +31 -0
- package/{esm → lib}/FormCheckInput.js +2 -2
- package/{esm → lib}/FormCheckLabel.d.ts +9 -2
- package/{esm → lib}/FormCheckLabel.js +2 -2
- package/lib/FormControl.d.ts +64 -0
- package/{esm → lib}/FormControl.js +2 -2
- package/lib/FormFloating.d.ts +14 -0
- package/{esm → lib}/FormFloating.js +2 -2
- package/lib/FormGroup.d.ts +14 -0
- package/lib/FormLabel.d.ts +39 -0
- package/{esm → lib}/FormLabel.js +2 -2
- package/lib/FormRange.d.ts +17 -0
- package/{esm → lib}/FormRange.js +2 -2
- package/lib/FormSelect.d.ts +42 -0
- package/{esm → lib}/FormSelect.js +2 -2
- package/lib/FormText.d.ts +19 -0
- package/{esm → lib}/FormText.js +2 -2
- package/lib/Image.d.ts +25 -0
- package/lib/Image.js +24 -0
- package/lib/InputGroup.d.ts +29 -0
- package/{esm → lib}/InputGroup.js +2 -2
- package/lib/InputGroupText.d.ts +14 -0
- package/{esm → lib}/InputGroupText.js +2 -2
- package/lib/ListGroup.d.ts +38 -0
- package/{esm → lib}/ListGroup.js +2 -2
- package/lib/ListGroupItem.d.ts +38 -0
- package/{esm → lib}/ListGroupItem.js +2 -2
- package/lib/Modal.d.ts +63 -0
- package/{esm → lib}/Modal.js +3 -3
- package/lib/ModalBody.d.ts +14 -0
- package/{esm → lib}/ModalBody.js +2 -2
- package/{esm → lib}/ModalContext.js +1 -0
- package/lib/ModalDialog.d.ts +34 -0
- package/{esm → lib}/ModalDialog.js +3 -3
- package/lib/ModalFooter.d.ts +14 -0
- package/{esm → lib}/ModalFooter.js +2 -2
- package/{esm → lib}/ModalHeader.d.ts +6 -3
- package/{esm → lib}/ModalHeader.js +2 -2
- package/lib/ModalTitle.d.ts +14 -0
- package/{esm → lib}/ModalTitle.js +2 -2
- package/lib/Nav.d.ts +52 -0
- package/{esm → lib}/Nav.js +2 -2
- package/{esm → lib}/NavContext.d.ts +1 -1
- package/lib/NavDropdown.d.ts +49 -0
- package/{esm → lib}/NavDropdown.js +3 -4
- package/lib/NavItem.d.ts +14 -0
- package/{esm → lib}/NavItem.js +2 -2
- package/lib/NavLink.d.ts +35 -0
- package/{esm → lib}/NavLink.js +2 -2
- package/lib/Navbar.d.ts +108 -0
- package/{esm → lib}/Navbar.js +2 -2
- package/lib/NavbarBrand.d.ts +18 -0
- package/{esm → lib}/NavbarBrand.js +2 -2
- package/{esm → lib}/NavbarCollapse.d.ts +6 -3
- package/{esm → lib}/NavbarOffcanvas.d.ts +3 -2
- package/{esm → lib}/NavbarOffcanvas.js +0 -1
- package/lib/NavbarText.d.ts +14 -0
- package/{esm → lib}/NavbarText.js +2 -2
- package/lib/NavbarToggle.d.ts +22 -0
- package/{esm → lib}/NavbarToggle.js +2 -2
- package/lib/Offcanvas.d.ts +33 -0
- package/{esm → lib}/Offcanvas.js +46 -45
- package/lib/OffcanvasBody.d.ts +14 -0
- package/{esm → lib}/OffcanvasBody.js +2 -2
- package/{esm → lib}/OffcanvasHeader.d.ts +6 -3
- package/{esm → lib}/OffcanvasHeader.js +2 -2
- package/lib/OffcanvasTitle.d.ts +14 -0
- package/{esm → lib}/OffcanvasTitle.js +2 -2
- package/lib/OffcanvasToggling.d.ts +39 -0
- package/{esm → lib}/OffcanvasToggling.js +2 -2
- package/lib/Overlay.d.ts +41 -0
- package/{esm → lib}/Overlay.js +4 -5
- package/lib/OverlayTrigger.d.ts +67 -0
- package/{esm → lib}/OverlayTrigger.js +3 -10
- package/lib/PageItem.d.ts +39 -0
- package/{esm → lib}/PageItem.js +4 -5
- package/{esm → lib}/Pagination.d.ts +14 -4
- package/{esm → lib}/Pagination.js +2 -2
- package/lib/Placeholder.d.ts +17 -0
- package/lib/PlaceholderButton.d.ts +22 -0
- package/lib/Popover.d.ts +48 -0
- package/{esm → lib}/Popover.js +3 -4
- package/lib/PopoverBody.d.ts +14 -0
- package/{esm → lib}/PopoverBody.js +2 -2
- package/lib/PopoverHeader.d.ts +14 -0
- package/{esm → lib}/PopoverHeader.js +2 -2
- package/lib/ProgressBar.d.ts +48 -0
- package/{esm → lib}/ProgressBar.js +3 -32
- package/lib/Ratio.d.ts +19 -0
- package/{esm → lib}/Ratio.js +2 -2
- package/lib/Row.d.ts +49 -0
- package/{esm → lib}/Row.js +2 -2
- package/lib/Spinner.d.ts +33 -0
- package/{esm → lib}/Spinner.js +2 -2
- package/lib/SplitButton.d.ts +53 -0
- package/lib/SplitButton.js +67 -0
- package/lib/Stack.d.ts +31 -0
- package/{esm → lib}/Stack.js +3 -3
- package/{esm → lib}/Switch.d.ts +4 -4
- package/lib/Tab.d.ts +29 -0
- package/lib/Tab.js +11 -0
- package/lib/TabContainer.d.ts +56 -0
- package/lib/TabContent.d.ts +14 -0
- package/{esm → lib}/TabContent.js +2 -2
- package/lib/TabPane.d.ts +39 -0
- package/{esm → lib}/TabPane.js +2 -2
- package/lib/Table.d.ts +46 -0
- package/{esm → lib}/Table.js +2 -2
- package/lib/Tabs.d.ts +15 -0
- package/{esm → lib}/Tabs.js +1 -2
- package/{esm → lib}/ThemeProvider.d.ts +24 -5
- package/lib/Toast.d.ts +52 -0
- package/{esm → lib}/Toast.js +2 -2
- package/lib/ToastBody.d.ts +14 -0
- package/{esm → lib}/ToastBody.js +2 -2
- package/lib/ToastContainer.d.ts +23 -0
- package/{esm → lib}/ToastContainer.js +2 -2
- package/{esm → lib}/ToastContext.js +1 -0
- package/{esm → lib}/ToastFade.d.ts +1 -1
- package/lib/ToastHeader.d.ts +24 -0
- package/{esm → lib}/ToastHeader.js +3 -4
- package/lib/ToggleButton.d.ts +46 -0
- package/{esm → lib}/ToggleButton.js +3 -5
- package/lib/ToggleButtonGroup.d.ts +71 -0
- package/lib/Tooltip.d.ts +43 -0
- package/{esm → lib}/Tooltip.js +3 -4
- package/{esm → lib}/TransitionWrapper.d.ts +1 -1
- package/{esm → lib}/TransitionWrapper.js +2 -6
- package/{esm → lib}/createUtilityClasses.d.ts +0 -2
- package/{esm → lib}/createUtilityClasses.js +0 -11
- package/{esm → lib}/createWithBsPrefix.d.ts +2 -2
- package/{esm → lib}/createWithBsPrefix.js +2 -2
- package/{esm → lib}/divWithClassName.js +4 -4
- package/{esm → lib}/getTabTransitionComponent.d.ts +1 -1
- package/lib/helpers.d.ts +4 -0
- package/{esm → lib}/helpers.js +0 -5
- package/{esm → lib}/index.d.ts +2 -3
- package/{esm → lib}/index.js +3 -3
- package/lib/package.json +1 -0
- package/lib/types.d.ts +364 -0
- package/lib/types.js +1 -0
- package/lib/useAccordionButton.d.ts +4 -0
- package/lib/useAccordionButton.js +32 -0
- package/lib/useCol.d.ts +7 -0
- package/{esm/Col.js → lib/useCol.js} +4 -25
- package/{esm → lib}/useOverlayOffset.d.ts +1 -1
- package/lib/usePlaceholder.d.ts +21 -0
- package/{esm → lib}/usePlaceholder.js +3 -3
- package/package.json +94 -17
- package/AbstractModalHeader/package.json +0 -7
- package/Accordion/package.json +0 -7
- package/AccordionBody/package.json +0 -7
- package/AccordionButton/package.json +0 -7
- package/AccordionCollapse/package.json +0 -7
- package/AccordionContext/package.json +0 -7
- package/AccordionHeader/package.json +0 -7
- package/AccordionItem/package.json +0 -7
- package/AccordionItemContext/package.json +0 -7
- package/Alert/package.json +0 -7
- package/AlertHeading/package.json +0 -7
- package/AlertLink/package.json +0 -7
- package/Anchor/package.json +0 -7
- package/Badge/package.json +0 -7
- package/BootstrapModalManager/package.json +0 -7
- package/Breadcrumb/package.json +0 -7
- package/BreadcrumbItem/package.json +0 -7
- package/Button/package.json +0 -7
- package/ButtonGroup/package.json +0 -7
- package/ButtonToolbar/package.json +0 -7
- package/Card/package.json +0 -7
- package/CardBody/package.json +0 -7
- package/CardFooter/package.json +0 -7
- package/CardGroup/package.json +0 -7
- package/CardHeader/package.json +0 -7
- package/CardHeaderContext/package.json +0 -7
- package/CardImg/package.json +0 -7
- package/CardImgOverlay/package.json +0 -7
- package/CardLink/package.json +0 -7
- package/CardSubtitle/package.json +0 -7
- package/CardText/package.json +0 -7
- package/CardTitle/package.json +0 -7
- package/Carousel/package.json +0 -7
- package/CarouselCaption/package.json +0 -7
- package/CarouselItem/package.json +0 -7
- package/CloseButton/package.json +0 -7
- package/Col/package.json +0 -7
- package/Collapse/package.json +0 -7
- package/Container/package.json +0 -7
- package/Dropdown/package.json +0 -7
- package/DropdownButton/package.json +0 -7
- package/DropdownContext/package.json +0 -7
- package/DropdownDivider/package.json +0 -7
- package/DropdownHeader/package.json +0 -7
- package/DropdownItem/package.json +0 -7
- package/DropdownItemText/package.json +0 -7
- package/DropdownMenu/package.json +0 -7
- package/DropdownToggle/package.json +0 -7
- package/ElementChildren/package.json +0 -7
- package/Fade/package.json +0 -7
- package/Feedback/package.json +0 -7
- package/Figure/package.json +0 -7
- package/FigureCaption/package.json +0 -7
- package/FigureImage/package.json +0 -7
- package/FloatingLabel/package.json +0 -7
- package/Form/package.json +0 -7
- package/FormCheck/package.json +0 -7
- package/FormCheckInput/package.json +0 -7
- package/FormCheckLabel/package.json +0 -7
- package/FormContext/package.json +0 -7
- package/FormControl/package.json +0 -7
- package/FormFloating/package.json +0 -7
- package/FormGroup/package.json +0 -7
- package/FormLabel/package.json +0 -7
- package/FormRange/package.json +0 -7
- package/FormSelect/package.json +0 -7
- package/FormText/package.json +0 -7
- package/Image/package.json +0 -7
- package/InputGroup/package.json +0 -7
- package/InputGroupContext/package.json +0 -7
- package/InputGroupText/package.json +0 -7
- package/ListGroup/package.json +0 -7
- package/ListGroupItem/package.json +0 -7
- package/Modal/package.json +0 -7
- package/ModalBody/package.json +0 -7
- package/ModalContext/package.json +0 -7
- package/ModalDialog/package.json +0 -7
- package/ModalFooter/package.json +0 -7
- package/ModalHeader/package.json +0 -7
- package/ModalTitle/package.json +0 -7
- package/Nav/package.json +0 -7
- package/NavContext/package.json +0 -7
- package/NavDropdown/package.json +0 -7
- package/NavItem/package.json +0 -7
- package/NavLink/package.json +0 -7
- package/Navbar/package.json +0 -7
- package/NavbarBrand/package.json +0 -7
- package/NavbarCollapse/package.json +0 -7
- package/NavbarContext/package.json +0 -7
- package/NavbarOffcanvas/package.json +0 -7
- package/NavbarText/package.json +0 -7
- package/NavbarToggle/package.json +0 -7
- package/Offcanvas/package.json +0 -7
- package/OffcanvasBody/package.json +0 -7
- package/OffcanvasHeader/package.json +0 -7
- package/OffcanvasTitle/package.json +0 -7
- package/OffcanvasToggling/package.json +0 -7
- package/Overlay/package.json +0 -7
- package/OverlayTrigger/package.json +0 -7
- package/PageItem/package.json +0 -7
- package/Pagination/package.json +0 -7
- package/Placeholder/package.json +0 -7
- package/PlaceholderButton/package.json +0 -7
- package/Popover/package.json +0 -7
- package/PopoverBody/package.json +0 -7
- package/PopoverHeader/package.json +0 -7
- package/ProgressBar/package.json +0 -7
- package/Ratio/package.json +0 -7
- package/Row/package.json +0 -7
- package/SSRProvider/package.json +0 -7
- package/Spinner/package.json +0 -7
- package/SplitButton/package.json +0 -7
- package/Stack/package.json +0 -7
- package/Switch/package.json +0 -7
- package/Tab/package.json +0 -7
- package/TabContainer/package.json +0 -7
- package/TabContent/package.json +0 -7
- package/TabPane/package.json +0 -7
- package/Table/package.json +0 -7
- package/Tabs/package.json +0 -7
- package/ThemeProvider/package.json +0 -7
- package/Toast/package.json +0 -7
- package/ToastBody/package.json +0 -7
- package/ToastContainer/package.json +0 -7
- package/ToastContext/package.json +0 -7
- package/ToastFade/package.json +0 -7
- package/ToastHeader/package.json +0 -7
- package/ToggleButton/package.json +0 -7
- package/ToggleButtonGroup/package.json +0 -7
- package/Tooltip/package.json +0 -7
- package/TransitionWrapper/package.json +0 -7
- package/cjs/SSRProvider.d.ts +0 -4
- package/cjs/SSRProvider.js +0 -7
- package/cjs/safeFindDOMNode.d.ts +0 -1
- package/cjs/safeFindDOMNode.js +0 -15
- package/createChainedFunction/package.json +0 -7
- package/createUtilityClasses/package.json +0 -7
- package/createWithBsPrefix/package.json +0 -7
- package/dist/react-bootstrap.js +0 -16921
- package/dist/react-bootstrap.min.js +0 -2
- package/dist/react-bootstrap.min.js.LICENSE.txt +0 -15
- package/divWithClassName/package.json +0 -7
- package/esm/AbstractModalHeader.d.ts +0 -10
- package/esm/Accordion.d.ts +0 -18
- package/esm/AccordionBody.d.ts +0 -7
- package/esm/AccordionButton.d.ts +0 -8
- package/esm/AccordionCollapse.d.ts +0 -12
- package/esm/AccordionHeader.d.ts +0 -6
- package/esm/AccordionItem.d.ts +0 -7
- package/esm/Alert.d.ts +0 -19
- package/esm/AlertHeading.d.ts +0 -6
- package/esm/AlertLink.d.ts +0 -6
- package/esm/Anchor.d.ts +0 -3
- package/esm/Badge.d.ts +0 -10
- package/esm/Breadcrumb.d.ts +0 -10
- package/esm/BreadcrumbItem.d.ts +0 -12
- package/esm/Button.d.ts +0 -11
- package/esm/ButtonGroup.d.ts +0 -8
- package/esm/ButtonToolbar.d.ts +0 -6
- package/esm/Card.d.ts +0 -21
- package/esm/CardBody.d.ts +0 -6
- package/esm/CardFooter.d.ts +0 -6
- package/esm/CardGroup.d.ts +0 -6
- package/esm/CardHeader.d.ts +0 -6
- package/esm/CardImg.d.ts +0 -7
- package/esm/CardImgOverlay.d.ts +0 -6
- package/esm/CardLink.d.ts +0 -6
- package/esm/CardSubtitle.d.ts +0 -6
- package/esm/CardText.d.ts +0 -6
- package/esm/CardTitle.d.ts +0 -6
- package/esm/Carousel.d.ts +0 -36
- package/esm/CarouselCaption.d.ts +0 -6
- package/esm/CarouselItem.d.ts +0 -7
- package/esm/CloseButton.js +0 -31
- package/esm/Col.d.ts +0 -28
- package/esm/Collapse.d.ts +0 -17
- package/esm/Container.d.ts +0 -7
- package/esm/Dropdown.d.ts +0 -21
- package/esm/DropdownButton.d.ts +0 -24
- package/esm/DropdownButton.js +0 -107
- package/esm/DropdownDivider.d.ts +0 -6
- package/esm/DropdownHeader.d.ts +0 -6
- package/esm/DropdownItem.d.ts +0 -6
- package/esm/DropdownItemText.d.ts +0 -6
- package/esm/DropdownMenu.d.ts +0 -18
- package/esm/DropdownToggle.d.ts +0 -12
- package/esm/Fade.d.ts +0 -15
- package/esm/Feedback.d.ts +0 -10
- package/esm/Figure.d.ts +0 -9
- package/esm/FigureCaption.d.ts +0 -6
- package/esm/FloatingLabel.d.ts +0 -9
- package/esm/FormCheck.d.ts +0 -22
- package/esm/FormCheckInput.d.ts +0 -10
- package/esm/FormControl.d.ts +0 -19
- package/esm/FormFloating.d.ts +0 -6
- package/esm/FormGroup.d.ts +0 -7
- package/esm/FormLabel.d.ts +0 -16
- package/esm/FormRange.d.ts +0 -6
- package/esm/FormSelect.d.ts +0 -10
- package/esm/FormText.d.ts +0 -7
- package/esm/Image.d.ts +0 -33
- package/esm/Image.js +0 -47
- package/esm/InputGroup.d.ts +0 -13
- package/esm/InputGroupText.d.ts +0 -6
- package/esm/ListGroup.d.ts +0 -13
- package/esm/ListGroupItem.d.ts +0 -11
- package/esm/Modal.d.ts +0 -26
- package/esm/ModalBody.d.ts +0 -6
- package/esm/ModalDialog.d.ts +0 -11
- package/esm/ModalFooter.d.ts +0 -6
- package/esm/ModalTitle.d.ts +0 -6
- package/esm/Nav.d.ts +0 -18
- package/esm/NavDropdown.d.ts +0 -20
- package/esm/NavItem.d.ts +0 -6
- package/esm/NavLink.d.ts +0 -6
- package/esm/Navbar.d.ts +0 -23
- package/esm/NavbarBrand.d.ts +0 -7
- package/esm/NavbarText.d.ts +0 -6
- package/esm/NavbarToggle.d.ts +0 -7
- package/esm/Offcanvas.d.ts +0 -18
- package/esm/OffcanvasBody.d.ts +0 -6
- package/esm/OffcanvasTitle.d.ts +0 -6
- package/esm/OffcanvasToggling.d.ts +0 -15
- package/esm/Overlay.d.ts +0 -24
- package/esm/OverlayTrigger.d.ts +0 -29
- package/esm/PageItem.d.ts +0 -17
- package/esm/Placeholder.d.ts +0 -8
- package/esm/PlaceholderButton.d.ts +0 -8
- package/esm/Popover.d.ts +0 -19
- package/esm/PopoverBody.d.ts +0 -6
- package/esm/PopoverHeader.d.ts +0 -6
- package/esm/ProgressBar.d.ts +0 -15
- package/esm/Ratio.d.ts +0 -9
- package/esm/Row.d.ts +0 -17
- package/esm/SSRProvider.d.ts +0 -4
- package/esm/SSRProvider.js +0 -2
- package/esm/Spinner.d.ts +0 -10
- package/esm/SplitButton.d.ts +0 -27
- package/esm/SplitButton.js +0 -126
- package/esm/Stack.d.ts +0 -11
- package/esm/Tab.d.ts +0 -27
- package/esm/Tab.js +0 -32
- package/esm/TabContainer.d.ts +0 -61
- package/esm/TabContent.d.ts +0 -6
- package/esm/TabPane.d.ts +0 -12
- package/esm/Table.d.ts +0 -13
- package/esm/Tabs.d.ts +0 -9
- package/esm/Toast.d.ts +0 -18
- package/esm/ToastBody.d.ts +0 -6
- package/esm/ToastContainer.d.ts +0 -9
- package/esm/ToastHeader.d.ts +0 -10
- package/esm/ToggleButton.d.ts +0 -15
- package/esm/ToggleButtonGroup.d.ts +0 -23
- package/esm/Tooltip.d.ts +0 -15
- package/esm/helpers.d.ts +0 -24
- package/esm/safeFindDOMNode.d.ts +0 -1
- package/esm/safeFindDOMNode.js +0 -9
- package/esm/types.d.ts +0 -29
- package/esm/types.js +0 -13
- package/esm/usePlaceholder.d.ts +0 -10
- package/getInitialPopperStyles/package.json +0 -7
- package/getTabTransitionComponent/package.json +0 -7
- package/helpers/package.json +0 -7
- package/safeFindDOMNode/package.json +0 -7
- package/transitionEndListener/package.json +0 -7
- package/triggerBrowserReflow/package.json +0 -7
- package/types/package.json +0 -7
- package/useOverlayOffset/package.json +0 -7
- package/usePlaceholder/package.json +0 -7
- package/useWrappedRefWithWarning/package.json +0 -7
- /package/{esm → lib}/AccordionContext.js +0 -0
- /package/{esm → lib}/AccordionItemContext.d.ts +0 -0
- /package/{esm → lib}/AccordionItemContext.js +0 -0
- /package/{esm → lib}/Anchor.js +0 -0
- /package/{esm → lib}/BootstrapModalManager.js +0 -0
- /package/{esm → lib}/CardHeaderContext.d.ts +0 -0
- /package/{esm → lib}/CardHeaderContext.js +0 -0
- /package/{esm → lib}/DropdownContext.js +0 -0
- /package/{esm → lib}/ElementChildren.d.ts +0 -0
- /package/{esm → lib}/FormContext.d.ts +0 -0
- /package/{esm → lib}/FormContext.js +0 -0
- /package/{esm → lib}/FormGroup.js +0 -0
- /package/{esm → lib}/InputGroupContext.d.ts +0 -0
- /package/{esm → lib}/InputGroupContext.js +0 -0
- /package/{esm → lib}/ModalContext.d.ts +0 -0
- /package/{esm → lib}/NavContext.js +0 -0
- /package/{esm → lib}/NavbarCollapse.js +0 -0
- /package/{esm → lib}/NavbarContext.d.ts +0 -0
- /package/{esm → lib}/NavbarContext.js +0 -0
- /package/{esm → lib}/Placeholder.js +0 -0
- /package/{esm → lib}/PlaceholderButton.js +0 -0
- /package/{esm → lib}/Switch.js +0 -0
- /package/{esm → lib}/TabContainer.js +0 -0
- /package/{esm → lib}/ThemeProvider.js +0 -0
- /package/{esm → lib}/ToastContext.d.ts +0 -0
- /package/{esm → lib}/ToastFade.js +0 -0
- /package/{esm → lib}/ToggleButtonGroup.js +0 -0
- /package/{esm → lib}/createChainedFunction.d.ts +0 -0
- /package/{esm → lib}/createChainedFunction.js +0 -0
- /package/{esm → lib}/divWithClassName.d.ts +0 -0
- /package/{esm → lib}/getInitialPopperStyles.d.ts +0 -0
- /package/{esm → lib}/getInitialPopperStyles.js +0 -0
- /package/{esm → lib}/getTabTransitionComponent.js +0 -0
- /package/{esm → lib}/transitionEndListener.d.ts +0 -0
- /package/{esm → lib}/transitionEndListener.js +0 -0
- /package/{esm → lib}/triggerBrowserReflow.d.ts +0 -0
- /package/{esm → lib}/triggerBrowserReflow.js +0 -0
- /package/{esm → lib}/useOverlayOffset.js +0 -0
- /package/{esm → lib}/useWrappedRefWithWarning.d.ts +0 -0
- /package/{esm → lib}/useWrappedRefWithWarning.js +0 -0
package/cjs/TransitionWrapper.js
CHANGED
|
@@ -7,10 +7,9 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _Transition = _interopRequireDefault(require("react-transition-group/Transition"));
|
|
9
9
|
var _useMergedRefs = _interopRequireDefault(require("@restart/hooks/useMergedRefs"));
|
|
10
|
-
var _safeFindDOMNode = _interopRequireDefault(require("./safeFindDOMNode"));
|
|
11
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
11
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
13
|
// Normalizes Transition callbacks when nodeRef is used.
|
|
15
14
|
const TransitionWrapper = /*#__PURE__*/_react.default.forwardRef(({
|
|
16
15
|
onEnter,
|
|
@@ -26,9 +25,6 @@ const TransitionWrapper = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
26
25
|
}, ref) => {
|
|
27
26
|
const nodeRef = (0, _react.useRef)(null);
|
|
28
27
|
const mergedRef = (0, _useMergedRefs.default)(nodeRef, childRef);
|
|
29
|
-
const attachRef = r => {
|
|
30
|
-
mergedRef((0, _safeFindDOMNode.default)(r));
|
|
31
|
-
};
|
|
32
28
|
const normalize = callback => param => {
|
|
33
29
|
if (callback && nodeRef.current) {
|
|
34
30
|
callback(nodeRef.current, param);
|
|
@@ -56,9 +52,9 @@ const TransitionWrapper = /*#__PURE__*/_react.default.forwardRef(({
|
|
|
56
52
|
// TODO: Types for RTG missing innerProps, so need to cast.
|
|
57
53
|
children(status, {
|
|
58
54
|
...innerProps,
|
|
59
|
-
ref:
|
|
55
|
+
ref: mergedRef
|
|
60
56
|
}) : /*#__PURE__*/_react.default.cloneElement(children, {
|
|
61
|
-
ref:
|
|
57
|
+
ref: mergedRef
|
|
62
58
|
})
|
|
63
59
|
});
|
|
64
60
|
});
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
1
|
export type ResponsiveUtilityValue<T> = T | {
|
|
3
2
|
xs?: T;
|
|
4
3
|
sm?: T;
|
|
@@ -7,5 +6,4 @@ export type ResponsiveUtilityValue<T> = T | {
|
|
|
7
6
|
xl?: T;
|
|
8
7
|
xxl?: T;
|
|
9
8
|
};
|
|
10
|
-
export declare function responsivePropType(propType: any): PropTypes.Requireable<any>;
|
|
11
9
|
export default function createUtilityClassName(utilityValues: Record<string, ResponsiveUtilityValue<unknown>>, breakpoints?: string[], minBreakpoint?: string): string[];
|
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
3
|
exports.__esModule = true;
|
|
5
4
|
exports.default = createUtilityClassName;
|
|
6
|
-
exports.responsivePropType = responsivePropType;
|
|
7
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
8
5
|
var _ThemeProvider = require("./ThemeProvider");
|
|
9
|
-
function responsivePropType(propType) {
|
|
10
|
-
return _propTypes.default.oneOfType([propType, _propTypes.default.shape({
|
|
11
|
-
xs: propType,
|
|
12
|
-
sm: propType,
|
|
13
|
-
md: propType,
|
|
14
|
-
lg: propType,
|
|
15
|
-
xl: propType,
|
|
16
|
-
xxl: propType
|
|
17
|
-
})]);
|
|
18
|
-
}
|
|
19
6
|
function createUtilityClassName(utilityValues, breakpoints = _ThemeProvider.DEFAULT_BREAKPOINTS, minBreakpoint = _ThemeProvider.DEFAULT_MIN_BREAKPOINT) {
|
|
20
7
|
const classes = [];
|
|
21
8
|
Object.entries(utilityValues).forEach(([utilName, utilValue]) => {
|
|
@@ -34,4 +21,5 @@ function createUtilityClassName(utilityValues, breakpoints = _ThemeProvider.DEFA
|
|
|
34
21
|
}
|
|
35
22
|
});
|
|
36
23
|
return classes;
|
|
37
|
-
}
|
|
24
|
+
}
|
|
25
|
+
module.exports = exports.default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
|
|
3
3
|
interface BsPrefixOptions<As extends React.ElementType = 'div'> {
|
|
4
4
|
displayName?: string;
|
|
5
5
|
Component?: As;
|
|
6
6
|
defaultProps?: Partial<React.ComponentProps<As>>;
|
|
7
7
|
}
|
|
8
|
-
export default function createWithBsPrefix<As extends React.ElementType = 'div'>(prefix: string, { displayName, Component, defaultProps, }?: BsPrefixOptions<As>):
|
|
8
|
+
export default function createWithBsPrefix<As extends React.ElementType = 'div'>(prefix: string, { displayName, Component, defaultProps, }?: BsPrefixOptions<As>): DynamicRefForwardingComponent<As>;
|
|
9
9
|
export {};
|
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
5
5
|
exports.__esModule = true;
|
|
6
6
|
exports.default = createWithBsPrefix;
|
|
7
|
-
var
|
|
7
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
8
8
|
var _camelize = _interopRequireDefault(require("dom-helpers/camelize"));
|
|
9
9
|
var React = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _ThemeProvider = require("./ThemeProvider");
|
|
11
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
13
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
14
|
const pascalCase = str => str[0].toUpperCase() + (0, _camelize.default)(str).slice(1);
|
|
15
15
|
// TODO: emstricten & fix the typing here! `createWithBsPrefix<TElementType>...`
|
|
16
16
|
function createWithBsPrefix(prefix, {
|
|
@@ -31,7 +31,7 @@ function createWithBsPrefix(prefix, {
|
|
|
31
31
|
const resolvedPrefix = (0, _ThemeProvider.useBootstrapPrefix)(bsPrefix, prefix);
|
|
32
32
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(Tag, {
|
|
33
33
|
ref: ref,
|
|
34
|
-
className: (0,
|
|
34
|
+
className: (0, _clsx.default)(className, resolvedPrefix),
|
|
35
35
|
...componentProps
|
|
36
36
|
});
|
|
37
37
|
});
|
package/cjs/divWithClassName.js
CHANGED
|
@@ -4,17 +4,17 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
exports.__esModule = true;
|
|
5
5
|
exports.default = void 0;
|
|
6
6
|
var React = _interopRequireWildcard(require("react"));
|
|
7
|
-
var
|
|
7
|
+
var _clsx = _interopRequireDefault(require("clsx"));
|
|
8
8
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
9
9
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
10
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u &&
|
|
10
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
11
|
var _default = className =>
|
|
12
12
|
/*#__PURE__*/
|
|
13
13
|
// eslint-disable-next-line react/display-name
|
|
14
14
|
React.forwardRef((p, ref) => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
15
15
|
...p,
|
|
16
16
|
ref: ref,
|
|
17
|
-
className: (0,
|
|
17
|
+
className: (0, _clsx.default)(p.className, className)
|
|
18
18
|
}));
|
|
19
19
|
exports.default = _default;
|
|
20
20
|
module.exports = exports.default;
|
package/cjs/helpers.d.ts
CHANGED
|
@@ -1,24 +1,4 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { TransitionComponent } from '@restart/ui/types';
|
|
3
2
|
export type Omit<T, U> = Pick<T, Exclude<keyof T, keyof U>>;
|
|
4
|
-
export type ReplaceProps<Inner extends React.ElementType, P> = Omit<React.ComponentPropsWithRef<Inner>, P> & P;
|
|
5
|
-
export interface BsPrefixOnlyProps {
|
|
6
|
-
bsPrefix?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface AsProp<As extends React.ElementType = React.ElementType> {
|
|
9
|
-
as?: As;
|
|
10
|
-
}
|
|
11
|
-
export interface BsPrefixProps<As extends React.ElementType = React.ElementType> extends BsPrefixOnlyProps, AsProp<As> {
|
|
12
|
-
}
|
|
13
|
-
export interface BsPrefixRefForwardingComponent<TInitial extends React.ElementType, P = unknown> {
|
|
14
|
-
<As extends React.ElementType = TInitial>(props: React.PropsWithChildren<ReplaceProps<As, BsPrefixProps<As> & P>>, context?: any): React.ReactElement | null;
|
|
15
|
-
propTypes?: any;
|
|
16
|
-
contextTypes?: any;
|
|
17
|
-
defaultProps?: Partial<P>;
|
|
18
|
-
displayName?: string;
|
|
19
|
-
}
|
|
20
|
-
export declare class BsPrefixComponent<As extends React.ElementType, P = unknown> extends React.Component<ReplaceProps<As, BsPrefixProps<As> & P>> {
|
|
21
|
-
}
|
|
22
|
-
export type BsPrefixComponentClass<As extends React.ElementType, P = unknown> = React.ComponentClass<ReplaceProps<As, BsPrefixProps<As> & P>>;
|
|
23
3
|
export type TransitionType = boolean | TransitionComponent;
|
|
24
4
|
export declare function getOverlayDirection(placement: string, isRTL?: boolean): string;
|
package/cjs/helpers.js
CHANGED
|
@@ -1,15 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
exports.BsPrefixComponent = void 0;
|
|
5
4
|
exports.getOverlayDirection = getOverlayDirection;
|
|
6
|
-
var React = _interopRequireWildcard(require("react"));
|
|
7
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
8
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
9
|
-
class BsPrefixComponent extends React.Component {}
|
|
10
|
-
|
|
11
|
-
// Need to use this instead of typeof Component to get proper type checking.
|
|
12
|
-
exports.BsPrefixComponent = BsPrefixComponent;
|
|
13
5
|
function getOverlayDirection(placement, isRTL) {
|
|
14
6
|
let bsDirection = placement;
|
|
15
7
|
if (placement === 'left') {
|
package/cjs/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export type { AccordionProps } from './Accordion';
|
|
|
3
3
|
export { default as AccordionContext } from './AccordionContext';
|
|
4
4
|
export { default as AccordionCollapse } from './AccordionCollapse';
|
|
5
5
|
export type { AccordionCollapseProps } from './AccordionCollapse';
|
|
6
|
-
export { default as AccordionButton
|
|
6
|
+
export { default as AccordionButton } from './AccordionButton';
|
|
7
7
|
export type { AccordionButtonProps } from './AccordionButton';
|
|
8
8
|
export { default as AccordionBody } from './AccordionBody';
|
|
9
9
|
export type { AccordionBodyProps } from './AccordionBody';
|
|
@@ -184,8 +184,6 @@ export { default as Spinner } from './Spinner';
|
|
|
184
184
|
export type { SpinnerProps } from './Spinner';
|
|
185
185
|
export { default as SplitButton } from './SplitButton';
|
|
186
186
|
export type { SplitButtonProps } from './SplitButton';
|
|
187
|
-
export { default as SSRProvider } from './SSRProvider';
|
|
188
|
-
export type { SSRProviderProps } from './SSRProvider';
|
|
189
187
|
export { default as Stack } from './Stack';
|
|
190
188
|
export type { StackProps } from './Stack';
|
|
191
189
|
export { default as Tab } from './Tab';
|
|
@@ -216,3 +214,4 @@ export { default as ToggleButtonGroup } from './ToggleButtonGroup';
|
|
|
216
214
|
export type { ToggleButtonCheckboxProps, ToggleButtonGroupProps, ToggleButtonRadioProps, } from './ToggleButtonGroup';
|
|
217
215
|
export { default as Tooltip } from './Tooltip';
|
|
218
216
|
export type { TooltipProps } from './Tooltip';
|
|
217
|
+
export { default as useAccordionButton } from './useAccordionButton';
|
package/cjs/index.js
CHANGED
|
@@ -2,17 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
exports.__esModule = true;
|
|
5
|
-
exports.TabContent = exports.TabContainer = exports.Tab = exports.Stack = exports.SplitButton = exports.Spinner = exports.
|
|
6
|
-
exports.useAccordionButton = exports.Tooltip = exports.ToggleButtonGroup = exports.ToggleButton = exports.ToastHeader = exports.ToastContainer = exports.ToastBody = exports.Toast = exports.ThemeProvider = exports.Tabs = exports.Table =
|
|
5
|
+
exports.TabPane = exports.TabContent = exports.TabContainer = exports.Tab = exports.Stack = exports.SplitButton = exports.Spinner = exports.Row = exports.Ratio = exports.ProgressBar = exports.PopoverHeader = exports.PopoverBody = exports.Popover = exports.PlaceholderButton = exports.Placeholder = exports.Pagination = exports.PageItem = exports.OverlayTrigger = exports.Overlay = exports.OffcanvasToggling = exports.OffcanvasTitle = exports.OffcanvasHeader = exports.OffcanvasBody = exports.Offcanvas = exports.NavbarToggle = exports.NavbarText = exports.NavbarOffcanvas = exports.NavbarCollapse = exports.NavbarBrand = exports.Navbar = exports.NavLink = exports.NavItem = exports.NavDropdown = exports.Nav = exports.ModalTitle = exports.ModalHeader = exports.ModalFooter = exports.ModalDialog = exports.ModalBody = exports.Modal = exports.ListGroupItem = exports.ListGroup = exports.InputGroup = exports.Image = exports.FormText = exports.FormSelect = exports.FormLabel = exports.FormGroup = exports.FormFloating = exports.FormControl = exports.FormCheck = exports.Form = exports.FloatingLabel = exports.FigureImage = exports.FigureCaption = exports.Figure = exports.Fade = exports.DropdownToggle = exports.DropdownMenu = exports.DropdownItemText = exports.DropdownItem = exports.DropdownHeader = exports.DropdownDivider = exports.DropdownButton = exports.Dropdown = exports.Container = exports.Collapse = exports.Col = exports.CloseButton = exports.CarouselItem = exports.CarouselCaption = exports.Carousel = exports.CardTitle = exports.CardText = exports.CardSubtitle = exports.CardLink = exports.CardImgOverlay = exports.CardImg = exports.CardHeader = exports.CardGroup = exports.CardFooter = exports.CardBody = exports.Card = exports.ButtonToolbar = exports.ButtonGroup = exports.Button = exports.BreadcrumbItem = exports.Breadcrumb = exports.Badge = exports.Anchor = exports.AlertLink = exports.AlertHeading = exports.Alert = exports.AccordionItem = exports.AccordionHeader = exports.AccordionContext = exports.AccordionCollapse = exports.AccordionButton = exports.AccordionBody = exports.Accordion = void 0;
|
|
6
|
+
exports.useAccordionButton = exports.Tooltip = exports.ToggleButtonGroup = exports.ToggleButton = exports.ToastHeader = exports.ToastContainer = exports.ToastBody = exports.Toast = exports.ThemeProvider = exports.Tabs = exports.Table = void 0;
|
|
7
7
|
var _Accordion = _interopRequireDefault(require("./Accordion"));
|
|
8
8
|
exports.Accordion = _Accordion.default;
|
|
9
9
|
var _AccordionContext = _interopRequireDefault(require("./AccordionContext"));
|
|
10
10
|
exports.AccordionContext = _AccordionContext.default;
|
|
11
11
|
var _AccordionCollapse = _interopRequireDefault(require("./AccordionCollapse"));
|
|
12
12
|
exports.AccordionCollapse = _AccordionCollapse.default;
|
|
13
|
-
var _AccordionButton =
|
|
13
|
+
var _AccordionButton = _interopRequireDefault(require("./AccordionButton"));
|
|
14
14
|
exports.AccordionButton = _AccordionButton.default;
|
|
15
|
-
exports.useAccordionButton = _AccordionButton.useAccordionButton;
|
|
16
15
|
var _AccordionBody = _interopRequireDefault(require("./AccordionBody"));
|
|
17
16
|
exports.AccordionBody = _AccordionBody.default;
|
|
18
17
|
var _AccordionHeader = _interopRequireDefault(require("./AccordionHeader"));
|
|
@@ -195,8 +194,6 @@ var _Spinner = _interopRequireDefault(require("./Spinner"));
|
|
|
195
194
|
exports.Spinner = _Spinner.default;
|
|
196
195
|
var _SplitButton = _interopRequireDefault(require("./SplitButton"));
|
|
197
196
|
exports.SplitButton = _SplitButton.default;
|
|
198
|
-
var _SSRProvider = _interopRequireDefault(require("./SSRProvider"));
|
|
199
|
-
exports.SSRProvider = _SSRProvider.default;
|
|
200
197
|
var _Stack = _interopRequireDefault(require("./Stack"));
|
|
201
198
|
exports.Stack = _Stack.default;
|
|
202
199
|
var _Tab = _interopRequireDefault(require("./Tab"));
|
|
@@ -227,5 +224,5 @@ var _ToggleButtonGroup = _interopRequireDefault(require("./ToggleButtonGroup"));
|
|
|
227
224
|
exports.ToggleButtonGroup = _ToggleButtonGroup.default;
|
|
228
225
|
var _Tooltip = _interopRequireDefault(require("./Tooltip"));
|
|
229
226
|
exports.Tooltip = _Tooltip.default;
|
|
230
|
-
|
|
231
|
-
|
|
227
|
+
var _useAccordionButton = _interopRequireDefault(require("./useAccordionButton"));
|
|
228
|
+
exports.useAccordionButton = _useAccordionButton.default;
|
package/cjs/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type": "commonjs"}
|
package/cjs/types.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import type { Offset, State, UsePopperOptions, UsePopperState, VirtualElement } from '@restart/ui/usePopper';
|
|
2
|
+
import type { ToggleMetadata } from '@restart/ui/Dropdown';
|
|
3
|
+
import type ModalManager from '@restart/ui/ModalManager';
|
|
4
|
+
import type { EventKey, SelectCallback } from '@restart/ui/types';
|
|
5
|
+
import type { DropDirection } from './DropdownContext';
|
|
6
|
+
export type DOMContainer<T extends HTMLElement | VirtualElement = HTMLElement> = T | React.RefObject<T | null> | null | (() => T | React.RefObject<T | null> | null);
|
|
3
7
|
export type Variant = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | (string & {});
|
|
4
8
|
export type ButtonVariant = Variant | 'link' | 'outline-primary' | 'outline-secondary' | 'outline-success' | 'outline-danger' | 'outline-warning' | 'outline-info' | 'outline-dark' | 'outline-light';
|
|
5
9
|
export type Color = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'dark' | 'light' | 'white' | 'muted' | (string & {});
|
|
@@ -17,7 +21,6 @@ export type ResponsiveAlignProp = {
|
|
|
17
21
|
xxl: AlignDirection;
|
|
18
22
|
} | Record<string, AlignDirection>;
|
|
19
23
|
export type AlignType = AlignDirection | ResponsiveAlignProp;
|
|
20
|
-
export declare const alignPropType: PropTypes.Requireable<NonNullable<object | AlignDirection | null | undefined>>;
|
|
21
24
|
export type RootCloseEvent = 'click' | 'mousedown';
|
|
22
25
|
export type GapValue = 0 | 1 | 2 | 3 | 4 | 5 | number;
|
|
23
26
|
export interface PopperRef {
|
|
@@ -27,3 +30,335 @@ export interface PopperRef {
|
|
|
27
30
|
scheduleUpdate?: () => void;
|
|
28
31
|
strategy: UsePopperOptions['strategy'];
|
|
29
32
|
}
|
|
33
|
+
export interface TransitionCallbacks {
|
|
34
|
+
/**
|
|
35
|
+
* Callback fired before the component transitions in
|
|
36
|
+
*
|
|
37
|
+
* @type {((node: HTMLElement, isAppearing: boolean) => any) | undefined}
|
|
38
|
+
*/
|
|
39
|
+
onEnter?: ((node: HTMLElement, isAppearing: boolean) => any) | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Callback fired as the component begins to transition in
|
|
42
|
+
*
|
|
43
|
+
* @type {((node: HTMLElement, isAppearing: boolean) => any) | undefined}
|
|
44
|
+
*/
|
|
45
|
+
onEntering?: ((node: HTMLElement, isAppearing: boolean) => any) | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Callback fired after the component finishes transitioning in
|
|
48
|
+
*
|
|
49
|
+
* @type {((node: HTMLElement, isAppearing: boolean) => any) | undefined}
|
|
50
|
+
*/
|
|
51
|
+
onEntered?: ((node: HTMLElement, isAppearing: boolean) => any) | undefined;
|
|
52
|
+
/**
|
|
53
|
+
* Callback fired right before the component transitions out
|
|
54
|
+
*
|
|
55
|
+
* @type {((node: HTMLElement) => any) | undefined}
|
|
56
|
+
*/
|
|
57
|
+
onExit?: ((node: HTMLElement) => any) | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Callback fired as the component begins to transition out
|
|
60
|
+
*
|
|
61
|
+
* @type {((node: HTMLElement) => any) | undefined}
|
|
62
|
+
*/
|
|
63
|
+
onExiting?: ((node: HTMLElement) => any) | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Callback fired after the component finishes transitioning out
|
|
66
|
+
*
|
|
67
|
+
* @type {((node: HTMLElement) => any) | undefined}
|
|
68
|
+
*/
|
|
69
|
+
onExited?: ((node: HTMLElement) => any) | undefined;
|
|
70
|
+
}
|
|
71
|
+
export interface BaseDropdownProps {
|
|
72
|
+
/**
|
|
73
|
+
* The PopperJS placement for positioning the Dropdown menu in relation to
|
|
74
|
+
* its Toggle.
|
|
75
|
+
*
|
|
76
|
+
* @type {'auto' | 'auto-start' | "auto-end' | 'top' | 'bottom' | 'right' | 'left' | 'top-start' | "top-end | 'bottom-start' | 'bottom-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end'}
|
|
77
|
+
* @default 'bottom-start'
|
|
78
|
+
*/
|
|
79
|
+
placement?: Placement | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Sets the initial visibility of the Dropdown.
|
|
82
|
+
*/
|
|
83
|
+
defaultShow?: boolean | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Whether or not the Dropdown is visible.
|
|
86
|
+
*
|
|
87
|
+
* @controllable onToggle
|
|
88
|
+
*/
|
|
89
|
+
show?: boolean | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* A callback fired when a DropdownItem has been selected.
|
|
92
|
+
*
|
|
93
|
+
* @type {((eventKey: string | null, e: React.SyntheticEvent<any>) => void) | undefined}
|
|
94
|
+
*/
|
|
95
|
+
onSelect?: SelectCallback | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* A callback fired when the Dropdown wishes to change visibility. Called with
|
|
98
|
+
* the requested `show` value, the DOM event, and the source that fired it:
|
|
99
|
+
* `'click'`,`'keydown'`,`'rootClose'`, or `'select'`.
|
|
100
|
+
*
|
|
101
|
+
* ```ts static
|
|
102
|
+
* function(
|
|
103
|
+
* nextShow: boolean,
|
|
104
|
+
* meta: ToggleMetadata,
|
|
105
|
+
* ): void
|
|
106
|
+
* ```
|
|
107
|
+
* @type {((nextShow: boolean, meta: ToggleMetadata) => void) | undefined}
|
|
108
|
+
* @controllable show
|
|
109
|
+
*/
|
|
110
|
+
onToggle?: ((nextShow: boolean, meta: ToggleMetadata) => void) | undefined;
|
|
111
|
+
/**
|
|
112
|
+
* Controls the focus behavior for when the Dropdown is opened. Set to
|
|
113
|
+
* `true` to always focus the first menu item, `keyboard` to focus only when
|
|
114
|
+
* navigating via the keyboard, or `false` to disable completely
|
|
115
|
+
*
|
|
116
|
+
* The Default behavior is `false` **unless** the Menu has a `role="menu"`
|
|
117
|
+
* where it will default to `keyboard` to match the recommended [ARIA Authoring
|
|
118
|
+
* practices](https://www.w3.org/TR/wai-aria-practices-1.1/#menubutton).
|
|
119
|
+
*/
|
|
120
|
+
focusFirstItemOnShow?: boolean | 'keyboard' | undefined;
|
|
121
|
+
/**
|
|
122
|
+
* A render prop that returns the root dropdown element. The `props`
|
|
123
|
+
* argument should spread through to an element containing _both_ the
|
|
124
|
+
* menu and toggle in order to handle keyboard events for focus management.
|
|
125
|
+
*/
|
|
126
|
+
children: React.ReactNode;
|
|
127
|
+
}
|
|
128
|
+
export interface BaseNavProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'> {
|
|
129
|
+
/**
|
|
130
|
+
* Key for the currently active NavItem.
|
|
131
|
+
*
|
|
132
|
+
* @type {string | number | undefined}
|
|
133
|
+
*/
|
|
134
|
+
activeKey?: EventKey | undefined;
|
|
135
|
+
/**
|
|
136
|
+
* Element used to render the component.
|
|
137
|
+
*/
|
|
138
|
+
as?: React.ElementType | undefined;
|
|
139
|
+
/**
|
|
140
|
+
* A callback fired when a NavItem has been selected.
|
|
141
|
+
*
|
|
142
|
+
* @type {((eventKey: string | null, e: React.SyntheticEvent<any>) => void) | undefined}
|
|
143
|
+
*/
|
|
144
|
+
onSelect?: SelectCallback;
|
|
145
|
+
}
|
|
146
|
+
export interface BaseNavItemProps extends React.HTMLAttributes<HTMLElement> {
|
|
147
|
+
/**
|
|
148
|
+
* Highlight the NavItem as active.
|
|
149
|
+
*/
|
|
150
|
+
active?: boolean | undefined;
|
|
151
|
+
/**
|
|
152
|
+
* Element used to render the component.
|
|
153
|
+
*/
|
|
154
|
+
as?: React.ElementType | undefined;
|
|
155
|
+
/**
|
|
156
|
+
* Disable the NavItem, making it unselectable.
|
|
157
|
+
*/
|
|
158
|
+
disabled?: boolean | undefined;
|
|
159
|
+
/**
|
|
160
|
+
* Value passed to the `onSelect` handler, useful for identifying the selected NavItem.
|
|
161
|
+
*
|
|
162
|
+
* @type {string | number | undefined}
|
|
163
|
+
*/
|
|
164
|
+
eventKey?: EventKey | undefined;
|
|
165
|
+
/**
|
|
166
|
+
* HTML `href` attribute corresponding to `a.href`.
|
|
167
|
+
*/
|
|
168
|
+
href?: string | undefined;
|
|
169
|
+
}
|
|
170
|
+
export interface BaseModalProps extends TransitionCallbacks {
|
|
171
|
+
/**
|
|
172
|
+
* Set the visibility of the Modal
|
|
173
|
+
*/
|
|
174
|
+
show?: boolean | undefined;
|
|
175
|
+
/**
|
|
176
|
+
* A DOM element, a `ref` to an element, or function that returns either. The Modal is appended to it's `container` element.
|
|
177
|
+
*
|
|
178
|
+
*/
|
|
179
|
+
container?: DOMContainer | undefined;
|
|
180
|
+
/**
|
|
181
|
+
* A callback fired when the Modal is opening.
|
|
182
|
+
*
|
|
183
|
+
* @type {(() => void) | undefined}
|
|
184
|
+
*/
|
|
185
|
+
onShow?: (() => void) | undefined;
|
|
186
|
+
/**
|
|
187
|
+
* A callback fired when either the backdrop is clicked, or the escape key is pressed.
|
|
188
|
+
*
|
|
189
|
+
* The `onHide` callback only signals intent from the Modal,
|
|
190
|
+
* you must actually set the `show` prop to `false` for the Modal to close.
|
|
191
|
+
*
|
|
192
|
+
* @type {(() => void) | undefined}
|
|
193
|
+
*/
|
|
194
|
+
onHide?: (() => void) | undefined;
|
|
195
|
+
/**
|
|
196
|
+
* A ModalManager instance used to track and manage the state of open
|
|
197
|
+
* Modals. Useful when customizing how modals interact within a container
|
|
198
|
+
*
|
|
199
|
+
* @type {ModalManager | undefined}
|
|
200
|
+
*/
|
|
201
|
+
manager?: ModalManager | undefined;
|
|
202
|
+
/**
|
|
203
|
+
* Include a backdrop component. A `static`backdrop
|
|
204
|
+
* will not trigger a Modal onHide when clicked.
|
|
205
|
+
*/
|
|
206
|
+
backdrop?: boolean | 'static' | undefined;
|
|
207
|
+
/**
|
|
208
|
+
* A callback fired when the escape key, if specified in `keyboard`, is pressed.
|
|
209
|
+
*
|
|
210
|
+
* If preventDefault() is called on the keyboard event, closing the modal will be cancelled.
|
|
211
|
+
*
|
|
212
|
+
* @type {((e: KeyboardEvent) => void) | undefined}
|
|
213
|
+
*/
|
|
214
|
+
onEscapeKeyDown?: ((e: KeyboardEvent) => void) | undefined;
|
|
215
|
+
/**
|
|
216
|
+
* A callback fired when the backdrop, if specified, is clicked.
|
|
217
|
+
*
|
|
218
|
+
* @type {((e: React.SyntheticEvent) => void) | undefined}
|
|
219
|
+
*/
|
|
220
|
+
onBackdropClick?: ((e: React.SyntheticEvent) => void) | undefined;
|
|
221
|
+
/**
|
|
222
|
+
* Close the modal when escape key is pressed
|
|
223
|
+
*/
|
|
224
|
+
keyboard?: boolean | undefined;
|
|
225
|
+
/**
|
|
226
|
+
* When `true` The modal will automatically shift focus to itself when it opens, and
|
|
227
|
+
* replace it to the last focused element when it closes. This also
|
|
228
|
+
* works correctly with any Modal children that have the `autoFocus` prop.
|
|
229
|
+
*
|
|
230
|
+
* Generally this should never be set to `false` as it makes the Modal less
|
|
231
|
+
* accessible to assistive technologies, like screen readers.
|
|
232
|
+
*/
|
|
233
|
+
autoFocus?: boolean | undefined;
|
|
234
|
+
/**
|
|
235
|
+
* When `true` The modal will prevent focus from leaving the Modal while open.
|
|
236
|
+
*
|
|
237
|
+
* Generally this should never be set to `false` as it makes the Modal less
|
|
238
|
+
* accessible to assistive technologies, like screen readers.
|
|
239
|
+
*/
|
|
240
|
+
enforceFocus?: boolean | undefined;
|
|
241
|
+
/**
|
|
242
|
+
* When `true` The modal will restore focus to previously focused element once
|
|
243
|
+
* modal is hidden
|
|
244
|
+
*/
|
|
245
|
+
restoreFocus?: boolean | undefined;
|
|
246
|
+
/**
|
|
247
|
+
* Options passed to focus function when `restoreFocus` is set to `true`
|
|
248
|
+
*
|
|
249
|
+
* @link https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#Parameters
|
|
250
|
+
*/
|
|
251
|
+
restoreFocusOptions?: {
|
|
252
|
+
preventScroll: boolean;
|
|
253
|
+
} | undefined;
|
|
254
|
+
}
|
|
255
|
+
export interface OverlayArrowProps extends Record<string, any> {
|
|
256
|
+
ref: React.RefCallback<HTMLElement>;
|
|
257
|
+
style: React.CSSProperties;
|
|
258
|
+
}
|
|
259
|
+
export interface OverlayMetadata {
|
|
260
|
+
show: boolean;
|
|
261
|
+
placement: Placement | undefined;
|
|
262
|
+
popper: UsePopperState | null;
|
|
263
|
+
arrowProps: Partial<OverlayArrowProps>;
|
|
264
|
+
}
|
|
265
|
+
export interface OverlayInjectedProps extends Record<string, any> {
|
|
266
|
+
ref: React.RefCallback<HTMLElement>;
|
|
267
|
+
style: React.CSSProperties;
|
|
268
|
+
'aria-labelledby'?: string;
|
|
269
|
+
}
|
|
270
|
+
export interface BaseOverlayProps extends TransitionCallbacks {
|
|
271
|
+
/**
|
|
272
|
+
* Enables the Popper.js `flip` modifier, allowing the Overlay to
|
|
273
|
+
* automatically adjust it's placement in case of overlap with the viewport or toggle.
|
|
274
|
+
* Refer to the [flip docs](https://popper.js.org/popper-documentation.html#modifiers..flip.enabled) for more info
|
|
275
|
+
*/
|
|
276
|
+
flip?: boolean | undefined;
|
|
277
|
+
/** Specify where the overlay element is positioned in relation to the target element */
|
|
278
|
+
placement?: Placement | undefined;
|
|
279
|
+
/**
|
|
280
|
+
* Control offset of the overlay to the reference element.
|
|
281
|
+
* A convenience shortcut to setting `popperConfig.modfiers.offset`
|
|
282
|
+
*/
|
|
283
|
+
offset?: Offset | undefined;
|
|
284
|
+
/**
|
|
285
|
+
* Control how much space there is between the edge of the boundary element and overlay.
|
|
286
|
+
* A convenience shortcut to setting `popperConfig.modfiers.preventOverflow.padding`
|
|
287
|
+
*/
|
|
288
|
+
containerPadding?: number | undefined;
|
|
289
|
+
/**
|
|
290
|
+
* A set of popper options and props passed directly to react-popper's Popper component.
|
|
291
|
+
*/
|
|
292
|
+
popperConfig?: Omit<UsePopperOptions, 'placement'> | undefined;
|
|
293
|
+
/**
|
|
294
|
+
* A DOM Element, [Virtual Element](https://popper.js.org/docs/v2/virtual-elements/), Ref to an element, or
|
|
295
|
+
* function that returns either. The `target` element is where the overlay is positioned relative to.
|
|
296
|
+
*/
|
|
297
|
+
container?: DOMContainer | undefined;
|
|
298
|
+
/**
|
|
299
|
+
* A DOM Element, Ref to an element, or function that returns either. The `target` element is where
|
|
300
|
+
* the overlay is positioned relative to.
|
|
301
|
+
*/
|
|
302
|
+
target: DOMContainer<HTMLElement | VirtualElement>;
|
|
303
|
+
/**
|
|
304
|
+
* Set the visibility of the Overlay
|
|
305
|
+
*/
|
|
306
|
+
show?: boolean | undefined;
|
|
307
|
+
/**
|
|
308
|
+
* A Callback fired by the Overlay when it wishes to be hidden.
|
|
309
|
+
*
|
|
310
|
+
* __required__ when `rootClose` is `true`.
|
|
311
|
+
*
|
|
312
|
+
* @type {((e: Event) => void) | undefined}
|
|
313
|
+
*/
|
|
314
|
+
onHide?: ((e: Event) => void) | undefined;
|
|
315
|
+
/**
|
|
316
|
+
* Specify whether the overlay should trigger `onHide` when the user clicks outside the overlay
|
|
317
|
+
*/
|
|
318
|
+
rootClose?: boolean | undefined;
|
|
319
|
+
/**
|
|
320
|
+
* Specify disabled for disable RootCloseWrapper
|
|
321
|
+
*/
|
|
322
|
+
rootCloseDisabled?: boolean | undefined;
|
|
323
|
+
}
|
|
324
|
+
export interface BsDropdownProps extends BaseDropdownProps {
|
|
325
|
+
/**
|
|
326
|
+
* Element used to render the component.
|
|
327
|
+
*/
|
|
328
|
+
as?: React.ElementType | undefined;
|
|
329
|
+
/**
|
|
330
|
+
* @default 'dropdown'
|
|
331
|
+
*/
|
|
332
|
+
bsPrefix?: string | undefined;
|
|
333
|
+
/**
|
|
334
|
+
* Determines the direction and location of the Menu in relation to it's Toggle.
|
|
335
|
+
*/
|
|
336
|
+
drop?: DropDirection | undefined;
|
|
337
|
+
/**
|
|
338
|
+
* Aligns the dropdown menu to the specified side of the Dropdown toggle. You can
|
|
339
|
+
* also align the menu responsively for breakpoints starting at `sm` and up.
|
|
340
|
+
* The alignment direction will affect the specified breakpoint or larger.
|
|
341
|
+
*
|
|
342
|
+
* *Note: Using responsive alignment will disable Popper usage for positioning.*
|
|
343
|
+
*/
|
|
344
|
+
align?: AlignType | undefined;
|
|
345
|
+
/**
|
|
346
|
+
* Controls the focus behavior for when the Dropdown is opened. Set to
|
|
347
|
+
* `true` to always focus the first menu item, `keyboard` to focus only when
|
|
348
|
+
* navigating via the keyboard, or `false` to disable completely
|
|
349
|
+
*
|
|
350
|
+
* The Default behavior is `false` **unless** the Menu has a `role="menu"`
|
|
351
|
+
* where it will default to `keyboard` to match the recommended
|
|
352
|
+
* [ARIA Authoring practices](https://www.w3.org/TR/wai-aria-practices-1.1/#menubutton).
|
|
353
|
+
*/
|
|
354
|
+
focusFirstItemOnShow?: boolean | 'keyboard' | undefined;
|
|
355
|
+
/**
|
|
356
|
+
* Controls the auto close behaviour of the dropdown when clicking outside of
|
|
357
|
+
* the button or the list.
|
|
358
|
+
*/
|
|
359
|
+
autoClose?: boolean | 'outside' | 'inside' | undefined;
|
|
360
|
+
/**
|
|
361
|
+
* @private
|
|
362
|
+
*/
|
|
363
|
+
navbar?: boolean | undefined;
|
|
364
|
+
}
|
package/cjs/types.js
CHANGED
|
@@ -1,18 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
exports.__esModule = true;
|
|
5
|
-
exports.alignPropType = void 0;
|
|
6
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
7
|
-
const alignDirection = _propTypes.default.oneOf(['start', 'end']);
|
|
8
|
-
const alignPropType = exports.alignPropType = _propTypes.default.oneOfType([alignDirection, _propTypes.default.shape({
|
|
9
|
-
sm: alignDirection
|
|
10
|
-
}), _propTypes.default.shape({
|
|
11
|
-
md: alignDirection
|
|
12
|
-
}), _propTypes.default.shape({
|
|
13
|
-
lg: alignDirection
|
|
14
|
-
}), _propTypes.default.shape({
|
|
15
|
-
xl: alignDirection
|
|
16
|
-
}), _propTypes.default.shape({
|
|
17
|
-
xxl: alignDirection
|
|
18
|
-
}), _propTypes.default.object]);
|
|
3
|
+
exports.__esModule = true;
|