UNPKG

v4web-components

Version:
32 lines (26 loc) 1.54 kB
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); const index = require('./index-8b55ea0e.js'); const labDsChipGroupCss = ".chip-group{display:flex;flex-wrap:wrap;align-items:center;gap:var(--lab-ds-semantic-placeholder-space-gap-m);padding:var(--lab-ds-semantic-placeholder-space-padding-none)}.clear-all{text-decoration:underline;margin-left:var(--lab-ds-semantic-placeholder-space-gap-xxl);font:var(--lab-ds-semantic-typography-body-decoration-underlined-p2-regular);color:black;cursor:pointer}"; const LabDsChipGroup = class { constructor(hostRef) { index.registerInstance(this, hostRef); this.handleCloseChip = index.createEvent(this, "handleCloseChip", 7); this.handleClearAll = index.createEvent(this, "handleClearAll", 7); this.size = 'medium'; this.avatar = false; this.chips = []; } handleClickChip(id) { id && this.handleCloseChip.emit(id); } handleClickClearAll() { this.handleClearAll.emit(); } render() { return (index.h("div", { class: "chip-group" }, this.chips.map(chip => (index.h("lab-ds-chip", { onHandleCloseChip: () => this.handleClickChip(chip.id), key: chip.id, avatar: this.avatar, size: this.size, label: chip.label }))), this.chips.length > 0 && index.h("lab-ds-button", { variant: "link-button", label: "Limpar op\u00E7\u00F5es", onHandleButton: () => this.handleClickClearAll() }))); } }; LabDsChipGroup.style = labDsChipGroupCss; exports.lab_ds_chip_group = LabDsChipGroup; //# sourceMappingURL=lab-ds-chip-group.cjs.entry.js.map