mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update webcomponents
This commit is contained in:
parent
7fb95d0419
commit
ffb0fd30b6
17 changed files with 128 additions and 80 deletions
|
@ -6599,11 +6599,6 @@ this.fire('dom-change');
|
|||
],
|
||||
|
||||
ready: function() {
|
||||
// TODO(sjmiles): ensure read-only property is valued so the compound
|
||||
// observer will fire
|
||||
if (this.focused === undefined) {
|
||||
this._setFocused(false);
|
||||
}
|
||||
this.addEventListener('focus', this._boundFocusBlurHandler, true);
|
||||
this.addEventListener('blur', this._boundFocusBlurHandler, true);
|
||||
},
|
||||
|
@ -6614,7 +6609,6 @@ this.fire('dom-change');
|
|||
var focused = event.type === 'focus';
|
||||
this._setFocused(focused);
|
||||
} else if (!this.shadowRoot) {
|
||||
event.stopPropagation();
|
||||
this.fire(event.type, {sourceEvent: event}, {
|
||||
node: this,
|
||||
bubbles: event.bubbles,
|
||||
|
@ -6742,8 +6736,10 @@ this.fire('dom-change');
|
|||
// to emulate native checkbox, (de-)activations from a user interaction fire
|
||||
// 'change' events
|
||||
_userActivate: function(active) {
|
||||
this.active = active;
|
||||
this.fire('change');
|
||||
if (this.active !== active) {
|
||||
this.active = active;
|
||||
this.fire('change');
|
||||
}
|
||||
},
|
||||
|
||||
_eventSourceIsPrimaryInput: function(event) {
|
||||
|
@ -11570,7 +11566,7 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
|
|||
/**
|
||||
* Use `Polymer.IronValidatableBehavior` to implement an element that validates user input.
|
||||
*
|
||||
* ### Accessiblity
|
||||
* ### Accessibility
|
||||
*
|
||||
* Changing the `invalid` property, either manually or by calling `validate()` will update the
|
||||
* `aria-invalid` attribute.
|
||||
|
@ -11641,19 +11637,35 @@ The `aria-labelledby` attribute will be set to the header element, if one exists
|
|||
},
|
||||
|
||||
/**
|
||||
* @param {Object} values Passed to the validator's `validate()` function.
|
||||
* @return {boolean} True if `values` is valid.
|
||||
* 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 The value to be validated. By default, it is passed
|
||||
* to the validator's `validate()` function, if a validator is set.
|
||||
* @return {boolean} True if `value` is valid.
|
||||
*/
|
||||
validate: function(values) {
|
||||
var valid = true;
|
||||
validate: function(value) {
|
||||
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()) {
|
||||
valid = this._validator.validate(values);
|
||||
return this._validator.validate(value);
|
||||
}
|
||||
|
||||
this.invalid = !valid;
|
||||
return valid;
|
||||
return true;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
</script>
|
||||
|
@ -12047,14 +12059,6 @@ is separate from validation, and `allowed-pattern` does not affect how the input
|
|||
value: false
|
||||
},
|
||||
|
||||
/**
|
||||
* The maximum length of the input value. Bind this to the `<input is="iron-input">`'s
|
||||
* `maxlength` property.
|
||||
*/
|
||||
maxlength: {
|
||||
type: Number
|
||||
},
|
||||
|
||||
/**
|
||||
* The error message to display when the input is invalid. Bind this to the
|
||||
* `<paper-input-error>`'s content, if using.
|
||||
|
@ -12137,6 +12141,39 @@ is separate from validation, and `allowed-pattern` does not affect how the input
|
|||
type: Number
|
||||
},
|
||||
|
||||
/**
|
||||
* The maximum length of the input value. Bind this to the `<input is="iron-input">`'s
|
||||
* `maxlength` property.
|
||||
*/
|
||||
maxlength: {
|
||||
type: Number
|
||||
},
|
||||
|
||||
/**
|
||||
* The minimum (numeric or date-time) input value.
|
||||
* Bind this to the `<input is="iron-input">`'s `min` property.
|
||||
*/
|
||||
min: {
|
||||
type: String
|
||||
},
|
||||
|
||||
/**
|
||||
* The maximum (numeric or date-time) input value.
|
||||
* Can be a String (e.g. `"2000-1-1"`) or a Number (e.g. `2`).
|
||||
* Bind this to the `<input is="iron-input">`'s `max` property.
|
||||
*/
|
||||
max: {
|
||||
type: String
|
||||
},
|
||||
|
||||
/**
|
||||
* Limits the numeric or date-time increments.
|
||||
* Bind this to the `<input is="iron-input">`'s `step` property.
|
||||
*/
|
||||
step: {
|
||||
type: String
|
||||
},
|
||||
|
||||
/**
|
||||
* Bind this to the `<input is="iron-input">`'s `name` property.
|
||||
*/
|
||||
|
@ -16257,10 +16294,14 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] {
|
|||
@apply(--paper-input-container-input);
|
||||
}
|
||||
|
||||
::content [prefix],
|
||||
::content [prefix] {
|
||||
@apply(--paper-font-subhead);
|
||||
@apply(--paper-input-prefix);
|
||||
}
|
||||
|
||||
::content [suffix] {
|
||||
@apply(--paper-font-subhead);
|
||||
@apply(--paper-input-container-input);
|
||||
@apply(--paper-input-suffix);
|
||||
}
|
||||
|
||||
/* Firefox sets a min-width on the input, which can cause layout issues */
|
||||
|
@ -16743,7 +16784,7 @@ iron-selector:not(.narrow-layout) #main ::content [paper-drawer-toggle] {
|
|||
|
||||
<label hidden$="[[!label]]">[[label]]</label>
|
||||
|
||||
<input is="iron-input" id="input" aria-labelledby$="[[_ariaLabelledBy]]" aria-describedby$="[[_ariaDescribedBy]]" disabled$="[[disabled]]" bind-value="{{value}}" invalid="{{invalid}}" prevent-invalid-input="[[preventInvalidInput]]" allowed-pattern="[[allowedPattern]]" validator="[[validator]]" type$="[[type]]" pattern$="[[pattern]]" maxlength$="[[maxlength]]" required$="[[required]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" minlength$="[[minlength]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" list$="[[list]]" size$="[[size]]" autocapitalize$="[[autocapitalize]]" autocorrect$="[[autocorrect]]">
|
||||
<input is="iron-input" id="input" aria-labelledby$="[[_ariaLabelledBy]]" aria-describedby$="[[_ariaDescribedBy]]" disabled$="[[disabled]]" bind-value="{{value}}" invalid="{{invalid}}" prevent-invalid-input="[[preventInvalidInput]]" allowed-pattern="[[allowedPattern]]" validator="[[validator]]" type$="[[type]]" pattern$="[[pattern]]" required$="[[required]]" autocomplete$="[[autocomplete]]" autofocus$="[[autofocus]]" inputmode$="[[inputmode]]" minlength$="[[minlength]]" maxlength$="[[maxlength]]" min$="[[min]]" max$="[[max]]" step$="[[step]]" name$="[[name]]" placeholder$="[[placeholder]]" readonly$="[[readonly]]" list$="[[list]]" size$="[[size]]" autocapitalize$="[[autocapitalize]]" autocorrect$="[[autocorrect]]">
|
||||
|
||||
<content select="[suffix]"></content>
|
||||
|
||||
|
@ -17566,6 +17607,7 @@ paper-ripple {
|
|||
height: 100%;
|
||||
font-size: inherit;
|
||||
font-family: inherit;
|
||||
line-height: inherit;
|
||||
}
|
||||
|
||||
::content textarea:invalid {
|
||||
|
@ -17645,8 +17687,8 @@ paper-ripple {
|
|||
* Bound to the textarea's `autofocus` attribute.
|
||||
*/
|
||||
autofocus: {
|
||||
type: String,
|
||||
value: 'off'
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -17797,7 +17839,7 @@ paper-ripple {
|
|||
_computeValue: function() {
|
||||
return this.bindValue;
|
||||
}
|
||||
})
|
||||
});
|
||||
</script>
|
||||
<dom-module id="paper-textarea" assetpath="bower_components/paper-input/">
|
||||
<template>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue