bootstrap-rn 0.4.8 → 0.4.9
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/lib/module/Context.js.map +1 -1
- package/lib/module/Provider.js +4 -16
- package/lib/module/Provider.js.map +1 -1
- package/lib/module/components/Body.js +3 -3
- package/lib/module/components/Body.js.map +1 -1
- package/lib/module/components/Caret.js +4 -4
- package/lib/module/components/Caret.js.map +1 -1
- package/lib/module/components/Heading.js +3 -3
- package/lib/module/components/Heading.js.map +1 -1
- package/lib/module/components/Image.js +3 -3
- package/lib/module/components/Image.js.map +1 -1
- package/lib/module/components/ImageBackground.js +3 -3
- package/lib/module/components/ImageBackground.js.map +1 -1
- package/lib/module/components/Label.js +3 -3
- package/lib/module/components/Label.js.map +1 -1
- package/lib/module/components/Link.js +6 -4
- package/lib/module/components/Link.js.map +1 -1
- package/lib/module/components/Pressable.js +7 -4
- package/lib/module/components/Pressable.js.map +1 -1
- package/lib/module/components/ScrollView.js +3 -3
- package/lib/module/components/ScrollView.js.map +1 -1
- package/lib/module/components/Text.js +3 -3
- package/lib/module/components/Text.js.map +1 -1
- package/lib/module/components/TextInput.js +3 -3
- package/lib/module/components/TextInput.js.map +1 -1
- package/lib/module/components/View.js +3 -3
- package/lib/module/components/View.js.map +1 -1
- package/lib/module/components/alert/Alert.js +5 -5
- package/lib/module/components/alert/Alert.js.map +1 -1
- package/lib/module/components/badge/Badge.js +3 -3
- package/lib/module/components/badge/Badge.js.map +1 -1
- package/lib/module/components/breadcrumb/Breadcrumb.js +3 -3
- package/lib/module/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/lib/module/components/breadcrumb/BreadcrumbItem.js +3 -3
- package/lib/module/components/breadcrumb/BreadcrumbItem.js.map +1 -1
- package/lib/module/components/button-group/ButtonGroup.js +3 -3
- package/lib/module/components/button-group/ButtonGroup.js.map +1 -1
- package/lib/module/components/button-group/ButtonToolbar.js +3 -3
- package/lib/module/components/button-group/ButtonToolbar.js.map +1 -1
- package/lib/module/components/buttons/Button.js +3 -3
- package/lib/module/components/buttons/Button.js.map +1 -1
- package/lib/module/components/card/Card.js +3 -3
- package/lib/module/components/card/Card.js.map +1 -1
- package/lib/module/components/card/CardBody.js +3 -3
- package/lib/module/components/card/CardBody.js.map +1 -1
- package/lib/module/components/card/CardFooter.js +3 -3
- package/lib/module/components/card/CardFooter.js.map +1 -1
- package/lib/module/components/card/CardHeader.js +3 -3
- package/lib/module/components/card/CardHeader.js.map +1 -1
- package/lib/module/components/close/CloseButton.js +3 -3
- package/lib/module/components/close/CloseButton.js.map +1 -1
- package/lib/module/components/collapse/Collapse.js +3 -3
- package/lib/module/components/collapse/Collapse.js.map +1 -1
- package/lib/module/components/containers/Container.js +3 -3
- package/lib/module/components/containers/Container.js.map +1 -1
- package/lib/module/components/dropdown/Dropdown.js +3 -3
- package/lib/module/components/dropdown/Dropdown.js.map +1 -1
- package/lib/module/components/dropdown/DropdownDivider.js +3 -3
- package/lib/module/components/dropdown/DropdownDivider.js.map +1 -1
- package/lib/module/components/dropdown/DropdownHeader.js +3 -3
- package/lib/module/components/dropdown/DropdownHeader.js.map +1 -1
- package/lib/module/components/dropdown/DropdownItemText.js +3 -3
- package/lib/module/components/dropdown/DropdownItemText.js.map +1 -1
- package/lib/module/components/dropdown/DropdownMenu.js +3 -3
- package/lib/module/components/dropdown/DropdownMenu.js.map +1 -1
- package/lib/module/components/forms/Checkbox.js +3 -3
- package/lib/module/components/forms/Checkbox.js.map +1 -1
- package/lib/module/components/forms/Feedback.js +3 -3
- package/lib/module/components/forms/Feedback.js.map +1 -1
- package/lib/module/components/forms/FormCheck.js +3 -3
- package/lib/module/components/forms/FormCheck.js.map +1 -1
- package/lib/module/components/forms/FormCheckInput.js +6 -4
- package/lib/module/components/forms/FormCheckInput.js.map +1 -1
- package/lib/module/components/forms/FormCheckLabel.js +3 -3
- package/lib/module/components/forms/FormCheckLabel.js.map +1 -1
- package/lib/module/components/forms/FormLabel.js +3 -3
- package/lib/module/components/forms/FormLabel.js.map +1 -1
- package/lib/module/components/forms/FormText.js +3 -3
- package/lib/module/components/forms/FormText.js.map +1 -1
- package/lib/module/components/forms/Input.js +6 -4
- package/lib/module/components/forms/Input.js.map +1 -1
- package/lib/module/components/forms/Picker.js +6 -4
- package/lib/module/components/forms/Picker.js.map +1 -1
- package/lib/module/components/forms/PickerItem.js +3 -3
- package/lib/module/components/forms/PickerItem.js.map +1 -1
- package/lib/module/components/forms/Radio.js +3 -3
- package/lib/module/components/forms/Radio.js.map +1 -1
- package/lib/module/components/forms/RadioGroup.js +3 -3
- package/lib/module/components/forms/RadioGroup.js.map +1 -1
- package/lib/module/components/forms/Switch.js +3 -3
- package/lib/module/components/forms/Switch.js.map +1 -1
- package/lib/module/components/forms/internals/FormCheckInputNative.js +4 -4
- package/lib/module/components/forms/internals/FormCheckInputNative.js.map +1 -1
- package/lib/module/components/forms/internals/FormCheckInputWeb.js +7 -6
- package/lib/module/components/forms/internals/FormCheckInputWeb.js.map +1 -1
- package/lib/module/components/forms/internals/PickerNative.js +3 -2
- package/lib/module/components/forms/internals/PickerNative.js.map +1 -1
- package/lib/module/components/forms/internals/PickerNativeItem.js +3 -3
- package/lib/module/components/forms/internals/PickerNativeItem.js.map +1 -1
- package/lib/module/components/forms/internals/PickerWeb.js +4 -3
- package/lib/module/components/forms/internals/PickerWeb.js.map +1 -1
- package/lib/module/components/forms/internals/PickerWebItem.js +3 -3
- package/lib/module/components/forms/internals/PickerWebItem.js.map +1 -1
- package/lib/module/components/grid/Col.js +3 -3
- package/lib/module/components/grid/Col.js.map +1 -1
- package/lib/module/components/grid/Row.js +3 -3
- package/lib/module/components/grid/Row.js.map +1 -1
- package/lib/module/components/helpers/Dialog.web.js +2 -2
- package/lib/module/components/helpers/Dialog.web.js.map +1 -1
- package/lib/module/components/list-group/ListGroup.js +3 -3
- package/lib/module/components/list-group/ListGroup.js.map +1 -1
- package/lib/module/components/list-group/ListGroupItem.js +3 -3
- package/lib/module/components/list-group/ListGroupItem.js.map +1 -1
- package/lib/module/components/list-group/ListGroupItemAction.js +6 -4
- package/lib/module/components/list-group/ListGroupItemAction.js.map +1 -1
- package/lib/module/components/modal/Modal.js +3 -4
- package/lib/module/components/modal/Modal.js.map +1 -1
- package/lib/module/components/modal/ModalBody.js +3 -3
- package/lib/module/components/modal/ModalBody.js.map +1 -1
- package/lib/module/components/modal/ModalFooter.js +3 -3
- package/lib/module/components/modal/ModalFooter.js.map +1 -1
- package/lib/module/components/modal/ModalHeader.js +3 -3
- package/lib/module/components/modal/ModalHeader.js.map +1 -1
- package/lib/module/components/modal/ModalTitle.js +3 -3
- package/lib/module/components/modal/ModalTitle.js.map +1 -1
- package/lib/module/components/nav/Nav.js +3 -3
- package/lib/module/components/nav/Nav.js.map +1 -1
- package/lib/module/components/nav/NavLink.js +6 -4
- package/lib/module/components/nav/NavLink.js.map +1 -1
- package/lib/module/components/nav/TabContent.js +3 -3
- package/lib/module/components/nav/TabContent.js.map +1 -1
- package/lib/module/components/nav/TabPane.js +3 -3
- package/lib/module/components/nav/TabPane.js.map +1 -1
- package/lib/module/components/navbar/Navbar.js +3 -3
- package/lib/module/components/navbar/Navbar.js.map +1 -1
- package/lib/module/components/navbar/NavbarBrand.js +3 -3
- package/lib/module/components/navbar/NavbarBrand.js.map +1 -1
- package/lib/module/components/navbar/NavbarCollapse.js +3 -3
- package/lib/module/components/navbar/NavbarCollapse.js.map +1 -1
- package/lib/module/components/navbar/NavbarText.js +3 -3
- package/lib/module/components/navbar/NavbarText.js.map +1 -1
- package/lib/module/components/navbar/NavbarToggler.js +3 -3
- package/lib/module/components/navbar/NavbarToggler.js.map +1 -1
- package/lib/module/components/offcanvas/Offcanvas.js +3 -3
- package/lib/module/components/offcanvas/Offcanvas.js.map +1 -1
- package/lib/module/components/offcanvas/OffcanvasBody.js +3 -3
- package/lib/module/components/offcanvas/OffcanvasBody.js.map +1 -1
- package/lib/module/components/offcanvas/OffcanvasHeader.js +3 -3
- package/lib/module/components/offcanvas/OffcanvasHeader.js.map +1 -1
- package/lib/module/components/offcanvas/OffcanvasTitle.js +3 -3
- package/lib/module/components/offcanvas/OffcanvasTitle.js.map +1 -1
- package/lib/module/components/pagination/Pagination.js +3 -3
- package/lib/module/components/pagination/Pagination.js.map +1 -1
- package/lib/module/components/pagination/PaginationItem.js +3 -3
- package/lib/module/components/pagination/PaginationItem.js.map +1 -1
- package/lib/module/components/placeholders/Placeholders.js +6 -6
- package/lib/module/components/placeholders/Placeholders.js.map +1 -1
- package/lib/module/components/popover/Popover.js +3 -3
- package/lib/module/components/popover/Popover.js.map +1 -1
- package/lib/module/components/popover/PopoverArrow.js +3 -3
- package/lib/module/components/popover/PopoverArrow.js.map +1 -1
- package/lib/module/components/popover/PopoverBody.js +3 -3
- package/lib/module/components/popover/PopoverBody.js.map +1 -1
- package/lib/module/components/popover/PopoverHeader.js +3 -3
- package/lib/module/components/popover/PopoverHeader.js.map +1 -1
- package/lib/module/components/popover/injectPopover.js +3 -2
- package/lib/module/components/popover/injectPopover.js.map +1 -1
- package/lib/module/components/progress/Progress.js +3 -3
- package/lib/module/components/progress/Progress.js.map +1 -1
- package/lib/module/components/progress/ProgressBar.js +3 -3
- package/lib/module/components/progress/ProgressBar.js.map +1 -1
- package/lib/module/components/spinners/Spinner.js +3 -3
- package/lib/module/components/spinners/Spinner.js.map +1 -1
- package/lib/module/components/toasts/Toast.js +3 -3
- package/lib/module/components/toasts/Toast.js.map +1 -1
- package/lib/module/components/toasts/ToastBody.js +3 -3
- package/lib/module/components/toasts/ToastBody.js.map +1 -1
- package/lib/module/components/toasts/ToastContainer.js +3 -3
- package/lib/module/components/toasts/ToastContainer.js.map +1 -1
- package/lib/module/components/toasts/ToastHeader.js +3 -3
- package/lib/module/components/toasts/ToastHeader.js.map +1 -1
- package/lib/module/components/tooltip/Tooltip.js +3 -3
- package/lib/module/components/tooltip/Tooltip.js.map +1 -1
- package/lib/module/components/tooltip/TooltipArrow.js +3 -3
- package/lib/module/components/tooltip/TooltipArrow.js.map +1 -1
- package/lib/module/components/tooltip/TooltipInner.js +3 -3
- package/lib/module/components/tooltip/TooltipInner.js.map +1 -1
- package/lib/module/components/tooltip/injectTooltip.js +3 -2
- package/lib/module/components/tooltip/injectTooltip.js.map +1 -1
- package/lib/module/components/type/Blockquote.js +3 -3
- package/lib/module/components/type/Blockquote.js.map +1 -1
- package/lib/module/components/type/Code.js +3 -3
- package/lib/module/components/type/Code.js.map +1 -1
- package/lib/module/components/type/DisplayHeading.js +3 -2
- package/lib/module/components/type/DisplayHeading.js.map +1 -1
- package/lib/module/components/type/Paragraph.js +3 -3
- package/lib/module/components/type/Paragraph.js.map +1 -1
- package/lib/module/hooks/useFocusRing.js +1 -1
- package/lib/module/hooks/useScrollbarEffects.js +8 -5
- package/lib/module/hooks/useScrollbarEffects.js.map +1 -1
- package/lib/module/hooks/useScrollbarEffects.web.js +21 -19
- package/lib/module/hooks/useScrollbarEffects.web.js.map +1 -1
- package/lib/module/hooks/useScrollbarOffset.js +10 -0
- package/lib/module/hooks/useScrollbarOffset.js.map +1 -0
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/Context.d.ts +4 -9
- package/lib/typescript/Context.d.ts.map +1 -1
- package/lib/typescript/Provider.d.ts.map +1 -1
- package/lib/typescript/components/Body.d.ts +2 -2
- package/lib/typescript/components/Body.d.ts.map +1 -1
- package/lib/typescript/components/Caret.d.ts +2 -2
- package/lib/typescript/components/Caret.d.ts.map +1 -1
- package/lib/typescript/components/Heading.d.ts +2 -2
- package/lib/typescript/components/Heading.d.ts.map +1 -1
- package/lib/typescript/components/Image.d.ts +1 -1
- package/lib/typescript/components/Image.d.ts.map +1 -1
- package/lib/typescript/components/ImageBackground.d.ts +1 -1
- package/lib/typescript/components/ImageBackground.d.ts.map +1 -1
- package/lib/typescript/components/Label.d.ts +2 -2
- package/lib/typescript/components/Label.d.ts.map +1 -1
- package/lib/typescript/components/Link.d.ts +2 -2
- package/lib/typescript/components/Link.d.ts.map +1 -1
- package/lib/typescript/components/Pressable.d.ts +1 -1
- package/lib/typescript/components/Pressable.d.ts.map +1 -1
- package/lib/typescript/components/ScrollView.d.ts +1 -1
- package/lib/typescript/components/ScrollView.d.ts.map +1 -1
- package/lib/typescript/components/Text.d.ts +1 -1
- package/lib/typescript/components/Text.d.ts.map +1 -1
- package/lib/typescript/components/TextInput.d.ts +1 -1
- package/lib/typescript/components/TextInput.d.ts.map +1 -1
- package/lib/typescript/components/View.d.ts +1 -1
- package/lib/typescript/components/View.d.ts.map +1 -1
- package/lib/typescript/components/alert/Alert.d.ts +2 -2
- package/lib/typescript/components/alert/Alert.d.ts.map +1 -1
- package/lib/typescript/components/badge/Badge.d.ts +2 -2
- package/lib/typescript/components/badge/Badge.d.ts.map +1 -1
- package/lib/typescript/components/breadcrumb/Breadcrumb.d.ts +5 -3
- package/lib/typescript/components/breadcrumb/Breadcrumb.d.ts.map +1 -1
- package/lib/typescript/components/breadcrumb/BreadcrumbItem.d.ts +2 -2
- package/lib/typescript/components/breadcrumb/BreadcrumbItem.d.ts.map +1 -1
- package/lib/typescript/components/button-group/ButtonGroup.d.ts +2 -2
- package/lib/typescript/components/button-group/ButtonGroup.d.ts.map +1 -1
- package/lib/typescript/components/button-group/ButtonToolbar.d.ts +2 -2
- package/lib/typescript/components/button-group/ButtonToolbar.d.ts.map +1 -1
- package/lib/typescript/components/buttons/Button.d.ts +3 -2
- package/lib/typescript/components/buttons/Button.d.ts.map +1 -1
- package/lib/typescript/components/card/Card.d.ts +9 -5
- package/lib/typescript/components/card/Card.d.ts.map +1 -1
- package/lib/typescript/components/card/CardBody.d.ts +2 -2
- package/lib/typescript/components/card/CardBody.d.ts.map +1 -1
- package/lib/typescript/components/card/CardFooter.d.ts +2 -2
- package/lib/typescript/components/card/CardFooter.d.ts.map +1 -1
- package/lib/typescript/components/card/CardHeader.d.ts +2 -2
- package/lib/typescript/components/card/CardHeader.d.ts.map +1 -1
- package/lib/typescript/components/close/CloseButton.d.ts +2 -2
- package/lib/typescript/components/close/CloseButton.d.ts.map +1 -1
- package/lib/typescript/components/collapse/Collapse.d.ts +3 -2
- package/lib/typescript/components/collapse/Collapse.d.ts.map +1 -1
- package/lib/typescript/components/containers/Container.d.ts +2 -2
- package/lib/typescript/components/containers/Container.d.ts.map +1 -1
- package/lib/typescript/components/dropdown/Dropdown.d.ts +11 -6
- package/lib/typescript/components/dropdown/Dropdown.d.ts.map +1 -1
- package/lib/typescript/components/dropdown/DropdownDivider.d.ts +2 -2
- package/lib/typescript/components/dropdown/DropdownDivider.d.ts.map +1 -1
- package/lib/typescript/components/dropdown/DropdownHeader.d.ts +2 -2
- package/lib/typescript/components/dropdown/DropdownHeader.d.ts.map +1 -1
- package/lib/typescript/components/dropdown/DropdownItemText.d.ts +2 -2
- package/lib/typescript/components/dropdown/DropdownItemText.d.ts.map +1 -1
- package/lib/typescript/components/dropdown/DropdownMenu.d.ts +2 -2
- package/lib/typescript/components/dropdown/DropdownMenu.d.ts.map +1 -1
- package/lib/typescript/components/dropdown/useToggleDropdown.d.ts +2 -2
- package/lib/typescript/components/dropdown/useToggleDropdown.d.ts.map +1 -1
- package/lib/typescript/components/forms/Checkbox.d.ts +2 -1
- package/lib/typescript/components/forms/Checkbox.d.ts.map +1 -1
- package/lib/typescript/components/forms/Feedback.d.ts +2 -2
- package/lib/typescript/components/forms/Feedback.d.ts.map +1 -1
- package/lib/typescript/components/forms/FormCheck.d.ts +5 -3
- package/lib/typescript/components/forms/FormCheck.d.ts.map +1 -1
- package/lib/typescript/components/forms/FormCheckInput.d.ts +2 -1
- package/lib/typescript/components/forms/FormCheckInput.d.ts.map +1 -1
- package/lib/typescript/components/forms/FormCheckLabel.d.ts +2 -1
- package/lib/typescript/components/forms/FormCheckLabel.d.ts.map +1 -1
- package/lib/typescript/components/forms/FormLabel.d.ts +2 -1
- package/lib/typescript/components/forms/FormLabel.d.ts.map +1 -1
- package/lib/typescript/components/forms/FormText.d.ts +2 -2
- package/lib/typescript/components/forms/FormText.d.ts.map +1 -1
- package/lib/typescript/components/forms/Input.d.ts +2 -2
- package/lib/typescript/components/forms/Input.d.ts.map +1 -1
- package/lib/typescript/components/forms/Picker.d.ts +5 -4
- package/lib/typescript/components/forms/Picker.d.ts.map +1 -1
- package/lib/typescript/components/forms/PickerItem.d.ts +2 -2
- package/lib/typescript/components/forms/PickerItem.d.ts.map +1 -1
- package/lib/typescript/components/forms/Radio.d.ts +5 -2
- package/lib/typescript/components/forms/Radio.d.ts.map +1 -1
- package/lib/typescript/components/forms/RadioGroup.d.ts +2 -2
- package/lib/typescript/components/forms/RadioGroup.d.ts.map +1 -1
- package/lib/typescript/components/forms/Switch.d.ts +2 -1
- package/lib/typescript/components/forms/Switch.d.ts.map +1 -1
- package/lib/typescript/components/forms/internals/FormCheckInputNative.d.ts +2 -1
- package/lib/typescript/components/forms/internals/FormCheckInputNative.d.ts.map +1 -1
- package/lib/typescript/components/forms/internals/FormCheckInputWeb.d.ts +2 -1
- package/lib/typescript/components/forms/internals/FormCheckInputWeb.d.ts.map +1 -1
- package/lib/typescript/components/forms/internals/PickerNative.d.ts +2 -1
- package/lib/typescript/components/forms/internals/PickerNative.d.ts.map +1 -1
- package/lib/typescript/components/forms/internals/PickerNativeItem.d.ts +2 -2
- package/lib/typescript/components/forms/internals/PickerNativeItem.d.ts.map +1 -1
- package/lib/typescript/components/forms/internals/PickerWeb.d.ts +2 -1
- package/lib/typescript/components/forms/internals/PickerWeb.d.ts.map +1 -1
- package/lib/typescript/components/forms/internals/PickerWebItem.d.ts +2 -2
- package/lib/typescript/components/forms/internals/PickerWebItem.d.ts.map +1 -1
- package/lib/typescript/components/grid/Col.d.ts +2 -2
- package/lib/typescript/components/grid/Col.d.ts.map +1 -1
- package/lib/typescript/components/grid/Row.d.ts +2 -2
- package/lib/typescript/components/grid/Row.d.ts.map +1 -1
- package/lib/typescript/components/list-group/ListGroup.d.ts +7 -4
- package/lib/typescript/components/list-group/ListGroup.d.ts.map +1 -1
- package/lib/typescript/components/list-group/ListGroupItem.d.ts +2 -2
- package/lib/typescript/components/list-group/ListGroupItem.d.ts.map +1 -1
- package/lib/typescript/components/list-group/ListGroupItemAction.d.ts +2 -2
- package/lib/typescript/components/list-group/ListGroupItemAction.d.ts.map +1 -1
- package/lib/typescript/components/modal/Modal.d.ts +13 -7
- package/lib/typescript/components/modal/Modal.d.ts.map +1 -1
- package/lib/typescript/components/modal/ModalBody.d.ts +3 -2
- package/lib/typescript/components/modal/ModalBody.d.ts.map +1 -1
- package/lib/typescript/components/modal/ModalFooter.d.ts +2 -2
- package/lib/typescript/components/modal/ModalFooter.d.ts.map +1 -1
- package/lib/typescript/components/modal/ModalHeader.d.ts +2 -2
- package/lib/typescript/components/modal/ModalHeader.d.ts.map +1 -1
- package/lib/typescript/components/modal/ModalTitle.d.ts +2 -2
- package/lib/typescript/components/modal/ModalTitle.d.ts.map +1 -1
- package/lib/typescript/components/nav/Nav.d.ts +5 -3
- package/lib/typescript/components/nav/Nav.d.ts.map +1 -1
- package/lib/typescript/components/nav/NavLink.d.ts +2 -2
- package/lib/typescript/components/nav/NavLink.d.ts.map +1 -1
- package/lib/typescript/components/nav/Tab.d.ts +4 -2
- package/lib/typescript/components/nav/Tab.d.ts.map +1 -1
- package/lib/typescript/components/nav/TabContent.d.ts +2 -2
- package/lib/typescript/components/nav/TabContent.d.ts.map +1 -1
- package/lib/typescript/components/nav/TabPane.d.ts +2 -2
- package/lib/typescript/components/nav/TabPane.d.ts.map +1 -1
- package/lib/typescript/components/navbar/Navbar.d.ts +11 -6
- package/lib/typescript/components/navbar/Navbar.d.ts.map +1 -1
- package/lib/typescript/components/navbar/NavbarBrand.d.ts +2 -2
- package/lib/typescript/components/navbar/NavbarBrand.d.ts.map +1 -1
- package/lib/typescript/components/navbar/NavbarCollapse.d.ts +2 -2
- package/lib/typescript/components/navbar/NavbarCollapse.d.ts.map +1 -1
- package/lib/typescript/components/navbar/NavbarText.d.ts +2 -2
- package/lib/typescript/components/navbar/NavbarText.d.ts.map +1 -1
- package/lib/typescript/components/navbar/NavbarToggler.d.ts +2 -1
- package/lib/typescript/components/navbar/NavbarToggler.d.ts.map +1 -1
- package/lib/typescript/components/offcanvas/Offcanvas.d.ts +10 -6
- package/lib/typescript/components/offcanvas/Offcanvas.d.ts.map +1 -1
- package/lib/typescript/components/offcanvas/OffcanvasBody.d.ts +2 -2
- package/lib/typescript/components/offcanvas/OffcanvasBody.d.ts.map +1 -1
- package/lib/typescript/components/offcanvas/OffcanvasHeader.d.ts +2 -2
- package/lib/typescript/components/offcanvas/OffcanvasHeader.d.ts.map +1 -1
- package/lib/typescript/components/offcanvas/OffcanvasTitle.d.ts +2 -2
- package/lib/typescript/components/offcanvas/OffcanvasTitle.d.ts.map +1 -1
- package/lib/typescript/components/pagination/Pagination.d.ts +5 -3
- package/lib/typescript/components/pagination/Pagination.d.ts.map +1 -1
- package/lib/typescript/components/pagination/PaginationItem.d.ts +2 -2
- package/lib/typescript/components/pagination/PaginationItem.d.ts.map +1 -1
- package/lib/typescript/components/placeholders/Placeholders.d.ts +2 -2
- package/lib/typescript/components/placeholders/Placeholders.d.ts.map +1 -1
- package/lib/typescript/components/popover/Popover.d.ts +9 -5
- package/lib/typescript/components/popover/Popover.d.ts.map +1 -1
- package/lib/typescript/components/popover/PopoverArrow.d.ts +2 -2
- package/lib/typescript/components/popover/PopoverArrow.d.ts.map +1 -1
- package/lib/typescript/components/popover/PopoverBody.d.ts +2 -2
- package/lib/typescript/components/popover/PopoverBody.d.ts.map +1 -1
- package/lib/typescript/components/popover/PopoverHeader.d.ts +2 -2
- package/lib/typescript/components/popover/PopoverHeader.d.ts.map +1 -1
- package/lib/typescript/components/popover/injectPopover.d.ts +5 -1
- package/lib/typescript/components/popover/injectPopover.d.ts.map +1 -1
- package/lib/typescript/components/progress/Progress.d.ts +5 -3
- package/lib/typescript/components/progress/Progress.d.ts.map +1 -1
- package/lib/typescript/components/progress/ProgressBar.d.ts +2 -2
- package/lib/typescript/components/progress/ProgressBar.d.ts.map +1 -1
- package/lib/typescript/components/spinners/Spinner.d.ts +2 -2
- package/lib/typescript/components/spinners/Spinner.d.ts.map +1 -1
- package/lib/typescript/components/toasts/Toast.d.ts +7 -4
- package/lib/typescript/components/toasts/Toast.d.ts.map +1 -1
- package/lib/typescript/components/toasts/ToastBody.d.ts +2 -2
- package/lib/typescript/components/toasts/ToastBody.d.ts.map +1 -1
- package/lib/typescript/components/toasts/ToastContainer.d.ts +3 -2
- package/lib/typescript/components/toasts/ToastContainer.d.ts.map +1 -1
- package/lib/typescript/components/toasts/ToastHeader.d.ts +2 -2
- package/lib/typescript/components/toasts/ToastHeader.d.ts.map +1 -1
- package/lib/typescript/components/tooltip/Tooltip.d.ts +7 -4
- package/lib/typescript/components/tooltip/Tooltip.d.ts.map +1 -1
- package/lib/typescript/components/tooltip/TooltipArrow.d.ts +2 -2
- package/lib/typescript/components/tooltip/TooltipArrow.d.ts.map +1 -1
- package/lib/typescript/components/tooltip/TooltipInner.d.ts +2 -2
- package/lib/typescript/components/tooltip/TooltipInner.d.ts.map +1 -1
- package/lib/typescript/components/tooltip/injectTooltip.d.ts +5 -1
- package/lib/typescript/components/tooltip/injectTooltip.d.ts.map +1 -1
- package/lib/typescript/components/type/Blockquote.d.ts +2 -2
- package/lib/typescript/components/type/Blockquote.d.ts.map +1 -1
- package/lib/typescript/components/type/Code.d.ts +2 -2
- package/lib/typescript/components/type/Code.d.ts.map +1 -1
- package/lib/typescript/components/type/DisplayHeading.d.ts +5 -2
- package/lib/typescript/components/type/DisplayHeading.d.ts.map +1 -1
- package/lib/typescript/components/type/Paragraph.d.ts +2 -2
- package/lib/typescript/components/type/Paragraph.d.ts.map +1 -1
- package/lib/typescript/hooks/useScrollbarEffects.d.ts +3 -3
- package/lib/typescript/hooks/useScrollbarEffects.d.ts.map +1 -1
- package/lib/typescript/hooks/useScrollbarEffects.web.d.ts +3 -3
- package/lib/typescript/hooks/useScrollbarEffects.web.d.ts.map +1 -1
- package/lib/typescript/hooks/useScrollbarOffset.d.ts +2 -0
- package/lib/typescript/hooks/useScrollbarOffset.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +3 -3
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/utils.d.ts +1 -1
- package/lib/typescript/utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/Context.ts +4 -7
- package/src/Provider.tsx +4 -21
- package/src/components/Body.tsx +66 -68
- package/src/components/Caret.tsx +109 -111
- package/src/components/Heading.tsx +47 -49
- package/src/components/Image.tsx +3 -5
- package/src/components/ImageBackground.tsx +9 -10
- package/src/components/Label.tsx +32 -34
- package/src/components/Link.tsx +104 -101
- package/src/components/Pressable.tsx +167 -167
- package/src/components/ScrollView.tsx +76 -75
- package/src/components/Text.tsx +3 -4
- package/src/components/TextInput.tsx +36 -39
- package/src/components/View.tsx +3 -5
- package/src/components/alert/Alert.tsx +79 -80
- package/src/components/badge/Badge.tsx +41 -43
- package/src/components/breadcrumb/Breadcrumb.tsx +54 -56
- package/src/components/breadcrumb/BreadcrumbItem.tsx +80 -81
- package/src/components/button-group/ButtonGroup.tsx +42 -46
- package/src/components/button-group/ButtonToolbar.tsx +32 -34
- package/src/components/buttons/Button.tsx +3 -4
- package/src/components/card/Card.tsx +44 -46
- package/src/components/card/CardBody.tsx +38 -40
- package/src/components/card/CardFooter.tsx +42 -44
- package/src/components/card/CardHeader.tsx +43 -45
- package/src/components/close/CloseButton.tsx +53 -54
- package/src/components/collapse/Collapse.tsx +29 -31
- package/src/components/containers/Container.tsx +116 -118
- package/src/components/dropdown/Dropdown.tsx +3 -4
- package/src/components/dropdown/DropdownDivider.tsx +30 -32
- package/src/components/dropdown/DropdownHeader.tsx +40 -42
- package/src/components/dropdown/DropdownItemText.tsx +35 -37
- package/src/components/dropdown/DropdownMenu.tsx +109 -112
- package/src/components/dropdown/useToggleDropdown.ts +1 -1
- package/src/components/forms/Checkbox.tsx +13 -15
- package/src/components/forms/Feedback.tsx +38 -40
- package/src/components/forms/FormCheck.tsx +68 -69
- package/src/components/forms/FormCheckInput.tsx +78 -81
- package/src/components/forms/FormCheckLabel.tsx +69 -71
- package/src/components/forms/FormLabel.tsx +41 -43
- package/src/components/forms/FormText.tsx +36 -38
- package/src/components/forms/Input.tsx +10 -5
- package/src/components/forms/Picker.tsx +10 -5
- package/src/components/forms/PickerItem.tsx +3 -5
- package/src/components/forms/Radio.tsx +7 -7
- package/src/components/forms/RadioGroup.tsx +3 -4
- package/src/components/forms/Switch.tsx +13 -15
- package/src/components/forms/internals/FormCheckInputNative.tsx +49 -51
- package/src/components/forms/internals/FormCheckInputWeb.tsx +11 -11
- package/src/components/forms/internals/PickerNative.tsx +84 -84
- package/src/components/forms/internals/PickerNativeItem.tsx +29 -31
- package/src/components/forms/internals/PickerWeb.tsx +4 -3
- package/src/components/forms/internals/PickerWebItem.tsx +15 -17
- package/src/components/grid/Col.tsx +96 -97
- package/src/components/grid/Row.tsx +32 -34
- package/src/components/helpers/Dialog.web.tsx +2 -2
- package/src/components/list-group/ListGroup.tsx +75 -77
- package/src/components/list-group/ListGroupItem.tsx +150 -151
- package/src/components/list-group/ListGroupItemAction.tsx +194 -193
- package/src/components/modal/Modal.tsx +91 -96
- package/src/components/modal/ModalBody.tsx +26 -27
- package/src/components/modal/ModalFooter.tsx +38 -42
- package/src/components/modal/ModalHeader.tsx +37 -41
- package/src/components/modal/ModalTitle.tsx +3 -5
- package/src/components/nav/Nav.tsx +104 -106
- package/src/components/nav/NavLink.tsx +272 -267
- package/src/components/nav/TabContent.tsx +12 -14
- package/src/components/nav/TabPane.tsx +50 -52
- package/src/components/navbar/Navbar.tsx +89 -90
- package/src/components/navbar/NavbarBrand.tsx +78 -80
- package/src/components/navbar/NavbarCollapse.tsx +61 -63
- package/src/components/navbar/NavbarText.tsx +43 -45
- package/src/components/navbar/NavbarToggler.tsx +34 -36
- package/src/components/offcanvas/Offcanvas.tsx +4 -5
- package/src/components/offcanvas/OffcanvasBody.tsx +28 -29
- package/src/components/offcanvas/OffcanvasHeader.tsx +53 -55
- package/src/components/offcanvas/OffcanvasTitle.tsx +21 -23
- package/src/components/pagination/Pagination.tsx +37 -39
- package/src/components/pagination/PaginationItem.tsx +42 -43
- package/src/components/placeholders/Placeholders.tsx +30 -34
- package/src/components/popover/Popover.tsx +3 -4
- package/src/components/popover/PopoverArrow.tsx +25 -29
- package/src/components/popover/PopoverBody.tsx +37 -41
- package/src/components/popover/PopoverHeader.tsx +46 -48
- package/src/components/popover/injectPopover.tsx +69 -68
- package/src/components/progress/Progress.tsx +64 -65
- package/src/components/progress/ProgressBar.tsx +62 -70
- package/src/components/spinners/Spinner.tsx +161 -156
- package/src/components/toasts/Toast.tsx +65 -67
- package/src/components/toasts/ToastBody.tsx +39 -41
- package/src/components/toasts/ToastContainer.tsx +17 -19
- package/src/components/toasts/ToastHeader.tsx +55 -59
- package/src/components/tooltip/Tooltip.tsx +3 -4
- package/src/components/tooltip/TooltipArrow.tsx +21 -25
- package/src/components/tooltip/TooltipInner.tsx +37 -41
- package/src/components/tooltip/injectTooltip.tsx +67 -66
- package/src/components/type/Blockquote.tsx +43 -45
- package/src/components/type/Code.tsx +37 -39
- package/src/components/type/DisplayHeading.tsx +38 -38
- package/src/components/type/Paragraph.tsx +40 -42
- package/src/hooks/useFocusRing.ts +1 -1
- package/src/hooks/useScrollbarEffects.ts +8 -7
- package/src/hooks/useScrollbarEffects.web.ts +26 -30
- package/src/hooks/useScrollbarOffset.ts +12 -0
- package/src/index.ts +3 -3
- package/src/utils.ts +1 -1
- package/lib/module/hooks/useFixedElement.js +0 -17
- package/lib/module/hooks/useFixedElement.js.map +0 -1
- package/lib/typescript/hooks/useFixedElement.d.ts +0 -2
- package/lib/typescript/hooks/useFixedElement.d.ts.map +0 -1
- package/src/hooks/useFixedElement.ts +0 -18
|
@@ -1,193 +1,194 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Platform } from 'react-native';
|
|
3
|
-
import StyleSheet from '../../style/StyleSheet';
|
|
4
|
-
import css from '../../style/css';
|
|
5
|
-
import Pressable, { PressableRef, PressableProps } from '../Pressable';
|
|
6
|
-
import { getStyles, each } from '../../utils';
|
|
7
|
-
import { THEME_COLORS } from '../../theme/proxies';
|
|
8
|
-
import { shiftColor, shadeColor } from '../../theme/functions';
|
|
9
|
-
import useModifier from '../../hooks/useModifier';
|
|
10
|
-
import useForcedContext from '../../hooks/useForcedContext';
|
|
11
|
-
import { styles as baseStyles } from './ListGroupItem';
|
|
12
|
-
import ListContext from '../helpers/ListContext';
|
|
13
|
-
import ListGroupContext from './ListGroupContext';
|
|
14
|
-
import type { ThemeVariables, UseTabbableProps } from '../../types';
|
|
15
|
-
|
|
16
|
-
export interface ListGroupItemActionProps
|
|
17
|
-
extends UseTabbableProps,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
!first &&
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
{
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Platform } from 'react-native';
|
|
3
|
+
import StyleSheet from '../../style/StyleSheet';
|
|
4
|
+
import css from '../../style/css';
|
|
5
|
+
import Pressable, { PressableRef, PressableProps } from '../Pressable';
|
|
6
|
+
import { getStyles, each } from '../../utils';
|
|
7
|
+
import { THEME_COLORS } from '../../theme/proxies';
|
|
8
|
+
import { shiftColor, shadeColor } from '../../theme/functions';
|
|
9
|
+
import useModifier from '../../hooks/useModifier';
|
|
10
|
+
import useForcedContext from '../../hooks/useForcedContext';
|
|
11
|
+
import { styles as baseStyles } from './ListGroupItem';
|
|
12
|
+
import ListContext from '../helpers/ListContext';
|
|
13
|
+
import ListGroupContext from './ListGroupContext';
|
|
14
|
+
import type { ThemeVariables, UseTabbableProps } from '../../types';
|
|
15
|
+
|
|
16
|
+
export interface ListGroupItemActionProps
|
|
17
|
+
extends UseTabbableProps, PressableProps {
|
|
18
|
+
color?: keyof typeof THEME_COLORS;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const actionStyles = StyleSheet.create({
|
|
22
|
+
'.list-group-item-action': css`
|
|
23
|
+
width: 100%; // For "<button>"s (anchors become 100% by default though)
|
|
24
|
+
|
|
25
|
+
// Hover state
|
|
26
|
+
&:hover {
|
|
27
|
+
z-index: 1; // Place hover/focus items above their siblings for proper border styling
|
|
28
|
+
background-color: $list-group-hover-bg;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:focus {
|
|
32
|
+
z-index: 1; // Place hover/focus items above their siblings for proper border styling
|
|
33
|
+
background-color: $list-group-hover-bg;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:active {
|
|
37
|
+
background-color: $list-group-action-active-bg;
|
|
38
|
+
}
|
|
39
|
+
`,
|
|
40
|
+
'.list-group-item-action --text': css`
|
|
41
|
+
color: $list-group-action-color;
|
|
42
|
+
// text-align: inherit; // For "<button>"s (anchors inherit)
|
|
43
|
+
|
|
44
|
+
// Hover state
|
|
45
|
+
&:hover {
|
|
46
|
+
color: $list-group-action-hover-color;
|
|
47
|
+
text-decoration: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:focus {
|
|
51
|
+
color: $list-group-action-hover-color;
|
|
52
|
+
text-decoration: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:active {
|
|
56
|
+
color: $list-group-action-active-color;
|
|
57
|
+
}
|
|
58
|
+
`,
|
|
59
|
+
...each(THEME_COLORS, (state, value) => ({
|
|
60
|
+
[`.list-group-item-${state}-action`]: css`
|
|
61
|
+
&:hover {
|
|
62
|
+
background-color: ${shadeColor(
|
|
63
|
+
shiftColor(
|
|
64
|
+
value,
|
|
65
|
+
(t: ThemeVariables) => t['list-group-item-bg-scale'],
|
|
66
|
+
),
|
|
67
|
+
0.1,
|
|
68
|
+
)};
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:focus {
|
|
72
|
+
background-color: ${shadeColor(
|
|
73
|
+
shiftColor(
|
|
74
|
+
value,
|
|
75
|
+
(t: ThemeVariables) => t['list-group-item-bg-scale'],
|
|
76
|
+
),
|
|
77
|
+
0.1,
|
|
78
|
+
)};
|
|
79
|
+
}
|
|
80
|
+
`,
|
|
81
|
+
[`.list-group-item-${state}-action --text`]: css`
|
|
82
|
+
&:hover {
|
|
83
|
+
color: ${shiftColor(
|
|
84
|
+
value,
|
|
85
|
+
(t: ThemeVariables) => t['list-group-item-color-scale'],
|
|
86
|
+
)};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&:focus {
|
|
90
|
+
color: ${shiftColor(
|
|
91
|
+
value,
|
|
92
|
+
(t: ThemeVariables) => t['list-group-item-color-scale'],
|
|
93
|
+
)};
|
|
94
|
+
}
|
|
95
|
+
`,
|
|
96
|
+
[`.list-group-item-${state}-action.active`]: css`
|
|
97
|
+
background-color: ${shiftColor(
|
|
98
|
+
value,
|
|
99
|
+
(t: ThemeVariables) => t['list-group-item-color-scale'],
|
|
100
|
+
)};
|
|
101
|
+
border-color: ${shiftColor(
|
|
102
|
+
value,
|
|
103
|
+
(t: ThemeVariables) => t['list-group-item-color-scale'],
|
|
104
|
+
)};
|
|
105
|
+
`,
|
|
106
|
+
[`.list-group-item-${state}-action.active --text`]: css`
|
|
107
|
+
color: $white;
|
|
108
|
+
`,
|
|
109
|
+
})),
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
function ListGroupItemAction({
|
|
113
|
+
ref,
|
|
114
|
+
...props
|
|
115
|
+
}: ListGroupItemActionProps & React.RefAttributes<PressableRef>) {
|
|
116
|
+
const [modifierProps, modifierRef] = useModifier(
|
|
117
|
+
'useTabbable',
|
|
118
|
+
props,
|
|
119
|
+
ref ?? null,
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
const {
|
|
123
|
+
children,
|
|
124
|
+
color,
|
|
125
|
+
active = false,
|
|
126
|
+
disabled = false,
|
|
127
|
+
style,
|
|
128
|
+
activeStyle,
|
|
129
|
+
textStyle,
|
|
130
|
+
activeTextStyle,
|
|
131
|
+
...elementProps
|
|
132
|
+
} = modifierProps;
|
|
133
|
+
|
|
134
|
+
const { first, last } = useForcedContext(ListContext);
|
|
135
|
+
const { flush } = useForcedContext(ListGroupContext);
|
|
136
|
+
|
|
137
|
+
const styles = { ...baseStyles, ...actionStyles };
|
|
138
|
+
|
|
139
|
+
const classes = getStyles(styles, [
|
|
140
|
+
'.list-group-item',
|
|
141
|
+
'.list-group-item-action',
|
|
142
|
+
first && '.list-group-item:first-child',
|
|
143
|
+
last && '.list-group-item:last-child',
|
|
144
|
+
disabled && '.list-group-item.disabled',
|
|
145
|
+
!first && '.list-group-item + .list-group-item',
|
|
146
|
+
!first && active && '.list-group-item + .list-group-item.active',
|
|
147
|
+
flush && '.list-group-item-flush',
|
|
148
|
+
flush && last && '.list-group-item-flush:last-child',
|
|
149
|
+
!first &&
|
|
150
|
+
flush &&
|
|
151
|
+
active &&
|
|
152
|
+
'.list-group-item-flush + .list-group-item-flush.active',
|
|
153
|
+
color && `.list-group-item-${color}`,
|
|
154
|
+
color && `.list-group-item-${color}-action`,
|
|
155
|
+
]);
|
|
156
|
+
|
|
157
|
+
const activeClasses = getStyles(styles, [
|
|
158
|
+
'.list-group-item.active',
|
|
159
|
+
color && `.list-group-item-${color}-action.active`,
|
|
160
|
+
]);
|
|
161
|
+
|
|
162
|
+
const textClasses = getStyles(styles, [
|
|
163
|
+
'.list-group-item --text',
|
|
164
|
+
'.list-group-item-action --text',
|
|
165
|
+
disabled && '.list-group-item.disabled --text',
|
|
166
|
+
color && `.list-group-item-${color} --text`,
|
|
167
|
+
color && `.list-group-item-${color}-action --text`,
|
|
168
|
+
]);
|
|
169
|
+
|
|
170
|
+
const activeTextClasses = getStyles(styles, [
|
|
171
|
+
'.list-group-item.active --text',
|
|
172
|
+
color && `.list-group-item-${color}-action.active --text`,
|
|
173
|
+
]);
|
|
174
|
+
|
|
175
|
+
const role = Platform.OS === 'web' ? 'listitem' : undefined;
|
|
176
|
+
|
|
177
|
+
return (
|
|
178
|
+
<Pressable
|
|
179
|
+
{...elementProps}
|
|
180
|
+
ref={modifierRef}
|
|
181
|
+
role={role}
|
|
182
|
+
active={active}
|
|
183
|
+
disabled={disabled}
|
|
184
|
+
style={[...classes, style]}
|
|
185
|
+
activeStyle={[...activeClasses, activeStyle]}
|
|
186
|
+
textStyle={[...textClasses, textStyle]}
|
|
187
|
+
activeTextStyle={[...activeTextClasses, activeTextStyle]}
|
|
188
|
+
>
|
|
189
|
+
{children}
|
|
190
|
+
</Pressable>
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export default ListGroupItemAction;
|
|
@@ -21,7 +21,7 @@ export interface ModalProps extends ScrollViewProps {
|
|
|
21
21
|
backdrop?: boolean | 'static';
|
|
22
22
|
scrollable?: boolean;
|
|
23
23
|
centered?: boolean;
|
|
24
|
-
onClose
|
|
24
|
+
onClose?: () => void;
|
|
25
25
|
dialogStyle?: StyleProp<ExtendedViewStyle>;
|
|
26
26
|
contentStyle?: StyleProp<ExtendedViewStyle>;
|
|
27
27
|
dialogTextStyle?: StyleProp<ExtendedTextStyle>;
|
|
@@ -146,105 +146,100 @@ const styles = StyleSheet.create({
|
|
|
146
146
|
`,
|
|
147
147
|
});
|
|
148
148
|
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
149
|
+
function Modal(
|
|
150
|
+
props: ModalProps & React.RefAttributes<ViewRef | ScrollViewRef>,
|
|
151
|
+
) {
|
|
152
|
+
const {
|
|
153
|
+
ref,
|
|
154
|
+
children,
|
|
155
|
+
visible,
|
|
156
|
+
size,
|
|
157
|
+
backdrop = true,
|
|
158
|
+
scrollable = false,
|
|
159
|
+
centered = false,
|
|
160
|
+
onClose: handleClose,
|
|
161
|
+
style,
|
|
162
|
+
contentContainerStyle,
|
|
163
|
+
dialogStyle,
|
|
164
|
+
contentStyle,
|
|
165
|
+
textStyle,
|
|
166
|
+
dialogTextStyle,
|
|
167
|
+
contentTextStyle,
|
|
168
|
+
...elementProps
|
|
169
|
+
} = props;
|
|
170
|
+
|
|
171
|
+
const modalRef = useRef<ViewRef>(null);
|
|
172
|
+
|
|
173
|
+
const insets = useSafeAreaInsets();
|
|
174
|
+
|
|
175
|
+
const modal = useModal(scrollable);
|
|
176
|
+
|
|
177
|
+
const backdropClasses = getStyles(styles, ['.modal-backdrop']);
|
|
178
|
+
const classes = getStyles(styles, ['.modal']);
|
|
179
|
+
const dialogClasses = getStyles(styles, [
|
|
180
|
+
'.modal-dialog',
|
|
181
|
+
size === 'sm' && '.modal-sm',
|
|
182
|
+
size === 'lg' && '.modal-lg',
|
|
183
|
+
size === 'xl' && '.modal-xl',
|
|
184
|
+
scrollable && '.modal-dialog-scrollable',
|
|
185
|
+
centered && '.modal-dialog-centered',
|
|
186
|
+
]);
|
|
187
|
+
const contentClasses = getStyles(styles, [
|
|
188
|
+
'.modal-content',
|
|
189
|
+
scrollable && '.modal-dialog-scrollable .modal-content',
|
|
190
|
+
]);
|
|
191
|
+
const contentTextClasses = getStyles(styles, ['.modal-content --text']);
|
|
192
|
+
|
|
193
|
+
// If scrollable we use a ScrollView in ModalBody, so we can use a View here.
|
|
194
|
+
const FlexView = scrollable ? View : ScrollView;
|
|
195
|
+
|
|
196
|
+
const centeredStyle = centered && {
|
|
197
|
+
justifyContent: 'center' as JustifyContentValue,
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
if (!visible) {
|
|
201
|
+
return null;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
return (
|
|
205
|
+
<Dialog
|
|
206
|
+
id={modal.identifier}
|
|
207
|
+
dialogRef={modalRef}
|
|
208
|
+
backgroundRef={modalRef}
|
|
209
|
+
onClose={handleClose}
|
|
210
|
+
backdrop={backdrop}
|
|
211
|
+
backdropElement={<View style={backdropClasses} />}
|
|
212
|
+
>
|
|
213
|
+
<FlexView
|
|
214
|
+
{...elementProps}
|
|
215
|
+
ref={concatRefs(ref, modalRef)}
|
|
216
|
+
role="dialog"
|
|
217
|
+
aria-modal
|
|
218
|
+
aria-labelledby={`${modal.identifier}-title`}
|
|
219
|
+
tabIndex={-1}
|
|
220
|
+
style={[classes, insets, scrollable && centeredStyle, style]}
|
|
221
|
+
textStyle={textStyle}
|
|
222
|
+
contentContainerStyle={
|
|
223
|
+
scrollable
|
|
224
|
+
? undefined
|
|
225
|
+
: [{ flexGrow: 1 }, centeredStyle, contentContainerStyle]
|
|
226
|
+
}
|
|
210
227
|
>
|
|
211
|
-
<
|
|
212
|
-
|
|
213
|
-
// @ts-expect-error Type of ref depends on component.
|
|
214
|
-
ref={concatRefs(ref, modalRef)}
|
|
215
|
-
role="dialog"
|
|
216
|
-
aria-modal
|
|
217
|
-
aria-labelledby={`${modal.identifier}-title`}
|
|
218
|
-
tabIndex={-1}
|
|
219
|
-
style={[classes, insets, scrollable && centeredStyle, style]}
|
|
220
|
-
textStyle={textStyle}
|
|
221
|
-
contentContainerStyle={
|
|
222
|
-
scrollable
|
|
223
|
-
? undefined
|
|
224
|
-
: [{ flexGrow: 1 }, centeredStyle, contentContainerStyle]
|
|
225
|
-
}
|
|
226
|
-
>
|
|
227
|
-
<BackdropHandler onClose={handleClose} backdrop={backdrop} />
|
|
228
|
+
<BackdropHandler onClose={handleClose} backdrop={backdrop} />
|
|
229
|
+
<View style={[dialogClasses, dialogStyle]} textStyle={dialogTextStyle}>
|
|
228
230
|
<View
|
|
229
|
-
style={[
|
|
230
|
-
textStyle={
|
|
231
|
+
style={[contentClasses, contentStyle]}
|
|
232
|
+
textStyle={[contentTextClasses, contentTextStyle]}
|
|
231
233
|
>
|
|
232
|
-
<
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
>
|
|
236
|
-
<ModalContext.Provider value={modal}>
|
|
237
|
-
{children}
|
|
238
|
-
</ModalContext.Provider>
|
|
239
|
-
</View>
|
|
234
|
+
<ModalContext.Provider value={modal}>
|
|
235
|
+
{children}
|
|
236
|
+
</ModalContext.Provider>
|
|
240
237
|
</View>
|
|
241
|
-
</
|
|
242
|
-
</
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
Modal.displayName = 'Modal';
|
|
238
|
+
</View>
|
|
239
|
+
</FlexView>
|
|
240
|
+
</Dialog>
|
|
241
|
+
);
|
|
242
|
+
}
|
|
248
243
|
|
|
249
244
|
export default Object.assign(Modal, {
|
|
250
245
|
Context: ModalContext,
|
|
@@ -21,32 +21,31 @@ const styles = StyleSheet.create({
|
|
|
21
21
|
`,
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
);
|
|
49
|
-
|
|
50
|
-
ModalBody.displayName = 'ModalBody';
|
|
24
|
+
function ModalBody(
|
|
25
|
+
props: ModalBodyProps & React.RefAttributes<ViewRef | ScrollViewRef>,
|
|
26
|
+
) {
|
|
27
|
+
const { ref, children, style, contentContainerStyle, ...elementProps } =
|
|
28
|
+
props;
|
|
29
|
+
|
|
30
|
+
const { scrollable } = useForcedContext(ModalContext);
|
|
31
|
+
|
|
32
|
+
const classes = getStyles(styles, ['.modal-body']);
|
|
33
|
+
|
|
34
|
+
const FlexView = scrollable ? ScrollView : View;
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<FlexView
|
|
38
|
+
{...elementProps}
|
|
39
|
+
// @ts-expect-error Type of ref depends on component.
|
|
40
|
+
ref={ref}
|
|
41
|
+
style={scrollable ? style : [classes, style]}
|
|
42
|
+
contentContainerStyle={
|
|
43
|
+
scrollable ? [classes, contentContainerStyle] : undefined
|
|
44
|
+
}
|
|
45
|
+
>
|
|
46
|
+
{children}
|
|
47
|
+
</FlexView>
|
|
48
|
+
);
|
|
49
|
+
}
|
|
51
50
|
|
|
52
51
|
export default ModalBody;
|