Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@spectrum-web-components/dropdown

Package Overview
Dependencies
Maintainers
5
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@spectrum-web-components/dropdown - npm Package Compare versions

Comparing version 0.6.4 to 0.7.0

custom-elements.json

10

CHANGELOG.md

@@ -6,2 +6,12 @@ # Change Log

# [0.7.0](https://github.com/adobe/spectrum-web-components/compare/@spectrum-web-components/dropdown@0.6.4...@spectrum-web-components/dropdown@0.7.0) (2020-08-13)
### Bug Fixes
- **overlay:** ensure overlay addition occurs after closing previous ([7d2b102](https://github.com/adobe/spectrum-web-components/commit/7d2b102f30731513639582fed8ed0e1b46d569cf))
### Features
- **overlay:** move entire package behind dynamic import by default ([9b0a74d](https://github.com/adobe/spectrum-web-components/commit/9b0a74de1f32ccd8cde6cabe4c06f990064f11ae))
## [0.6.4](https://github.com/adobe/spectrum-web-components/compare/@spectrum-web-components/dropdown@0.6.3...@spectrum-web-components/dropdown@0.6.4) (2020-08-05)

@@ -8,0 +18,0 @@

18

package.json

@@ -21,3 +21,3 @@ {

],
"version": "0.6.4",
"version": "0.7.0",
"description": "",

@@ -32,3 +32,5 @@ "main": "src/index.js",

"./sp-dropdown": "./sp-dropdown.js",
"./sp-dropdown.js": "./sp-dropdown.js"
"./sp-dropdown.js": "./sp-dropdown.js",
"./sync/sp-dropdown": "./sync/sp-dropdown.js",
"./sync/sp-dropdown.js": "./sync/sp-dropdown.js"
},

@@ -44,3 +46,5 @@ "files": [

"./sp-dropdown.js",
"./sp-dropdown.ts"
"./sp-dropdown.ts",
"./sync/sp-dropdown.js",
"./sync/sp-dropdown.ts"
],

@@ -59,5 +63,5 @@ "scripts": {

"@spectrum-web-components/icons-ui": "^0.2.1",
"@spectrum-web-components/menu": "^0.3.0",
"@spectrum-web-components/overlay": "^0.4.3",
"@spectrum-web-components/popover": "^0.4.3",
"@spectrum-web-components/menu": "^0.3.1",
"@spectrum-web-components/overlay": "^0.5.0",
"@spectrum-web-components/popover": "^0.4.4",
"@spectrum-web-components/shared": "^0.6.0",

@@ -68,3 +72,3 @@ "lit-element": "^2.1.0",

},
"gitHead": "d08375a0d700d635c2fe0a142f3d7877ec18bff6"
"gitHead": "d052de054ce4420974e7891ee3d0c607922c8e70"
}

@@ -20,2 +20,8 @@ ## Description

The default of `<sp-dropdown>` will load dependencies in `@spectrum-web-components/overlay` asynchronously via a dynamic import. In the case that you would like to import those tranverse dependencies statically, import the side effectful registration of `<sp-dropdown>` as follows:
```
import '@spectrum-web-components/dropdown/sync/sp-dropdown.js';
```
When looking to leverage the `Dropdown` base class as a type and/or for extension purposes, do so via:

@@ -22,0 +28,0 @@

@@ -6,4 +6,3 @@ import { PropertyValues, CSSResultArray, TemplateResult } from 'lit-element';

import '@spectrum-web-components/popover/sp-popover.js';
import '@spectrum-web-components/menu/sp-menu-item.js';
import { Placement } from '@spectrum-web-components/overlay';
import { Placement, TriggerInteractions, OverlayOptions } from '@spectrum-web-components/overlay';
/**

@@ -15,2 +14,3 @@ * @slot label - The placeholder content for the dropdown

static get styles(): CSSResultArray;
static openOverlay: (target: HTMLElement, interaction: TriggerInteractions, content: HTMLElement, options: OverlayOptions) => Promise<() => void>;
button?: HTMLButtonElement;

@@ -17,0 +17,0 @@ disabled: boolean;

@@ -26,4 +26,3 @@ /*

import '@spectrum-web-components/popover/sp-popover.js';
import '@spectrum-web-components/menu/sp-menu-item.js';
import { Overlay } from '@spectrum-web-components/overlay';
import { openOverlay, } from '@spectrum-web-components/overlay';
/**

@@ -184,3 +183,4 @@ * @slot label - The placeholder content for the dropdown

}
this.closeOverlay = await Overlay.open(this.button, 'replace', this.popover, {
const { button, popover } = this;
this.closeOverlay = await Dropdown.openOverlay(button, 'inline', popover, {
placement: this.placement,

@@ -296,2 +296,5 @@ receivesFocus: 'auto',

}
DropdownBase.openOverlay = async (target, interaction, content, options) => {
return await openOverlay(target, interaction, content, options);
};
__decorate([

@@ -298,0 +301,0 @@ query('#button')

@@ -44,4 +44,8 @@ /*

import '@spectrum-web-components/popover/sp-popover.js';
import '@spectrum-web-components/menu/sp-menu-item.js';
import { Placement, Overlay } from '@spectrum-web-components/overlay';
import {
Placement,
openOverlay,
TriggerInteractions,
OverlayOptions,
} from '@spectrum-web-components/overlay';

@@ -64,2 +68,11 @@ /**

public static openOverlay = async (
target: HTMLElement,
interaction: TriggerInteractions,
content: HTMLElement,
options: OverlayOptions
): Promise<() => void> => {
return await openOverlay(target, interaction, content, options);
};
@query('#button')

@@ -269,6 +282,7 @@ public button?: HTMLButtonElement;

}
this.closeOverlay = await Overlay.open(
this.button,
'replace',
this.popover,
const { button, popover } = this;
this.closeOverlay = await Dropdown.openOverlay(
button,
'inline',
popover,
{

@@ -275,0 +289,0 @@ placement: this.placement,

Sorry, the diff of this file is not supported yet

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