/** * Copyright 2019, 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 } from 'react'; import { type SelectorProps, type SelectorSize } from '../Selector/index.js'; export interface SelectorGroupProps extends Omit, 'onChange'> { /** * A collection of available options. Each option must have at least * a value and label. */ options: Omit[]; /** * A callback that is called when any of the inputs change their values. * Passed on to the Selectors. */ onChange?: SelectorProps['onChange']; /** * The value of the currently checked options. */ value?: string | string[]; /** * The value of the initially checked options. */ defaultValue?: string | string[]; /** * A description of the selector group. */ label: string; /** * A unique name for the selector group. */ name?: string; /** * Whether the user can select multiple options. */ multiple?: boolean; /** * Size of the Selectors within the group. Default: 'm'. */ size?: SelectorSize; /** * Whether the group should take the whole width available. Defaults to true. */ stretch?: boolean; /** * 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; /** * Label to indicate that the input is optional. Only displayed when the * `required` prop is falsy. */ optionalLabel?: string; /** * Marks the input group as required. */ required?: boolean; /** * An information, warning or error message, displayed below the input. */ validationHint?: string; /** * Marks the inputs as invalid. */ invalid?: boolean; } /** * A group of Selectors. */ export declare const SelectorGroup: import("react").ForwardRefExoticComponent>;