import type { ReactNode } from 'react'; import React from 'react'; import type { RenderProps } from '../../util/utility-types'; import type { Status } from '../../util/variant-types'; type FieldsetSharedProps = { /** * Indicates disabled state of the input. */ isDisabled?: boolean; /** * Status for the field state * * **Default is `"default"`**. */ status?: 'default' | Extract; }; type FieldsetProps = { /** * The contents of the fieldset. We suggest a Fieldset.Legend followed by * interactive elements within Fieldset.Items. */ children: ReactNode; /** * Additional classnames passed in for styling. */ className?: string; /** * Text under the component used to provide a description or error message to describe the state. */ fieldNote?: ReactNode; } & FieldsetSharedProps & React.HTMLAttributes; type FieldsetItemsProps = { /** * Type of element the immediate wrapper around the contents should be. * * **Default is `"div"`**. */ as?: string | React.ElementType; /** * Additional classnames passed in for styling. */ className?: string; } & RenderProps; type FieldsetLegendProps = { /** * CSS class names that can be appended to the component. */ className?: string; /** * Indicates that field is required for form to be successfully submitted */ required?: boolean; /** * Whether it should show the field hint or not * * **Default is `"false"`**. */ showHint?: boolean; /** * Secondary text used to describe the content in more detail */ subTitle?: string; /** * The title/heading of the component */ title?: string; } & FieldsetSharedProps; /** * `import {Fieldset} from "@chanzuckerberg/eds";` * * A reusable container for a fieldset that includes a legend and * one or more form inputs, like radio buttons or checkboxes. */ export declare function Fieldset({ children, className, fieldNote, isDisabled, status, }: FieldsetProps): React.JSX.Element; export declare namespace Fieldset { var displayName: string; var Items: { ({ children, as: Component, className, ...other }: FieldsetItemsProps): React.JSX.Element; displayName: string; }; var Legend: { ({ className, isDisabled: _, required, showHint, subTitle, title, ...other }: FieldsetLegendProps): React.JSX.Element; displayName: string; }; } /** * Helper sub-component for styling the control elements in the component. */ export declare const FieldsetItems: { ({ children, as: Component, className, ...other }: FieldsetItemsProps): React.JSX.Element; displayName: string; }; export {};