/** @jsxImportSource react */ import { Selection } from "../ui/selection/Selection"; import { Container, ContainerConfig } from "../ui/Container"; import { Instance } from "../ui/Instance"; import { RenderingContext } from "../ui/RenderingContext"; import { NumberProp, BooleanProp, StringProp } from "../ui/Prop"; export interface LegendEntryConfig extends ContainerConfig { /** Set to `true` if the entry is selected. */ selected?: BooleanProp; /** Shape to display. Default is `square`. */ shape?: StringProp; /** Index of a color from the standard palette of colors. 0-15. */ colorIndex?: NumberProp; /** Used to automatically assign a color based on the `name` and the contextual `ColorMap` widget. */ colorMap?: StringProp; /** Name used to resolve the color. If not provided, `name` is used instead. */ colorName?: StringProp; /** Name of the entry. */ name?: StringProp; /** Used to indicate if an entry is active or not. */ active?: BooleanProp; /** Size of the shape in pixels. Default is `18`. */ size?: NumberProp; /** Horizontal border radius. */ rx?: NumberProp; /** Vertical border radius. */ ry?: NumberProp; /** Text content of the entry. */ text?: StringProp; /** Action to perform on click. Default is `auto`. */ legendAction?: string; /** Size of the SVG container in pixels. Default is `20`. */ svgSize?: number; /** Selection configuration. */ selection?: any; /** Click event handler. */ onClick?: (e: React.MouseEvent, instance: Instance) => void | false; } export interface LegendEntryInstance extends Instance { colorMap: any; } export declare class LegendEntry extends Container { baseClass: string; shape: string; legendAction: string; size: number; svgSize: number; selection: Selection; text: string; onClick: LegendEntryConfig["onClick"]; constructor(config: LegendEntryConfig); init(): void; declareData(...args: any[]): void; prepareData(context: RenderingContext, instance: LegendEntryInstance): void; explore(context: RenderingContext, instance: LegendEntryInstance): void; prepare(context: RenderingContext, instance: LegendEntryInstance): void; handleClick(e: React.MouseEvent, instance: LegendEntryInstance): void; render(context: RenderingContext, instance: LegendEntryInstance, key: string): React.ReactNode; renderShape(instance: LegendEntryInstance): React.ReactNode; } //# sourceMappingURL=LegendEntry.d.ts.map