import { IClearable } from '../../../Behaviors/Clearable'; import { type IInvalidable } from '../../../Behaviors/Invalidable'; import { ISlottable } from '../../../Behaviors/Slottable'; import type { ColorEditorFormat } from '../../../Types/ColorEditorFormat'; import { ColorFormat } from '../../../Types/ColorFormat'; import { ColorPosition } from '../../../Types/ColorPosition'; import { TextAlignment } from '../../../Types/TextAlignment'; import { IColorPalette } from '../../Media/ColorEditor/IColorPalette'; import { InputBaseElement } from '../Abstracts/InputBase'; import type { IColorBoxElementProps } from './IColorBoxElementProps'; declare const ColorBoxElement_base: (abstract new (...args: Array) => import("../../../Behaviors/Themeable").IThemeableProps) & (abstract new (...args: Array) => import("../../../Behaviors/Slottable").ISlottableProps & ISlottable) & (abstract new (...args: Array) => import("../../../Behaviors/Clearable").IClearableProps & import("../../../Behaviors/Clearable").IClearableEvents & IClearable) & (abstract new (...args: Array) => import("../../../Behaviors/Disableable").IDisableableProps) & (abstract new (...args: Array) => IInvalidable & import("../../../Behaviors/Invalidable").IInvalidableProps) & (abstract new (...args: Array) => import("../../../Behaviors/Valueable").IValueableProps) & (abstract new (...args: Array) => import("../../../Behaviors/Variantable").IVariantableProps) & (abstract new (...args: Array) => import("../../../Behaviors/Appearanceable").IAppearanceableProps) & (abstract new (...args: Array) => import("../../../Behaviors/DropDownable").IDropDownableProps & import("../../../Behaviors/DropDownable").IDropDownable) & (abstract new (...args: Array) => import("../../../Behaviors/Labelable").ILabelableProps) & typeof InputBaseElement & import("../../../Behaviors/Themeable").IThemeableCtor; /** * Color Box - A comprehensive color selection input with picker interface and palette support. * * @description * The Color Box component provides an intuitive interface for color selection, combining a visual color swatch * display with a dropdown color picker. It supports multiple color formats (HEX, RGB, HSL), predefined color * palettes including Material Design colors, custom color picker interface, text input for direct color entry, * and visual color preview. Features include automatic palette generation, color format validation, accessibility * support with proper contrast checking, keyboard navigation, and integration with form validation systems. * The component handles color conversion between formats and provides both visual and text-based selection methods. * Perfect for theming interfaces, design tools, branding customization, and any application requiring color input. * * @name Color Box * @element mosaik-colorbox * @category Inputs * * @slot prefix - Content placed before the input field. * @slot suffix - Content placed after the input field. * * @csspart focusRing - The focus ring indicator. * @csspart prefix - The prefix content container. * @csspart inner - The inner container wrapper. * @csspart label - The floating label element. * @csspart input - The color input field. * @csspart colorSwatch - The color preview swatch. * @csspart suffix - The suffix content container. * @csspart colorButton - The color picker dropdown button. * @csspart popup - The floating color picker container. * @csspart colorPicker - The color picker interface. * @csspart palette - The color palette grid. * @csspart colorOption - Individual color options in palette. * * @cssprop {Color} --color-box-background-color - The background color. * @cssprop {Color} --color-box-border-color - The border color. * @cssprop {String} --color-box-border-radius - The border radius. * @cssprop {String} --color-box-border-style - The border style. * @cssprop {String} --color-box-border-width - The border width. * @cssprop {String} --color-box-focus-ring-outward-offset - The focus ring outward offset. * @cssprop {String} --color-box-font-family - The font family. * @cssprop {String} --color-box-font-size - The font size. * @cssprop {String} --color-box-font-weight - The font weight. * @cssprop {Color} --color-box-foreground-color - The foreground color. * @cssprop {String} --color-box-gap - The gap between elements. * @cssprop {String} --color-box-height - The height. * @cssprop {String} --color-box-padding-bottom - The padding bottom. * @cssprop {String} --color-box-padding-left - The padding left. * @cssprop {String} --color-box-padding-right - The padding right. * @cssprop {String} --color-box-padding-top - The padding top. * @cssprop {String} --color-box-shadow - The shadow. * @cssprop {String} --color-box-transition-duration - The transition duration. * @cssprop {String} --color-box-width - The width. * * @dependency mosaik-focus-ring - Used for focus indication. * @dependency mosaik-button - Used for the color picker button. * @dependency mosaik-floating - Used for dropdown positioning. * @dependency mosaik-color-picker - Used for the color picker interface. * @dependency mosaik-color-swatch - Used for color preview display. * @dependency mosaik-icon - Used for UI icons. * * @fires cleared {ClearedEvent} - Fired when the value is cleared. * @fires change {ColorChangedEvent} - Emitted when the value changes. * @fires input {ColorChangedEvent} - Emitted when the value changes. * @fires focus - Emitted when the element receives focus. * @fires blur - Emitted when the element loses focus. * * @example * ```html * * * ``` * * @example * Color box with RGB format and palette: * ```html * * * ``` * * @public */ export declare class ColorBoxElement extends ColorBoxElement_base implements IColorBoxElementProps, IInvalidable, IClearable, ISlottable { private _inputElement; private _colorPickerElement; private readonly _clickOutsideController; private _value; private _readonly; private _required; private _autofocus; private _name; private _pattern; private _placeholder; private _autocomplete; private _swatches; private _textAlign; private _format; private _colorPosition; private _editorFormat; private _showAlpha; private _showInputs; private _showPalette; private _showEyeDropper; private _showSwatch; private _palettes; private _selectedPalette; /** * @public */ constructor(); /** * Returns the `is` property. * The `is` property represents natural name of this element. * * @public * @static * @readonly */ static get is(): string; /** * Gets or sets the `value` property. * * @public * @override */ get value(): string; set value(value: string); /** * Gets or sets the `readonly` property. * * @public * @attr */ get readonly(): boolean; set readonly(value: boolean); /** * Gets or sets the `required` property. * * @public * @attr */ get required(): boolean; set required(value: boolean); /** * Gets or sets the `autofocus` property. * * @public * @override */ get autofocus(): boolean; set autofocus(value: boolean); /** * Gets or sets the `name` property. * * @public * @attr */ get name(): string; set name(value: string); /** * Gets or sets the `pattern` property. * * @public * @attr */ get pattern(): string; set pattern(value: string); /** * Gets or sets the `placeholder` property. * * @public * @attr */ get placeholder(): string; set placeholder(value: string); /** * Gets or sets the `autocomplete` property. * * @public * @attr */ get autocomplete(): boolean; set autocomplete(value: boolean); /** * Gets or sets the `swatches` property. * * @public * @attr */ get swatches(): Array; set swatches(value: Array); /** * Determines the text alignment of the component. * * @public * @attr */ get textAlign(): TextAlignment; set textAlign(value: TextAlignment); /** * Gets or sets the color format to use for input and output. * Supported formats: hex, hex8, rgb, rgba, hsl, hsla, hsv, hsva, oklch, oklab, lch, lab * * @public * @attr */ get format(): ColorFormat; set format(value: ColorFormat); /** * Gets or sets the position of the color preview relative to the input field. * Use 'before' to place it before the input, 'after' to place it after (default). * * @public * @attr */ get colorPosition(): ColorPosition; set colorPosition(value: ColorPosition); /** * Gets or sets the color format for the editor inputs. * * @public * @attr * @default 'hex' */ get editorFormat(): ColorEditorFormat; set editorFormat(value: ColorEditorFormat); /** * Gets or sets whether to show the alpha slider in the editor. * * @public * @attr * @default true */ get showAlpha(): boolean; set showAlpha(value: boolean); /** * Gets or sets whether to show the color inputs in the editor. * * @public * @attr * @default true */ get showInputs(): boolean; set showInputs(value: boolean); /** * Gets or sets whether to show the palette section in the editor. * * @public * @attr * @default true */ get showPalette(): boolean; set showPalette(value: boolean); /** * Gets or sets whether to show the eye dropper button in the editor. * * @public * @attr * @default false */ get showEyeDropper(): boolean; set showEyeDropper(value: boolean); /** * Gets or sets whether to show the color swatch preview in the editor. * * @public * @attr * @default true */ get showSwatch(): boolean; set showSwatch(value: boolean); /** * Gets or sets the available color palettes for the editor. * * @public */ get palettes(): Array; set palettes(value: Array); /** * Gets or sets the currently selected palette name in the editor. * * @public * @attr */ get selectedPalette(): string; set selectedPalette(value: string); /** * Determines whether the element has a prefix or not. * The Prefix is a slot that is displayed before the input. * * @private * @readonly * @attr */ get hasPrefix(): boolean; /** * Determines whether the element has a suffix or not. * The Suffix is a slot that is displayed after the input. * * @private * @readonly * @attr */ get hasSuffix(): boolean; /** * @public * @override */ focus(): void; /** * @public * @override */ blur(): void; /** * Clears the value of the element but not the validation. * * @public * @override */ clear(force?: boolean): boolean; /** * Resets the value, all kinds of validation and errors. * * @public * @override */ reset(): void; /** * Checks the validity of the element and returns `true` if it is valid; otherwise, `false`. * * @public * @override */ checkValidity(): boolean; /** * @template * @protected */ onChange(event: Event): void; /** * @template * @protected * @override */ onInput(event: InputEvent): void; /** * @template * @protected * @override */ onFocus(event: FocusEvent): void; /** * @template * @protected * @override */ onBlur(event: FocusEvent): void; /** * Handles final color selection (change event). * Updates value and emits change event. * * @template * @private */ onPick(_event: Event): void; protected onApplyTemplate(): void; /** * @protected */ protected onIsDropDownOpenPropertyChanged(_prev?: boolean, next?: boolean): void; } /** * @public */ export declare namespace ColorBoxElement { type Props = IColorBoxElementProps; } /** * @public */ declare global { interface HTMLElementTagNameMap { 'mosaik-colorbox': ColorBoxElement; } } export {}; //# sourceMappingURL=ColorBoxElement.d.ts.map