@vaadin/vaadin-button
Advanced tools
Comparing version 2.0.0-pre.4 to 2.1.0-alpha2
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-button", | ||
"version": "2.0.0-pre.4", | ||
"version": "2.1.0-alpha2", | ||
"main": "vaadin-button.js", | ||
@@ -25,21 +25,21 @@ "author": "Vaadin Ltd", | ||
"supports-color": "3.1.2", | ||
"type-detect": "1.0.0", | ||
"@webcomponents/webcomponentsjs": "2.0.0" | ||
"type-detect": "1.0.0" | ||
}, | ||
"dependencies": { | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/vaadin-control-state-mixin": "^2.0.3-pre.3", | ||
"@vaadin/vaadin-themable-mixin": "^1.1.5-pre.3", | ||
"@vaadin/vaadin-lumo-styles": "^1.0.0-pre.6", | ||
"@vaadin/vaadin-element-mixin": "^1.0.2-pre.3" | ||
"@vaadin/vaadin-control-state-mixin": "^2.1.0-alpha2", | ||
"@vaadin/vaadin-element-mixin": "^1.1.0-alpha1", | ||
"@vaadin/vaadin-lumo-styles": "^1.1.0-alpha3", | ||
"@vaadin/vaadin-material-styles": "^1.1.0-alpha2", | ||
"@vaadin/vaadin-themable-mixin": "^1.2.0-alpha2" | ||
}, | ||
"devDependencies": { | ||
"@polymer/iron-component-page": "^3.0.0-pre.18", | ||
"@polymer/iron-demo-helpers": "^3.0.0-pre.18", | ||
"@polymer/iron-icon": "^3.0.0-pre.18", | ||
"@polymer/iron-test-helpers": "^3.0.0-pre.18", | ||
"@webcomponents/webcomponentsjs": "^2.0.0", | ||
"wct-browser-legacy": "^0.0.1-pre.11", | ||
"@vaadin/vaadin-demo-helpers": "^1.2.5-pre.1" | ||
"@polymer/iron-component-page": "^3.0.0-pre.12", | ||
"@polymer/iron-demo-helpers": "^3.0.0-pre.12", | ||
"@polymer/iron-icon": "^3.0.0-pre.12", | ||
"@polymer/iron-test-helpers": "^3.0.0-pre.12", | ||
"@vaadin/vaadin-demo-helpers": "^2.0.0-alpha2", | ||
"@webcomponents/webcomponentsjs": "^1.0.0", | ||
"wct-browser-legacy": "0.0.1-pre.11" | ||
} | ||
} |
@@ -1,7 +0,10 @@ | ||
![Bower version](https://img.shields.io/bower/v/vaadin-button.svg) | ||
[![npm version](https://badge.fury.io/js/%40vaadin%2Fvaadin-button.svg)](https://badge.fury.io/js/%40vaadin%2Fvaadin-button) | ||
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/vaadin/vaadin-button) | ||
[![Build Status](https://travis-ci.org/vaadin/vaadin-button.svg?branch=master)](https://travis-ci.org/vaadin/vaadin-button) | ||
[![Coverage Status](https://coveralls.io/repos/github/vaadin/vaadin-button/badge.svg?branch=master)](https://coveralls.io/github/vaadin/vaadin-button?branch=master) | ||
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/vaadin/web-components?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) | ||
[![Published on Vaadin Directory](https://img.shields.io/badge/Vaadin%20Directory-published-00b4f0.svg)](https://vaadin.com/directory/component/vaadinvaadin-button) | ||
[![Stars on vaadin.com/directory](https://img.shields.io/vaadin-directory/star/vaadinvaadin-button.svg)](https://vaadin.com/directory/component/vaadinvaadin-button) | ||
# <vaadin-button> | ||
@@ -8,0 +11,0 @@ |
@@ -1,8 +0,2 @@ | ||
/** | ||
@license | ||
Copyright (c) 2017 Vaadin Ltd. | ||
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
*/ | ||
import { PolymerElement } from '@polymer/polymer/polymer-element.js'; | ||
import { GestureEventListeners } from '@polymer/polymer/lib/mixins/gesture-event-listeners.js'; | ||
@@ -22,2 +16,6 @@ import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
* | ||
* ```js | ||
* document.querySelector('vaadin-button').addEventListener('click', () => alert('Hello World!')); | ||
* ``` | ||
* | ||
* ### Styling | ||
@@ -133,3 +131,3 @@ * | ||
static get version() { | ||
return '2.0.0-pre.4'; | ||
return '2.1.0-alpha2'; | ||
} | ||
@@ -136,0 +134,0 @@ |
@@ -6,3 +6,3 @@ import '@vaadin/vaadin-lumo-styles/color.js'; | ||
import '@vaadin/vaadin-lumo-styles/typography.js'; | ||
const $_documentContainer = document.createElement('template'); | ||
const $_documentContainer = document.createElement('div'); | ||
$_documentContainer.setAttribute('style', 'display: none;'); | ||
@@ -12,15 +12,5 @@ | ||
<template> | ||
<style include="lumo-button-sizing lumo-button-style lumo-button-states lumo-button-types lumo-button-colors lumo-button-icons"> | ||
/* This needs to be the last selector for it to take priority */ | ||
:host([disabled][disabled]) { | ||
pointer-events: none; | ||
color: var(--lumo-disabled-text-color); | ||
background-color: var(--lumo-contrast-5pct); | ||
} | ||
</style> | ||
</template> | ||
</dom-module><dom-module id="lumo-button-sizing"> | ||
<template> | ||
<style> | ||
:host { | ||
/* Sizing */ | ||
--lumo-button-size: var(--lumo-size-m); | ||
@@ -32,4 +22,22 @@ min-width: calc(var(--lumo-button-size) * 2); | ||
box-sizing: border-box; | ||
/* Style */ | ||
font-family: var(--lumo-font-family); | ||
font-size: var(--lumo-font-size-m); | ||
font-weight: 500; | ||
color: var(--lumo-primary-text-color); | ||
background-color: var(--lumo-contrast-5pct); | ||
border-radius: var(--lumo-border-radius); | ||
cursor: default; | ||
-webkit-tap-highlight-color: transparent; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} | ||
/* Set only for the internal parts so we don’t affect the host vertical alignment */ | ||
[part="label"], | ||
[part="prefix"], | ||
[part="suffix"] { | ||
line-height: var(--lumo-line-height-xs); | ||
} | ||
[part="label"] { | ||
@@ -48,31 +56,11 @@ padding: calc(var(--lumo-button-size) / 6) 0; | ||
} | ||
</style> | ||
</template> | ||
</dom-module><dom-module id="lumo-button-style"> | ||
<template> | ||
<style> | ||
:host { | ||
font-family: var(--lumo-font-family); | ||
font-size: var(--lumo-font-size-m); | ||
font-weight: 500; | ||
color: var(--lumo-primary-text-color); | ||
/* This needs to be the last selector for it to take priority */ | ||
:host([disabled][disabled]) { | ||
pointer-events: none; | ||
color: var(--lumo-disabled-text-color); | ||
background-color: var(--lumo-contrast-5pct); | ||
border-radius: var(--lumo-border-radius); | ||
cursor: default; | ||
-webkit-tap-highlight-color: transparent; | ||
-webkit-font-smoothing: antialiased; | ||
-moz-osx-font-smoothing: grayscale; | ||
} | ||
/* Set only for the internal parts so we don’t affect the host vertical alignment */ | ||
[part="label"], | ||
[part="prefix"], | ||
[part="suffix"] { | ||
line-height: var(--lumo-line-height-xs); | ||
} | ||
</style> | ||
</template> | ||
</dom-module><dom-module id="lumo-button-states"> | ||
<template> | ||
<style> | ||
/* For interaction states */ | ||
:host::before, | ||
@@ -101,3 +89,3 @@ :host::after { | ||
/* Disable for touch devices */ | ||
/* Disable hover for touch devices */ | ||
@media (pointer: coarse) { | ||
@@ -132,9 +120,5 @@ :host(:not([active]):hover)::before { | ||
} | ||
</style> | ||
</template> | ||
</dom-module><dom-module id="lumo-button-types"> | ||
<template> | ||
<style> | ||
/* Tertiary */ | ||
/* Types (primary, tertiary, tertiary-inline */ | ||
:host([theme~="tertiary"]), | ||
@@ -168,4 +152,2 @@ :host([theme~="tertiary-inline"]) { | ||
/* Tertiary inline ("text button") */ | ||
:host([theme~="tertiary-inline"]) { | ||
@@ -184,4 +166,2 @@ margin: 0; | ||
/* Primary */ | ||
:host([theme~="primary"]) { | ||
@@ -215,7 +195,5 @@ background-color: var(--lumo-primary-color); | ||
} | ||
</style> | ||
</template> | ||
</dom-module><dom-module id="lumo-button-colors"> | ||
<template> | ||
<style> | ||
/* Colors (success, error, contrast) */ | ||
:host([theme~="success"]) { | ||
@@ -247,7 +225,5 @@ color: var(--lumo-success-text-color); | ||
} | ||
</style> | ||
</template> | ||
</dom-module><dom-module id="lumo-button-icons"> | ||
<template> | ||
<style> | ||
/* Icons */ | ||
[part] ::slotted(iron-icon) { | ||
@@ -292,2 +268,2 @@ display: inline-block; | ||
document.head.appendChild($_documentContainer.content); | ||
document.head.appendChild($_documentContainer); |
Sorry, the diff of this file is not supported yet
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
225294
43
878
130
6
2
3
1
+ Added@vaadin/vaadin-material-styles@1.3.2(transitive)