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
|
@@ -1,11 +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 FormGroup from './FormGroup';
|
|
6
6
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
8
|
const FloatingLabel = /*#__PURE__*/React.forwardRef(({
|
|
10
9
|
bsPrefix,
|
|
11
10
|
className,
|
|
@@ -17,7 +16,7 @@ const FloatingLabel = /*#__PURE__*/React.forwardRef(({
|
|
|
17
16
|
bsPrefix = useBootstrapPrefix(bsPrefix, 'form-floating');
|
|
18
17
|
return /*#__PURE__*/_jsxs(FormGroup, {
|
|
19
18
|
ref: ref,
|
|
20
|
-
className:
|
|
19
|
+
className: clsx(className, bsPrefix),
|
|
21
20
|
controlId: controlId,
|
|
22
21
|
...props,
|
|
23
22
|
children: [children, /*#__PURE__*/_jsx("label", {
|
package/{esm → lib}/Form.d.ts
RENAMED
|
@@ -1,136 +1,151 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface FormProps extends React.FormHTMLAttributes<HTMLFormElement
|
|
2
|
+
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
|
|
3
|
+
export interface FormProps extends React.FormHTMLAttributes<HTMLFormElement> {
|
|
4
|
+
/**
|
|
5
|
+
* Element used to render the component.
|
|
6
|
+
*/
|
|
7
|
+
as?: React.ElementType | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Mark a form as having been validated. Setting it to `true` will
|
|
10
|
+
* toggle any validation styles on the forms elements.
|
|
11
|
+
*/
|
|
4
12
|
validated?: boolean;
|
|
5
13
|
}
|
|
6
|
-
declare const _default:
|
|
7
|
-
Group:
|
|
8
|
-
Control:
|
|
9
|
-
Feedback:
|
|
14
|
+
declare const _default: DynamicRefForwardingComponent<"form", FormProps> & {
|
|
15
|
+
Group: DynamicRefForwardingComponent<"div", import("./FormGroup").FormGroupProps>;
|
|
16
|
+
Control: DynamicRefForwardingComponent<"input", import("./FormControl").FormControlProps> & {
|
|
17
|
+
Feedback: DynamicRefForwardingComponent<"div", import("./Feedback").FeedbackProps>;
|
|
10
18
|
};
|
|
11
|
-
Floating:
|
|
12
|
-
Check:
|
|
13
|
-
Input:
|
|
19
|
+
Floating: DynamicRefForwardingComponent<"div", import("./FormFloating").FormFloatingProps>;
|
|
20
|
+
Check: DynamicRefForwardingComponent<"input", import("./FormCheck").FormCheckProps> & {
|
|
21
|
+
Input: DynamicRefForwardingComponent<"input", import("./FormCheckInput").FormCheckInputProps>;
|
|
14
22
|
Label: React.ForwardRefExoticComponent<import("./FormCheckLabel").FormCheckLabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
15
23
|
};
|
|
16
|
-
Switch:
|
|
17
|
-
Input:
|
|
24
|
+
Switch: DynamicRefForwardingComponent<DynamicRefForwardingComponent<"input", import("./FormCheck").FormCheckProps> & {
|
|
25
|
+
Input: DynamicRefForwardingComponent<"input", import("./FormCheckInput").FormCheckInputProps>;
|
|
18
26
|
Label: React.ForwardRefExoticComponent<import("./FormCheckLabel").FormCheckLabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
19
27
|
}, {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
defaultChecked?: boolean | undefined;
|
|
28
|
+
"aria-label"?: string | undefined | undefined;
|
|
29
|
+
disabled?: boolean | undefined | undefined;
|
|
30
|
+
form?: string | undefined | undefined;
|
|
31
|
+
formAction?: string | ((formData: FormData) => void | Promise<void>) | undefined;
|
|
32
|
+
formEncType?: string | undefined | undefined;
|
|
33
|
+
formMethod?: string | undefined | undefined;
|
|
34
|
+
formNoValidate?: boolean | undefined | undefined;
|
|
35
|
+
formTarget?: string | undefined | undefined;
|
|
36
|
+
name?: string | undefined | undefined;
|
|
37
|
+
value?: string | number | readonly string[] | undefined;
|
|
38
|
+
defaultChecked?: boolean | undefined | undefined;
|
|
32
39
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
33
|
-
suppressContentEditableWarning?: boolean | undefined;
|
|
34
|
-
suppressHydrationWarning?: boolean | undefined;
|
|
35
|
-
accessKey?: string | undefined;
|
|
36
|
-
|
|
40
|
+
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
41
|
+
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
42
|
+
accessKey?: string | undefined | undefined;
|
|
43
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
44
|
+
autoFocus?: boolean | undefined | undefined;
|
|
45
|
+
className?: string | undefined | undefined;
|
|
37
46
|
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
38
|
-
contextMenu?: string | undefined;
|
|
39
|
-
dir?: string | undefined;
|
|
47
|
+
contextMenu?: string | undefined | undefined;
|
|
48
|
+
dir?: string | undefined | undefined;
|
|
40
49
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
50
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
51
|
+
hidden?: boolean | undefined | undefined;
|
|
52
|
+
id?: string | undefined | undefined;
|
|
53
|
+
lang?: string | undefined | undefined;
|
|
54
|
+
nonce?: string | undefined | undefined;
|
|
55
|
+
slot?: string | undefined | undefined;
|
|
46
56
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
47
57
|
style?: React.CSSProperties | undefined;
|
|
48
|
-
tabIndex?: number | undefined;
|
|
49
|
-
title?: string | undefined;
|
|
50
|
-
translate?: "yes" | "no" | undefined;
|
|
51
|
-
radioGroup?: string | undefined;
|
|
58
|
+
tabIndex?: number | undefined | undefined;
|
|
59
|
+
title?: string | undefined | undefined;
|
|
60
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
61
|
+
radioGroup?: string | undefined | undefined;
|
|
52
62
|
role?: React.AriaRole | undefined;
|
|
53
|
-
about?: string | undefined;
|
|
54
|
-
content?: string | undefined;
|
|
55
|
-
datatype?: string | undefined;
|
|
63
|
+
about?: string | undefined | undefined;
|
|
64
|
+
content?: string | undefined | undefined;
|
|
65
|
+
datatype?: string | undefined | undefined;
|
|
56
66
|
inlist?: any;
|
|
57
|
-
prefix?: string | undefined;
|
|
58
|
-
property?: string | undefined;
|
|
59
|
-
rel?: string | undefined;
|
|
60
|
-
resource?: string | undefined;
|
|
61
|
-
rev?: string | undefined;
|
|
62
|
-
typeof?: string | undefined;
|
|
63
|
-
vocab?: string | undefined;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
67
|
+
prefix?: string | undefined | undefined;
|
|
68
|
+
property?: string | undefined | undefined;
|
|
69
|
+
rel?: string | undefined | undefined;
|
|
70
|
+
resource?: string | undefined | undefined;
|
|
71
|
+
rev?: string | undefined | undefined;
|
|
72
|
+
typeof?: string | undefined | undefined;
|
|
73
|
+
vocab?: string | undefined | undefined;
|
|
74
|
+
autoCorrect?: string | undefined | undefined;
|
|
75
|
+
autoSave?: string | undefined | undefined;
|
|
76
|
+
color?: string | undefined | undefined;
|
|
77
|
+
itemProp?: string | undefined | undefined;
|
|
78
|
+
itemScope?: boolean | undefined | undefined;
|
|
79
|
+
itemType?: string | undefined | undefined;
|
|
80
|
+
itemID?: string | undefined | undefined;
|
|
81
|
+
itemRef?: string | undefined | undefined;
|
|
82
|
+
results?: number | undefined | undefined;
|
|
83
|
+
security?: string | undefined | undefined;
|
|
84
|
+
unselectable?: "on" | "off" | undefined | undefined;
|
|
85
|
+
popover?: "" | "auto" | "manual" | undefined | undefined;
|
|
86
|
+
popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
|
|
87
|
+
popoverTarget?: string | undefined | undefined;
|
|
88
|
+
inert?: boolean | undefined | undefined;
|
|
89
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
90
|
+
is?: string | undefined | undefined;
|
|
91
|
+
exportparts?: string | undefined | undefined;
|
|
92
|
+
part?: string | undefined | undefined;
|
|
93
|
+
"aria-activedescendant"?: string | undefined | undefined;
|
|
79
94
|
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
80
|
-
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined;
|
|
81
|
-
"aria-braillelabel"?: string | undefined;
|
|
82
|
-
"aria-brailleroledescription"?: string | undefined;
|
|
95
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
96
|
+
"aria-braillelabel"?: string | undefined | undefined;
|
|
97
|
+
"aria-brailleroledescription"?: string | undefined | undefined;
|
|
83
98
|
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
84
|
-
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
85
|
-
"aria-colcount"?: number | undefined;
|
|
86
|
-
"aria-colindex"?: number | undefined;
|
|
87
|
-
"aria-colindextext"?: string | undefined;
|
|
88
|
-
"aria-colspan"?: number | undefined;
|
|
89
|
-
"aria-controls"?: string | undefined;
|
|
90
|
-
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined;
|
|
91
|
-
"aria-describedby"?: string | undefined;
|
|
92
|
-
"aria-description"?: string | undefined;
|
|
93
|
-
"aria-details"?: string | undefined;
|
|
99
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
100
|
+
"aria-colcount"?: number | undefined | undefined;
|
|
101
|
+
"aria-colindex"?: number | undefined | undefined;
|
|
102
|
+
"aria-colindextext"?: string | undefined | undefined;
|
|
103
|
+
"aria-colspan"?: number | undefined | undefined;
|
|
104
|
+
"aria-controls"?: string | undefined | undefined;
|
|
105
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
|
|
106
|
+
"aria-describedby"?: string | undefined | undefined;
|
|
107
|
+
"aria-description"?: string | undefined | undefined;
|
|
108
|
+
"aria-details"?: string | undefined | undefined;
|
|
94
109
|
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
95
|
-
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined;
|
|
96
|
-
"aria-errormessage"?: string | undefined;
|
|
110
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
|
|
111
|
+
"aria-errormessage"?: string | undefined | undefined;
|
|
97
112
|
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
98
|
-
"aria-flowto"?: string | undefined;
|
|
113
|
+
"aria-flowto"?: string | undefined | undefined;
|
|
99
114
|
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
100
|
-
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined;
|
|
115
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
|
|
101
116
|
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
102
|
-
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined;
|
|
103
|
-
"aria-keyshortcuts"?: string | undefined;
|
|
104
|
-
"aria-labelledby"?: string | undefined;
|
|
105
|
-
"aria-level"?: number | undefined;
|
|
106
|
-
"aria-live"?: "off" | "assertive" | "polite" | undefined;
|
|
117
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
|
|
118
|
+
"aria-keyshortcuts"?: string | undefined | undefined;
|
|
119
|
+
"aria-labelledby"?: string | undefined | undefined;
|
|
120
|
+
"aria-level"?: number | undefined | undefined;
|
|
121
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
|
|
107
122
|
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
108
123
|
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
109
124
|
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
110
|
-
"aria-orientation"?: "horizontal" | "vertical" | undefined;
|
|
111
|
-
"aria-owns"?: string | undefined;
|
|
112
|
-
"aria-placeholder"?: string | undefined;
|
|
113
|
-
"aria-posinset"?: number | undefined;
|
|
114
|
-
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined;
|
|
125
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
|
|
126
|
+
"aria-owns"?: string | undefined | undefined;
|
|
127
|
+
"aria-placeholder"?: string | undefined | undefined;
|
|
128
|
+
"aria-posinset"?: number | undefined | undefined;
|
|
129
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
115
130
|
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
116
|
-
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined;
|
|
131
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
|
|
117
132
|
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
118
|
-
"aria-roledescription"?: string | undefined;
|
|
119
|
-
"aria-rowcount"?: number | undefined;
|
|
120
|
-
"aria-rowindex"?: number | undefined;
|
|
121
|
-
"aria-rowindextext"?: string | undefined;
|
|
122
|
-
"aria-rowspan"?: number | undefined;
|
|
133
|
+
"aria-roledescription"?: string | undefined | undefined;
|
|
134
|
+
"aria-rowcount"?: number | undefined | undefined;
|
|
135
|
+
"aria-rowindex"?: number | undefined | undefined;
|
|
136
|
+
"aria-rowindextext"?: string | undefined | undefined;
|
|
137
|
+
"aria-rowspan"?: number | undefined | undefined;
|
|
123
138
|
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
124
|
-
"aria-setsize"?: number | undefined;
|
|
125
|
-
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined;
|
|
126
|
-
"aria-valuemax"?: number | undefined;
|
|
127
|
-
"aria-valuemin"?: number | undefined;
|
|
128
|
-
"aria-valuenow"?: number | undefined;
|
|
129
|
-
"aria-valuetext"?: string | undefined;
|
|
130
|
-
children?: React.ReactNode
|
|
139
|
+
"aria-setsize"?: number | undefined | undefined;
|
|
140
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
|
|
141
|
+
"aria-valuemax"?: number | undefined | undefined;
|
|
142
|
+
"aria-valuemin"?: number | undefined | undefined;
|
|
143
|
+
"aria-valuenow"?: number | undefined | undefined;
|
|
144
|
+
"aria-valuetext"?: string | undefined | undefined;
|
|
145
|
+
children?: React.ReactNode;
|
|
131
146
|
dangerouslySetInnerHTML?: {
|
|
132
147
|
__html: string | TrustedHTML;
|
|
133
|
-
} | undefined;
|
|
148
|
+
} | undefined | undefined;
|
|
134
149
|
onCopy?: React.ClipboardEventHandler<HTMLInputElement> | undefined;
|
|
135
150
|
onCopyCapture?: React.ClipboardEventHandler<HTMLInputElement> | undefined;
|
|
136
151
|
onCut?: React.ClipboardEventHandler<HTMLInputElement> | undefined;
|
|
@@ -281,6 +296,8 @@ declare const _default: BsPrefixRefForwardingComponent<"form", FormProps> & {
|
|
|
281
296
|
onLostPointerCaptureCapture?: React.PointerEventHandler<HTMLInputElement> | undefined;
|
|
282
297
|
onScroll?: React.UIEventHandler<HTMLInputElement> | undefined;
|
|
283
298
|
onScrollCapture?: React.UIEventHandler<HTMLInputElement> | undefined;
|
|
299
|
+
onScrollEnd?: React.UIEventHandler<HTMLInputElement> | undefined;
|
|
300
|
+
onScrollEndCapture?: React.UIEventHandler<HTMLInputElement> | undefined;
|
|
284
301
|
onWheel?: React.WheelEventHandler<HTMLInputElement> | undefined;
|
|
285
302
|
onWheelCapture?: React.WheelEventHandler<HTMLInputElement> | undefined;
|
|
286
303
|
onAnimationStart?: React.AnimationEventHandler<HTMLInputElement> | undefined;
|
|
@@ -289,48 +306,55 @@ declare const _default: BsPrefixRefForwardingComponent<"form", FormProps> & {
|
|
|
289
306
|
onAnimationEndCapture?: React.AnimationEventHandler<HTMLInputElement> | undefined;
|
|
290
307
|
onAnimationIteration?: React.AnimationEventHandler<HTMLInputElement> | undefined;
|
|
291
308
|
onAnimationIterationCapture?: React.AnimationEventHandler<HTMLInputElement> | undefined;
|
|
309
|
+
onToggle?: React.ToggleEventHandler<HTMLInputElement> | undefined;
|
|
310
|
+
onBeforeToggle?: React.ToggleEventHandler<HTMLInputElement> | undefined;
|
|
311
|
+
onTransitionCancel?: React.TransitionEventHandler<HTMLInputElement> | undefined;
|
|
312
|
+
onTransitionCancelCapture?: React.TransitionEventHandler<HTMLInputElement> | undefined;
|
|
292
313
|
onTransitionEnd?: React.TransitionEventHandler<HTMLInputElement> | undefined;
|
|
293
314
|
onTransitionEndCapture?: React.TransitionEventHandler<HTMLInputElement> | undefined;
|
|
294
|
-
|
|
315
|
+
onTransitionRun?: React.TransitionEventHandler<HTMLInputElement> | undefined;
|
|
316
|
+
onTransitionRunCapture?: React.TransitionEventHandler<HTMLInputElement> | undefined;
|
|
317
|
+
onTransitionStart?: React.TransitionEventHandler<HTMLInputElement> | undefined;
|
|
318
|
+
onTransitionStartCapture?: React.TransitionEventHandler<HTMLInputElement> | undefined;
|
|
319
|
+
reverse?: boolean | undefined | undefined;
|
|
320
|
+
list?: string | undefined | undefined;
|
|
321
|
+
bsPrefix?: string | undefined | undefined;
|
|
322
|
+
height?: number | string | undefined | undefined;
|
|
323
|
+
width?: number | string | undefined | undefined;
|
|
295
324
|
label?: React.ReactNode;
|
|
296
|
-
pattern?: string | undefined;
|
|
297
|
-
reverse?: boolean | undefined;
|
|
298
|
-
bsPrefix?: string | undefined;
|
|
299
|
-
height?: number | string | undefined;
|
|
300
|
-
width?: number | string | undefined;
|
|
301
|
-
size?: number | undefined;
|
|
302
|
-
inline?: boolean | undefined;
|
|
303
|
-
multiple?: boolean | undefined;
|
|
304
325
|
as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
|
|
326
|
+
pattern?: string | undefined | undefined;
|
|
327
|
+
size?: number | undefined | undefined;
|
|
328
|
+
inline?: boolean | undefined | undefined;
|
|
329
|
+
multiple?: boolean | undefined | undefined;
|
|
305
330
|
autoComplete?: React.HTMLInputAutoCompleteAttribute | undefined;
|
|
306
|
-
alt?: string | undefined;
|
|
307
|
-
accept?: string | undefined;
|
|
308
|
-
capture?: boolean | "user" | "environment" | undefined;
|
|
309
|
-
checked?: boolean | undefined;
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
max?: number | string | undefined;
|
|
315
|
-
min?: number | string | undefined;
|
|
316
|
-
placeholder?: string | undefined;
|
|
317
|
-
readOnly?: boolean | undefined;
|
|
318
|
-
required?: boolean | undefined;
|
|
319
|
-
step?: number | string | undefined;
|
|
331
|
+
alt?: string | undefined | undefined;
|
|
332
|
+
accept?: string | undefined | undefined;
|
|
333
|
+
capture?: boolean | "user" | "environment" | undefined | undefined;
|
|
334
|
+
checked?: boolean | undefined | undefined;
|
|
335
|
+
maxLength?: number | undefined | undefined;
|
|
336
|
+
minLength?: number | undefined | undefined;
|
|
337
|
+
src?: string | undefined | undefined;
|
|
338
|
+
step?: number | string | undefined | undefined;
|
|
320
339
|
feedback?: React.ReactNode;
|
|
321
|
-
isValid?: boolean | undefined;
|
|
340
|
+
isValid?: boolean | undefined | undefined;
|
|
322
341
|
isInvalid?: boolean | undefined;
|
|
323
|
-
|
|
342
|
+
max?: number | string | undefined | undefined;
|
|
343
|
+
min?: number | string | undefined | undefined;
|
|
344
|
+
placeholder?: string | undefined | undefined;
|
|
345
|
+
readOnly?: boolean | undefined | undefined;
|
|
346
|
+
required?: boolean | undefined | undefined;
|
|
347
|
+
bsSwitchPrefix?: string | undefined | undefined;
|
|
348
|
+
feedbackTooltip?: boolean | undefined | undefined;
|
|
324
349
|
feedbackType?: import("./Feedback").FeedbackType | undefined;
|
|
325
|
-
bsSwitchPrefix?: string | undefined;
|
|
326
350
|
}> & {
|
|
327
|
-
Input:
|
|
351
|
+
Input: DynamicRefForwardingComponent<"input", import("./FormCheckInput").FormCheckInputProps>;
|
|
328
352
|
Label: React.ForwardRefExoticComponent<import("./FormCheckLabel").FormCheckLabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
329
353
|
};
|
|
330
|
-
Label:
|
|
331
|
-
Text:
|
|
354
|
+
Label: DynamicRefForwardingComponent<"label", import("./FormLabel").FormLabelProps>;
|
|
355
|
+
Text: DynamicRefForwardingComponent<"small", import("./FormText").FormTextProps>;
|
|
332
356
|
Range: React.ForwardRefExoticComponent<import("./FormRange").FormRangeProps & React.RefAttributes<HTMLInputElement>>;
|
|
333
|
-
Select:
|
|
334
|
-
FloatingLabel:
|
|
357
|
+
Select: React.ForwardRefExoticComponent<import("./FormSelect").FormSelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
358
|
+
FloatingLabel: DynamicRefForwardingComponent<"div", import("./FloatingLabel").FloatingLabelProps>;
|
|
335
359
|
};
|
|
336
360
|
export default _default;
|
package/{esm → lib}/Form.js
RENAMED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import PropTypes from 'prop-types';
|
|
1
|
+
import clsx from 'clsx';
|
|
3
2
|
import * as React from 'react';
|
|
4
3
|
import FormCheck from './FormCheck';
|
|
5
4
|
import FormControl from './FormControl';
|
|
@@ -12,23 +11,6 @@ import FormText from './FormText';
|
|
|
12
11
|
import Switch from './Switch';
|
|
13
12
|
import FloatingLabel from './FloatingLabel';
|
|
14
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
|
-
const propTypes = {
|
|
16
|
-
/**
|
|
17
|
-
* The Form `ref` will be forwarded to the underlying element,
|
|
18
|
-
* which means, unless it's rendered `as` a composite component,
|
|
19
|
-
* it will be a DOM node, when resolved.
|
|
20
|
-
*
|
|
21
|
-
* @type {ReactRef}
|
|
22
|
-
* @alias ref
|
|
23
|
-
*/
|
|
24
|
-
_ref: PropTypes.any,
|
|
25
|
-
/**
|
|
26
|
-
* Mark a form as having been validated. Setting it to `true` will
|
|
27
|
-
* toggle any validation styles on the forms elements.
|
|
28
|
-
*/
|
|
29
|
-
validated: PropTypes.bool,
|
|
30
|
-
as: PropTypes.elementType
|
|
31
|
-
};
|
|
32
14
|
const Form = /*#__PURE__*/React.forwardRef(({
|
|
33
15
|
className,
|
|
34
16
|
validated,
|
|
@@ -38,10 +20,9 @@ const Form = /*#__PURE__*/React.forwardRef(({
|
|
|
38
20
|
}, ref) => /*#__PURE__*/_jsx(Component, {
|
|
39
21
|
...props,
|
|
40
22
|
ref: ref,
|
|
41
|
-
className:
|
|
23
|
+
className: clsx(className, validated && 'was-validated')
|
|
42
24
|
}));
|
|
43
25
|
Form.displayName = 'Form';
|
|
44
|
-
Form.propTypes = propTypes;
|
|
45
26
|
export default Object.assign(Form, {
|
|
46
27
|
Group: FormGroup,
|
|
47
28
|
Control: FormControl,
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
|
|
3
|
+
import { type FeedbackType } from './Feedback';
|
|
4
|
+
export type FormCheckType = 'checkbox' | 'radio' | 'switch';
|
|
5
|
+
export interface FormCheckProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
6
|
+
/**
|
|
7
|
+
* Element used to render the component.
|
|
8
|
+
*/
|
|
9
|
+
as?: React.ElementType | undefined;
|
|
10
|
+
/**
|
|
11
|
+
* @default 'form-check'
|
|
12
|
+
*/
|
|
13
|
+
bsPrefix?: string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* bsPrefix override for the base switch class.
|
|
16
|
+
*
|
|
17
|
+
* @default 'form-switch'
|
|
18
|
+
*/
|
|
19
|
+
bsSwitchPrefix?: string | undefined;
|
|
20
|
+
/**
|
|
21
|
+
* A HTML id attribute, necessary for proper form accessibility.
|
|
22
|
+
* An id is recommended for allowing label clicks to toggle the check control.
|
|
23
|
+
*
|
|
24
|
+
* This is **required** when `type="switch"` due to how they are rendered.
|
|
25
|
+
*/
|
|
26
|
+
id?: string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Provide a function child to manually handle the layout of the FormCheck's inner components.
|
|
29
|
+
*
|
|
30
|
+
* ```jsx
|
|
31
|
+
* <FormCheck>
|
|
32
|
+
* <FormCheck.Input isInvalid type={radio} />
|
|
33
|
+
* <FormCheck.Label>Allow us to contact you?</FormCheck.Label>
|
|
34
|
+
* <Feedback type="invalid">Yo this is required</Feedback>
|
|
35
|
+
* </FormCheck>
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
children?: React.ReactNode | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Groups controls horizontally with other `FormCheck`s.
|
|
41
|
+
*/
|
|
42
|
+
inline?: boolean | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Put your checkboxes, radios, and switches on the opposite side.
|
|
45
|
+
*/
|
|
46
|
+
reverse?: boolean | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* Disables the control.
|
|
49
|
+
*/
|
|
50
|
+
disabled?: boolean | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* `title` attribute for the underlying `FormCheckLabel`.
|
|
53
|
+
*/
|
|
54
|
+
title?: string | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Label for the control.
|
|
57
|
+
*/
|
|
58
|
+
label?: React.ReactNode | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* The type of checkable.
|
|
61
|
+
*/
|
|
62
|
+
type?: FormCheckType | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Manually style the input as valid
|
|
65
|
+
*/
|
|
66
|
+
isValid?: boolean | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Manually style the input as invalid
|
|
69
|
+
*/
|
|
70
|
+
isInvalid?: boolean;
|
|
71
|
+
/**
|
|
72
|
+
* Display feedback as a tooltip.
|
|
73
|
+
*/
|
|
74
|
+
feedbackTooltip?: boolean | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* A message to display when the input is in a validation state
|
|
77
|
+
*/
|
|
78
|
+
feedback?: React.ReactNode | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* Specify whether the feedback is for valid or invalid fields
|
|
81
|
+
*/
|
|
82
|
+
feedbackType?: FeedbackType | undefined;
|
|
83
|
+
}
|
|
84
|
+
declare const _default: DynamicRefForwardingComponent<"input", FormCheckProps> & {
|
|
85
|
+
Input: DynamicRefForwardingComponent<"input", import("./FormCheckInput").FormCheckInputProps>;
|
|
86
|
+
Label: React.ForwardRefExoticComponent<import("./FormCheckLabel").FormCheckLabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
87
|
+
};
|
|
88
|
+
export default _default;
|
package/{esm → lib}/FormCheck.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 Feedback from './Feedback';
|
|
@@ -9,9 +9,7 @@ import FormCheckLabel from './FormCheckLabel';
|
|
|
9
9
|
import FormContext from './FormContext';
|
|
10
10
|
import { useBootstrapPrefix } from './ThemeProvider';
|
|
11
11
|
import { hasChildOfType } from './ElementChildren';
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
13
|
const FormCheck = /*#__PURE__*/React.forwardRef(({
|
|
16
14
|
id,
|
|
17
15
|
bsPrefix,
|
|
@@ -56,7 +54,7 @@ const FormCheck = /*#__PURE__*/React.forwardRef(({
|
|
|
56
54
|
value: innerFormContext,
|
|
57
55
|
children: /*#__PURE__*/_jsx("div", {
|
|
58
56
|
style: style,
|
|
59
|
-
className:
|
|
57
|
+
className: clsx(className, hasLabel && bsPrefix, inline && `${bsPrefix}-inline`, reverse && `${bsPrefix}-reverse`, type === 'switch' && bsSwitchPrefix),
|
|
60
58
|
children: children || /*#__PURE__*/_jsxs(_Fragment, {
|
|
61
59
|
children: [input, hasLabel && /*#__PURE__*/_jsx(FormCheckLabel, {
|
|
62
60
|
title: title,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { DynamicRefForwardingComponent } from '@restart/ui/types';
|
|
3
|
+
type FormCheckInputType = 'checkbox' | 'radio';
|
|
4
|
+
export interface FormCheckInputProps extends React.InputHTMLAttributes<HTMLInputElement> {
|
|
5
|
+
/**
|
|
6
|
+
* Element used to render the component.
|
|
7
|
+
*/
|
|
8
|
+
as?: React.ElementType | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* @default 'form-check-input'
|
|
11
|
+
*/
|
|
12
|
+
bsPrefix?: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* A HTML id attribute, necessary for proper form accessibility.
|
|
15
|
+
*/
|
|
16
|
+
id?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* The type of checkable.
|
|
19
|
+
*/
|
|
20
|
+
type?: FormCheckInputType | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Manually style the input as valid
|
|
23
|
+
*/
|
|
24
|
+
isValid?: boolean | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Manually style the input as invalid
|
|
27
|
+
*/
|
|
28
|
+
isInvalid?: boolean | undefined;
|
|
29
|
+
}
|
|
30
|
+
declare const FormCheckInput: DynamicRefForwardingComponent<'input', FormCheckInputProps>;
|
|
31
|
+
export default FormCheckInput;
|
|
@@ -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 } from 'react';
|
|
6
6
|
import FormContext from './FormContext';
|
|
@@ -26,7 +26,7 @@ const FormCheckInput = /*#__PURE__*/React.forwardRef(({
|
|
|
26
26
|
ref: ref,
|
|
27
27
|
type: type,
|
|
28
28
|
id: id || controlId,
|
|
29
|
-
className:
|
|
29
|
+
className: clsx(className, bsPrefix, isValid && 'is-valid', isInvalid && 'is-invalid')
|
|
30
30
|
});
|
|
31
31
|
});
|
|
32
32
|
FormCheckInput.displayName = 'FormCheckInput';
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
export interface FormCheckLabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
|
|
3
|
+
/**
|
|
4
|
+
* @default 'form-check-label'
|
|
5
|
+
*/
|
|
6
|
+
bsPrefix?: string | undefined;
|
|
7
|
+
/**
|
|
8
|
+
* The HTML for attribute for associating the label with an input
|
|
9
|
+
*/
|
|
10
|
+
htmlFor?: string | undefined;
|
|
4
11
|
}
|
|
5
12
|
declare const FormCheckLabel: React.ForwardRefExoticComponent<FormCheckLabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
6
13
|
export default FormCheckLabel;
|
|
@@ -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 } from 'react';
|
|
6
6
|
import FormContext from './FormContext';
|
|
@@ -20,7 +20,7 @@ const FormCheckLabel = /*#__PURE__*/React.forwardRef(({
|
|
|
20
20
|
...props,
|
|
21
21
|
ref: ref,
|
|
22
22
|
htmlFor: htmlFor || controlId,
|
|
23
|
-
className:
|
|
23
|
+
className: clsx(className, bsPrefix)
|
|
24
24
|
});
|
|
25
25
|
});
|
|
26
26
|
FormCheckLabel.displayName = 'FormCheckLabel';
|