summaryrefslogtreecommitdiff
path: root/chromium/third_party/polymer
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/polymer')
-rw-r--r--chromium/third_party/polymer/v1_0/bower.json3
-rw-r--r--chromium/third_party/polymer/v1_0/chromium.patch15
-rw-r--r--chromium/third_party/polymer/v1_0/components-chromium/iron-input/BUILD.gn14
-rw-r--r--chromium/third_party/polymer/v1_0/components-chromium/iron-input/bower.json60
-rw-r--r--chromium/third_party/polymer/v1_0/components-chromium/iron-input/iron-input-extracted.js262
-rw-r--r--chromium/third_party/polymer/v1_0/components-chromium/iron-input/iron-input.html101
-rw-r--r--chromium/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/BUILD.gn11
-rw-r--r--chromium/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/bower.json57
-rw-r--r--chromium/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/iron-validatable-behavior-extracted.js115
-rw-r--r--chromium/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/iron-validatable-behavior.html12
-rw-r--r--chromium/third_party/polymer/v1_0/components-chromium/paper-input/BUILD.gn17
-rw-r--r--chromium/third_party/polymer/v1_0/components-chromium/paper-input/bower.json84
-rw-r--r--chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-addon-behavior-extracted.js28
-rw-r--r--chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-addon-behavior.html11
-rw-r--r--chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-container-extracted.js320
-rw-r--r--chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-container.html375
-rw-r--r--chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-error-extracted.js33
-rw-r--r--chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-error.html58
-rw-r--r--chromium/third_party/polymer/v1_0/components_summary.txt18
-rw-r--r--chromium/third_party/polymer/v1_0/rsync_exclude.txt13
-rw-r--r--chromium/third_party/polymer/v3_0/components-chromium/iron-input/BUILD.gn15
-rw-r--r--chromium/third_party/polymer/v3_0/components-chromium/iron-input/iron-input.js368
-rw-r--r--chromium/third_party/polymer/v3_0/components-chromium/iron-validatable-behavior/BUILD.gn14
-rw-r--r--chromium/third_party/polymer/v3_0/components-chromium/iron-validatable-behavior/iron-validatable-behavior.js131
-rw-r--r--chromium/third_party/polymer/v3_0/components-chromium/paper-input/BUILD.gn29
-rw-r--r--chromium/third_party/polymer/v3_0/components-chromium/paper-input/paper-input-addon-behavior.js39
-rw-r--r--chromium/third_party/polymer/v3_0/components-chromium/paper-input/paper-input-container.js687
-rw-r--r--chromium/third_party/polymer/v3_0/components-chromium/paper-input/paper-input-error.js107
-rw-r--r--chromium/third_party/polymer/v3_0/package-lock.json35
-rw-r--r--chromium/third_party/polymer/v3_0/package.json3
-rw-r--r--chromium/third_party/polymer/v3_0/rsync_exclude.txt12
31 files changed, 6 insertions, 3041 deletions
diff --git a/chromium/third_party/polymer/v1_0/bower.json b/chromium/third_party/polymer/v1_0/bower.json
index 645c2bdf15b..90f1138a79f 100644
--- a/chromium/third_party/polymer/v1_0/bower.json
+++ b/chromium/third_party/polymer/v1_0/bower.json
@@ -14,7 +14,6 @@
"iron-flex-layout": "PolymerElements/iron-flex-layout#2.0.3",
"iron-icon": "PolymerElements/iron-icon#2.0.1",
"iron-iconset-svg": "PolymerElements/iron-iconset-svg#2.1.1",
- "iron-input": "PolymerElements/iron-input#2.1.3",
"iron-list": "PolymerElements/iron-list#2.0.20",
"iron-location": "PolymerElements/iron-location#2.0.3",
"iron-media-query": "PolymerElements/iron-media-query#2.0.0",
@@ -27,10 +26,8 @@
"iron-scroll-threshold": "PolymerElements/iron-scroll-threshold#2.0.0",
"iron-selector": "PolymerElements/iron-selector#2.0.1",
"iron-test-helpers": "PolymerElements/iron-test-helpers#2.0.0",
- "iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#2.1.0",
"neon-animation": "PolymerElements/neon-animation#2.1.0",
"paper-behaviors": "PolymerElements/paper-behaviors#2.1.0",
- "paper-input": "PolymerElements/paper-input#2.2.2",
"paper-progress": "PolymerElements/paper-progress#2.0.1",
"paper-ripple": "PolymerElements/paper-ripple#2.0.1",
"paper-spinner": "PolymerElements/paper-spinner#2.0.0",
diff --git a/chromium/third_party/polymer/v1_0/chromium.patch b/chromium/third_party/polymer/v1_0/chromium.patch
index 3d918898039..333b338d426 100644
--- a/chromium/third_party/polymer/v1_0/chromium.patch
+++ b/chromium/third_party/polymer/v1_0/chromium.patch
@@ -167,21 +167,6 @@ index 082b0c1e4af2..d985829702a2 100644
\ No newline at end of file
+</body></html>
\ No newline at end of file
-diff --git a/components-chromium/paper-input/paper-input-container.html b/components-chromium/paper-input/paper-input-container.html
-index 55714942c93c..46fb9adf6a04 100644
---- a/components-chromium/paper-input/paper-input-container.html
-+++ b/components-chromium/paper-input/paper-input-container.html
-@@ -254,8 +254,8 @@ This element is `display:block` by default, but you can set the `inline` attribu
- @apply --paper-input-container-label-floating;
- }
-
-- :host(:dir(rtl)) .input-content.label-is-floating ::slotted(label),
-- :host(:dir(rtl)) .input-content.label-is-floating ::slotted(.paper-input-label) {
-+ :host-context([dir="rtl"]) .input-content.label-is-floating ::slotted(label),
-+ :host-context([dir="rtl"]) .input-content.label-is-floating ::slotted(.paper-input-label) {
- right: 0;
- left: auto;
- transform-origin: right top;
diff --git a/components-chromium/paper-tooltip/paper-tooltip-extracted.js b/components-chromium/paper-tooltip/paper-tooltip-extracted.js
index 2830d229760c..2116f616a93b 100644
--- a/components-chromium/paper-tooltip/paper-tooltip-extracted.js
diff --git a/chromium/third_party/polymer/v1_0/components-chromium/iron-input/BUILD.gn b/chromium/third_party/polymer/v1_0/components-chromium/iron-input/BUILD.gn
deleted file mode 100644
index 8ee4910fd09..00000000000
--- a/chromium/third_party/polymer/v1_0/components-chromium/iron-input/BUILD.gn
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright 2020 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-#
-# NOTE: Created with generate_gn.py, please do not edit.
-
-import("//third_party/closure_compiler/compile_js.gni")
-
-js_library("iron-input-extracted") {
- deps = [
- "../iron-a11y-announcer:iron-a11y-announcer-extracted",
- "../iron-validatable-behavior:iron-validatable-behavior-extracted",
- ]
-}
diff --git a/chromium/third_party/polymer/v1_0/components-chromium/iron-input/bower.json b/chromium/third_party/polymer/v1_0/components-chromium/iron-input/bower.json
deleted file mode 100644
index 57976900b3d..00000000000
--- a/chromium/third_party/polymer/v1_0/components-chromium/iron-input/bower.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "name": "iron-input",
- "version": "2.1.3",
- "description": "An input element with data binding",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "input"
- ],
- "main": "iron-input.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-input.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/iron-input",
- "ignore": [],
- "dependencies": {
- "iron-a11y-announcer": "PolymerElements/iron-a11y-announcer#1 - 2",
- "iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#1 - 2",
- "polymer": "Polymer/polymer#1.9 - 2"
- },
- "devDependencies": {
- "iron-component-page": "polymerelements/iron-component-page#1 - 2",
- "iron-demo-helpers": "polymerelements/iron-demo-helpers#1 - 2",
- "iron-validator-behavior": "PolymerElements/iron-validator-behavior#1 - 2",
- "paper-styles": "polymerelements/paper-styles#1 - 2",
- "test-fixture": "PolymerElements/test-fixture#^3.0.0-rc.1",
- "web-component-tester": "^6.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0"
- },
- "variants": {
- "1.x": {
- "dependencies": {
- "iron-a11y-announcer": "PolymerElements/iron-a11y-announcer#^1.0.0",
- "iron-validatable-behavior": "PolymerElements/iron-validatable-behavior#^1.0.0",
- "polymer": "Polymer/polymer#^1.9"
- },
- "devDependencies": {
- "iron-component-page": "polymerelements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "polymerelements/iron-demo-helpers#^1.0.0",
- "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
- "paper-styles": "polymerelements/paper-styles#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "web-component-tester": "Polymer/web-component-tester#^4.0.0"
- },
- "resolutions": {
- "webcomponentsjs": "^0.7"
- }
- }
- },
- "resolutions": {
- "webcomponentsjs": "^1.0.0"
- }
-}
diff --git a/chromium/third_party/polymer/v1_0/components-chromium/iron-input/iron-input-extracted.js b/chromium/third_party/polymer/v1_0/components-chromium/iron-input/iron-input-extracted.js
deleted file mode 100644
index d0522f20fa8..00000000000
--- a/chromium/third_party/polymer/v1_0/components-chromium/iron-input/iron-input-extracted.js
+++ /dev/null
@@ -1,262 +0,0 @@
-Polymer({
- is: 'iron-input',
-
- behaviors: [Polymer.IronValidatableBehavior],
-
- /**
- * Fired whenever `validate()` is called.
- *
- * @event iron-input-validate
- */
-
- properties: {
-
- /**
- * Use this property instead of `value` for two-way data binding, or to
- * set a default value for the input. **Do not** use the distributed
- * input's `value` property to set a default value.
- */
- bindValue: {type: String, value: ''},
-
- /**
- * Computed property that echoes `bindValue` (mostly used for Polymer 1.0
- * backcompatibility, if you were one-way binding to the Polymer 1.0
- * `input is="iron-input"` value attribute).
- */
- value: {type: String, computed: '_computeValue(bindValue)'},
-
- /**
- * Regex-like list of characters allowed as input; all characters not in the
- * list will be rejected. The recommended format should be a list of allowed
- * characters, for example, `[a-zA-Z0-9.+-!;:]`.
- *
- * This pattern represents the allowed characters for the field; as the user
- * inputs text, each individual character will be checked against the
- * pattern (rather than checking the entire value as a whole). If a
- * character is not a match, it will be rejected.
- *
- * Pasted input will have each character checked individually; if any
- * character doesn't match `allowedPattern`, the entire pasted string will
- * be rejected.
- *
- * Note: if you were using `iron-input` in 1.0, you were also required to
- * set `prevent-invalid-input`. This is no longer needed as of Polymer 2.0,
- * and will be set automatically for you if an `allowedPattern` is provided.
- *
- */
- allowedPattern: {type: String},
-
- /**
- * Set to true to auto-validate the input value as you type.
- */
- autoValidate: {type: Boolean, value: false},
-
- /**
- * The native input element.
- */
- _inputElement: Object,
- },
-
- observers: ['_bindValueChanged(bindValue, _inputElement)'],
-
- listeners: {'input': '_onInput', 'keypress': '_onKeypress'},
-
- created: function() {
- Polymer.IronA11yAnnouncer.requestAvailability();
- this._previousValidInput = '';
- this._patternAlreadyChecked = false;
- },
-
- attached: function() {
- // If the input is added at a later time, update the internal reference.
- this._observer = Polymer.dom(this).observeNodes(function(info) {
- this._initSlottedInput();
- }.bind(this));
- },
-
- detached: function() {
- if (this._observer) {
- Polymer.dom(this).unobserveNodes(this._observer);
- this._observer = null;
- }
- },
-
- /**
- * Returns the distributed input element.
- */
- get inputElement() {
- return this._inputElement;
- },
-
- _initSlottedInput: function() {
- this._inputElement = this.getEffectiveChildren()[0];
-
- if (this.inputElement && this.inputElement.value) {
- this.bindValue = this.inputElement.value;
- }
-
- this.fire('iron-input-ready');
- },
-
- get _patternRegExp() {
- var pattern;
- if (this.allowedPattern) {
- pattern = new RegExp(this.allowedPattern);
- } else {
- switch (this.inputElement.type) {
- case 'number':
- pattern = /[0-9.,e-]/;
- break;
- }
- }
- return pattern;
- },
-
- /**
- * @suppress {checkTypes}
- */
- _bindValueChanged: function(bindValue, inputElement) {
- // The observer could have run before attached() when we have actually
- // initialized this property.
- if (!inputElement) {
- return;
- }
-
- if (bindValue === undefined) {
- inputElement.value = null;
- } else if (bindValue !== inputElement.value) {
- this.inputElement.value = bindValue;
- }
-
- if (this.autoValidate) {
- this.validate();
- }
-
- // manually notify because we don't want to notify until after setting value
- this.fire('bind-value-changed', {value: bindValue});
- },
-
- _onInput: function() {
- // Need to validate each of the characters pasted if they haven't
- // been validated inside `_onKeypress` already.
- if (this.allowedPattern && !this._patternAlreadyChecked) {
- var valid = this._checkPatternValidity();
- if (!valid) {
- this._announceInvalidCharacter(
- 'Invalid string of characters not entered.');
- this.inputElement.value = this._previousValidInput;
- }
- }
- this.bindValue = this._previousValidInput = this.inputElement.value;
- this._patternAlreadyChecked = false;
- },
-
- _isPrintable: function(event) {
- // What a control/printable character is varies wildly based on the browser.
- // - most control characters (arrows, backspace) do not send a `keypress`
- // event
- // in Chrome, but the *do* on Firefox
- // - in Firefox, when they do send a `keypress` event, control chars have
- // a charCode = 0, keyCode = xx (for ex. 40 for down arrow)
- // - printable characters always send a keypress event.
- // - in Firefox, printable chars always have a keyCode = 0. In Chrome, the
- // keyCode
- // always matches the charCode.
- // None of this makes any sense.
-
- // For these keys, ASCII code == browser keycode.
- var anyNonPrintable = (event.keyCode == 8) || // backspace
- (event.keyCode == 9) || // tab
- (event.keyCode == 13) || // enter
- (event.keyCode == 27); // escape
-
- // For these keys, make sure it's a browser keycode and not an ASCII code.
- var mozNonPrintable = (event.keyCode == 19) || // pause
- (event.keyCode == 20) || // caps lock
- (event.keyCode == 45) || // insert
- (event.keyCode == 46) || // delete
- (event.keyCode == 144) || // num lock
- (event.keyCode == 145) || // scroll lock
- (event.keyCode > 32 &&
- event.keyCode < 41) || // page up/down, end, home, arrows
- (event.keyCode > 111 && event.keyCode < 124); // fn keys
-
- return !anyNonPrintable && !(event.charCode == 0 && mozNonPrintable);
- },
-
- _onKeypress: function(event) {
- if (!this.allowedPattern && this.inputElement.type !== 'number') {
- return;
- }
- var regexp = this._patternRegExp;
- if (!regexp) {
- return;
- }
-
- // Handle special keys and backspace
- if (event.metaKey || event.ctrlKey || event.altKey) {
- return;
- }
-
- // Check the pattern either here or in `_onInput`, but not in both.
- this._patternAlreadyChecked = true;
-
- var thisChar = String.fromCharCode(event.charCode);
- if (this._isPrintable(event) && !regexp.test(thisChar)) {
- event.preventDefault();
- this._announceInvalidCharacter(
- 'Invalid character ' + thisChar + ' not entered.');
- }
- },
-
- _checkPatternValidity: function() {
- var regexp = this._patternRegExp;
- if (!regexp) {
- return true;
- }
- for (var i = 0; i < this.inputElement.value.length; i++) {
- if (!regexp.test(this.inputElement.value[i])) {
- return false;
- }
- }
- return true;
- },
-
- /**
- * Returns true if `value` is valid. The validator provided in `validator`
- * will be used first, then any constraints.
- * @return {boolean} True if the value is valid.
- */
- validate: function() {
- if (!this.inputElement) {
- this.invalid = false;
- return true;
- }
-
- // Use the nested input's native validity.
- var valid = this.inputElement.checkValidity();
-
- // Only do extra checking if the browser thought this was valid.
- if (valid) {
- // Empty, required input is invalid
- if (this.required && this.bindValue === '') {
- valid = false;
- } else if (this.hasValidator()) {
- valid =
- Polymer.IronValidatableBehavior.validate.call(this, this.bindValue);
- }
- }
-
- this.invalid = !valid;
- this.fire('iron-input-validate');
- return valid;
- },
-
- _announceInvalidCharacter: function(message) {
- this.fire('iron-announce', {text: message});
- },
-
- _computeValue: function(bindValue) {
- return bindValue;
- }
- }); \ No newline at end of file
diff --git a/chromium/third_party/polymer/v1_0/components-chromium/iron-input/iron-input.html b/chromium/third_party/polymer/v1_0/components-chromium/iron-input/iron-input.html
deleted file mode 100644
index 844735b39eb..00000000000
--- a/chromium/third_party/polymer/v1_0/components-chromium/iron-input/iron-input.html
+++ /dev/null
@@ -1,101 +0,0 @@
-<!--
-@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
---><html><head><link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-a11y-announcer/iron-a11y-announcer.html">
-<link rel="import" href="../iron-validatable-behavior/iron-validatable-behavior.html">
-
-<!--
-`<iron-input>` is a wrapper to a native `<input>` element, that adds two-way binding
-and prevention of invalid input. To use it, you must distribute a native `<input>`
-yourself. You can continue to use the native `input` as you would normally:
-
- <iron-input>
- <input>
- </iron-input>
-
- <iron-input>
- <input type="email" disabled>
- </iron-input>
-
-### Two-way binding
-
-By default you can only get notified of changes to a native `<input>`'s `value`
-due to user input:
-
- <input value="{{myValue::input}}">
-
-This means that if you imperatively set the value (i.e. `someNativeInput.value = 'foo'`),
-no events will be fired and this change cannot be observed.
-
-`iron-input` adds the `bind-value` property that mirrors the native `input`'s '`value` property; this
-property can be used for two-way data binding.
-`bind-value` will notify if it is changed either by user input or by script.
-
- <iron-input bind-value="{{myValue}}">
- <input>
- </iron-input>
-
-Note: this means that if you want to imperatively set the native `input`'s, you _must_
-set `bind-value` instead, so that the wrapper `iron-input` can be notified.
-
-### Validation
-
-`iron-input` uses the native `input`'s validation. For simplicity, `iron-input`
-has a `validate()` method (which internally just checks the distributed `input`'s
-validity), which sets an `invalid` attribute that can also be used for styling.
-
-To validate automatically as you type, you can use the `auto-validate` attribute.
-
-`iron-input` also fires an `iron-input-validate` event after `validate()` is
-called. You can use it to implement a custom validator:
-
- var CatsOnlyValidator = {
- validate: function(ironInput) {
- var valid = !ironInput.bindValue || ironInput.bindValue === 'cat';
- ironInput.invalid = !valid;
- return valid;
- }
- }
- ironInput.addEventListener('iron-input-validate', function() {
- CatsOnly.validate(input2);
- });
-
-You can also use an element implementing an [`IronValidatorBehavior`](/element/PolymerElements/iron-validatable-behavior).
-This example can also be found in the demo for this element:
-
- <iron-input validator="cats-only">
- <input>
- </iron-input>
-
-### Preventing invalid input
-
-It may be desirable to only allow users to enter certain characters. You can use the
-`allowed-pattern` attribute to accomplish this. This feature
-is separate from validation, and `allowed-pattern` does not affect how the input is validated.
-
- // Only allow typing digits, but a valid input has exactly 5 digits.
- <iron-input allowed-pattern="[0-9]">
- <input pattern="\d{5}">
- </iron-input>
-
-@hero hero.svg
-@demo demo/index.html
--->
-
-</head><body><dom-module id="iron-input">
- <template>
- <style>
- :host {
- display: inline-block;
- }
- </style>
- <slot id="content"></slot>
- </template>
- </dom-module>
-<script src="iron-input-extracted.js"></script></body></html> \ No newline at end of file
diff --git a/chromium/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/BUILD.gn b/chromium/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/BUILD.gn
deleted file mode 100644
index 8ca357309a5..00000000000
--- a/chromium/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/BUILD.gn
+++ /dev/null
@@ -1,11 +0,0 @@
-# Copyright 2020 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-#
-# NOTE: Created with generate_gn.py, please do not edit.
-
-import("//third_party/closure_compiler/compile_js.gni")
-
-js_library("iron-validatable-behavior-extracted") {
- deps = [ "../iron-meta:iron-meta-extracted" ]
-}
diff --git a/chromium/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/bower.json b/chromium/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/bower.json
deleted file mode 100644
index a2ae6cff3c0..00000000000
--- a/chromium/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/bower.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "name": "iron-validatable-behavior",
- "version": "2.0.0",
- "description": "Provides a behavior for an element that validates user input",
- "authors": "The Polymer Authors",
- "keywords": [
- "web-components",
- "polymer",
- "iron",
- "behavior"
- ],
- "main": "iron-validatable-behavior.html",
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/iron-validatable-behavior.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/iron-validatable-behavior",
- "ignore": [],
- "dependencies": {
- "iron-meta": "PolymerElements/iron-meta#1 - 2",
- "polymer": "Polymer/polymer#1.9 - 2"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#1 - 2",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#1 - 2",
- "iron-validator-behavior": "PolymerElements/iron-validator-behavior#1 - 2",
- "paper-styles": "PolymerElements/paper-styles#1 - 2",
- "test-fixture": "PolymerElements/test-fixture#^3.0.0-rc.1",
- "web-component-tester": "^6.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0"
- },
- "variants": {
- "1.x": {
- "dependencies": {
- "iron-meta": "PolymerElements/iron-meta#^1.0.0",
- "polymer": "Polymer/polymer#^1.9"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.0.4",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0",
- "web-component-tester": "^4.0.0"
- },
- "resolutions": {
- "webcomponentsjs": "^0.7"
- }
- }
- },
- "resolutions": {
- "webcomponentsjs": "^1.0.0"
- }
-}
diff --git a/chromium/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/iron-validatable-behavior-extracted.js b/chromium/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/iron-validatable-behavior-extracted.js
deleted file mode 100644
index 1d64947d6e6..00000000000
--- a/chromium/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/iron-validatable-behavior-extracted.js
+++ /dev/null
@@ -1,115 +0,0 @@
-/**
- * Singleton IronMeta instance.
- */
- Polymer.IronValidatableBehaviorMeta = null;
-
- /**
- * `Use Polymer.IronValidatableBehavior` to implement an element that validates user input.
- * Use the related `Polymer.IronValidatorBehavior` to add custom validation logic to an iron-input.
- *
- * By default, an `<iron-form>` element validates its fields when the user presses the submit button.
- * To validate a form imperatively, call the form's `validate()` method, which in turn will
- * call `validate()` on all its children. By using `Polymer.IronValidatableBehavior`, your
- * custom element will get a public `validate()`, which
- * will return the validity of the element, and a corresponding `invalid` attribute,
- * which can be used for styling.
- *
- * To implement the custom validation logic of your element, you must override
- * the protected `_getValidity()` method of this behaviour, rather than `validate()`.
- * See [this](https://github.com/PolymerElements/iron-form/blob/master/demo/simple-element.html)
- * for an example.
- *
- * ### Accessibility
- *
- * Changing the `invalid` property, either manually or by calling `validate()` will update the
- * `aria-invalid` attribute.
- *
- * @demo demo/index.html
- * @polymerBehavior
- */
- Polymer.IronValidatableBehavior = {
-
- properties: {
- /**
- * Name of the validator to use.
- */
- validator: {
- type: String
- },
-
- /**
- * True if the last call to `validate` is invalid.
- */
- invalid: {
- notify: true,
- reflectToAttribute: true,
- type: Boolean,
- value: false,
- observer: '_invalidChanged'
- },
- },
-
- registered: function() {
- Polymer.IronValidatableBehaviorMeta = new Polymer.IronMeta({type: 'validator'});
- },
-
- _invalidChanged: function() {
- if (this.invalid) {
- this.setAttribute('aria-invalid', 'true');
- } else {
- this.removeAttribute('aria-invalid');
- }
- },
-
- /* Recompute this every time it's needed, because we don't know if the
- * underlying IronValidatableBehaviorMeta has changed. */
- get _validator() {
- return Polymer.IronValidatableBehaviorMeta &&
- Polymer.IronValidatableBehaviorMeta.byKey(this.validator);
- },
-
- /**
- * @return {boolean} True if the validator `validator` exists.
- */
- hasValidator: function() {
- return this._validator != null;
- },
-
- /**
- * Returns true if the `value` is valid, and updates `invalid`. If you want
- * your element to have custom validation logic, do not override this method;
- * override `_getValidity(value)` instead.
-
- * @param {Object} value Deprecated: The value to be validated. By default,
- * it is passed to the validator's `validate()` function, if a validator is set.
- * If this argument is not specified, then the element's `value` property
- * is used, if it exists.
- * @return {boolean} True if `value` is valid.
- */
- validate: function(value) {
- // If this is an element that also has a value property, and there was
- // no explicit value argument passed, use the element's property instead.
- if (value === undefined && this.value !== undefined)
- this.invalid = !this._getValidity(this.value);
- else
- this.invalid = !this._getValidity(value);
- return !this.invalid;
- },
-
- /**
- * Returns true if `value` is valid. By default, it is passed
- * to the validator's `validate()` function, if a validator is set. You
- * should override this method if you want to implement custom validity
- * logic for your element.
- *
- * @param {Object} value The value to be validated.
- * @return {boolean} True if `value` is valid.
- */
-
- _getValidity: function(value) {
- if (this.hasValidator()) {
- return this._validator.validate(value);
- }
- return true;
- }
- }; \ No newline at end of file
diff --git a/chromium/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/iron-validatable-behavior.html b/chromium/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/iron-validatable-behavior.html
deleted file mode 100644
index bb455c6835d..00000000000
--- a/chromium/third_party/polymer/v1_0/components-chromium/iron-validatable-behavior/iron-validatable-behavior.html
+++ /dev/null
@@ -1,12 +0,0 @@
-<!--
-@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
---><html><head><link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-meta/iron-meta.html">
-
-</head><body><script src="iron-validatable-behavior-extracted.js"></script></body></html> \ No newline at end of file
diff --git a/chromium/third_party/polymer/v1_0/components-chromium/paper-input/BUILD.gn b/chromium/third_party/polymer/v1_0/components-chromium/paper-input/BUILD.gn
deleted file mode 100644
index 3f6797070aa..00000000000
--- a/chromium/third_party/polymer/v1_0/components-chromium/paper-input/BUILD.gn
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright 2020 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-#
-# NOTE: Created with generate_gn.py, please do not edit.
-
-import("//third_party/closure_compiler/compile_js.gni")
-
-js_library("paper-input-addon-behavior-extracted") {
-}
-
-js_library("paper-input-container-extracted") {
-}
-
-js_library("paper-input-error-extracted") {
- deps = [ ":paper-input-addon-behavior-extracted" ]
-}
diff --git a/chromium/third_party/polymer/v1_0/components-chromium/paper-input/bower.json b/chromium/third_party/polymer/v1_0/components-chromium/paper-input/bower.json
deleted file mode 100644
index 5a0c4be2b73..00000000000
--- a/chromium/third_party/polymer/v1_0/components-chromium/paper-input/bower.json
+++ /dev/null
@@ -1,84 +0,0 @@
-{
- "name": "paper-input",
- "version": "2.2.2",
- "description": "Material design text fields",
- "authors": [
- "The Polymer Authors"
- ],
- "keywords": [
- "web-components",
- "polymer",
- "input"
- ],
- "main": [
- "paper-input.html",
- "paper-textarea.html",
- "paper-input-behavior.html",
- "paper-input-container.html",
- "paper-input-error.html",
- "paper-input-addon-behavior.html",
- "paper-input-char-counter.html"
- ],
- "private": true,
- "repository": {
- "type": "git",
- "url": "git://github.com/PolymerElements/paper-input.git"
- },
- "license": "http://polymer.github.io/LICENSE.txt",
- "homepage": "https://github.com/PolymerElements/paper-input",
- "ignore": [],
- "dependencies": {
- "polymer": "Polymer/polymer#1.9 - 2",
- "iron-autogrow-textarea": "PolymerElements/iron-autogrow-textarea#1 - 2",
- "iron-behaviors": "PolymerElements/iron-behaviors#1 - 2",
- "iron-input": "PolymerElements/iron-input#1 - 2",
- "paper-styles": "PolymerElements/paper-styles#1 - 2",
- "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#1 - 2",
- "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#1 - 2"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#1 - 2",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#1 - 2",
- "iron-flex-layout": "PolymerElements/iron-flex-layout#1 - 2",
- "iron-icon": "PolymerElements/iron-icon#1 - 2",
- "iron-icons": "PolymerElements/iron-icons#1 - 2",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#1 - 2",
- "iron-validator-behavior": "PolymerElements/iron-validator-behavior#1 - 2",
- "paper-icon-button": "PolymerElements/paper-icon-button#1 - 2",
- "test-fixture": "PolymerElements/test-fixture#^3.0.0-rc.1",
- "web-component-tester": "^6.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0"
- },
- "variants": {
- "1.x": {
- "dependencies": {
- "polymer": "Polymer/polymer#^1.9",
- "iron-autogrow-textarea": "PolymerElements/iron-autogrow-textarea#^1.0.0",
- "iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
- "iron-input": "PolymerElements/iron-input#^1.0.0",
- "paper-styles": "PolymerElements/paper-styles#^1.1.4",
- "iron-a11y-keys-behavior": "PolymerElements/iron-a11y-keys-behavior#^1.0.0",
- "iron-form-element-behavior": "PolymerElements/iron-form-element-behavior#^1.0.0"
- },
- "devDependencies": {
- "iron-component-page": "PolymerElements/iron-component-page#^1.0.0",
- "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0",
- "iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
- "iron-icon": "PolymerElements/iron-icon#^1.0.0",
- "iron-icons": "PolymerElements/iron-icons#^1.0.0",
- "iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
- "iron-validator-behavior": "PolymerElements/iron-validator-behavior#^1.0.0",
- "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
- "test-fixture": "PolymerElements/test-fixture#^1.0.0",
- "web-component-tester": "^4.0.0",
- "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
- },
- "resolutions": {
- "webcomponentsjs": "^0.7"
- }
- }
- },
- "resolutions": {
- "webcomponentsjs": "^1.0.0"
- }
-}
diff --git a/chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-addon-behavior-extracted.js b/chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-addon-behavior-extracted.js
deleted file mode 100644
index ced2ce923f2..00000000000
--- a/chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-addon-behavior-extracted.js
+++ /dev/null
@@ -1,28 +0,0 @@
-/**
- * Use `Polymer.PaperInputAddonBehavior` to implement an add-on for `<paper-input-container>`. A
- * add-on appears below the input, and may display information based on the input value and
- * validity such as a character counter or an error message.
- * @polymerBehavior
- */
- Polymer.PaperInputAddonBehavior = {
- attached: function() {
- // Workaround for https://github.com/webcomponents/shadydom/issues/96
- Polymer.dom.flush();
- this.fire('addon-attached');
- },
-
- /**
- * The function called by `<paper-input-container>` when the input value or validity changes.
- * @param {{
- * invalid: boolean,
- * inputElement: (Element|undefined),
- * value: (string|undefined)
- * }} state -
- * inputElement: The input element.
- * value: The input value.
- * invalid: True if the input value is invalid.
- */
- update: function(state) {
- }
-
- }; \ No newline at end of file
diff --git a/chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-addon-behavior.html b/chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-addon-behavior.html
deleted file mode 100644
index a7e982def1e..00000000000
--- a/chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-addon-behavior.html
+++ /dev/null
@@ -1,11 +0,0 @@
-<!--
-@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
---><html><head><link rel="import" href="../polymer/polymer.html">
-
-</head><body><script src="paper-input-addon-behavior-extracted.js"></script></body></html> \ No newline at end of file
diff --git a/chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-container-extracted.js b/chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-container-extracted.js
deleted file mode 100644
index 02cde6872da..00000000000
--- a/chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-container-extracted.js
+++ /dev/null
@@ -1,320 +0,0 @@
-Polymer({
- is: 'paper-input-container',
-
- properties: {
- /**
- * Set to true to disable the floating label. The label disappears when the input value is
- * not null.
- */
- noLabelFloat: {
- type: Boolean,
- value: false
- },
-
- /**
- * Set to true to always float the floating label.
- */
- alwaysFloatLabel: {
- type: Boolean,
- value: false
- },
-
- /**
- * The attribute to listen for value changes on.
- */
- attrForValue: {
- type: String,
- value: 'bind-value'
- },
-
- /**
- * Set to true to auto-validate the input value when it changes.
- */
- autoValidate: {
- type: Boolean,
- value: false
- },
-
- /**
- * True if the input is invalid. This property is set automatically when the input value
- * changes if auto-validating, or when the `iron-input-validate` event is heard from a child.
- */
- invalid: {
- observer: '_invalidChanged',
- type: Boolean,
- value: false
- },
-
- /**
- * True if the input has focus.
- */
- focused: {
- readOnly: true,
- type: Boolean,
- value: false,
- notify: true
- },
-
- _addons: {
- type: Array
- // do not set a default value here intentionally - it will be initialized lazily when a
- // distributed child is attached, which may occur before configuration for this element
- // in polyfill.
- },
-
- _inputHasContent: {
- type: Boolean,
- value: false
- },
-
- _inputSelector: {
- type: String,
- value: 'input,iron-input,textarea,.paper-input-input'
- },
-
- _boundOnFocus: {
- type: Function,
- value: function() {
- return this._onFocus.bind(this);
- }
- },
-
- _boundOnBlur: {
- type: Function,
- value: function() {
- return this._onBlur.bind(this);
- }
- },
-
- _boundOnInput: {
- type: Function,
- value: function() {
- return this._onInput.bind(this);
- }
- },
-
- _boundValueChanged: {
- type: Function,
- value: function() {
- return this._onValueChanged.bind(this);
- }
- }
- },
-
- listeners: {
- 'addon-attached': '_onAddonAttached',
- 'iron-input-validate': '_onIronInputValidate'
- },
-
- get _valueChangedEvent() {
- return this.attrForValue + '-changed';
- },
-
- get _propertyForValue() {
- return Polymer.CaseMap.dashToCamelCase(this.attrForValue);
- },
-
- get _inputElement() {
- return Polymer.dom(this).querySelector(this._inputSelector);
- },
-
- get _inputElementValue() {
- return this._inputElement[this._propertyForValue] || this._inputElement.value;
- },
-
- ready: function() {
- // Paper-input treats a value of undefined differently at startup than
- // the rest of the time (specifically: it does not validate it at startup, but
- // it does after that. We need to track whether the first time we encounter
- // the value is basically this first time, so that we can validate it
- // correctly the rest of the time. See https://github.com/PolymerElements/paper-input/issues/605
- this.__isFirstValueUpdate = true;
- if (!this._addons) {
- this._addons = [];
- }
- this.addEventListener('focus', this._boundOnFocus, true);
- this.addEventListener('blur', this._boundOnBlur, true);
- },
-
- attached: function() {
- if (this.attrForValue) {
- this._inputElement.addEventListener(this._valueChangedEvent, this._boundValueChanged);
- } else {
- this.addEventListener('input', this._onInput);
- }
-
- // Only validate when attached if the input already has a value.
- if (this._inputElementValue && this._inputElementValue != '') {
- this._handleValueAndAutoValidate(this._inputElement);
- } else {
- this._handleValue(this._inputElement);
- }
- },
-
- /** @private */
- _onAddonAttached: function(event) {
- if (!this._addons) {
- this._addons = [];
- }
- var target = event.target;
- if (this._addons.indexOf(target) === -1) {
- this._addons.push(target);
- if (this.isAttached) {
- this._handleValue(this._inputElement);
- }
- }
- },
-
- /** @private */
- _onFocus: function() {
- this._setFocused(true);
- },
-
- /** @private */
- _onBlur: function() {
- this._setFocused(false);
- this._handleValueAndAutoValidate(this._inputElement);
- },
-
- /** @private */
- _onInput: function(event) {
- this._handleValueAndAutoValidate(event.target);
- },
-
- /** @private */
- _onValueChanged: function(event) {
- var input = event.target;
-
- // Paper-input treats a value of undefined differently at startup than
- // the rest of the time (specifically: it does not validate it at startup, but
- // it does after that. If this is in fact the bootup case, ignore validation,
- // just this once.
- if (this.__isFirstValueUpdate) {
- this.__isFirstValueUpdate = false;
- if (input.value === undefined) {
- return;
- }
- }
-
- this._handleValueAndAutoValidate(event.target);
- },
-
- /** @private */
- _handleValue: function(inputElement) {
- var value = this._inputElementValue;
-
- // type="number" hack needed because this.value is empty until it's valid
- if (value || value === 0 || (inputElement.type === 'number' && !inputElement.checkValidity())) {
- this._inputHasContent = true;
- } else {
- this._inputHasContent = false;
- }
-
- this.updateAddons({
- inputElement: inputElement,
- value: value,
- invalid: this.invalid
- });
- },
-
- /** @private */
- _handleValueAndAutoValidate: function(inputElement) {
- if (this.autoValidate && inputElement) {
- var valid;
-
- if (inputElement.validate) {
- valid = inputElement.validate(this._inputElementValue);
- } else {
- valid = inputElement.checkValidity();
- }
- this.invalid = !valid;
- }
-
- // Call this last to notify the add-ons.
- this._handleValue(inputElement);
- },
-
- /** @private */
- _onIronInputValidate: function(event) {
- this.invalid = this._inputElement.invalid;
- },
-
- /** @private */
- _invalidChanged: function() {
- if (this._addons) {
- this.updateAddons({invalid: this.invalid});
- }
- },
-
- /**
- * Call this to update the state of add-ons.
- * @param {Object} state Add-on state.
- */
- updateAddons: function(state) {
- for (var addon, index = 0; addon = this._addons[index]; index++) {
- addon.update(state);
- }
- },
-
- /** @private */
- _computeInputContentClass: function(noLabelFloat, alwaysFloatLabel, focused, invalid, _inputHasContent) {
- var cls = 'input-content';
- if (!noLabelFloat) {
- var label = this.querySelector('label');
-
- if (alwaysFloatLabel || _inputHasContent) {
- cls += ' label-is-floating';
- // If the label is floating, ignore any offsets that may have been
- // applied from a prefix element.
- this.$.labelAndInputContainer.style.position = 'static';
-
- if (invalid) {
- cls += ' is-invalid';
- } else if (focused) {
- cls += " label-is-highlighted";
- }
- } else {
- // When the label is not floating, it should overlap the input element.
- if (label) {
- this.$.labelAndInputContainer.style.position = 'relative';
- }
- if (invalid) {
- cls += ' is-invalid';
- }
- }
- } else {
- if (_inputHasContent) {
- cls += ' label-is-hidden';
- }
- if (invalid) {
- cls += ' is-invalid';
- }
- }
- if (focused) {
- cls += ' focused';
- }
- return cls;
- },
-
- /** @private */
- _computeUnderlineClass: function(focused, invalid) {
- var cls = 'underline';
- if (invalid) {
- cls += ' is-invalid';
- } else if (focused) {
- cls += ' is-highlighted'
- }
- return cls;
- },
-
- /** @private */
- _computeAddOnContentClass: function(focused, invalid) {
- var cls = 'add-on-content';
- if (invalid) {
- cls += ' is-invalid';
- } else if (focused) {
- cls += ' is-highlighted'
- }
- return cls;
- }
- }); \ No newline at end of file
diff --git a/chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-container.html b/chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-container.html
deleted file mode 100644
index 46fb9adf6a0..00000000000
--- a/chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-container.html
+++ /dev/null
@@ -1,375 +0,0 @@
-<!--
-@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
---><html><head><link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
-<link rel="import" href="../paper-styles/default-theme.html">
-<link rel="import" href="../paper-styles/typography.html">
-
-<!--
-`<paper-input-container>` is a container for a `<label>`, an `<iron-input>` or
-`<textarea>` and optional add-on elements such as an error message or character
-counter, used to implement Material Design text fields.
-
-For example:
-
- <paper-input-container>
- <label slot="label">Your name</label>
- <iron-input slot="input">
- <input>
- </iron-input>
- // In Polymer 1.0, you would use `<input is="iron-input" slot="input">` instead of the above.
- </paper-input-container>
-
-You can style the nested `<input>` however you want; if you want it to look like a
-Material Design input, you can style it with the --paper-input-container-shared-input-style mixin.
-
-Do not wrap `<paper-input-container>` around elements that already include it, such as `<paper-input>`.
-Doing so may cause events to bounce infinitely between the container and its contained element.
-
-### Listening for input changes
-
-By default, it listens for changes on the `bind-value` attribute on its children nodes and perform
-tasks such as auto-validating and label styling when the `bind-value` changes. You can configure
-the attribute it listens to with the `attr-for-value` attribute.
-
-### Using a custom input element
-
-You can use a custom input element in a `<paper-input-container>`, for example to implement a
-compound input field like a social security number input. The custom input element should have the
-`paper-input-input` class, have a `notify:true` value property and optionally implements
-`Polymer.IronValidatableBehavior` if it is validatable.
-
- <paper-input-container attr-for-value="ssn-value">
- <label slot="label">Social security number</label>
- <ssn-input slot="input" class="paper-input-input"></ssn-input>
- </paper-input-container>
-
-
-If you're using a `<paper-input-container>` imperatively, it's important to make sure
-that you attach its children (the `iron-input` and the optional `label`) before you
-attach the `<paper-input-container>` itself, so that it can be set up correctly.
-
-### Validation
-
-If the `auto-validate` attribute is set, the input container will validate the input and update
-the container styling when the input value changes.
-
-### Add-ons
-
-Add-ons are child elements of a `<paper-input-container>` with the `add-on` attribute and
-implements the `Polymer.PaperInputAddonBehavior` behavior. They are notified when the input value
-or validity changes, and may implement functionality such as error messages or character counters.
-They appear at the bottom of the input.
-
-### Prefixes and suffixes
-These are child elements of a `<paper-input-container>` with the `prefix`
-or `suffix` attribute, and are displayed inline with the input, before or after.
-
- <paper-input-container>
- <div slot="prefix">$</div>
- <label slot="label">Total</label>
- <iron-input slot="input">
- <input>
- </iron-input>
- // In Polymer 1.0, you would use `<input is="iron-input" slot="input">` instead of the above.
- <paper-icon-button slot="suffix" icon="clear"></paper-icon-button>
- </paper-input-container>
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-input-container-color` | Label and underline color when the input is not focused | `--secondary-text-color`
-`--paper-input-container-focus-color` | Label and underline color when the input is focused | `--primary-color`
-`--paper-input-container-invalid-color` | Label and underline color when the input is is invalid | `--error-color`
-`--paper-input-container-input-color` | Input foreground color | `--primary-text-color`
-`--paper-input-container` | Mixin applied to the container | `{}`
-`--paper-input-container-disabled` | Mixin applied to the container when it's disabled | `{}`
-`--paper-input-container-label` | Mixin applied to the label | `{}`
-`--paper-input-container-label-focus` | Mixin applied to the label when the input is focused | `{}`
-`--paper-input-container-label-floating` | Mixin applied to the label when floating | `{}`
-`--paper-input-container-input` | Mixin applied to the input | `{}`
-`--paper-input-container-input-disabled` | Mixin applied to the input when the component is disabled | `{}`
-`--paper-input-container-input-focus` | Mixin applied to the input when focused | `{}`
-`--paper-input-container-input-invalid` | Mixin applied to the input when invalid | `{}`
-`--paper-input-container-input-webkit-spinner` | Mixin applied to the webkit spinner | `{}`
-`--paper-input-container-input-webkit-clear` | Mixin applied to the webkit clear button | `{}`
-`--paper-input-container-input-webkit-calendar-picker-indicator` | Mixin applied to the webkit calendar picker indicator | `{}`
-`--paper-input-container-ms-clear` | Mixin applied to the Internet Explorer clear button | `{}`
-`--paper-input-container-underline` | Mixin applied to the underline | `{}`
-`--paper-input-container-underline-focus` | Mixin applied to the underline when the input is focused | `{}`
-`--paper-input-container-underline-disabled` | Mixin applied to the underline when the input is disabled | `{}`
-`--paper-input-prefix` | Mixin applied to the input prefix | `{}`
-`--paper-input-suffix` | Mixin applied to the input suffix | `{}`
-
-This element is `display:block` by default, but you can set the `inline` attribute to make it
-`display:inline-block`.
--->
-
-</head><body><custom-style>
- <style is="custom-style">
- html {
- --paper-input-container-shared-input-style: {
- position: relative; /* to make a stacking context */
- outline: none;
- box-shadow: none;
- padding: 0;
- margin: 0;
- width: 100%;
- max-width: 100%;
- background: transparent;
- border: none;
- color: var(--paper-input-container-input-color, var(--primary-text-color));
- -webkit-appearance: none;
- text-align: inherit;
- vertical-align: bottom;
-
- @apply --paper-font-subhead;
- };
- }
- </style>
-</custom-style>
-
-<dom-module id="paper-input-container">
- <template>
- <style>
- :host {
- display: block;
- padding: 8px 0;
- @apply --paper-input-container;
- }
-
- :host([inline]) {
- display: inline-block;
- }
-
- :host([disabled]) {
- pointer-events: none;
- opacity: 0.33;
-
- @apply --paper-input-container-disabled;
- }
-
- :host([hidden]) {
- display: none !important;
- }
-
- [hidden] {
- display: none !important;
- }
-
- .floated-label-placeholder {
- @apply --paper-font-caption;
- }
-
- .underline {
- height: 2px;
- position: relative;
- }
-
- .focused-line {
- @apply --layout-fit;
- border-bottom: 2px solid var(--paper-input-container-focus-color, var(--primary-color));
-
- transform-origin: center center;
- transform: scale3d(0,1,1);
-
- @apply --paper-input-container-underline-focus;
- }
-
- .underline.is-highlighted .focused-line {
- transform: none;
- transition: transform 0.25s;
-
- @apply --paper-transition-easing;
- }
-
- .underline.is-invalid .focused-line {
- border-color: var(--paper-input-container-invalid-color, var(--error-color));
- transform: none;
- transition: transform 0.25s;
-
- @apply --paper-transition-easing;
- }
-
- .unfocused-line {
- @apply --layout-fit;
- border-bottom: 1px solid var(--paper-input-container-color, var(--secondary-text-color));
- @apply --paper-input-container-underline;
- }
-
- :host([disabled]) .unfocused-line {
- border-bottom: 1px dashed;
- border-color: var(--paper-input-container-color, var(--secondary-text-color));
- @apply --paper-input-container-underline-disabled;
- }
-
- .input-wrapper {
- @apply --layout-horizontal;
- @apply --layout-center;
- position: relative;
- }
-
- .input-content {
- @apply --layout-flex-auto;
- @apply --layout-relative;
- max-width: 100%;
- }
-
- .input-content ::slotted(label),
- .input-content ::slotted(.paper-input-label) {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- font: inherit;
- color: var(--paper-input-container-color, var(--secondary-text-color));
- transition: transform 0.25s, width 0.25s;
- transform-origin: left top;
- /* Fix for safari not focusing 0-height date/time inputs with -webkit-apperance: none; */
- min-height: 1px;
-
- @apply --paper-font-common-nowrap;
- @apply --paper-font-subhead;
- @apply --paper-input-container-label;
- @apply --paper-transition-easing;
- }
-
- .input-content.label-is-floating ::slotted(label),
- .input-content.label-is-floating ::slotted(.paper-input-label) {
- transform: translateY(-75%) scale(0.75);
-
- /* Since we scale to 75/100 of the size, we actually have 100/75 of the
- original space now available */
- width: 133%;
-
- @apply --paper-input-container-label-floating;
- }
-
- :host-context([dir="rtl"]) .input-content.label-is-floating ::slotted(label),
- :host-context([dir="rtl"]) .input-content.label-is-floating ::slotted(.paper-input-label) {
- right: 0;
- left: auto;
- transform-origin: right top;
- }
-
- .input-content.label-is-highlighted ::slotted(label),
- .input-content.label-is-highlighted ::slotted(.paper-input-label) {
- color: var(--paper-input-container-focus-color, var(--primary-color));
-
- @apply --paper-input-container-label-focus;
- }
-
- .input-content.is-invalid ::slotted(label),
- .input-content.is-invalid ::slotted(.paper-input-label) {
- color: var(--paper-input-container-invalid-color, var(--error-color));
- }
-
- .input-content.label-is-hidden ::slotted(label),
- .input-content.label-is-hidden ::slotted(.paper-input-label) {
- visibility: hidden;
- }
-
- .input-content ::slotted(input),
- .input-content ::slotted(iron-input),
- .input-content ::slotted(textarea),
- .input-content ::slotted(iron-autogrow-textarea),
- .input-content ::slotted(.paper-input-input) {
- @apply --paper-input-container-shared-input-style;
- /* The apply shim doesn't apply the nested color custom property,
- so we have to re-apply it here. */
- color: var(--paper-input-container-input-color, var(--primary-text-color));
- @apply --paper-input-container-input;
- }
-
- .input-content ::slotted(input)::-webkit-outer-spin-button,
- .input-content ::slotted(input)::-webkit-inner-spin-button {
- @apply --paper-input-container-input-webkit-spinner;
- }
-
- .input-content.focused ::slotted(input),
- .input-content.focused ::slotted(iron-input),
- .input-content.focused ::slotted(textarea),
- .input-content.focused ::slotted(iron-autogrow-textarea),
- .input-content.focused ::slotted(.paper-input-input) {
- @apply --paper-input-container-input-focus;
- }
-
- .input-content.is-invalid ::slotted(input),
- .input-content.is-invalid ::slotted(iron-input),
- .input-content.is-invalid ::slotted(textarea),
- .input-content.is-invalid ::slotted(iron-autogrow-textarea),
- .input-content.is-invalid ::slotted(.paper-input-input) {
- @apply --paper-input-container-input-invalid;
- }
-
- .prefix ::slotted(*) {
- display: inline-block;
- @apply --paper-font-subhead;
- @apply --layout-flex-none;
- @apply --paper-input-prefix;
- }
-
- .suffix ::slotted(*) {
- display: inline-block;
- @apply --paper-font-subhead;
- @apply --layout-flex-none;
-
- @apply --paper-input-suffix;
- }
-
- /* Firefox sets a min-width on the input, which can cause layout issues */
- .input-content ::slotted(input) {
- min-width: 0;
- }
-
- .input-content ::slotted(textarea) {
- resize: none;
- }
-
- .add-on-content {
- position: relative;
- }
-
- .add-on-content.is-invalid ::slotted(*) {
- color: var(--paper-input-container-invalid-color, var(--error-color));
- }
-
- .add-on-content.is-highlighted ::slotted(*) {
- color: var(--paper-input-container-focus-color, var(--primary-color));
- }
- </style>
-
- <div class="floated-label-placeholder" aria-hidden="true" hidden="[[noLabelFloat]]">&nbsp;</div>
-
- <div class="input-wrapper">
- <span class="prefix"><slot name="prefix"></slot></span>
-
- <div class$="[[_computeInputContentClass(noLabelFloat,alwaysFloatLabel,focused,invalid,_inputHasContent)]]" id="labelAndInputContainer">
- <slot name="label"></slot>
- <slot name="input"></slot>
- </div>
-
- <span class="suffix"><slot name="suffix"></slot></span>
- </div>
-
- <div class$="[[_computeUnderlineClass(focused,invalid)]]">
- <div class="unfocused-line"></div>
- <div class="focused-line"></div>
- </div>
-
- <div class$="[[_computeAddOnContentClass(focused,invalid)]]">
- <slot name="add-on"></slot>
- </div>
- </template>
-</dom-module>
-
-<script src="paper-input-container-extracted.js"></script></body></html> \ No newline at end of file
diff --git a/chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-error-extracted.js b/chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-error-extracted.js
deleted file mode 100644
index e127ee5497e..00000000000
--- a/chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-error-extracted.js
+++ /dev/null
@@ -1,33 +0,0 @@
-Polymer({
- is: 'paper-input-error',
-
- behaviors: [
- Polymer.PaperInputAddonBehavior
- ],
-
- properties: {
- /**
- * True if the error is showing.
- */
- invalid: {
- readOnly: true,
- reflectToAttribute: true,
- type: Boolean
- }
- },
-
- /**
- * This overrides the update function in PaperInputAddonBehavior.
- * @param {{
- * inputElement: (Element|undefined),
- * value: (string|undefined),
- * invalid: boolean
- * }} state -
- * inputElement: The input element.
- * value: The input value.
- * invalid: True if the input value is invalid.
- */
- update: function(state) {
- this._setInvalid(state.invalid);
- }
- }); \ No newline at end of file
diff --git a/chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-error.html b/chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-error.html
deleted file mode 100644
index 93586ea3290..00000000000
--- a/chromium/third_party/polymer/v1_0/components-chromium/paper-input/paper-input-error.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!--
-@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
---><html><head><link rel="import" href="../polymer/polymer.html">
-<link rel="import" href="../paper-styles/default-theme.html">
-<link rel="import" href="../paper-styles/typography.html">
-<link rel="import" href="paper-input-addon-behavior.html">
-
-<!--
-`<paper-input-error>` is an error message for use with `<paper-input-container>`. The error is
-displayed when the `<paper-input-container>` is `invalid`.
-
- <paper-input-container>
- <input pattern="[0-9]*">
- <paper-input-error slot="add-on">Only numbers are allowed!</paper-input-error>
- </paper-input-container>
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-input-container-invalid-color` | The foreground color of the error | `--error-color`
-`--paper-input-error` | Mixin applied to the error | `{}`
--->
-
-</head><body><dom-module id="paper-input-error">
- <template>
- <style>
- :host {
- display: inline-block;
- visibility: hidden;
-
- color: var(--paper-input-container-invalid-color, var(--error-color));
-
- @apply --paper-font-caption;
- @apply --paper-input-error;
- position: absolute;
- left:0;
- right:0;
- }
-
- :host([invalid]) {
- visibility: visible;
- };
- </style>
-
- <slot></slot>
- </template>
-</dom-module>
-
-<script src="paper-input-error-extracted.js"></script></body></html> \ No newline at end of file
diff --git a/chromium/third_party/polymer/v1_0/components_summary.txt b/chromium/third_party/polymer/v1_0/components_summary.txt
index ba9eb6e0ce7..81dccb122b0 100644
--- a/chromium/third_party/polymer/v1_0/components_summary.txt
+++ b/chromium/third_party/polymer/v1_0/components_summary.txt
@@ -70,12 +70,6 @@ Tree: v2.1.1
Revision: 0f36a7d380e0edfd81344e6cdbc89519355df8bd
Tree link: https://github.com/PolymerElements/iron-iconset-svg/tree/v2.1.1
-Name: iron-input
-Repository: https://github.com/PolymerElements/iron-input.git
-Tree: v2.1.3
-Revision: 72a4a9e898a4b825602eacd78944e8e25ee41f5c
-Tree link: https://github.com/PolymerElements/iron-input/tree/v2.1.3
-
Name: iron-list
Repository: https://github.com/PolymerElements/iron-list.git
Tree: v2.0.20
@@ -148,12 +142,6 @@ Tree: v2.0.0
Revision: b972ff1579d882f3196713f8a72a8bf77aeba07c
Tree link: https://github.com/PolymerElements/iron-test-helpers/tree/v2.0.0
-Name: iron-validatable-behavior
-Repository: https://github.com/PolymerElements/iron-validatable-behavior.git
-Tree: v2.1.0
-Revision: 4b6c1c53e44a3bbb31fcfd14ede2234645518c96
-Tree link: https://github.com/PolymerElements/iron-validatable-behavior/tree/v2.1.0
-
Name: neon-animation
Repository: https://github.com/PolymerElements/neon-animation.git
Tree: v2.1.0
@@ -166,12 +154,6 @@ Tree: v2.1.0
Revision: ddde7f8cf41078b7a7b724473558421d6bc37f57
Tree link: https://github.com/PolymerElements/paper-behaviors/tree/v2.1.0
-Name: paper-input
-Repository: https://github.com/PolymerElements/paper-input.git
-Tree: v2.2.2
-Revision: a89e8f491d01c77e167a4361d0535683591e0a01
-Tree link: https://github.com/PolymerElements/paper-input/tree/v2.2.2
-
Name: paper-progress
Repository: https://github.com/PolymerElements/paper-progress.git
Tree: v2.0.1
diff --git a/chromium/third_party/polymer/v1_0/rsync_exclude.txt b/chromium/third_party/polymer/v1_0/rsync_exclude.txt
index cca26307d4c..22cad71988c 100644
--- a/chromium/third_party/polymer/v1_0/rsync_exclude.txt
+++ b/chromium/third_party/polymer/v1_0/rsync_exclude.txt
@@ -32,15 +32,15 @@ package-lock.json
html-imports/src/*
html-imports/gulpfile.js
-# iron-autogrow-textarea
-iron-autogrow-textarea/*
-
# iron-checked-element-behavior
iron-checked-element-behavior/*
# iron-form-element-behavior
iron-form-element-behavior/*
+# iron-validatable-behavior
+iron-validatable-behavior/*
+
# iron-test-helpers
iron-test-helpers/iron-test-helpers.html
iron-test-helpers/test-helpers.html
@@ -51,13 +51,6 @@ paper-behaviors/paper-button-behavior.html
paper-behaviors/paper-checked-element-behavior.html
paper-behaviors/paper-inky-focus-behavior.html
-# paper-input
-paper-input/all-imports.html
-paper-input/paper-input-behavior.html
-paper-input/paper-input-char-counter.html
-paper-input/paper-input.html
-paper-input/paper-textarea.html
-
# paper-spinner
paper-spinner/paper-spinner.html
diff --git a/chromium/third_party/polymer/v3_0/components-chromium/iron-input/BUILD.gn b/chromium/third_party/polymer/v3_0/components-chromium/iron-input/BUILD.gn
deleted file mode 100644
index 6d1e99e6041..00000000000
--- a/chromium/third_party/polymer/v3_0/components-chromium/iron-input/BUILD.gn
+++ /dev/null
@@ -1,15 +0,0 @@
-# Copyright 2020 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-#
-# NOTE: Created with generate_gn_v3.py, please do not edit.
-
-import("//third_party/closure_compiler/compile_js.gni")
-
-js_library("iron-input") {
- deps = [
- "../iron-a11y-announcer:iron-a11y-announcer",
- "../iron-validatable-behavior:iron-validatable-behavior",
- "../polymer:polymer_bundled",
- ]
-}
diff --git a/chromium/third_party/polymer/v3_0/components-chromium/iron-input/iron-input.js b/chromium/third_party/polymer/v3_0/components-chromium/iron-input/iron-input.js
deleted file mode 100644
index 2754f1aecf5..00000000000
--- a/chromium/third_party/polymer/v3_0/components-chromium/iron-input/iron-input.js
+++ /dev/null
@@ -1,368 +0,0 @@
-/**
-@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
-*/
-import '../polymer/polymer_bundled.min.js';
-
-import {IronA11yAnnouncer} from '../iron-a11y-announcer/iron-a11y-announcer.js';
-import {IronValidatableBehavior} from '../iron-validatable-behavior/iron-validatable-behavior.js';
-import {Polymer} from '../polymer/polymer_bundled.min.js';
-import {dom} from '../polymer/polymer_bundled.min.js';
-import {html} from '../polymer/polymer_bundled.min.js';
-
-/**
-`<iron-input>` is a wrapper to a native `<input>` element, that adds two-way
-binding and prevention of invalid input. To use it, you must distribute a native
-`<input>` yourself. You can continue to use the native `input` as you would
-normally:
-
- <iron-input>
- <input>
- </iron-input>
-
- <iron-input>
- <input type="email" disabled>
- </iron-input>
-
-### Two-way binding
-
-By default you can only get notified of changes to a native `<input>`'s `value`
-due to user input:
-
- <input value="{{myValue::input}}">
-
-This means that if you imperatively set the value (i.e. `someNativeInput.value =
-'foo'`), no events will be fired and this change cannot be observed.
-
-`iron-input` adds the `bind-value` property that mirrors the native `input`'s
-'`value` property; this property can be used for two-way data binding.
-`bind-value` will notify if it is changed either by user input or by script.
-
- <iron-input bind-value="{{myValue}}">
- <input>
- </iron-input>
-
-Note: this means that if you want to imperatively set the native `input`'s, you
-_must_ set `bind-value` instead, so that the wrapper `iron-input` can be
-notified.
-
-### Validation
-
-`iron-input` uses the native `input`'s validation. For simplicity, `iron-input`
-has a `validate()` method (which internally just checks the distributed
-`input`'s validity), which sets an `invalid` attribute that can also be used for
-styling.
-
-To validate automatically as you type, you can use the `auto-validate`
-attribute.
-
-`iron-input` also fires an `iron-input-validate` event after `validate()` is
-called. You can use it to implement a custom validator:
-
- var CatsOnlyValidator = {
- validate: function(ironInput) {
- var valid = !ironInput.bindValue || ironInput.bindValue === 'cat';
- ironInput.invalid = !valid;
- return valid;
- }
- }
- ironInput.addEventListener('iron-input-validate', function() {
- CatsOnly.validate(input2);
- });
-
-You can also use an element implementing an
-[`IronValidatorBehavior`](/element/PolymerElements/iron-validatable-behavior).
-This example can also be found in the demo for this element:
-
- <iron-input validator="cats-only">
- <input>
- </iron-input>
-
-### Preventing invalid input
-
-It may be desirable to only allow users to enter certain characters. You can use
-the `allowed-pattern` attribute to accomplish this. This feature is separate
-from validation, and `allowed-pattern` does not affect how the input is
-validated.
-
- // Only allow typing digits, but a valid input has exactly 5 digits.
- <iron-input allowed-pattern="[0-9]">
- <input pattern="\d{5}">
- </iron-input>
-
-@demo demo/index.html
-*/
-Polymer({
- _template: html`
- <style>
- :host {
- display: inline-block;
- }
- </style>
- <slot id="content"></slot>
-`,
-
- is: 'iron-input',
- behaviors: [IronValidatableBehavior],
-
- /**
- * Fired whenever `validate()` is called.
- *
- * @event iron-input-validate
- */
-
- properties: {
-
- /**
- * Use this property instead of `value` for two-way data binding, or to
- * set a default value for the input. **Do not** use the distributed
- * input's `value` property to set a default value.
- */
- bindValue: {type: String, value: ''},
-
- /**
- * Computed property that echoes `bindValue` (mostly used for Polymer 1.0
- * backcompatibility, if you were one-way binding to the Polymer 1.0
- * `input is="iron-input"` value attribute).
- */
- value: {type: String, computed: '_computeValue(bindValue)'},
-
- /**
- * Regex-like list of characters allowed as input; all characters not in the
- * list will be rejected. The recommended format should be a list of allowed
- * characters, for example, `[a-zA-Z0-9.+-!;:]`.
- *
- * This pattern represents the allowed characters for the field; as the user
- * inputs text, each individual character will be checked against the
- * pattern (rather than checking the entire value as a whole). If a
- * character is not a match, it will be rejected.
- *
- * Pasted input will have each character checked individually; if any
- * character doesn't match `allowedPattern`, the entire pasted string will
- * be rejected.
- *
- * Note: if you were using `iron-input` in 1.0, you were also required to
- * set `prevent-invalid-input`. This is no longer needed as of Polymer 2.0,
- * and will be set automatically for you if an `allowedPattern` is provided.
- *
- */
- allowedPattern: {type: String},
-
- /**
- * Set to true to auto-validate the input value as you type.
- */
- autoValidate: {type: Boolean, value: false},
-
- /**
- * The native input element.
- */
- _inputElement: Object,
- },
-
- observers: ['_bindValueChanged(bindValue, _inputElement)'],
- listeners: {'input': '_onInput', 'keypress': '_onKeypress'},
-
- created: function() {
- IronA11yAnnouncer.requestAvailability();
- this._previousValidInput = '';
- this._patternAlreadyChecked = false;
- },
-
- attached: function() {
- // If the input is added at a later time, update the internal reference.
- this._observer = dom(this).observeNodes(function(info) {
- this._initSlottedInput();
- }.bind(this));
- },
-
- detached: function() {
- if (this._observer) {
- dom(this).unobserveNodes(this._observer);
- this._observer = null;
- }
- },
-
- /**
- * Returns the distributed input element.
- */
- get inputElement() {
- return this._inputElement;
- },
-
- _initSlottedInput: function() {
- this._inputElement = this.getEffectiveChildren()[0];
-
- if (this.inputElement && this.inputElement.value) {
- this.bindValue = this.inputElement.value;
- }
-
- this.fire('iron-input-ready');
- },
-
- get _patternRegExp() {
- var pattern;
- if (this.allowedPattern) {
- pattern = new RegExp(this.allowedPattern);
- } else {
- switch (this.inputElement.type) {
- case 'number':
- pattern = /[0-9.,e-]/;
- break;
- }
- }
- return pattern;
- },
-
- /**
- * @suppress {checkTypes}
- */
- _bindValueChanged: function(bindValue, inputElement) {
- // The observer could have run before attached() when we have actually
- // initialized this property.
- if (!inputElement) {
- return;
- }
-
- if (bindValue === undefined) {
- inputElement.value = null;
- } else if (bindValue !== inputElement.value) {
- this.inputElement.value = bindValue;
- }
-
- if (this.autoValidate) {
- this.validate();
- }
-
- // manually notify because we don't want to notify until after setting value
- this.fire('bind-value-changed', {value: bindValue});
- },
-
- _onInput: function() {
- // Need to validate each of the characters pasted if they haven't
- // been validated inside `_onKeypress` already.
- if (this.allowedPattern && !this._patternAlreadyChecked) {
- var valid = this._checkPatternValidity();
- if (!valid) {
- this._announceInvalidCharacter(
- 'Invalid string of characters not entered.');
- this.inputElement.value = this._previousValidInput;
- }
- }
- this.bindValue = this._previousValidInput = this.inputElement.value;
- this._patternAlreadyChecked = false;
- },
-
- _isPrintable: function(event) {
- // What a control/printable character is varies wildly based on the browser.
- // - most control characters (arrows, backspace) do not send a `keypress`
- // event
- // in Chrome, but the *do* on Firefox
- // - in Firefox, when they do send a `keypress` event, control chars have
- // a charCode = 0, keyCode = xx (for ex. 40 for down arrow)
- // - printable characters always send a keypress event.
- // - in Firefox, printable chars always have a keyCode = 0. In Chrome, the
- // keyCode
- // always matches the charCode.
- // None of this makes any sense.
-
- // For these keys, ASCII code == browser keycode.
- var anyNonPrintable = (event.keyCode == 8) || // backspace
- (event.keyCode == 9) || // tab
- (event.keyCode == 13) || // enter
- (event.keyCode == 27); // escape
-
- // For these keys, make sure it's a browser keycode and not an ASCII code.
- var mozNonPrintable = (event.keyCode == 19) || // pause
- (event.keyCode == 20) || // caps lock
- (event.keyCode == 45) || // insert
- (event.keyCode == 46) || // delete
- (event.keyCode == 144) || // num lock
- (event.keyCode == 145) || // scroll lock
- (event.keyCode > 32 &&
- event.keyCode < 41) || // page up/down, end, home, arrows
- (event.keyCode > 111 && event.keyCode < 124); // fn keys
-
- return !anyNonPrintable && !(event.charCode == 0 && mozNonPrintable);
- },
-
- _onKeypress: function(event) {
- if (!this.allowedPattern && this.inputElement.type !== 'number') {
- return;
- }
- var regexp = this._patternRegExp;
- if (!regexp) {
- return;
- }
-
- // Handle special keys and backspace
- if (event.metaKey || event.ctrlKey || event.altKey) {
- return;
- }
-
- // Check the pattern either here or in `_onInput`, but not in both.
- this._patternAlreadyChecked = true;
-
- var thisChar = String.fromCharCode(event.charCode);
- if (this._isPrintable(event) && !regexp.test(thisChar)) {
- event.preventDefault();
- this._announceInvalidCharacter(
- 'Invalid character ' + thisChar + ' not entered.');
- }
- },
-
- _checkPatternValidity: function() {
- var regexp = this._patternRegExp;
- if (!regexp) {
- return true;
- }
- for (var i = 0; i < this.inputElement.value.length; i++) {
- if (!regexp.test(this.inputElement.value[i])) {
- return false;
- }
- }
- return true;
- },
-
- /**
- * Returns true if `value` is valid. The validator provided in `validator`
- * will be used first, then any constraints.
- * @return {boolean} True if the value is valid.
- */
- validate: function() {
- if (!this.inputElement) {
- this.invalid = false;
- return true;
- }
-
- // Use the nested input's native validity.
- var valid = this.inputElement.checkValidity();
-
- // Only do extra checking if the browser thought this was valid.
- if (valid) {
- // Empty, required input is invalid
- if (this.required && this.bindValue === '') {
- valid = false;
- } else if (this.hasValidator()) {
- valid = IronValidatableBehavior.validate.call(this, this.bindValue);
- }
- }
-
- this.invalid = !valid;
- this.fire('iron-input-validate');
- return valid;
- },
-
- _announceInvalidCharacter: function(message) {
- this.fire('iron-announce', {text: message});
- },
-
- _computeValue: function(bindValue) {
- return bindValue;
- }
-});
diff --git a/chromium/third_party/polymer/v3_0/components-chromium/iron-validatable-behavior/BUILD.gn b/chromium/third_party/polymer/v3_0/components-chromium/iron-validatable-behavior/BUILD.gn
deleted file mode 100644
index 790b7ad59a5..00000000000
--- a/chromium/third_party/polymer/v3_0/components-chromium/iron-validatable-behavior/BUILD.gn
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright 2020 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-#
-# NOTE: Created with generate_gn_v3.py, please do not edit.
-
-import("//third_party/closure_compiler/compile_js.gni")
-
-js_library("iron-validatable-behavior") {
- deps = [
- "../iron-meta:iron-meta",
- "../polymer:polymer_bundled",
- ]
-}
diff --git a/chromium/third_party/polymer/v3_0/components-chromium/iron-validatable-behavior/iron-validatable-behavior.js b/chromium/third_party/polymer/v3_0/components-chromium/iron-validatable-behavior/iron-validatable-behavior.js
deleted file mode 100644
index 7e3dc51872c..00000000000
--- a/chromium/third_party/polymer/v3_0/components-chromium/iron-validatable-behavior/iron-validatable-behavior.js
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
-@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
-*/
-import '../polymer/polymer_bundled.min.js';
-
-import {IronMeta} from '../iron-meta/iron-meta.js';
-
-/**
- * Singleton IronMeta instance.
- */
-export let IronValidatableBehaviorMeta = null;
-
-/**
- * `Use IronValidatableBehavior` to implement an element that validates
- * user input. Use the related `IronValidatorBehavior` to add custom
- * validation logic to an iron-input.
- *
- * By default, an `<iron-form>` element validates its fields when the user
- * presses the submit button. To validate a form imperatively, call the form's
- * `validate()` method, which in turn will call `validate()` on all its
- * children. By using `IronValidatableBehavior`, your custom element
- * will get a public `validate()`, which will return the validity of the
- * element, and a corresponding `invalid` attribute, which can be used for
- * styling.
- *
- * To implement the custom validation logic of your element, you must override
- * the protected `_getValidity()` method of this behaviour, rather than
- * `validate()`. See
- * [this](https://github.com/PolymerElements/iron-form/blob/master/demo/simple-element.html)
- * for an example.
- *
- * ### Accessibility
- *
- * Changing the `invalid` property, either manually or by calling `validate()`
- * will update the `aria-invalid` attribute.
- *
- * @demo demo/index.html
- * @polymerBehavior
- */
-export const IronValidatableBehavior = {
-
- properties: {
- /**
- * Name of the validator to use.
- */
- validator: {type: String},
-
- /**
- * True if the last call to `validate` is invalid.
- */
- invalid: {
- notify: true,
- reflectToAttribute: true,
- type: Boolean,
- value: false,
- observer: '_invalidChanged'
- },
- },
-
- registered: function() {
- IronValidatableBehaviorMeta = new IronMeta({type: 'validator'});
- },
-
- _invalidChanged: function() {
- if (this.invalid) {
- this.setAttribute('aria-invalid', 'true');
- } else {
- this.removeAttribute('aria-invalid');
- }
- },
-
- /* Recompute this every time it's needed, because we don't know if the
- * underlying IronValidatableBehaviorMeta has changed. */
- get _validator() {
- return IronValidatableBehaviorMeta &&
- IronValidatableBehaviorMeta.byKey(this.validator);
- },
-
- /**
- * @return {boolean} True if the validator `validator` exists.
- */
- hasValidator: function() {
- return this._validator != null;
- },
-
- /**
- * Returns true if the `value` is valid, and updates `invalid`. If you want
- * your element to have custom validation logic, do not override this method;
- * override `_getValidity(value)` instead.
-
- * @param {Object} value Deprecated: The value to be validated. By default,
- * it is passed to the validator's `validate()` function, if a validator is
- set.
- * If this argument is not specified, then the element's `value` property
- * is used, if it exists.
- * @return {boolean} True if `value` is valid.
- */
- validate: function(value) {
- // If this is an element that also has a value property, and there was
- // no explicit value argument passed, use the element's property instead.
- if (value === undefined && this.value !== undefined)
- this.invalid = !this._getValidity(this.value);
- else
- this.invalid = !this._getValidity(value);
- return !this.invalid;
- },
-
- /**
- * Returns true if `value` is valid. By default, it is passed
- * to the validator's `validate()` function, if a validator is set. You
- * should override this method if you want to implement custom validity
- * logic for your element.
- *
- * @param {Object} value The value to be validated.
- * @return {boolean} True if `value` is valid.
- */
-
- _getValidity: function(value) {
- if (this.hasValidator()) {
- return this._validator.validate(value);
- }
- return true;
- }
-};
diff --git a/chromium/third_party/polymer/v3_0/components-chromium/paper-input/BUILD.gn b/chromium/third_party/polymer/v3_0/components-chromium/paper-input/BUILD.gn
deleted file mode 100644
index 33b65eed65d..00000000000
--- a/chromium/third_party/polymer/v3_0/components-chromium/paper-input/BUILD.gn
+++ /dev/null
@@ -1,29 +0,0 @@
-# Copyright 2020 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-#
-# NOTE: Created with generate_gn_v3.py, please do not edit.
-
-import("//third_party/closure_compiler/compile_js.gni")
-
-js_library("paper-input-addon-behavior") {
- deps = [ "../polymer:polymer_bundled" ]
-}
-
-js_library("paper-input-container") {
- deps = [
- "../iron-flex-layout:iron-flex-layout",
- "../paper-styles:default-theme",
- "../paper-styles:typography",
- "../polymer:polymer_bundled",
- ]
-}
-
-js_library("paper-input-error") {
- deps = [
- ".:paper-input-addon-behavior",
- "../paper-styles:default-theme",
- "../paper-styles:typography",
- "../polymer:polymer_bundled",
- ]
-}
diff --git a/chromium/third_party/polymer/v3_0/components-chromium/paper-input/paper-input-addon-behavior.js b/chromium/third_party/polymer/v3_0/components-chromium/paper-input/paper-input-addon-behavior.js
deleted file mode 100644
index b2dae3c8895..00000000000
--- a/chromium/third_party/polymer/v3_0/components-chromium/paper-input/paper-input-addon-behavior.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
-@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
-*/
-import '../polymer/polymer_bundled.min.js';
-
-/**
- * Use `Polymer.PaperInputAddonBehavior` to implement an add-on for
- * `<paper-input-container>`. A add-on appears below the input, and may display
- * information based on the input value and validity such as a character counter
- * or an error message.
- * @polymerBehavior
- */
-export const PaperInputAddonBehavior = {
- attached: function() {
- this.fire('addon-attached');
- },
-
- /**
- * The function called by `<paper-input-container>` when the input value or
- * validity changes.
- * @param {{
- * invalid: boolean,
- * inputElement: (Element|undefined),
- * value: (string|undefined)
- * }} state -
- * inputElement: The input element.
- * value: The input value.
- * invalid: True if the input value is invalid.
- */
- update: function(state) {}
-
-};
diff --git a/chromium/third_party/polymer/v3_0/components-chromium/paper-input/paper-input-container.js b/chromium/third_party/polymer/v3_0/components-chromium/paper-input/paper-input-container.js
deleted file mode 100644
index 47dcb3ef416..00000000000
--- a/chromium/third_party/polymer/v3_0/components-chromium/paper-input/paper-input-container.js
+++ /dev/null
@@ -1,687 +0,0 @@
-/**
-@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
-*/
-import '../polymer/polymer_bundled.min.js';
-import '../iron-flex-layout/iron-flex-layout.js';
-import '../paper-styles/default-theme.js';
-import '../paper-styles/typography.js';
-
-import {Polymer} from '../polymer/polymer_bundled.min.js';
-import {dom} from '../polymer/polymer_bundled.min.js';
-import {dashToCamelCase} from '../polymer/polymer_bundled.min.js';
-import {html} from '../polymer/polymer_bundled.min.js';
-const template = html`
-<custom-style>
- <style is="custom-style">
- html {
- --paper-input-container-shared-input-style: {
- position: relative; /* to make a stacking context */
- outline: none;
- box-shadow: none;
- padding: 0;
- margin: 0;
- width: 100%;
- max-width: 100%;
- background: transparent;
- border: none;
- color: var(--paper-input-container-input-color, var(--primary-text-color));
- -webkit-appearance: none;
- text-align: inherit;
- vertical-align: var(--paper-input-container-input-align, bottom);
-
- @apply --paper-font-subhead;
- };
- }
- </style>
-</custom-style>
-`;
-template.setAttribute('style', 'display: none;');
-document.head.appendChild(template.content);
-
-/*
-`<paper-input-container>` is a container for a `<label>`, an `<iron-input>` or
-`<textarea>` and optional add-on elements such as an error message or character
-counter, used to implement Material Design text fields.
-
-For example:
-
- <paper-input-container>
- <label slot="label">Your name</label>
- <iron-input slot="input">
- <input>
- </iron-input>
- // In Polymer 1.0, you would use `<input is="iron-input" slot="input">`
-instead of the above.
- </paper-input-container>
-
-You can style the nested `<input>` however you want; if you want it to look like
-a Material Design input, you can style it with the
---paper-input-container-shared-input-style mixin.
-
-Do not wrap `<paper-input-container>` around elements that already include it,
-such as `<paper-input>`. Doing so may cause events to bounce infinitely between
-the container and its contained element.
-
-### Listening for input changes
-
-By default, it listens for changes on the `bind-value` attribute on its children
-nodes and perform tasks such as auto-validating and label styling when the
-`bind-value` changes. You can configure the attribute it listens to with the
-`attr-for-value` attribute.
-
-### Using a custom input element
-
-You can use a custom input element in a `<paper-input-container>`, for example
-to implement a compound input field like a social security number input. The
-custom input element should have the `paper-input-input` class, have a
-`notify:true` value property and optionally implements
-`Polymer.IronValidatableBehavior` if it is validatable.
-
- <paper-input-container attr-for-value="ssn-value">
- <label slot="label">Social security number</label>
- <ssn-input slot="input" class="paper-input-input"></ssn-input>
- </paper-input-container>
-
-
-If you're using a `<paper-input-container>` imperatively, it's important to make
-sure that you attach its children (the `iron-input` and the optional `label`)
-before you attach the `<paper-input-container>` itself, so that it can be set up
-correctly.
-
-### Validation
-
-If the `auto-validate` attribute is set, the input container will validate the
-input and update the container styling when the input value changes.
-
-### Add-ons
-
-Add-ons are child elements of a `<paper-input-container>` with the `add-on`
-attribute and implements the `Polymer.PaperInputAddonBehavior` behavior. They
-are notified when the input value or validity changes, and may implement
-functionality such as error messages or character counters. They appear at the
-bottom of the input.
-
-### Prefixes and suffixes
-These are child elements of a `<paper-input-container>` with the `prefix`
-or `suffix` attribute, and are displayed inline with the input, before or after.
-
- <paper-input-container>
- <div slot="prefix">$</div>
- <label slot="label">Total</label>
- <iron-input slot="input">
- <input>
- </iron-input>
- // In Polymer 1.0, you would use `<input is="iron-input" slot="input">`
-instead of the above. <paper-icon-button slot="suffix"
-icon="clear"></paper-icon-button>
- </paper-input-container>
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-input-container-color` | Label and underline color when the input is not focused | `--secondary-text-color`
-`--paper-input-container-focus-color` | Label and underline color when the input is focused | `--primary-color`
-`--paper-input-container-invalid-color` | Label and underline color when the input is is invalid | `--error-color`
-`--paper-input-container-input-color` | Input foreground color | `--primary-text-color`
-`--paper-input-container` | Mixin applied to the container | `{}`
-`--paper-input-container-disabled` | Mixin applied to the container when it's disabled | `{}`
-`--paper-input-container-label` | Mixin applied to the label | `{}`
-`--paper-input-container-label-focus` | Mixin applied to the label when the input is focused | `{}`
-`--paper-input-container-label-floating` | Mixin applied to the label when floating | `{}`
-`--paper-input-container-input` | Mixin applied to the input | `{}`
-`--paper-input-container-input-align` | The vertical-align property of the input | `bottom`
-`--paper-input-container-input-disabled` | Mixin applied to the input when the component is disabled | `{}`
-`--paper-input-container-input-focus` | Mixin applied to the input when focused | `{}`
-`--paper-input-container-input-invalid` | Mixin applied to the input when invalid | `{}`
-`--paper-input-container-input-webkit-spinner` | Mixin applied to the webkit spinner | `{}`
-`--paper-input-container-input-webkit-clear` | Mixin applied to the webkit clear button | `{}`
-`--paper-input-container-input-webkit-calendar-picker-indicator` | Mixin applied to the webkit calendar picker indicator | `{}`
-`--paper-input-container-ms-clear` | Mixin applied to the Internet Explorer clear button | `{}`
-`--paper-input-container-underline` | Mixin applied to the underline | `{}`
-`--paper-input-container-underline-focus` | Mixin applied to the underline when the input is focused | `{}`
-`--paper-input-container-underline-disabled` | Mixin applied to the underline when the input is disabled | `{}`
-`--paper-input-prefix` | Mixin applied to the input prefix | `{}`
-`--paper-input-suffix` | Mixin applied to the input suffix | `{}`
-
-This element is `display:block` by default, but you can set the `inline`
-attribute to make it `display:inline-block`.
-*/
-Polymer({
- _template: html`
- <style>
- :host {
- display: block;
- padding: 8px 0;
- @apply --paper-input-container;
- }
-
- :host([inline]) {
- display: inline-block;
- }
-
- :host([disabled]) {
- pointer-events: none;
- opacity: 0.33;
-
- @apply --paper-input-container-disabled;
- }
-
- :host([hidden]) {
- display: none !important;
- }
-
- [hidden] {
- display: none !important;
- }
-
- .floated-label-placeholder {
- @apply --paper-font-caption;
- }
-
- .underline {
- height: 2px;
- position: relative;
- }
-
- .focused-line {
- @apply --layout-fit;
- border-bottom: 2px solid var(--paper-input-container-focus-color, var(--primary-color));
-
- transform-origin: center center;
- transform: scale3d(0,1,1);
-
- @apply --paper-input-container-underline-focus;
- }
-
- .underline.is-highlighted .focused-line {
- transform: none;
- transition: transform 0.25s;
-
- @apply --paper-transition-easing;
- }
-
- .underline.is-invalid .focused-line {
- border-color: var(--paper-input-container-invalid-color, var(--error-color));
- transform: none;
- transition: transform 0.25s;
-
- @apply --paper-transition-easing;
- }
-
- .unfocused-line {
- @apply --layout-fit;
- border-bottom: 1px solid var(--paper-input-container-color, var(--secondary-text-color));
- @apply --paper-input-container-underline;
- }
-
- :host([disabled]) .unfocused-line {
- border-bottom: 1px dashed;
- border-color: var(--paper-input-container-color, var(--secondary-text-color));
- @apply --paper-input-container-underline-disabled;
- }
-
- .input-wrapper {
- @apply --layout-horizontal;
- @apply --layout-center;
- position: relative;
- }
-
- .input-content {
- @apply --layout-flex-auto;
- @apply --layout-relative;
- max-width: 100%;
- }
-
- .input-content ::slotted(label),
- .input-content ::slotted(.paper-input-label) {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- font: inherit;
- color: var(--paper-input-container-color, var(--secondary-text-color));
- transition: transform 0.25s, width 0.25s;
- transform-origin: left top;
- /* Fix for safari not focusing 0-height date/time inputs with -webkit-apperance: none; */
- min-height: 1px;
-
- @apply --paper-font-common-nowrap;
- @apply --paper-font-subhead;
- @apply --paper-input-container-label;
- @apply --paper-transition-easing;
- }
-
- .input-content.label-is-floating ::slotted(label),
- .input-content.label-is-floating ::slotted(.paper-input-label) {
- transform: translateY(-75%) scale(0.75);
-
- /* Since we scale to 75/100 of the size, we actually have 100/75 of the
- original space now available */
- width: 133%;
-
- @apply --paper-input-container-label-floating;
- }
-
- :host(:dir(rtl)) .input-content.label-is-floating ::slotted(label),
- :host(:dir(rtl)) .input-content.label-is-floating ::slotted(.paper-input-label) {
- right: 0;
- left: auto;
- transform-origin: right top;
- }
-
- .input-content.label-is-highlighted ::slotted(label),
- .input-content.label-is-highlighted ::slotted(.paper-input-label) {
- color: var(--paper-input-container-focus-color, var(--primary-color));
-
- @apply --paper-input-container-label-focus;
- }
-
- .input-content.is-invalid ::slotted(label),
- .input-content.is-invalid ::slotted(.paper-input-label) {
- color: var(--paper-input-container-invalid-color, var(--error-color));
- }
-
- .input-content.label-is-hidden ::slotted(label),
- .input-content.label-is-hidden ::slotted(.paper-input-label) {
- visibility: hidden;
- }
-
- .input-content ::slotted(input),
- .input-content ::slotted(iron-input),
- .input-content ::slotted(textarea),
- .input-content ::slotted(iron-autogrow-textarea),
- .input-content ::slotted(.paper-input-input) {
- @apply --paper-input-container-shared-input-style;
- /* The apply shim doesn't apply the nested color custom property,
- so we have to re-apply it here. */
- color: var(--paper-input-container-input-color, var(--primary-text-color));
- @apply --paper-input-container-input;
- }
-
- .input-content ::slotted(input)::-webkit-outer-spin-button,
- .input-content ::slotted(input)::-webkit-inner-spin-button {
- @apply --paper-input-container-input-webkit-spinner;
- }
-
- .input-content.focused ::slotted(input),
- .input-content.focused ::slotted(iron-input),
- .input-content.focused ::slotted(textarea),
- .input-content.focused ::slotted(iron-autogrow-textarea),
- .input-content.focused ::slotted(.paper-input-input) {
- @apply --paper-input-container-input-focus;
- }
-
- .input-content.is-invalid ::slotted(input),
- .input-content.is-invalid ::slotted(iron-input),
- .input-content.is-invalid ::slotted(textarea),
- .input-content.is-invalid ::slotted(iron-autogrow-textarea),
- .input-content.is-invalid ::slotted(.paper-input-input) {
- @apply --paper-input-container-input-invalid;
- }
-
- .prefix ::slotted(*) {
- display: inline-block;
- @apply --paper-font-subhead;
- @apply --layout-flex-none;
- @apply --paper-input-prefix;
- }
-
- .suffix ::slotted(*) {
- display: inline-block;
- @apply --paper-font-subhead;
- @apply --layout-flex-none;
-
- @apply --paper-input-suffix;
- }
-
- /* Firefox sets a min-width on the input, which can cause layout issues */
- .input-content ::slotted(input) {
- min-width: 0;
- }
-
- .input-content ::slotted(textarea) {
- resize: none;
- }
-
- .add-on-content {
- position: relative;
- }
-
- .add-on-content.is-invalid ::slotted(*) {
- color: var(--paper-input-container-invalid-color, var(--error-color));
- }
-
- .add-on-content.is-highlighted ::slotted(*) {
- color: var(--paper-input-container-focus-color, var(--primary-color));
- }
- </style>
-
- <div class="floated-label-placeholder" aria-hidden="true" hidden="[[noLabelFloat]]">&nbsp;</div>
-
- <div class="input-wrapper">
- <span class="prefix"><slot name="prefix"></slot></span>
-
- <div class$="[[_computeInputContentClass(noLabelFloat,alwaysFloatLabel,focused,invalid,_inputHasContent)]]" id="labelAndInputContainer">
- <slot name="label"></slot>
- <slot name="input"></slot>
- </div>
-
- <span class="suffix"><slot name="suffix"></slot></span>
- </div>
-
- <div class$="[[_computeUnderlineClass(focused,invalid)]]">
- <div class="unfocused-line"></div>
- <div class="focused-line"></div>
- </div>
-
- <div class$="[[_computeAddOnContentClass(focused,invalid)]]">
- <slot name="add-on"></slot>
- </div>
-`,
-
- is: 'paper-input-container',
-
- properties: {
- /**
- * Set to true to disable the floating label. The label disappears when the
- * input value is not null.
- */
- noLabelFloat: {type: Boolean, value: false},
-
- /**
- * Set to true to always float the floating label.
- */
- alwaysFloatLabel: {type: Boolean, value: false},
-
- /**
- * The attribute to listen for value changes on.
- */
- attrForValue: {type: String, value: 'bind-value'},
-
- /**
- * Set to true to auto-validate the input value when it changes.
- */
- autoValidate: {type: Boolean, value: false},
-
- /**
- * True if the input is invalid. This property is set automatically when the
- * input value changes if auto-validating, or when the `iron-input-validate`
- * event is heard from a child.
- */
- invalid: {observer: '_invalidChanged', type: Boolean, value: false},
-
- /**
- * True if the input has focus.
- */
- focused: {readOnly: true, type: Boolean, value: false, notify: true},
-
- _addons: {
- type: Array
- // do not set a default value here intentionally - it will be initialized
- // lazily when a distributed child is attached, which may occur before
- // configuration for this element in polyfill.
- },
-
- _inputHasContent: {type: Boolean, value: false},
-
- _inputSelector:
- {type: String, value: 'input,iron-input,textarea,.paper-input-input'},
-
- _boundOnFocus: {
- type: Function,
- value: function() {
- return this._onFocus.bind(this);
- }
- },
-
- _boundOnBlur: {
- type: Function,
- value: function() {
- return this._onBlur.bind(this);
- }
- },
-
- _boundOnInput: {
- type: Function,
- value: function() {
- return this._onInput.bind(this);
- }
- },
-
- _boundValueChanged: {
- type: Function,
- value: function() {
- return this._onValueChanged.bind(this);
- }
- }
- },
-
- listeners: {
- 'addon-attached': '_onAddonAttached',
- 'iron-input-validate': '_onIronInputValidate'
- },
-
- get _valueChangedEvent() {
- return this.attrForValue + '-changed';
- },
-
- get _propertyForValue() {
- return dashToCamelCase(this.attrForValue);
- },
-
- get _inputElement() {
- return dom(this).querySelector(this._inputSelector);
- },
-
- get _inputElementValue() {
- return this._inputElement[this._propertyForValue] ||
- this._inputElement.value;
- },
-
- ready: function() {
- // Paper-input treats a value of undefined differently at startup than
- // the rest of the time (specifically: it does not validate it at startup,
- // but it does after that. We need to track whether the first time we
- // encounter the value is basically this first time, so that we can validate
- // it correctly the rest of the time. See
- // https://github.com/PolymerElements/paper-input/issues/605
- this.__isFirstValueUpdate = true;
- if (!this._addons) {
- this._addons = [];
- }
- this.addEventListener('focus', this._boundOnFocus, true);
- this.addEventListener('blur', this._boundOnBlur, true);
- },
-
- attached: function() {
- if (this.attrForValue) {
- this._inputElement.addEventListener(
- this._valueChangedEvent, this._boundValueChanged);
- } else {
- this.addEventListener('input', this._onInput);
- }
-
- // Only validate when attached if the input already has a value.
- if (this._inputElementValue && this._inputElementValue != '') {
- this._handleValueAndAutoValidate(this._inputElement);
- } else {
- this._handleValue(this._inputElement);
- }
- },
-
- /** @private */
- _onAddonAttached: function(event) {
- if (!this._addons) {
- this._addons = [];
- }
- var target = event.target;
- if (this._addons.indexOf(target) === -1) {
- this._addons.push(target);
- if (this.isAttached) {
- this._handleValue(this._inputElement);
- }
- }
- },
-
- /** @private */
- _onFocus: function() {
- this._setFocused(true);
- },
-
- /** @private */
- _onBlur: function() {
- this._setFocused(false);
- this._handleValueAndAutoValidate(this._inputElement);
- },
-
- /** @private */
- _onInput: function(event) {
- this._handleValueAndAutoValidate(event.target);
- },
-
- /** @private */
- _onValueChanged: function(event) {
- var input = event.target;
-
- // Paper-input treats a value of undefined differently at startup than
- // the rest of the time (specifically: it does not validate it at startup,
- // but it does after that. If this is in fact the bootup case, ignore
- // validation, just this once.
- if (this.__isFirstValueUpdate) {
- this.__isFirstValueUpdate = false;
- if (input.value === undefined || input.value === '') {
- return;
- }
- }
-
- this._handleValueAndAutoValidate(event.target);
- },
-
- /** @private */
- _handleValue: function(inputElement) {
- var value = this._inputElementValue;
-
- // type="number" hack needed because this.value is empty until it's valid
- if (value || value === 0 ||
- (inputElement.type === 'number' && !inputElement.checkValidity())) {
- this._inputHasContent = true;
- } else {
- this._inputHasContent = false;
- }
-
- this.updateAddons(
- {inputElement: inputElement, value: value, invalid: this.invalid});
- },
-
- /** @private */
- _handleValueAndAutoValidate: function(inputElement) {
- if (this.autoValidate && inputElement) {
- var valid;
-
- if (inputElement.validate) {
- valid = inputElement.validate(this._inputElementValue);
- } else {
- valid = inputElement.checkValidity();
- }
- this.invalid = !valid;
- }
-
- // Call this last to notify the add-ons.
- this._handleValue(inputElement);
- },
-
- /** @private */
- _onIronInputValidate: function(event) {
- this.invalid = this._inputElement.invalid;
- },
-
- /** @private */
- _invalidChanged: function() {
- if (this._addons) {
- this.updateAddons({invalid: this.invalid});
- }
- },
-
- /**
- * Call this to update the state of add-ons.
- * @param {Object} state Add-on state.
- */
- updateAddons: function(state) {
- for (var addon, index = 0; addon = this._addons[index]; index++) {
- addon.update(state);
- }
- },
-
- /** @private */
- _computeInputContentClass: function(
- noLabelFloat, alwaysFloatLabel, focused, invalid, _inputHasContent) {
- var cls = 'input-content';
- if (!noLabelFloat) {
- var label = this.querySelector('label');
-
- if (alwaysFloatLabel || _inputHasContent) {
- cls += ' label-is-floating';
- // If the label is floating, ignore any offsets that may have been
- // applied from a prefix element.
- this.$.labelAndInputContainer.style.position = 'static';
-
- if (invalid) {
- cls += ' is-invalid';
- } else if (focused) {
- cls += ' label-is-highlighted';
- }
- } else {
- // When the label is not floating, it should overlap the input element.
- if (label) {
- this.$.labelAndInputContainer.style.position = 'relative';
- }
- if (invalid) {
- cls += ' is-invalid';
- }
- }
- } else {
- if (_inputHasContent) {
- cls += ' label-is-hidden';
- }
- if (invalid) {
- cls += ' is-invalid';
- }
- }
- if (focused) {
- cls += ' focused';
- }
- return cls;
- },
-
- /** @private */
- _computeUnderlineClass: function(focused, invalid) {
- var cls = 'underline';
- if (invalid) {
- cls += ' is-invalid';
- } else if (focused) {
- cls += ' is-highlighted'
- }
- return cls;
- },
-
- /** @private */
- _computeAddOnContentClass: function(focused, invalid) {
- var cls = 'add-on-content';
- if (invalid) {
- cls += ' is-invalid';
- } else if (focused) {
- cls += ' is-highlighted'
- }
- return cls;
- }
-});
diff --git a/chromium/third_party/polymer/v3_0/components-chromium/paper-input/paper-input-error.js b/chromium/third_party/polymer/v3_0/components-chromium/paper-input/paper-input-error.js
deleted file mode 100644
index 97589a3287a..00000000000
--- a/chromium/third_party/polymer/v3_0/components-chromium/paper-input/paper-input-error.js
+++ /dev/null
@@ -1,107 +0,0 @@
-/**
-@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
-*/
-import '../polymer/polymer_bundled.min.js';
-import '../paper-styles/default-theme.js';
-import '../paper-styles/typography.js';
-
-import {Polymer} from '../polymer/polymer_bundled.min.js';
-import {html} from '../polymer/polymer_bundled.min.js';
-
-import {PaperInputAddonBehavior} from './paper-input-addon-behavior.js';
-
-/*
-`<paper-input-error>` is an error message for use with
-`<paper-input-container>`. The error is displayed when the
-`<paper-input-container>` is `invalid`.
-
- <paper-input-container>
- <input pattern="[0-9]*">
- <paper-input-error slot="add-on">Only numbers are
-allowed!</paper-input-error>
- </paper-input-container>
-
-### Styling
-
-The following custom properties and mixins are available for styling:
-
-Custom property | Description | Default
-----------------|-------------|----------
-`--paper-input-container-invalid-color` | The foreground color of the error | `--error-color`
-`--paper-input-error` | Mixin applied to the error | `{}`
-*/
-Polymer({
- _template: html`
- <style>
- :host {
- display: inline-block;
- visibility: hidden;
-
- color: var(--paper-input-container-invalid-color, var(--error-color));
-
- @apply --paper-font-caption;
- @apply --paper-input-error;
- position: absolute;
- left:0;
- right:0;
- }
-
- :host([invalid]) {
- visibility: visible;
- }
-
- #a11yWrapper {
- visibility: hidden;
- }
-
- :host([invalid]) #a11yWrapper {
- visibility: visible;
- }
- </style>
-
- <!--
- If the paper-input-error element is directly referenced by an
- \`aria-describedby\` attribute, such as when used as a paper-input add-on,
- then applying \`visibility: hidden;\` to the paper-input-error element itself
- does not hide the error.
-
- For more information, see:
- https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_description
- -->
- <div id="a11yWrapper">
- <slot></slot>
- </div>
-`,
-
- is: 'paper-input-error',
- behaviors: [PaperInputAddonBehavior],
-
- properties: {
- /**
- * True if the error is showing.
- */
- invalid: {readOnly: true, reflectToAttribute: true, type: Boolean}
- },
-
- /**
- * This overrides the update function in PaperInputAddonBehavior.
- * @param {{
- * inputElement: (Element|undefined),
- * value: (string|undefined),
- * invalid: boolean
- * }} state -
- * inputElement: The input element.
- * value: The input value.
- * invalid: True if the input value is invalid.
- */
- update: function(state) {
- this._setInvalid(state.invalid);
- }
-});
diff --git a/chromium/third_party/polymer/v3_0/package-lock.json b/chromium/third_party/polymer/v3_0/package-lock.json
index 4b840fcb967..2c19ef83993 100644
--- a/chromium/third_party/polymer/v3_0/package-lock.json
+++ b/chromium/third_party/polymer/v3_0/package-lock.json
@@ -34,17 +34,6 @@
"@polymer/polymer": "^3.0.0"
}
},
- "@polymer/iron-autogrow-textarea": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/@polymer/iron-autogrow-textarea/-/iron-autogrow-textarea-3.0.1.tgz",
- "integrity": "sha512-FgSL7APrOSL9Vu812sBCFlQ17hvnJsBAV2C2e1UAiaHhB+dyfLq8gGdGUpqVWuGJ50q4Y/49QwCNnLf85AdVYA==",
- "requires": {
- "@polymer/iron-behaviors": "^3.0.0-pre.26",
- "@polymer/iron-flex-layout": "^3.0.0-pre.26",
- "@polymer/iron-validatable-behavior": "^3.0.0-pre.26",
- "@polymer/polymer": "^3.0.0"
- }
- },
"@polymer/iron-behaviors": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@polymer/iron-behaviors/-/iron-behaviors-3.0.1.tgz",
@@ -127,16 +116,6 @@
"@polymer/polymer": "^3.0.0"
}
},
- "@polymer/iron-input": {
- "version": "3.0.1",
- "resolved": "https://registry.npmjs.org/@polymer/iron-input/-/iron-input-3.0.1.tgz",
- "integrity": "sha512-WLx13kEcbH9GKbj9+pWR6pbJkA5kxn3796ynx6eQd2rueMyUfVTR3GzOvadBKsciUuIuzrxpBWZ2+3UcueVUQQ==",
- "requires": {
- "@polymer/iron-a11y-announcer": "^3.0.0-pre.26",
- "@polymer/iron-validatable-behavior": "^3.0.0-pre.26",
- "@polymer/polymer": "^3.0.0"
- }
- },
"@polymer/iron-list": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/@polymer/iron-list/-/iron-list-3.1.0.tgz",
@@ -272,20 +251,6 @@
"@polymer/polymer": "^3.0.0"
}
},
- "@polymer/paper-input": {
- "version": "3.0.2",
- "resolved": "https://registry.npmjs.org/@polymer/paper-input/-/paper-input-3.0.2.tgz",
- "integrity": "sha512-EoyJLsUCo7zLQp63jG7+qbRcN7ynT0p9MktDeH+dnl29UqFD4Ovj2/O5cSgq3lA3dYrei4vHF11Qmdmk7iab7Q==",
- "requires": {
- "@polymer/iron-a11y-keys-behavior": "^3.0.0-pre.26",
- "@polymer/iron-autogrow-textarea": "^3.0.0-pre.26",
- "@polymer/iron-behaviors": "^3.0.0-pre.26",
- "@polymer/iron-form-element-behavior": "^3.0.0-pre.26",
- "@polymer/iron-input": "^3.0.0-pre.26",
- "@polymer/paper-styles": "^3.0.0-pre.26",
- "@polymer/polymer": "^3.0.0"
- }
- },
"@polymer/paper-progress": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@polymer/paper-progress/-/paper-progress-3.0.1.tgz",
diff --git a/chromium/third_party/polymer/v3_0/package.json b/chromium/third_party/polymer/v3_0/package.json
index 05557f6c591..bf13772178b 100644
--- a/chromium/third_party/polymer/v3_0/package.json
+++ b/chromium/third_party/polymer/v3_0/package.json
@@ -14,7 +14,6 @@
"@polymer/iron-flex-layout": "3.0.1",
"@polymer/iron-icon": "3.0.1",
"@polymer/iron-iconset-svg": "3.0.1",
- "@polymer/iron-input": "3.0.1",
"@polymer/iron-list": "3.1.0",
"@polymer/iron-location": "3.0.1",
"@polymer/iron-media-query": "3.0.1",
@@ -27,10 +26,8 @@
"@polymer/iron-scroll-threshold": "3.0.1",
"@polymer/iron-selector": "3.0.1",
"@polymer/iron-test-helpers": "3.0.1",
- "@polymer/iron-validatable-behavior": "3.0.1",
"@polymer/neon-animation": "3.0.1",
"@polymer/paper-behaviors": "3.0.1",
- "@polymer/paper-input": "3.0.2",
"@polymer/paper-progress": "3.0.1",
"@polymer/paper-ripple": "3.0.1",
"@polymer/paper-spinner": "3.0.2",
diff --git a/chromium/third_party/polymer/v3_0/rsync_exclude.txt b/chromium/third_party/polymer/v3_0/rsync_exclude.txt
index 5777fbb9a6a..13b31ca9c40 100644
--- a/chromium/third_party/polymer/v3_0/rsync_exclude.txt
+++ b/chromium/third_party/polymer/v3_0/rsync_exclude.txt
@@ -31,15 +31,15 @@ package-lock.json
*/site/
*/templates/
-# iron-autogrow-textarea
-iron-autogrow-textarea/*
-
# iron-checked-element-behavior
iron-checked-element-behavior/*
# iron-form-element-behavior
iron-form-element-behavior/*
+# iron-validatable-behavior
+iron-validatable-behavior/*
+
# iron-test-helpers
iron-test-helpers/iron-test-helpers.js
iron-test-helpers/test-helpers.js
@@ -48,12 +48,6 @@ iron-test-helpers/test-helpers.js
paper-behaviors/paper-button-behavior.js
paper-behaviors/paper-checked-element-behavior.js
-# paper-input
-paper-input/paper-input-behavior.js
-paper-input/paper-input-char-counter.js
-paper-input/paper-input.js
-paper-input/paper-textarea.js
-
# paper-spinner
paper-spinner/paper-spinner.js