UNPKG

@arcgis/map-components

Version:
34 lines (33 loc) 1.58 kB
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */ import { c as r } from "../../chunks/runtime.js"; import { css as n, html as i } from "lit"; import { H as s } from "../../chunks/heading.js"; import { LitElement as a } from "@arcgis/lumina"; import { renderingSanitizer as t } from "@arcgis/core/applications/Components/sanitizerUtils.js"; const o = n`.heading{margin-top:0;margin-bottom:var(--calcite-spacing-xxs);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size-xl);font-weight:var(--calcite-font-weight-regular);line-height:var(--calcite-font-line-height-relative-tight)}.description{margin-bottom:var(--calcite-spacing-sm);font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular);line-height:var(--calcite-font-line-height-relative-normal)}`; class c extends a { constructor() { super(...arguments), this.headingLevel = 2; } static { this.properties = { description: 1, headingLevel: 9, heading: 1 }; } static { this.styles = o; } render() { return i`<div class="root">${this._renderHeading()}${this._renderDescription()}</div>`; } _renderHeading() { const { heading: e } = this; return e ? s({ class: "heading", level: this.headingLevel, excludeGlobalCss: !0, children: i`<div .innerHTML=${t.sanitize(e) ?? ""}></div>` }) : null; } _renderDescription() { const { description: e } = this; return e ? i`<div class="description" .innerHTML=${t.sanitize(e) ?? ""}></div>` : null; } } r("arcgis-feature-element-info", c); export { c as ArcgisFeatureElementInfo };