/** * ZUI ListItem Component * List item with label and optional accessory (switch, stepper, chevron, etc.) */ import { Component } from '../../core/Component'; import type { BaseProps, Rect, EventCallback, PaddingInput } from '../../core/types'; export type ListItemAccessory = 'none' | 'chevron' | 'switch' | 'stepper' | 'custom'; export interface ListItemProps extends BaseProps { /** Main label text */ label: string; /** Subtitle/description text */ subtitle?: string; /** Left icon path */ icon?: string; /** Accessory type on the right side */ accessory?: ListItemAccessory; /** Custom accessory component (when accessory='custom') */ customAccessory?: Component; /** Background color */ backgroundColor?: string; /** Border radius */ borderRadius?: number; /** Disabled state */ disabled?: boolean; /** Press event handler */ onPress?: EventCallback; /** Position X */ x?: number; /** Position Y */ y?: number; /** Item width */ width?: number; /** Item height */ height?: number; /** Internal padding */ padding?: PaddingInput; } /** * ListItem component for settings and list views * * @example * ```ts * // Simple list item * const item = new ListItem({ * label: 'Notifications', * accessory: 'switch', * onPress: () => console.log('Tapped'), * }); * * // With subtitle * const detailItem = new ListItem({ * label: 'Focus Goal', * subtitle: 'Set your daily target', * icon: 'ic_target', * accessory: 'chevron', * }); * * // With custom accessory * const stepperItem = new ListItem({ * label: 'Interval', * accessory: 'custom', * customAccessory: new Stepper({ value: 5, options: [5, 10, 15] }), * }); * ``` */ export declare class ListItem extends Component { readonly type = "ListItem"; private backgroundWidget; private iconWidget; private labelWidget; private subtitleWidget; private chevronWidget; private isPressed; protected getDefaultProps(): Partial; protected calculateLayout(parentRect?: Rect): void; protected createWidgets(): void; protected updateWidgets(): void; protected destroyWidgets(): void; private handlePressDown; private handlePressUp; /** * Set label text */ setLabel(label: string): void; /** * Set subtitle text */ setSubtitle(subtitle: string): void; /** * Set disabled state */ setDisabled(disabled: boolean): void; } /** * Create a ListItem component */ export declare function createListItem(props: ListItemProps): ListItem; //# sourceMappingURL=ListItem.d.ts.map