Commit 1d4d7315 authored by Esmael El-Moslimany's avatar Esmael El-Moslimany Committed by Commit Bot

WebUI: remove paper-tabs as it is no longer used

Bug: 960564
Change-Id: Ied93550b6f591e64404ebed7324d2ac6ed3c08d1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1618056Reviewed-by: default avatarDemetrios Papadopoulos <dpapad@chromium.org>
Commit-Queue: Esmael El-Moslimany <aee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#661106}
parent 8dd13b61
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
"paper-ripple": "PolymerElements/paper-ripple#2.0.1", "paper-ripple": "PolymerElements/paper-ripple#2.0.1",
"paper-spinner": "PolymerElements/paper-spinner#2.0.0", "paper-spinner": "PolymerElements/paper-spinner#2.0.0",
"paper-styles": "PolymerElements/paper-styles#2.1.0", "paper-styles": "PolymerElements/paper-styles#2.1.0",
"paper-tabs": "PolymerElements/paper-tabs#2.0.0",
"paper-tooltip": "PolymerElements/paper-tooltip#2.1.1", "paper-tooltip": "PolymerElements/paper-tooltip#2.1.1",
"polymer2": "Polymer/polymer#2.7.0", "polymer2": "Polymer/polymer#2.7.0",
"polymer": "Polymer/polymer#1.11.2", "polymer": "Polymer/polymer#1.11.2",
......
# Copyright 2019 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-tab-extracted") {
deps = [
"../iron-behaviors:iron-button-state-extracted",
"../iron-behaviors:iron-control-state-extracted",
"../paper-behaviors:paper-ripple-behavior-extracted",
]
}
js_library("paper-tabs-extracted") {
deps = [
":paper-tab-extracted",
"../iron-icon:iron-icon-extracted",
"../iron-menu-behavior:iron-menubar-behavior-extracted",
"../iron-resizable-behavior:iron-resizable-behavior-extracted",
"../paper-icon-button:paper-icon-button-extracted",
]
}
{
"name": "paper-tabs",
"version": "2.0.0",
"license": "http://polymer.github.io/LICENSE.txt",
"description": "Material design tabs",
"private": true,
"main": "paper-tabs.html",
"authors": [
"The Polymer Authors"
],
"keywords": [
"web-components",
"polymer",
"tabs",
"control"
],
"repository": {
"type": "git",
"url": "git://github.com/PolymerElements/paper-tabs.git"
},
"dependencies": {
"iron-behaviors": "PolymerElements/iron-behaviors#1 - 2",
"iron-flex-layout": "PolymerElements/iron-flex-layout#1 - 2",
"iron-icon": "PolymerElements/iron-icon#1 - 2",
"iron-iconset-svg": "PolymerElements/iron-iconset-svg#1 - 2",
"iron-menu-behavior": "PolymerElements/iron-menu-behavior#1 - 2",
"iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#1 - 2",
"paper-behaviors": "PolymerElements/paper-behaviors#1 - 2",
"paper-icon-button": "PolymerElements/paper-icon-button#1 - 2",
"paper-styles": "PolymerElements/paper-styles#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-pages": "PolymerElements/iron-pages#1 - 2",
"iron-test-helpers": "PolymerElements/iron-test-helpers#1 - 2",
"web-component-tester": "^6.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^1.0.0"
},
"variants": {
"1.x": {
"dependencies": {
"iron-behaviors": "PolymerElements/iron-behaviors#^1.0.0",
"iron-flex-layout": "PolymerElements/iron-flex-layout#^1.0.0",
"iron-icon": "PolymerElements/iron-icon#^1.0.0",
"iron-iconset-svg": "PolymerElements/iron-iconset-svg#^1.0.0",
"iron-menu-behavior": "PolymerElements/iron-menu-behavior#^1.1.0",
"iron-resizable-behavior": "PolymerElements/iron-resizable-behavior#^1.0.0",
"paper-behaviors": "PolymerElements/paper-behaviors#^1.0.0",
"paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0",
"paper-styles": "PolymerElements/paper-styles#^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-pages": "PolymerElements/iron-pages#^1.0.0",
"iron-test-helpers": "PolymerElements/iron-test-helpers#^1.0.0",
"web-component-tester": "^4.0.0",
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
},
"resolutions": {
"webcomponentsjs": "^0.7"
}
}
},
"ignore": [],
"resolutions": {
"webcomponentsjs": "^1.0.0"
}
}
Polymer({
is: 'paper-tab',
behaviors: [
Polymer.IronControlState,
Polymer.IronButtonState,
Polymer.PaperRippleBehavior
],
properties: {
/**
* If true, the tab will forward keyboard clicks (enter/space) to
* the first anchor element found in its descendants
*/
link: {
type: Boolean,
value: false,
reflectToAttribute: true
}
},
hostAttributes: {
role: 'tab'
},
listeners: {
down: '_updateNoink',
tap: '_onTap'
},
attached: function() {
this._updateNoink();
},
get _parentNoink () {
var parent = Polymer.dom(this).parentNode;
return !!parent && !!parent.noink;
},
_updateNoink: function() {
this.noink = !!this.noink || !!this._parentNoink;
},
_onTap: function(event) {
if (this.link) {
var anchor = this.queryEffectiveChildren('a');
if (!anchor) {
return;
}
// Don't get stuck in a loop delegating
// the listener from the child anchor
if (event.target === anchor) {
return;
}
anchor.click();
}
}
});
\ No newline at end of file
<!--
@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-behaviors/iron-button-state.html">
<link rel="import" href="../iron-behaviors/iron-control-state.html">
<link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
<link rel="import" href="../paper-behaviors/paper-ripple-behavior.html">
<!--
`paper-tab` is styled to look like a tab. It should be used in conjunction with
`paper-tabs`.
Example:
<paper-tabs selected="0">
<paper-tab>TAB 1</paper-tab>
<paper-tab>TAB 2</paper-tab>
<paper-tab>TAB 3</paper-tab>
</paper-tabs>
### Styling
The following custom properties and mixins are available for styling:
Custom property | Description | Default
----------------|-------------|----------
`--paper-tab-ink` | Ink color | `--paper-yellow-a100`
`--paper-tab` | Mixin applied to the tab | `{}`
`--paper-tab-content` | Mixin applied to the tab content | `{}`
`--paper-tab-content-unselected` | Mixin applied to the tab content when the tab is not selected | `{}`
This element applies the mixin `--paper-font-common-base` but does not import `paper-styles/typography.html`.
In order to apply the `Roboto` font to this element, make sure you've imported `paper-styles/typography.html`.
-->
</head><body><dom-module id="paper-tab">
<template>
<style>
:host {
@apply --layout-inline;
@apply --layout-center;
@apply --layout-center-justified;
@apply --layout-flex-auto;
position: relative;
padding: 0 12px;
overflow: hidden;
cursor: pointer;
vertical-align: middle;
@apply --paper-font-common-base;
@apply --paper-tab;
}
:host(:focus) {
outline: none;
}
:host([link]) {
padding: 0;
}
.tab-content {
height: 100%;
transform: translateZ(0);
transition: opacity 0.1s cubic-bezier(0.4, 0.0, 1, 1);
@apply --layout-horizontal;
@apply --layout-center-center;
@apply --layout-flex-auto;
@apply --paper-tab-content;
}
:host(:not(.iron-selected)) > .tab-content {
opacity: 0.8;
@apply --paper-tab-content-unselected;
}
:host(:focus) .tab-content {
opacity: 1;
font-weight: 700;
}
paper-ripple {
color: var(--paper-tab-ink, var(--paper-yellow-a100));
}
.tab-content > ::slotted(a) {
@apply --layout-flex-auto;
height: 100%;
}
</style>
<div class="tab-content">
<slot></slot>
</div>
</template>
</dom-module>
<script src="paper-tab-extracted.js"></script></body></html>
\ No newline at end of file
<!--
@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
-->
<link rel="import" href="../iron-iconset-svg/iron-iconset-svg.html">
<iron-iconset-svg name="paper-tabs" size="24">
<svg><defs>
<g id="chevron-left"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></g>
<g id="chevron-right"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></g>
</defs></svg>
</iron-iconset-svg>
<!--
@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="../iron-icon/iron-icon.html">
<link rel="import" href="../iron-menu-behavior/iron-menubar-behavior.html">
<link rel="import" href="../iron-resizable-behavior/iron-resizable-behavior.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">
<link rel="import" href="../paper-styles/color.html">
<link rel="import" href="paper-tabs-icons.html">
<link rel="import" href="paper-tab.html">
<!--
Material design: [Tabs](https://www.google.com/design/spec/components/tabs.html)
`paper-tabs` makes it easy to explore and switch between different views or functional aspects of
an app, or to browse categorized data sets.
Use `selected` property to get or set the selected tab.
Example:
<paper-tabs selected="0">
<paper-tab>TAB 1</paper-tab>
<paper-tab>TAB 2</paper-tab>
<paper-tab>TAB 3</paper-tab>
</paper-tabs>
See <a href="?active=paper-tab">paper-tab</a> for more information about
`paper-tab`.
A common usage for `paper-tabs` is to use it along with `iron-pages` to switch
between different views.
<paper-tabs selected="{{selected}}">
<paper-tab>Tab 1</paper-tab>
<paper-tab>Tab 2</paper-tab>
<paper-tab>Tab 3</paper-tab>
</paper-tabs>
<iron-pages selected="{{selected}}">
<div>Page 1</div>
<div>Page 2</div>
<div>Page 3</div>
</iron-pages>
To use links in tabs, add `link` attribute to `paper-tab` and put an `<a>`
element in `paper-tab` with a `tabindex` of -1.
Example:
<pre><code>
&lt;style is="custom-style">
.link {
&#64;apply --layout-horizontal;
&#64;apply --layout-center-center;
}
&lt;/style>
&lt;paper-tabs selected="0">
&lt;paper-tab link>
&lt;a href="#link1" class="link" tabindex="-1">TAB ONE&lt;/a>
&lt;/paper-tab>
&lt;paper-tab link>
&lt;a href="#link2" class="link" tabindex="-1">TAB TWO&lt;/a>
&lt;/paper-tab>
&lt;paper-tab link>
&lt;a href="#link3" class="link" tabindex="-1">TAB THREE&lt;/a>
&lt;/paper-tab>
&lt;/paper-tabs>
</code></pre>
### Styling
The following custom properties and mixins are available for styling:
Custom property | Description | Default
----------------|-------------|----------
`--paper-tabs-selection-bar-color` | Color for the selection bar | `--paper-yellow-a100`
`--paper-tabs-selection-bar` | Mixin applied to the selection bar | `{}`
`--paper-tabs` | Mixin applied to the tabs | `{}`
`--paper-tabs-content` | Mixin applied to the content container of tabs | `{}`
`--paper-tabs-container` | Mixin applied to the layout container of tabs | `{}`
@hero hero.svg
@demo demo/index.html
-->
</head><body><dom-module id="paper-tabs">
<template>
<style>
:host {
@apply --layout;
@apply --layout-center;
height: 48px;
font-size: 14px;
font-weight: 500;
overflow: hidden;
user-select: none;
/* NOTE: Both values are needed, since some phones require the value to be `transparent`. */
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-webkit-tap-highlight-color: transparent;
@apply --paper-tabs;
}
:host-context([dir=rtl]) {
@apply --layout-horizontal-reverse;
}
#tabsContainer {
position: relative;
height: 100%;
white-space: nowrap;
overflow: hidden;
@apply --layout-flex-auto;
@apply --paper-tabs-container;
}
#tabsContent {
height: 100%;
flex-basis: auto;
@apply --paper-tabs-content;
}
#tabsContent.scrollable {
position: absolute;
white-space: nowrap;
}
#tabsContent:not(.scrollable),
#tabsContent.scrollable.fit-container {
@apply --layout-horizontal;
}
#tabsContent.scrollable.fit-container {
min-width: 100%;
}
#tabsContent.scrollable.fit-container > ::slotted(*) {
/* IE - prevent tabs from compressing when they should scroll. */
flex: 1 0 auto;
}
.hidden {
display: none;
}
.not-visible {
opacity: 0;
cursor: default;
}
paper-icon-button {
width: 48px;
height: 48px;
padding: 12px;
margin: 0 4px;
}
#selectionBar {
position: absolute;
height: 0;
bottom: 0;
left: 0;
right: 0;
border-bottom: 2px solid var(--paper-tabs-selection-bar-color, var(--paper-yellow-a100));
transform: scale(0);
transform-origin: left center;
transition: transform;
@apply --paper-tabs-selection-bar;
}
#selectionBar.align-bottom {
top: 0;
bottom: auto;
}
#selectionBar.expand {
transition-duration: 0.15s;
transition-timing-function: cubic-bezier(0.4, 0.0, 1, 1);
}
#selectionBar.contract {
transition-duration: 0.18s;
transition-timing-function: cubic-bezier(0.0, 0.0, 0.2, 1);
}
#tabsContent > ::slotted(:not(#selectionBar)) {
height: 100%;
}
</style>
<paper-icon-button icon="paper-tabs:chevron-left" class$="[[_computeScrollButtonClass(_leftHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onLeftScrollButtonDown" tabindex="-1"></paper-icon-button>
<div id="tabsContainer" on-track="_scroll" on-down="_down">
<div id="tabsContent" class$="[[_computeTabsContentClass(scrollable, fitContainer)]]">
<div id="selectionBar" class$="[[_computeSelectionBarClass(noBar, alignBottom)]]" on-transitionend="_onBarTransitionEnd"></div>
<slot></slot>
</div>
</div>
<paper-icon-button icon="paper-tabs:chevron-right" class$="[[_computeScrollButtonClass(_rightHidden, scrollable, hideScrollButtons)]]" on-up="_onScrollButtonUp" on-down="_onRightScrollButtonDown" tabindex="-1"></paper-icon-button>
</template>
</dom-module>
<script src="paper-tabs-extracted.js"></script></body></html>
\ No newline at end of file
...@@ -220,12 +220,6 @@ Tree: v2.1.0 ...@@ -220,12 +220,6 @@ Tree: v2.1.0
Revision: fc4b85ab853f107fc8bb18ea6cda1c2e9ac5a75f Revision: fc4b85ab853f107fc8bb18ea6cda1c2e9ac5a75f
Tree link: https://github.com/PolymerElements/paper-styles/tree/v2.1.0 Tree link: https://github.com/PolymerElements/paper-styles/tree/v2.1.0
Name: paper-tabs
Repository: https://github.com/PolymerElements/paper-tabs.git
Tree: v2.0.0
Revision: 775a9f019072a58b6a8a936f79450cd01b3b2cba
Tree link: https://github.com/PolymerElements/paper-tabs/tree/v2.0.0
Name: paper-tooltip Name: paper-tooltip
Repository: https://github.com/PolymerElements/paper-tooltip.git Repository: https://github.com/PolymerElements/paper-tooltip.git
Tree: v2.1.1 Tree: v2.1.1
......
...@@ -526,26 +526,6 @@ ...@@ -526,26 +526,6 @@
file="../../../third_party/polymer/v1_0/components-chromium/paper-styles/typography.html" file="../../../third_party/polymer/v1_0/components-chromium/paper-styles/typography.html"
type="chrome_html" type="chrome_html"
compress="gzip" /> compress="gzip" />
<structure name="IDR_POLYMER_1_0_PAPER_TABS_PAPER_TAB_EXTRACTED_JS"
file="../../../third_party/polymer/v1_0/components-chromium/paper-tabs/paper-tab-extracted.js"
type="chrome_html"
compress="gzip" />
<structure name="IDR_POLYMER_1_0_PAPER_TABS_PAPER_TAB_HTML"
file="../../../third_party/polymer/v1_0/components-chromium/paper-tabs/paper-tab.html"
type="chrome_html"
compress="gzip" />
<structure name="IDR_POLYMER_1_0_PAPER_TABS_PAPER_TABS_EXTRACTED_JS"
file="../../../third_party/polymer/v1_0/components-chromium/paper-tabs/paper-tabs-extracted.js"
type="chrome_html"
compress="gzip" />
<structure name="IDR_POLYMER_1_0_PAPER_TABS_PAPER_TABS_ICONS_HTML"
file="../../../third_party/polymer/v1_0/components-chromium/paper-tabs/paper-tabs-icons.html"
type="chrome_html"
compress="gzip" />
<structure name="IDR_POLYMER_1_0_PAPER_TABS_PAPER_TABS_HTML"
file="../../../third_party/polymer/v1_0/components-chromium/paper-tabs/paper-tabs.html"
type="chrome_html"
compress="gzip" />
<structure name="IDR_POLYMER_1_0_PAPER_TOOLTIP_PAPER_TOOLTIP_EXTRACTED_JS" <structure name="IDR_POLYMER_1_0_PAPER_TOOLTIP_PAPER_TOOLTIP_EXTRACTED_JS"
file="../../../third_party/polymer/v1_0/components-chromium/paper-tooltip/paper-tooltip-extracted.js" file="../../../third_party/polymer/v1_0/components-chromium/paper-tooltip/paper-tooltip-extracted.js"
type="chrome_html" type="chrome_html"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment