import type React from 'react';
import type { CheckedDetail, FocusDetail, KeyboardDetail } from './types.js';
export interface CheckboxRef extends HTMLElement {
/** Focuses the checkbox input. */
focus(): void;
/** Returns the current checked state as a string. */
getValue(): string;
/** Sets the checked state programmatically. */
setValue(value: string): void;
}
/**
* Uses a tri-state `checked` prop: `true`, `false`, or `"indeterminate"`.
* The Shadow DOM renders a native `` internally — do not nest your own.
* Form submission works via ElementInternals.
*
* In React, reach the imperative methods through a ref:
* `const api = useRef(null)`, pass `ref={api}`, then `api.current?.focus()`.
* Available: focus(), getValue(), setValue().
*
* @csspart base
*/
export interface CheckboxOwnProps {
/**
* Unique identifier for the element.
* @example 'example-id'
*/
id?: string;
/**
* Visible label text.
* @example 'Example label'
*/
label: string;
/**
* Corner radius style. Allowed values: `sharp`, `rounded`.
* @example 'sharp'
*/
shape?: 'sharp' | 'rounded';
/**
* Component size. Allowed values: `xs`, `sm`, `md`, `lg`, `xl`.
* @example 'xs'
*/
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
/**
* Three-state check. Accepts true/false as aliases for 'checked'/unchecked, and keeps 'indeterminate' for the third state. Allowed values: ``, `checked`, `indeterminate`.
* @example 'checked'
*/
checked?: boolean | '' | 'checked' | 'indeterminate';
/**
* Disables the component, preventing interaction.
* @defaultValue false
* @example true
*/
disabled?: boolean;
/**
* Marks the field as required for form validation.
* @defaultValue false
* @example true
*/
required?: boolean;
/**
* Helper text displayed below the input.
* @example 'example'
*/
helperText?: string;
/**
* Error message text. When set, shows validation error styling.
* @example 'This field is invalid'
*/
error?: string;
/**
* Renders the input without a visible label (still requires aria-label).
* @defaultValue false
* @example true
*/
unlabeled?: boolean;
/**
* Fires on each user edit before the value is committed. Detail: `CheckedDetail`.
* @example (event) => console.log(event.detail.checked)
*/
onInput?: (event: CustomEvent) => void;
/**
* Fires when the committed component value or state changes. Detail: `CheckedDetail`.
* @example (event) => console.log(event.detail.checked)
*/
onChange?: (event: CustomEvent) => void;
/**
* Fires when focus enters the component. Detail: `FocusDetail`.
* @example (event) => console.log(event.detail.relatedTarget)
*/
onFocus?: (event: CustomEvent) => void;
/**
* Fires when focus leaves the component. Detail: `FocusDetail`.
* @example (event) => console.log(event.detail.relatedTarget)
*/
onBlur?: (event: CustomEvent) => void;
/**
* Fires when a key is pressed inside the component. Detail: `KeyboardDetail`.
* @example (event) => console.log(event.detail.key)
*/
onKeydown?: (event: CustomEvent) => void;
/**
* Fires when a key is released inside the component. Detail: `KeyboardDetail`.
* @example (event) => console.log(event.detail.key)
*/
onKeyup?: (event: CustomEvent) => void;
/** CSS class applied to the Custom Element host.
* @example 'my-component'
*/
className?: string;
/** Inline styles applied to the Custom Element host.
* @example { marginTop: 8 }
*/
style?: React.CSSProperties;
}
/**
* Props for ``: the component's own API plus every standard DOM
* attribute and native React event handler, forwarded verbatim to the
* `` host — `id`, `data-*`, `aria-*`, `title`, `tabIndex`,
* `slot`, `onMouseEnter`, and the rest. Own props always win over a
* same-named DOM attribute.
*/
export type CheckboxProps = CheckboxOwnProps & Omit, keyof CheckboxOwnProps | 'children' | 'dangerouslySetInnerHTML'>;
export declare const Checkbox: React.ForwardRefExoticComponent, "children" | "dangerouslySetInnerHTML" | keyof CheckboxOwnProps> & React.RefAttributes>;