react-native-country-select 0.2.6 → 0.3.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.
@@ -14,7 +14,11 @@ type TranslationKey =
14
14
  | 'accessibilityLabelCountriesList'
15
15
  | 'accessibilityHintCountriesList'
16
16
  | 'accessibilityLabelCountryItem'
17
- | 'accessibilityHintCountryItem';
17
+ | 'accessibilityHintCountryItem'
18
+ | 'accessibilityLabelAlphabetFilter'
19
+ | 'accessibilityHintAlphabetFilter'
20
+ | 'accessibilityLabelAlphabetLetter'
21
+ | 'accessibilityHintAlphabetLetter';
18
22
  type TranslationMap = Record<
19
23
  TranslationKey,
20
24
  Record<ICountrySelectLanguages, string>
@@ -511,4 +515,144 @@ export const translations: TranslationMap = {
511
515
  'zho-Hans': '点击选择国家',
512
516
  'zho-Hant': '點擊選擇國家',
513
517
  },
518
+ accessibilityLabelAlphabetFilter: {
519
+ ara: 'قائمة الحروف',
520
+ bel: 'Спіс літар',
521
+ bre: 'Roll al lizherenneg',
522
+ bul: 'Списък с букви',
523
+ ces: 'Seznam písmen',
524
+ deu: 'Buchstabenliste',
525
+ ell: 'Λίστα γραμμάτων',
526
+ eng: 'Alphabet list',
527
+ est: 'Tähestikuline nimekiri',
528
+ fin: 'Kirjainlista',
529
+ fra: 'Liste des lettres',
530
+ heb: 'רשימת אותיות',
531
+ hrv: 'Popis slova',
532
+ hun: 'Betűlista',
533
+ ita: 'Elenco delle lettere',
534
+ jpn: 'アルファベット一覧',
535
+ kor: '알파벳 목록',
536
+ nld: 'Alfabetlijst',
537
+ per: 'فهرست حروف',
538
+ pol: 'Lista liter',
539
+ por: 'Lista alfabética',
540
+ ron: 'Lista alfabetului',
541
+ rus: 'Список букв',
542
+ slk: 'Zoznam písmen',
543
+ spa: 'Lista del alfabeto',
544
+ srp: 'Списак слова азбуке',
545
+ swe: 'Bokstavlista',
546
+ tur: 'Alfabe listesi',
547
+ ukr: 'Список літер',
548
+ urd: 'حروف کی فہرست',
549
+ zho: '字母列表',
550
+ 'zho-Hans': '字母列表',
551
+ 'zho-Hant': '字母清單',
552
+ },
553
+ accessibilityHintAlphabetFilter: {
554
+ ara: 'قائمة تصفية الأبجدية',
555
+ bel: 'Спіс алфавітнага фільтра',
556
+ bre: 'Roll sil al lizherenneg',
557
+ bul: 'Списък на филтъра по азбука',
558
+ ces: 'Seznam abecedního filtru',
559
+ deu: 'Alphabetfilter-Liste',
560
+ ell: 'Λίστα φίλτρου αλφαβήτου',
561
+ eng: 'Alphabet filter list',
562
+ est: 'Tähestikufiltri loend',
563
+ fin: 'Aakkossuodattimen luettelo',
564
+ fra: 'Liste du filtre alphabétique',
565
+ heb: 'רשימת מסנן אלפביתי',
566
+ hrv: 'Popis abecednog filtra',
567
+ hun: 'Ábécé-szűrő lista',
568
+ ita: 'Elenco del filtro alfabetico',
569
+ jpn: 'アルファベットフィルターのリスト',
570
+ kor: '알파벳 필터 목록',
571
+ nld: 'Alfabetfilterlijst',
572
+ per: 'فهرست فیلتر حروف الفبا',
573
+ pol: 'Lista filtru alfabetycznego',
574
+ por: 'Lista do filtro alfabético',
575
+ ron: 'Lista filtrului alfabetic',
576
+ rus: 'Список алфавитного фильтра',
577
+ slk: 'Zoznam abecedného filtra',
578
+ spa: 'Lista del filtro alfabético',
579
+ srp: 'Листа азбучног филтера',
580
+ swe: 'Alfabetfilterlista',
581
+ tur: 'Alfabe filtresi listesi',
582
+ ukr: 'Список алфавітного фільтра',
583
+ urd: 'حروف تہجی فلٹر کی فہرست',
584
+ zho: '字母筛选列表',
585
+ 'zho-Hans': '字母筛选列表',
586
+ 'zho-Hant': '字母篩選清單',
587
+ },
588
+ accessibilityLabelAlphabetLetter: {
589
+ ara: 'حرف',
590
+ bel: 'Буква',
591
+ bre: 'Lettre',
592
+ bul: 'Буква',
593
+ ces: 'Písmeno',
594
+ deu: 'Buchstabe',
595
+ ell: 'Γράμμα',
596
+ eng: 'Letter',
597
+ est: 'Täht',
598
+ fin: 'Kirjain',
599
+ fra: 'Lettre',
600
+ heb: 'אות',
601
+ hrv: 'Slovo',
602
+ hun: 'Betű',
603
+ ita: 'Lettera',
604
+ jpn: '文字',
605
+ kor: '글자',
606
+ nld: 'Letter',
607
+ per: 'حرف',
608
+ pol: 'Litera',
609
+ por: 'Letra',
610
+ ron: 'Litera',
611
+ rus: 'Буква',
612
+ slk: 'Písmeno',
613
+ spa: 'Letra',
614
+ srp: 'Сло',
615
+ swe: 'Bokstav',
616
+ tur: 'Harf',
617
+ ukr: 'Буква',
618
+ urd: 'حرف',
619
+ zho: '国家列表',
620
+ 'zho-Hans': '国家列表',
621
+ 'zho-Hant': '國家清單',
622
+ },
623
+ accessibilityHintAlphabetLetter: {
624
+ ara: 'انقر لاختيار الحرف',
625
+ bel: 'Націсніце, каб выбраць літару',
626
+ bre: 'Klikit evit dibab al lizherenn',
627
+ bul: 'Щракнете, за да изберете буква',
628
+ ces: 'Klikněte pro výběr písmene',
629
+ deu: 'Klicken Sie, um den Buchstaben auszuwählen',
630
+ ell: 'Κάντε κλικ για να επιλέξετε το γράμμα',
631
+ eng: 'Click to select the letter',
632
+ est: 'Klõpsake tähe valimiseks',
633
+ fin: 'Klikkaa valitaksesi kirjaimen',
634
+ fra: 'Cliquez pour sélectionner la lettre',
635
+ heb: 'לחץ כדי לבחור את האות',
636
+ hrv: 'Kliknite za odabir slova',
637
+ hun: 'Kattintson a betű kiválasztásához',
638
+ ita: 'Clicca per selezionare la lettera',
639
+ jpn: 'クリックして文字を選択',
640
+ kor: '글자를 선택하려면 클릭',
641
+ nld: 'Klik om een letter te selecteren',
642
+ per: 'برای انتخاب حرف کلیک کنید',
643
+ pol: 'Kliknij, aby wybrać literę',
644
+ por: 'Clique para selecionar a letra',
645
+ ron: 'Faceți clic pentru a selecta litera',
646
+ rus: 'Нажмите, чтобы выбрать букву',
647
+ slk: 'Kliknite pre výber písmena',
648
+ spa: 'Haga clic para seleccionar la letra',
649
+ srp: 'Кликните да изаберете слово',
650
+ swe: 'Klicka för att välja bokstaven',
651
+ tur: 'Harfi seçmek için tıklayın',
652
+ ukr: 'Натисніть, щоб вибрати літеру',
653
+ urd: 'حرف منتخب کرنے کے لیے کلک کریں',
654
+ zho: '点击选择字母',
655
+ 'zho-Hans': '点击选择字母',
656
+ 'zho-Hant': '點擊選擇字母',
657
+ },
514
658
  } as const;
@@ -0,0 +1,3 @@
1
+ export const normalizeCountryName = (str: string): string => {
2
+ return str.normalize('NFD').replace(/[\u0300-\u036f]/g, '');
3
+ };
@@ -0,0 +1,17 @@
1
+ import {normalizeCountryName} from './normalizeCountryName';
2
+ import {ICountry, ICountrySelectLanguages} from '../interface';
3
+
4
+ export const sortCountriesAlphabetically = (
5
+ countriesList: ICountry[],
6
+ language: ICountrySelectLanguages,
7
+ ): ICountry[] => {
8
+ return [...countriesList].sort((a, b) => {
9
+ const nameA = normalizeCountryName(
10
+ (a.translations[language]?.common || a.name.common || '').toLowerCase(),
11
+ );
12
+ const nameB = normalizeCountryName(
13
+ (b.translations[language]?.common || b.name.common || '').toLowerCase(),
14
+ );
15
+ return nameA.localeCompare(nameB);
16
+ });
17
+ };
package/package.json CHANGED
@@ -1,24 +1,30 @@
1
1
  {
2
2
  "name": "react-native-country-select",
3
- "version": "0.2.6",
4
- "description": "🌍 A lightweight and customizable country picker for React Native with modern UI, flags, search engine, and i18n support. Includes TypeScript types, offline support and no dependencies.",
3
+ "version": "0.3.1",
4
+ "description": "🌍 React Native country picker with flags, search, TypeScript, i18n, and offline support. Lightweight, customizable, and designed with a modern UI.",
5
5
  "main": "lib/index.tsx",
6
6
  "types": "lib/index.d.ts",
7
7
  "keywords": [
8
- "react-native",
9
- "cross-platform",
10
- "ios",
11
- "android",
12
- "web",
13
- "flags",
14
- "countries",
8
+ "react-native-country-picker",
9
+ "react-native-country-select",
10
+ "react-native-country-codes",
15
11
  "country-picker",
16
12
  "country-select",
17
- "country-codes",
13
+ "country-selector",
14
+ "country-list",
15
+ "phone-codes",
16
+ "internationalization",
18
17
  "i18n",
19
- "international",
18
+ "flags",
19
+ "typescript",
20
20
  "offline-support",
21
- "custom-lib"
21
+ "customizable",
22
+ "modern-ui",
23
+ "android",
24
+ "ios",
25
+ "cross-platform",
26
+ "react native country picker",
27
+ "react native country select"
22
28
  ],
23
29
  "repository": {
24
30
  "type": "git",