UNPKG

@llselect/core

Version:

Low-level select: a minimal, flexible, framework-agnostic replacement for the native HTML select element.

1,033 lines (977 loc) 44.6 kB
/** * Arabic pack (RTL). * @group Language packs */ const ar = { triggerPlaceholder: 'الرجاء الاختيار', filterInputAriaLabel: 'بحث', filterInputPlaceholder: 'تصفية (Esc للمسح)', popupListNoResults: 'لا توجد نتائج', triggerClearButtonAriaLabel: 'مسح التحديد', tagRemoveButtonAriaLabel: (itemText) => `إزالة ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `تم اختيار الكل (${chosenCount})` : `تم اختيار ${chosenCount} من ${totalCount}`, chooseAllRowText: (chosenCount, totalCount) => `تحديد الكل (${chosenCount} من ${totalCount})`, }; /** * Bulgarian pack. * @group Language packs */ const bg = { triggerPlaceholder: 'Изберете', filterInputAriaLabel: 'Търсене', filterInputPlaceholder: 'Филтър (Esc за изчистване)', popupListNoResults: 'Няма резултати', triggerClearButtonAriaLabel: 'Изчистване на избора', tagRemoveButtonAriaLabel: (itemText) => `Премахване на ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Избрани: всички (${chosenCount})` : `Избрани: ${chosenCount} от ${totalCount}`, chooseAllRowText: (chosenCount, totalCount) => `Избери всички (${chosenCount} / ${totalCount})`, }; /** * Bengali pack. * @group Language packs */ const bn = { triggerPlaceholder: 'অনুগ্রহ করে নির্বাচন করুন', filterInputAriaLabel: 'অনুসন্ধান', filterInputPlaceholder: 'ফিল্টার (মুছতে Esc)', popupListNoResults: 'কোনো ফলাফল পাওয়া যায়নি', triggerClearButtonAriaLabel: 'নির্বাচন মুছুন', tagRemoveButtonAriaLabel: (itemText) => `${itemText} সরান`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `সব ${chosenCount}টি নির্বাচিত` : `${totalCount}টির মধ্যে ${chosenCount}টি নির্বাচিত`, chooseAllRowText: (chosenCount, totalCount) => `সব নির্বাচন করুন (${chosenCount} / ${totalCount})`, }; /** * Catalan pack. * @group Language packs */ const ca = { triggerPlaceholder: 'Seleccioneu una opció', filterInputAriaLabel: 'Cerca', filterInputPlaceholder: 'Filtra (Esc per esborrar)', popupListNoResults: 'Cap resultat', triggerClearButtonAriaLabel: 'Esborra la selecció', tagRemoveButtonAriaLabel: (itemText) => `Suprimeix ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => { if (chosenCount === 1) { return `1 de ${totalCount} seleccionat`; } if (chosenCount === totalCount) { return `Tots els ${chosenCount} seleccionats`; } return `${chosenCount} de ${totalCount} seleccionats`; }, chooseAllRowText: (chosenCount, totalCount) => `Selecciona-ho tot (${chosenCount} de ${totalCount})`, }; /** * Czech pack. * @group Language packs */ const cs = { triggerPlaceholder: 'Vyberte', filterInputAriaLabel: 'Hledat', filterInputPlaceholder: 'Filtr (Esc pro vymazání)', popupListNoResults: 'Žádné výsledky', triggerClearButtonAriaLabel: 'Vymazat výběr', tagRemoveButtonAriaLabel: (itemText) => `Odebrat ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Vybráno vše (${chosenCount})` : `Vybráno ${chosenCount} z ${totalCount}`, chooseAllRowText: (chosenCount, totalCount) => `Vybrat vše (${chosenCount} / ${totalCount})`, }; /** * Danish pack. * @group Language packs */ const da = { triggerPlaceholder: 'Vælg en mulighed', filterInputAriaLabel: 'Søg', filterInputPlaceholder: 'Filtrer (Esc for at rydde)', popupListNoResults: 'Ingen resultater', triggerClearButtonAriaLabel: 'Ryd valget', tagRemoveButtonAriaLabel: (itemText) => `Fjern ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Alle ${chosenCount} valgt` : `${chosenCount} af ${totalCount} valgt`, chooseAllRowText: (chosenCount, totalCount) => `Vælg alle (${chosenCount} / ${totalCount})`, }; /** * German pack. * @group Language packs */ const de = { triggerPlaceholder: 'Bitte auswählen', filterInputAriaLabel: 'Suchen', filterInputPlaceholder: 'Filtern (Esc zum Löschen)', popupListNoResults: 'Keine Treffer', triggerClearButtonAriaLabel: 'Auswahl löschen', tagRemoveButtonAriaLabel: (itemText) => `${itemText} entfernen`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Alle ${chosenCount} ausgewählt` : `${chosenCount} von ${totalCount} ausgewählt`, chooseAllRowText: (chosenCount, totalCount) => `Alle auswählen (${chosenCount} / ${totalCount})`, }; /** * Greek pack. * @group Language packs */ const el = { triggerPlaceholder: 'Επιλέξτε', filterInputAriaLabel: 'Αναζήτηση', filterInputPlaceholder: 'Φίλτρο (Esc για καθαρισμό)', popupListNoResults: 'Κανένα αποτέλεσμα', triggerClearButtonAriaLabel: 'Καθαρισμός επιλογής', tagRemoveButtonAriaLabel: (itemText) => `Αφαίρεση ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => { if (chosenCount === 1) { return `Επιλέχθηκε 1 από ${totalCount}`; } if (chosenCount === totalCount) { return `Επιλέχθηκαν όλα (${chosenCount})`; } return `Επιλέχθηκαν ${chosenCount} από ${totalCount}`; }, chooseAllRowText: (chosenCount, totalCount) => `Επιλογή όλων (${chosenCount} / ${totalCount})`, }; /** * The built-in English pack - the library default. * @group Language packs */ const en = { triggerPlaceholder: 'Please select', filterInputAriaLabel: 'Search', filterInputPlaceholder: 'Filter (Esc to clear)', popupListNoResults: 'No results found', triggerClearButtonAriaLabel: 'Clear selection', tagRemoveButtonAriaLabel: (itemText) => `Remove ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `All ${chosenCount} selected` : `${chosenCount} / ${totalCount} selected`, chooseAllRowText: (chosenCount, totalCount) => `Select all (${chosenCount} of ${totalCount})`, }; /** * Spanish pack (unsplit: these strings do not differ across regions). * @group Language packs */ const es = { triggerPlaceholder: 'Seleccione una opción', filterInputAriaLabel: 'Buscar', filterInputPlaceholder: 'Filtrar (Esc para borrar)', popupListNoResults: 'Sin resultados', triggerClearButtonAriaLabel: 'Borrar la selección', tagRemoveButtonAriaLabel: (itemText) => `Quitar ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => { if (chosenCount === 1) { return `1 de ${totalCount} seleccionado`; } if (chosenCount === totalCount) { return `Todos los ${chosenCount} seleccionados`; } return `${chosenCount} de ${totalCount} seleccionados`; }, chooseAllRowText: (chosenCount, totalCount) => `Seleccionar todo (${chosenCount} de ${totalCount})`, }; /** * Estonian pack. * @group Language packs */ const et = { triggerPlaceholder: 'Valige', filterInputAriaLabel: 'Otsi', filterInputPlaceholder: 'Filtreeri (Esc tühjendab)', popupListNoResults: 'Tulemusi pole', triggerClearButtonAriaLabel: 'Tühjenda valik', tagRemoveButtonAriaLabel: (itemText) => `Eemalda ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Kõik valitud (${chosenCount})` : `Valitud ${chosenCount} / ${totalCount}`, chooseAllRowText: (chosenCount, totalCount) => `Vali kõik (${chosenCount} / ${totalCount})`, }; /** * Persian pack (RTL). * @group Language packs */ const fa = { triggerPlaceholder: 'لطفاً انتخاب کنید', filterInputAriaLabel: 'جستجو', filterInputPlaceholder: 'فیلتر (Esc برای پاک کردن)', popupListNoResults: 'نتیجه‌ای یافت نشد', triggerClearButtonAriaLabel: 'پاک کردن انتخاب', tagRemoveButtonAriaLabel: (itemText) => `حذف ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `همه انتخاب شدند (${chosenCount})` : `${chosenCount} از ${totalCount} انتخاب شده`, chooseAllRowText: (chosenCount, totalCount) => `انتخاب همه (${chosenCount} از ${totalCount})`, }; /** * Finnish pack. * @group Language packs */ const fi = { triggerPlaceholder: 'Valitse', filterInputAriaLabel: 'Haku', filterInputPlaceholder: 'Suodata (Esc tyhjentää)', popupListNoResults: 'Ei tuloksia', triggerClearButtonAriaLabel: 'Tyhjennä valinta', tagRemoveButtonAriaLabel: (itemText) => `Poista ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Kaikki ${chosenCount} valittu` : `${chosenCount} / ${totalCount} valittu`, chooseAllRowText: (chosenCount, totalCount) => `Valitse kaikki (${chosenCount} / ${totalCount})`, }; /** * Filipino pack. * @group Language packs */ const fil = { triggerPlaceholder: 'Pumili', filterInputAriaLabel: 'Maghanap', filterInputPlaceholder: 'Salain (Esc para burahin)', popupListNoResults: 'Walang resulta', triggerClearButtonAriaLabel: 'Burahin ang pinili', tagRemoveButtonAriaLabel: (itemText) => `Alisin ang ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Napili lahat (${chosenCount})` : `${chosenCount} sa ${totalCount} ang napili`, chooseAllRowText: (chosenCount, totalCount) => `Piliin lahat (${chosenCount} / ${totalCount})`, }; /** * French pack. * @group Language packs */ const fr = { triggerPlaceholder: 'Veuillez sélectionner', filterInputAriaLabel: 'Rechercher', filterInputPlaceholder: 'Filtrer (Échap pour effacer)', popupListNoResults: 'Aucun résultat', triggerClearButtonAriaLabel: 'Effacer la sélection', tagRemoveButtonAriaLabel: (itemText) => `Retirer ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => { if (chosenCount === 1) { return `1 sur ${totalCount} sélectionné`; } if (chosenCount === totalCount) { return `Tous les ${chosenCount} sélectionnés`; } return `${chosenCount} sur ${totalCount} sélectionnés`; }, chooseAllRowText: (chosenCount, totalCount) => `Tout sélectionner (${chosenCount} / ${totalCount})`, }; /** * Irish pack. * @group Language packs */ const ga = { triggerPlaceholder: 'Roghnaigh', filterInputAriaLabel: 'Cuardaigh', filterInputPlaceholder: 'Scag (Esc le glanadh)', popupListNoResults: 'Gan torthaí', triggerClearButtonAriaLabel: 'Glan an rogha', tagRemoveButtonAriaLabel: (itemText) => `Bain ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Gach ceann roghnaithe (${chosenCount})` : `${chosenCount} as ${totalCount} roghnaithe`, chooseAllRowText: (chosenCount, totalCount) => `Roghnaigh uile (${chosenCount} / ${totalCount})`, }; /** * Hebrew pack (RTL). * @group Language packs */ const he = { triggerPlaceholder: 'נא לבחור', filterInputAriaLabel: 'חיפוש', filterInputPlaceholder: 'סינון (Esc לניקוי)', popupListNoResults: 'לא נמצאו תוצאות', triggerClearButtonAriaLabel: 'נקה בחירה', tagRemoveButtonAriaLabel: (itemText) => `הסר ${itemText}`, // Hebrew number agreement: singular past (nivchar) for 1, plural (nivcheru) // otherwise; the all-chosen form needs the noun (kol X ha-pritim). triggerCountSummary: (chosenCount, totalCount) => { if (chosenCount === 1) { return `נבחר פריט אחד מתוך ${totalCount}`; } if (chosenCount === totalCount) { return `נבחרו כל ${totalCount} הפריטים`; } return `נבחרו ${chosenCount} מתוך ${totalCount}`; }, chooseAllRowText: (chosenCount, totalCount) => `בחר הכל (${chosenCount} מתוך ${totalCount})`, }; /** * Hindi pack. * @group Language packs */ const hi = { triggerPlaceholder: 'कृपया चुनें', filterInputAriaLabel: 'खोजें', filterInputPlaceholder: 'फ़िल्टर (साफ़ करने के लिए Esc)', popupListNoResults: 'कोई परिणाम नहीं मिला', triggerClearButtonAriaLabel: 'चयन साफ़ करें', tagRemoveButtonAriaLabel: (itemText) => `${itemText} हटाएँ`, triggerCountSummary: (chosenCount, totalCount) => { if (chosenCount === 1) { return `${totalCount} में से 1 चुना गया`; } if (chosenCount === totalCount) { return `सभी ${chosenCount} चुने गए`; } return `${totalCount} में से ${chosenCount} चुने गए`; }, chooseAllRowText: (chosenCount, totalCount) => `सभी चुनें (${chosenCount} / ${totalCount})`, }; /** * Croatian pack. * @group Language packs */ const hr = { triggerPlaceholder: 'Odaberite', filterInputAriaLabel: 'Pretraži', filterInputPlaceholder: 'Filtriraj (Esc za brisanje)', popupListNoResults: 'Nema rezultata', triggerClearButtonAriaLabel: 'Očisti odabir', tagRemoveButtonAriaLabel: (itemText) => `Ukloni ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Odabrano sve (${chosenCount})` : `Odabrano ${chosenCount} od ${totalCount}`, chooseAllRowText: (chosenCount, totalCount) => `Odaberi sve (${chosenCount} / ${totalCount})`, }; /** * Hungarian pack. * @group Language packs */ const hu = { triggerPlaceholder: 'Válasszon', filterInputAriaLabel: 'Keresés', filterInputPlaceholder: 'Szűrés (Esc: törlés)', popupListNoResults: 'Nincs találat', triggerClearButtonAriaLabel: 'Kijelölés törlése', tagRemoveButtonAriaLabel: (itemText) => `${itemText} eltávolítása`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Összes kijelölve (${chosenCount})` : `${chosenCount} / ${totalCount} kijelölve`, chooseAllRowText: (chosenCount, totalCount) => `Összes kijelölése (${chosenCount} / ${totalCount})`, }; /** * Indonesian pack. * @group Language packs */ const id = { triggerPlaceholder: 'Silakan pilih', filterInputAriaLabel: 'Cari', filterInputPlaceholder: 'Saring (Esc untuk menghapus)', popupListNoResults: 'Tidak ada hasil', triggerClearButtonAriaLabel: 'Hapus pilihan', tagRemoveButtonAriaLabel: (itemText) => `Hapus ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Semua dipilih (${chosenCount})` : `${chosenCount} dari ${totalCount} dipilih`, chooseAllRowText: (chosenCount, totalCount) => `Pilih semua (${chosenCount} / ${totalCount})`, }; /** * Icelandic pack. * @group Language packs */ const is = { triggerPlaceholder: 'Veldu valkost', filterInputAriaLabel: 'Leita', filterInputPlaceholder: 'Sía (Esc til að hreinsa)', popupListNoResults: 'Engar niðurstöður', triggerClearButtonAriaLabel: 'Hreinsa val', tagRemoveButtonAriaLabel: (itemText) => `Fjarlægja ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Allt valið (${chosenCount})` : `${chosenCount} af ${totalCount} valið`, chooseAllRowText: (chosenCount, totalCount) => `Velja allt (${chosenCount} / ${totalCount})`, }; /** * Italian pack. * @group Language packs */ const it = { triggerPlaceholder: 'Seleziona un elemento', filterInputAriaLabel: 'Cerca', filterInputPlaceholder: 'Filtra (Esc per cancellare)', popupListNoResults: 'Nessun risultato', triggerClearButtonAriaLabel: 'Cancella la selezione', tagRemoveButtonAriaLabel: (itemText) => `Rimuovi ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => { if (chosenCount === 1) { return `1 su ${totalCount} selezionato`; } if (chosenCount === totalCount) { return `Tutti i ${chosenCount} selezionati`; } return `${chosenCount} su ${totalCount} selezionati`; }, chooseAllRowText: (chosenCount, totalCount) => `Seleziona tutto (${chosenCount} / ${totalCount})`, }; /** * Japanese pack. * @group Language packs */ const ja = { triggerPlaceholder: '選択してください', filterInputAriaLabel: '検索', filterInputPlaceholder: '絞り込み(Escでクリア)', popupListNoResults: '該当する結果はありません', triggerClearButtonAriaLabel: '選択をクリア', tagRemoveButtonAriaLabel: (itemText) => `${itemText}を削除`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `全${chosenCount}件を選択中` : `${totalCount}件中${chosenCount}件を選択中`, chooseAllRowText: (chosenCount, totalCount) => `すべて選択(${chosenCount} / ${totalCount})`, }; /** * Kazakh pack (Cyrillic). * @group Language packs */ const kk = { triggerPlaceholder: 'Таңдаңыз', filterInputAriaLabel: 'Іздеу', filterInputPlaceholder: 'Сүзгі (тазарту үшін Esc)', popupListNoResults: 'Нәтиже табылмады', triggerClearButtonAriaLabel: 'Таңдауды тазарту', // Label-colon frames: Kazakh case suffixes vary with the stem, so nothing // is suffixed onto the interpolated label or numerals. tagRemoveButtonAriaLabel: (itemText) => `Алып тастау: ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Барлығы таңдалды (${chosenCount})` : `Таңдалды: ${chosenCount} / ${totalCount}`, chooseAllRowText: (chosenCount, totalCount) => `Барлығын таңдау (${chosenCount} / ${totalCount})`, }; /** * Khmer pack. * @group Language packs */ const km = { triggerPlaceholder: 'សូមជ្រើសរើស', filterInputAriaLabel: 'ស្វែងរក', filterInputPlaceholder: 'ត្រង (Esc ដើម្បីសម្អាត)', popupListNoResults: 'គ្មានលទ្ធផល', triggerClearButtonAriaLabel: 'សម្អាតការជ្រើសរើស', tagRemoveButtonAriaLabel: (itemText) => `ដក ${itemText} ចេញ`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `បានជ្រើសរើសទាំងអស់ (${chosenCount})` : `បានជ្រើសរើស ${chosenCount} ក្នុងចំណោម ${totalCount}`, chooseAllRowText: (chosenCount, totalCount) => `ជ្រើសរើសទាំងអស់ (${chosenCount} / ${totalCount})`, }; /** * Korean pack. * @group Language packs */ const ko = { triggerPlaceholder: '선택하세요', filterInputAriaLabel: '검색', filterInputPlaceholder: '필터 (Esc로 지우기)', popupListNoResults: '결과가 없습니다', triggerClearButtonAriaLabel: '선택 지우기', tagRemoveButtonAriaLabel: (itemText) => `${itemText} 제거`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `전체 ${chosenCount}개 선택됨` : `${totalCount}개 중 ${chosenCount}개 선택됨`, chooseAllRowText: (chosenCount, totalCount) => `모두 선택 (${chosenCount} / ${totalCount})`, }; /** * Lithuanian pack. * @group Language packs */ const lt = { triggerPlaceholder: 'Pasirinkite', filterInputAriaLabel: 'Paieška', filterInputPlaceholder: 'Filtras (Esc išvalyti)', popupListNoResults: 'Rezultatų nerasta', triggerClearButtonAriaLabel: 'Išvalyti pasirinkimą', tagRemoveButtonAriaLabel: (itemText) => `Pašalinti ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Pasirinkta viskas (${chosenCount})` : `Pasirinkta ${chosenCount}${totalCount}`, chooseAllRowText: (chosenCount, totalCount) => `Pasirinkti viską (${chosenCount} / ${totalCount})`, }; /** * Latvian pack. * @group Language packs */ const lv = { triggerPlaceholder: 'Izvēlieties', filterInputAriaLabel: 'Meklēt', filterInputPlaceholder: 'Filtrs (Esc notīra)', popupListNoResults: 'Nav rezultātu', triggerClearButtonAriaLabel: 'Notīrīt izvēli', tagRemoveButtonAriaLabel: (itemText) => `Noņemt ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Izvēlēts: viss (${chosenCount})` : `Izvēlēts: ${chosenCount} no ${totalCount}`, chooseAllRowText: (chosenCount, totalCount) => `Izvēlēties visu (${chosenCount} / ${totalCount})`, }; /** * Mongolian pack (Cyrillic; the traditional script needs vertical layout and is out of scope). * @group Language packs */ const mn = { triggerPlaceholder: 'Сонгоно уу', filterInputAriaLabel: 'Хайх', filterInputPlaceholder: 'Шүүлтүүр (цэвэрлэхийн тулд Esc)', popupListNoResults: 'Илэрц олдсонгүй', triggerClearButtonAriaLabel: 'Сонголтыг арилгах', // Label-colon frame: Mongolian case suffixes vary with the stem (vowel // harmony), so nothing is suffixed onto the interpolated label. tagRemoveButtonAriaLabel: (itemText) => `Хасах: ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Бүгд сонгогдсон (${chosenCount})` : `Сонгосон: ${chosenCount} / ${totalCount}`, chooseAllRowText: (chosenCount, totalCount) => `Бүгдийг сонгох (${chosenCount} / ${totalCount})`, }; /** * Malay pack. * @group Language packs */ const ms = { triggerPlaceholder: 'Sila pilih', filterInputAriaLabel: 'Cari', filterInputPlaceholder: 'Tapis (Esc untuk kosongkan)', popupListNoResults: 'Tiada hasil', triggerClearButtonAriaLabel: 'Kosongkan pilihan', tagRemoveButtonAriaLabel: (itemText) => `Alih keluar ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Semua dipilih (${chosenCount})` : `${chosenCount} daripada ${totalCount} dipilih`, chooseAllRowText: (chosenCount, totalCount) => `Pilih semua (${chosenCount} / ${totalCount})`, }; /** * Burmese pack. * @group Language packs */ const my = { triggerPlaceholder: 'ရွေးချယ်ပါ', filterInputAriaLabel: 'ရှာဖွေရန်', filterInputPlaceholder: 'စစ်ထုတ်ရန် (ရှင်းရန် Esc)', popupListNoResults: 'ရလဒ် မရှိပါ', triggerClearButtonAriaLabel: 'ရွေးချယ်မှု ရှင်းလင်းရန်', tagRemoveButtonAriaLabel: (itemText) => `${itemText} ကို ဖယ်ရှားရန်`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `အားလုံး ရွေးထားသည် (${chosenCount})` : `${totalCount} ခုအနက် ${chosenCount} ခု ရွေးထားသည်`, chooseAllRowText: (chosenCount, totalCount) => `အားလုံး ရွေးရန် (${chosenCount} / ${totalCount})`, }; /** * Taiwanese Hokkien pack (Tai-lo romanization; IANA variant subtag `tailo`). * DRAFT - see TRANSLATION STATUS: needs the maintainer's native vetting. * Same language as `nan-TW`, distinguished by script (`Latn`) + variant, not * by a separate language id. * @group Language packs */ const nanLatnTailo = { triggerPlaceholder: 'Tshiánn kíng-suán', filterInputAriaLabel: 'Tshiau-tshuē', filterInputPlaceholder: 'Kuè-lī (tshi̍h Esc tshing-tiāu)', popupListNoResults: 'Tshuē bô kiat-kó', triggerClearButtonAriaLabel: 'Tshing-tiāu kíng--ê', tagRemoveButtonAriaLabel: (itemText) => `Kā ${itemText} the̍h-tiāu`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Tsuân-pōo ${chosenCount} hāng lóng kíng--ah` : `${totalCount} hāng kíng ${chosenCount} hāng`, chooseAllRowText: (chosenCount, totalCount) => `Lóng-tsóng kíng (${chosenCount} / ${totalCount})`, }; /** * Taiwanese Hokkien pack (Taiwan; Han script, MOE recommended characters). * DRAFT - see TRANSLATION STATUS: needs the maintainer's native vetting. * @group Language packs */ const nanTW = { triggerPlaceholder: '請揀選', filterInputAriaLabel: '搜揣', filterInputPlaceholder: '過濾(揤 Esc 清掉)', popupListNoResults: '揣無結果', triggerClearButtonAriaLabel: '清掉揀的', tagRemoveButtonAriaLabel: (itemText) => `共 ${itemText} 提掉`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `全部 ${chosenCount} 項攏揀矣` : `${totalCount} 項揀 ${chosenCount} 項`, chooseAllRowText: (chosenCount, totalCount) => `攏總揀(${chosenCount} / ${totalCount})`, }; /** * Norwegian Bokmål pack (`no` resolves here in uiTranslationPackByLocale). * @group Language packs */ const nb = { triggerPlaceholder: 'Velg et alternativ', filterInputAriaLabel: 'Søk', filterInputPlaceholder: 'Filtrer (Esc for å tømme)', popupListNoResults: 'Ingen treff', triggerClearButtonAriaLabel: 'Tøm valget', tagRemoveButtonAriaLabel: (itemText) => `Fjern ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Alle ${chosenCount} valgt` : `${chosenCount} av ${totalCount} valgt`, chooseAllRowText: (chosenCount, totalCount) => `Velg alle (${chosenCount} / ${totalCount})`, }; /** * Dutch pack. * @group Language packs */ const nl = { triggerPlaceholder: 'Maak een keuze', filterInputAriaLabel: 'Zoeken', filterInputPlaceholder: 'Filteren (Esc om te wissen)', popupListNoResults: 'Geen resultaten', triggerClearButtonAriaLabel: 'Selectie wissen', tagRemoveButtonAriaLabel: (itemText) => `${itemText} verwijderen`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Alle ${chosenCount} geselecteerd` : `${chosenCount} van ${totalCount} geselecteerd`, chooseAllRowText: (chosenCount, totalCount) => `Alles selecteren (${chosenCount} / ${totalCount})`, }; /** * Polish pack. * @group Language packs */ const pl = { triggerPlaceholder: 'Wybierz', filterInputAriaLabel: 'Szukaj', filterInputPlaceholder: 'Filtruj (Esc, aby wyczyścić)', popupListNoResults: 'Brak wyników', triggerClearButtonAriaLabel: 'Wyczyść wybór', tagRemoveButtonAriaLabel: (itemText) => `Usuń ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Wybrano wszystkie (${chosenCount})` : `Wybrano ${chosenCount} z ${totalCount}`, chooseAllRowText: (chosenCount, totalCount) => `Zaznacz wszystko (${chosenCount} / ${totalCount})`, }; /** * Portuguese pack (unsplit: vocabulary valid in both European and Brazilian usage). * @group Language packs */ const pt = { triggerPlaceholder: 'Selecione uma opção', filterInputAriaLabel: 'Pesquisar', filterInputPlaceholder: 'Filtrar (Esc para limpar)', popupListNoResults: 'Nenhum resultado', triggerClearButtonAriaLabel: 'Limpar seleção', tagRemoveButtonAriaLabel: (itemText) => `Remover ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => { if (chosenCount === 1) { return `1 de ${totalCount} selecionado`; } if (chosenCount === totalCount) { return `Todos os ${chosenCount} selecionados`; } return `${chosenCount} de ${totalCount} selecionados`; }, chooseAllRowText: (chosenCount, totalCount) => `Selecionar tudo (${chosenCount} de ${totalCount})`, }; /** * Romanian pack. * @group Language packs */ const ro = { triggerPlaceholder: 'Selectați', filterInputAriaLabel: 'Căutare', filterInputPlaceholder: 'Filtrare (Esc pentru golire)', popupListNoResults: 'Niciun rezultat', triggerClearButtonAriaLabel: 'Golește selecția', tagRemoveButtonAriaLabel: (itemText) => `Elimină ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => { if (chosenCount === 1) { return `1 din ${totalCount} selectat`; } if (chosenCount === totalCount) { return `Toate cele ${chosenCount} selectate`; } return `${chosenCount} din ${totalCount} selectate`; }, chooseAllRowText: (chosenCount, totalCount) => `Selectează tot (${chosenCount} / ${totalCount})`, }; /** * Russian pack. * @group Language packs */ const ru = { triggerPlaceholder: 'Выберите', filterInputAriaLabel: 'Поиск', filterInputPlaceholder: 'Фильтр (Esc, чтобы очистить)', popupListNoResults: 'Ничего не найдено', triggerClearButtonAriaLabel: 'Очистить выбор', tagRemoveButtonAriaLabel: (itemText) => `Удалить ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Выбраны все (${chosenCount})` : `Выбрано ${chosenCount} из ${totalCount}`, chooseAllRowText: (chosenCount, totalCount) => `Выбрать все (${chosenCount} из ${totalCount})`, }; /** * Slovak pack. * @group Language packs */ const sk = { triggerPlaceholder: 'Vyberte', filterInputAriaLabel: 'Hľadať', filterInputPlaceholder: 'Filter (Esc na vymazanie)', popupListNoResults: 'Žiadne výsledky', triggerClearButtonAriaLabel: 'Vymazať výber', tagRemoveButtonAriaLabel: (itemText) => `Odstrániť ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Vybrané: všetko (${chosenCount})` : `Vybrané: ${chosenCount} z ${totalCount}`, chooseAllRowText: (chosenCount, totalCount) => `Vybrať všetko (${chosenCount} / ${totalCount})`, }; /** * Slovenian pack. * @group Language packs */ const sl = { triggerPlaceholder: 'Izberite', filterInputAriaLabel: 'Iskanje', filterInputPlaceholder: 'Filtriraj (Esc za brisanje)', popupListNoResults: 'Ni rezultatov', triggerClearButtonAriaLabel: 'Počisti izbor', tagRemoveButtonAriaLabel: (itemText) => `Odstrani ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Izbrano vse (${chosenCount})` : `Izbrano ${chosenCount} od ${totalCount}`, chooseAllRowText: (chosenCount, totalCount) => `Izberi vse (${chosenCount} / ${totalCount})`, }; /** * Serbian pack (Cyrillic). * @group Language packs */ const sr = { triggerPlaceholder: 'Изаберите', filterInputAriaLabel: 'Претрага', filterInputPlaceholder: 'Филтер (Esc за брисање)', popupListNoResults: 'Нема резултата', triggerClearButtonAriaLabel: 'Обриши избор', tagRemoveButtonAriaLabel: (itemText) => `Уклони ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Изабрано све (${chosenCount})` : `Изабрано ${chosenCount} од ${totalCount}`, chooseAllRowText: (chosenCount, totalCount) => `Изабери све (${chosenCount} / ${totalCount})`, }; /** * Swedish pack. * @group Language packs */ const sv = { triggerPlaceholder: 'Välj ett alternativ', filterInputAriaLabel: 'Sök', filterInputPlaceholder: 'Filtrera (Esc för att rensa)', popupListNoResults: 'Inga resultat', triggerClearButtonAriaLabel: 'Rensa valet', tagRemoveButtonAriaLabel: (itemText) => `Ta bort ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => { if (chosenCount === 1) { return `1 av ${totalCount} vald`; } if (chosenCount === totalCount) { return `Alla ${chosenCount} valda`; } return `${chosenCount} av ${totalCount} valda`; }, chooseAllRowText: (chosenCount, totalCount) => `Välj alla (${chosenCount} / ${totalCount})`, }; /** * Swahili pack. * @group Language packs */ const sw = { triggerPlaceholder: 'Tafadhali chagua', filterInputAriaLabel: 'Tafuta', filterInputPlaceholder: 'Chuja (Esc kufuta)', popupListNoResults: 'Hakuna matokeo', triggerClearButtonAriaLabel: 'Futa uteuzi', tagRemoveButtonAriaLabel: (itemText) => `Ondoa ${itemText}`, // Personal-subject frame ("you have selected"): the passive would need // noun-class agreement with an unknown item class. triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Umechagua zote (${chosenCount})` : `Umechagua ${chosenCount} kati ya ${totalCount}`, chooseAllRowText: (chosenCount, totalCount) => `Chagua zote (${chosenCount} / ${totalCount})`, }; /** * Tamil pack. * @group Language packs */ const ta = { triggerPlaceholder: 'தேர்ந்தெடுக்கவும்', filterInputAriaLabel: 'தேடல்', filterInputPlaceholder: 'வடிகட்டு (அழிக்க Esc)', popupListNoResults: 'முடிவுகள் இல்லை', triggerClearButtonAriaLabel: 'தேர்வை அழி', tagRemoveButtonAriaLabel: (itemText) => `${itemText} ஐ அகற்று`, // Tamil number agreement: neuter singular -athu for 1, plural -ana otherwise. triggerCountSummary: (chosenCount, totalCount) => { if (chosenCount === 1) { return `${totalCount} இல் 1 தேர்ந்தெடுக்கப்பட்டது`; } if (chosenCount === totalCount) { return `அனைத்தும் தேர்ந்தெடுக்கப்பட்டன (${chosenCount})`; } return `${totalCount} இல் ${chosenCount} தேர்ந்தெடுக்கப்பட்டன`; }, chooseAllRowText: (chosenCount, totalCount) => `அனைத்தையும் தேர்ந்தெடு (${chosenCount} / ${totalCount})`, }; /** * Thai pack. * @group Language packs */ const th = { triggerPlaceholder: 'โปรดเลือก', filterInputAriaLabel: 'ค้นหา', filterInputPlaceholder: 'กรอง (กด Esc เพื่อล้าง)', popupListNoResults: 'ไม่พบผลลัพธ์', triggerClearButtonAriaLabel: 'ล้างการเลือก', tagRemoveButtonAriaLabel: (itemText) => `นำ ${itemText} ออก`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `เลือกแล้วทั้งหมด (${chosenCount})` : `เลือกแล้ว ${chosenCount} จาก ${totalCount}`, chooseAllRowText: (chosenCount, totalCount) => `เลือกทั้งหมด (${chosenCount} / ${totalCount})`, }; /** * Turkish pack. * @group Language packs */ const tr = { triggerPlaceholder: 'Lütfen seçin', filterInputAriaLabel: 'Ara', filterInputPlaceholder: 'Filtrele (temizlemek için Esc)', popupListNoResults: 'Sonuç bulunamadı', triggerClearButtonAriaLabel: 'Seçimi temizle', // The case suffix lands on the carrier noun "oge" (item), never on the // interpolated label (Turkish suffixes vary with vowel harmony). tagRemoveButtonAriaLabel: (itemText) => `${itemText} öğesini kaldır`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Tümü seçildi (${chosenCount})` : `${chosenCount} / ${totalCount} seçildi`, chooseAllRowText: (chosenCount, totalCount) => `Tümünü seç (${chosenCount} / ${totalCount})`, }; /** * Ukrainian pack. * @group Language packs */ const uk = { triggerPlaceholder: 'Виберіть', filterInputAriaLabel: 'Пошук', filterInputPlaceholder: 'Фільтр (Esc, щоб очистити)', popupListNoResults: 'Нічого не знайдено', triggerClearButtonAriaLabel: 'Очистити вибір', tagRemoveButtonAriaLabel: (itemText) => `Вилучити ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Вибрано всі (${chosenCount})` : `Вибрано ${chosenCount} з ${totalCount}`, chooseAllRowText: (chosenCount, totalCount) => `Вибрати всі (${chosenCount} / ${totalCount})`, }; /** * Urdu pack (RTL). * @group Language packs */ const ur = { triggerPlaceholder: 'براہ کرم منتخب کریں', filterInputAriaLabel: 'تلاش', filterInputPlaceholder: 'فلٹر (صاف کرنے کے لیے Esc)', popupListNoResults: 'کوئی نتیجہ نہیں ملا', triggerClearButtonAriaLabel: 'انتخاب صاف کریں', tagRemoveButtonAriaLabel: (itemText) => `${itemText} ہٹائیں`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `سب منتخب (${chosenCount})` : `${totalCount} میں سے ${chosenCount} منتخب`, chooseAllRowText: (chosenCount, totalCount) => `سب منتخب کریں (${chosenCount} / ${totalCount})`, }; /** * Vietnamese pack. * @group Language packs */ const vi = { triggerPlaceholder: 'Vui lòng chọn', filterInputAriaLabel: 'Tìm kiếm', filterInputPlaceholder: 'Lọc (Esc để xóa)', popupListNoResults: 'Không có kết quả', triggerClearButtonAriaLabel: 'Xóa lựa chọn', tagRemoveButtonAriaLabel: (itemText) => `Bỏ ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `Đã chọn tất cả ${chosenCount}` : `Đã chọn ${chosenCount} / ${totalCount}`, chooseAllRowText: (chosenCount, totalCount) => `Chọn tất cả (${chosenCount} / ${totalCount})`, }; /** * Cantonese pack (written VERNACULAR Cantonese, Hong Kong). Deliberately a * different register from `zh-HK` (which is formal written Chinese and * aliases to `zh-TW`): pick `yue` only when the product speaks colloquial * Cantonese on purpose. * @group Language packs */ const yue = { triggerPlaceholder: '請揀', filterInputAriaLabel: '搜尋', filterInputPlaceholder: '篩選(撳 Esc 清走)', popupListNoResults: '搵唔到結果', triggerClearButtonAriaLabel: '清走揀咗嘅嘢', tagRemoveButtonAriaLabel: (itemText) => `移走 ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `全部 ${chosenCount} 項都揀咗` : `${totalCount} 項揀咗 ${chosenCount} 項`, chooseAllRowText: (chosenCount, totalCount) => `全部揀晒(${chosenCount} / ${totalCount})`, }; /** * Simplified Chinese (mainland) pack. * @group Language packs */ const zhCN = { triggerPlaceholder: '请选择', filterInputAriaLabel: '搜索', filterInputPlaceholder: '筛选(按 Esc 清除)', popupListNoResults: '没有匹配的结果', triggerClearButtonAriaLabel: '清除选择', tagRemoveButtonAriaLabel: (itemText) => `移除 ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `已选全部 ${chosenCount} 项` : `已选 ${chosenCount} / ${totalCount} 项`, chooseAllRowText: (chosenCount, totalCount) => `全选(${chosenCount} / ${totalCount})`, }; /** * Traditional Chinese (Taiwan) pack (`zh-HK` resolves here in uiTranslationPackByLocale). * @group Language packs */ const zhTW = { triggerPlaceholder: '請選擇', filterInputAriaLabel: '搜尋', filterInputPlaceholder: '篩選(按 Esc 清除)', popupListNoResults: '沒有符合的結果', triggerClearButtonAriaLabel: '清除選擇', tagRemoveButtonAriaLabel: (itemText) => `移除 ${itemText}`, triggerCountSummary: (chosenCount, totalCount) => chosenCount === totalCount ? `已選全部 ${chosenCount} 項` : `已選 ${chosenCount} / ${totalCount} 項`, chooseAllRowText: (chosenCount, totalCount) => `全選(${chosenCount} / ${totalCount})`, }; /** * Language packs for the UI chrome - the `@llselect/core/i18n` subpath. Pure * data, tree-shakeable; spread a pack into the `uiTranslationPack` setting. * @module @llselect/core/i18n */ // Language packs - the `@llselect/core/i18n` subpath entry, as a barrel: one // file per pack lives under src/i18n/ (including `en`, the built-in default); // this module defines the pack contract, re-exports them and builds the locale index. Pure data: each pack is // a complete LLSelectUiTranslationPack spreadable into the `uiTranslationPack` setting (`uiTranslationPack: zhTW`, // or `uiTranslationPack: { ...zhTW, filterInputPlaceholder: '...' }` for per-key // overrides). This module never imports base.ts, so importing // a pack costs bytes, not behavior. // // Ordering: packs and the uiTranslationPackByLocale keys are sorted alphabetically by // BCP 47 tag (CLDR convention; keeps diffs mechanical). // // Typography: the Chinese-script packs (zh-TW / zh-CN / yue / nan-TW) put a // space between CJK and half-width characters (Pangu spacing); ja follows // Japanese convention (no such spacing). ar / fa / he / ur strings are RTL; // embedded Latin runs ("Esc") reorder via the Unicode Bidi Algorithm. // // Grammar traps deliberately avoided: languages that inflect around numerals // or attach suffixes to interpolated words use invariant frames instead - an // impersonal passive (Slavic "Vybrano n z t"), a label-colon form (kk / mn // "Selected: n / t"), or a carrier noun taking the suffix (tr "X ogesini // kaldir"); fr / es / it / pt / ro / sv / hi branch on chosenCount === 1. // // TRANSLATION STATUS: // - user-vetted: zh-TW. Library source: en (src/i18n/en.ts). // - LLM-drafted, cross-reviewed by a second model, native sign-off pending: // all remaining packs. Within those, LOWER CONFIDENCE (review first if you // ship them prominently): ga, is, kk, mn, my, km, bn, ur, lt, lv, sw, ta, // yue. // - nan-TW and nan-Latn-tailo are DRAFTS for the maintainer's own native // vetting; do not treat them as shipped-quality until this flag is removed. /** * All packs keyed by their BCP 47 tag, for `navigator.language`-style lookup. * - Tags are the MINIMAL sufficient form (BCP 47 / CLDR convention): `ja` and * `en` carry no region (the strings are not region-specific); `zh-TW` / * `zh-CN` must (Traditional vs Simplified differ entirely); `en` / `es` / * `pt` are deliberately unsplit (these strings do not differ by region). * Named exports stay camelCase (`zhTW`, `nanTW`) only because `-` is * illegal in a JS identifier. * - Alias keys map onto another tag's pack object: `no` -> `nb` (macrolanguage * tag browsers still report), `zh-HK` -> `zh-TW` (formal written Chinese; * these strings do not differ - written VERNACULAR Cantonese is the * separate primary tag `yue`). * - Script / orthography variants of one language differ by subtag, not by * language id: `nan-TW` (Han) vs `nan-Latn-tailo` (Tai-lo romanization). * - Browsers may report longer or different tags (`en-GB`, `ja-JP`, * `zh-Hant-TW`), so negotiate instead of indexing blindly - e.g. try the * full tag, then the base language, then fall back: * `uiTranslationPackByLocale[tag] ?? uiTranslationPackByLocale[tag.split('-')[0]!] ?? en`. * @group Language packs */ const uiTranslationPackByLocale = { ar, bg, bn, ca, cs, da, de, el, en, es, et, fa, fi, fil, fr, ga, he, hi, hr, hu, id, is, it, ja, kk, km, ko, lt, lv, mn, ms, my, 'nan-Latn-tailo': nanLatnTailo, 'nan-TW': nanTW, nb, nl, no: nb, pl, pt, ro, ru, sk, sl, sr, sv, sw, ta, th, tr, uk, ur, vi, yue, 'zh-CN': zhCN, 'zh-HK': zhTW, 'zh-TW': zhTW, }; export { ar, bg, bn, ca, cs, da, de, el, en, es, et, fa, fi, fil, fr, ga, he, hi, hr, hu, id, is, it, ja, kk, km, ko, lt, lv, mn, ms, my, nanLatnTailo, nanTW, nb, nl, pl, pt, ro, ru, sk, sl, sr, sv, sw, ta, th, tr, uiTranslationPackByLocale, uk, ur, vi, yue, zhCN, zhTW }; //# sourceMappingURL=i18n.mjs.map