Socket
Socket
Sign inDemoInstall

@polymer/paper-menu-button

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@polymer/paper-menu-button - npm Package Compare versions

Comparing version 3.0.0-pre.12 to 3.0.0-pre.13

44

package.json

@@ -20,20 +20,22 @@ {

"bower": "^1.8.0",
"@polymer/iron-component-page": "3.0.0-pre.12",
"@polymer/iron-icon": "3.0.0-pre.12",
"@polymer/iron-icons": "3.0.0-pre.12",
"@polymer/iron-image": "3.0.0-pre.12",
"@polymer/iron-demo-helpers": "3.0.0-pre.12",
"@polymer/iron-test-helpers": "3.0.0-pre.12",
"@polymer/paper-button": "3.0.0-pre.12",
"@polymer/paper-icon-button": "3.0.0-pre.12",
"@polymer/paper-item": "3.0.0-pre.12",
"@polymer/paper-listbox": "3.0.0-pre.12",
"wct-browser-legacy": "0.0.1-pre.11",
"@webcomponents/webcomponentsjs": "^1.0.0",
"webmat": "^0.2.0",
"@polymer/iron-component-page": "^3.0.0-pre.13",
"@polymer/iron-icon": "^3.0.0-pre.13",
"@polymer/iron-icons": "^3.0.0-pre.13",
"@polymer/iron-image": "^3.0.0-pre.13",
"@polymer/iron-demo-helpers": "^3.0.0-pre.13",
"@polymer/iron-test-helpers": "^3.0.0-pre.13",
"@polymer/paper-button": "^3.0.0-pre.13",
"@polymer/paper-icon-button": "^3.0.0-pre.13",
"@polymer/paper-item": "^3.0.0-pre.13",
"@polymer/paper-listbox": "^3.0.0-pre.13",
"wct-browser-legacy": "^0.0.1-pre.11",
"@webcomponents/webcomponentsjs": "^2.0.0-0",
"web-animations-js": "^2.3.1"
},
"scripts": {
"update-types": "bower install && gen-typescript-declarations --deleteExisting --outDir ."
"update-types": "bower install && gen-typescript-declarations --deleteExisting --outDir .",
"format": "webmat && npm run update-types"
},
"version": "3.0.0-pre.12",
"version": "3.0.0-pre.13",
"resolutions": {

@@ -48,10 +50,10 @@ "inherits": "2.0.3",

"dependencies": {
"@polymer/polymer": "3.0.0-pre.12",
"@polymer/iron-a11y-keys-behavior": "3.0.0-pre.12",
"@polymer/iron-behaviors": "3.0.0-pre.12",
"@polymer/iron-dropdown": "3.0.0-pre.12",
"@polymer/iron-fit-behavior": "3.0.0-pre.12",
"@polymer/neon-animation": "3.0.0-pre.12",
"@polymer/paper-styles": "3.0.0-pre.12"
"@polymer/polymer": "^3.0.0-pre.13",
"@polymer/iron-a11y-keys-behavior": "^3.0.0-pre.13",
"@polymer/iron-behaviors": "^3.0.0-pre.13",
"@polymer/iron-dropdown": "^3.0.0-pre.13",
"@polymer/iron-fit-behavior": "^3.0.0-pre.13",
"@polymer/neon-animation": "^3.0.0-pre.13",
"@polymer/paper-styles": "^3.0.0-pre.13"
}
}

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

import '@polymer/polymer/polymer-legacy.js';
import { NeonAnimationBehavior } from '@polymer/neon-animation/neon-animation-behavior.js';
import { Polymer } from '@polymer/polymer/lib/legacy/polymer-fn.js';
/**

@@ -13,8 +10,10 @@ @license

*/
import '../polymer/polymer-legacy.js';
import { NeonAnimationBehavior } from '../neon-animation/neon-animation-behavior.js';
import { Polymer } from '../polymer/lib/legacy/polymer-fn.js';
Polymer({
is: 'paper-menu-grow-height-animation',
behaviors: [
NeonAnimationBehavior
],
behaviors: [NeonAnimationBehavior],

@@ -26,7 +25,6 @@ configure: function(config) {

this._effect = new KeyframeEffect(node, [{
height: (height / 2) + 'px'
}, {
height: height + 'px'
}], this.timingFromConfig(config));
this._effect = new KeyframeEffect(
node,
[{height: (height / 2) + 'px'}, {height: height + 'px'}],
this.timingFromConfig(config));

@@ -40,5 +38,3 @@ return this._effect;

behaviors: [
NeonAnimationBehavior
],
behaviors: [NeonAnimationBehavior],

@@ -50,7 +46,6 @@ configure: function(config) {

this._effect = new KeyframeEffect(node, [{
width: (width / 2) + 'px'
}, {
width: width + 'px'
}], this.timingFromConfig(config));
this._effect = new KeyframeEffect(
node,
[{width: (width / 2) + 'px'}, {width: width + 'px'}],
this.timingFromConfig(config));

@@ -64,5 +59,3 @@ return this._effect;

behaviors: [
NeonAnimationBehavior
],
behaviors: [NeonAnimationBehavior],

@@ -74,7 +67,6 @@ configure: function(config) {

this._effect = new KeyframeEffect(node, [{
width: width + 'px'
}, {
width: width - (width / 20) + 'px'
}], this.timingFromConfig(config));
this._effect = new KeyframeEffect(
node,
[{width: width + 'px'}, {width: width - (width / 20) + 'px'}],
this.timingFromConfig(config));

@@ -88,5 +80,3 @@ return this._effect;

behaviors: [
NeonAnimationBehavior
],
behaviors: [NeonAnimationBehavior],

@@ -97,13 +87,12 @@ configure: function(config) {

var height = rect.height;
var top = rect.top;
this.setPrefixedProperty(node, 'transformOrigin', '0 0');
this._effect = new KeyframeEffect(node, [{
height: height + 'px',
transform: 'translateY(0)'
}, {
height: height / 2 + 'px',
transform: 'translateY(-20px)'
}], this.timingFromConfig(config));
this._effect = new KeyframeEffect(
node,
[
{height: height + 'px', transform: 'translateY(0)'},
{height: height / 2 + 'px', transform: 'translateY(-20px)'}
],
this.timingFromConfig(config));

@@ -110,0 +99,0 @@ return this._effect;

@@ -1,13 +0,69 @@

import '@polymer/polymer/polymer-legacy.js';
import { IronA11yKeysBehavior } from '@polymer/iron-a11y-keys-behavior/iron-a11y-keys-behavior.js';
import { IronControlState } from '@polymer/iron-behaviors/iron-control-state.js';
import '@polymer/iron-dropdown/iron-dropdown.js';
import '@polymer/neon-animation/animations/fade-in-animation.js';
import '@polymer/neon-animation/animations/fade-out-animation.js';
import '@polymer/paper-styles/default-theme.js';
import '@polymer/paper-styles/shadow.js';
/**
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
*/
/**
Material design: [Dropdown buttons](https://www.google.com/design/spec/components/buttons.html#buttons-dropdown-buttons)
`paper-menu-button` allows one to compose a designated "trigger" element with
another element that represents "content", to create a dropdown menu that
displays the "content" when the "trigger" is clicked.
The child element assigned to the `dropdown-trigger` slot will be used as the
"trigger" element. The child element assigned to the `dropdown-content` slot will be
used as the "content" element.
The `paper-menu-button` is sensitive to its content's `iron-select` events. If
the "content" element triggers an `iron-select` event, the `paper-menu-button`
will close automatically.
Example:
<paper-menu-button>
<paper-icon-button icon="menu" slot="dropdown-trigger"></paper-icon-button>
<paper-listbox slot="dropdown-content">
<paper-item>Share</paper-item>
<paper-item>Settings</paper-item>
<paper-item>Help</paper-item>
</paper-listbox>
</paper-menu-button>
### Styling
The following custom properties and mixins are also available for styling:
Custom property | Description | Default
----------------|-------------|----------
`--paper-menu-button-dropdown-background` | Background color of the paper-menu-button dropdown | `--primary-background-color`
`--paper-menu-button` | Mixin applied to the paper-menu-button | `{}`
`--paper-menu-button-disabled` | Mixin applied to the paper-menu-button when disabled | `{}`
`--paper-menu-button-dropdown` | Mixin applied to the paper-menu-button dropdown | `{}`
`--paper-menu-button-content` | Mixin applied to the paper-menu-button content | `{}`
@hero hero.svg
@demo demo/index.html
*/
/*
FIXME(polymer-modulizer): the above comments were extracted
from HTML and may be out of place here. Review them and
then delete this comment!
*/
import '../polymer/polymer-legacy.js';
import { IronA11yKeysBehavior } from '../iron-a11y-keys-behavior/iron-a11y-keys-behavior.js';
import { IronControlState } from '../iron-behaviors/iron-control-state.js';
import '../iron-dropdown/iron-dropdown.js';
import '../neon-animation/animations/fade-in-animation.js';
import '../neon-animation/animations/fade-out-animation.js';
import '../paper-styles/default-theme.js';
import '../paper-styles/shadow.js';
import './paper-menu-button-animations.js';
import { Polymer as Polymer$0 } from '@polymer/polymer/lib/legacy/polymer-fn.js';
import { html } from '@polymer/polymer/lib/utils/html-tag.js';
import { dom } from '@polymer/polymer/lib/legacy/polymer.dom.js';
import { Polymer as Polymer$0 } from '../polymer/lib/legacy/polymer-fn.js';
import { html } from '../polymer/lib/utils/html-tag.js';
import { dom } from '../polymer/lib/legacy/polymer.dom.js';

@@ -19,3 +75,3 @@ var config = {

var PaperMenuButton = Polymer$0({
export const PaperMenuButton = Polymer$0({
_template: html`

@@ -95,6 +151,3 @@ <style>

behaviors: [
IronA11yKeysBehavior,
IronControlState
],
behaviors: [IronA11yKeysBehavior, IronControlState],

@@ -105,8 +158,4 @@ properties: {

*/
opened: {
type: Boolean,
value: false,
notify: true,
observer: '_openedChanged'
},
opened:
{type: Boolean, value: false, notify: true, observer: '_openedChanged'},

@@ -117,7 +166,3 @@ /**

*/
horizontalAlign: {
type: String,
value: 'left',
reflectToAttribute: true
},
horizontalAlign: {type: String, value: 'left', reflectToAttribute: true},

@@ -128,7 +173,3 @@ /**

*/
verticalAlign: {
type: String,
value: 'top',
reflectToAttribute: true
},
verticalAlign: {type: String, value: 'top', reflectToAttribute: true},

@@ -141,5 +182,3 @@ /**

*/
dynamicAlign: {
type: Boolean
},
dynamicAlign: {type: Boolean},

@@ -151,7 +190,3 @@ /**

*/
horizontalOffset: {
type: Number,
value: 0,
notify: true
},
horizontalOffset: {type: Number, value: 0, notify: true},

@@ -163,7 +198,3 @@ /**

*/
verticalOffset: {
type: Number,
value: 0,
notify: true
},
verticalOffset: {type: Number, value: 0, notify: true},

@@ -174,5 +205,3 @@ /**

*/
noOverlap: {
type: Boolean
},
noOverlap: {type: Boolean},

@@ -183,6 +212,3 @@ /**

*/
noAnimations: {
type: Boolean,
value: false
},
noAnimations: {type: Boolean, value: false},

@@ -193,6 +219,3 @@ /**

*/
ignoreSelect: {
type: Boolean,
value: false
},
ignoreSelect: {type: Boolean, value: false},

@@ -203,6 +226,3 @@ /**

*/
closeOnActivate: {
type: Boolean,
value: false
},
closeOnActivate: {type: Boolean, value: false},

@@ -216,23 +236,21 @@ /**

value: function() {
return [{
name: 'fade-in-animation',
timing: {
delay: 100,
duration: 200
return [
{name: 'fade-in-animation', timing: {delay: 100, duration: 200}},
{
name: 'paper-menu-grow-width-animation',
timing: {
delay: 100,
duration: 150,
easing: config.ANIMATION_CUBIC_BEZIER
}
},
{
name: 'paper-menu-grow-height-animation',
timing: {
delay: 100,
duration: 275,
easing: config.ANIMATION_CUBIC_BEZIER
}
}
}, {
name: 'paper-menu-grow-width-animation',
timing: {
delay: 100,
duration: 150,
easing: config.ANIMATION_CUBIC_BEZIER
}
}, {
name: 'paper-menu-grow-height-animation',
timing: {
delay: 100,
duration: 275,
easing: config.ANIMATION_CUBIC_BEZIER
}
}];
];
}

@@ -248,21 +266,17 @@ },

value: function() {
return [{
name: 'fade-out-animation',
timing: {
duration: 150
return [
{name: 'fade-out-animation', timing: {duration: 150}},
{
name: 'paper-menu-shrink-width-animation',
timing: {
delay: 100,
duration: 50,
easing: config.ANIMATION_CUBIC_BEZIER
}
},
{
name: 'paper-menu-shrink-height-animation',
timing: {duration: 200, easing: 'ease-in'}
}
}, {
name: 'paper-menu-shrink-width-animation',
timing: {
delay: 100,
duration: 50,
easing: config.ANIMATION_CUBIC_BEZIER
}
}, {
name: 'paper-menu-shrink-height-animation',
timing: {
duration: 200,
easing: 'ease-in'
}
}];
];
}

@@ -277,6 +291,3 @@ },

*/
allowOutsideScroll: {
type: Boolean,
value: false
},
allowOutsideScroll: {type: Boolean, value: false},

@@ -286,6 +297,3 @@ /**

*/
restoreFocusOnClose: {
type: Boolean,
value: true
},
restoreFocusOnClose: {type: Boolean, value: true},

@@ -296,16 +304,9 @@ /**

*/
_dropdownContent: {
type: Object
}
_dropdownContent: {type: Object}
},
hostAttributes: {
role: 'group',
'aria-haspopup': 'true'
},
hostAttributes: {role: 'group', 'aria-haspopup': 'true'},
listeners: {
'iron-activate': '_onIronActivate',
'iron-select': '_onIronSelect'
},
listeners:
{'iron-activate': '_onIronActivate', 'iron-select': '_onIronSelect'},

@@ -416,3 +417,2 @@ /**

var uiEvent = event.detail;
var target = dom(uiEvent).rootTarget;
var trigger = this.$.trigger;

@@ -427,6 +427,4 @@ var path = dom(uiEvent).path;

Object.keys(config).forEach(function (key) {
Object.keys(config).forEach(function(key) {
PaperMenuButton[key] = config[key];
});
export { PaperMenuButton };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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