UNPKG

@esri/calcite-components

Version:

Web Components for Esri's Calcite Design System.

35 lines (34 loc) 1.83 kB
import { LitElement } from '@arcgis/lumina'; import { Scale } from '../components/interfaces'; import { ComboboxChildElement } from '../components/calcite-combobox/interfaces'; import { StepperItem } from '../components/calcite-stepper-item/customElement.js'; import { TableRow } from '../components/calcite-table-row/customElement.js'; export declare function getIconScale(componentScale: Scale): Extract<Scale, "s" | "m">; /** * This utility logs a warning message when a required property is missing. * * Note: this should only be used for cases where using the @required JSDoc tag is not possible, such as: * - when a required property is being deprecated * - when a required property can be computed from another property * * @param component the component that requires the property * @param newProp the new property that is required * @param deprecatedProp the deprecated property that is required */ export declare function warnIfMissingRequiredProp<C extends LitElement>(component: C, newProp: keyof C, deprecatedProp: keyof C): void; export declare function isHidden<C extends ComboboxChildElement | HTMLCalciteStepperItemElement | HTMLCalciteTableRowElement>(el: C): boolean; /** * This helper util can be used to ensuring the component is loaded and rendered by the browser (The "componentOnReady" lifecycle method has been called and any internal elements are focusable). * * A component developer can await this method before proceeding with any logic that requires a component to be loaded first and then an internal element be focused. * * @example * async setFocus(): Promise<void> { * await componentFocusable(this); * this.internalElement?.focus(); * } * * @param component * @returns Promise<void> */ export declare function componentFocusable(component: LitElement): Promise<void>;