Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@spectrum-web-components/popover
Advanced tools
An `<sp-popover>` is used to display transient content (menus, options, additional actions etc.) and appears when clicking/tapping on a source (tools, buttons, etc.) It stands out via its visual style (stroke and drop shadow) and floats on top of the rest
An <sp-popover>
is used to display transient content (menus, options, additional actions etc.) and appears when clicking/tapping on a source (tools, buttons, etc.) It stands out via its visual style (stroke and drop shadow) and floats on top of the rest of the interface. This component does not implement the actual overlay behavior and interactions. This is handled by the Overlay
system.
yarn add @spectrum-web-components/popover
Import the side effectful registration of <sp-popover>
via:
import '@spectrum-web-components/popover/sp-popover.js';
When looking to leverage the Popover
base class as a type and/or for extension purposes, do so via:
import { Popover } from '@spectrum-web-components/popover';
<div
style="
color: var(--spectrum-global-color-gray-800);
height: 200px;
position: relative;
width: 320px;
max-width: 100%;
"
>
<sp-popover dialog open style="--spectrum-popover-dialog-min-width: 0;">
<div
style="
font-size: 18px;
font-weight: 700;
padding-bottom: 30px;
"
>
Popover title
</div>
<div style="font-size: 14px">
Cupcake ipsum dolor sit amet jelly beans. Chocolate jelly caramels.
Icing soufflé chupa chups donut cheesecake. Jelly-o chocolate cake
sweet roll cake danish candy biscuit halvah
</div>
</sp-popover>
</div>
Default popover with no tip and no placement. Popovers will fill up the space of they're containing element by default. The default popover has no padding by default
<div
style="
color: var(--spectrum-global-color-gray-800);
height: 200px;
position: relative;
width: 320px;
max-width: 100%;
"
>
<sp-popover
variant="default"
open
style="max-width: 320px; --spectrum-popover-dialog-min-width: 0;"
>
<div style="font-size: 14px; padding: 10px">
<div
style="
font-size: 18px;
font-weight: 700;
padding-bottom: 30px;
"
>
Popover title
</div>
<div style="font-size: 14px">
Cupcake ipsum dolor sit amet jelly beans. Chocolate jelly
caramels. Icing soufflé chupa chups donut cheesecake. Jelly-o
chocolate cake sweet roll cake danish candy biscuit halvah
</div>
</div>
</sp-popover>
</div>
Popovers with padding, ideal for dialogs.
<div
style="
color: var(--spectrum-global-color-gray-800);
height: 200px;
position: relative;
width: 320px;
max-width: 100%;
"
>
<sp-popover dialog open style="--spectrum-popover-dialog-min-width: 0;">
<div
style="
font-size: 18px;
font-weight: 700;
padding-bottom: 30px;
"
>
Popover title
</div>
<div style="font-size: 14px">
Cupcake ipsum dolor sit amet jelly beans. Chocolate jelly caramels.
Icing soufflé chupa chups donut cheesecake. Jelly-o chocolate cake
sweet roll cake danish candy biscuit halvah
</div>
</sp-popover>
</div>
<div
style="
color: var(--spectrum-global-color-gray-800);
height: 200px;
position: relative;
width: 320px;
max-width: 100%;
"
>
<sp-popover
dialog
placement="bottom"
tip
open
style="--spectrum-popover-dialog-min-width: 0;"
>
<div
style="
font-size: 18px;
font-weight: 700;
padding-bottom: 30px;
"
>
Popover title
</div>
<div style="font-size: 14px">
Cupcake ipsum dolor sit amet jelly beans. Chocolate jelly caramels.
Icing soufflé chupa chups donut cheesecake. Jelly-o chocolate cake
sweet roll cake danish candy biscuit halvah
</div>
</sp-popover>
</div>
<div
style="
color: var(--spectrum-global-color-gray-800);
height: 200px;
position: relative;
width: 320px;
max-width: 100%;
"
>
<sp-popover
dialog
placement="top"
tip
open
style="--spectrum-popover-dialog-min-width: 0;"
>
<div
style="
font-size: 18px;
font-weight: 700;
padding-bottom: 30px;
"
>
Popover title
</div>
<div style="font-size: 14px">
Cupcake ipsum dolor sit amet jelly beans. Chocolate jelly caramels.
Icing soufflé chupa chups donut cheesecake. Jelly-o chocolate cake
sweet roll cake danish candy biscuit halvah
</div>
</sp-popover>
</div>
<div
style="
color: var(--spectrum-global-color-gray-800);
height: 200px;
position: relative;
width: 320px;
max-width: 100%;
"
>
<sp-popover
dialog
placement="left"
tip
open
style="--spectrum-popover-dialog-min-width: 0;"
>
<div
style="
font-size: 18px;
font-weight: 700;
padding-bottom: 30px;
"
>
Popover title
</div>
<div style="font-size: 14px">
Cupcake ipsum dolor sit amet jelly beans. Chocolate jelly caramels.
Icing soufflé chupa chups donut cheesecake. Jelly-o chocolate cake
sweet roll cake danish candy biscuit halvah
</div>
</sp-popover>
</div>
<div
style="
color: var(--spectrum-global-color-gray-800);
height: 200px;
position: relative;
width: 320px;
max-width: 100%;
"
>
<sp-popover
dialog
placement="right"
tip
open
style="--spectrum-popover-dialog-min-width: 0;"
>
<div
style="
font-size: 18px;
font-weight: 700;
padding-bottom: 30px;
"
>
Popover title
</div>
<div style="font-size: 14px">
Cupcake ipsum dolor sit amet jelly beans. Chocolate jelly caramels.
Icing soufflé chupa chups donut cheesecake. Jelly-o chocolate cake
sweet roll cake danish candy biscuit halvah
</div>
</sp-popover>
</div>
FAQs
An `<sp-popover>` is used to display transient content (menus, options, additional actions etc.) and appears when clicking/tapping on a source (tools, buttons, etc.) It stands out via its visual style (stroke and drop shadow) and floats on top of the rest
The npm package @spectrum-web-components/popover receives a total of 3,833 weekly downloads. As such, @spectrum-web-components/popover popularity was classified as popular.
We found that @spectrum-web-components/popover demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 13 open source maintainers 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.