2021-12-07 15:07:21 +00:00
|
|
|
/**
|
|
|
|
* Internal dependencies
|
|
|
|
*/
|
2024-09-03 09:20:46 +00:00
|
|
|
import { SelectProps } from '../select';
|
2021-12-07 15:07:21 +00:00
|
|
|
import { countries } from './stories/countries-filler';
|
|
|
|
|
2024-09-03 09:20:46 +00:00
|
|
|
export interface CountryInputProps extends Omit< SelectProps, 'options' > {
|
2021-12-07 15:07:21 +00:00
|
|
|
/**
|
|
|
|
* Classes to assign to the wrapper component of the input
|
|
|
|
*/
|
2021-06-17 08:35:24 +00:00
|
|
|
className?: string;
|
2021-12-07 15:07:21 +00:00
|
|
|
/**
|
|
|
|
* Whether input elements can by default have their values automatically completed by the browser.
|
|
|
|
*
|
2024-09-03 09:20:46 +00:00
|
|
|
* This value gets assigned to both the wrapper `Select` and the wrapped input element.
|
2021-12-07 15:07:21 +00:00
|
|
|
*/
|
2024-05-21 08:48:24 +00:00
|
|
|
autoComplete?: string | undefined;
|
2021-06-17 08:35:24 +00:00
|
|
|
}
|
|
|
|
|
2021-12-07 15:07:21 +00:00
|
|
|
export interface CountryInputWithCountriesProps extends CountryInputProps {
|
|
|
|
/**
|
|
|
|
* List of countries to allow in the selection
|
|
|
|
*
|
|
|
|
* Object shape should be: `{ [Alpha-2 Country Code]: 'Full country name' }`
|
|
|
|
*/
|
|
|
|
countries: Partial< typeof countries >;
|
|
|
|
}
|