UNPKG

@teaui/core

Version:

A high-level terminal UI library for Node

35 lines (34 loc) 1.22 kB
import type { Viewport } from '../Viewport.js'; import { type View } from '../View.js'; import { type Props as ContainerProps, Container } from '../Container.js'; import { Size } from '../geometry.js'; import { type HotKey, type MouseEvent } from '../events/index.js'; import { type LegendItem } from '../types.js'; import { System } from '../System.js'; interface StyleProps { title?: string; value: boolean; onChange?: (value: boolean) => void; hotKey?: HotKey; } type Props = StyleProps & ContainerProps; export declare class Checkbox extends Container { #private; constructor(props: Props); get value(): boolean; set value(value: boolean); childPalette(view: View): import("../Palette.js").Palette; update(props: Props): void; get title(): string | undefined; set title(value: string | undefined); legendItems(): LegendItem[]; naturalSize(available: Size): Size; receiveMouse(event: MouseEvent, system: System): void; receiveKey(_: import('../events/index.js').KeyEvent): void; render(viewport: Viewport): void; boxStyle(): 'checkbox' | 'radio'; } export declare class Radio extends Checkbox { boxStyle(): 'checkbox' | 'radio'; } export {};