Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
lit-popup
Advanced tools
Readme
I needed full control over popup animation and its lifecycle.
Install it from NPM:
npm i lit-popup
Include css from node_modules/lit-popup/dist/css/lit-popup.min.css (or write your own)
<div class="lit-popup" data-lit-popup="popup">
<div class="lit-popup-container">
<!-- Layout here -->
</div>
</div>
import LitPopup from 'lit-popup';
const popup = new LitPopup('name');
Hook | Parameters | Description |
---|---|---|
onOpen | (instance: LitPopup) | Runs before opening animation |
onOpenComplete | (instance: LitPopup) | Runs after opening animation |
onClose | (instance: LitPopup) | Runs before closing animation |
onCloseComplete | (instance: LitPopup) | Runs after closing animation |
onDestroy | (instance: LitPopup) | Runs when 'destroy' method is called |
openAnimation | (instance: LitPopup) | A function describing an opening animation. It must return a promise and resolve when animation is done. |
closeAnimation | (instance: LitPopup) | A function describing a closing animation. It must return a promise and resolve when animation is done. |
Event | Parameters | Description |
---|---|---|
open | none | Triggers before opening animation |
open-complete | none | Triggers after opening animation |
close | none | Triggers before closing animation |
close-complete | none | Triggers after closing animation |
destroy | none | Triggers when 'destroy' method is called |
Method | Parameters | Return | Description |
---|---|---|---|
open | none | Promise<void> | Opens the modal |
close | none | Promise<void> | Closes the modal |
destroy | none | void | Destroys the instance, disposes memory |
on | (eventName: string, listener: Function) | void | Adds an event listener to the popup element |
one | (eventName: string, listener: Function) | void | Adds an event listener to the popup element which will be executed only once |
off | (eventName: string, listener: Function) | void | Removes an event listener from the popup element which will be executed only once |
trigger | (eventName: string) | void | Triggers an event on the popup element |
Work on progress
FAQs
A modern popup module with no dependencies.
The npm package lit-popup receives a total of 76 weekly downloads. As such, lit-popup popularity was classified as not popular.
We found that lit-popup demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.