/*! * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved. * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (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 { ReactElement } from "react"; import { FieldComponentProps } from "./FieldComponentProps.js"; import { HtmlProps } from "./HtmlProps.js"; export declare const fieldTypeValues: readonly ["single", "group"]; export type RenderFieldComponentProps = { ariaDescribedBy?: string; dataSe?: string; errorMessageElementId?: string; id: string; isReadOnly?: boolean; labelElementId: string; }; export type FieldProps = { /** * If `error` is not undefined, the `input` will indicate an error. */ errorMessageList?: string[]; /** * Controls how ARIA attributes are applied to the field container. * - If `'single'`, use when the field wraps a single control such as a text input. * - If `'group'`, use when the field wraps multiple controls such as a radio or checkbox group. */ fieldType: (typeof fieldTypeValues)[number]; /** * If `true`, the field label is visible. If `false`, the label is visually hidden but remains accessible to screen readers. */ hasVisibleLabel: boolean; /** * If `true`, child inputs inherit the group error state. Required for CheckboxGroup to propagate validity. */ isCheckboxGroup?: boolean; /** * If `true`, narrows the fieldset ARIA role to `"radiogroup"`. */ isRadioGroup?: boolean; /** * The label for the `input` element. */ label: string; /** * The short hint displayed in the `input` before the user enters a value. */ placeholder?: string; /** * Render-props function that sends back ARIA props to your field component. */ renderFieldComponent: ({ ariaDescribedBy, dataSe, errorMessageElementId, id, labelElementId, isReadOnly, }: RenderFieldComponentProps) => ReactElement; }; declare const MemoizedField: import("react").MemoExoticComponent<({ ariaDescribedBy, errorMessage, errorMessageList, fieldType, hasVisibleLabel, hint, HintLinkComponent, id: idOverride, isDisabled: isDisabledProp, isFullWidth, isRadioGroup, isOptional, isReadOnly, label, renderFieldComponent, }: FieldProps & Pick & Pick) => import("@emotion/react/jsx-runtime").JSX.Element>; export { MemoizedField as Field }; //# sourceMappingURL=Field.d.ts.map