@polymer/iron-behaviors
Advanced tools
Comparing version 3.0.0-pre.12 to 3.0.0-pre.13
@@ -1,7 +0,1 @@ | ||
import '@polymer/polymer/polymer-legacy.js'; | ||
import { IronButtonState } from '../iron-button-state.js'; | ||
import { IronControlState } from '../iron-control-state.js'; | ||
import { Polymer } from '@polymer/polymer/lib/legacy/polymer-fn.js'; | ||
import { html } from '@polymer/polymer/lib/utils/html-tag.js'; | ||
/** | ||
@@ -16,2 +10,8 @@ @license | ||
*/ | ||
import '../../polymer/polymer-legacy.js'; | ||
import { IronButtonState } from '../iron-button-state.js'; | ||
import { IronControlState } from '../iron-control-state.js'; | ||
import { Polymer } from '../../polymer/lib/legacy/polymer-fn.js'; | ||
import { html } from '../../polymer/lib/utils/html-tag.js'; | ||
Polymer({ | ||
@@ -58,11 +58,4 @@ _template: html` | ||
is: 'simple-button', | ||
behaviors: [ | ||
IronControlState, | ||
IronButtonState | ||
], | ||
hostAttributes: { | ||
role: 'button' | ||
} | ||
behaviors: [IronControlState, IronButtonState], | ||
hostAttributes: {role: 'button'} | ||
}); |
@@ -1,6 +0,20 @@ | ||
import '@polymer/polymer/polymer-legacy.js'; | ||
import { IronA11yKeysBehavior } from '@polymer/iron-a11y-keys-behavior/iron-a11y-keys-behavior.js'; | ||
/** | ||
@license | ||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
Code distributed by Google as part of the polymer project is also | ||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
*/ | ||
import '../polymer/polymer-legacy.js'; | ||
import { IronA11yKeysBehavior } from '../iron-a11y-keys-behavior/iron-a11y-keys-behavior.js'; | ||
import './iron-control-state.js'; | ||
import { dom } from '@polymer/polymer/lib/legacy/polymer.dom.js'; | ||
import { dom } from '../polymer/lib/legacy/polymer.dom.js'; | ||
/** | ||
* @demo demo/index.html | ||
* @polymerBehavior Polymer.IronButtonState | ||
*/ | ||
export const IronButtonStateImpl = { | ||
@@ -25,7 +39,3 @@ | ||
*/ | ||
toggles: { | ||
type: Boolean, | ||
value: false, | ||
reflectToAttribute: true | ||
}, | ||
toggles: {type: Boolean, value: false, reflectToAttribute: true}, | ||
@@ -35,8 +45,4 @@ /** | ||
*/ | ||
active: { | ||
type: Boolean, | ||
value: false, | ||
notify: true, | ||
reflectToAttribute: true | ||
}, | ||
active: | ||
{type: Boolean, value: false, notify: true, reflectToAttribute: true}, | ||
@@ -48,7 +54,3 @@ /** | ||
*/ | ||
pointerDown: { | ||
type: Boolean, | ||
readOnly: true, | ||
value: false | ||
}, | ||
pointerDown: {type: Boolean, readOnly: true, value: false}, | ||
@@ -59,6 +61,3 @@ /** | ||
*/ | ||
receivedFocusFromKeyboard: { | ||
type: Boolean, | ||
readOnly: true | ||
}, | ||
receivedFocusFromKeyboard: {type: Boolean, readOnly: true}, | ||
@@ -76,12 +75,6 @@ /** | ||
listeners: { | ||
down: '_downHandler', | ||
up: '_upHandler', | ||
tap: '_tapHandler' | ||
}, | ||
listeners: {down: '_downHandler', up: '_upHandler', tap: '_tapHandler'}, | ||
observers: [ | ||
'_focusChanged(focused)', | ||
'_activeChanged(active, ariaActiveAttribute)' | ||
], | ||
observers: | ||
['_focusChanged(focused)', '_activeChanged(active, ariaActiveAttribute)'], | ||
@@ -101,3 +94,3 @@ /** | ||
if (this.toggles) { | ||
// a tap is needed to toggle the active state | ||
// a tap is needed to toggle the active state | ||
this._userActivate(!this.active); | ||
@@ -150,3 +143,3 @@ } else { | ||
// element will deal with it. | ||
if (this.isLightDescendant(/** @type {Node} */(target))) | ||
if (this.isLightDescendant(/** @type {Node} */ (target))) | ||
return; | ||
@@ -168,3 +161,3 @@ | ||
// element will deal with it. | ||
if (this.isLightDescendant(/** @type {Node} */(target))) | ||
if (this.isLightDescendant(/** @type {Node} */ (target))) | ||
return; | ||
@@ -200,4 +193,3 @@ | ||
if (this.toggles) { | ||
this.setAttribute(this.ariaActiveAttribute, | ||
active ? 'true' : 'false'); | ||
this.setAttribute(this.ariaActiveAttribute, active ? 'true' : 'false'); | ||
} else { | ||
@@ -221,3 +213,3 @@ this.removeAttribute(this.ariaActiveAttribute); | ||
if (this._buttonStateChanged) { | ||
this._buttonStateChanged(); // abstract | ||
this._buttonStateChanged(); // abstract | ||
} | ||
@@ -228,5 +220,3 @@ } | ||
export const IronButtonState = [ | ||
IronA11yKeysBehavior, | ||
IronButtonStateImpl | ||
]; | ||
/** @polymerBehavior */ | ||
export const IronButtonState = [IronA11yKeysBehavior, IronButtonStateImpl]; |
@@ -1,5 +0,19 @@ | ||
import '@polymer/polymer/polymer-legacy.js'; | ||
import { PolymerElement } from '@polymer/polymer/polymer-element.js'; | ||
import { dom } from '@polymer/polymer/lib/legacy/polymer.dom.js'; | ||
/** | ||
@license | ||
Copyright (c) 2015 The Polymer Project Authors. All rights reserved. | ||
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt | ||
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt | ||
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt | ||
Code distributed by Google as part of the polymer project is also | ||
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt | ||
*/ | ||
import '../polymer/polymer-legacy.js'; | ||
import { PolymerElement } from '../polymer/polymer-element.js'; | ||
import { dom } from '../polymer/lib/legacy/polymer.dom.js'; | ||
/** | ||
* @demo demo/index.html | ||
* @polymerBehavior | ||
*/ | ||
export const IronControlState = { | ||
@@ -36,5 +50,3 @@ | ||
*/ | ||
_oldTabIndex: { | ||
type: String | ||
}, | ||
_oldTabIndex: {type: String}, | ||
@@ -56,5 +68,3 @@ _boundFocusBlurHandler: { | ||
observers: [ | ||
'_changedControlState(focused, disabled)' | ||
], | ||
observers: ['_changedControlState(focused, disabled)'], | ||
@@ -84,9 +94,8 @@ /** | ||
} else if (this.__handleEventRetargeting) { | ||
var target = /** @type {Node} */(dom(event).localTarget); | ||
var target = /** @type {Node} */ (dom(event).localTarget); | ||
if (!this.isLightDescendant(target)) { | ||
this.fire(event.type, {sourceEvent: event}, { | ||
node: this, | ||
bubbles: event.bubbles, | ||
cancelable: event.cancelable | ||
}); | ||
this.fire( | ||
event.type, | ||
{sourceEvent: event}, | ||
{node: this, bubbles: event.bubbles, cancelable: event.cancelable}); | ||
} | ||
@@ -93,0 +102,0 @@ } |
@@ -12,13 +12,15 @@ { | ||
"bower": "^1.8.0", | ||
"@polymer/paper-styles": "3.0.0-pre.12", | ||
"@polymer/paper-input": "3.0.0-pre.12", | ||
"@polymer/iron-test-helpers": "3.0.0-pre.12", | ||
"@polymer/iron-component-page": "3.0.0-pre.12", | ||
"wct-browser-legacy": "0.0.1-pre.11", | ||
"@webcomponents/webcomponentsjs": "^1.0.0" | ||
"webmat": "^0.2.0", | ||
"@polymer/paper-styles": "^3.0.0-pre.13", | ||
"@polymer/paper-input": "^3.0.0-pre.13", | ||
"@polymer/iron-test-helpers": "^3.0.0-pre.13", | ||
"@polymer/iron-component-page": "^3.0.0-pre.13", | ||
"wct-browser-legacy": "^0.0.1-pre.11", | ||
"@webcomponents/webcomponentsjs": "^2.0.0-0" | ||
}, | ||
"scripts": { | ||
"update-types": "bower install && gen-typescript-declarations --deleteExisting --outDir ." | ||
"update-types": "bower install && gen-typescript-declarations --deleteExisting --outDir .", | ||
"format": "webmat && npm run update-types" | ||
}, | ||
"version": "3.0.0-pre.12", | ||
"version": "3.0.0-pre.13", | ||
"resolutions": { | ||
@@ -32,5 +34,5 @@ "inherits": "2.0.3", | ||
"dependencies": { | ||
"@polymer/polymer": "3.0.0-pre.12", | ||
"@polymer/iron-a11y-keys-behavior": "3.0.0-pre.12" | ||
"@polymer/polymer": "^3.0.0-pre.13", | ||
"@polymer/iron-a11y-keys-behavior": "^3.0.0-pre.13" | ||
} | ||
} |
@@ -1,7 +0,1 @@ | ||
import '@polymer/polymer/polymer-legacy.js'; | ||
import { IronControlState } from '../iron-control-state.js'; | ||
import { IronButtonState } from '../iron-button-state.js'; | ||
import { Polymer } from '@polymer/polymer/lib/legacy/polymer-fn.js'; | ||
import { html } from '@polymer/polymer/lib/utils/html-tag.js'; | ||
/** | ||
@@ -16,2 +10,8 @@ @license | ||
*/ | ||
import '../../polymer/polymer-legacy.js'; | ||
import { IronControlState } from '../iron-control-state.js'; | ||
import { IronButtonState } from '../iron-button-state.js'; | ||
import { Polymer } from '../../polymer/lib/legacy/polymer-fn.js'; | ||
import { html } from '../../polymer/lib/utils/html-tag.js'; | ||
Polymer({ | ||
@@ -21,8 +21,5 @@ | ||
behaviors: [ | ||
IronControlState | ||
] | ||
behaviors: [IronControlState] | ||
}); | ||
Polymer({ | ||
@@ -32,6 +29,3 @@ | ||
behaviors: [ | ||
IronControlState, | ||
IronButtonState | ||
], | ||
behaviors: [IronControlState, IronButtonState], | ||
@@ -43,3 +37,2 @@ _buttonStateChanged: function() { | ||
}); | ||
Polymer({ | ||
@@ -51,8 +44,4 @@ _template: html` | ||
is: 'nested-focusable', | ||
behaviors: [ | ||
IronControlState | ||
] | ||
behaviors: [IronControlState] | ||
}); | ||
Polymer({ | ||
@@ -64,7 +53,3 @@ _template: html` | ||
is: 'test-light-dom', | ||
behaviors: [ | ||
IronControlState, | ||
IronButtonState | ||
] | ||
behaviors: [IronControlState, IronButtonState] | ||
}); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
43176
9
430
+ Added@polymer/iron-a11y-keys-behavior@3.0.1(transitive)
+ Added@polymer/polymer@3.5.1(transitive)
- Removed@polymer/iron-a11y-keys-behavior@3.0.0-pre.12(transitive)
- Removed@polymer/polymer@3.0.0-pre.12(transitive)
- Removed@webcomponents/webcomponentsjs@1.3.3(transitive)