mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
country
This commit is contained in:
@@ -2,18 +2,54 @@ import { Group, Select, Text, type ComboboxItem, type SelectProps } from '@manti
|
||||
import { getData, getName, overwrite } from 'country-list';
|
||||
import * as Flags from 'country-flag-icons/react/3x2';
|
||||
|
||||
// Friendlier labels for a few ISO-official names ("Korea, Republic of" → "South Korea").
|
||||
// Full list still comes from country-list; this only renames.
|
||||
// country-list ships raw ISO 3166 register names, which invert qualifiers into
|
||||
// a trailing "(the)" / "(Qualifier of)" suffix — e.g. "Iran (Islamic Republic of)".
|
||||
// Reorder every such entry into natural reading order ("Islamic Republic of Iran").
|
||||
// Full list + codes still come from country-list; this only rewrites display text.
|
||||
overwrite([
|
||||
{ code: 'BO', name: 'Bolivia' },
|
||||
{ code: 'IR', name: 'Iran' },
|
||||
{ code: 'KP', name: 'North Korea' },
|
||||
{ code: 'KR', name: 'South Korea' },
|
||||
{ code: 'RU', name: 'Russia' },
|
||||
{ code: 'SY', name: 'Syria' },
|
||||
{ code: 'AE', name: 'United Arab Emirates' },
|
||||
{ code: 'BO', name: 'Plurinational State of Bolivia' },
|
||||
{ code: 'BS', name: 'Bahamas' },
|
||||
{ code: 'CC', name: 'Cocos (Keeling) Islands' },
|
||||
{ code: 'CD', name: 'Democratic Republic of the Congo' },
|
||||
{ code: 'CF', name: 'Central African Republic' },
|
||||
{ code: 'CG', name: 'Congo' },
|
||||
{ code: 'CK', name: 'Cook Islands' },
|
||||
{ code: 'DO', name: 'Dominican Republic' },
|
||||
{ code: 'FK', name: 'Falkland Islands (Malvinas)' },
|
||||
{ code: 'FM', name: 'Federated States of Micronesia' },
|
||||
{ code: 'FO', name: 'Faroe Islands' },
|
||||
{ code: 'GB', name: 'United Kingdom of Great Britain and Northern Ireland' },
|
||||
{ code: 'GM', name: 'Gambia' },
|
||||
{ code: 'IO', name: 'British Indian Ocean Territory' },
|
||||
{ code: 'IR', name: 'Islamic Republic of Iran' },
|
||||
{ code: 'KM', name: 'Comoros' },
|
||||
{ code: 'KP', name: "Democratic People's Republic of Korea" },
|
||||
{ code: 'KR', name: 'Republic of Korea' },
|
||||
{ code: 'KY', name: 'Cayman Islands' },
|
||||
{ code: 'LA', name: "Lao People's Democratic Republic" },
|
||||
{ code: 'MD', name: 'Republic of Moldova' },
|
||||
{ code: 'MF', name: 'Saint Martin' },
|
||||
{ code: 'MH', name: 'Marshall Islands' },
|
||||
{ code: 'MP', name: 'Northern Mariana Islands' },
|
||||
{ code: 'NE', name: 'Niger' },
|
||||
{ code: 'NL', name: 'Kingdom of the Netherlands' },
|
||||
{ code: 'PH', name: 'Philippines' },
|
||||
{ code: 'PS', name: 'State of Palestine' },
|
||||
{ code: 'RU', name: 'Russian Federation' },
|
||||
{ code: 'SD', name: 'Sudan' },
|
||||
{ code: 'SX', name: 'Sint Maarten' },
|
||||
{ code: 'SY', name: 'Syrian Arab Republic' },
|
||||
{ code: 'TC', name: 'Turks and Caicos Islands' },
|
||||
{ code: 'TF', name: 'French Southern Territories' },
|
||||
{ code: 'TW', name: 'Taiwan' },
|
||||
{ code: 'US', name: 'United States' },
|
||||
{ code: 'VN', name: 'Vietnam' },
|
||||
{ code: 'TZ', name: 'United Republic of Tanzania' },
|
||||
{ code: 'UM', name: 'United States Minor Outlying Islands' },
|
||||
{ code: 'US', name: 'United States of America' },
|
||||
{ code: 'VA', name: 'Holy See' },
|
||||
{ code: 'VE', name: 'Bolivarian Republic of Venezuela' },
|
||||
{ code: 'VG', name: 'British Virgin Islands' },
|
||||
{ code: 'VI', name: 'United States Virgin Islands' },
|
||||
]);
|
||||
|
||||
// Built once at module load — static data, no hook memoization needed.
|
||||
|
||||
Reference in New Issue
Block a user