/*! * * Copyright (c) "Neo4j" * Neo4j Sweden AB [http://neo4j.com] * * This file is part of Neo4j. * * Neo4j is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ import type React from 'react'; import { type FormFieldGroupContextValue } from '../_common/form-control'; import { type CommonProps } from '../_common/types'; type FieldsetProps = { /** The accessible label displayed in the fieldset legend */ label: React.ReactNode; /** The controls grouped by the fieldset */ children: React.ReactNode; /** Assistive text displayed below the grouped controls */ helpText?: React.ReactNode; /** Error message displayed below the grouped controls. When provided, it replaces `helpText` */ errorText?: React.ReactNode; /** Whether the grouped field is required */ isRequired?: boolean; /** Whether Required or Optional is shown at the end of the legend row */ hasRequiredIndicator?: boolean; /** Whether the legend is clipped out of the layout, leaving it to screen readers only */ hasVisuallyHiddenLabel?: boolean; /** Whether all native form controls in the fieldset are disabled */ isDisabled?: boolean; }; type FieldsetBaseProps = FieldsetProps & { fieldGroup?: Pick; orientation?: 'horizontal' | 'vertical'; }; declare const FieldsetBase: ({ label, children, helpText, errorText, isRequired, hasRequiredIndicator, hasVisuallyHiddenLabel, isDisabled, fieldGroup, orientation, className, style, htmlAttributes, ref, ...restProps }: CommonProps<"fieldset", FieldsetBaseProps>) => import("react/jsx-runtime").JSX.Element; /** * Groups related form controls under a native fieldset and legend. * * @remarks * Use `RadioGroup` or `CheckboxGroup` when the children are exclusively * radios or checkboxes and should inherit shared group attributes. */ declare const Fieldset: { (props: CommonProps<"fieldset", FieldsetProps>): import("react/jsx-runtime").JSX.Element; displayName: string; }; export { Fieldset, FieldsetBase, type FieldsetProps }; //# sourceMappingURL=Fieldset.d.ts.map