@esri/calcite-components
Version:
Web Components for Esri's Calcite Design System.
68 lines (67 loc) • 3.06 kB
TypeScript
/// <reference path="../../index.d.ts" />
import type { PublicLitElement as LitElement } from "@arcgis/lumina";
import type { Scale } from "../interfaces.js";
/**
* @cssproperty [--calcite-inline-editable-background-color-hover] - Specifies the component's background color when hovered.
* @cssproperty [--calcite-inline-editable-background-color] - Specifies the component's background color.
* @cssproperty [--calcite-inline-editable-button-background-color] - When `appearance="solid"` or `appearance="outline-fill"`, specifies the background color of the component's button element.
* @cssproperty [--calcite-inline-editable-button-corner-radius] - Specifies the corner radius of the component's button element.
* @cssproperty [--calcite-inline-editable-button-loader-color] - Specifies the loader color of the components's button element.
* @cssproperty [--calcite-inline-editable-button-text-color] - Specifies the text color of the component's button element.
* @slot - A slot for adding a `calcite-input`.
*/
export abstract class InlineEditable extends LitElement {
/** Specifies a callback to be executed prior to disabling editing via the controls. When provided, the component's loading state will be handled automatically. */
accessor afterConfirm: () => Promise<void>;
/**
* When `true` and `editingEnabled` is `true`, displays save and cancel controls.
*
* @default false
*/
accessor controls: boolean;
/**
* When `true`, prevents interaction and decreases the component's opacity.
*
* @default false
*/
accessor disabled: boolean;
/**
* When `true`, inline editing is enabled.
*
* @default false
*/
accessor editingEnabled: boolean;
/**
* When `true`, a busy indicator is displayed.
*
* @default false
*/
accessor loading: boolean;
/** Overrides individual strings used by the component. */
accessor messageOverrides: {
enableEditing?: string;
cancelEditing?: string;
confirmChanges?: string;
};
/**
* Specifies the size of the component.
*
* @default "m"
*/
accessor scale: Scale;
/**
* Sets focus on the component.
*
* @param options - When specified an optional object customizes the component's focusing process. When `preventScroll` is `true`, scrolling will not occur on the component.
* @mdn [focus(options)](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/focus#options)
*/
setFocus(options?: FocusOptions): Promise<void>;
/** Fires when the component's "cancel editing" button is pressed. */
readonly calciteInlineEditableEditCancel: import("@arcgis/lumina").TargetedEvent<this, void>;
/** Fires when the component's "confirm edits" button is pressed. */
readonly calciteInlineEditableEditConfirm: import("@arcgis/lumina").TargetedEvent<this, void>;
readonly "@eventTypes": {
calciteInlineEditableEditCancel: InlineEditable["calciteInlineEditableEditCancel"]["detail"];
calciteInlineEditableEditConfirm: InlineEditable["calciteInlineEditableEditConfirm"]["detail"];
};
}