Project import generated by Copybara.

GitOrigin-RevId: 63746295f1a5ab5a619056791995793d65529e62
diff --git a/node_modules/material-design-lite/src/tooltip/README.md b/node_modules/material-design-lite/src/tooltip/README.md
new file mode 100755
index 0000000..db61294
--- /dev/null
+++ b/node_modules/material-design-lite/src/tooltip/README.md
@@ -0,0 +1,70 @@
+## Introduction
+
+The Material Design Lite (MDL) **tooltip** component is an enhanced version of the standard HTML tooltip as produced by the `title` attribute. A tooltip consists of text and/or an image that clearly communicates additional information about an element when the user hovers over or, in a touch-based UI, touches the element. The MDL tooltip component is pre-styled (colors, fonts, and other settings are contained in *material.min.css*) to provide a vivid, attractive visual element that displays related but typically non-essential content, e.g., a definition, clarification, or brief instruction.
+
+Tooltips are a ubiquitous feature of most user interfaces, regardless of a site's content or function. Their design and use is an important factor in the overall user experience. See the tooltip component's [Material Design specifications page](http://www.google.com/design/spec/components/tooltips.html) for details.
+
+### To include an MDL **tooltip** component:
+
+&nbsp;1. Code an element, such as a `<div>`, `<p>`, or `<span>`, and style it as desired; this will be the tooltip's target. Include an `id` attribute and unique value to link the container to its tooltip.
+```html
+<p id="tt1">HTML</p>
+```
+&nbsp;2. Following the target element, code a second element, such as a `<div>`, `<p>`, or `<span>`; this will be the tooltip itself. Include a `for` (or `data-mdl-for`) attribute whose value matches that of the target's `id`.
+```html
+<p id="tt1">HTML</p>
+<span for="tt1">HyperText Markup Language</span>
+```
+&nbsp;3. Add one or more MDL classes, separated by spaces, to the tooltip element using the `class` attribute.
+```html
+<p id="tt1">HTML</p>
+<span for="tt1" class="mdl-tooltip">HyperText Markup Language</span>
+```
+
+The tooltip component is ready for use.
+
+#### Examples
+
+A target with a simple text tooltip.
+```html
+<p>HTML is related to but different from <span id="xml"><i>XML</i></span>.</p>
+<span class="mdl-tooltip" for="xml">eXtensible Markup Language</span>
+```
+
+A target with "rich" (containing HTML markup) tooltip text.
+```html
+<p>HTML is related to but different from <span id="xml"><i>XML</i></span>.</p>
+<span class="mdl-tooltip" for="xml">e<b>X</b>tensible <b>M</b>arkup <b>L</b>anguage</span>
+```
+
+A target with a long text tooltip that automatically wraps.
+```html
+<p>HTML is related to but different from <span id="xml"><i>XML</i></span>.</p>
+<span class="mdl-tooltip" for="xml">XML is an acronym for eXtensible Markup Language</span>
+```
+
+A target with tooltip text in a larger font size.
+```html
+<p>HTML is related to but different from <span id="xml"><i>XML</i></span>.</p>
+<span class="mdl-tooltip mdl-tooltip--large" for="xml">eXtensible Markup Language</span>
+```
+
+A target with a tooltip containing both an image and text.
+```html
+<p>HTML is related to but different from <span id="xml"><i>XML</i></span>.</p>
+<span class="mdl-tooltip" for="xml">
+<img src="xml-logo-small.png" width="20" height="10"> eXtensible Markup Language</span>
+```
+
+## Configuration options
+
+The MDL CSS classes apply various predefined visual enhancements to the tooltip. The table below lists the available classes and their effects.
+
+| MDL class | Effect | Remarks |
+|-----------|--------|---------|
+| `mdl-tooltip` | Defines a container as an MDL tooltip | Required on tooltip container element |
+| `mdl-tooltip--large` | Applies large-font effect | Optional; goes on tooltip container element |
+| `mdl-tooltip--left` | Positions the tooltip to the left of the target | Optional; goes on tooltip container element |
+| `mdl-tooltip--right` | Positions the tooltip to the right of the target | Optional; goes on tooltip container element |
+| `mdl-tooltip--top` | Positions the tooltip to the top of the target | Optional; goes on tooltip container element |
+| `mdl-tooltip--bottom` | Positions the tooltip to the bottom of the target | Optional; goes on tooltip container element |
diff --git a/node_modules/material-design-lite/src/tooltip/_tooltip.scss b/node_modules/material-design-lite/src/tooltip/_tooltip.scss
new file mode 100644
index 0000000..bec1cd5
--- /dev/null
+++ b/node_modules/material-design-lite/src/tooltip/_tooltip.scss
@@ -0,0 +1,65 @@
+/**
+ * Copyright 2015 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+@import "../variables";
+
+.mdl-tooltip {
+  transform: scale(0);
+  transform-origin: top center;
+  z-index: 999;
+  background: $tooltip-background-color;
+  border-radius: 2px;
+  color: $tooltip-text-color;
+  display: inline-block;
+  font-size: $tooltip-font-size;
+  font-weight: 500;
+  line-height: 14px;
+  max-width: 170px;
+  position: fixed;
+  top: -500px;
+  left: -500px;
+  padding: 8px;
+  text-align: center;
+}
+.mdl-tooltip.is-active {
+  animation: pulse 200ms $animation-curve-linear-out-slow-in forwards;
+}
+
+.mdl-tooltip--large {
+  line-height: 14px;
+  font-size: $tooltip-font-size-large;
+  padding: 16px;
+}
+
+@keyframes pulse {
+  0% {
+    transform: scale(0);
+    opacity: 0;
+  }
+  50% {
+    // Fixes a weird bug with the interaction between Safari and the result of
+    // the SASS compilation for the animation.
+    // Essentially, we need to make sure that "50%" and "100%" don't get merged
+    // into a single "50%, 100%" entry, so we need to avoid them having any
+    // matching properties.
+    transform: scale(0.99);
+  }
+  100% {
+    transform: scale(1);
+    opacity: 1;
+    visibility: visible;
+  }
+}
diff --git a/node_modules/material-design-lite/src/tooltip/snippets/tooltip-large.html b/node_modules/material-design-lite/src/tooltip/snippets/tooltip-large.html
new file mode 100644
index 0000000..6d55dc1
--- /dev/null
+++ b/node_modules/material-design-lite/src/tooltip/snippets/tooltip-large.html
@@ -0,0 +1,5 @@
+<!-- Large Tooltip -->
+<div id="tt2" class="icon material-icons">print</div>
+<div class="mdl-tooltip mdl-tooltip--large" for="tt2">
+Print
+</div>
diff --git a/node_modules/material-design-lite/src/tooltip/snippets/tooltip-multiline.html b/node_modules/material-design-lite/src/tooltip/snippets/tooltip-multiline.html
new file mode 100644
index 0000000..7bc555b
--- /dev/null
+++ b/node_modules/material-design-lite/src/tooltip/snippets/tooltip-multiline.html
@@ -0,0 +1,5 @@
+<!-- Multiline Tooltip -->
+<div id="tt4" class="icon material-icons">share</div>
+<div class="mdl-tooltip" for="tt4">
+Share your content<br>via social media
+</div>
diff --git a/node_modules/material-design-lite/src/tooltip/snippets/tooltip-rich.html b/node_modules/material-design-lite/src/tooltip/snippets/tooltip-rich.html
new file mode 100644
index 0000000..dab28f5
--- /dev/null
+++ b/node_modules/material-design-lite/src/tooltip/snippets/tooltip-rich.html
@@ -0,0 +1,5 @@
+<!-- Rich Tooltip -->
+<div id="tt3" class="icon material-icons">cloud_upload</div>
+<div class="mdl-tooltip" data-mdl-for="tt3">
+Upload <strong>file.zip</strong>
+</div>
diff --git a/node_modules/material-design-lite/src/tooltip/snippets/tooltip-simple.html b/node_modules/material-design-lite/src/tooltip/snippets/tooltip-simple.html
new file mode 100644
index 0000000..78ba6fc
--- /dev/null
+++ b/node_modules/material-design-lite/src/tooltip/snippets/tooltip-simple.html
@@ -0,0 +1,5 @@
+<!-- Simple Tooltip -->
+<div id="tt1" class="icon material-icons">add</div>
+<div class="mdl-tooltip" data-mdl-for="tt1">
+Follow
+</div>
diff --git a/node_modules/material-design-lite/src/tooltip/tooltip.js b/node_modules/material-design-lite/src/tooltip/tooltip.js
new file mode 100644
index 0000000..bfdacca
--- /dev/null
+++ b/node_modules/material-design-lite/src/tooltip/tooltip.js
@@ -0,0 +1,154 @@
+/**
+ * @license
+ * Copyright 2015 Google Inc. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+(function() {
+  'use strict';
+
+  /**
+   * Class constructor for Tooltip MDL component.
+   * Implements MDL component design pattern defined at:
+   * https://github.com/jasonmayes/mdl-component-design-pattern
+   *
+   * @constructor
+   * @param {HTMLElement} element The element that will be upgraded.
+   */
+  var MaterialTooltip = function MaterialTooltip(element) {
+    this.element_ = element;
+
+    // Initialize instance.
+    this.init();
+  };
+  window['MaterialTooltip'] = MaterialTooltip;
+
+  /**
+   * Store constants in one place so they can be updated easily.
+   *
+   * @enum {string | number}
+   * @private
+   */
+  MaterialTooltip.prototype.Constant_ = {
+    // None for now.
+  };
+
+  /**
+   * Store strings for class names defined by this component that are used in
+   * JavaScript. This allows us to simply change it in one place should we
+   * decide to modify at a later date.
+   *
+   * @enum {string}
+   * @private
+   */
+  MaterialTooltip.prototype.CssClasses_ = {
+    IS_ACTIVE: 'is-active',
+    BOTTOM: 'mdl-tooltip--bottom',
+    LEFT: 'mdl-tooltip--left',
+    RIGHT: 'mdl-tooltip--right',
+    TOP: 'mdl-tooltip--top'
+  };
+
+  /**
+   * Handle mouseenter for tooltip.
+   *
+   * @param {Event} event The event that fired.
+   * @private
+   */
+  MaterialTooltip.prototype.handleMouseEnter_ = function(event) {
+    var props = event.target.getBoundingClientRect();
+    var left = props.left + (props.width / 2);
+    var top = props.top + (props.height / 2);
+    var marginLeft = -1 * (this.element_.offsetWidth / 2);
+    var marginTop = -1 * (this.element_.offsetHeight / 2);
+
+    if (this.element_.classList.contains(this.CssClasses_.LEFT) || this.element_.classList.contains(this.CssClasses_.RIGHT)) {
+      left = (props.width / 2);
+      if (top + marginTop < 0) {
+        this.element_.style.top = '0';
+        this.element_.style.marginTop = '0';
+      } else {
+        this.element_.style.top = top + 'px';
+        this.element_.style.marginTop = marginTop + 'px';
+      }
+    } else {
+      if (left + marginLeft < 0) {
+        this.element_.style.left = '0';
+        this.element_.style.marginLeft = '0';
+      } else {
+        this.element_.style.left = left + 'px';
+        this.element_.style.marginLeft = marginLeft + 'px';
+      }
+    }
+
+    if (this.element_.classList.contains(this.CssClasses_.TOP)) {
+      this.element_.style.top = props.top - this.element_.offsetHeight - 10 + 'px';
+    } else if (this.element_.classList.contains(this.CssClasses_.RIGHT)) {
+      this.element_.style.left = props.left + props.width + 10 + 'px';
+    } else if (this.element_.classList.contains(this.CssClasses_.LEFT)) {
+      this.element_.style.left = props.left - this.element_.offsetWidth - 10 + 'px';
+    } else {
+      this.element_.style.top = props.top + props.height + 10 + 'px';
+    }
+
+    this.element_.classList.add(this.CssClasses_.IS_ACTIVE);
+  };
+
+  /**
+   * Hide tooltip on mouseleave or scroll
+   *
+   * @private
+   */
+  MaterialTooltip.prototype.hideTooltip_ = function() {
+    this.element_.classList.remove(this.CssClasses_.IS_ACTIVE);
+  };
+
+  /**
+   * Initialize element.
+   */
+  MaterialTooltip.prototype.init = function() {
+
+    if (this.element_) {
+      var forElId = this.element_.getAttribute('for') ||
+          this.element_.getAttribute('data-mdl-for');
+
+      if (forElId) {
+        this.forElement_ = document.getElementById(forElId);
+      }
+
+      if (this.forElement_) {
+        // It's left here because it prevents accidental text selection on Android
+        if (!this.forElement_.hasAttribute('tabindex')) {
+          this.forElement_.setAttribute('tabindex', '0');
+        }
+
+        this.boundMouseEnterHandler = this.handleMouseEnter_.bind(this);
+        this.boundMouseLeaveAndScrollHandler = this.hideTooltip_.bind(this);
+        this.forElement_.addEventListener('mouseenter', this.boundMouseEnterHandler, false);
+        this.forElement_.addEventListener('touchend', this.boundMouseEnterHandler, false);
+        this.forElement_.addEventListener('mouseleave', this.boundMouseLeaveAndScrollHandler, false);
+        window.addEventListener('scroll', this.boundMouseLeaveAndScrollHandler, true);
+        window.addEventListener('touchstart', this.boundMouseLeaveAndScrollHandler);
+      }
+    }
+  };
+
+  // The component registers itself. It can assume componentHandler is available
+  // in the global scope.
+  componentHandler.register({
+    constructor: MaterialTooltip,
+    classAsString: 'MaterialTooltip',
+    cssClass: 'mdl-tooltip'
+  });
+})();