New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@vaadin/popover

Package Overview
Dependencies
Maintainers
0
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vaadin/popover - npm Package Compare versions

Comparing version 24.5.0-alpha5 to 24.5.0-alpha6

16

package.json
{
"name": "@vaadin/popover",
"version": "24.5.0-alpha5",
"version": "24.5.0-alpha6",
"publishConfig": {

@@ -38,8 +38,8 @@ "access": "public"

"@open-wc/dedupe-mixin": "^1.3.0",
"@vaadin/a11y-base": "24.5.0-alpha5",
"@vaadin/component-base": "24.5.0-alpha5",
"@vaadin/overlay": "24.5.0-alpha5",
"@vaadin/vaadin-lumo-styles": "24.5.0-alpha5",
"@vaadin/vaadin-material-styles": "24.5.0-alpha5",
"@vaadin/vaadin-themable-mixin": "24.5.0-alpha5",
"@vaadin/a11y-base": "24.5.0-alpha6",
"@vaadin/component-base": "24.5.0-alpha6",
"@vaadin/overlay": "24.5.0-alpha6",
"@vaadin/vaadin-lumo-styles": "24.5.0-alpha6",
"@vaadin/vaadin-material-styles": "24.5.0-alpha6",
"@vaadin/vaadin-themable-mixin": "24.5.0-alpha6",
"lit": "^3.0.0"

@@ -56,3 +56,3 @@ },

],
"gitHead": "4e57d240ababf0c2db9d674891b90bdf3812e6ae"
"gitHead": "c5f541dbe961a994730d4c60472ae957bf6b4c12"
}

@@ -62,2 +62,4 @@ /**

this.removeAttribute('arrow-centered');
// Center the overlay horizontally

@@ -74,2 +76,4 @@ if (this.position === 'bottom' || this.position === 'top') {

this.style.left = `${left}px`;
// Center the pointer arrow horizontally
this.setAttribute('arrow-centered', '');
}

@@ -82,2 +86,4 @@ }

this.style.right = `${right}px`;
// Center the pointer arrow horizontally
this.setAttribute('arrow-centered', '');
}

@@ -84,0 +90,0 @@ }

@@ -85,2 +85,13 @@ /**

}
[part='arrow'] {
display: none;
position: absolute;
height: 0;
width: 0;
}
:host([theme~='arrow']) [part='arrow'] {
display: block;
}
`,

@@ -95,2 +106,3 @@ ];

<div part="overlay" id="overlay" tabindex="0">
<div part="arrow"></div>
<div part="content" id="content"><slot></slot></div>

@@ -97,0 +109,0 @@ </div>

@@ -46,2 +46,8 @@ /**

*
* In addition to `<vaadin-overlay>` parts, the following parts are available for styling:
*
* Part name | Description
* -----------------|-------------------------------------------
* `arrow` | Optional arrow pointing to the target when using `theme="arrow"`
*
* The following state attributes are available for styling:

@@ -48,0 +54,0 @@ *

@@ -142,2 +142,8 @@ /**

*
* In addition to `<vaadin-overlay>` parts, the following parts are available for styling:
*
* Part name | Description
* -----------------|-------------------------------------------
* `arrow` | Optional arrow pointing to the target when using `theme="arrow"`
*
* The following state attributes are available for styling:

@@ -449,3 +455,3 @@ *

document.addEventListener('click', this.__onGlobalClick, true);
document.documentElement.addEventListener('click', this.__onGlobalClick, true);
}

@@ -457,3 +463,3 @@

document.removeEventListener('click', this.__onGlobalClick, true);
document.documentElement.removeEventListener('click', this.__onGlobalClick, true);

@@ -460,0 +466,0 @@ this._openedStateController.close(true);

import '@vaadin/vaadin-lumo-styles/color.js';
import '@vaadin/vaadin-lumo-styles/spacing.js';
import '@vaadin/vaadin-lumo-styles/style.js';
import '@vaadin/vaadin-lumo-styles/typography.js';
import '@vaadin/vaadin-lumo-styles/color.js';
import '@vaadin/vaadin-lumo-styles/spacing.js';
import '@vaadin/vaadin-lumo-styles/style.js';

@@ -9,6 +10,8 @@ import '@vaadin/vaadin-lumo-styles/typography.js';

:host {
--vaadin-popover-offset-top: var(--lumo-space-xs);
--vaadin-popover-offset-bottom: var(--lumo-space-xs);
--vaadin-popover-offset-start: var(--lumo-space-xs);
--vaadin-popover-offset-end: var(--lumo-space-xs);
--vaadin-popover-offset-top: var(--_vaadin-popover-default-offset);
--vaadin-popover-offset-bottom: var(--_vaadin-popover-default-offset);
--vaadin-popover-offset-start: var(--_vaadin-popover-default-offset);
--vaadin-popover-offset-end: var(--_vaadin-popover-default-offset);
--vaadin-popover-arrow-size: 0.5rem;
--_vaadin-popover-default-offset: var(--lumo-space-xs);
}

@@ -19,4 +22,84 @@

}
:host([theme~='arrow']) {
--_vaadin-popover-default-offset: calc(var(--lumo-space-s) + var(--vaadin-popover-arrow-size) / 2);
}
/* top / bottom position */
:host([theme~='arrow'][position^='top']) [part='arrow'],
:host([theme~='arrow'][position^='bottom']) [part='arrow'] {
border-left: var(--vaadin-popover-arrow-size) solid transparent;
border-right: var(--vaadin-popover-arrow-size) solid transparent;
}
:host([theme~='arrow'][position^='bottom'][bottom-aligned]) [part='arrow'],
:host([theme~='arrow'][position^='top'][bottom-aligned]) [part='arrow'] {
bottom: calc(var(--vaadin-popover-arrow-size) * -1);
border-top: var(--vaadin-popover-arrow-size) solid var(--lumo-base-color);
filter: drop-shadow(0 2px 1px var(--lumo-shade-10pct));
}
:host([theme~='arrow'][position^='bottom'][top-aligned]) [part='arrow'],
:host([theme~='arrow'][position^='top'][top-aligned]) [part='arrow'] {
top: calc(var(--vaadin-popover-arrow-size) * -1);
border-bottom: var(--vaadin-popover-arrow-size) solid var(--lumo-base-color);
filter: drop-shadow(0 -2px 1px var(--lumo-shade-10pct));
}
:host([theme~='arrow'][position^='bottom'][start-aligned]) [part='arrow'],
:host([theme~='arrow'][position^='top'][start-aligned]) [part='arrow'] {
transform: translateX(-50%);
inset-inline-start: 1.5rem;
}
:host([theme~='arrow'][position^='bottom'][end-aligned]) [part='arrow'],
:host([theme~='arrow'][position^='top'][end-aligned]) [part='arrow'] {
transform: translateX(50%);
inset-inline-end: 1.5rem;
}
:host([theme~='arrow'][position^='bottom'][arrow-centered]) [part='arrow'],
:host([theme~='arrow'][position^='top'][arrow-centered]) [part='arrow'] {
transform: translateX(-50%);
inset-inline-start: 50%;
}
/* start / end position */
:host([theme~='arrow'][position^='start']) [part='arrow'],
:host([theme~='arrow'][position^='end']) [part='arrow'] {
border-top: var(--vaadin-popover-arrow-size) solid transparent;
border-bottom: var(--vaadin-popover-arrow-size) solid transparent;
}
:host([theme~='arrow'][position^='start'][start-aligned]) [part='arrow'],
:host([theme~='arrow'][position^='end'][start-aligned]) [part='arrow'] {
inset-inline-start: calc(var(--vaadin-popover-arrow-size) * -1);
border-right: var(--vaadin-popover-arrow-size) solid var(--lumo-base-color);
filter: drop-shadow(-2px 0 1px var(--lumo-shade-10pct));
}
:host([theme~='arrow'][position^='start'][end-aligned]) [part='arrow'],
:host([theme~='arrow'][position^='end'][end-aligned]) [part='arrow'] {
inset-inline-end: calc(var(--vaadin-popover-arrow-size) * -1);
border-left: var(--vaadin-popover-arrow-size) solid var(--lumo-base-color);
filter: drop-shadow(2px 0 1px var(--lumo-shade-10pct));
}
:host([theme~='arrow'][position^='start'][top-aligned]) [part='arrow'],
:host([theme~='arrow'][position^='end'][top-aligned]) [part='arrow'] {
top: 0.5rem;
}
:host([theme~='arrow'][position='start'][top-aligned]) [part='arrow'],
:host([theme~='arrow'][position='end'][top-aligned]) [part='arrow'] {
top: 50%;
transform: translateY(-50%);
}
:host([theme~='arrow'][position^='start'][bottom-aligned]) [part='arrow'],
:host([theme~='arrow'][position^='end'][bottom-aligned]) [part='arrow'] {
bottom: 0.5rem;
}
`;
registerStyles('vaadin-popover-overlay', [overlay, popoverOverlay], { moduleId: 'lumo-popover-overlay' });

@@ -1,1 +0,1 @@

export {};
import '@vaadin/vaadin-material-styles/color.js';

@@ -0,1 +1,2 @@

import '@vaadin/vaadin-material-styles/color.js';
import { overlay } from '@vaadin/vaadin-material-styles/mixins/overlay.js';

@@ -6,6 +7,8 @@ import { css, registerStyles } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';

:host {
--vaadin-popover-offset-top: 0.25rem;
--vaadin-popover-offset-bottom: 0.25rem;
--vaadin-popover-offset-start: 0.25rem;
--vaadin-popover-offset-end: 0.25rem;
--vaadin-popover-offset-top: var(--_vaadin-popover-default-offset);
--vaadin-popover-offset-bottom: var(--_vaadin-popover-default-offset);
--vaadin-popover-offset-start: var(--_vaadin-popover-default-offset);
--vaadin-popover-offset-end: var(--_vaadin-popover-default-offset);
--vaadin-popover-arrow-size: 0.5rem;
--_vaadin-popover-default-offset: 0.25rem;
}

@@ -16,4 +19,84 @@

}
:host([theme~='arrow']) {
--_vaadin-popover-default-offset: calc(0.25rem + var(--vaadin-popover-arrow-size) / 1.25);
}
/* top / bottom position */
:host([theme~='arrow'][position^='top']) [part='arrow'],
:host([theme~='arrow'][position^='bottom']) [part='arrow'] {
border-left: var(--vaadin-popover-arrow-size) solid transparent;
border-right: var(--vaadin-popover-arrow-size) solid transparent;
}
:host([theme~='arrow'][position^='bottom'][bottom-aligned]) [part='arrow'],
:host([theme~='arrow'][position^='top'][bottom-aligned]) [part='arrow'] {
bottom: calc(var(--vaadin-popover-arrow-size) * -1);
border-top: var(--vaadin-popover-arrow-size) solid var(--material-background-color);
filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.14));
}
:host([theme~='arrow'][position^='bottom'][top-aligned]) [part='arrow'],
:host([theme~='arrow'][position^='top'][top-aligned]) [part='arrow'] {
top: calc(var(--vaadin-popover-arrow-size) * -1);
border-bottom: var(--vaadin-popover-arrow-size) solid var(--material-background-color);
filter: drop-shadow(0 -2px 1px rgba(0, 0, 0, 0.14));
}
:host([theme~='arrow'][position^='bottom'][start-aligned]) [part='arrow'],
:host([theme~='arrow'][position^='top'][start-aligned]) [part='arrow'] {
transform: translateX(-50%);
inset-inline-start: 1.5rem;
}
:host([theme~='arrow'][position^='bottom'][end-aligned]) [part='arrow'],
:host([theme~='arrow'][position^='top'][end-aligned]) [part='arrow'] {
transform: translateX(50%);
inset-inline-end: 1.5rem;
}
:host([theme~='arrow'][position^='bottom'][arrow-centered]) [part='arrow'],
:host([theme~='arrow'][position^='top'][arrow-centered]) [part='arrow'] {
transform: translateX(-50%);
inset-inline-start: 50%;
}
/* start / end position */
:host([theme~='arrow'][position^='start']) [part='arrow'],
:host([theme~='arrow'][position^='end']) [part='arrow'] {
border-top: var(--vaadin-popover-arrow-size) solid transparent;
border-bottom: var(--vaadin-popover-arrow-size) solid transparent;
}
:host([theme~='arrow'][position^='start'][start-aligned]) [part='arrow'],
:host([theme~='arrow'][position^='end'][start-aligned]) [part='arrow'] {
inset-inline-start: calc(var(--vaadin-popover-arrow-size) * -1);
border-right: var(--vaadin-popover-arrow-size) solid var(--material-background-color);
filter: drop-shadow(-2px 0 1px rgba(0, 0, 0, 0.14));
}
:host([theme~='arrow'][position^='start'][end-aligned]) [part='arrow'],
:host([theme~='arrow'][position^='end'][end-aligned]) [part='arrow'] {
inset-inline-end: calc(var(--vaadin-popover-arrow-size) * -1);
border-left: var(--vaadin-popover-arrow-size) solid var(--material-background-color);
filter: drop-shadow(2px 0 1px rgba(0, 0, 0, 0.14));
}
:host([theme~='arrow'][position^='start'][top-aligned]) [part='arrow'],
:host([theme~='arrow'][position^='end'][top-aligned]) [part='arrow'] {
top: 0.5rem;
}
:host([theme~='arrow'][position='start'][top-aligned]) [part='arrow'],
:host([theme~='arrow'][position='end'][top-aligned]) [part='arrow'] {
top: 50%;
transform: translateY(-50%);
}
:host([theme~='arrow'][position^='start'][bottom-aligned]) [part='arrow'],
:host([theme~='arrow'][position^='end'][bottom-aligned]) [part='arrow'] {
bottom: 0.5rem;
}
`;
registerStyles('vaadin-popover-overlay', [overlay, popoverOverlay], { moduleId: 'material-popover-overlay' });
{
"$schema": "https://json.schemastore.org/web-types",
"name": "@vaadin/popover",
"version": "24.5.0-alpha5",
"version": "24.5.0-alpha6",
"description-markup": "markdown",

@@ -11,3 +11,3 @@ "contributions": {

"name": "vaadin-popover",
"description": "`<vaadin-popover>` is a Web Component for creating overlays\nthat are positioned next to specified DOM element (target).\n\nUnlike `<vaadin-tooltip>`, the popover supports rich content\nthat can be provided by using `renderer` function.\n\n### Styling\n\n`<vaadin-popover>` uses `<vaadin-popover-overlay>` internal\nthemable component as the actual visible overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha5/#/elements/vaadin-overlay) documentation\nfor `<vaadin-popover-overlay>` parts.\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|----------------------------------------\n`position` | Reflects the `position` property value.\n\nNote: the `theme` attribute value set on `<vaadin-popover>` is\npropagated to the internal `<vaadin-popover-overlay>` component.\n\n### Custom CSS Properties\n\nThe following custom CSS properties are available on the `<vaadin-popover>` element:\n\nCustom CSS property | Description\n---------------------------------|-------------\n`--vaadin-popover-offset-top` | Used as an offset when the popover is aligned vertically below the target\n`--vaadin-popover-offset-bottom` | Used as an offset when the popover is aligned vertically above the target\n`--vaadin-popover-offset-start` | Used as an offset when the popover is aligned horizontally after the target\n`--vaadin-popover-offset-end` | Used as an offset when the popover is aligned horizontally before the target\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
"description": "`<vaadin-popover>` is a Web Component for creating overlays\nthat are positioned next to specified DOM element (target).\n\nUnlike `<vaadin-tooltip>`, the popover supports rich content\nthat can be provided by using `renderer` function.\n\n### Styling\n\n`<vaadin-popover>` uses `<vaadin-popover-overlay>` internal\nthemable component as the actual visible overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha6/#/elements/vaadin-overlay) documentation\nfor `<vaadin-popover-overlay>` parts.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for styling:\n\nPart name | Description\n-----------------|-------------------------------------------\n`arrow` | Optional arrow pointing to the target when using `theme=\"arrow\"`\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|----------------------------------------\n`position` | Reflects the `position` property value.\n\nNote: the `theme` attribute value set on `<vaadin-popover>` is\npropagated to the internal `<vaadin-popover-overlay>` component.\n\n### Custom CSS Properties\n\nThe following custom CSS properties are available on the `<vaadin-popover>` element:\n\nCustom CSS property | Description\n---------------------------------|-------------\n`--vaadin-popover-offset-top` | Used as an offset when the popover is aligned vertically below the target\n`--vaadin-popover-offset-bottom` | Used as an offset when the popover is aligned vertically above the target\n`--vaadin-popover-offset-start` | Used as an offset when the popover is aligned horizontally after the target\n`--vaadin-popover-offset-end` | Used as an offset when the popover is aligned horizontally before the target\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
"attributes": [

@@ -14,0 +14,0 @@ {

{
"$schema": "https://json.schemastore.org/web-types",
"name": "@vaadin/popover",
"version": "24.5.0-alpha5",
"version": "24.5.0-alpha6",
"description-markup": "markdown",

@@ -19,3 +19,3 @@ "framework": "lit",

"name": "vaadin-popover",
"description": "`<vaadin-popover>` is a Web Component for creating overlays\nthat are positioned next to specified DOM element (target).\n\nUnlike `<vaadin-tooltip>`, the popover supports rich content\nthat can be provided by using `renderer` function.\n\n### Styling\n\n`<vaadin-popover>` uses `<vaadin-popover-overlay>` internal\nthemable component as the actual visible overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha5/#/elements/vaadin-overlay) documentation\nfor `<vaadin-popover-overlay>` parts.\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|----------------------------------------\n`position` | Reflects the `position` property value.\n\nNote: the `theme` attribute value set on `<vaadin-popover>` is\npropagated to the internal `<vaadin-popover-overlay>` component.\n\n### Custom CSS Properties\n\nThe following custom CSS properties are available on the `<vaadin-popover>` element:\n\nCustom CSS property | Description\n---------------------------------|-------------\n`--vaadin-popover-offset-top` | Used as an offset when the popover is aligned vertically below the target\n`--vaadin-popover-offset-bottom` | Used as an offset when the popover is aligned vertically above the target\n`--vaadin-popover-offset-start` | Used as an offset when the popover is aligned horizontally after the target\n`--vaadin-popover-offset-end` | Used as an offset when the popover is aligned horizontally before the target\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
"description": "`<vaadin-popover>` is a Web Component for creating overlays\nthat are positioned next to specified DOM element (target).\n\nUnlike `<vaadin-tooltip>`, the popover supports rich content\nthat can be provided by using `renderer` function.\n\n### Styling\n\n`<vaadin-popover>` uses `<vaadin-popover-overlay>` internal\nthemable component as the actual visible overlay.\n\nSee [`<vaadin-overlay>`](https://cdn.vaadin.com/vaadin-web-components/24.5.0-alpha6/#/elements/vaadin-overlay) documentation\nfor `<vaadin-popover-overlay>` parts.\n\nIn addition to `<vaadin-overlay>` parts, the following parts are available for styling:\n\nPart name | Description\n-----------------|-------------------------------------------\n`arrow` | Optional arrow pointing to the target when using `theme=\"arrow\"`\n\nThe following state attributes are available for styling:\n\nAttribute | Description\n-----------------|----------------------------------------\n`position` | Reflects the `position` property value.\n\nNote: the `theme` attribute value set on `<vaadin-popover>` is\npropagated to the internal `<vaadin-popover-overlay>` component.\n\n### Custom CSS Properties\n\nThe following custom CSS properties are available on the `<vaadin-popover>` element:\n\nCustom CSS property | Description\n---------------------------------|-------------\n`--vaadin-popover-offset-top` | Used as an offset when the popover is aligned vertically below the target\n`--vaadin-popover-offset-bottom` | Used as an offset when the popover is aligned vertically above the target\n`--vaadin-popover-offset-start` | Used as an offset when the popover is aligned horizontally after the target\n`--vaadin-popover-offset-end` | Used as an offset when the popover is aligned horizontally before the target\n\nSee [Styling Components](https://vaadin.com/docs/latest/styling/styling-components) documentation.",
"extension": true,

@@ -22,0 +22,0 @@ "attributes": [

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc