@arcgis/map-components
Version:
ArcGIS Map Components
45 lines (44 loc) • 2.32 kB
JavaScript
import { c as t } from "../../chunks/runtime.js";
import e from "@arcgis/core/widgets/Expand.js";
import { LitElement as i, createEvent as s, noShadowRoot as o } from "@arcgis/lumina";
import { m as a } from "../../chunks/useWidget.js";
import { css as n } from "@lit/reactive-element/css-tag.js";
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
v4.32.13 */
const c = n` {arcgis-expand{display:flex;pointer-events:auto}arcgis-expand>.esri-expand__content--expanded{background-color:var(--calcite-color-background)}}`, d = a(e);
class l extends i {
// #endregion
// #region Lifecycle
constructor() {
super(), this.widget = d(this), this.viewModel = this.widget.viewModel, this.autoCollapse = this.widget.autoCollapse, this.autoDestroyDisabled = !1, this.closeOnEsc = this.widget.closeOnEsc, this.collapseIcon = this.widget.collapseIcon, this.collapseTooltip = this.widget.collapseTooltip, this.content = this.widget.content, this.expandIcon = this.widget.expandIcon, this.expandTooltip = this.widget.expandTooltip, this.expanded = this.widget.expanded, this.focusTrapEnabled = this.widget.focusTrapDisabled, this.group = this.widget.group, this.icon = this.widget.icon, this.iconNumber = this.widget.iconNumber, this.label = this.widget.label, this.mode = this.widget.mode, this.placement = this.widget.placement, this.position = "top-right", this.arcgisReady = s(), this.content ??= document.createElement("div");
}
static {
this.properties = { autoCollapse: 5, autoDestroyDisabled: 5, closeOnEsc: 5, collapseIcon: 1, collapseTooltip: 1, content: 1, expandIcon: 1, expandTooltip: 1, expanded: 7, focusTrapEnabled: 5, group: 1, icon: 1, iconNumber: 9, label: 1, mode: 1, placement: 1, position: 1, referenceElement: 1 };
}
static {
this.shadowRootOptions = o;
}
static {
this.styles = c;
}
// #endregion
// #region Public Methods
async collapse() {
this.widget?.collapse();
}
/** Permanently destroy the component */
async destroy() {
await this.manager.destroy();
}
async expand() {
this.widget?.expand();
}
async toggle() {
this.expanded ? await this.collapse() : await this.expand();
}
}
t("arcgis-expand", l);
export {
l as ArcgisExpand
};