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,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type CloseButtonVariant } from './CloseButton';
|
|
3
|
+
export interface ToastHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
/**
|
|
5
|
+
* @default 'toast-header'
|
|
6
|
+
*/
|
|
7
|
+
bsPrefix?: string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Provides an accessible label for the close
|
|
10
|
+
* button. It is used for Assistive Technology when the label text is not
|
|
11
|
+
* readable.
|
|
12
|
+
*/
|
|
13
|
+
closeLabel?: string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Sets the variant for close button.
|
|
16
|
+
*/
|
|
17
|
+
closeVariant?: CloseButtonVariant | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Specify whether the Component should contain a close button
|
|
20
|
+
*/
|
|
21
|
+
closeButton?: boolean | undefined;
|
|
22
|
+
}
|
|
23
|
+
declare const ToastHeader: React.ForwardRefExoticComponent<ToastHeaderProps & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
export default ToastHeader;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { useContext } from 'react';
|
|
6
6
|
import useEventCallback from '@restart/hooks/useEventCallback';
|
|
7
7
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
8
8
|
import CloseButton from './CloseButton';
|
|
9
9
|
import ToastContext from './ToastContext';
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
11
|
const ToastHeader = /*#__PURE__*/React.forwardRef(({
|
|
13
12
|
bsPrefix,
|
|
14
13
|
closeLabel = 'Close',
|
|
@@ -26,7 +25,7 @@ const ToastHeader = /*#__PURE__*/React.forwardRef(({
|
|
|
26
25
|
return /*#__PURE__*/_jsxs("div", {
|
|
27
26
|
ref: ref,
|
|
28
27
|
...props,
|
|
29
|
-
className:
|
|
28
|
+
className: clsx(bsPrefix, className),
|
|
30
29
|
children: [children, closeButton && /*#__PURE__*/_jsx(CloseButton, {
|
|
31
30
|
"aria-label": closeLabel,
|
|
32
31
|
variant: closeVariant,
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type ButtonProps } from './Button';
|
|
3
|
+
export type ToggleButtonType = 'checkbox' | 'radio';
|
|
4
|
+
export interface ToggleButtonProps extends Omit<ButtonProps, 'onChange' | 'type'> {
|
|
5
|
+
/**
|
|
6
|
+
* @default 'btn-check'
|
|
7
|
+
*/
|
|
8
|
+
bsPrefix?: string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* The `<input>` element `type`
|
|
11
|
+
*/
|
|
12
|
+
type?: ToggleButtonType | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* The HTML input name, used to group like checkboxes or radio buttons together
|
|
15
|
+
* semantically
|
|
16
|
+
*/
|
|
17
|
+
name?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* The checked state of the input, managed by `<ToggleButtonGroup>` automatically
|
|
20
|
+
*/
|
|
21
|
+
checked?: boolean | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* The disabled state of both the label and input
|
|
24
|
+
*/
|
|
25
|
+
disabled?: boolean | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* `id` is required for button clicks to toggle input.
|
|
28
|
+
*/
|
|
29
|
+
id: string;
|
|
30
|
+
/**
|
|
31
|
+
* A callback fired when the underlying input element changes. This is passed
|
|
32
|
+
* directly to the `<input>` so shares the same signature as a native `onChange` event.
|
|
33
|
+
*/
|
|
34
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement> | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* The value of the input, should be unique amongst its siblings when nested in a
|
|
37
|
+
* `ToggleButtonGroup`.
|
|
38
|
+
*/
|
|
39
|
+
value: string | ReadonlyArray<string> | number;
|
|
40
|
+
/**
|
|
41
|
+
* A ref attached to the `<input>` element
|
|
42
|
+
*/
|
|
43
|
+
inputRef?: React.Ref<HTMLInputElement> | undefined;
|
|
44
|
+
}
|
|
45
|
+
declare const ToggleButton: React.ForwardRefExoticComponent<ToggleButtonProps & React.RefAttributes<HTMLLabelElement>>;
|
|
46
|
+
export default ToggleButton;
|
|
@@ -1,12 +1,10 @@
|
|
|
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 Button from './Button';
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
9
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
8
|
const noop = () => undefined;
|
|
11
9
|
const ToggleButton = /*#__PURE__*/React.forwardRef(({
|
|
12
10
|
bsPrefix,
|
|
@@ -37,7 +35,7 @@ const ToggleButton = /*#__PURE__*/React.forwardRef(({
|
|
|
37
35
|
}), /*#__PURE__*/_jsx(Button, {
|
|
38
36
|
...props,
|
|
39
37
|
ref: ref,
|
|
40
|
-
className:
|
|
38
|
+
className: clsx(className, disabled && 'disabled'),
|
|
41
39
|
type: undefined,
|
|
42
40
|
role: undefined,
|
|
43
41
|
as: "label",
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
|
|
3
|
+
import { type ButtonGroupProps } from './ButtonGroup';
|
|
4
|
+
type BaseToggleButtonProps = Omit<ButtonGroupProps, 'toggle' | 'defaultValue' | 'onChange'>;
|
|
5
|
+
export interface ToggleButtonRadioProps<T> extends BaseToggleButtonProps {
|
|
6
|
+
/**
|
|
7
|
+
* The input `type` of the rendered buttons, determines the toggle behavior
|
|
8
|
+
* of the buttons
|
|
9
|
+
*/
|
|
10
|
+
type?: 'radio';
|
|
11
|
+
/**
|
|
12
|
+
* An HTML `<input>` name for each child button.
|
|
13
|
+
*
|
|
14
|
+
* __Required if `type` is set to `'radio'`__
|
|
15
|
+
*/
|
|
16
|
+
name: string;
|
|
17
|
+
/**
|
|
18
|
+
* The value, or array of values, of the active (pressed) buttons
|
|
19
|
+
*
|
|
20
|
+
* @controllable onChange
|
|
21
|
+
*/
|
|
22
|
+
value?: T;
|
|
23
|
+
/**
|
|
24
|
+
* The default value, or array of values, of the active (pressed) buttons
|
|
25
|
+
*/
|
|
26
|
+
defaultValue?: T;
|
|
27
|
+
/**
|
|
28
|
+
* Callback fired when a button is pressed, depending on whether the `type`
|
|
29
|
+
* is `'radio'` or `'checkbox'`, `onChange` will be called with the value or
|
|
30
|
+
* array of active values
|
|
31
|
+
*
|
|
32
|
+
* @controllable value
|
|
33
|
+
*/
|
|
34
|
+
onChange?: (value: T, event: any) => void;
|
|
35
|
+
}
|
|
36
|
+
export interface ToggleButtonCheckboxProps<T> extends BaseToggleButtonProps {
|
|
37
|
+
/**
|
|
38
|
+
* The input `type` of the rendered buttons, determines the toggle behavior
|
|
39
|
+
* of the buttons
|
|
40
|
+
*/
|
|
41
|
+
type: 'checkbox';
|
|
42
|
+
/**
|
|
43
|
+
* An HTML `<input>` name for each child button.
|
|
44
|
+
*
|
|
45
|
+
* __Required if `type` is set to `'radio'`__
|
|
46
|
+
*/
|
|
47
|
+
name?: string;
|
|
48
|
+
/**
|
|
49
|
+
* The value, or array of values, of the active (pressed) buttons
|
|
50
|
+
*
|
|
51
|
+
* @controllable onChange
|
|
52
|
+
*/
|
|
53
|
+
value?: T[];
|
|
54
|
+
/**
|
|
55
|
+
* The default value, or array of values, of the active (pressed) buttons
|
|
56
|
+
*/
|
|
57
|
+
defaultValue?: T[];
|
|
58
|
+
/**
|
|
59
|
+
* Callback fired when a button is pressed, depending on whether the `type`
|
|
60
|
+
* is `'radio'` or `'checkbox'`, `onChange` will be called with the value or
|
|
61
|
+
* array of active values
|
|
62
|
+
*
|
|
63
|
+
* @controllable value
|
|
64
|
+
*/
|
|
65
|
+
onChange?: (value: T[]) => void;
|
|
66
|
+
}
|
|
67
|
+
export type ToggleButtonGroupProps<T> = ToggleButtonRadioProps<T> | ToggleButtonCheckboxProps<T>;
|
|
68
|
+
declare const _default: DynamicRefForwardingComponent<"a", ToggleButtonGroupProps<any>> & {
|
|
69
|
+
Button: React.ForwardRefExoticComponent<import("./ToggleButton").ToggleButtonProps & React.RefAttributes<HTMLLabelElement>>;
|
|
70
|
+
};
|
|
71
|
+
export default _default;
|
package/lib/Tooltip.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { OverlayArrowProps } from '@restart/ui/Overlay';
|
|
3
|
+
import type { Placement, PopperRef } from './types';
|
|
4
|
+
export interface TooltipProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
/**
|
|
6
|
+
* @default 'tooltip'
|
|
7
|
+
*/
|
|
8
|
+
bsPrefix?: string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Sets the direction the Tooltip is positioned towards.
|
|
11
|
+
*
|
|
12
|
+
* > This is generally provided by the `Overlay` component positioning the tooltip
|
|
13
|
+
*
|
|
14
|
+
* @type {Placement | undefined}
|
|
15
|
+
*/
|
|
16
|
+
placement?: Placement | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* An Overlay injected set of props for positioning the tooltip arrow.
|
|
19
|
+
*
|
|
20
|
+
* > This is generally provided by the `Overlay` component positioning the tooltip
|
|
21
|
+
*
|
|
22
|
+
* @type {{ ref: ReactRef, style: Object }}
|
|
23
|
+
*/
|
|
24
|
+
arrowProps?: Partial<OverlayArrowProps> | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* @private
|
|
27
|
+
*/
|
|
28
|
+
show?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* @private
|
|
31
|
+
*/
|
|
32
|
+
popper?: PopperRef | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Whether or not Popper has done its initial measurement and positioning.
|
|
35
|
+
*
|
|
36
|
+
* @private
|
|
37
|
+
*/
|
|
38
|
+
hasDoneInitialMeasure?: boolean | undefined;
|
|
39
|
+
}
|
|
40
|
+
declare const _default: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>> & {
|
|
41
|
+
TOOLTIP_OFFSET: number[];
|
|
42
|
+
};
|
|
43
|
+
export default _default;
|
package/{esm → lib}/Tooltip.js
RENAMED
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { useBootstrapPrefix, useIsRTL } from './ThemeProvider';
|
|
6
6
|
import { getOverlayDirection } from './helpers';
|
|
7
7
|
import getInitialPopperStyles from './getInitialPopperStyles';
|
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
9
|
const Tooltip = /*#__PURE__*/React.forwardRef(({
|
|
11
10
|
bsPrefix,
|
|
12
11
|
placement = 'right',
|
|
@@ -35,7 +34,7 @@ const Tooltip = /*#__PURE__*/React.forwardRef(({
|
|
|
35
34
|
style: computedStyle,
|
|
36
35
|
role: "tooltip",
|
|
37
36
|
"x-placement": primaryPlacement,
|
|
38
|
-
className:
|
|
37
|
+
className: clsx(className, bsPrefix, `bs-tooltip-${bsDirection}`),
|
|
39
38
|
...props,
|
|
40
39
|
children: [/*#__PURE__*/_jsx("div", {
|
|
41
40
|
className: "tooltip-arrow",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import Transition, { TransitionProps, TransitionStatus } from 'react-transition-group/Transition';
|
|
2
|
+
import Transition, { type TransitionProps, type TransitionStatus } from 'react-transition-group/Transition';
|
|
3
3
|
export type TransitionWrapperProps = TransitionProps & {
|
|
4
4
|
childRef?: React.Ref<unknown>;
|
|
5
5
|
children: React.ReactElement | ((status: TransitionStatus, props: Record<string, unknown>) => React.ReactNode);
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import React, { useCallback, useRef } from 'react';
|
|
4
4
|
import Transition from 'react-transition-group/Transition';
|
|
5
5
|
import useMergedRefs from '@restart/hooks/useMergedRefs';
|
|
6
|
-
import safeFindDOMNode from './safeFindDOMNode';
|
|
7
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
7
|
// Normalizes Transition callbacks when nodeRef is used.
|
|
9
8
|
const TransitionWrapper = /*#__PURE__*/React.forwardRef(({
|
|
@@ -20,16 +19,11 @@ const TransitionWrapper = /*#__PURE__*/React.forwardRef(({
|
|
|
20
19
|
}, ref) => {
|
|
21
20
|
const nodeRef = useRef(null);
|
|
22
21
|
const mergedRef = useMergedRefs(nodeRef, childRef);
|
|
23
|
-
const attachRef = r => {
|
|
24
|
-
mergedRef(safeFindDOMNode(r));
|
|
25
|
-
};
|
|
26
22
|
const normalize = callback => param => {
|
|
27
23
|
if (callback && nodeRef.current) {
|
|
28
24
|
callback(nodeRef.current, param);
|
|
29
25
|
}
|
|
30
26
|
};
|
|
31
|
-
|
|
32
|
-
/* eslint-disable react-hooks/exhaustive-deps */
|
|
33
27
|
const handleEnter = useCallback(normalize(onEnter), [onEnter]);
|
|
34
28
|
const handleEntering = useCallback(normalize(onEntering), [onEntering]);
|
|
35
29
|
const handleEntered = useCallback(normalize(onEntered), [onEntered]);
|
|
@@ -37,8 +31,6 @@ const TransitionWrapper = /*#__PURE__*/React.forwardRef(({
|
|
|
37
31
|
const handleExiting = useCallback(normalize(onExiting), [onExiting]);
|
|
38
32
|
const handleExited = useCallback(normalize(onExited), [onExited]);
|
|
39
33
|
const handleAddEndListener = useCallback(normalize(addEndListener), [addEndListener]);
|
|
40
|
-
/* eslint-enable react-hooks/exhaustive-deps */
|
|
41
|
-
|
|
42
34
|
return /*#__PURE__*/_jsx(Transition, {
|
|
43
35
|
ref: ref,
|
|
44
36
|
...props,
|
|
@@ -54,10 +46,11 @@ const TransitionWrapper = /*#__PURE__*/React.forwardRef(({
|
|
|
54
46
|
// TODO: Types for RTG missing innerProps, so need to cast.
|
|
55
47
|
children(status, {
|
|
56
48
|
...innerProps,
|
|
57
|
-
ref:
|
|
49
|
+
ref: mergedRef
|
|
58
50
|
}) : /*#__PURE__*/React.cloneElement(children, {
|
|
59
|
-
ref:
|
|
51
|
+
ref: mergedRef
|
|
60
52
|
})
|
|
61
53
|
});
|
|
62
54
|
});
|
|
55
|
+
TransitionWrapper.displayName = 'TransitionWrapper';
|
|
63
56
|
export default TransitionWrapper;
|
|
@@ -14,9 +14,9 @@ function createChainedFunction(...funcs) {
|
|
|
14
14
|
}
|
|
15
15
|
if (acc === null) return f;
|
|
16
16
|
return function chainedFunction(...args) {
|
|
17
|
-
// @ts-ignore
|
|
17
|
+
// @ts-expect-error ignore "this" error
|
|
18
18
|
acc.apply(this, args);
|
|
19
|
-
// @ts-ignore
|
|
19
|
+
// @ts-expect-error ignore "this" error
|
|
20
20
|
f.apply(this, args);
|
|
21
21
|
};
|
|
22
22
|
}, null);
|
|
@@ -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,15 +1,4 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
1
|
import { DEFAULT_BREAKPOINTS, DEFAULT_MIN_BREAKPOINT } from './ThemeProvider';
|
|
3
|
-
export function responsivePropType(propType) {
|
|
4
|
-
return PropTypes.oneOfType([propType, PropTypes.shape({
|
|
5
|
-
xs: propType,
|
|
6
|
-
sm: propType,
|
|
7
|
-
md: propType,
|
|
8
|
-
lg: propType,
|
|
9
|
-
xl: propType,
|
|
10
|
-
xxl: propType
|
|
11
|
-
})]);
|
|
12
|
-
}
|
|
13
2
|
export default function createUtilityClassName(utilityValues, breakpoints = DEFAULT_BREAKPOINTS, minBreakpoint = DEFAULT_MIN_BREAKPOINT) {
|
|
14
3
|
const classes = [];
|
|
15
4
|
Object.entries(utilityValues).forEach(([utilName, utilValue]) => {
|
|
@@ -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 {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import clsx from 'clsx';
|
|
4
4
|
import camelize from 'dom-helpers/camelize';
|
|
5
5
|
import * as React from 'react';
|
|
6
6
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
@@ -25,7 +25,7 @@ export default function createWithBsPrefix(prefix, {
|
|
|
25
25
|
const resolvedPrefix = useBootstrapPrefix(bsPrefix, prefix);
|
|
26
26
|
return /*#__PURE__*/_jsx(Tag, {
|
|
27
27
|
ref: ref,
|
|
28
|
-
className:
|
|
28
|
+
className: clsx(className, resolvedPrefix),
|
|
29
29
|
...componentProps
|
|
30
30
|
});
|
|
31
31
|
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
export default className =>
|
|
5
|
+
/*#__PURE__*/
|
|
6
|
+
// eslint-disable-next-line react/display-name
|
|
7
|
+
React.forwardRef((p, ref) => /*#__PURE__*/_jsx("div", {
|
|
8
|
+
...p,
|
|
9
|
+
ref: ref,
|
|
10
|
+
className: clsx(p.className, className)
|
|
11
|
+
}));
|
package/lib/helpers.d.ts
ADDED
package/{esm → lib}/helpers.js
RENAMED
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export class BsPrefixComponent extends React.Component {}
|
|
3
|
-
|
|
4
|
-
// Need to use this instead of typeof Component to get proper type checking.
|
|
5
|
-
|
|
6
1
|
export function getOverlayDirection(placement, isRTL) {
|
|
7
2
|
let bsDirection = placement;
|
|
8
3
|
if (placement === 'left') {
|
package/{esm → lib}/index.d.ts
RENAMED
|
@@ -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/{esm → lib}/index.js
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { default as Accordion } from './Accordion';
|
|
2
2
|
export { default as AccordionContext } from './AccordionContext';
|
|
3
3
|
export { default as AccordionCollapse } from './AccordionCollapse';
|
|
4
|
-
export { default as AccordionButton
|
|
4
|
+
export { default as AccordionButton } from './AccordionButton';
|
|
5
5
|
export { default as AccordionBody } from './AccordionBody';
|
|
6
6
|
export { default as AccordionHeader } from './AccordionHeader';
|
|
7
7
|
export { default as AccordionItem } from './AccordionItem';
|
|
@@ -93,7 +93,6 @@ export { default as Ratio } from './Ratio';
|
|
|
93
93
|
export { default as Row } from './Row';
|
|
94
94
|
export { default as Spinner } from './Spinner';
|
|
95
95
|
export { default as SplitButton } from './SplitButton';
|
|
96
|
-
export { default as SSRProvider } from './SSRProvider';
|
|
97
96
|
export { default as Stack } from './Stack';
|
|
98
97
|
export { default as Tab } from './Tab';
|
|
99
98
|
export { default as TabContainer } from './TabContainer';
|
|
@@ -108,4 +107,5 @@ export { default as ToastContainer } from './ToastContainer';
|
|
|
108
107
|
export { default as ToastHeader } from './ToastHeader';
|
|
109
108
|
export { default as ToggleButton } from './ToggleButton';
|
|
110
109
|
export { default as ToggleButtonGroup } from './ToggleButtonGroup';
|
|
111
|
-
export { default as Tooltip } from './Tooltip';
|
|
110
|
+
export { default as Tooltip } from './Tooltip';
|
|
111
|
+
export { default as useAccordionButton } from './useAccordionButton';
|
package/lib/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type": "module"}
|