ModeratorElection/frontend/generated/jar-resources/vaadin-dev-tools/theme-editor/metadata/model.d.ts
2024-06-06 17:45:46 +02:00

37 lines
1.1 KiB
TypeScript

import { TemplateResult } from 'lit';
import { ComponentReference } from '../../component-util';
export declare enum EditorType {
text = "text",
checkbox = "checkbox",
range = "range",
color = "color"
}
export interface CssPropertyMetadata {
propertyName: string;
displayName: string;
defaultValue?: string;
description?: string;
editorType?: EditorType;
presets?: string[];
icon?: string;
checkedValue?: string;
}
export interface ComponentElementMetadata {
selector: string;
stateAttribute?: string;
stateElementSelector?: string;
displayName: string;
description?: string;
properties: CssPropertyMetadata[];
}
export interface ComponentMetadata {
tagName: string;
displayName: string;
description?: TemplateResult;
notAccessibleDescription?: TemplateResult;
elements: ComponentElementMetadata[];
setupElement?: (element: any) => Promise<void>;
cleanupElement?: (element: any) => Promise<void>;
openOverlay?: (component: ComponentReference) => void;
hideOverlay?: (component: ComponentReference) => void;
}