@types/micromodal
Advanced tools
Comparing version 0.3.2 to 0.3.3
@@ -11,21 +11,21 @@ // Type definitions for micromodal 0.3 | ||
/** This is fired when the modal is opening. */ | ||
onShow?: (modal?: HTMLElement) => void; | ||
onShow?: ((modal?: HTMLElement) => void) | undefined; | ||
/** This is fired when the modal is closing. */ | ||
onClose?: (modal?: HTMLElement) => void; | ||
onClose?: ((modal?: HTMLElement) => void) | undefined; | ||
/** Custom data attribute to open modal. Default is data-micromodal-trigger. */ | ||
openTrigger?: string; | ||
openTrigger?: string | undefined; | ||
/** Custom data attribute to close modal. Default is data-micromodal-close. */ | ||
closeTrigger?: string; | ||
closeTrigger?: string | undefined; | ||
/** Custom class to be applied when modal is open. Default class is is-open. */ | ||
openClass?: string; | ||
openClass?: string | undefined; | ||
/** This disables scrolling on the page while the modal is open. The default value is false. */ | ||
disableScroll?: boolean; | ||
disableScroll?: boolean | undefined; | ||
/** Disable auto focus on first focusable element. Default is false */ | ||
disableFocus?: boolean; | ||
disableFocus?: boolean | undefined; | ||
@@ -36,3 +36,3 @@ /** | ||
*/ | ||
awaitOpenAnimation?: boolean; | ||
awaitOpenAnimation?: boolean | undefined; | ||
@@ -43,6 +43,6 @@ /** | ||
*/ | ||
awaitCloseAnimation?: boolean; | ||
awaitCloseAnimation?: boolean | undefined; | ||
/** This option suppresses the console warnings if passed as true. The default value is false. */ | ||
debugMode?: boolean; | ||
debugMode?: boolean | undefined; | ||
} | ||
@@ -49,0 +49,0 @@ |
{ | ||
"name": "@types/micromodal", | ||
"version": "0.3.2", | ||
"version": "0.3.3", | ||
"description": "TypeScript definitions for micromodal", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/micromodal", | ||
"license": "MIT", | ||
@@ -22,4 +23,4 @@ "contributors": [ | ||
"dependencies": {}, | ||
"typesPublisherContentHash": "aa982a86da8d926891a89843597d1b88f2cf5644889cc630eb034205e129b238", | ||
"typeScriptVersion": "3.1" | ||
"typesPublisherContentHash": "8a9acee5af5ba3ef5faef3fc23c4321e489bdf0e6c10522734cbb418e81526fa", | ||
"typeScriptVersion": "3.6" | ||
} |
@@ -9,5 +9,79 @@ # Installation | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/micromodal. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/micromodal/index.d.ts) | ||
````ts | ||
// Type definitions for micromodal 0.3 | ||
// Project: https://github.com/ghosh/micromodal#readme | ||
// Definitions by: Wayne Carson <https://github.com/wcarson> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
/** | ||
* MicroModal configuration options | ||
*/ | ||
export interface MicroModalConfig { | ||
/** This is fired when the modal is opening. */ | ||
onShow?: ((modal?: HTMLElement) => void) | undefined; | ||
/** This is fired when the modal is closing. */ | ||
onClose?: ((modal?: HTMLElement) => void) | undefined; | ||
/** Custom data attribute to open modal. Default is data-micromodal-trigger. */ | ||
openTrigger?: string | undefined; | ||
/** Custom data attribute to close modal. Default is data-micromodal-close. */ | ||
closeTrigger?: string | undefined; | ||
/** Custom class to be applied when modal is open. Default class is is-open. */ | ||
openClass?: string | undefined; | ||
/** This disables scrolling on the page while the modal is open. The default value is false. */ | ||
disableScroll?: boolean | undefined; | ||
/** Disable auto focus on first focusable element. Default is false */ | ||
disableFocus?: boolean | undefined; | ||
/** | ||
* Set this to true if using css animations to open the modal. | ||
* This allows it to wait for the animation to finish before focusing on an element inside the modal. Default is false | ||
*/ | ||
awaitOpenAnimation?: boolean | undefined; | ||
/** | ||
* Set this to true if using css animations to hide the modal. | ||
* This allows it to wait for the animation to finish before removing it from the DOM. Default is false | ||
*/ | ||
awaitCloseAnimation?: boolean | undefined; | ||
/** This option suppresses the console warnings if passed as true. The default value is false. */ | ||
debugMode?: boolean | undefined; | ||
} | ||
/** | ||
* MicroModal controller | ||
*/ | ||
declare namespace MicroModal { | ||
/** | ||
* Binds click handlers to all modal triggers | ||
* @param config configuration options | ||
*/ | ||
function init(config?: MicroModalConfig): void; | ||
/** | ||
* Shows a particular modal | ||
* @param targetModal The id of the modal to display | ||
* @param config configuration options | ||
*/ | ||
function show(targetModal: string, config?: MicroModalConfig): void; | ||
/** | ||
* Closes the active modal | ||
*/ | ||
function close(targetModal?: string): void; | ||
} | ||
export default MicroModal; | ||
```` | ||
### Additional Details | ||
* Last updated: Mon, 31 Aug 2020 17:15:03 GMT | ||
* Last updated: Thu, 08 Jul 2021 18:50:48 GMT | ||
* Dependencies: none | ||
@@ -14,0 +88,0 @@ * Global values: none |
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
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
7283
1
91