UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

53 lines (52 loc) 1.53 kB
/// <reference path="../../index.d.ts" /> import type { PublicLitElement as LitElement } from "@arcgis/lumina"; import type { Scale } from "../interfaces.js"; /** * @cssproperty [--calcite-swatch-corner-radius] - Specifies the component's corner radius. * @slot [image] - A slot for adding an image or pattern. */ export abstract class Swatch extends LitElement { /** * Specifies the component's color * * @see https://developer.mozilla.org/en-US/docs/Web/CSS/color_value */ accessor color: string; /** * 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. When contained in a parent `calcite-swatch-group`, the component inherits the parent's `scale` value. * * @default "m" */ accessor scale: Scale; /** * When `true`, the component is selected. * * @default false */ accessor selected: boolean; /** The component's value. */ accessor value: any; /** * Sets focus on the component. * * @param options */ setFocus(options?: FocusOptions): Promise<void>; /** Fires when the selected state of the component changes. */ readonly calciteSwatchSelect: import("@arcgis/lumina").TargetedEvent<this, void>; readonly "@eventTypes": { calciteSwatchSelect: Swatch["calciteSwatchSelect"]["detail"]; }; }