@esri/calcite-components
Version:
Web Components for Esri's Calcite Design System.
56 lines (55 loc) • 1.81 kB
TypeScript
/// <reference path="../../index.d.ts" />
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
import type { Scale, SelectionMode } from "../interfaces.js";
import type { Swatch } from "../calcite-swatch/customElement.js";
/**
* @cssproperty [--calcite-swatch-group-space] - Specifies the space between slotted elements.
* @slot - A slot for adding one or more `calcite-swatch`s.
*/
export abstract class SwatchGroup extends LitElement {
/**
* When `true`, interaction is prevented and the component is displayed with lower opacity.
*
* @default false
*/
accessor disabled: boolean;
/**
* Specifies an accessible label for the component.
*
* @required
*/
accessor label: string;
/**
* Specifies the component's size. Child `calcite-swatch`s inherit the component's value.
*
* @default "m"
*/
accessor scale: Scale;
/** Specifies the component's selected items. */
get selectedItems(): Swatch[];
/**
* Specifies the selection mode of the component, where:
*
* `"multiple"` allows any number of selections,
*
* `"single"` allows only one selection,
*
* `"single-persist"` allows one selection and prevents de-selection, and
*
* `"none"` does not allow any selections.
*
* @default "none"
*/
accessor selectionMode: Extract<"multiple" | "single" | "single-persist" | "none", SelectionMode>;
/**
* Sets focus on the component's first focusable element.
*
* @param options
*/
setFocus(options?: FocusOptions): Promise<void>;
/** Fires when the component's selection changes. */
readonly calciteSwatchGroupSelect: import("@arcgis/lumina").TargetedEvent<this, void>;
readonly "@eventTypes": {
calciteSwatchGroupSelect: SwatchGroup["calciteSwatchGroupSelect"]["detail"];
};
}