react-bootstrap 2.10.10 → 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 +1 -1
- package/cjs/Accordion.d.ts +43 -14
- package/cjs/Accordion.js +3 -3
- package/cjs/AccordionBody.d.ts +12 -4
- package/cjs/AccordionBody.js +3 -3
- package/cjs/AccordionButton.d.ts +11 -5
- package/cjs/AccordionButton.js +7 -34
- package/cjs/AccordionCollapse.d.ts +16 -6
- package/cjs/AccordionCollapse.js +3 -3
- package/cjs/AccordionContext.d.ts +2 -2
- package/cjs/AccordionContext.js +1 -1
- package/cjs/AccordionHeader.d.ts +11 -3
- package/cjs/AccordionHeader.js +3 -3
- package/cjs/AccordionItem.d.ts +14 -3
- package/cjs/AccordionItem.js +3 -3
- package/cjs/AccordionItemContext.js +1 -1
- package/cjs/Alert.d.ts +51 -13
- package/cjs/Alert.js +3 -3
- package/cjs/AlertHeading.d.ts +11 -3
- package/cjs/AlertHeading.js +3 -3
- package/cjs/AlertLink.d.ts +11 -3
- package/cjs/AlertLink.js +3 -3
- package/cjs/Anchor.d.ts +1 -1
- package/cjs/Badge.d.ts +28 -7
- package/cjs/Badge.js +3 -3
- package/cjs/BootstrapModalManager.d.ts +1 -1
- package/cjs/Breadcrumb.d.ts +21 -6
- package/cjs/Breadcrumb.js +3 -3
- package/cjs/BreadcrumbItem.d.ts +36 -9
- package/cjs/BreadcrumbItem.js +3 -3
- package/cjs/Button.d.ts +42 -8
- package/cjs/Button.js +3 -3
- package/cjs/ButtonGroup.d.ts +25 -5
- package/cjs/ButtonGroup.js +3 -3
- package/cjs/ButtonToolbar.d.ts +11 -2
- package/cjs/ButtonToolbar.js +3 -3
- package/cjs/Card.d.ts +44 -17
- package/cjs/Card.js +3 -3
- package/cjs/CardBody.d.ts +11 -3
- package/cjs/CardBody.js +3 -3
- package/cjs/CardFooter.d.ts +11 -3
- package/cjs/CardFooter.js +3 -3
- package/cjs/CardGroup.d.ts +11 -3
- package/cjs/CardGroup.js +3 -3
- package/cjs/CardHeader.d.ts +11 -3
- package/cjs/CardHeader.js +3 -3
- package/cjs/CardHeaderContext.js +1 -1
- package/cjs/CardImg.d.ts +14 -3
- package/cjs/CardImg.js +3 -3
- package/cjs/CardImgOverlay.d.ts +11 -3
- package/cjs/CardImgOverlay.js +3 -3
- package/cjs/CardLink.d.ts +11 -3
- package/cjs/CardLink.js +3 -3
- package/cjs/CardSubtitle.d.ts +11 -3
- package/cjs/CardSubtitle.js +3 -3
- package/cjs/CardText.d.ts +11 -3
- package/cjs/CardText.js +3 -3
- package/cjs/CardTitle.d.ts +11 -3
- package/cjs/CardTitle.js +3 -3
- package/cjs/Carousel.d.ts +127 -27
- package/cjs/Carousel.js +9 -12
- package/cjs/CarouselCaption.d.ts +11 -3
- package/cjs/CarouselCaption.js +3 -3
- package/cjs/CarouselItem.d.ts +15 -4
- package/cjs/CarouselItem.js +3 -3
- package/cjs/CloseButton.d.ts +10 -1
- package/cjs/CloseButton.js +3 -17
- package/cjs/Col.d.ts +40 -20
- package/cjs/Col.js +7 -48
- package/cjs/Collapse.d.ts +45 -10
- package/cjs/Collapse.js +3 -3
- package/cjs/Container.d.ts +15 -4
- package/cjs/Container.js +3 -3
- package/cjs/Dropdown.d.ts +10 -17
- package/cjs/Dropdown.js +3 -4
- package/cjs/DropdownButton.d.ts +42 -11
- package/cjs/DropdownButton.js +1 -56
- package/cjs/DropdownContext.d.ts +1 -1
- package/cjs/DropdownContext.js +1 -1
- package/cjs/DropdownDivider.d.ts +15 -3
- package/cjs/DropdownDivider.js +3 -3
- package/cjs/DropdownHeader.d.ts +15 -3
- package/cjs/DropdownHeader.js +3 -3
- package/cjs/DropdownItem.d.ts +28 -4
- package/cjs/DropdownItem.js +3 -3
- package/cjs/DropdownItemText.d.ts +11 -3
- package/cjs/DropdownItemText.js +3 -3
- package/cjs/DropdownMenu.d.ts +55 -12
- package/cjs/DropdownMenu.js +3 -4
- package/cjs/DropdownToggle.d.ts +20 -4
- package/cjs/DropdownToggle.js +3 -3
- package/cjs/ElementChildren.js +2 -2
- package/cjs/Fade.d.ts +31 -7
- package/cjs/Fade.js +3 -3
- package/cjs/Feedback.d.ts +15 -6
- package/cjs/Feedback.js +3 -16
- package/cjs/Figure.d.ts +12 -4
- package/cjs/Figure.js +3 -3
- package/cjs/FigureCaption.d.ts +11 -3
- package/cjs/FigureCaption.js +3 -3
- package/cjs/FigureImage.d.ts +1 -1
- package/cjs/FigureImage.js +4 -5
- package/cjs/FloatingLabel.d.ts +19 -5
- package/cjs/FloatingLabel.js +3 -3
- package/cjs/Form.d.ts +159 -135
- package/cjs/Form.js +3 -22
- package/cjs/FormCheck.d.ts +81 -15
- package/cjs/FormCheck.js +3 -3
- package/cjs/FormCheckInput.d.ts +27 -6
- package/cjs/FormCheckInput.js +3 -3
- package/cjs/FormCheckLabel.d.ts +9 -2
- package/cjs/FormCheckLabel.js +3 -3
- package/cjs/FormContext.js +1 -1
- package/cjs/FormControl.d.ts +59 -14
- package/cjs/FormControl.js +3 -3
- package/cjs/FormFloating.d.ts +11 -3
- package/cjs/FormFloating.js +3 -3
- package/cjs/FormGroup.d.ts +11 -4
- package/cjs/FormGroup.js +1 -1
- package/cjs/FormLabel.d.ts +29 -6
- package/cjs/FormLabel.js +3 -3
- package/cjs/FormRange.d.ts +13 -2
- package/cjs/FormRange.js +3 -3
- package/cjs/FormSelect.d.ts +39 -7
- package/cjs/FormSelect.js +3 -3
- package/cjs/FormText.d.ts +16 -4
- package/cjs/FormText.js +3 -3
- package/cjs/Image.d.ts +7 -15
- package/cjs/Image.js +6 -28
- package/cjs/InputGroup.d.ts +22 -6
- package/cjs/InputGroup.js +3 -3
- package/cjs/InputGroupContext.js +1 -1
- package/cjs/InputGroupText.d.ts +11 -3
- package/cjs/InputGroupText.js +3 -3
- package/cjs/ListGroup.d.ts +35 -10
- package/cjs/ListGroup.js +3 -3
- package/cjs/ListGroupItem.d.ts +34 -7
- package/cjs/ListGroupItem.js +3 -3
- package/cjs/Modal.d.ts +53 -16
- package/cjs/Modal.js +4 -4
- package/cjs/ModalBody.d.ts +11 -3
- package/cjs/ModalBody.js +3 -3
- package/cjs/ModalContext.js +2 -1
- package/cjs/ModalDialog.d.ts +29 -6
- package/cjs/ModalDialog.js +4 -4
- package/cjs/ModalFooter.d.ts +11 -3
- package/cjs/ModalFooter.js +3 -3
- package/cjs/ModalHeader.d.ts +6 -3
- package/cjs/ModalHeader.js +3 -3
- package/cjs/ModalTitle.d.ts +11 -3
- package/cjs/ModalTitle.js +3 -3
- package/cjs/Nav.d.ts +49 -15
- package/cjs/Nav.js +3 -3
- package/cjs/NavContext.d.ts +1 -1
- package/cjs/NavContext.js +1 -1
- package/cjs/NavDropdown.d.ts +44 -15
- package/cjs/NavDropdown.js +3 -3
- package/cjs/NavItem.d.ts +11 -3
- package/cjs/NavItem.js +3 -3
- package/cjs/NavLink.d.ts +33 -4
- package/cjs/NavLink.js +3 -3
- package/cjs/Navbar.d.ts +103 -18
- package/cjs/Navbar.js +3 -3
- package/cjs/NavbarBrand.d.ts +15 -4
- package/cjs/NavbarBrand.js +3 -3
- package/cjs/NavbarCollapse.d.ts +6 -3
- package/cjs/NavbarCollapse.js +1 -1
- package/cjs/NavbarContext.js +1 -1
- package/cjs/NavbarOffcanvas.d.ts +3 -2
- package/cjs/NavbarOffcanvas.js +1 -2
- package/cjs/NavbarText.d.ts +11 -3
- package/cjs/NavbarText.js +3 -3
- package/cjs/NavbarToggle.d.ts +19 -4
- package/cjs/NavbarToggle.js +3 -3
- package/cjs/Offcanvas.d.ts +27 -12
- package/cjs/Offcanvas.js +46 -43
- package/cjs/OffcanvasBody.d.ts +11 -3
- package/cjs/OffcanvasBody.js +3 -3
- package/cjs/OffcanvasHeader.d.ts +6 -3
- package/cjs/OffcanvasHeader.js +3 -3
- package/cjs/OffcanvasTitle.d.ts +11 -3
- package/cjs/OffcanvasTitle.js +3 -3
- package/cjs/OffcanvasToggling.d.ts +32 -8
- package/cjs/OffcanvasToggling.js +3 -3
- package/cjs/Overlay.d.ts +24 -7
- package/cjs/Overlay.js +5 -6
- package/cjs/OverlayTrigger.d.ts +50 -12
- package/cjs/OverlayTrigger.js +3 -8
- package/cjs/PageItem.d.ts +31 -9
- package/cjs/PageItem.js +4 -4
- package/cjs/Pagination.d.ts +14 -4
- package/cjs/Pagination.js +3 -3
- package/cjs/Placeholder.d.ts +14 -5
- package/cjs/Placeholder.js +1 -1
- package/cjs/PlaceholderButton.d.ts +19 -5
- package/cjs/PlaceholderButton.js +1 -1
- package/cjs/Popover.d.ts +41 -12
- package/cjs/Popover.js +3 -3
- package/cjs/PopoverBody.d.ts +11 -3
- package/cjs/PopoverBody.js +3 -3
- package/cjs/PopoverHeader.d.ts +11 -3
- package/cjs/PopoverHeader.js +3 -3
- package/cjs/ProgressBar.d.ts +44 -11
- package/cjs/ProgressBar.js +4 -33
- package/cjs/Ratio.d.ts +13 -3
- package/cjs/Ratio.js +3 -3
- package/cjs/Row.d.ts +41 -9
- package/cjs/Row.js +3 -3
- package/cjs/Spinner.d.ts +30 -7
- package/cjs/Spinner.js +3 -3
- package/cjs/SplitButton.d.ts +38 -12
- package/cjs/SplitButton.js +1 -59
- package/cjs/Stack.d.ts +27 -7
- package/cjs/Stack.js +4 -4
- package/cjs/Switch.d.ts +4 -4
- package/cjs/Switch.js +1 -1
- package/cjs/Tab.d.ts +18 -16
- package/cjs/Tab.js +0 -21
- package/cjs/TabContainer.d.ts +50 -55
- package/cjs/TabContent.d.ts +11 -3
- package/cjs/TabContent.js +3 -3
- package/cjs/TabPane.d.ts +36 -9
- package/cjs/TabPane.js +3 -3
- package/cjs/Table.d.ts +42 -9
- package/cjs/Table.js +3 -3
- package/cjs/Tabs.d.ts +10 -4
- package/cjs/Tabs.js +1 -1
- package/cjs/ThemeProvider.d.ts +24 -5
- package/cjs/ThemeProvider.js +1 -1
- package/cjs/Toast.d.ts +47 -13
- package/cjs/Toast.js +3 -3
- package/cjs/ToastBody.d.ts +11 -3
- package/cjs/ToastBody.js +3 -3
- package/cjs/ToastContainer.d.ts +19 -5
- package/cjs/ToastContainer.js +3 -3
- package/cjs/ToastContext.js +2 -1
- package/cjs/ToastFade.d.ts +1 -1
- package/cjs/ToastFade.js +1 -1
- package/cjs/ToastHeader.d.ts +20 -6
- package/cjs/ToastHeader.js +3 -3
- package/cjs/ToggleButton.d.ts +38 -7
- package/cjs/ToggleButton.js +3 -3
- package/cjs/ToggleButtonGroup.d.ts +51 -3
- package/cjs/ToggleButtonGroup.js +1 -1
- package/cjs/Tooltip.d.ts +35 -7
- package/cjs/Tooltip.js +3 -3
- package/cjs/TransitionWrapper.d.ts +1 -1
- package/cjs/TransitionWrapper.js +3 -7
- package/cjs/createUtilityClasses.d.ts +0 -2
- package/cjs/createUtilityClasses.js +2 -14
- package/cjs/createWithBsPrefix.d.ts +2 -2
- package/cjs/createWithBsPrefix.js +3 -3
- package/cjs/divWithClassName.js +3 -3
- package/cjs/getTabTransitionComponent.d.ts +1 -1
- package/cjs/helpers.d.ts +0 -20
- package/cjs/helpers.js +0 -8
- package/cjs/index.d.ts +2 -3
- package/cjs/index.js +5 -8
- package/cjs/package.json +1 -0
- package/cjs/types.d.ts +338 -3
- package/cjs/types.js +1 -16
- package/cjs/useAccordionButton.d.ts +4 -0
- package/cjs/useAccordionButton.js +37 -0
- package/cjs/useCol.d.ts +7 -0
- package/cjs/useCol.js +49 -0
- package/cjs/useOverlayOffset.d.ts +1 -1
- package/cjs/usePlaceholder.d.ts +16 -5
- package/cjs/usePlaceholder.js +4 -4
- package/lib/AbstractModalHeader.d.ts +28 -0
- package/{esm → lib}/AbstractModalHeader.js +1 -2
- package/lib/Accordion.d.ts +47 -0
- package/{esm → lib}/Accordion.js +2 -2
- package/lib/AccordionBody.d.ts +15 -0
- package/{esm → lib}/AccordionBody.js +2 -2
- package/lib/AccordionButton.d.ts +14 -0
- package/{esm → lib}/AccordionButton.js +3 -30
- package/lib/AccordionCollapse.d.ts +22 -0
- package/{esm → lib}/AccordionCollapse.js +2 -2
- package/{esm → lib}/AccordionContext.d.ts +2 -2
- package/lib/AccordionHeader.d.ts +14 -0
- package/{esm → lib}/AccordionHeader.js +2 -2
- package/lib/AccordionItem.d.ts +18 -0
- package/{esm → lib}/AccordionItem.js +2 -2
- package/lib/Alert.d.ts +57 -0
- package/{esm → lib}/Alert.js +3 -4
- package/lib/AlertHeading.d.ts +14 -0
- package/{esm → lib}/AlertHeading.js +2 -2
- package/lib/AlertLink.d.ts +14 -0
- package/{esm → lib}/AlertLink.js +2 -2
- package/lib/Anchor.d.ts +3 -0
- package/lib/Badge.d.ts +31 -0
- package/{esm → lib}/Badge.js +2 -2
- package/{esm → lib}/BootstrapModalManager.d.ts +1 -1
- package/lib/Breadcrumb.d.ts +25 -0
- package/{esm → lib}/Breadcrumb.js +2 -2
- package/lib/BreadcrumbItem.d.ts +39 -0
- package/{esm → lib}/BreadcrumbItem.js +2 -2
- package/lib/Button.d.ts +45 -0
- package/{esm → lib}/Button.js +2 -2
- package/lib/ButtonGroup.d.ts +28 -0
- package/{esm → lib}/ButtonGroup.js +2 -2
- package/lib/ButtonToolbar.d.ts +15 -0
- package/{esm → lib}/ButtonToolbar.js +2 -2
- package/lib/Card.d.ts +48 -0
- package/{esm → lib}/Card.js +2 -2
- package/lib/CardBody.d.ts +14 -0
- package/{esm → lib}/CardBody.js +2 -2
- package/lib/CardFooter.d.ts +14 -0
- package/{esm → lib}/CardFooter.js +2 -2
- package/lib/CardGroup.d.ts +14 -0
- package/{esm → lib}/CardGroup.js +2 -2
- package/lib/CardHeader.d.ts +14 -0
- package/{esm → lib}/CardHeader.js +2 -2
- package/lib/CardImg.d.ts +18 -0
- package/{esm → lib}/CardImg.js +2 -2
- package/lib/CardImgOverlay.d.ts +14 -0
- package/{esm → lib}/CardImgOverlay.js +2 -2
- package/lib/CardLink.d.ts +14 -0
- package/{esm → lib}/CardLink.js +2 -2
- package/lib/CardSubtitle.d.ts +14 -0
- package/{esm → lib}/CardSubtitle.js +2 -2
- package/lib/CardText.d.ts +14 -0
- package/{esm → lib}/CardText.js +2 -2
- package/lib/CardTitle.d.ts +14 -0
- package/{esm → lib}/CardTitle.js +2 -2
- package/lib/Carousel.d.ts +136 -0
- package/{esm → lib}/Carousel.js +9 -14
- package/lib/CarouselCaption.d.ts +14 -0
- package/{esm → lib}/CarouselCaption.js +2 -2
- package/lib/CarouselItem.d.ts +18 -0
- package/{esm → lib}/CarouselItem.js +2 -2
- package/{esm → lib}/CloseButton.d.ts +10 -1
- package/lib/CloseButton.js +17 -0
- package/lib/Col.d.ts +48 -0
- package/lib/Col.js +23 -0
- package/lib/Collapse.d.ts +52 -0
- package/{esm → lib}/Collapse.js +2 -2
- package/lib/Container.d.ts +18 -0
- package/{esm → lib}/Container.js +2 -2
- package/lib/Dropdown.d.ts +14 -0
- package/{esm → lib}/Dropdown.js +2 -3
- package/lib/DropdownButton.d.ts +55 -0
- package/lib/DropdownButton.js +51 -0
- package/{esm → lib}/DropdownContext.d.ts +1 -1
- package/lib/DropdownDivider.d.ts +18 -0
- package/{esm → lib}/DropdownDivider.js +2 -2
- package/lib/DropdownHeader.d.ts +18 -0
- package/{esm → lib}/DropdownHeader.js +2 -2
- package/lib/DropdownItem.d.ts +30 -0
- package/{esm → lib}/DropdownItem.js +2 -2
- package/lib/DropdownItemText.d.ts +14 -0
- package/{esm → lib}/DropdownItemText.js +2 -2
- package/lib/DropdownMenu.d.ts +61 -0
- package/{esm → lib}/DropdownMenu.js +2 -3
- package/lib/DropdownToggle.d.ts +28 -0
- package/{esm → lib}/DropdownToggle.js +2 -2
- package/{esm → lib}/ElementChildren.js +1 -1
- package/lib/Fade.d.ts +39 -0
- package/{esm → lib}/Fade.js +2 -2
- package/lib/Feedback.d.ts +19 -0
- package/{esm → lib}/Feedback.js +2 -15
- package/lib/Figure.d.ts +17 -0
- package/{esm → lib}/Figure.js +2 -2
- package/lib/FigureCaption.d.ts +14 -0
- package/{esm → lib}/FigureCaption.js +2 -2
- package/{esm → lib}/FigureImage.d.ts +1 -1
- package/{esm → lib}/FigureImage.js +3 -4
- package/lib/FloatingLabel.d.ts +23 -0
- package/{esm → lib}/FloatingLabel.js +3 -4
- package/{esm → lib}/Form.d.ts +159 -135
- package/{esm → lib}/Form.js +2 -21
- package/lib/FormCheck.d.ts +88 -0
- package/{esm → lib}/FormCheck.js +3 -5
- package/lib/FormCheckInput.d.ts +31 -0
- package/{esm → lib}/FormCheckInput.js +2 -2
- package/{esm → lib}/FormCheckLabel.d.ts +9 -2
- package/{esm → lib}/FormCheckLabel.js +2 -2
- package/lib/FormControl.d.ts +64 -0
- package/{esm → lib}/FormControl.js +2 -2
- package/lib/FormFloating.d.ts +14 -0
- package/{esm → lib}/FormFloating.js +2 -2
- package/lib/FormGroup.d.ts +14 -0
- package/lib/FormLabel.d.ts +39 -0
- package/{esm → lib}/FormLabel.js +2 -2
- package/lib/FormRange.d.ts +17 -0
- package/{esm → lib}/FormRange.js +2 -2
- package/lib/FormSelect.d.ts +42 -0
- package/{esm → lib}/FormSelect.js +2 -2
- package/lib/FormText.d.ts +19 -0
- package/{esm → lib}/FormText.js +2 -2
- package/lib/Image.d.ts +25 -0
- package/lib/Image.js +24 -0
- package/lib/InputGroup.d.ts +29 -0
- package/{esm → lib}/InputGroup.js +2 -2
- package/lib/InputGroupText.d.ts +14 -0
- package/{esm → lib}/InputGroupText.js +2 -2
- package/lib/ListGroup.d.ts +38 -0
- package/{esm → lib}/ListGroup.js +2 -2
- package/lib/ListGroupItem.d.ts +38 -0
- package/{esm → lib}/ListGroupItem.js +2 -2
- package/lib/Modal.d.ts +63 -0
- package/{esm → lib}/Modal.js +3 -3
- package/lib/ModalBody.d.ts +14 -0
- package/{esm → lib}/ModalBody.js +2 -2
- package/{esm → lib}/ModalContext.js +1 -0
- package/lib/ModalDialog.d.ts +34 -0
- package/{esm → lib}/ModalDialog.js +3 -3
- package/lib/ModalFooter.d.ts +14 -0
- package/{esm → lib}/ModalFooter.js +2 -2
- package/{esm → lib}/ModalHeader.d.ts +6 -3
- package/{esm → lib}/ModalHeader.js +2 -2
- package/lib/ModalTitle.d.ts +14 -0
- package/{esm → lib}/ModalTitle.js +2 -2
- package/lib/Nav.d.ts +52 -0
- package/{esm → lib}/Nav.js +2 -2
- package/{esm → lib}/NavContext.d.ts +1 -1
- package/lib/NavDropdown.d.ts +49 -0
- package/{esm → lib}/NavDropdown.js +3 -4
- package/lib/NavItem.d.ts +14 -0
- package/{esm → lib}/NavItem.js +2 -2
- package/lib/NavLink.d.ts +35 -0
- package/{esm → lib}/NavLink.js +2 -2
- package/lib/Navbar.d.ts +108 -0
- package/{esm → lib}/Navbar.js +2 -2
- package/lib/NavbarBrand.d.ts +18 -0
- package/{esm → lib}/NavbarBrand.js +2 -2
- package/{esm → lib}/NavbarCollapse.d.ts +6 -3
- package/{esm → lib}/NavbarOffcanvas.d.ts +3 -2
- package/{esm → lib}/NavbarOffcanvas.js +0 -1
- package/lib/NavbarText.d.ts +14 -0
- package/{esm → lib}/NavbarText.js +2 -2
- package/lib/NavbarToggle.d.ts +22 -0
- package/{esm → lib}/NavbarToggle.js +2 -2
- package/lib/Offcanvas.d.ts +33 -0
- package/{esm → lib}/Offcanvas.js +46 -45
- package/lib/OffcanvasBody.d.ts +14 -0
- package/{esm → lib}/OffcanvasBody.js +2 -2
- package/{esm → lib}/OffcanvasHeader.d.ts +6 -3
- package/{esm → lib}/OffcanvasHeader.js +2 -2
- package/lib/OffcanvasTitle.d.ts +14 -0
- package/{esm → lib}/OffcanvasTitle.js +2 -2
- package/lib/OffcanvasToggling.d.ts +39 -0
- package/{esm → lib}/OffcanvasToggling.js +2 -2
- package/lib/Overlay.d.ts +41 -0
- package/{esm → lib}/Overlay.js +4 -5
- package/lib/OverlayTrigger.d.ts +67 -0
- package/{esm → lib}/OverlayTrigger.js +3 -10
- package/lib/PageItem.d.ts +39 -0
- package/{esm → lib}/PageItem.js +4 -5
- package/{esm → lib}/Pagination.d.ts +14 -4
- package/{esm → lib}/Pagination.js +2 -2
- package/lib/Placeholder.d.ts +17 -0
- package/lib/PlaceholderButton.d.ts +22 -0
- package/lib/Popover.d.ts +48 -0
- package/{esm → lib}/Popover.js +3 -4
- package/lib/PopoverBody.d.ts +14 -0
- package/{esm → lib}/PopoverBody.js +2 -2
- package/lib/PopoverHeader.d.ts +14 -0
- package/{esm → lib}/PopoverHeader.js +2 -2
- package/lib/ProgressBar.d.ts +48 -0
- package/{esm → lib}/ProgressBar.js +3 -32
- package/lib/Ratio.d.ts +19 -0
- package/{esm → lib}/Ratio.js +2 -2
- package/lib/Row.d.ts +49 -0
- package/{esm → lib}/Row.js +2 -2
- package/lib/Spinner.d.ts +33 -0
- package/{esm → lib}/Spinner.js +2 -2
- package/lib/SplitButton.d.ts +53 -0
- package/lib/SplitButton.js +67 -0
- package/lib/Stack.d.ts +31 -0
- package/{esm → lib}/Stack.js +3 -3
- package/{esm → lib}/Switch.d.ts +4 -4
- package/lib/Tab.d.ts +29 -0
- package/lib/Tab.js +11 -0
- package/lib/TabContainer.d.ts +56 -0
- package/lib/TabContent.d.ts +14 -0
- package/{esm → lib}/TabContent.js +2 -2
- package/lib/TabPane.d.ts +39 -0
- package/{esm → lib}/TabPane.js +2 -2
- package/lib/Table.d.ts +46 -0
- package/{esm → lib}/Table.js +2 -2
- package/lib/Tabs.d.ts +15 -0
- package/{esm → lib}/Tabs.js +1 -2
- package/{esm → lib}/ThemeProvider.d.ts +24 -5
- package/lib/Toast.d.ts +52 -0
- package/{esm → lib}/Toast.js +2 -2
- package/lib/ToastBody.d.ts +14 -0
- package/{esm → lib}/ToastBody.js +2 -2
- package/lib/ToastContainer.d.ts +23 -0
- package/{esm → lib}/ToastContainer.js +2 -2
- package/{esm → lib}/ToastContext.js +1 -0
- package/{esm → lib}/ToastFade.d.ts +1 -1
- package/lib/ToastHeader.d.ts +24 -0
- package/{esm → lib}/ToastHeader.js +3 -4
- package/lib/ToggleButton.d.ts +46 -0
- package/{esm → lib}/ToggleButton.js +3 -5
- package/lib/ToggleButtonGroup.d.ts +71 -0
- package/lib/Tooltip.d.ts +43 -0
- package/{esm → lib}/Tooltip.js +3 -4
- package/{esm → lib}/TransitionWrapper.d.ts +1 -1
- package/{esm → lib}/TransitionWrapper.js +2 -6
- package/{esm → lib}/createUtilityClasses.d.ts +0 -2
- package/{esm → lib}/createUtilityClasses.js +0 -11
- package/{esm → lib}/createWithBsPrefix.d.ts +2 -2
- package/{esm → lib}/createWithBsPrefix.js +2 -2
- package/{esm → lib}/divWithClassName.js +4 -4
- package/{esm → lib}/getTabTransitionComponent.d.ts +1 -1
- package/lib/helpers.d.ts +4 -0
- package/{esm → lib}/helpers.js +0 -5
- package/{esm → lib}/index.d.ts +2 -3
- package/{esm → lib}/index.js +3 -3
- package/lib/package.json +1 -0
- package/lib/types.d.ts +364 -0
- package/lib/types.js +1 -0
- package/lib/useAccordionButton.d.ts +4 -0
- package/lib/useAccordionButton.js +32 -0
- package/lib/useCol.d.ts +7 -0
- package/{esm/Col.js → lib/useCol.js} +4 -25
- package/{esm → lib}/useOverlayOffset.d.ts +1 -1
- package/lib/usePlaceholder.d.ts +21 -0
- package/{esm → lib}/usePlaceholder.js +3 -3
- package/package.json +94 -17
- package/AbstractModalHeader/package.json +0 -7
- package/Accordion/package.json +0 -7
- package/AccordionBody/package.json +0 -7
- package/AccordionButton/package.json +0 -7
- package/AccordionCollapse/package.json +0 -7
- package/AccordionContext/package.json +0 -7
- package/AccordionHeader/package.json +0 -7
- package/AccordionItem/package.json +0 -7
- package/AccordionItemContext/package.json +0 -7
- package/Alert/package.json +0 -7
- package/AlertHeading/package.json +0 -7
- package/AlertLink/package.json +0 -7
- package/Anchor/package.json +0 -7
- package/Badge/package.json +0 -7
- package/BootstrapModalManager/package.json +0 -7
- package/Breadcrumb/package.json +0 -7
- package/BreadcrumbItem/package.json +0 -7
- package/Button/package.json +0 -7
- package/ButtonGroup/package.json +0 -7
- package/ButtonToolbar/package.json +0 -7
- package/Card/package.json +0 -7
- package/CardBody/package.json +0 -7
- package/CardFooter/package.json +0 -7
- package/CardGroup/package.json +0 -7
- package/CardHeader/package.json +0 -7
- package/CardHeaderContext/package.json +0 -7
- package/CardImg/package.json +0 -7
- package/CardImgOverlay/package.json +0 -7
- package/CardLink/package.json +0 -7
- package/CardSubtitle/package.json +0 -7
- package/CardText/package.json +0 -7
- package/CardTitle/package.json +0 -7
- package/Carousel/package.json +0 -7
- package/CarouselCaption/package.json +0 -7
- package/CarouselItem/package.json +0 -7
- package/CloseButton/package.json +0 -7
- package/Col/package.json +0 -7
- package/Collapse/package.json +0 -7
- package/Container/package.json +0 -7
- package/Dropdown/package.json +0 -7
- package/DropdownButton/package.json +0 -7
- package/DropdownContext/package.json +0 -7
- package/DropdownDivider/package.json +0 -7
- package/DropdownHeader/package.json +0 -7
- package/DropdownItem/package.json +0 -7
- package/DropdownItemText/package.json +0 -7
- package/DropdownMenu/package.json +0 -7
- package/DropdownToggle/package.json +0 -7
- package/ElementChildren/package.json +0 -7
- package/Fade/package.json +0 -7
- package/Feedback/package.json +0 -7
- package/Figure/package.json +0 -7
- package/FigureCaption/package.json +0 -7
- package/FigureImage/package.json +0 -7
- package/FloatingLabel/package.json +0 -7
- package/Form/package.json +0 -7
- package/FormCheck/package.json +0 -7
- package/FormCheckInput/package.json +0 -7
- package/FormCheckLabel/package.json +0 -7
- package/FormContext/package.json +0 -7
- package/FormControl/package.json +0 -7
- package/FormFloating/package.json +0 -7
- package/FormGroup/package.json +0 -7
- package/FormLabel/package.json +0 -7
- package/FormRange/package.json +0 -7
- package/FormSelect/package.json +0 -7
- package/FormText/package.json +0 -7
- package/Image/package.json +0 -7
- package/InputGroup/package.json +0 -7
- package/InputGroupContext/package.json +0 -7
- package/InputGroupText/package.json +0 -7
- package/ListGroup/package.json +0 -7
- package/ListGroupItem/package.json +0 -7
- package/Modal/package.json +0 -7
- package/ModalBody/package.json +0 -7
- package/ModalContext/package.json +0 -7
- package/ModalDialog/package.json +0 -7
- package/ModalFooter/package.json +0 -7
- package/ModalHeader/package.json +0 -7
- package/ModalTitle/package.json +0 -7
- package/Nav/package.json +0 -7
- package/NavContext/package.json +0 -7
- package/NavDropdown/package.json +0 -7
- package/NavItem/package.json +0 -7
- package/NavLink/package.json +0 -7
- package/Navbar/package.json +0 -7
- package/NavbarBrand/package.json +0 -7
- package/NavbarCollapse/package.json +0 -7
- package/NavbarContext/package.json +0 -7
- package/NavbarOffcanvas/package.json +0 -7
- package/NavbarText/package.json +0 -7
- package/NavbarToggle/package.json +0 -7
- package/Offcanvas/package.json +0 -7
- package/OffcanvasBody/package.json +0 -7
- package/OffcanvasHeader/package.json +0 -7
- package/OffcanvasTitle/package.json +0 -7
- package/OffcanvasToggling/package.json +0 -7
- package/Overlay/package.json +0 -7
- package/OverlayTrigger/package.json +0 -7
- package/PageItem/package.json +0 -7
- package/Pagination/package.json +0 -7
- package/Placeholder/package.json +0 -7
- package/PlaceholderButton/package.json +0 -7
- package/Popover/package.json +0 -7
- package/PopoverBody/package.json +0 -7
- package/PopoverHeader/package.json +0 -7
- package/ProgressBar/package.json +0 -7
- package/Ratio/package.json +0 -7
- package/Row/package.json +0 -7
- package/SSRProvider/package.json +0 -7
- package/Spinner/package.json +0 -7
- package/SplitButton/package.json +0 -7
- package/Stack/package.json +0 -7
- package/Switch/package.json +0 -7
- package/Tab/package.json +0 -7
- package/TabContainer/package.json +0 -7
- package/TabContent/package.json +0 -7
- package/TabPane/package.json +0 -7
- package/Table/package.json +0 -7
- package/Tabs/package.json +0 -7
- package/ThemeProvider/package.json +0 -7
- package/Toast/package.json +0 -7
- package/ToastBody/package.json +0 -7
- package/ToastContainer/package.json +0 -7
- package/ToastContext/package.json +0 -7
- package/ToastFade/package.json +0 -7
- package/ToastHeader/package.json +0 -7
- package/ToggleButton/package.json +0 -7
- package/ToggleButtonGroup/package.json +0 -7
- package/Tooltip/package.json +0 -7
- package/TransitionWrapper/package.json +0 -7
- package/cjs/SSRProvider.d.ts +0 -4
- package/cjs/SSRProvider.js +0 -7
- package/cjs/safeFindDOMNode.d.ts +0 -1
- package/cjs/safeFindDOMNode.js +0 -15
- package/createChainedFunction/package.json +0 -7
- package/createUtilityClasses/package.json +0 -7
- package/createWithBsPrefix/package.json +0 -7
- package/dist/react-bootstrap.js +0 -16921
- package/dist/react-bootstrap.min.js +0 -2
- package/dist/react-bootstrap.min.js.LICENSE.txt +0 -15
- package/divWithClassName/package.json +0 -7
- package/esm/AbstractModalHeader.d.ts +0 -10
- package/esm/Accordion.d.ts +0 -18
- package/esm/AccordionBody.d.ts +0 -7
- package/esm/AccordionButton.d.ts +0 -8
- package/esm/AccordionCollapse.d.ts +0 -12
- package/esm/AccordionHeader.d.ts +0 -6
- package/esm/AccordionItem.d.ts +0 -7
- package/esm/Alert.d.ts +0 -19
- package/esm/AlertHeading.d.ts +0 -6
- package/esm/AlertLink.d.ts +0 -6
- package/esm/Anchor.d.ts +0 -3
- package/esm/Badge.d.ts +0 -10
- package/esm/Breadcrumb.d.ts +0 -10
- package/esm/BreadcrumbItem.d.ts +0 -12
- package/esm/Button.d.ts +0 -11
- package/esm/ButtonGroup.d.ts +0 -8
- package/esm/ButtonToolbar.d.ts +0 -6
- package/esm/Card.d.ts +0 -21
- package/esm/CardBody.d.ts +0 -6
- package/esm/CardFooter.d.ts +0 -6
- package/esm/CardGroup.d.ts +0 -6
- package/esm/CardHeader.d.ts +0 -6
- package/esm/CardImg.d.ts +0 -7
- package/esm/CardImgOverlay.d.ts +0 -6
- package/esm/CardLink.d.ts +0 -6
- package/esm/CardSubtitle.d.ts +0 -6
- package/esm/CardText.d.ts +0 -6
- package/esm/CardTitle.d.ts +0 -6
- package/esm/Carousel.d.ts +0 -36
- package/esm/CarouselCaption.d.ts +0 -6
- package/esm/CarouselItem.d.ts +0 -7
- package/esm/CloseButton.js +0 -31
- package/esm/Col.d.ts +0 -28
- package/esm/Collapse.d.ts +0 -17
- package/esm/Container.d.ts +0 -7
- package/esm/Dropdown.d.ts +0 -21
- package/esm/DropdownButton.d.ts +0 -24
- package/esm/DropdownButton.js +0 -107
- package/esm/DropdownDivider.d.ts +0 -6
- package/esm/DropdownHeader.d.ts +0 -6
- package/esm/DropdownItem.d.ts +0 -6
- package/esm/DropdownItemText.d.ts +0 -6
- package/esm/DropdownMenu.d.ts +0 -18
- package/esm/DropdownToggle.d.ts +0 -12
- package/esm/Fade.d.ts +0 -15
- package/esm/Feedback.d.ts +0 -10
- package/esm/Figure.d.ts +0 -9
- package/esm/FigureCaption.d.ts +0 -6
- package/esm/FloatingLabel.d.ts +0 -9
- package/esm/FormCheck.d.ts +0 -22
- package/esm/FormCheckInput.d.ts +0 -10
- package/esm/FormControl.d.ts +0 -19
- package/esm/FormFloating.d.ts +0 -6
- package/esm/FormGroup.d.ts +0 -7
- package/esm/FormLabel.d.ts +0 -16
- package/esm/FormRange.d.ts +0 -6
- package/esm/FormSelect.d.ts +0 -10
- package/esm/FormText.d.ts +0 -7
- package/esm/Image.d.ts +0 -33
- package/esm/Image.js +0 -47
- package/esm/InputGroup.d.ts +0 -13
- package/esm/InputGroupText.d.ts +0 -6
- package/esm/ListGroup.d.ts +0 -13
- package/esm/ListGroupItem.d.ts +0 -11
- package/esm/Modal.d.ts +0 -26
- package/esm/ModalBody.d.ts +0 -6
- package/esm/ModalDialog.d.ts +0 -11
- package/esm/ModalFooter.d.ts +0 -6
- package/esm/ModalTitle.d.ts +0 -6
- package/esm/Nav.d.ts +0 -18
- package/esm/NavDropdown.d.ts +0 -20
- package/esm/NavItem.d.ts +0 -6
- package/esm/NavLink.d.ts +0 -6
- package/esm/Navbar.d.ts +0 -23
- package/esm/NavbarBrand.d.ts +0 -7
- package/esm/NavbarText.d.ts +0 -6
- package/esm/NavbarToggle.d.ts +0 -7
- package/esm/Offcanvas.d.ts +0 -18
- package/esm/OffcanvasBody.d.ts +0 -6
- package/esm/OffcanvasTitle.d.ts +0 -6
- package/esm/OffcanvasToggling.d.ts +0 -15
- package/esm/Overlay.d.ts +0 -24
- package/esm/OverlayTrigger.d.ts +0 -29
- package/esm/PageItem.d.ts +0 -17
- package/esm/Placeholder.d.ts +0 -8
- package/esm/PlaceholderButton.d.ts +0 -8
- package/esm/Popover.d.ts +0 -19
- package/esm/PopoverBody.d.ts +0 -6
- package/esm/PopoverHeader.d.ts +0 -6
- package/esm/ProgressBar.d.ts +0 -15
- package/esm/Ratio.d.ts +0 -9
- package/esm/Row.d.ts +0 -17
- package/esm/SSRProvider.d.ts +0 -4
- package/esm/SSRProvider.js +0 -2
- package/esm/Spinner.d.ts +0 -10
- package/esm/SplitButton.d.ts +0 -27
- package/esm/SplitButton.js +0 -126
- package/esm/Stack.d.ts +0 -11
- package/esm/Tab.d.ts +0 -27
- package/esm/Tab.js +0 -32
- package/esm/TabContainer.d.ts +0 -61
- package/esm/TabContent.d.ts +0 -6
- package/esm/TabPane.d.ts +0 -12
- package/esm/Table.d.ts +0 -13
- package/esm/Tabs.d.ts +0 -9
- package/esm/Toast.d.ts +0 -18
- package/esm/ToastBody.d.ts +0 -6
- package/esm/ToastContainer.d.ts +0 -9
- package/esm/ToastHeader.d.ts +0 -10
- package/esm/ToggleButton.d.ts +0 -15
- package/esm/ToggleButtonGroup.d.ts +0 -23
- package/esm/Tooltip.d.ts +0 -15
- package/esm/helpers.d.ts +0 -24
- package/esm/safeFindDOMNode.d.ts +0 -1
- package/esm/safeFindDOMNode.js +0 -9
- package/esm/types.d.ts +0 -29
- package/esm/types.js +0 -13
- package/esm/usePlaceholder.d.ts +0 -10
- package/getInitialPopperStyles/package.json +0 -7
- package/getTabTransitionComponent/package.json +0 -7
- package/helpers/package.json +0 -7
- package/safeFindDOMNode/package.json +0 -7
- package/transitionEndListener/package.json +0 -7
- package/triggerBrowserReflow/package.json +0 -7
- package/types/package.json +0 -7
- package/useOverlayOffset/package.json +0 -7
- package/usePlaceholder/package.json +0 -7
- package/useWrappedRefWithWarning/package.json +0 -7
- /package/{esm → lib}/AccordionContext.js +0 -0
- /package/{esm → lib}/AccordionItemContext.d.ts +0 -0
- /package/{esm → lib}/AccordionItemContext.js +0 -0
- /package/{esm → lib}/Anchor.js +0 -0
- /package/{esm → lib}/BootstrapModalManager.js +0 -0
- /package/{esm → lib}/CardHeaderContext.d.ts +0 -0
- /package/{esm → lib}/CardHeaderContext.js +0 -0
- /package/{esm → lib}/DropdownContext.js +0 -0
- /package/{esm → lib}/ElementChildren.d.ts +0 -0
- /package/{esm → lib}/FormContext.d.ts +0 -0
- /package/{esm → lib}/FormContext.js +0 -0
- /package/{esm → lib}/FormGroup.js +0 -0
- /package/{esm → lib}/InputGroupContext.d.ts +0 -0
- /package/{esm → lib}/InputGroupContext.js +0 -0
- /package/{esm → lib}/ModalContext.d.ts +0 -0
- /package/{esm → lib}/NavContext.js +0 -0
- /package/{esm → lib}/NavbarCollapse.js +0 -0
- /package/{esm → lib}/NavbarContext.d.ts +0 -0
- /package/{esm → lib}/NavbarContext.js +0 -0
- /package/{esm → lib}/Placeholder.js +0 -0
- /package/{esm → lib}/PlaceholderButton.js +0 -0
- /package/{esm → lib}/Switch.js +0 -0
- /package/{esm → lib}/TabContainer.js +0 -0
- /package/{esm → lib}/ThemeProvider.js +0 -0
- /package/{esm → lib}/ToastContext.d.ts +0 -0
- /package/{esm → lib}/ToastFade.js +0 -0
- /package/{esm → lib}/ToggleButtonGroup.js +0 -0
- /package/{esm → lib}/createChainedFunction.d.ts +0 -0
- /package/{esm → lib}/createChainedFunction.js +0 -0
- /package/{esm → lib}/divWithClassName.d.ts +0 -0
- /package/{esm → lib}/getInitialPopperStyles.d.ts +0 -0
- /package/{esm → lib}/getInitialPopperStyles.js +0 -0
- /package/{esm → lib}/getTabTransitionComponent.js +0 -0
- /package/{esm → lib}/transitionEndListener.d.ts +0 -0
- /package/{esm → lib}/transitionEndListener.js +0 -0
- /package/{esm → lib}/triggerBrowserReflow.d.ts +0 -0
- /package/{esm → lib}/triggerBrowserReflow.js +0 -0
- /package/{esm → lib}/useOverlayOffset.js +0 -0
- /package/{esm → lib}/useWrappedRefWithWarning.d.ts +0 -0
- /package/{esm → lib}/useWrappedRefWithWarning.js +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
|
|
3
|
+
export interface CardTextProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Element used to render the component.
|
|
6
|
+
*/
|
|
7
|
+
as?: React.ElementType | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* @default 'card-text'
|
|
10
|
+
*/
|
|
11
|
+
bsPrefix?: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
declare const CardText: DynamicRefForwardingComponent<'p', CardTextProps>;
|
|
14
|
+
export default CardText;
|
package/{esm → lib}/CardText.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 CardText = /*#__PURE__*/React.forwardRef(({
|
|
@@ -13,7 +13,7 @@ const CardText = /*#__PURE__*/React.forwardRef(({
|
|
|
13
13
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'card-text');
|
|
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,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
|
|
3
|
+
export interface CardTitleProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Element used to render the component.
|
|
6
|
+
*/
|
|
7
|
+
as?: React.ElementType | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* @default 'card-title'
|
|
10
|
+
*/
|
|
11
|
+
bsPrefix?: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
declare const CardTitle: DynamicRefForwardingComponent<'div', CardTitleProps>;
|
|
14
|
+
export default CardTitle;
|
package/{esm → lib}/CardTitle.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 divWithClassName from './divWithClassName';
|
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -15,7 +15,7 @@ const CardTitle = /*#__PURE__*/React.forwardRef(({
|
|
|
15
15
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'card-title');
|
|
16
16
|
return /*#__PURE__*/_jsx(Component, {
|
|
17
17
|
ref: ref,
|
|
18
|
-
className:
|
|
18
|
+
className: clsx(className, bsPrefix),
|
|
19
19
|
...props
|
|
20
20
|
});
|
|
21
21
|
});
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export type CarouselVariant = 'dark' | string;
|
|
4
|
+
export interface CarouselRef {
|
|
5
|
+
element?: HTMLElement | null;
|
|
6
|
+
prev: (e?: React.SyntheticEvent) => void;
|
|
7
|
+
next: (e?: React.SyntheticEvent) => void;
|
|
8
|
+
}
|
|
9
|
+
export interface CarouselProps extends Omit<React.HTMLAttributes<HTMLElement>, 'onSelect'> {
|
|
10
|
+
/**
|
|
11
|
+
* Element used to render the component.
|
|
12
|
+
*/
|
|
13
|
+
as?: React.ElementType | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* @default 'carousel'
|
|
16
|
+
*/
|
|
17
|
+
bsPrefix?: string | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Enables animation on the Carousel as it transitions between slides.
|
|
20
|
+
*/
|
|
21
|
+
slide?: boolean | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Animates slides with a crossfade animation instead of the default slide animation.
|
|
24
|
+
*/
|
|
25
|
+
fade?: boolean | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Show the Carousel previous and next arrows for changing the current slide.
|
|
28
|
+
*/
|
|
29
|
+
controls?: boolean | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Show a set of slide position indicators.
|
|
32
|
+
*/
|
|
33
|
+
indicators?: boolean | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* An array of labels for the indicators. Defaults to "Slide #" if not provided.
|
|
36
|
+
*/
|
|
37
|
+
indicatorLabels?: string[] | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Controls the current visible slide.
|
|
40
|
+
*
|
|
41
|
+
* @controllable onSelect
|
|
42
|
+
*/
|
|
43
|
+
activeIndex?: number | undefined;
|
|
44
|
+
/**
|
|
45
|
+
* The default active index that is shown when the component is first rendered.
|
|
46
|
+
*/
|
|
47
|
+
defaultActiveIndex?: number | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Callback fired when the active item changes.
|
|
50
|
+
*
|
|
51
|
+
* ```js
|
|
52
|
+
* (eventKey: number, event: Object | null) => void
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @type {((eventKey: number, event: Record<string, unknown> | null) => void) | undefined}
|
|
56
|
+
* @controllable activeIndex
|
|
57
|
+
*/
|
|
58
|
+
onSelect?: ((eventKey: number, event: Record<string, unknown> | null) => void) | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Callback fired when a slide transition starts.
|
|
61
|
+
*
|
|
62
|
+
* ```js
|
|
63
|
+
* (eventKey: number, direction: 'left' | 'right') => void
|
|
64
|
+
* ```
|
|
65
|
+
*
|
|
66
|
+
* @type {((eventKey: number, direction: 'left' | 'right') => void) | undefined}
|
|
67
|
+
*/
|
|
68
|
+
onSlide?: ((eventKey: number, direction: 'start' | 'end') => void) | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Callback fired when a slide transition ends.
|
|
71
|
+
*
|
|
72
|
+
* ```js
|
|
73
|
+
* (eventKey: number, direction: 'left' | 'right') => void
|
|
74
|
+
* ```
|
|
75
|
+
*
|
|
76
|
+
* @type {((eventKey: number, direction: 'left' | 'right') => void) | undefined}
|
|
77
|
+
*/
|
|
78
|
+
onSlid?: ((eventKey: number, direction: 'start' | 'end') => void) | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* The amount of time to delay between automatically cycling an item. If `null`, carousel will not automatically cycle.
|
|
81
|
+
*/
|
|
82
|
+
interval?: number | null | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Whether the carousel should react to keyboard events.
|
|
85
|
+
*/
|
|
86
|
+
keyboard?: boolean | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* If set to `"hover"`, pauses the cycling of the carousel on `mouseenter` and resumes the cycling of the carousel on
|
|
89
|
+
* `mouseleave`. If set to `false`, hovering over the carousel won't pause it.
|
|
90
|
+
*
|
|
91
|
+
* On touch-enabled devices, when set to `"hover"`, cycling will pause on `touchend` (once the user finished interacting
|
|
92
|
+
* with the carousel) for two intervals, before automatically resuming. Note that this is in addition to the above mouse
|
|
93
|
+
* behavior.
|
|
94
|
+
*/
|
|
95
|
+
pause?: 'hover' | false | undefined;
|
|
96
|
+
/**
|
|
97
|
+
* Whether the carousel should cycle continuously or have hard stops.
|
|
98
|
+
*/
|
|
99
|
+
wrap?: boolean | undefined;
|
|
100
|
+
/**
|
|
101
|
+
* Whether the carousel should support left/right swipe interactions on touchscreen devices.
|
|
102
|
+
*/
|
|
103
|
+
touch?: boolean | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* Override the default button icon for the "previous" control.
|
|
106
|
+
*/
|
|
107
|
+
prevIcon?: React.ReactNode | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* Label shown to screen readers only, can be used to show the previous element in the carousel.
|
|
110
|
+
* Set to null to deactivate.
|
|
111
|
+
*/
|
|
112
|
+
prevLabel?: React.ReactNode | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* Override the default button icon for the "next" control
|
|
115
|
+
*/
|
|
116
|
+
nextIcon?: React.ReactNode | undefined;
|
|
117
|
+
/**
|
|
118
|
+
* Label shown to screen readers only, can be used to show the next element in the carousel.
|
|
119
|
+
* Set to null to deactivate.
|
|
120
|
+
*/
|
|
121
|
+
nextLabel?: React.ReactNode | undefined;
|
|
122
|
+
/**
|
|
123
|
+
* Color variant that controls the colors of the controls, indicators
|
|
124
|
+
* and captions.
|
|
125
|
+
*/
|
|
126
|
+
variant?: CarouselVariant | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* Carousel ref.
|
|
129
|
+
*/
|
|
130
|
+
ref?: React.Ref<CarouselRef> | undefined;
|
|
131
|
+
}
|
|
132
|
+
declare const _default: DynamicRefForwardingComponent<"div", CarouselProps> & {
|
|
133
|
+
Caption: DynamicRefForwardingComponent<"div", import("./CarouselCaption").CarouselCaptionProps>;
|
|
134
|
+
Item: DynamicRefForwardingComponent<"div", import("./CarouselItem").CarouselItemProps>;
|
|
135
|
+
};
|
|
136
|
+
export default _default;
|
package/{esm → lib}/Carousel.js
RENAMED
|
@@ -5,7 +5,7 @@ import useUpdateEffect from '@restart/hooks/useUpdateEffect';
|
|
|
5
5
|
import useCommittedRef from '@restart/hooks/useCommittedRef';
|
|
6
6
|
import useTimeout from '@restart/hooks/useTimeout';
|
|
7
7
|
import Anchor from '@restart/ui/Anchor';
|
|
8
|
-
import
|
|
8
|
+
import clsx from 'clsx';
|
|
9
9
|
import * as React from 'react';
|
|
10
10
|
import { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
11
11
|
import { useUncontrolled } from 'uncontrollable';
|
|
@@ -16,9 +16,7 @@ import { useBootstrapPrefix, useIsRTL } from './ThemeProvider';
|
|
|
16
16
|
import transitionEndListener from './transitionEndListener';
|
|
17
17
|
import triggerBrowserReflow from './triggerBrowserReflow';
|
|
18
18
|
import TransitionWrapper from './TransitionWrapper';
|
|
19
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
19
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
22
20
|
const SWIPE_THRESHOLD = 40;
|
|
23
21
|
function isVisible(element) {
|
|
24
22
|
if (!element || !element.style || !element.parentNode || !element.parentNode.style) {
|
|
@@ -27,10 +25,7 @@ function isVisible(element) {
|
|
|
27
25
|
const elementStyle = getComputedStyle(element);
|
|
28
26
|
return elementStyle.display !== 'none' && elementStyle.visibility !== 'hidden' && getComputedStyle(element.parentNode).display !== 'none';
|
|
29
27
|
}
|
|
30
|
-
const Carousel =
|
|
31
|
-
/*#__PURE__*/
|
|
32
|
-
// eslint-disable-next-line react/display-name
|
|
33
|
-
React.forwardRef(({
|
|
28
|
+
const Carousel = /*#__PURE__*/React.forwardRef(({
|
|
34
29
|
defaultActiveIndex = 0,
|
|
35
30
|
...uncontrolledProps
|
|
36
31
|
}, ref) => {
|
|
@@ -145,7 +140,7 @@ React.forwardRef(({
|
|
|
145
140
|
nextDirectionRef.current = 'next';
|
|
146
141
|
onSelect == null || onSelect(nextActiveIndex, event);
|
|
147
142
|
});
|
|
148
|
-
const elementRef = useRef();
|
|
143
|
+
const elementRef = useRef(null);
|
|
149
144
|
useImperativeHandle(ref, () => ({
|
|
150
145
|
element: elementRef.current,
|
|
151
146
|
prev,
|
|
@@ -253,7 +248,7 @@ React.forwardRef(({
|
|
|
253
248
|
onTouchEnd == null || onTouchEnd(event);
|
|
254
249
|
}, [touch, pause, prev, next, touchUnpauseTimeout, interval, onTouchEnd]);
|
|
255
250
|
const shouldPlay = interval != null && !paused && !isSliding;
|
|
256
|
-
const intervalHandleRef = useRef();
|
|
251
|
+
const intervalHandleRef = useRef(null);
|
|
257
252
|
useEffect(() => {
|
|
258
253
|
var _ref, _activeChildIntervalR;
|
|
259
254
|
if (!shouldPlay) {
|
|
@@ -281,7 +276,7 @@ React.forwardRef(({
|
|
|
281
276
|
onTouchStart: handleTouchStart,
|
|
282
277
|
onTouchMove: handleTouchMove,
|
|
283
278
|
onTouchEnd: handleTouchEnd,
|
|
284
|
-
className:
|
|
279
|
+
className: clsx(className, prefix, slide && 'slide', fade && `${prefix}-fade`, variant && `${prefix}-${variant}`),
|
|
285
280
|
children: [indicators && /*#__PURE__*/_jsx("div", {
|
|
286
281
|
className: `${prefix}-indicators`,
|
|
287
282
|
children: map(children, (_, index) => /*#__PURE__*/_jsx("button", {
|
|
@@ -304,10 +299,10 @@ React.forwardRef(({
|
|
|
304
299
|
addEndListener: transitionEndListener,
|
|
305
300
|
children: (status, innerProps) => /*#__PURE__*/React.cloneElement(child, {
|
|
306
301
|
...innerProps,
|
|
307
|
-
className:
|
|
302
|
+
className: clsx(child.props.className, isActive && status !== 'entered' && orderClassName, (status === 'entered' || status === 'exiting') && 'active', (status === 'entering' || status === 'exiting') && directionalClassName)
|
|
308
303
|
})
|
|
309
|
-
}) : (
|
|
310
|
-
className:
|
|
304
|
+
}) : (/*#__PURE__*/React.cloneElement(child, {
|
|
305
|
+
className: clsx(child.props.className, isActive && 'active')
|
|
311
306
|
}));
|
|
312
307
|
})
|
|
313
308
|
}), controls && /*#__PURE__*/_jsxs(_Fragment, {
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
|
|
3
|
+
export interface CarouselCaptionProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Element used to render the component.
|
|
6
|
+
*/
|
|
7
|
+
as?: React.ElementType | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* @default 'carousel-caption'
|
|
10
|
+
*/
|
|
11
|
+
bsPrefix?: string | undefined;
|
|
12
|
+
}
|
|
13
|
+
declare const CarouselCaption: DynamicRefForwardingComponent<'div', CarouselCaptionProps>;
|
|
14
|
+
export default CarouselCaption;
|
|
@@ -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 CarouselCaption = /*#__PURE__*/React.forwardRef(({
|
|
@@ -13,7 +13,7 @@ const CarouselCaption = /*#__PURE__*/React.forwardRef(({
|
|
|
13
13
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'carousel-caption');
|
|
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,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
|
|
3
|
+
export interface CarouselItemProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Element used to render the component.
|
|
6
|
+
*/
|
|
7
|
+
as?: React.ElementType | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* @default 'carousel-item'
|
|
10
|
+
*/
|
|
11
|
+
bsPrefix?: string | undefined;
|
|
12
|
+
/** The amount of time to delay between automatically cycling this specific item.
|
|
13
|
+
* Will default to the Carousel's `interval` prop value if none is specified.
|
|
14
|
+
*/
|
|
15
|
+
interval?: number | undefined;
|
|
16
|
+
}
|
|
17
|
+
declare const CarouselItem: DynamicRefForwardingComponent<'div', CarouselItemProps>;
|
|
18
|
+
export default CarouselItem;
|
|
@@ -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";
|
|
@@ -11,7 +11,7 @@ const CarouselItem = /*#__PURE__*/React.forwardRef(({
|
|
|
11
11
|
className,
|
|
12
12
|
...props
|
|
13
13
|
}, ref) => {
|
|
14
|
-
const finalClassName =
|
|
14
|
+
const finalClassName = clsx(className, useBootstrapPrefix(bsPrefix, 'carousel-item'));
|
|
15
15
|
return /*#__PURE__*/_jsx(Component, {
|
|
16
16
|
ref: ref,
|
|
17
17
|
...props,
|
|
@@ -1,7 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export type CloseButtonVariant = 'white' | string;
|
|
3
3
|
export interface CloseButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* An accessible label indicating the relevant information about the Close Button.
|
|
6
|
+
*/
|
|
7
|
+
'aria-label'?: string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Render different color variant for the button.
|
|
10
|
+
*
|
|
11
|
+
* Omitting this will render the default dark color.
|
|
12
|
+
*/
|
|
13
|
+
variant?: CloseButtonVariant | undefined;
|
|
5
14
|
}
|
|
6
15
|
declare const CloseButton: React.ForwardRefExoticComponent<CloseButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
16
|
export default CloseButton;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
+
const CloseButton = /*#__PURE__*/React.forwardRef(({
|
|
5
|
+
className,
|
|
6
|
+
variant,
|
|
7
|
+
'aria-label': ariaLabel = 'Close',
|
|
8
|
+
...props
|
|
9
|
+
}, ref) => /*#__PURE__*/_jsx("button", {
|
|
10
|
+
ref: ref,
|
|
11
|
+
type: "button",
|
|
12
|
+
className: clsx('btn-close', variant && `btn-close-${variant}`, className),
|
|
13
|
+
"aria-label": ariaLabel,
|
|
14
|
+
...props
|
|
15
|
+
}));
|
|
16
|
+
CloseButton.displayName = 'CloseButton';
|
|
17
|
+
export default CloseButton;
|
package/lib/Col.d.ts
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
|
|
3
|
+
export type NumberAttr = number | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | '10' | '11' | '12';
|
|
4
|
+
export type ColOrderNumber = number | '1' | '2' | '3' | '4' | '5';
|
|
5
|
+
export type ColOrder = ColOrderNumber | 'first' | 'last';
|
|
6
|
+
export type ColSize = boolean | 'auto' | NumberAttr;
|
|
7
|
+
export type ColSpec = ColSize | {
|
|
8
|
+
span?: ColSize | null;
|
|
9
|
+
offset?: NumberAttr;
|
|
10
|
+
order?: ColOrder;
|
|
11
|
+
};
|
|
12
|
+
export interface ColProps extends React.HTMLAttributes<HTMLElement> {
|
|
13
|
+
/**
|
|
14
|
+
* Element used to render the component.
|
|
15
|
+
*/
|
|
16
|
+
as?: React.ElementType | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* @default 'col'
|
|
19
|
+
*/
|
|
20
|
+
bsPrefix?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* The number of columns to span on extra small devices (<576px).
|
|
23
|
+
*/
|
|
24
|
+
xs?: ColSpec | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* The number of columns to span on small devices (≥576px).
|
|
27
|
+
*/
|
|
28
|
+
sm?: ColSpec | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* The number of columns to span on medium devices (≥768px).
|
|
31
|
+
*/
|
|
32
|
+
md?: ColSpec | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* The number of columns to span on large devices (≥992px).
|
|
35
|
+
*/
|
|
36
|
+
lg?: ColSpec | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* The number of columns to span on extra large devices (≥1200px).
|
|
39
|
+
*/
|
|
40
|
+
xl?: ColSpec | undefined;
|
|
41
|
+
/**
|
|
42
|
+
* The number of columns to span on extra extra large devices (≥1400px).
|
|
43
|
+
*/
|
|
44
|
+
xxl?: ColSpec | undefined;
|
|
45
|
+
[key: string]: any;
|
|
46
|
+
}
|
|
47
|
+
declare const Col: DynamicRefForwardingComponent<'div', ColProps>;
|
|
48
|
+
export default Col;
|
package/lib/Col.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import useCol from './useCol';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
const Col = /*#__PURE__*/React.forwardRef(
|
|
6
|
+
// Need to define the default "as" during prop destructuring to be compatible with styled-components github.com/react-bootstrap/react-bootstrap/issues/3595
|
|
7
|
+
(props, ref) => {
|
|
8
|
+
const [{
|
|
9
|
+
className,
|
|
10
|
+
...colProps
|
|
11
|
+
}, {
|
|
12
|
+
as: Component = 'div',
|
|
13
|
+
bsPrefix,
|
|
14
|
+
spans
|
|
15
|
+
}] = useCol(props);
|
|
16
|
+
return /*#__PURE__*/_jsx(Component, {
|
|
17
|
+
...colProps,
|
|
18
|
+
ref: ref,
|
|
19
|
+
className: clsx(className, !spans.length && bsPrefix)
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
Col.displayName = 'Col';
|
|
23
|
+
export default Col;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Transition from 'react-transition-group/Transition';
|
|
3
|
+
import type { TransitionCallbacks } from './types';
|
|
4
|
+
type Dimension = 'height' | 'width';
|
|
5
|
+
export interface CollapseProps extends TransitionCallbacks, Pick<React.HTMLAttributes<HTMLElement>, 'className' | 'role'> {
|
|
6
|
+
/**
|
|
7
|
+
* Show the component; triggers the expand or collapse animation
|
|
8
|
+
*/
|
|
9
|
+
in?: boolean | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* Wait until the first "enter" transition to mount the component (add it to the DOM)
|
|
12
|
+
*/
|
|
13
|
+
mountOnEnter?: boolean | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Unmount the component (remove it from the DOM) when it is collapsed
|
|
16
|
+
*/
|
|
17
|
+
unmountOnExit?: boolean | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Run the expand animation when the component mounts, if it is initially shown
|
|
20
|
+
*/
|
|
21
|
+
appear?: boolean | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Duration of the collapse animation in milliseconds, to ensure that
|
|
24
|
+
* finishing callbacks are fired even if the original browser transition end
|
|
25
|
+
* events are canceled
|
|
26
|
+
*/
|
|
27
|
+
timeout?: number | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* The dimension used when collapsing, or a function that returns the
|
|
30
|
+
* dimension
|
|
31
|
+
*
|
|
32
|
+
* @type {'height' | 'width' | (() => 'height' | 'width') | undefined}
|
|
33
|
+
*/
|
|
34
|
+
dimension?: Dimension | (() => Dimension) | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Function that returns the height or width of the animating DOM node
|
|
37
|
+
*
|
|
38
|
+
* Allows for providing some custom logic for how much the Collapse component
|
|
39
|
+
* should animate in its specified dimension. Called with the current
|
|
40
|
+
* dimension prop value and the DOM node.
|
|
41
|
+
*
|
|
42
|
+
* @type {((dimension: Dimension, element: HTMLElement) => number) | undefined}
|
|
43
|
+
* @default element.offsetWidth | element.offsetHeight
|
|
44
|
+
*/
|
|
45
|
+
getDimensionValue?: ((dimension: Dimension, element: HTMLElement) => number) | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* You must provide a single JSX child element to this component and that element cannot be a \<React.Fragment\>
|
|
48
|
+
*/
|
|
49
|
+
children: React.ReactElement;
|
|
50
|
+
}
|
|
51
|
+
declare const Collapse: React.ForwardRefExoticComponent<CollapseProps & React.RefAttributes<Transition<any>>>;
|
|
52
|
+
export default Collapse;
|
package/{esm → lib}/Collapse.js
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import clsx from 'clsx';
|
|
2
2
|
import css from 'dom-helpers/css';
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
4
|
import { ENTERED, ENTERING, EXITED, EXITING } from 'react-transition-group/Transition';
|
|
@@ -86,7 +86,7 @@ const Collapse = /*#__PURE__*/React.forwardRef(({
|
|
|
86
86
|
appear: appear,
|
|
87
87
|
children: (state, innerProps) => /*#__PURE__*/React.cloneElement(children, {
|
|
88
88
|
...innerProps,
|
|
89
|
-
className:
|
|
89
|
+
className: clsx(className, children.props.className, collapseStyles[state], computedDimension === 'width' && 'collapse-horizontal')
|
|
90
90
|
})
|
|
91
91
|
});
|
|
92
92
|
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
|
|
3
|
+
export interface ContainerProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Element used to render the component.
|
|
6
|
+
*/
|
|
7
|
+
as?: React.ElementType | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* @default 'container'
|
|
10
|
+
*/
|
|
11
|
+
bsPrefix?: string | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Allow the Container to fill all of its available horizontal space.
|
|
14
|
+
*/
|
|
15
|
+
fluid?: boolean | string | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | undefined;
|
|
16
|
+
}
|
|
17
|
+
declare const Container: DynamicRefForwardingComponent<'div', ContainerProps>;
|
|
18
|
+
export default Container;
|
package/{esm → lib}/Container.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 Container = /*#__PURE__*/React.forwardRef(({
|
|
|
17
17
|
return /*#__PURE__*/_jsx(Component, {
|
|
18
18
|
ref: ref,
|
|
19
19
|
...props,
|
|
20
|
-
className:
|
|
20
|
+
className: clsx(className, fluid ? `${prefix}${suffix}` : prefix)
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
Container.displayName = 'Container';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
|
|
3
|
+
import type { BsDropdownProps } from './types';
|
|
4
|
+
export interface DropdownProps extends BsDropdownProps, Omit<React.HTMLAttributes<HTMLElement>, 'onSelect' | 'children' | 'onToggle'> {
|
|
5
|
+
}
|
|
6
|
+
declare const _default: DynamicRefForwardingComponent<"div", DropdownProps> & {
|
|
7
|
+
Toggle: DynamicRefForwardingComponent<"button", import("./DropdownToggle").DropdownToggleProps>;
|
|
8
|
+
Menu: DynamicRefForwardingComponent<"div", import("./DropdownMenu").DropdownMenuProps>;
|
|
9
|
+
Item: DynamicRefForwardingComponent<"a", import("./DropdownItem").DropdownItemProps>;
|
|
10
|
+
ItemText: DynamicRefForwardingComponent<"span", import("./DropdownItemText").DropdownItemTextProps>;
|
|
11
|
+
Divider: DynamicRefForwardingComponent<"hr", import("./DropdownDivider").DropdownDividerProps>;
|
|
12
|
+
Header: DynamicRefForwardingComponent<"div", import("./DropdownHeader").DropdownHeaderProps>;
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
package/{esm → lib}/Dropdown.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 { useContext, useMemo } from 'react';
|
|
6
6
|
import BaseDropdown from '@restart/ui/Dropdown';
|
|
@@ -15,7 +15,6 @@ import DropdownMenu, { getDropdownMenuPlacement } from './DropdownMenu';
|
|
|
15
15
|
import DropdownToggle from './DropdownToggle';
|
|
16
16
|
import InputGroupContext from './InputGroupContext';
|
|
17
17
|
import { useBootstrapPrefix, useIsRTL } from './ThemeProvider';
|
|
18
|
-
import { alignPropType } from './types';
|
|
19
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
19
|
const Dropdown = /*#__PURE__*/React.forwardRef((pProps, ref) => {
|
|
21
20
|
const {
|
|
@@ -88,7 +87,7 @@ const Dropdown = /*#__PURE__*/React.forwardRef((pProps, ref) => {
|
|
|
88
87
|
children: isInputGroup ? props.children : /*#__PURE__*/_jsx(Component, {
|
|
89
88
|
...props,
|
|
90
89
|
ref: ref,
|
|
91
|
-
className:
|
|
90
|
+
className: clsx(className, show && 'show', directionClasses[drop])
|
|
92
91
|
})
|
|
93
92
|
})
|
|
94
93
|
});
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
|
|
3
|
+
import { type PropsFromToggle } from './DropdownToggle';
|
|
4
|
+
import { type DropdownMenuVariant } from './DropdownMenu';
|
|
5
|
+
import type { BsDropdownProps } from './types';
|
|
6
|
+
export interface DropdownButtonProps extends BsDropdownProps, PropsFromToggle, Omit<React.HTMLAttributes<HTMLElement>, 'onSelect' | 'children' | 'onToggle' | 'title'> {
|
|
7
|
+
/**
|
|
8
|
+
* An html id attribute for the Toggle button, necessary for assistive technologies, such as screen readers.
|
|
9
|
+
*/
|
|
10
|
+
id?: string | undefined;
|
|
11
|
+
/**
|
|
12
|
+
* An `href` passed to the Toggle component
|
|
13
|
+
*/
|
|
14
|
+
href?: string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* The content of the non-toggle Button.
|
|
17
|
+
*/
|
|
18
|
+
title: React.ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* An ARIA accessible role applied to the Menu component.
|
|
21
|
+
*/
|
|
22
|
+
menuRole?: string | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Whether to render the dropdown menu in the DOM before the first time it is shown
|
|
25
|
+
*/
|
|
26
|
+
renderMenuOnMount?: boolean | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Which event when fired outside the component will cause it to be closed.
|
|
29
|
+
*
|
|
30
|
+
* _see [DropdownMenu](#dropdown-menu-props) for more details_
|
|
31
|
+
*/
|
|
32
|
+
rootCloseEvent?: 'click' | 'mousedown' | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Menu color variant.
|
|
35
|
+
*
|
|
36
|
+
* Omitting this will use the default light color.
|
|
37
|
+
*/
|
|
38
|
+
menuVariant?: DropdownMenuVariant | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Allow Dropdown to flip in case of an overlapping on the reference element. For more information refer to
|
|
41
|
+
* Popper.js's flip [docs](https://popper.js.org/docs/v2/modifiers/flip/).
|
|
42
|
+
*/
|
|
43
|
+
flip?: boolean | undefined;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* A convenience component for simple or general use dropdowns. Renders a `Button` toggle and all `children`
|
|
47
|
+
* are passed directly to the default `Dropdown.Menu`. This component accepts all of
|
|
48
|
+
* [`Dropdown`'s props](#dropdown-props).
|
|
49
|
+
*
|
|
50
|
+
* _All unknown props are passed through to the `Dropdown` component._ Only
|
|
51
|
+
* the Button `variant`, `size` and `bsPrefix` props are passed to the toggle,
|
|
52
|
+
* along with menu-related props are passed to the `Dropdown.Menu`
|
|
53
|
+
*/
|
|
54
|
+
declare const DropdownButton: DynamicRefForwardingComponent<'div', DropdownButtonProps>;
|
|
55
|
+
export default DropdownButton;
|