import { JSXInterface } from '../jsx'; import { CSSResult, ControlElement, PropertyValues, TemplateResult } from '@refinitiv-ui/core'; import '@refinitiv-ui/phrasebook/locale/en/color-picker.js'; import { TranslatePromise } from '@refinitiv-ui/translate'; import '../color-dialog/index.js'; /** * * Color picker control * @fires value-changed - Fired when the user commits a value change. The event is not triggered if `value` property is changed programmatically. * * @attr {boolean} readonly - Set readonly state * @prop {boolean} [readonly=false] - Set readonly state * * @attr {boolean} disabled - Set disabled state * @prop {boolean} [disabled=false] - Set disabled state */ export declare class ColorPicker extends ControlElement { /** * Element version number * @returns version number */ static get version(): string; protected readonly defaultRole: string | null; /** * Color Description for aria-label */ private colorAriaLabel; /** * Set the color dialog to activate no-color option */ allowNocolor: boolean; /** * Set lang to color dialog * @ignore */ lang: string; /** * Color picker internal translation strings */ protected colorTPromise: TranslatePromise; /** * A `CSSResult` that will be used * to style the host, slotted children * and the internal template of the element. * @returns CSS template */ static get styles(): CSSResult | CSSResult[]; /** * Reference to the color dialog */ private dialogRef; private lazyRendered; /** * Toggles the opened state of the dialog */ opened: boolean; /** * Check if value is valid HEX value (including #) * @param value Value to check * @returns true if value is valid */ protected isValidValue(value: string): boolean; /** * Used to show a warning when the value does not pass the validation * @param value that is invalid * @returns {void} */ protected warnInvalidValue(value: string): void; /** * Return true if popup can be opened */ private get canOpenPopup(); /** * Called when connected to DOM * @returns {void} */ connectedCallback(): void; /** * Called after the component is first rendered * @param changedProperties Properties which have changed * @returns {void} */ protected firstUpdated(changedProperties: PropertyValues): void; /** * Updates the element * @param changedProperties Properties that has changed * @returns {void} */ protected update(changedProperties: PropertyValues): void; /** * Run on tap event * @param event Tap event * @returns {void} */ private onTap; /** * Handles key input on color picker * @param event Key down event object * @returns {void} */ private onKeyDown; /** * Set opened state with event * @param opened True if opened * @returns {void} */ private setOpened; /** * Run on color dialog value-changed event * @param event value-changed event * @returns {void} */ private onColorDialogValueChanged; /** * Run on color dialog opened-changed event * @param event opened-changed event * @returns {void} */ private onColorDialogOpenedChanged; /** * A template used to notify currently selected value for screen readers * @returns template result */ private get selectionTemplate(); /** * Helper method, used to set the color description. * @returns {void} */ private updateColorAriaLabel; /** * Color dialog template */ private get dialogTemplate(); /** * Color item template */ private get colorItemTemplate(); /** * A `TemplateResult` that will be used * to render the updated internal template. * @return Render template */ protected render(): TemplateResult; } declare global { interface HTMLElementTagNameMap { 'ef-color-picker': ColorPicker; } namespace JSX { interface IntrinsicElements { 'ef-color-picker': Partial | JSXInterface.ControlHTMLAttributes; } } } export {};