import * as solid_js from 'solid-js'; import { Accessor, JSX, ValidComponent } from 'solid-js'; import { F as FormControlDataSet, e as FormControlDescriptionProps, c as FormControlDescriptionCommonProps, d as FormControlDescriptionRenderProps } from './form-control-description-330657bc.js'; import { ElementOf, PolymorphicProps } from './polymorphic/index.js'; import { d as FormControlErrorMessageProps, b as FormControlErrorMessageCommonProps, c as FormControlErrorMessageRenderProps } from './form-control-error-message-9efcbea8.js'; import { a as FormControlLabelOptions, b as FormControlLabelCommonProps, c as FormControlLabelRenderProps } from './form-control-label-2a5ca7a3.js'; import { ValidationState } from '@kobalte/utils'; interface CheckboxDataSet { "data-checked": string | undefined; "data-indeterminate": string | undefined; } interface CheckboxContextValue { value: Accessor; dataset: Accessor; checked: Accessor; indeterminate: Accessor; inputRef: Accessor; generateId: (part: string) => string; toggle: () => void; setIsChecked: (isChecked: boolean) => void; setIsFocused: (isFocused: boolean) => void; setInputRef: (el: HTMLInputElement) => void; } declare function useCheckboxContext(): CheckboxContextValue; interface CheckboxControlOptions { } interface CheckboxControlCommonProps { id: string; onClick: JSX.EventHandlerUnion; onKeyDown: JSX.EventHandlerUnion; } interface CheckboxControlRenderProps extends CheckboxControlCommonProps, FormControlDataSet, CheckboxDataSet { } type CheckboxControlProps = CheckboxControlOptions & Partial>>; /** * The element that visually represents a checkbox. */ declare function CheckboxControl(props: PolymorphicProps>): JSX.Element; interface CheckboxDescriptionOptions extends FormControlDescriptionProps { } interface CheckboxDescriptionCommonProps extends FormControlDescriptionCommonProps { } interface CheckboxDescriptionRenderProps extends CheckboxDescriptionCommonProps, CheckboxDataSet, FormControlDescriptionRenderProps { } type CheckboxDescriptionProps = CheckboxDescriptionOptions & Partial>>; /** * The description that gives the user more information on the checkbox. */ declare function CheckboxDescription(props: PolymorphicProps>): solid_js.JSX.Element; interface CheckboxErrorMessageOptions extends FormControlErrorMessageProps { } interface CheckboxErrorMessageCommonProps extends FormControlErrorMessageCommonProps { } interface CheckboxErrorMessageRenderProps extends CheckboxErrorMessageCommonProps, CheckboxDataSet, FormControlErrorMessageRenderProps { } type CheckboxErrorMessageProps = CheckboxErrorMessageOptions & Partial>>; /** * The error message that gives the user information about how to fix a validation error on the checkbox. */ declare function CheckboxErrorMessage(props: PolymorphicProps>): solid_js.JSX.Element; interface CheckboxIndicatorOptions { /** * Used to force mounting when more control is needed. * Useful when controlling animation with SolidJS animation libraries. */ forceMount?: boolean; } interface CheckboxIndicatorCommonProps { id: string; ref: T | ((el: T) => void); } interface CheckboxIndicatorRenderProps extends CheckboxIndicatorCommonProps, FormControlDataSet, CheckboxDataSet { } type CheckboxIndicatorProps = CheckboxIndicatorOptions & Partial>>; /** * The visual indicator rendered when the checkbox is in a checked or indeterminate state. * You can style this element directly, or you can use it as a wrapper to put an icon into, or both. */ declare function CheckboxIndicator(props: PolymorphicProps>): solid_js.JSX.Element; interface CheckboxInputOptions { } interface CheckboxInputCommonProps { id: string; ref: T | ((el: T) => void); style: JSX.CSSProperties | string; onChange: JSX.EventHandlerUnion; onFocus: JSX.FocusEventHandlerUnion; onBlur: JSX.FocusEventHandlerUnion; "aria-label": string | undefined; "aria-labelledby": string | undefined; "aria-describedby": string | undefined; } interface CheckboxInputRenderProps extends CheckboxInputCommonProps, FormControlDataSet, CheckboxDataSet { type: "checkbox"; name: string; value: string; checked: boolean; required: boolean | undefined; disabled: boolean | undefined; readonly: boolean | undefined; "aria-invalid": boolean | undefined; "aria-required": boolean | undefined; "aria-disabled": boolean | undefined; "aria-readonly": boolean | undefined; } type CheckboxInputProps = CheckboxInputOptions & Partial>>; /** * The native html input that is visually hidden in the checkbox. */ declare function CheckboxInput(props: PolymorphicProps>): JSX.Element; interface CheckboxLabelOptions extends FormControlLabelOptions { } interface CheckboxLabelCommonProps extends FormControlLabelCommonProps { } interface CheckboxLabelRenderProps extends CheckboxLabelCommonProps, FormControlLabelRenderProps, CheckboxDataSet { } type CheckboxLabelProps = CheckboxLabelOptions & Partial>>; /** * The label that gives the user information on the checkbox. */ declare function CheckboxLabel(props: PolymorphicProps>): solid_js.JSX.Element; interface CheckboxRootState { /** Whether the checkbox is checked or not. */ checked: Accessor; /** Whether the checkbox is in an indeterminate state. */ indeterminate: Accessor; } interface CheckboxRootOptions { /** The controlled checked state of the checkbox. */ checked?: boolean; /** * The default checked state when initially rendered. * Useful when you do not need to control the checked state. */ defaultChecked?: boolean; /** Event handler called when the checked state of the checkbox changes. */ onChange?: (checked: boolean) => void; /** * Whether the checkbox is in an indeterminate state. * Indeterminism is presentational only. * The indeterminate visual representation remains regardless of user interaction. */ indeterminate?: boolean; /** * The value of the checkbox, used when submitting an HTML form. * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefvalue). */ value?: string; /** * The name of the checkbox, used when submitting an HTML form. * See [MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#htmlattrdefname). */ name?: string; /** Whether the checkbox should display its "valid" or "invalid" visual styling. */ validationState?: ValidationState; /** Whether the user must check the checkbox before the owning form can be submitted. */ required?: boolean; /** Whether the checkbox is disabled. */ disabled?: boolean; /** Whether the checkbox is read only. */ readOnly?: boolean; /** * The children of the checkbox. * Can be a `JSX.Element` or a _render prop_ for having access to the internal state. */ children?: JSX.Element | ((state: CheckboxRootState) => JSX.Element); } interface CheckboxRootCommonProps { id: string; ref: T | ((el: T) => void); onPointerDown: JSX.EventHandlerUnion; } type CheckboxRootProps = CheckboxRootOptions & Partial>>; /** * A control that allows the user to toggle between checked and not checked. */ declare function CheckboxRoot(props: PolymorphicProps>): JSX.Element; declare const Checkbox: typeof CheckboxRoot & { Control: typeof CheckboxControl; Description: typeof CheckboxDescription; ErrorMessage: typeof CheckboxErrorMessage; Indicator: typeof CheckboxIndicator; Input: typeof CheckboxInput; Label: typeof CheckboxLabel; }; declare const index_Checkbox: typeof Checkbox; type index_CheckboxContextValue = CheckboxContextValue; type index_CheckboxControlCommonProps = CheckboxControlCommonProps; type index_CheckboxControlOptions = CheckboxControlOptions; type index_CheckboxControlProps = CheckboxControlProps; type index_CheckboxControlRenderProps = CheckboxControlRenderProps; type index_CheckboxDescriptionCommonProps = CheckboxDescriptionCommonProps; type index_CheckboxDescriptionOptions = CheckboxDescriptionOptions; type index_CheckboxDescriptionProps = CheckboxDescriptionProps; type index_CheckboxDescriptionRenderProps = CheckboxDescriptionRenderProps; type index_CheckboxErrorMessageCommonProps = CheckboxErrorMessageCommonProps; type index_CheckboxErrorMessageOptions = CheckboxErrorMessageOptions; type index_CheckboxErrorMessageProps = CheckboxErrorMessageProps; type index_CheckboxErrorMessageRenderProps = CheckboxErrorMessageRenderProps; type index_CheckboxIndicatorCommonProps = CheckboxIndicatorCommonProps; type index_CheckboxIndicatorOptions = CheckboxIndicatorOptions; type index_CheckboxIndicatorProps = CheckboxIndicatorProps; type index_CheckboxIndicatorRenderProps = CheckboxIndicatorRenderProps; type index_CheckboxInputCommonProps = CheckboxInputCommonProps; type index_CheckboxInputOptions = CheckboxInputOptions; type index_CheckboxInputProps = CheckboxInputProps; type index_CheckboxInputRenderProps = CheckboxInputRenderProps; type index_CheckboxLabelCommonProps = CheckboxLabelCommonProps; type index_CheckboxLabelOptions = CheckboxLabelOptions; type index_CheckboxLabelProps = CheckboxLabelProps; type index_CheckboxLabelRenderProps = CheckboxLabelRenderProps; type index_CheckboxRootOptions = CheckboxRootOptions; type index_CheckboxRootProps = CheckboxRootProps; declare const index_useCheckboxContext: typeof useCheckboxContext; declare namespace index { export { index_Checkbox as Checkbox, index_CheckboxContextValue as CheckboxContextValue, index_CheckboxControlCommonProps as CheckboxControlCommonProps, index_CheckboxControlOptions as CheckboxControlOptions, index_CheckboxControlProps as CheckboxControlProps, index_CheckboxControlRenderProps as CheckboxControlRenderProps, index_CheckboxDescriptionCommonProps as CheckboxDescriptionCommonProps, index_CheckboxDescriptionOptions as CheckboxDescriptionOptions, index_CheckboxDescriptionProps as CheckboxDescriptionProps, index_CheckboxDescriptionRenderProps as CheckboxDescriptionRenderProps, index_CheckboxErrorMessageCommonProps as CheckboxErrorMessageCommonProps, index_CheckboxErrorMessageOptions as CheckboxErrorMessageOptions, index_CheckboxErrorMessageProps as CheckboxErrorMessageProps, index_CheckboxErrorMessageRenderProps as CheckboxErrorMessageRenderProps, index_CheckboxIndicatorCommonProps as CheckboxIndicatorCommonProps, index_CheckboxIndicatorOptions as CheckboxIndicatorOptions, index_CheckboxIndicatorProps as CheckboxIndicatorProps, index_CheckboxIndicatorRenderProps as CheckboxIndicatorRenderProps, index_CheckboxInputCommonProps as CheckboxInputCommonProps, index_CheckboxInputOptions as CheckboxInputOptions, index_CheckboxInputProps as CheckboxInputProps, index_CheckboxInputRenderProps as CheckboxInputRenderProps, index_CheckboxLabelCommonProps as CheckboxLabelCommonProps, index_CheckboxLabelOptions as CheckboxLabelOptions, index_CheckboxLabelProps as CheckboxLabelProps, index_CheckboxLabelRenderProps as CheckboxLabelRenderProps, index_CheckboxRootOptions as CheckboxRootOptions, index_CheckboxRootProps as CheckboxRootProps, CheckboxControl as Control, CheckboxDescription as Description, CheckboxErrorMessage as ErrorMessage, CheckboxIndicator as Indicator, CheckboxInput as Input, CheckboxLabel as Label, CheckboxRoot as Root, index_useCheckboxContext as useCheckboxContext, }; } export { CheckboxControl as A, CheckboxDescription as B, CheckboxControlOptions as C, CheckboxErrorMessage as D, CheckboxIndicator as E, CheckboxInput as F, CheckboxLabel as G, CheckboxRoot as H, Checkbox as I, useCheckboxContext as J, CheckboxContextValue as K, CheckboxControlCommonProps as a, CheckboxControlRenderProps as b, CheckboxControlProps as c, CheckboxDescriptionOptions as d, CheckboxDescriptionCommonProps as e, CheckboxDescriptionRenderProps as f, CheckboxDescriptionProps as g, CheckboxErrorMessageOptions as h, index as i, CheckboxErrorMessageCommonProps as j, CheckboxErrorMessageRenderProps as k, CheckboxErrorMessageProps as l, CheckboxIndicatorOptions as m, CheckboxIndicatorCommonProps as n, CheckboxIndicatorRenderProps as o, CheckboxIndicatorProps as p, CheckboxInputOptions as q, CheckboxInputCommonProps as r, CheckboxInputRenderProps as s, CheckboxInputProps as t, CheckboxLabelOptions as u, CheckboxLabelCommonProps as v, CheckboxLabelRenderProps as w, CheckboxLabelProps as x, CheckboxRootOptions as y, CheckboxRootProps as z };