@vaadin/vaadin-text-field
Advanced tools
Comparing version 2.1.0-alpha3 to 2.1.0-beta1
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-text-field", | ||
"version": "2.1.0-alpha3", | ||
"version": "2.1.0-beta1", | ||
"main": "vaadin-text-field.js", | ||
@@ -29,18 +29,18 @@ "author": "Vaadin Ltd", | ||
"@polymer/polymer": "^3.0.0", | ||
"@vaadin/vaadin-themable-mixin": "^1.2.0-alpha2", | ||
"@vaadin/vaadin-control-state-mixin": "^2.1.0-alpha2", | ||
"@vaadin/vaadin-lumo-styles": "^1.1.0-alpha3", | ||
"@vaadin/vaadin-material-styles": "^1.1.0-alpha2", | ||
"@vaadin/vaadin-element-mixin": "^1.1.0-alpha1" | ||
"@vaadin/vaadin-themable-mixin": "^1.2.1", | ||
"@vaadin/vaadin-control-state-mixin": "^2.1.1", | ||
"@vaadin/vaadin-lumo-styles": "^1.1.0-beta1", | ||
"@vaadin/vaadin-material-styles": "^1.1.0-beta1", | ||
"@vaadin/vaadin-element-mixin": "^1.1.2" | ||
}, | ||
"devDependencies": { | ||
"@polymer/iron-component-page": "^3.0.0-pre.12", | ||
"@polymer/iron-demo-helpers": "^3.0.0-pre.12", | ||
"@polymer/iron-form": "^3.0.0-pre.12", | ||
"@polymer/iron-test-helpers": "^3.0.0-pre.12", | ||
"@webcomponents/webcomponentsjs": "^1.0.0", | ||
"wct-browser-legacy": "0.0.1-pre.11", | ||
"@vaadin/vaadin-demo-helpers": "^2.0.0-alpha2", | ||
"@vaadin/vaadin-button": "^2.1.0-alpha2" | ||
"@polymer/iron-component-page": "^3.0.0-pre.18", | ||
"@polymer/iron-demo-helpers": "^3.0.0-pre.18", | ||
"@polymer/iron-form": "^3.0.0-pre.18", | ||
"@polymer/iron-test-helpers": "^3.0.0-pre.18", | ||
"@webcomponents/webcomponentsjs": "^2.0.0", | ||
"wct-browser-legacy": "^1.0.1", | ||
"@vaadin/vaadin-demo-helpers": "^2.0.1", | ||
"@vaadin/vaadin-button": "^2.1.0-beta1" | ||
} | ||
} |
@@ -75,28 +75,31 @@ [![npm version](https://badge.fury.io/js/%40vaadin%2Fvaadin-text-field.svg)](https://badge.fury.io/js/%40vaadin%2Fvaadin-text-field) | ||
## Getting Started | ||
## Getting started | ||
Vaadin components use the Lumo theme by default. | ||
## The file structure for Vaadin components | ||
To use the Material theme, import the correspondent file from the `theme/material` folder. | ||
- `src/vaadin-text-field.html` | ||
- `src/vaadin-text-area.html` | ||
- `src/vaadin-password-field.html` | ||
## Entry points | ||
Unstyled components. | ||
- The components with the Lumo theme: | ||
- `theme/lumo/vaadin-text-field.html` | ||
- `theme/lumo/vaadin-text-area.html` | ||
- `theme/lumo/vaadin-password-field.html` | ||
`theme/lumo/vaadin-text-field.html` | ||
`theme/lumo/vaadin-text-area.html` | ||
`theme/lumo/vaadin-password-field.html` | ||
Components with Lumo theme. | ||
- The components with the Material theme: | ||
- `vaadin-text-field.html` | ||
- `vaadin-text-area.html` | ||
- `vaadin-password-field.html` | ||
`theme/material/vaadin-text-field.html` | ||
`theme/material/vaadin-text-area.html` | ||
`theme/material/vaadin-password-field.html` | ||
Aliases for theme/lumo/vaadin-text-field.html | ||
theme/lumo/vaadin-text-area.html | ||
theme/lumo/vaadin-password-field.html | ||
- Aliases for `theme/lumo/vaadin-text-field.html` | ||
`theme/lumo/vaadin-text-area.html` | ||
`theme/lumo/vaadin-password-field.html`: | ||
`vaadin-text-field.html` | ||
`vaadin-text-area.html` | ||
`vaadin-password-field.html` | ||
## Running demos and tests in browser | ||
@@ -128,8 +131,5 @@ | ||
## Creating a pull request | ||
## Contributing | ||
- Make sure your code is compliant with our code linters: `gulp lint` | ||
- Check that tests are passing: `polymer test` | ||
- [Submit a pull request](https://www.digitalocean.com/community/tutorials/how-to-create-a-pull-request-on-github) with detailed title and description | ||
- Wait for response from one of Vaadin components team members | ||
To contribute to the component, please read [the guideline](https://github.com/vaadin/vaadin-core/blob/master/CONTRIBUTING.md) first. | ||
@@ -136,0 +136,0 @@ |
@@ -0,7 +1,12 @@ | ||
/** | ||
@license | ||
Copyright (c) 2017 Vaadin Ltd. | ||
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
*/ | ||
import '@polymer/polymer/polymer-element.js'; | ||
import '@polymer/polymer/lib/elements/custom-style.js'; | ||
import { TextFieldElement } from './vaadin-text-field.js'; | ||
import { DomModule } from '@polymer/polymer/lib/elements/dom-module.js'; | ||
const $_documentContainer = document.createElement('div'); | ||
$_documentContainer.setAttribute('style', 'display: none;'); | ||
const $_documentContainer = document.createElement('template'); | ||
@@ -36,3 +41,3 @@ $_documentContainer.innerHTML = `<custom-style> | ||
document.head.appendChild($_documentContainer); | ||
document.head.appendChild($_documentContainer.content); | ||
let memoizedTemplate; | ||
@@ -76,3 +81,3 @@ | ||
static get version() { | ||
return '2.1.0-alpha3'; | ||
return '2.1.0-beta1'; | ||
} | ||
@@ -79,0 +84,0 @@ |
@@ -0,2 +1,8 @@ | ||
/** | ||
@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 { TextFieldMixin } from './vaadin-text-field-mixin.js'; | ||
@@ -114,3 +120,3 @@ import { ElementMixin } from '@vaadin/vaadin-element-mixin/vaadin-element-mixin.js'; | ||
static get version() { | ||
return '2.1.0-alpha3'; | ||
return '2.1.0-beta1'; | ||
} | ||
@@ -117,0 +123,0 @@ |
@@ -0,5 +1,10 @@ | ||
/** | ||
@license | ||
Copyright (c) 2017 Vaadin Ltd. | ||
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/ | ||
*/ | ||
import '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js'; | ||
import { ControlStateMixin } from '@vaadin/vaadin-control-state-mixin/vaadin-control-state-mixin.js'; | ||
const $_documentContainer = document.createElement('div'); | ||
$_documentContainer.setAttribute('style', 'display: none;'); | ||
const $_documentContainer = document.createElement('template'); | ||
@@ -85,4 +90,8 @@ $_documentContainer.innerHTML = `<dom-module id="vaadin-text-field-shared-styles"> | ||
document.head.appendChild($_documentContainer); | ||
document.head.appendChild($_documentContainer.content); | ||
/** | ||
* @polymerMixin | ||
* @mixes Vaadin.ControlStateMixin | ||
*/ | ||
export const TextFieldMixin = subclass => class VaadinTextFieldMixin extends ControlStateMixin(subclass) { | ||
@@ -89,0 +98,0 @@ static get properties() { |
@@ -0,2 +1,8 @@ | ||
/** | ||
@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 { TextFieldMixin } from './vaadin-text-field-mixin.js'; | ||
@@ -96,3 +102,3 @@ import { ElementMixin } from '@vaadin/vaadin-element-mixin/vaadin-element-mixin.js'; | ||
static get version() { | ||
return '2.1.0-alpha3'; | ||
return '2.1.0-beta1'; | ||
} | ||
@@ -99,0 +105,0 @@ |
@@ -1,3 +0,2 @@ | ||
const $_documentContainer = document.createElement('div'); | ||
$_documentContainer.setAttribute('style', 'display: none;'); | ||
const $_documentContainer = document.createElement('template'); | ||
@@ -21,2 +20,2 @@ $_documentContainer.innerHTML = `<dom-module id="text-field-styles" theme-for="vaadin-text-field vaadin-text-area"> | ||
document.head.appendChild($_documentContainer); | ||
document.head.appendChild($_documentContainer.content); |
gemini.suite('vaadin-text-field', function(rootSuite) { | ||
function wait(actions, find) { | ||
actions.wait(5000); | ||
return actions | ||
.waitForJSCondition(function(window) { | ||
return window.WebComponents && window.WebComponents.ready; | ||
}, 60000); | ||
} | ||
@@ -17,9 +20,16 @@ | ||
gemini.suite('text-field', function(suite) { | ||
gemini.suite('text-field-1', function(suite) { | ||
suite | ||
.setUrl('vaadin-text-field/text-field.html') | ||
.setUrl('vaadin-text-field/text-field-1.html') | ||
.setCaptureElements('#text-field') | ||
.capture('text-field'); | ||
.capture('text-field-1'); | ||
}); | ||
gemini.suite('text-field-2', function(suite) { | ||
suite | ||
.setUrl('vaadin-text-field/text-field-2.html') | ||
.setCaptureElements('#text-field') | ||
.capture('text-field-2'); | ||
}); | ||
gemini.suite('text-field-styling', function(suite) { | ||
@@ -26,0 +36,0 @@ suite |
import '@vaadin/vaadin-lumo-styles/font-icons.js'; | ||
import '@vaadin/vaadin-lumo-styles/sizing.js'; | ||
import '@vaadin/vaadin-lumo-styles/mixins/field-button.js'; | ||
const $_documentContainer = document.createElement('div'); | ||
$_documentContainer.setAttribute('style', 'display: none;'); | ||
const $_documentContainer = document.createElement('template'); | ||
@@ -26,2 +25,2 @@ $_documentContainer.innerHTML = `<dom-module id="lumo-password-field" theme-for="vaadin-password-field"> | ||
document.head.appendChild($_documentContainer); | ||
document.head.appendChild($_documentContainer.content); |
import '@vaadin/vaadin-lumo-styles/color.js'; | ||
import '@vaadin/vaadin-lumo-styles/sizing.js'; | ||
import '@vaadin/vaadin-lumo-styles/typography.js'; | ||
const $_documentContainer = document.createElement('div'); | ||
$_documentContainer.setAttribute('style', 'display: none;'); | ||
const $_documentContainer = document.createElement('template'); | ||
@@ -20,3 +19,3 @@ $_documentContainer.innerHTML = `<dom-module id="lumo-text-area" theme-for="vaadin-text-area"> | ||
[part="input-field"]::after { | ||
:host(:not([readonly])) [part="input-field"]::after { | ||
display: none; | ||
@@ -57,2 +56,2 @@ } | ||
document.head.appendChild($_documentContainer); | ||
document.head.appendChild($_documentContainer.content); |
@@ -6,4 +6,3 @@ import '@vaadin/vaadin-lumo-styles/color.js'; | ||
import '@vaadin/vaadin-lumo-styles/typography.js'; | ||
const $_documentContainer = document.createElement('div'); | ||
$_documentContainer.setAttribute('style', 'display: none;'); | ||
const $_documentContainer = document.createElement('template'); | ||
@@ -349,2 +348,2 @@ $_documentContainer.innerHTML = `<dom-module id="lumo-text-field" theme-for="vaadin-text-field"> | ||
document.head.appendChild($_documentContainer); | ||
document.head.appendChild($_documentContainer.content); |
import './vaadin-text-field-styles.js'; | ||
import '@vaadin/vaadin-material-styles/font-icons.js'; | ||
import '@vaadin/vaadin-material-styles/mixins/field-button.js'; | ||
const $_documentContainer = document.createElement('div'); | ||
$_documentContainer.setAttribute('style', 'display: none;'); | ||
const $_documentContainer = document.createElement('template'); | ||
@@ -35,2 +34,2 @@ $_documentContainer.innerHTML = `<dom-module id="material-password-field" theme-for="vaadin-password-field"> | ||
document.head.appendChild($_documentContainer); | ||
document.head.appendChild($_documentContainer.content); |
import './vaadin-text-field-styles.js'; | ||
const $_documentContainer = document.createElement('div'); | ||
$_documentContainer.setAttribute('style', 'display: none;'); | ||
const $_documentContainer = document.createElement('template'); | ||
@@ -22,2 +21,2 @@ $_documentContainer.innerHTML = `<dom-module id="material-text-area" theme-for="vaadin-text-area"> | ||
document.head.appendChild($_documentContainer); | ||
document.head.appendChild($_documentContainer.content); |
import '@vaadin/vaadin-material-styles/color.js'; | ||
import '@vaadin/vaadin-material-styles/typography.js'; | ||
const $_documentContainer = document.createElement('div'); | ||
$_documentContainer.setAttribute('style', 'display: none;'); | ||
const $_documentContainer = document.createElement('template'); | ||
@@ -264,2 +263,2 @@ $_documentContainer.innerHTML = `<dom-module id="material-text-field" theme-for="vaadin-text-field"> | ||
document.head.appendChild($_documentContainer); | ||
document.head.appendChild($_documentContainer.content); |
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
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
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
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
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
255647
64
1493