UNPKG

@vidal-community/vidal-web-components

Version:

Vidal Web Components

77 lines (72 loc) 2.51 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 { css, html, LitElement } from 'lit'; import { customElement, property } from 'lit/decorators.js'; import './timeline-grouping-selector'; let VidalHistoryOrderAndGroup = class VidalHistoryOrderAndGroup extends LitElement { constructor() { super(...arguments); this.switchHandler = () => null; } render() { return html ` <div class="order-and-grouping"> <div class="order-by-selector"> <div class="order-by-label">Tri</div> <div class="order-by-arrow"></div> <timeline-grouping-selector .switchHandler="${(groupingValue) => this.switchClassification(groupingValue)}" ></timeline-grouping-selector> </div> </div>`; } switchClassification(groupingValue) { this.switchHandler(groupingValue); } }; VidalHistoryOrderAndGroup.styles = css ` :host { --margin: 8px; width: 25%; display: flex; justify-content: flex-start; } .order-and-grouping { width: 100%; display: flex; justify-content: flex-start; align-items: center; } .order-by-selector { width: 100%; display: flex; align-items: center; } .order-by-label { padding: 4px 10px; border-radius: 19px; background: white; color: black; font-weight: bold; } .order-by-arrow { border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 10px solid rgb(67, 67, 67); margin-left: var(--margin); } .order-by-selected-item { margin-left: var(--margin); } `; __decorate([ property() ], VidalHistoryOrderAndGroup.prototype, "switchHandler", void 0); VidalHistoryOrderAndGroup = __decorate([ customElement('vidal-history-order-and-group') ], VidalHistoryOrderAndGroup); export { VidalHistoryOrderAndGroup }; //# sourceMappingURL=vidal-history-order-and-group.js.map