UNPKG

api-console-assets

Version:

This repo only exists to publish api console components to npm

96 lines (87 loc) 3.71 kB
<!-- @license Copyright 2016 The Advanced REST client authors <arc@mulesoft.com> 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. --> <link rel="import" href="../polymer/polymer.html"> <link rel="import" href="../iron-flex-layout/iron-flex-layout.html"> <link rel="import" href="../paper-styles/typography.html"> <link rel="import" href="../paper-dropdown-menu/paper-dropdown-menu.html"> <link rel="import" href="../paper-icon-button/paper-icon-button.html"> <link rel="import" href="../paper-listbox/paper-listbox.html"> <link rel="import" href="../paper-item/paper-item.html"> <link rel="import" href="../paper-autocomplete/paper-autocomplete.html"> <link rel="import" href="../arc-icons/arc-icons.html"> <link rel="import" href="../marked-element/marked-element.html"> <link rel="import" href="../prism-element/prism-theme-default.html"> <link rel="import" href="../markdown-styles/markdown-styles.html"> <link rel="import" href="body-json-editor-behavior.html"> <!-- The `property-type-selector` provides UI to change UI model element type. ### Styling `<property-type-selector>` provides the following custom properties and mixins for styling: Custom property | Description | Default ----------------|-------------|---------- `--property-type-selector` | Mixin applied to the element. | `{}` `--property-type-selector-dropdown` | Mixin applied to the dropdown menu element | `{}` `--property-type-selector-dropdown-list` | Mixin applied to the dropdown menu list element | `{}` `--property-type-selector-dropdown-list-item` | Mixin applied to the menu list item element | `{}` `--property-type-selector-dropdown-list-item-hover` | Mixin applied to the menu list item element when hovering | `{}` @group UI Elements @element property-type-selector @demo demo/index.html Regular use of the element @demo demo/raml.html Use of the element with RAML type --> <dom-module id="property-type-selector"> <template> <style> :host { @apply --layout-horizontal; @apply --property-type-selector; } paper-dropdown-menu { @apply --layout-flex; @apply --property-type-selector-dropdown; } paper-listbox { @apply --property-type-selector-dropdown-list; } paper-item { @apply --property-type-selector-dropdown-list-item; } paper-item:hover { @apply --property-type-selector-dropdown-list-item-hover; } </style> <paper-dropdown-menu label="Select type" no-label-float> <paper-listbox class="dropdown-content" attr-for-selected="data-value" selected="{{selected}}"> <paper-item data-value="string">String</paper-item> <paper-item data-value="float">Float</paper-item> <paper-item data-value="integer">Integer</paper-item> <paper-item data-value="boolean">Boolean</paper-item> <paper-item data-value="null">Null</paper-item> <paper-item data-value="object">Object</paper-item> <paper-item data-value="array">Array</paper-item> </paper-listbox> </paper-dropdown-menu> </template> <script> Polymer({ is: 'property-type-selector', properties: { selected: { type: String, notify: true } } }); </script> </dom-module>