UNPKG

@engie-group/fluid-design-system-react

Version:

Fluid Design System React

38 lines (37 loc) 1.84 kB
import React from 'react'; import { ICommonFormItemProps } from '../../form-item/NJFormItem'; import { NJSelectItemProps } from '../item/NJSelectItem'; export type NJSelectRootProps = Omit<ICommonFormItemProps, 'onChange' | 'id' | 'value'> & Omit<React.ComponentPropsWithoutRef<'button'>, 'size' | 'value'> & { /** * Instructions on how to navigate the list. It is appended after the input label. * @example "Use up and down arrows and Enter to select a value" */ listNavigationLabel: string; /** * Default button label when no value is selected. It is appended after the input label. * @example "Select a value" */ buttonDefaultValueLabel: string; children: React.ReactElement<NJSelectItemProps> | React.ReactElement<NJSelectItemProps>[]; initialValue?: string | null; onChange?: (newValue?: string | null) => void; readOnly?: boolean; value?: string | null; }; export declare const NJSelectRoot: React.ForwardRefExoticComponent<Omit<ICommonFormItemProps, "id" | "onChange" | "value"> & Omit<Omit<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "size" | "value"> & { /** * Instructions on how to navigate the list. It is appended after the input label. * @example "Use up and down arrows and Enter to select a value" */ listNavigationLabel: string; /** * Default button label when no value is selected. It is appended after the input label. * @example "Select a value" */ buttonDefaultValueLabel: string; children: React.ReactElement<NJSelectItemProps> | React.ReactElement<NJSelectItemProps>[]; initialValue?: string | null; onChange?: (newValue?: string | null) => void; readOnly?: boolean; value?: string | null; } & React.RefAttributes<HTMLInputElement>>;