/** * Copyright 2020, SumUp Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import { type FieldsetHTMLAttributes, type HTMLAttributes, type LabelHTMLAttributes } from 'react'; /** * The sizes supported by the Field component. * @default: 'm'. */ export type FieldSize = 's' | 'm'; interface FieldWrapperProps extends HTMLAttributes { /** * Trigger disabled styles on the component. */ disabled?: boolean; /** * The size of the Field component. */ size?: FieldSize; } /** * @private */ export declare const FieldWrapper: import("react").ForwardRefExoticComponent>; interface FieldSetProps extends FieldsetHTMLAttributes { /** * The size of the Field component. */ size?: FieldSize; } /** * @private */ export declare const FieldSet: import("react").ForwardRefExoticComponent>; interface FieldLabelProps extends LabelHTMLAttributes { /** * The identifier of the corresponding form element. */ htmlFor: string; } /** * @private */ export declare const FieldLabel: ({ className, htmlFor, ...props }: FieldLabelProps) => import("react/jsx-runtime").JSX.Element; type FieldLegendProps = HTMLAttributes; export declare const FieldLegend: ({ className, ...props }: FieldLegendProps) => import("react/jsx-runtime").JSX.Element; interface FieldLabelTextProps { /** * A clear and concise description of the input purpose. */ label: string; /** * Label to indicate that the input is optional. Only displayed when the * `required` prop is falsy. */ optionalLabel?: string; /** * Visually hide the label. This should only be used in rare cases and only * if the purpose of the field can be inferred from other context. */ hideLabel?: boolean; /** * The `optionalLabel` is only shown when the input is not required. */ required?: boolean; } /** * @private */ export declare function FieldLabelText({ label, hideLabel, optionalLabel, required, ...props }: FieldLabelTextProps): import("react/jsx-runtime").JSX.Element; interface FieldDescriptionProps extends HTMLAttributes { validationHint?: string; } /** * @private */ export declare const FieldDescription: ({ className, ...props }: FieldDescriptionProps) => import("react/jsx-runtime").JSX.Element; interface FieldValidationHintProps extends HTMLAttributes { validationHint?: string; disabled?: boolean; invalid?: boolean; hasWarning?: boolean; showValid?: boolean; } /** * @private */ export declare const FieldValidationHint: ({ validationHint, className, hasWarning, showValid, invalid, disabled, ...props }: FieldValidationHintProps) => import("react/jsx-runtime").JSX.Element; export {};