solid-dismiss
Advanced tools
Comparing version 1.4.2 to 1.4.3
@@ -1702,3 +1702,12 @@ import { isServer, insert, template, delegateEvents, addEventListener, effect, setAttribute, classList, createComponent, mergeProps } from 'solid-js/web'; | ||
/** | ||
* ### Notes | ||
* | ||
* In documentation, for menuButton ref, use `createSignal` from now on. Users get to place Dismiss JSX anywhere (including before button element), and pass accessor to their custom Dismiss hooks without any issues. | ||
* | ||
* When using modals, inform users they must use `roll="dialog"` | ||
* | ||
*/ | ||
/** | ||
* | ||
* Handles "click outside" behavior for button popup pairings. Closing is triggered by click/focus outside of popup element or pressing "Escape" key. | ||
@@ -1713,3 +1722,3 @@ */ | ||
focusElementOnClose, | ||
focusElementOnOpen, | ||
focusElementOnOpen = modal ? "menuPopup" : undefined, | ||
cursorKeys = false, | ||
@@ -1716,0 +1725,0 @@ closeWhenMenuButtonIsTabbed = false, |
@@ -23,3 +23,3 @@ import "./browserInfo"; | ||
const modal = props.modal || false; | ||
const { id, menuButton, menuPopup, focusElementOnClose, focusElementOnOpen, cursorKeys = false, closeWhenMenuButtonIsTabbed = false, closeWhenMenuButtonIsClicked = true, closeWhenScrolling = false, closeWhenDocumentBlurs = false, closeWhenOverlayClicked = true, closeWhenEscapeKeyIsPressed = true, overlay = modal, overlayElement = modal, trapFocus = modal, removeScrollbar = modal, enableLastFocusSentinel = false, mount = modal ? "body" : undefined, | ||
const { id, menuButton, menuPopup, focusElementOnClose, focusElementOnOpen = modal ? "menuPopup" : undefined, cursorKeys = false, closeWhenMenuButtonIsTabbed = false, closeWhenMenuButtonIsClicked = true, closeWhenScrolling = false, closeWhenDocumentBlurs = false, closeWhenOverlayClicked = true, closeWhenEscapeKeyIsPressed = true, overlay = modal, overlayElement = modal, trapFocus = modal, removeScrollbar = modal, enableLastFocusSentinel = false, mount = modal ? "body" : undefined, | ||
// stopComponentEventPropagation = false, | ||
@@ -26,0 +26,0 @@ show = false, onToggleScrollbar, onOpen, deadMenuButton, ignoreMenuPopupWhenTabbing, } = props; |
@@ -22,2 +22,10 @@ import "./browserInfo"; | ||
*/ | ||
/** | ||
* ### Notes | ||
* | ||
* In documentation, for menuButton ref, use `createSignal` from now on. Users get to place Dismiss JSX anywhere (including before button element), and pass accessor to their custom Dismiss hooks without any issues. | ||
* | ||
* When using modals, inform users they must use `roll="dialog"` | ||
* | ||
*/ | ||
export declare type TDismiss = { | ||
@@ -81,3 +89,3 @@ /** | ||
* | ||
* *CSS string queried from root component, or if string value is `"menuPopup"` uses menuPopup element, or if string value is `"firstChild"` uses first tabbable element inside menuPopup. | ||
* *CSS string queried from menuPopup element, or if string value is `"menuPopup"` uses menuPopup element, or if string value is `"firstChild"` uses first tabbable element inside menuPopup. | ||
* | ||
@@ -84,0 +92,0 @@ * @defaultValue focus remains on `"menuButton"`. But if there's no menu button, focus remains on document's activeElement. |
{ | ||
"name": "solid-dismiss", | ||
"version": "1.4.2", | ||
"version": "1.4.3", | ||
"homepage": "https://aquaductape.github.io/solid-dismiss/", | ||
@@ -5,0 +5,0 @@ "description": "Handles \"click outside\" behavior for popup menu. Closing is triggered by click/focus outside of popup element or pressing \"Escape\" key.", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
331132
4495