Project import generated by Copybara.
GitOrigin-RevId: 63746295f1a5ab5a619056791995793d65529e62
diff --git a/node_modules/mdl-ext/src/selectfield/_selectfield.scss b/node_modules/mdl-ext/src/selectfield/_selectfield.scss
new file mode 100644
index 0000000..cd4ecfc
--- /dev/null
+++ b/node_modules/mdl-ext/src/selectfield/_selectfield.scss
@@ -0,0 +1,273 @@
+/**
+ * Copyright 2016 Leif Olsen. 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.
+ */
+
+/*
+ * Copied/Modified/Inspired from/by:
+ * https://github.com/google/material-design-lite/tree/master/src/textfield
+ * http://red-team-design.com/making-html-dropdowns-not-suck/
+ * http://codepen.io/etcpe9/pen/PqyOye,
+ * http://codepen.io/pudgereyem/pen/PqBxQx
+ * https://github.com/MEYVN-digital/mdl-selectfield
+ * https://github.com/mebibou/mdl-selectfield
+ */
+
+// Use of this module requires the user to include variables from material-design-lite
+//@import "../../node_modules/material-design-lite/src/variables";
+//@import "../../node_modules/material-design-lite/src/mixins";
+
+@import "../mixins";
+
+// The container for the selectfield.
+.mdlext-selectfield {
+ box-sizing: border-box;
+ position: relative;
+ font-size: $input-text-font-size;
+ display: inline-block;
+ width: 300px;
+ max-width: 100%;
+ margin: 0;
+ padding: $input-text-vertical-spacing 0;
+
+ // Align buttons, if used.
+ & .mdl-button {
+ bottom: $input-text-vertical-spacing;
+ position: absolute;
+ }
+
+ // Styling the down arrow
+ &::after {
+ @include mdlext-arrow(bottom, $mdlext-selectfield-arrow-width, $mdlext-selectfield-arrow-length);
+
+ position: absolute;
+ right: 0.5em;
+ top: 50%;
+ transform: translateY(-50%);
+ pointer-events: none;
+ }
+}
+
+.mdlext-selectfield.is-disabled {
+ &::after {
+ color: $input-text-disabled-color;
+ @include mdlext-arrow(bottom, $mdlext-selectfield-arrow-width, $mdlext-selectfield-arrow-length, $input-text-disabled-color);
+ }
+}
+
+// Optional class to align right.
+.mdlext-selectfield--align-right {
+ text-align: right;
+}
+
+// Optional class to display at full width.
+.mdlext-selectfield--full-width {
+ width: 100%;
+}
+
+// Optional class to make the select field expandable.
+.mdlext-selectfield--expandable {
+ min-height: $input-text-button-size;
+ min-width: $input-text-button-size;
+ width: auto;
+}
+
+// Styling for the select element.
+.mdlext-selectfield__select {
+
+ // Reset select
+ box-sizing: border-box;
+ border: 0;
+ border-radius: 0;
+ -webkit-appearance: none;
+ -moz-appearance: none;
+ -ms-appearance: none;
+ appearance: none;
+ text-indent: 0.01px; // Removes default arrow from firefox
+ text-overflow: ''; // Removes default arrow from firefox
+ outline: none;
+ box-shadow: none;
+ // End Reset select
+
+ font-size: $input-text-font-size;
+ font-family: $performance_font;
+ padding: $input-text-padding calc(1.2em + #{$input-text-padding}) $input-text-padding 0;
+ width: $input-text-width;
+ border-bottom: 1px solid $input-text-bottom-border-color;
+ display: block;
+ margin: 0;
+ background: none;
+ text-align: left;
+ color: inherit;
+
+ // Mozilla, remove focusring
+ &:-moz-focusring {
+ color: transparent;
+ text-shadow: 0 0 0 #000000;
+ }
+
+ // MS, remove selected option background color
+ &:focus::-ms-value {
+ background-color: inherit;
+ color: inherit;
+ }
+
+ &::-ms-expand {
+ display: none;
+ }
+
+ .mdlext-selectfield.is-focused & {
+ outline: none;
+ }
+
+ .mdlext-selectfield.is-invalid & {
+ border-color: $input-text-error-color;
+ box-shadow: none;
+ }
+
+ fieldset[disabled] .mdlext-selectfield &,
+ .mdlext-selectfield.is-disabled & {
+ border-bottom: 1px dotted $input-text-disabled-color;
+ color: $input-text-disabled-text-color;
+ background-color: transparent;
+ }
+
+ option {
+ color: $text-color-primary;
+ box-sizing: border-box;
+ background-color: inherit;
+ }
+}
+
+// Styling for the label / floating label.
+.mdlext-selectfield__label {
+ box-sizing: border-box;
+ color: $input-text-label-color;
+ font-size: $input-text-font-size;
+ top: ($input-text-padding + $input-text-vertical-spacing);
+ bottom: 0;
+ left: 0;
+ right: 0;
+ pointer-events: none;
+ position: absolute;
+ display: block;
+ width: 100%;
+ overflow: hidden;
+ white-space: nowrap;
+ text-align: left;
+
+ .mdlext-selectfield.is-dirty &,
+ .mdlext-selectfield.has-placeholder & {
+ visibility: hidden;
+ }
+
+ // Floating Label
+ .mdlext-selectfield--floating-label & {
+ @include material-animation-default();
+ }
+
+ .mdlext-selectfield--floating-label.has-placeholder & {
+ transition: none;
+ }
+
+ fieldset[disabled] .mdlext-selectfield &,
+ .mdlext-selectfield.is-disabled.is-disabled & {
+ color: $input-text-disabled-text-color;
+ }
+
+ .mdlext-selectfield--floating-label.is-focused &,
+ .mdlext-selectfield--floating-label.is-dirty.is-dirty &,
+ .mdlext-selectfield--floating-label.has-placeholder & {
+ color: $input-text-highlight-color;
+ font-size: $input-text-floating-label-fontsize;
+ top: $input-text-vertical-spacing - ($input-text-floating-label-fontsize + $input-text-padding);
+ visibility: visible;
+ }
+
+ .mdlext-selectfield--floating-label.is-focused .mdlext-selectfield__expandable-holder &,
+ .mdlext-selectfield--floating-label.is-dirty .mdlext-selectfield__expandable-holder &,
+ .mdlext-selectfield--floating-label.has-placeholder .mdlext-selectfield__expandable-holder & {
+ top: -($input-text-floating-label-fontsize + $input-text-padding);
+ }
+
+ .mdlext-selectfield--floating-label.is-invalid & {
+ color: $input-text-error-color;
+ font-size: $input-text-floating-label-fontsize;
+ }
+
+ // The after label is the colored underline for the Selectfield.
+ &::after {
+ background-color: $input-text-highlight-color;
+ bottom: $input-text-vertical-spacing;
+ content: '';
+ height: 2px;
+ left: 45%;
+ position: absolute;
+ @include material-animation-default();
+
+ visibility: hidden;
+ width: 10px;
+ }
+
+ .mdlext-selectfield.is-focused &::after {
+ left: 0;
+ visibility: visible;
+ width: 100%;
+ }
+
+ .mdlext-selectfield.is-invalid &::after {
+ background-color: $input-text-error-color;
+ }
+}
+
+// SelectField Error.
+.mdlext-selectfield__error {
+ color: $input-text-error-color;
+ font-size: $input-text-floating-label-fontsize;
+ position: absolute;
+ margin-top: 3px;
+ visibility: hidden;
+ display: block;
+
+ .mdlext-selectfield.is-invalid & {
+ visibility: visible;
+ }
+}
+
+// Expandable Holder.
+.mdlext-selectfield__expandable-holder {
+ display: inline-block;
+ position: relative;
+ margin-left: $input-text-button-size;
+
+ @include material-animation-default();
+
+ // Safari (possibly others) need to be convinced that this field is actually
+ // visible, otherwise it cannot be tabbed to nor focused via a <label>.
+ // TODO: In some cases (Retina displays), this is big enough to render the
+ // inner element :(
+ max-width: 0.1px;
+
+ .mdlext-selectfield.is-focused &,
+ .mdlext-selectfield.is-dirty & {
+ // This is an unfortunate hack. Animating between widths in percent (%)
+ // in many browsers (Chrome, Firefox) only animates the inner visual style
+ // of the input - the outer bounding box still 'jumps'.
+ // Thus assume a sensible maximum, and animate to/from that value.
+ max-width: 600px;
+ }
+ .mdlext-selectfield__label::after {
+ bottom: 0;
+ }
+}
diff --git a/node_modules/mdl-ext/src/selectfield/readme.md b/node_modules/mdl-ext/src/selectfield/readme.md
new file mode 100644
index 0000000..891ea36
--- /dev/null
+++ b/node_modules/mdl-ext/src/selectfield/readme.md
@@ -0,0 +1,152 @@
+# Selectfield
+![Selectfield](../../etc/select-element.png)
+
+## Introduction
+The [HTML select](https://developer.mozilla.org/en/docs/Web/HTML/Element/select) (`<select>`) element represents
+a control that presents a menu of options. The options within the menu are represented by `<option>` elements,
+which can be grouped by `<optgroup>` elements. Options can be pre-selected for the user.
+
+The Material Design Lite Ext (MDLEXT) **select field** component is an enhanced version of the standard
+[HTML `<select>`] (https://developer.mozilla.org/en/docs/Web/HTML/Element/select) element.
+A select field consists of a horizontal line indicating where keyboard input can occur and, typically, text that clearly communicates
+the intended contents of the select field. An icon (at the right hand side) indicates that the select field has user selectable options.
+
+This component relates to the guidelines given in [Materials Design spesifications page, Text Fields](http://www.google.com/design/spec/components/text-fields.html).
+
+### To include a MDLEXT **select field** component:
+
+ 1. Code a `<div>` element to hold the select field.
+```html
+<div>
+...
+</div>
+```
+
+ 2. Inside the div, code an `<select>` element with an `id` attribute of your choice.
+```html
+<div>
+ <select id="some-id">
+ </select>
+</div>
+```
+
+ 3. Inside the `<select>` element code a list of user selectable options.
+```html
+<div>
+ <select id="some-id">
+ <option value=""></option>
+ <option value="option1">option 1</option>
+ <option value="option2">option 2</option>
+ <option value="option3">option 3</option>
+ </select>
+</div>
+```
+
+ 4. Also inside the div, after the `<select>` element, code a `<label>` element with a `for` attribute
+whose value matches the `select` element's `id` value, and a short string to be used as the field's placeholder text.
+```html
+<div>
+ <select id="some-id">
+ ...
+ </select>
+ <label for="some-id">Options</label>
+</div>
+```
+
+ 5. Add one or more MDLEXT classes, separated by spaces, to the select field container,
+select element, label element, and error message using the `class` attribute.
+```html
+<div class="mdlext-selectfield mdlext-js-selectfield">
+ <select id="some-id" class="mdlext-selectfield__select">
+ ...
+ </select>
+ <label for="some-id" class="mdlext-selectfield__label">Options</label>
+ <span class="mdlext-selectfield__error">Someting is wrong</span>
+</div>
+```
+The select field component is ready for use.
+
+#### Examples
+
+Select field with a standard label.
+```html
+<div class="mdlext-selectfield mdlext-js-selectfield">
+ <select id="some-id" class="mdlext-selectfield__select">
+ <option value=""></option>
+ <option value="option1">option 1</option>
+ <option value="option2">option 2</option>
+ <option value="option3">option 3</option>
+ </select>
+ <label for="some-id" class="mdlext-selectfield__label">Options</label>
+</div>
+```
+
+Select field with a floating label.
+```html
+<div class="mdlext-selectfield mdlext-js-selectfield mdlext-selectfield--floating-label">
+ <select id="some-id" class="mdlext-selectfield__select">
+ <option value=""></option>
+ <option value="option1">option 1</option>
+ <option value="option2">option 2</option>
+ <option value="option3">option 3</option>
+ </select>
+ <label for="some-id" class="mdlext-selectfield__label">Options</label>
+</div>
+```
+
+Select field with a standard label and error message.
+```html
+<div class="mdlext-selectfield mdlext-js-selectfield">
+ <select id="some-id" class="mdlext-selectfield__select">
+ <option value=""></option>
+ <option value="option1">option 1</option>
+ <option value="option2">option 2</option>
+ <option value="option3">option 3</option>
+ </select>
+ <label for="some-id" class="mdlext-selectfield__label">Options</label>
+ <span class="mdlext-selectfield__error">Something is wrong</span>
+</div>
+```
+
+
+## Configuration options
+
+The MDLEXT CSS classes apply various predefined visual and behavioral enhancements to the select field.
+The table below lists the available classes and their effects.
+
+| MDLEXT class | Effect | Remarks |
+|-----------|--------|---------|
+| `mdlext-selectfield` | Defines container as an MDL component | Required on "outer" div element|
+| `mdlext-js-selectfield` | Assigns basic MDL behavior to input | Required on "outer" div element |
+| `mdlext-selectfield__select` | Defines element as selectfield select | Required on select element |
+| `mdlext-selectfield__label` | Defines element as selectfield label | Required on label element for select elements |
+| `mdlext-selectfield--floating-label` | Applies *floating label* effect | Optional; goes on "outer" div element |
+| `mdlext-selectfield__error` | Defines span as an MDL error message | Optional; goes on span element for MDL select element with *pattern*|
+| `is-invalid` | Defines the selectfield as invalid on initial load. | Optional on `mdlext-selectfield` element |
+<!--
+| `mdlext-selectfield--expandable` | Defines a div as an MDL expandable select field container | For expandable select fields, required on "outer" div element |
+| `mdl-button` | Defines label as an MDL icon button | For expandable select fields, required on "outer" div's label element |
+| `mdl-js-button` | Assigns basic behavior to icon container | For expandable input fields, required on "outer" div's label element |
+| `mdl-button--icon` | Defines label as an MDL icon container | For expandable select fields, required on "outer" div's label element |
+| `mdl-input__expandable-holder` | Defines a container as an MDL component | For expandable select fields, required on "inner" div element |
+-->
+
+>**Note I:** Disabled versions of each select field type are provided, and are invoked with the standard HTML boolean attribute `disabled`. `<select class="mdlext-selectfield__select" id="select-id" name="select-id" disabled>`
+>This attribute may be added or removed programmatically via scripting.
+
+>**Note II:** The select field can for some browser and OS combinations, e.g.
+>FireFox and OSX, be off by 2 pixels compared to the input field. There is no
+>way to fix this, as far as I know, without setting an explicit height on both field types.
+>Since MDL does not set a specific height of the text field, it can not be done for the select
+>field either. If alignment is required, the user must in his/hers design set a specific height
+>both for textfields and selectfields.
+
+## How to use the component programmatically
+The tests provides examples on how to use the component [programmatically](https://github.com/leifoolsen/mdl-ext/blob/master/test/selectfield/selectfield.spec.js)
+
+### Credits
+The Select component is based on the following sources:
+* [Material Design Lite selectfield component](https://github.com/mebibou/mdl-selectfield)
+* [mdl-selectfield](https://github.com/MEYVN-digital/mdl-selectfield)
+* [Simple Material Design Login, with select field](http://codepen.io/michaelschofield/pen/qEzWaM)
+* [Material Design <select> element, css only](http://codepen.io/pudgereyem/pen/PqBxQx)
diff --git a/node_modules/mdl-ext/src/selectfield/selectfield.js b/node_modules/mdl-ext/src/selectfield/selectfield.js
new file mode 100644
index 0000000..459f0b8
--- /dev/null
+++ b/node_modules/mdl-ext/src/selectfield/selectfield.js
@@ -0,0 +1,277 @@
+/**
+ * @license
+ * Copyright 2016 Leif Olsen. 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.
+ *
+ * This code is built with Google Material Design Lite,
+ * which is Licensed under the Apache License, Version 2.0
+ */
+
+/*
+ * Copied/Modified from https://github.com/google/material-design-lite/tree/master/src/textfield
+ */
+
+import { randomString } from '../utils/string-utils';
+import {
+ IS_DIRTY,
+ IS_FOCUSED,
+ IS_DISABLED,
+ IS_INVALID,
+ IS_UPGRADED
+} from '../utils/constants';
+
+(function() {
+ 'use strict';
+ const LABEL = 'mdlext-selectfield__label';
+ const INPUT = 'mdlext-selectfield__select';
+
+ /**
+ * Class constructor for Selectfield MDLEXT 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.
+ */
+ const MaterialExtSelectfield = function MaterialExtSelectfield(element) {
+ this.element_ = element;
+ this.init(); // Initialize instance.
+ };
+
+ window['MaterialExtSelectfield'] = MaterialExtSelectfield;
+
+ /**
+ * Handle focus.
+ *
+ * @param {Event} event The event that fired.
+ * @private
+ */
+ /*eslint no-unused-vars: 0*/
+ MaterialExtSelectfield.prototype.onFocus_ = function( /*event*/ ) {
+ this.element_.classList.add(IS_FOCUSED);
+ };
+
+ /**
+ * Handle lost focus.
+ *
+ * @param {Event} event The event that fired.
+ * @private
+ */
+ /*eslint no-unused-vars: 0*/
+ MaterialExtSelectfield.prototype.onBlur_ = function( /*event*/ ) {
+ this.element_.classList.remove(IS_FOCUSED);
+ };
+
+ /**
+ * Handle reset event from out side.
+ *
+ * @param {Event} event The event that fired.
+ * @private
+ */
+ MaterialExtSelectfield.prototype.onReset_ = function( /*event*/ ) {
+ this.updateClasses_();
+ };
+
+ /**
+ * Handle class updates.
+ *
+ * @private
+ */
+ MaterialExtSelectfield.prototype.updateClasses_ = function() {
+ this.checkDisabled();
+ this.checkValidity();
+ this.checkDirty();
+ this.checkFocus();
+ };
+
+ // Public methods.
+
+ /**
+ * Check the disabled state and update field accordingly.
+ *
+ * @public
+ */
+ MaterialExtSelectfield.prototype.checkDisabled = function() {
+ if (this.select_.disabled) {
+ this.element_.classList.add(IS_DISABLED);
+ } else {
+ this.element_.classList.remove(IS_DISABLED);
+ }
+ };
+ MaterialExtSelectfield.prototype['checkDisabled'] = MaterialExtSelectfield.prototype.checkDisabled;
+
+
+ /**
+ * Check the focus state and update field accordingly.
+ *
+ * @public
+ */
+ MaterialExtSelectfield.prototype.checkFocus = function() {
+ // Note: element.querySelector(':focus') always return null in JsDom, even if select element has focus
+ /*eslint no-extra-boolean-cast: 0*/
+ if (Boolean(this.element_.querySelector(':focus'))) {
+ this.element_.classList.add(IS_FOCUSED);
+ } else {
+ this.element_.classList.remove(IS_FOCUSED);
+ }
+ };
+
+ MaterialExtSelectfield.prototype['checkFocus'] = MaterialExtSelectfield.prototype.checkFocus;
+
+
+ /**
+ * Check the validity state and update field accordingly.
+ *
+ * @public
+ */
+ MaterialExtSelectfield.prototype.checkValidity = function() {
+
+ /* Don't think it makes any sense to check validity.
+ Tests I've done, so far, indicates that setting an illegal value via JS returns selectedIndex=0
+
+ if (this.select_.validity) {
+ if (this.select_.validity.valid) {
+ this.element_.classList.remove(this.CssClasses_.IS_INVALID);
+ } else {
+ this.element_.classList.add(this.CssClasses_.IS_INVALID);
+ }
+ }
+ */
+ };
+
+ MaterialExtSelectfield.prototype['checkValidity'] = MaterialExtSelectfield.prototype.checkValidity;
+
+ /**
+ * Check the dirty state and update field accordingly.
+ *
+ * @public
+ */
+ MaterialExtSelectfield.prototype.checkDirty = function() {
+ if (this.select_.value && this.select_.value.length > 0) {
+ this.element_.classList.add(IS_DIRTY);
+ } else {
+ this.element_.classList.remove(IS_DIRTY);
+ }
+ };
+
+ MaterialExtSelectfield.prototype['checkDirty'] = MaterialExtSelectfield.prototype.checkDirty;
+
+ /**
+ * Disable select field.
+ *
+ * @public
+ */
+ MaterialExtSelectfield.prototype.disable = function() {
+ this.select_.disabled = true;
+ this.updateClasses_();
+ };
+
+ MaterialExtSelectfield.prototype['disable'] = MaterialExtSelectfield.prototype.disable;
+
+ /**
+ * Enable select field.
+ *
+ * @public
+ */
+ MaterialExtSelectfield.prototype.enable = function() {
+ this.select_.disabled = false;
+ this.updateClasses_();
+ };
+
+ MaterialExtSelectfield.prototype['enable'] = MaterialExtSelectfield.prototype.enable;
+
+ /**
+ * Update select field value.
+ *
+ * @param {string} value The value to which to set the control (optional).
+ * @public
+ */
+ MaterialExtSelectfield.prototype.change = function(value) {
+ this.select_.value = value || '';
+ this.updateClasses_();
+ };
+ MaterialExtSelectfield.prototype['change'] = MaterialExtSelectfield.prototype.change;
+
+ /**
+ * Initialize element.
+ */
+ MaterialExtSelectfield.prototype.init = function() {
+ if (this.element_) {
+ this.label_ = this.element_.querySelector(`.${LABEL}`);
+ this.select_ = this.element_.querySelector(`.${INPUT}`);
+
+ if (this.select_) {
+ // Remove listeners, just in case ...
+ this.select_.removeEventListener('change', this.updateClasses_);
+ this.select_.removeEventListener('focus', this.onFocus_);
+ this.select_.removeEventListener('blur', this.onBlur_);
+ this.select_.removeEventListener('reset', this.onReset_);
+
+ this.select_.addEventListener('change', this.updateClasses_.bind(this));
+ this.select_.addEventListener('focus', this.onFocus_.bind(this));
+ this.select_.addEventListener('blur', this.onBlur_.bind(this));
+ this.select_.addEventListener('reset', this.onReset_.bind(this));
+
+ if(this.label_) {
+ let id;
+ if(!this.select_.hasAttribute('id')) {
+ id = `select-${randomString()}`;
+ this.select_.id = id;
+ }
+ else {
+ id = this.select_.id;
+ }
+
+ if(!this.label_.hasAttribute('for')) {
+ this.label_.setAttribute('for', id);
+ }
+ }
+
+ const invalid = this.element_.classList.contains(IS_INVALID);
+ this.updateClasses_();
+ this.element_.classList.add(IS_UPGRADED);
+
+ if (invalid) {
+ this.element_.classList.add(IS_INVALID);
+ }
+ if (this.select_.hasAttribute('autofocus')) {
+ this.element_.focus();
+ this.checkFocus();
+ }
+ }
+ }
+ };
+
+ /**
+ * Downgrade component
+ * E.g remove listeners and clean up resources
+ *
+ * Nothing to downgrade
+ *
+ MaterialExtSelectfield.prototype.mdlDowngrade_ = function() {
+ 'use strict';
+ console.log('***** MaterialExtSelectfield.mdlDowngrade ');
+ };
+ */
+
+ // The component registers itself. It can assume componentHandler is available
+ // in the global scope.
+ /*eslint no-undef: 0*/
+ componentHandler.register({
+ constructor: MaterialExtSelectfield,
+ classAsString: 'MaterialExtSelectfield',
+ cssClass: 'mdlext-js-selectfield',
+ widget: true
+ });
+})();
diff --git a/node_modules/mdl-ext/src/selectfield/snippets/selectfield.html b/node_modules/mdl-ext/src/selectfield/snippets/selectfield.html
new file mode 100644
index 0000000..d9bc5cd
--- /dev/null
+++ b/node_modules/mdl-ext/src/selectfield/snippets/selectfield.html
@@ -0,0 +1,113 @@
+<p>The<a href="https://developer.mozilla.org/en/docs/Web/HTML/Element/select" target="_blank">
+ HTML select</a> (<select>) element represents a control that presents a menu of options.
+ The options within the menu are represented by <option> elements, which can be grouped by
+ <optgroup> elements. Options can be pre-selected for the user.</p>
+
+<p>The Material Design Lite Ext (MDLEXT) <strong>select field</strong> component is an enhanced version of the standard
+ HTML <select> element. A select field consists of a horizontal line indicating where keyboard input
+ can occur and, typically, text that clearly communicates the intended contents of the select field.
+ An icon (at the right hand side) indicates that the select field has user selectable options.</p>
+
+<p><strong>Note: </strong>
+ The select field can for some browser and OS combinations, e.g. FireFox and OSX, be off by 2 pixels compared to the
+ input field. There is no way to fix this, as far as I know, without setting an explicit height on both field types.
+ Since MDL does not set a specific height of the text field, it can not be done for the select field either.
+ If alignment is required, the user must in his/hers design set a specific height both for textfields and selectfields.
+</p>
+
+<style scoped>
+ .selectelement-demo-container {
+ }
+ .selectelement-demo-container .mdl-cell {
+ padding: 0 4px 16px 0;
+ }
+ .selectelement-demo-container .mdl-cell p {
+ margin-bottom: 0;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ }
+</style>
+
+<div class = "selectelement-demo-container">
+
+ <div class="mdl-grid mdl-grid--no-spacing">
+
+ <div class="mdl-cell mdl-cell--3-col">
+ <p>Selectfield component</p>
+ <div class="mdlext-selectfield mdlext-js-selectfield">
+ <select class="mdlext-selectfield__select">
+ <option value=""></option>
+ <option value="option1">option 1</option>
+ <option value="option2">option 2</option>
+ <option value="option3">option 3</option>
+ <option value="option4">option 4</option>
+ <option value="option5">option 5</option>
+ <option value="option6">option 5 abcdefghijklmnopqrstuvw0123456789</option>
+ </select>
+ <label class="mdlext-selectfield__label">Profession</label>
+ </div>
+ </div>
+
+ <div class="mdl-cell mdl-cell--3-col">
+ <p>Textfield component</p>
+ <div class="mdl-textfield mdl-js-textfield mdl-textfield--floating-label">
+ <input class="mdl-textfield__input" type="text">
+ <label class="mdl-textfield__label">... to check alignment</label>
+ </div>
+ </div>
+
+ <div class="mdl-cell mdl-cell--3-col">
+ <p>Selectfield component with floating label</p>
+ <div class="mdlext-selectfield mdlext-js-selectfield mdlext-selectfield--floating-label">
+ <select class="mdlext-selectfield__select">
+ <option value=""></option>
+ <option value="option1">option 1</option>
+ <option value="option2">option 2</option>
+ <option value="option3">option 3</option>
+ <option value="option4">option 4</option>
+ <option value="option5">option 5</option>
+ <option value="option6">option 5 abcdefghijklmnopqrstuvw0123456789</option>
+ </select>
+ <label class="mdlext-selectfield__label">Profession</label>
+ </div>
+ </div>
+
+ <div class="mdl-cell mdl-cell--3-col">
+ <p>Disabled selectfield component</p>
+ <div class="mdlext-selectfield mdlext-js-selectfield mdlext-selectfield--floating-label">
+ <select class="mdlext-selectfield__select" disabled>
+ <option value=""></option>
+ <option value="option1">option 1</option>
+ <option value="option2">option 2</option>
+ <option value="option3">option 3</option>
+ <option value="option4">option 4</option>
+ <option value="option5">option 5</option>
+ <option value="option6">option 5 abcdefghijklmnopqrstuvw0123456789</option>
+ </select>
+ <label class="mdlext-selectfield__label">Profession</label>
+ </div>
+ </div>
+
+ <div class="mdl-cell mdl-cell--3-col">
+ <p>Unstyled select element</p>
+ <select style="width: 100%;">
+ <option value=""></option>
+ <option value="option1">option 1</option>
+ <option value="option2">option 2</option>
+ <option value="option3">option 3</option>
+ <option value="option4">option 4</option>
+ <option value="option5">option 5</option>
+ <option value="option6">option 5 abcdefghijklmnopqrstuvw0123456789</option>
+ </select>
+ <label>Profession</label>
+ </div>
+
+ <div class="mdl-cell mdl-cell--3-col">
+ <p>Unstyled input element</p>
+ <input type="text" style="width: 100%;">
+ <label>... to check alignment</label>
+ </div>
+
+ </div>
+</div>