Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
* 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 {PolymerElement, html} from '@polymer/polymer/polymer-element.js';
import {ThemableMixin} from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
class ThemedComponent extends ThemableMixin(PolymerElement) {
static get template() {
return html`
<div>Just a div</div>
`;
}
static get is() { return 'themed-component' }
}
customElements.define(ThemedComponent.is, ThemedComponent);
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
import {PolymerElement} from '@polymer/polymer/polymer-element.js';
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
import {ThemableMixin} from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
//Based on https://github.com/WebPaperElements/paper-divider
class PaperDivider extends ThemableMixin(PolymerElement) {
static get is() { return 'paper-divider'; }
static get template() {
return html`
<style>
:host {
display: block;
height: 1px;
min-height: 1px;
max-height: 1px;
background-color: var(--paper-divider-color, #000);
opacity: 0.12;
@apply(--paper-divider);
}
</style>
*
* 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.
* #L%
*/
import {PolymerElement} from '@polymer/polymer/polymer-element.js';
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
import {ThemableMixin} from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
import "@polymer/paper-item/paper-icon-item.js";
import "@vaadin/flow-frontend/iron-collapse-button/iron-collapse-button.js";
class MenuItem extends ThemableMixin(PolymerElement) {
static get is() { return 'fc-menuitem'; }
static get template() {
return html`
<style>
:host {
cursor: pointer;
display: block;
--paper-item-disabled-color: var(--lumo-disabled-text-color);
}
:host(.iron-selected) #item {
font-weight: var(--paper-item-selected-weight, bold);
}
:host #item {
width: 100%;
display: flex;</style>
*
* 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.
* #L%
*/
import {PolymerElement} from '@polymer/polymer/polymer-element.js';
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
import {ThemableMixin} from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
import "@vaadin/flow-frontend/fc-applayout/paper-divider.js";
class MenuSeparator extends ThemableMixin(PolymerElement) {
static get is() { return 'fc-separator'; }
static get template() {
return html`
<style>
:host ::slotted(*) {
font-size: 80%;
padding-left: 8px;
}
</style>
<div></div>
`;}
}