UNPKG

@puzzleitc/puzzle-shell

Version:

The standard design for Puzzle tools

52 lines (49 loc) 1.7 kB
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; import { LitElement, css, html } from "lit"; import { customElement } from "lit/decorators/custom-element.js"; import { theme } from "../utils/theme"; /** * Second level navigation to be use within pzsh-nav. * * @slot - May contain pzsh-nav-item components */ let Subnav = class Subnav extends LitElement { render() { return html ` <slot></slot> `; } }; Subnav.styles = [ theme, css ` :host { display: flex; flex-direction: column; } ::slotted(pzsh-nav-item) { padding-left: calc(4 * var(--pzsh-spacer)); } @media (min-width: ${theme.breakpoint}px) { :host { width: 100%; order: 1; flex-direction: row; background-color: var(--pzsh-subnav-bg); border-bottom: 1px solid var(--pzsh-subnav-border); } ::slotted(pzsh-nav-item) { --pzsh-nav-fg: var(--pzsh-subnav-fg); --pzsh-nav-active: var(--pzsh-subnav-active); padding-left: 0; } } `, ]; Subnav = __decorate([ customElement("pzsh-subnav") ], Subnav); export { Subnav };