react-bootstrap 2.10.9 → 3.0.0-beta.1
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 +1374 -0
- package/cjs/AbstractModalHeader.d.ts +23 -5
- package/cjs/AbstractModalHeader.js +2 -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/BootstrapModalManager.js +1 -2
- 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 +8 -8
- 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 +41 -21
- package/cjs/Col.js +7 -48
- package/cjs/Collapse.d.ts +45 -10
- package/cjs/Collapse.js +6 -7
- 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 +9 -13
- 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 -29
- package/cjs/InputGroup.d.ts +24 -8
- 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 -5
- package/cjs/Modal.d.ts +53 -16
- package/cjs/Modal.js +4 -7
- package/cjs/ModalBody.d.ts +11 -3
- package/cjs/ModalBody.js +3 -3
- package/cjs/ModalContext.js +2 -2
- 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 -17
- 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 +4 -11
- package/cjs/PageItem.d.ts +31 -9
- package/cjs/PageItem.js +4 -6
- 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 +4 -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 -34
- package/cjs/Ratio.d.ts +13 -3
- package/cjs/Ratio.js +4 -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 +19 -17
- package/cjs/Tab.js +0 -22
- package/cjs/TabContainer.d.ts +51 -57
- package/cjs/TabContainer.js +0 -3
- 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 +4 -3
- package/cjs/Tabs.d.ts +10 -4
- package/cjs/Tabs.js +1 -1
- package/cjs/ThemeProvider.d.ts +25 -6
- 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 -2
- 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 +2 -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 +4 -11
- package/cjs/createChainedFunction.js +2 -2
- 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 +7 -4
- 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/cjs/useWrappedRefWithWarning.js +1 -1
- package/lib/AbstractModalHeader.d.ts +28 -0
- package/{esm → lib}/AbstractModalHeader.js +2 -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/{esm → lib}/BootstrapModalManager.js +1 -2
- 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 +8 -10
- 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 +23 -0
- package/lib/Collapse.d.ts +52 -0
- package/{esm → lib}/Collapse.js +5 -7
- 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 +8 -12
- 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 -4
- package/lib/Modal.d.ts +63 -0
- package/{esm → lib}/Modal.js +3 -6
- package/lib/ModalBody.d.ts +14 -0
- package/{esm → lib}/ModalBody.js +2 -2
- package/{esm → lib}/ModalContext.js +1 -1
- 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 +4 -13
- package/lib/PageItem.d.ts +39 -0
- package/{esm → lib}/PageItem.js +4 -6
- 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 +4 -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 -33
- package/lib/Ratio.d.ts +19 -0
- package/{esm → lib}/Ratio.js +3 -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/{esm → lib}/TabContainer.js +0 -1
- 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 +3 -2
- package/lib/Tabs.d.ts +15 -0
- package/{esm → lib}/Tabs.js +1 -2
- package/{esm → lib}/ThemeProvider.d.ts +25 -6
- 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 -1
- 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/{esm → lib}/ToggleButtonGroup.js +1 -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 +3 -10
- package/{esm → lib}/createChainedFunction.js +2 -2
- 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/lib/divWithClassName.js +11 -0
- 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/{esm → lib}/useWrappedRefWithWarning.js +1 -1
- 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 -13
- package/createChainedFunction/package.json +0 -7
- package/createUtilityClasses/package.json +0 -7
- package/createWithBsPrefix/package.json +0 -7
- package/dist/react-bootstrap.js +0 -16932
- 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 -48
- 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 -22
- 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 -33
- package/esm/TabContainer.d.ts +0 -62
- 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/divWithClassName.js +0 -8
- package/esm/helpers.d.ts +0 -24
- package/esm/safeFindDOMNode.d.ts +0 -1
- package/esm/safeFindDOMNode.js +0 -7
- 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}/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}/ThemeProvider.js +0 -0
- /package/{esm → lib}/ToastContext.d.ts +0 -0
- /package/{esm → lib}/ToastFade.js +0 -0
- /package/{esm → lib}/createChainedFunction.d.ts +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
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import Button from './Button';
|
|
3
|
+
import ButtonGroup from './ButtonGroup';
|
|
4
|
+
import Dropdown from './Dropdown';
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
/**
|
|
7
|
+
* A convenience component for simple or general use split button dropdowns. Renders a
|
|
8
|
+
* `ButtonGroup` containing a `Button` and a `Button` toggle for the `Dropdown`. All `children`
|
|
9
|
+
* are passed directly to the default `Dropdown.Menu`. This component accepts all of [`Dropdown`'s
|
|
10
|
+
* props](#dropdown-props).
|
|
11
|
+
*
|
|
12
|
+
* _All unknown props are passed through to the `Dropdown` component._
|
|
13
|
+
* The Button `variant`, `size` and `bsPrefix` props are passed to the button and toggle,
|
|
14
|
+
* and menu-related props are passed to the `Dropdown.Menu`
|
|
15
|
+
*/
|
|
16
|
+
const SplitButton = /*#__PURE__*/React.forwardRef(({
|
|
17
|
+
id,
|
|
18
|
+
bsPrefix,
|
|
19
|
+
size,
|
|
20
|
+
variant,
|
|
21
|
+
title,
|
|
22
|
+
type = 'button',
|
|
23
|
+
toggleLabel = 'Toggle dropdown',
|
|
24
|
+
children,
|
|
25
|
+
onClick,
|
|
26
|
+
href,
|
|
27
|
+
target,
|
|
28
|
+
menuRole,
|
|
29
|
+
renderMenuOnMount,
|
|
30
|
+
rootCloseEvent,
|
|
31
|
+
flip,
|
|
32
|
+
...props
|
|
33
|
+
}, ref) => /*#__PURE__*/_jsxs(Dropdown, {
|
|
34
|
+
ref: ref,
|
|
35
|
+
...props,
|
|
36
|
+
as: ButtonGroup,
|
|
37
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
|
38
|
+
size: size,
|
|
39
|
+
variant: variant,
|
|
40
|
+
disabled: props.disabled,
|
|
41
|
+
bsPrefix: bsPrefix,
|
|
42
|
+
href: href,
|
|
43
|
+
target: target,
|
|
44
|
+
onClick: onClick,
|
|
45
|
+
type: type,
|
|
46
|
+
children: title
|
|
47
|
+
}), /*#__PURE__*/_jsx(Dropdown.Toggle, {
|
|
48
|
+
split: true,
|
|
49
|
+
id: id,
|
|
50
|
+
size: size,
|
|
51
|
+
variant: variant,
|
|
52
|
+
disabled: props.disabled,
|
|
53
|
+
childBsPrefix: bsPrefix,
|
|
54
|
+
children: /*#__PURE__*/_jsx("span", {
|
|
55
|
+
className: "visually-hidden",
|
|
56
|
+
children: toggleLabel
|
|
57
|
+
})
|
|
58
|
+
}), /*#__PURE__*/_jsx(Dropdown.Menu, {
|
|
59
|
+
role: menuRole,
|
|
60
|
+
renderOnMount: renderMenuOnMount,
|
|
61
|
+
rootCloseEvent: rootCloseEvent,
|
|
62
|
+
flip: flip,
|
|
63
|
+
children: children
|
|
64
|
+
})]
|
|
65
|
+
}));
|
|
66
|
+
SplitButton.displayName = 'SplitButton';
|
|
67
|
+
export default SplitButton;
|
package/lib/Stack.d.ts
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DynamicRefForwardingComponent } from '@restart/ui/types';
|
|
3
|
+
import type { GapValue } from './types';
|
|
4
|
+
import { type ResponsiveUtilityValue } from './createUtilityClasses';
|
|
5
|
+
export type StackDirection = 'horizontal' | 'vertical';
|
|
6
|
+
export interface StackProps extends React.HTMLAttributes<HTMLElement> {
|
|
7
|
+
/**
|
|
8
|
+
* Element used to render the component.
|
|
9
|
+
*/
|
|
10
|
+
as?: React.ElementType | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* Change the underlying component CSS base class name and modifier class names prefix.
|
|
13
|
+
* **This is an escape hatch** for working with heavily customized bootstrap css.
|
|
14
|
+
*
|
|
15
|
+
* Defaults to `hstack` if direction is `horizontal` or `vstack` if direction
|
|
16
|
+
* is `vertical`.
|
|
17
|
+
*
|
|
18
|
+
* @default 'hstack | vstack'
|
|
19
|
+
*/
|
|
20
|
+
bsPrefix?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Flex direction.
|
|
23
|
+
*/
|
|
24
|
+
direction?: StackDirection | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Sets the spacing between each item. Valid values are `0-5`.
|
|
27
|
+
*/
|
|
28
|
+
gap?: ResponsiveUtilityValue<GapValue> | undefined;
|
|
29
|
+
}
|
|
30
|
+
declare const Stack: DynamicRefForwardingComponent<'span', StackProps>;
|
|
31
|
+
export default Stack;
|
package/{esm → lib}/Stack.js
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { useBootstrapPrefix, useBootstrapBreakpoints, useBootstrapMinBreakpoint } from './ThemeProvider';
|
|
6
|
-
import createUtilityClassName
|
|
6
|
+
import createUtilityClassName from './createUtilityClasses';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
const Stack = /*#__PURE__*/React.forwardRef(({
|
|
9
9
|
as: Component = 'div',
|
|
@@ -19,7 +19,7 @@ const Stack = /*#__PURE__*/React.forwardRef(({
|
|
|
19
19
|
return /*#__PURE__*/_jsx(Component, {
|
|
20
20
|
...props,
|
|
21
21
|
ref: ref,
|
|
22
|
-
className:
|
|
22
|
+
className: clsx(className, bsPrefix, ...createUtilityClassName({
|
|
23
23
|
gap
|
|
24
24
|
}, breakpoints, minBreakpoint))
|
|
25
25
|
});
|
package/{esm → lib}/Switch.d.ts
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { DynamicRefForwardingComponent } from '@restart/ui/types';
|
|
2
3
|
import { FormCheckProps } from './FormCheck';
|
|
3
|
-
import { BsPrefixRefForwardingComponent } from './helpers';
|
|
4
4
|
type SwitchProps = Omit<FormCheckProps, 'type'>;
|
|
5
|
-
declare const _default:
|
|
6
|
-
Input:
|
|
5
|
+
declare const _default: DynamicRefForwardingComponent<DynamicRefForwardingComponent<"input", FormCheckProps> & {
|
|
6
|
+
Input: DynamicRefForwardingComponent<"input", import("./FormCheckInput").FormCheckInputProps>;
|
|
7
7
|
Label: React.ForwardRefExoticComponent<import("./FormCheckLabel").FormCheckLabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
8
8
|
}, SwitchProps> & {
|
|
9
|
-
Input:
|
|
9
|
+
Input: DynamicRefForwardingComponent<"input", import("./FormCheckInput").FormCheckInputProps>;
|
|
10
10
|
Label: React.ForwardRefExoticComponent<import("./FormCheckLabel").FormCheckLabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
11
11
|
};
|
|
12
12
|
export default _default;
|
package/lib/Tab.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type TabPaneProps } from './TabPane';
|
|
3
|
+
export interface TabProps extends Omit<TabPaneProps, 'title'> {
|
|
4
|
+
/**
|
|
5
|
+
* Content for the tab title.
|
|
6
|
+
*/
|
|
7
|
+
title: React.ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* The disabled state of the tab.
|
|
10
|
+
*/
|
|
11
|
+
disabled?: boolean | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Class to pass to the underlying nav link.
|
|
14
|
+
*/
|
|
15
|
+
tabClassName?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Object containing attributes to pass to underlying nav link.
|
|
18
|
+
*/
|
|
19
|
+
tabAttrs?: Record<string, any> | undefined;
|
|
20
|
+
}
|
|
21
|
+
declare const _default: React.FC<TabProps> & {
|
|
22
|
+
Container: {
|
|
23
|
+
({ transition, ...props }: import("./TabContainer").TabContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
displayName: string;
|
|
25
|
+
};
|
|
26
|
+
Content: import("@restart/ui/types").DynamicRefForwardingComponent<"div", import("./TabContent").TabContentProps>;
|
|
27
|
+
Pane: import("@restart/ui/types").DynamicRefForwardingComponent<"div", TabPaneProps>;
|
|
28
|
+
};
|
|
29
|
+
export default _default;
|
package/lib/Tab.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import TabContainer from './TabContainer';
|
|
2
|
+
import TabContent from './TabContent';
|
|
3
|
+
import TabPane from './TabPane';
|
|
4
|
+
const Tab = () => {
|
|
5
|
+
throw new Error('ReactBootstrap: The `Tab` component is not meant to be rendered! ' + "It's an abstract component that is only valid as a direct Child of the `Tabs` Component. " + 'For custom tabs components use TabPane and TabsContainer directly');
|
|
6
|
+
};
|
|
7
|
+
export default Object.assign(Tab, {
|
|
8
|
+
Container: TabContainer,
|
|
9
|
+
Content: TabContent,
|
|
10
|
+
Pane: TabPane
|
|
11
|
+
});
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { EventKey, SelectCallback } from '@restart/ui/types';
|
|
2
|
+
import type { TransitionType } from './helpers';
|
|
3
|
+
export interface TabContainerProps {
|
|
4
|
+
/**
|
|
5
|
+
* ID of the TabContainer.
|
|
6
|
+
*/
|
|
7
|
+
id?: string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Sets a default animation strategy for all children `<TabPane>`s.
|
|
10
|
+
* Defaults to `<Fade>` animation; else, use `false` to disable, or a
|
|
11
|
+
* custom react-transition-group `<Transition/>` component.
|
|
12
|
+
*/
|
|
13
|
+
transition?: TransitionType | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Wait until the first "enter" transition to mount tabs (add them to the DOM)
|
|
16
|
+
*/
|
|
17
|
+
mountOnEnter?: boolean | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Unmount tabs (remove it from the DOM) when they are no longer visible
|
|
20
|
+
*/
|
|
21
|
+
unmountOnExit?: boolean | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* A function that takes an `eventKey` and `type` and returns a unique id for
|
|
24
|
+
* child tab `<NavItem>`s and `<TabPane>`s. The function _must_ be a pure
|
|
25
|
+
* function, meaning it should always return the _same_ id for the same set
|
|
26
|
+
* of inputs. The default value requires that an `id` to be set for the
|
|
27
|
+
* `<TabContainer>`.
|
|
28
|
+
*
|
|
29
|
+
* The `type` argument will either be `"tab"` or `"pane"`.
|
|
30
|
+
*
|
|
31
|
+
* @type {((eventKey: EventKey, type: 'tab' | 'pane') => string) | undefined}
|
|
32
|
+
* @defaultValue (eventKey, type) => `${props.id}-${type}-${eventKey}`
|
|
33
|
+
*/
|
|
34
|
+
generateChildId?: ((eventKey: EventKey, type: 'tab' | 'pane') => string) | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* A callback fired when a tab is selected.
|
|
37
|
+
*
|
|
38
|
+
* @controllable activeKey
|
|
39
|
+
*/
|
|
40
|
+
onSelect?: SelectCallback | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* The `eventKey` of the currently active tab.
|
|
43
|
+
*
|
|
44
|
+
* @controllable onSelect
|
|
45
|
+
*/
|
|
46
|
+
activeKey?: EventKey | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Default value for `eventKey`.
|
|
49
|
+
*/
|
|
50
|
+
defaultActiveKey?: EventKey | undefined;
|
|
51
|
+
}
|
|
52
|
+
declare const TabContainer: {
|
|
53
|
+
({ transition, ...props }: TabContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
displayName: string;
|
|
55
|
+
};
|
|
56
|
+
export default TabContainer;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DynamicRefForwardingComponent } from '@restart/ui/types';
|
|
3
|
+
export interface TabContentProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Element used to render the component.
|
|
6
|
+
*/
|
|
7
|
+
as?: React.ElementType | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* @default 'tab-content'
|
|
10
|
+
*/
|
|
11
|
+
bsPrefix?: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
declare const TabContent: DynamicRefForwardingComponent<'div', TabContentProps>;
|
|
14
|
+
export default TabContent;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import
|
|
4
|
+
import clsx from 'clsx';
|
|
5
5
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
const TabContent = /*#__PURE__*/React.forwardRef(({
|
|
@@ -13,7 +13,7 @@ const TabContent = /*#__PURE__*/React.forwardRef(({
|
|
|
13
13
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'tab-content');
|
|
14
14
|
return /*#__PURE__*/_jsx(Component, {
|
|
15
15
|
ref: ref,
|
|
16
|
-
className:
|
|
16
|
+
className: clsx(className, bsPrefix),
|
|
17
17
|
...props
|
|
18
18
|
});
|
|
19
19
|
});
|
package/lib/TabPane.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DynamicRefForwardingComponent, EventKey } from '@restart/ui/types';
|
|
3
|
+
import type { TransitionType } from './helpers';
|
|
4
|
+
import type { TransitionCallbacks } from './types';
|
|
5
|
+
export interface TabPaneProps extends TransitionCallbacks, React.HTMLAttributes<HTMLElement> {
|
|
6
|
+
/**
|
|
7
|
+
* Element used to render the component.
|
|
8
|
+
*/
|
|
9
|
+
as?: React.ElementType | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* @default 'tab-pane'
|
|
12
|
+
*/
|
|
13
|
+
bsPrefix?: string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* A key that associates the `TabPane` with it's controlling `NavLink`.
|
|
16
|
+
*/
|
|
17
|
+
eventKey?: EventKey | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Toggles the active state of the TabPane, this is generally controlled by a
|
|
20
|
+
* TabContainer.
|
|
21
|
+
*/
|
|
22
|
+
active?: boolean | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Use animation when showing or hiding `<TabPane>`s. Defaults to `<Fade>`
|
|
25
|
+
* animation, else use `false` to disable or a react-transition-group
|
|
26
|
+
* `<Transition/>` component.
|
|
27
|
+
*/
|
|
28
|
+
transition?: TransitionType | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Wait until the first "enter" transition to mount the tab (add it to the DOM)
|
|
31
|
+
*/
|
|
32
|
+
mountOnEnter?: boolean | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Unmount the tab (remove it from the DOM) when it is no longer visible
|
|
35
|
+
*/
|
|
36
|
+
unmountOnExit?: boolean | undefined;
|
|
37
|
+
}
|
|
38
|
+
declare const TabPane: DynamicRefForwardingComponent<'div', TabPaneProps>;
|
|
39
|
+
export default TabPane;
|
package/{esm → lib}/TabPane.js
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import SelectableContext from '@restart/ui/SelectableContext';
|
|
6
6
|
import TabContext from '@restart/ui/TabContext';
|
|
@@ -55,7 +55,7 @@ const TabPane = /*#__PURE__*/React.forwardRef(({
|
|
|
55
55
|
children: /*#__PURE__*/_jsx(Component, {
|
|
56
56
|
...rest,
|
|
57
57
|
ref: ref,
|
|
58
|
-
className:
|
|
58
|
+
className: clsx(className, prefix, isActive && 'active')
|
|
59
59
|
})
|
|
60
60
|
})
|
|
61
61
|
})
|
package/lib/Table.d.ts
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {
|
|
3
|
+
/**
|
|
4
|
+
* @default 'table'
|
|
5
|
+
*/
|
|
6
|
+
bsPrefix?: string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* Adds zebra-striping to any table row within the `<tbody>`.
|
|
9
|
+
* Use `columns` to add zebra-striping to any table column.
|
|
10
|
+
*/
|
|
11
|
+
striped?: boolean | string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Adds borders on all sides of the table and cells.
|
|
14
|
+
*/
|
|
15
|
+
bordered?: boolean | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Removes all borders on the table and cells, including table header.
|
|
18
|
+
*/
|
|
19
|
+
borderless?: boolean | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* Enable a hover state on table rows within a `<tbody>`.
|
|
22
|
+
*/
|
|
23
|
+
hover?: boolean | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* Make tables more compact by cutting cell padding in half by setting
|
|
26
|
+
* size as `sm`.
|
|
27
|
+
*/
|
|
28
|
+
size?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Invert the colors of the table — with light text on dark backgrounds
|
|
31
|
+
* by setting variant as `dark`.
|
|
32
|
+
*/
|
|
33
|
+
variant?: string | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Responsive tables allow tables to be scrolled horizontally with ease.
|
|
36
|
+
* Across every breakpoint, use `responsive` for horizontally
|
|
37
|
+
* scrolling tables. Responsive tables are wrapped automatically in a `div`.
|
|
38
|
+
* Use `responsive="sm"`, `responsive="md"`, `responsive="lg"`, or
|
|
39
|
+
* `responsive="xl"` as needed to create responsive tables up to
|
|
40
|
+
* a particular breakpoint. From that breakpoint and up, the table will
|
|
41
|
+
* behave normally and not scroll horizontally.
|
|
42
|
+
*/
|
|
43
|
+
responsive?: boolean | string | undefined;
|
|
44
|
+
}
|
|
45
|
+
declare const Table: React.ForwardRefExoticComponent<TableProps & React.RefAttributes<HTMLTableElement>>;
|
|
46
|
+
export default Table;
|
package/{esm → lib}/Table.js
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -17,7 +17,7 @@ const Table = /*#__PURE__*/React.forwardRef(({
|
|
|
17
17
|
...props
|
|
18
18
|
}, ref) => {
|
|
19
19
|
const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'table');
|
|
20
|
-
const classes =
|
|
20
|
+
const classes = clsx(className, decoratedBsPrefix, variant && `${decoratedBsPrefix}-${variant}`, size && `${decoratedBsPrefix}-${size}`, striped && `${decoratedBsPrefix}-${typeof striped === 'string' ? `striped-${striped}` : 'striped'}`, bordered && `${decoratedBsPrefix}-bordered`, borderless && `${decoratedBsPrefix}-borderless`, hover && `${decoratedBsPrefix}-hover`);
|
|
21
21
|
const table = /*#__PURE__*/_jsx("table", {
|
|
22
22
|
...props,
|
|
23
23
|
className: classes,
|
|
@@ -35,4 +35,5 @@ const Table = /*#__PURE__*/React.forwardRef(({
|
|
|
35
35
|
}
|
|
36
36
|
return table;
|
|
37
37
|
});
|
|
38
|
+
Table.displayName = 'Table';
|
|
38
39
|
export default Table;
|
package/lib/Tabs.d.ts
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { TabsProps as BaseTabsProps } from '@restart/ui/Tabs';
|
|
3
|
+
import { type NavProps } from './Nav';
|
|
4
|
+
import type { TransitionType } from './helpers';
|
|
5
|
+
export interface TabsProps extends Omit<BaseTabsProps, 'transition'>, Omit<React.HTMLAttributes<HTMLElement>, 'onSelect' | 'role'>, NavProps {
|
|
6
|
+
/**
|
|
7
|
+
* Sets a default animation strategy for all children `<TabPane>`s.<tbcont
|
|
8
|
+
*
|
|
9
|
+
* Defaults to `<Fade>` animation, else use `false` to disable or a
|
|
10
|
+
* react-transition-group `<Transition/>` component.
|
|
11
|
+
*/
|
|
12
|
+
transition?: TransitionType | undefined;
|
|
13
|
+
}
|
|
14
|
+
declare const Tabs: React.FC<TabsProps>;
|
|
15
|
+
export default Tabs;
|
package/{esm → lib}/Tabs.js
RENAMED
|
@@ -8,8 +8,7 @@ import TabContent from './TabContent';
|
|
|
8
8
|
import TabPane from './TabPane';
|
|
9
9
|
import { forEach, map } from './ElementChildren';
|
|
10
10
|
import getTabTransitionComponent from './getTabTransitionComponent';
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
12
|
function getDefaultActiveKey(children) {
|
|
14
13
|
let defaultActiveKey;
|
|
15
14
|
forEach(children, child => {
|
|
@@ -2,19 +2,38 @@ import * as React from 'react';
|
|
|
2
2
|
export declare const DEFAULT_BREAKPOINTS: string[];
|
|
3
3
|
export declare const DEFAULT_MIN_BREAKPOINT = "xs";
|
|
4
4
|
export interface ThemeContextValue {
|
|
5
|
+
/**
|
|
6
|
+
* An object mapping of Bootstrap component classes that
|
|
7
|
+
* map to a custom class.
|
|
8
|
+
*
|
|
9
|
+
* **Note: Changing prefixes is an escape hatch and generally
|
|
10
|
+
* shouldn't be used.**
|
|
11
|
+
*
|
|
12
|
+
* For more information, see [here](/getting-started/theming/#prefixing-components).
|
|
13
|
+
*/
|
|
5
14
|
prefixes: Record<string, string>;
|
|
15
|
+
/**
|
|
16
|
+
* An array of breakpoints that your application supports.
|
|
17
|
+
* Defaults to the standard Bootstrap breakpoints.
|
|
18
|
+
*/
|
|
6
19
|
breakpoints: string[];
|
|
7
|
-
|
|
8
|
-
|
|
20
|
+
/**
|
|
21
|
+
* The minimum breakpoint used by your application.
|
|
22
|
+
* Defaults to the smallest of the standard Bootstrap breakpoints.
|
|
23
|
+
*/
|
|
24
|
+
minBreakpoint?: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Indicates the directionality of the application's text.
|
|
27
|
+
*
|
|
28
|
+
* Use `rtl` to set text as "right to left".
|
|
29
|
+
*/
|
|
30
|
+
dir?: string | undefined;
|
|
9
31
|
}
|
|
10
32
|
export interface ThemeProviderProps extends Partial<ThemeContextValue> {
|
|
11
33
|
children: React.ReactNode;
|
|
12
34
|
}
|
|
13
35
|
declare const Consumer: React.Consumer<ThemeContextValue>;
|
|
14
|
-
declare function ThemeProvider({ prefixes, breakpoints, minBreakpoint, dir, children, }: ThemeProviderProps):
|
|
15
|
-
declare namespace ThemeProvider {
|
|
16
|
-
var propTypes: any;
|
|
17
|
-
}
|
|
36
|
+
declare function ThemeProvider({ prefixes, breakpoints, minBreakpoint, dir, children, }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
18
37
|
export declare function useBootstrapPrefix(prefix: string | undefined, defaultPrefix: string): string;
|
|
19
38
|
export declare function useBootstrapBreakpoints(): string[];
|
|
20
39
|
export declare function useBootstrapMinBreakpoint(): string | undefined;
|
package/lib/Toast.d.ts
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DynamicRefForwardingComponent, TransitionComponent } from '@restart/ui/types';
|
|
3
|
+
import type { TransitionCallbacks, Variant } from './types';
|
|
4
|
+
export interface ToastProps extends TransitionCallbacks, React.HTMLAttributes<HTMLElement> {
|
|
5
|
+
/**
|
|
6
|
+
* Element used to render the component.
|
|
7
|
+
*/
|
|
8
|
+
as?: React.ElementType | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* @default 'toast'
|
|
11
|
+
*/
|
|
12
|
+
bsPrefix?: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Apply a CSS fade transition to the toast
|
|
15
|
+
*/
|
|
16
|
+
animation?: boolean | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Auto hide the toast
|
|
19
|
+
*/
|
|
20
|
+
autohide?: boolean | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Delay hiding the toast (ms)
|
|
23
|
+
*/
|
|
24
|
+
delay?: number | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* A Callback fired when the close button is clicked.
|
|
27
|
+
*
|
|
28
|
+
* @type {((e?: React.MouseEvent | React.KeyboardEvent) => void) | undefined}
|
|
29
|
+
*/
|
|
30
|
+
onClose?: ((e?: React.MouseEvent | React.KeyboardEvent) => void) | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* When `true` The toast will show itself.
|
|
33
|
+
*/
|
|
34
|
+
show?: boolean | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* A `react-transition-group` Transition component used to animate the Toast on dismissal.
|
|
37
|
+
*
|
|
38
|
+
* @default ToastFade
|
|
39
|
+
*/
|
|
40
|
+
transition?: TransitionComponent | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* Sets Toast background
|
|
43
|
+
*
|
|
44
|
+
* @type {'primary' | 'secondary' | 'success' |'danger' | 'warning' | 'info' | 'dark' | 'light' | undefined}
|
|
45
|
+
*/
|
|
46
|
+
bg?: Variant | undefined;
|
|
47
|
+
}
|
|
48
|
+
declare const _default: DynamicRefForwardingComponent<"div", ToastProps> & {
|
|
49
|
+
Body: DynamicRefForwardingComponent<"div", import("./ToastBody").ToastBodyProps>;
|
|
50
|
+
Header: React.ForwardRefExoticComponent<import("./ToastHeader").ToastHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
51
|
+
};
|
|
52
|
+
export default _default;
|
package/{esm → lib}/Toast.js
RENAMED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { useEffect, useMemo, useRef, useCallback } from 'react';
|
|
5
|
-
import
|
|
5
|
+
import clsx from 'clsx';
|
|
6
6
|
import useTimeout from '@restart/hooks/useTimeout';
|
|
7
7
|
import ToastFade from './ToastFade';
|
|
8
8
|
import ToastHeader from './ToastHeader';
|
|
@@ -56,7 +56,7 @@ const Toast = /*#__PURE__*/React.forwardRef(({
|
|
|
56
56
|
const toast = /*#__PURE__*/_jsx("div", {
|
|
57
57
|
...props,
|
|
58
58
|
ref: ref,
|
|
59
|
-
className:
|
|
59
|
+
className: clsx(bsPrefix, className, bg && `bg-${bg}`, !hasAnimation && (show ? 'show' : 'hide')),
|
|
60
60
|
role: "alert",
|
|
61
61
|
"aria-live": "assertive",
|
|
62
62
|
"aria-atomic": "true"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
|
|
3
|
+
export interface ToastBodyProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Element used to render the component.
|
|
6
|
+
*/
|
|
7
|
+
as?: React.ElementType | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* @default 'toast-body'
|
|
10
|
+
*/
|
|
11
|
+
bsPrefix?: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
declare const ToastBody: DynamicRefForwardingComponent<'div', ToastBodyProps>;
|
|
14
|
+
export default ToastBody;
|
package/{esm → lib}/ToastBody.js
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import * as React from 'react';
|
|
4
|
-
import
|
|
4
|
+
import clsx from 'clsx';
|
|
5
5
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
const ToastBody = /*#__PURE__*/React.forwardRef(({
|
|
@@ -13,7 +13,7 @@ const ToastBody = /*#__PURE__*/React.forwardRef(({
|
|
|
13
13
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'toast-body');
|
|
14
14
|
return /*#__PURE__*/_jsx(Component, {
|
|
15
15
|
ref: ref,
|
|
16
|
-
className:
|
|
16
|
+
className: clsx(className, bsPrefix),
|
|
17
17
|
...props
|
|
18
18
|
});
|
|
19
19
|
});
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
|
|
3
|
+
export type ToastPosition = 'top-start' | 'top-center' | 'top-end' | 'middle-start' | 'middle-center' | 'middle-end' | 'bottom-start' | 'bottom-center' | 'bottom-end';
|
|
4
|
+
export interface ToastContainerProps extends React.HTMLAttributes<HTMLElement> {
|
|
5
|
+
/**
|
|
6
|
+
* Element used to render the component.
|
|
7
|
+
*/
|
|
8
|
+
as?: React.ElementType | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* @default 'toast-container'
|
|
11
|
+
*/
|
|
12
|
+
bsPrefix?: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Where the toasts will be placed within the container.
|
|
15
|
+
*/
|
|
16
|
+
position?: ToastPosition | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Specify the positioning method for the container.
|
|
19
|
+
*/
|
|
20
|
+
containerPosition?: string | undefined;
|
|
21
|
+
}
|
|
22
|
+
declare const ToastContainer: DynamicRefForwardingComponent<'div', ToastContainerProps>;
|
|
23
|
+
export default ToastContainer;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -28,7 +28,7 @@ const ToastContainer = /*#__PURE__*/React.forwardRef(({
|
|
|
28
28
|
return /*#__PURE__*/_jsx(Component, {
|
|
29
29
|
ref: ref,
|
|
30
30
|
...props,
|
|
31
|
-
className:
|
|
31
|
+
className: clsx(bsPrefix, position && positionClasses[position], containerPosition && `position-${containerPosition}`, className)
|
|
32
32
|
});
|
|
33
33
|
});
|
|
34
34
|
ToastContainer.displayName = 'ToastContainer';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import Transition from 'react-transition-group/Transition';
|
|
3
|
-
import { FadeProps } from './Fade';
|
|
3
|
+
import { type FadeProps } from './Fade';
|
|
4
4
|
declare const ToastFade: React.ForwardRefExoticComponent<FadeProps & React.RefAttributes<Transition<any>>>;
|
|
5
5
|
export default ToastFade;
|