import type { Readable, Signal } from '@vielzeug/ripple'; import type { ComponentSize } from '../../types'; /** * Minimal shape of the handle returned by `createCheckable` that * `applyCheckableBinding` needs. Matches both checkbox (with `indeterminate`) * and switch (without). */ export type CheckableBindingHandle = { assistiveId: string; checked: Signal; disabled: Readable; errorText: Readable; handleClick: (event: MouseEvent) => boolean; handleKeydown: (event: KeyboardEvent) => boolean; helperText: Readable; indeterminate?: Signal; labelId: string; /** Reflects `aria-required` — there's no native form control here to carry a real `required` attribute. */ required?: Readable; }; /** * `prop.string()` already reflects `error`'s raw value as an attribute, but that leaves the * attribute present-but-empty (`error=""`) once set instead of removing it — this normalizes * an empty error back to "no attribute at all". Shared by every text-field component * (`ore-input`, `ore-textarea`, `ore-message-composer`) since `bind()`'s own `error` writer * needs a derived getter, not the raw prop, to get that behavior. * * @example * ```ts * bind({ attr: { error: errorAttr(errorText), size: props.size, variant: props.variant } }); * ``` */ export declare const errorAttr: (errorText: Readable) => (() => string | undefined); /** * Applies the standard host bindings shared by all checkable components * (checkbox, switch, radio). * * Wires `role`, all ARIA attributes, `checked`, `size`, `tabindex`, the * `is-checked`/`is-disabled` classes, and the `click`/`keydown` event handlers. * * Pass `handle.indeterminate` for components that need it (checkbox); * omit it for switch/radio. */ export declare const applyCheckableBinding: (fCtxSize: Readable, handle: CheckableBindingHandle, role: "checkbox" | "radio" | "switch") => void; //# sourceMappingURL=field-binding.d.ts.map