react-country-kit 1.0.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +51 -221
- package/dist/components/CountryMultiSelect/CountryMultiSelect.d.ts +2 -2
- package/dist/components/CountryPicker/CountryPicker.d.ts +2 -2
- package/dist/components/CurrencyMultiSelect/CurrencyMultiSelect.d.ts +2 -2
- package/dist/components/CurrencyPicker/CurrencyPicker.d.ts +2 -2
- package/dist/components/DivisionPicker/DivisionPicker.d.ts +2 -2
- package/dist/components/LanguagePicker/LanguagePicker.d.ts +2 -2
- package/dist/components/PhoneInput/PhoneInput.d.ts +2 -2
- package/dist/components/TimezonePicker/TimezonePicker.d.ts +2 -2
- package/dist/components/shared/Flag.d.ts +15 -0
- package/dist/components/shared/PickerBase.d.ts +2 -1
- package/dist/index.d.ts +1 -13
- package/dist/react-country-kit.cjs.js +1 -1
- package/dist/react-country-kit.cjs.js.map +1 -1
- package/dist/react-country-kit.d.ts +1 -354
- package/dist/react-country-kit.es.js +354 -362
- package/dist/react-country-kit.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/ui/components/CountryMultiSelect.d.ts +2 -1
- package/dist/ui/components/CountryPicker.d.ts +2 -1
- package/dist/ui/components/CurrencyMultiSelect.d.ts +2 -1
- package/dist/ui/components/CurrencyPicker.d.ts +2 -1
- package/dist/ui/components/DivisionPicker.d.ts +2 -1
- package/dist/ui/components/LanguagePicker.d.ts +2 -1
- package/dist/ui/components/PhoneInput.d.ts +3 -3
- package/dist/ui/components/TimezonePicker.d.ts +2 -1
- package/dist/ui/components/primitives.d.ts +11 -1
- package/dist/ui/index.d.ts +12 -12
- package/dist/ui/lib/utils.d.ts +2 -1
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.cjs.js.map +1 -1
- package/dist/ui.d.ts +1 -413
- package/dist/ui.es.js +370 -350
- package/dist/ui.es.js.map +1 -1
- package/package.json +11 -2
- package/dist/data/countries.d.ts +0 -10
- package/dist/data/languages.d.ts +0 -3
- package/dist/hooks/useBasePicker.d.ts +0 -6
- package/dist/hooks/useCountryPicker.d.ts +0 -2
- package/dist/hooks/useCurrencyPicker.d.ts +0 -2
- package/dist/hooks/useDivisionPicker.d.ts +0 -2
- package/dist/hooks/useLanguagePicker.d.ts +0 -2
- package/dist/hooks/useMultiSelect.d.ts +0 -6
- package/dist/hooks/usePhoneInput.d.ts +0 -17
- package/dist/hooks/useTimezonePicker.d.ts +0 -2
- package/dist/types/index.d.ts +0 -185
- package/dist/useTimezonePicker-BMFPsn3E.mjs +0 -36086
- package/dist/useTimezonePicker-BMFPsn3E.mjs.map +0 -1
- package/dist/useTimezonePicker-zHCM2pUC.js +0 -2
- package/dist/useTimezonePicker-zHCM2pUC.js.map +0 -1
- package/dist/utils/countries.d.ts +0 -46
- package/dist/utils/currencies.d.ts +0 -13
- package/dist/utils/languages.d.ts +0 -13
- package/dist/utils/timezones.d.ts +0 -13
package/dist/ui.d.ts
CHANGED
|
@@ -1,413 +1 @@
|
|
|
1
|
-
|
|
2
|
-
import { default as default_2 } from 'react';
|
|
3
|
-
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
4
|
-
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
5
|
-
|
|
6
|
-
export declare const Badge: {
|
|
7
|
-
({ children, className }: {
|
|
8
|
-
children: default_2.ReactNode;
|
|
9
|
-
className?: string;
|
|
10
|
-
}): JSX_2.Element;
|
|
11
|
-
displayName: string;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
export declare const CheckIcon: {
|
|
15
|
-
({ className }: {
|
|
16
|
-
className?: string;
|
|
17
|
-
}): JSX_2.Element;
|
|
18
|
-
displayName: string;
|
|
19
|
-
};
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Merges Tailwind CSS classes safely, resolving conflicts.
|
|
23
|
-
* Re-exported from react-country-kit/ui for consumer convenience.
|
|
24
|
-
*/
|
|
25
|
-
export declare function cn(...inputs: ClassValue[]): string;
|
|
26
|
-
|
|
27
|
-
export declare const CommandEmpty: default_2.ForwardRefExoticComponent<default_2.HTMLAttributes<HTMLDivElement> & default_2.RefAttributes<HTMLDivElement>>;
|
|
28
|
-
|
|
29
|
-
export declare const CommandInput: default_2.ForwardRefExoticComponent<CommandInputProps & default_2.RefAttributes<HTMLInputElement>>;
|
|
30
|
-
|
|
31
|
-
declare interface CommandInputProps extends Omit<default_2.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
32
|
-
onValueChange?: (value: string) => void;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export declare const CommandItem: default_2.ForwardRefExoticComponent<CommandItemProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
36
|
-
|
|
37
|
-
declare interface CommandItemProps extends default_2.HTMLAttributes<HTMLDivElement> {
|
|
38
|
-
/** Called when the item is clicked or activated via keyboard Enter. */
|
|
39
|
-
onSelect?: () => void;
|
|
40
|
-
disabled?: boolean;
|
|
41
|
-
selected?: boolean;
|
|
42
|
-
/** Kept for API compatibility; not used internally. */
|
|
43
|
-
value?: string;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export declare const CommandList: default_2.ForwardRefExoticComponent<default_2.HTMLAttributes<HTMLDivElement> & default_2.RefAttributes<HTMLDivElement>>;
|
|
47
|
-
|
|
48
|
-
/** Wrapper that groups search input + scrollable list. */
|
|
49
|
-
export declare const CommandRoot: default_2.ForwardRefExoticComponent<default_2.HTMLAttributes<HTMLDivElement> & default_2.RefAttributes<HTMLDivElement>>;
|
|
50
|
-
|
|
51
|
-
export declare interface Country {
|
|
52
|
-
name: string;
|
|
53
|
-
iso2: string;
|
|
54
|
-
iso3: string;
|
|
55
|
-
phone_code: string;
|
|
56
|
-
phone_format: PhoneFormat;
|
|
57
|
-
currency: Currency;
|
|
58
|
-
division_type: string;
|
|
59
|
-
divisions: Division[];
|
|
60
|
-
timezones: Timezone[];
|
|
61
|
-
/** Emoji flag computed from iso2 */
|
|
62
|
-
flag: string;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export declare function CountryMultiSelect({ value, onChange, placeholder, maxItems, showFlags, searchable, disabled, className, label, }: CountryMultiSelectProps): JSX_2.Element;
|
|
66
|
-
|
|
67
|
-
export declare interface CountryMultiSelectProps {
|
|
68
|
-
value: Country[];
|
|
69
|
-
onChange: (countries: Country[]) => void;
|
|
70
|
-
placeholder?: string;
|
|
71
|
-
/** Maximum number of selections (undefined = unlimited) */
|
|
72
|
-
maxItems?: number;
|
|
73
|
-
showFlags?: boolean;
|
|
74
|
-
searchable?: boolean;
|
|
75
|
-
disabled?: boolean;
|
|
76
|
-
className?: string;
|
|
77
|
-
label?: string;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
export declare function CountryPicker({ value, onChange, placeholder, searchable, showFlag, showPhoneCode, disabled, className, label, }: CountryPickerProps): JSX_2.Element;
|
|
81
|
-
|
|
82
|
-
export declare interface CountryPickerProps {
|
|
83
|
-
/** Currently selected country */
|
|
84
|
-
value?: Country | null;
|
|
85
|
-
/** Callback when user selects a country */
|
|
86
|
-
onChange: (country: Country) => void;
|
|
87
|
-
placeholder?: string;
|
|
88
|
-
/** Enable search input */
|
|
89
|
-
searchable?: boolean;
|
|
90
|
-
/** Show emoji flag next to country name */
|
|
91
|
-
showFlag?: boolean;
|
|
92
|
-
/** Show phone dial code */
|
|
93
|
-
showPhoneCode?: boolean;
|
|
94
|
-
/** Disable the picker */
|
|
95
|
-
disabled?: boolean;
|
|
96
|
-
/** Additional wrapper class */
|
|
97
|
-
className?: string;
|
|
98
|
-
/** aria-label */
|
|
99
|
-
label?: string;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
export declare interface Currency {
|
|
103
|
-
code: string;
|
|
104
|
-
name: string;
|
|
105
|
-
symbol: string;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
export declare function CurrencyMultiSelect({ value, onChange, placeholder, maxItems, showSymbol, searchable, disabled, className, label, }: CurrencyMultiSelectProps): JSX_2.Element;
|
|
109
|
-
|
|
110
|
-
export declare interface CurrencyMultiSelectProps {
|
|
111
|
-
value: Currency[];
|
|
112
|
-
onChange: (currencies: Currency[]) => void;
|
|
113
|
-
placeholder?: string;
|
|
114
|
-
maxItems?: number;
|
|
115
|
-
showSymbol?: boolean;
|
|
116
|
-
searchable?: boolean;
|
|
117
|
-
disabled?: boolean;
|
|
118
|
-
className?: string;
|
|
119
|
-
label?: string;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
export declare function CurrencyPicker({ value, onChange, placeholder, searchable, showSymbol, countryIso2, autoSelect, disabled, className, label, }: CurrencyPickerProps): JSX_2.Element;
|
|
123
|
-
|
|
124
|
-
export declare interface CurrencyPickerProps {
|
|
125
|
-
value?: Currency | null;
|
|
126
|
-
onChange: (currency: Currency) => void;
|
|
127
|
-
placeholder?: string;
|
|
128
|
-
searchable?: boolean;
|
|
129
|
-
/** Filter currencies to a specific country (iso2) and enable auto-selection */
|
|
130
|
-
countryIso2?: string;
|
|
131
|
-
/** Auto-select the first currency if countryIso2 is provided. Defaults to true if countryIso2 is present and value is empty. */
|
|
132
|
-
autoSelect?: boolean;
|
|
133
|
-
/** Show currency symbol alongside code */
|
|
134
|
-
showSymbol?: boolean;
|
|
135
|
-
disabled?: boolean;
|
|
136
|
-
className?: string;
|
|
137
|
-
label?: string;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
export declare interface Division {
|
|
141
|
-
name: string;
|
|
142
|
-
iso2: string;
|
|
143
|
-
timezone: string;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
export declare function DivisionPicker({ countryIso2, value, onChange, placeholder, searchable, disabled, className, label, }: DivisionPickerProps): JSX_2.Element;
|
|
147
|
-
|
|
148
|
-
export declare interface DivisionPickerProps {
|
|
149
|
-
/** ISO2 code of the parent country (required) */
|
|
150
|
-
countryIso2: string;
|
|
151
|
-
value?: Division | null;
|
|
152
|
-
onChange: (division: Division) => void;
|
|
153
|
-
placeholder?: string;
|
|
154
|
-
searchable?: boolean;
|
|
155
|
-
disabled?: boolean;
|
|
156
|
-
className?: string;
|
|
157
|
-
label?: string;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
/**
|
|
161
|
-
* Returns all countries
|
|
162
|
-
*/
|
|
163
|
-
export declare function getAllCountries(): Country[];
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* Returns all unique currencies across all countries
|
|
167
|
-
*/
|
|
168
|
-
export declare function getAllCurrencies(): Currency[];
|
|
169
|
-
|
|
170
|
-
/**
|
|
171
|
-
* Returns all languages
|
|
172
|
-
*/
|
|
173
|
-
export declare function getAllLanguages(): Language[];
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* Returns all unique timezones across all countries
|
|
177
|
-
*/
|
|
178
|
-
export declare function getAllTimezones(): Timezone[];
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* Find a country by its ISO2 code (case-insensitive)
|
|
182
|
-
*/
|
|
183
|
-
export declare function getCountryByIso2(iso2: string): Country | undefined;
|
|
184
|
-
|
|
185
|
-
/**
|
|
186
|
-
* Find a country by its ISO3 code (case-insensitive)
|
|
187
|
-
*/
|
|
188
|
-
export declare function getCountryByIso3(iso3: string): Country | undefined;
|
|
189
|
-
|
|
190
|
-
/**
|
|
191
|
-
* Find a country by its name (partial, case-insensitive)
|
|
192
|
-
*/
|
|
193
|
-
export declare function getCountryByName(name: string): Country | undefined;
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Find a currency by its code (e.g. "USD")
|
|
197
|
-
*/
|
|
198
|
-
export declare function getCurrencyByCode(code: string): Currency | undefined;
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* Get the currency of a country
|
|
202
|
-
*/
|
|
203
|
-
export declare function getCurrencyByCountry(iso2: string): Currency | undefined;
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* Get all divisions for a country
|
|
207
|
-
*/
|
|
208
|
-
export declare function getDivisionsByCountry(iso2: string): Division[];
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Find a language by its BCP-47 code
|
|
212
|
-
*/
|
|
213
|
-
export declare function getLanguageByCode(code: string): Language | undefined;
|
|
214
|
-
|
|
215
|
-
/**
|
|
216
|
-
* Find a timezone by its IANA name (e.g. "America/New_York")
|
|
217
|
-
*/
|
|
218
|
-
export declare function getTimezoneByName(name: string): Timezone | undefined;
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* Get all timezones for a country
|
|
222
|
-
*/
|
|
223
|
-
export declare function getTimezonesByCountry(iso2: string): Timezone[];
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Auto-generated country dataset — DO NOT EDIT MANUALLY.
|
|
227
|
-
* Source: https://raw.githubusercontent.com/kishormainali/country_division_database/refs/heads/main/countries.json
|
|
228
|
-
* Generated: 2026-04-19T05:48:30.758Z
|
|
229
|
-
* Countries: 250
|
|
230
|
-
*/
|
|
231
|
-
export declare function iso2ToFlag(iso2: string): string;
|
|
232
|
-
|
|
233
|
-
export declare interface Language {
|
|
234
|
-
code: string;
|
|
235
|
-
english_name: string;
|
|
236
|
-
native_name: string;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export declare function LanguagePicker({ value, onChange, placeholder, searchable, showNativeName, disabled, className, label, }: LanguagePickerProps): JSX_2.Element;
|
|
240
|
-
|
|
241
|
-
export declare interface LanguagePickerProps {
|
|
242
|
-
value?: Language | null;
|
|
243
|
-
onChange: (language: Language) => void;
|
|
244
|
-
placeholder?: string;
|
|
245
|
-
searchable?: boolean;
|
|
246
|
-
/** Show native language name alongside english name */
|
|
247
|
-
showNativeName?: boolean;
|
|
248
|
-
disabled?: boolean;
|
|
249
|
-
className?: string;
|
|
250
|
-
label?: string;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
export declare interface PhoneFormat {
|
|
254
|
-
countryCode?: string;
|
|
255
|
-
iso2: string;
|
|
256
|
-
dialCode: string;
|
|
257
|
-
patterns: string;
|
|
258
|
-
possibleLengths: string;
|
|
259
|
-
example: string | number;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
export declare const PhoneInput: default_2.ForwardRefExoticComponent<PhoneInputProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
263
|
-
|
|
264
|
-
export declare interface PhoneInputProps {
|
|
265
|
-
value?: PhoneValue | null;
|
|
266
|
-
onChange: (value: PhoneValue) => void;
|
|
267
|
-
/** Pre-select a country by ISO2 on first render */
|
|
268
|
-
defaultCountryIso2?: string;
|
|
269
|
-
placeholder?: string;
|
|
270
|
-
showFlag?: boolean;
|
|
271
|
-
disabled?: boolean;
|
|
272
|
-
className?: string;
|
|
273
|
-
label?: string;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
/**
|
|
277
|
-
* Value object returned by PhoneInput.
|
|
278
|
-
*/
|
|
279
|
-
export declare interface PhoneValue {
|
|
280
|
-
/** Full Country object of the selected country */
|
|
281
|
-
country: Country;
|
|
282
|
-
/** Dial code with + prefix, e.g. "+1" */
|
|
283
|
-
dialCode: string;
|
|
284
|
-
/** Raw phone number without dial code, e.g. "4155551234" */
|
|
285
|
-
number: string;
|
|
286
|
-
/** Full number with dial code, e.g. "+14155551234" */
|
|
287
|
-
full: string;
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
export declare const PickerTrigger: default_2.ForwardRefExoticComponent<PickerTriggerProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
291
|
-
|
|
292
|
-
declare interface PickerTriggerProps extends default_2.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
293
|
-
isOpen?: boolean;
|
|
294
|
-
hasValue?: boolean;
|
|
295
|
-
placeholder?: string;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
export declare const Popover: default_2.FC<PopoverPrimitive.PopoverProps>;
|
|
299
|
-
|
|
300
|
-
export declare const PopoverContent: default_2.ForwardRefExoticComponent<PopoverContentProps & default_2.RefAttributes<HTMLDivElement>>;
|
|
301
|
-
|
|
302
|
-
declare interface PopoverContentProps extends default_2.ComponentPropsWithoutRef<typeof PopoverPrimitive.Content> {
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
export declare const PopoverTrigger: default_2.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & default_2.RefAttributes<HTMLButtonElement>>;
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* Search countries by name, iso2, iso3 or phone code
|
|
309
|
-
*/
|
|
310
|
-
export declare function searchCountries(query: string): Country[];
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
* Search currencies by code, name, or symbol
|
|
314
|
-
*/
|
|
315
|
-
export declare function searchCurrencies(query: string, countryIso2?: string): Currency[];
|
|
316
|
-
|
|
317
|
-
/**
|
|
318
|
-
* Search languages by english name, native name, or code
|
|
319
|
-
*/
|
|
320
|
-
export declare function searchLanguages(query: string): Language[];
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* Search timezones by name, abbreviation, or offset string
|
|
324
|
-
*/
|
|
325
|
-
export declare function searchTimezones(query: string, countryIso2?: string): Timezone[];
|
|
326
|
-
|
|
327
|
-
export declare interface Timezone {
|
|
328
|
-
name: string;
|
|
329
|
-
offset: number;
|
|
330
|
-
offset_name: string;
|
|
331
|
-
abbreviation: string;
|
|
332
|
-
tzName: string;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
export declare function TimezonePicker({ value, onChange, placeholder, searchable, countryIso2, autoSelect, disabled, className, label, }: TimezonePickerProps): JSX_2.Element;
|
|
336
|
-
|
|
337
|
-
export declare interface TimezonePickerProps {
|
|
338
|
-
value?: Timezone | null;
|
|
339
|
-
onChange: (timezone: Timezone) => void;
|
|
340
|
-
placeholder?: string;
|
|
341
|
-
searchable?: boolean;
|
|
342
|
-
/** Filter timezones to a specific country (iso2) and enable auto-selection */
|
|
343
|
-
countryIso2?: string;
|
|
344
|
-
/** Auto-select the first timezone if countryIso2 is provided. Defaults to true if countryIso2 is present and value is empty. */
|
|
345
|
-
autoSelect?: boolean;
|
|
346
|
-
disabled?: boolean;
|
|
347
|
-
className?: string;
|
|
348
|
-
label?: string;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
export declare function useCountryPicker(initialValue?: Country | null, onChange?: (country: Country) => void): UsePickerReturn<Country>;
|
|
352
|
-
|
|
353
|
-
export declare function useCurrencyPicker(initialValue?: Currency | null, onChange?: (currency: Currency) => void): UsePickerReturn<Currency>;
|
|
354
|
-
|
|
355
|
-
export declare function useDivisionPicker(countryIso2: string, initialValue?: Division | null, onChange?: (division: Division) => void): UsePickerReturn<Division>;
|
|
356
|
-
|
|
357
|
-
export declare function useLanguagePicker(initialValue?: Language | null, onChange?: (language: Language) => void): UsePickerReturn<Language>;
|
|
358
|
-
|
|
359
|
-
/**
|
|
360
|
-
* Generic multi-selection hook.
|
|
361
|
-
* Handles open/close, search, and toggle-selection of multiple items.
|
|
362
|
-
*/
|
|
363
|
-
export declare function useMultiSelect<T>(allItems: T[], filterFn: (items: T[], query: string) => T[], keyFn: (item: T) => string, initialValue?: T[], onChange?: (items: T[]) => void, maxItems?: number): UseMultiSelectReturn<T>;
|
|
364
|
-
|
|
365
|
-
export declare interface UseMultiSelectReturn<T> {
|
|
366
|
-
isOpen: boolean;
|
|
367
|
-
searchQuery: string;
|
|
368
|
-
filteredItems: T[];
|
|
369
|
-
selectedItems: T[];
|
|
370
|
-
open: () => void;
|
|
371
|
-
close: () => void;
|
|
372
|
-
toggle: () => void;
|
|
373
|
-
setSearchQuery: (query: string) => void;
|
|
374
|
-
toggleItem: (item: T) => void;
|
|
375
|
-
isSelected: (item: T) => boolean;
|
|
376
|
-
removeItem: (item: T) => void;
|
|
377
|
-
clearAll: () => void;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
export declare function usePhoneInput(initialValue?: PhoneValue | null, onChange?: (value: PhoneValue) => void, defaultCountryIso2?: string): UsePhoneInputReturn;
|
|
381
|
-
|
|
382
|
-
declare interface UsePhoneInputReturn {
|
|
383
|
-
country: Country | null;
|
|
384
|
-
number: string;
|
|
385
|
-
value: PhoneValue | null;
|
|
386
|
-
isOpen: boolean;
|
|
387
|
-
searchQuery: string;
|
|
388
|
-
filteredCountries: Country[];
|
|
389
|
-
minLength?: number;
|
|
390
|
-
maxLength?: number;
|
|
391
|
-
setSearchQuery: (q: string) => void;
|
|
392
|
-
selectCountry: (country: Country) => void;
|
|
393
|
-
setNumber: (num: string) => void;
|
|
394
|
-
toggle: () => void;
|
|
395
|
-
close: () => void;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
export declare interface UsePickerReturn<T> {
|
|
399
|
-
isOpen: boolean;
|
|
400
|
-
searchQuery: string;
|
|
401
|
-
filteredItems: T[];
|
|
402
|
-
selectedItem: T | null;
|
|
403
|
-
open: () => void;
|
|
404
|
-
close: () => void;
|
|
405
|
-
toggle: () => void;
|
|
406
|
-
setSearchQuery: (query: string) => void;
|
|
407
|
-
selectItem: (item: T) => void;
|
|
408
|
-
clearSelection: () => void;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
export declare function useTimezonePicker(initialValue?: Timezone | null, onChange?: (timezone: Timezone) => void, countryIso2?: string): UsePickerReturn<Timezone>;
|
|
412
|
-
|
|
413
|
-
export { }
|
|
1
|
+
export * from './ui/index'
|