@kanso-labs/react-native-kanso-ui 0.6.0 → 0.8.0
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/README.md +37 -0
- package/dist/badge/index.js +25 -23
- package/dist/badge/index.js.map +1 -1
- package/dist/button/index.d.ts +2 -1
- package/dist/button/index.js.map +1 -1
- package/dist/button/pending.js +17 -21
- package/dist/button/pending.js.map +1 -1
- package/dist/calendar/index.js +1182 -0
- package/dist/calendar/index.js.map +1 -0
- package/dist/calendar/styles.js +120 -0
- package/dist/calendar/styles.js.map +1 -0
- package/dist/components/autocomplete/index.js +28 -26
- package/dist/components/autocomplete/index.js.map +1 -1
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/avatar/index.js +2 -2
- package/dist/components/avatar/index.js.map +1 -1
- package/dist/components/calendar/index.d.ts +51 -0
- package/dist/components/calendar/index.js +121 -0
- package/dist/components/calendar/index.js.map +1 -0
- package/dist/components/chip-group/index.d.ts +4 -3
- package/dist/components/chip-group/index.js +47 -45
- package/dist/components/chip-group/index.js.map +1 -1
- package/dist/components/copy-field/index.d.ts +5 -5
- package/dist/components/copy-field/index.js +30 -28
- package/dist/components/copy-field/index.js.map +1 -1
- package/dist/components/currency/index.d.ts +2 -2
- package/dist/components/currency/index.js +3 -1
- package/dist/components/currency/index.js.map +1 -1
- package/dist/components/list/index.d.ts +6 -5
- package/dist/components/list/index.js +97 -106
- package/dist/components/list/index.js.map +1 -1
- package/dist/components/menu/index.d.ts +4 -3
- package/dist/components/menu/index.js +33 -40
- package/dist/components/menu/index.js.map +1 -1
- package/dist/components/meter/index.d.ts +2 -1
- package/dist/components/meter/index.js +9 -7
- package/dist/components/meter/index.js.map +1 -1
- package/dist/components/navigation-bar/index.d.ts +3 -9
- package/dist/components/navigation-bar/index.js +10 -34
- package/dist/components/navigation-bar/index.js.map +1 -1
- package/dist/components/navigation-rail/index.d.ts +68 -0
- package/dist/components/navigation-rail/index.js +294 -0
- package/dist/components/navigation-rail/index.js.map +1 -0
- package/dist/components/number-field/index.d.ts +7 -3
- package/dist/components/number-field/index.js +214 -192
- package/dist/components/number-field/index.js.map +1 -1
- package/dist/components/popover/index.js +1 -1
- package/dist/components/product-icon/index.d.ts +2 -2
- package/dist/components/product-icon/index.js +2 -2
- package/dist/components/product-icon/index.js.map +1 -1
- package/dist/components/progress-indicator/index.d.ts +2 -1
- package/dist/components/progress-indicator/index.js +15 -13
- package/dist/components/progress-indicator/index.js.map +1 -1
- package/dist/components/search-field/index.d.ts +3 -3
- package/dist/components/search-field/index.js +105 -104
- package/dist/components/search-field/index.js.map +1 -1
- package/dist/components/sheet/index.d.ts +2 -2
- package/dist/components/sheet/index.js +22 -26
- package/dist/components/sheet/index.js.map +1 -1
- package/dist/components/snackbar/index.d.ts +3 -3
- package/dist/components/snackbar/index.js +36 -34
- package/dist/components/snackbar/index.js.map +1 -1
- package/dist/components/tag/index.d.ts +58 -0
- package/dist/components/tag/index.js +205 -0
- package/dist/components/tag/index.js.map +1 -0
- package/dist/components/text-field/index.d.ts +6 -3
- package/dist/components/text-field/index.js +3 -0
- package/dist/components/text-field/index.js.map +1 -1
- package/dist/field/index.js +39 -36
- package/dist/field/index.js.map +1 -1
- package/dist/glyphs/index.js +19 -1
- package/dist/glyphs/index.js.map +1 -1
- package/dist/i18n/index.js +12 -1
- package/dist/i18n/index.js.map +1 -1
- package/dist/i18n/messages.js +741 -0
- package/dist/i18n/messages.js.map +1 -1
- package/dist/i18n/provider.d.ts +53 -0
- package/dist/i18n/provider.js +96 -0
- package/dist/i18n/provider.js.map +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +6 -2
- package/dist/indicator/index.js +1 -2
- package/dist/indicator/index.js.map +1 -1
- package/dist/mark/index.js +77 -117
- package/dist/mark/index.js.map +1 -1
- package/dist/mark/initials.js.map +1 -1
- package/dist/navigation/index.d.ts +8 -1
- package/dist/navigation/index.js +113 -64
- package/dist/navigation/index.js.map +1 -1
- package/dist/navigation/styles.js +22 -0
- package/dist/navigation/styles.js.map +1 -1
- package/dist/number/count.js +15 -0
- package/dist/number/count.js.map +1 -0
- package/dist/number/locale.js.map +1 -1
- package/dist/overlay/host.js +30 -21
- package/dist/overlay/host.js.map +1 -1
- package/package.json +3 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messages.js","names":["LibraryMessages","dragHandle","loading","loadingMore","noResults","results","one","other","select","MESSAGES","Readonly","Record"],"sources":["../../src/i18n/messages.ts"],"sourcesContent":["// The words the library writes itself: the pending ring's name, a bottom\n// sheet's drag handle, a collection's loading-more and empty rows, what\n// selecting a list's row is called, and how many rows a search leaves. Each\n// but the last stands behind a prop that names it otherwise: `pendingLabel`\n// for the ring, `aria-label` for the handle, `label` for the loading-more\n// row, `renderEmptyState` for the empty one and `selectLabel` for the\n// selection.\n//\n// Copied from kanso-ui's src/i18n/messages.ts, one entry per locale React\n// Aria ships, and kept in step with it by hand: the web library publishes no\n// copy of its table, and a word that differs between the two would name the\n// same ring two ways. The handle's name is this table's alone, since web's\n// sheet draws its handle as decoration and names nothing. `select` is React\n// Aria's own word for a grid list row's checkbox, which web's List takes\n// from React Aria's tables rather than its own, copied here so the two read\n// the same. `results` is React Aria's too, the count its ComboBox announces,\n// which Autocomplete announces as a search narrows a list. The others were\n// drafted for kanso-ui's table rather than taken from a translation service,\n// and each one wants a native speaker's eye before it is trusted; a call\n// site can always pass its own words through the prop.\n\ntype LibraryMessages = {\n /** What a bottom sheet's handle is called, where it is a control. */\n readonly dragHandle: string\n /** What a pending button's ring is called. */\n readonly loading: string\n /** What a collection's row says while more items are on their way. */\n readonly loadingMore: string\n /** What a collection with nothing in it says. */\n readonly noResults: string\n /**\n * How many rows a search leaves, for a screen reader, in the plural\n * forms React Aria's table gives the locale; `{count}` is the number.\n */\n readonly results: {\n readonly one: string\n readonly other: string\n }\n /** What selecting a list's row is called, beside its checkbox. */\n readonly select: string\n}\n\nconst MESSAGES: Readonly<Record<string, LibraryMessages>> = {\n 'ar-AE': {\n dragHandle: 'مقبض السحب',\n loading: 'جارٍ التحميل',\n loadingMore: 'جارٍ تحميل المزيد',\n noResults: 'لا توجد نتائج',\n results: {\n one: '{count} خيار متاحة.',\n other: '{count} خيارات متاحة.',\n },\n select: 'تحديد',\n },\n 'bg-BG': {\n dragHandle: 'Манипулатор за плъзгане',\n loading: 'Зареждане',\n loadingMore: 'Зареждане на още',\n noResults: 'Няма резултати',\n results: {\n one: '{count} опция на разположение.',\n other: '{count} опции на разположение.',\n },\n select: 'Изберете',\n },\n 'cs-CZ': {\n dragHandle: 'Úchyt pro přetažení',\n loading: 'Načítání',\n loadingMore: 'Načítání dalších',\n noResults: 'Žádné výsledky',\n results: {\n one: 'K dispozici je {count} možnost.',\n other: 'K dispozici jsou/je {count} možnosti/-í.',\n },\n select: 'Vybrat',\n },\n 'da-DK': {\n dragHandle: 'Trækhåndtag',\n loading: 'Indlæser',\n loadingMore: 'Indlæser flere',\n noResults: 'Ingen resultater',\n results: {\n one: '{count} mulighed tilgængelig.',\n other: '{count} muligheder tilgængelige.',\n },\n select: 'Vælg',\n },\n 'de-DE': {\n dragHandle: 'Ziehpunkt',\n loading: 'Wird geladen',\n loadingMore: 'Weitere werden geladen',\n noResults: 'Keine Ergebnisse',\n results: {\n one: '{count} Option verfügbar.',\n other: '{count} Optionen verfügbar.',\n },\n select: 'Auswählen',\n },\n 'el-GR': {\n dragHandle: 'Λαβή μεταφοράς',\n loading: 'Φόρτωση',\n loadingMore: 'Φόρτωση περισσότερων',\n noResults: 'Δεν υπάρχουν αποτελέσματα',\n results: {\n one: '{count} επιλογή διαθέσιμες.',\n other: '{count} επιλογές διαθέσιμες.',\n },\n select: 'Επιλογή',\n },\n 'en-US': {\n dragHandle: 'Drag handle',\n loading: 'Loading',\n loadingMore: 'Loading more',\n noResults: 'No results',\n results: {\n one: '{count} option available.',\n other: '{count} options available.',\n },\n select: 'Select',\n },\n 'es-ES': {\n dragHandle: 'Control de arrastre',\n loading: 'Cargando',\n loadingMore: 'Cargando más',\n noResults: 'No hay resultados',\n results: {\n one: '{count} opción disponible(s).',\n other: '{count} opciones disponible(s).',\n },\n select: 'Seleccionar',\n },\n 'et-EE': {\n dragHandle: 'Lohistamispide',\n loading: 'Laadimine',\n loadingMore: 'Laaditakse veel',\n noResults: 'Tulemusi pole',\n results: {\n one: '{count} valik saadaval.',\n other: '{count} valikud saadaval.',\n },\n select: 'Vali',\n },\n 'fi-FI': {\n dragHandle: 'Vetokahva',\n loading: 'Ladataan',\n loadingMore: 'Ladataan lisää',\n noResults: 'Ei tuloksia',\n results: {\n one: '{count} vaihtoehto saatavilla.',\n other: '{count} vaihtoehtoa saatavilla.',\n },\n select: 'Valitse',\n },\n 'fr-FR': {\n dragHandle: 'Poignée de déplacement',\n loading: 'Chargement',\n loadingMore: 'Chargement de la suite',\n noResults: 'Aucun résultat',\n results: {\n one: '{count} option disponible(s).',\n other: '{count} options disponible(s).',\n },\n select: 'Sélectionner',\n },\n 'he-IL': {\n dragHandle: 'ידית גרירה',\n loading: 'טוען',\n loadingMore: 'טוען עוד',\n noResults: 'אין תוצאות',\n results: {\n one: 'אפשרות {count} במצב זמין.',\n other: '{count} אפשרויות במצב זמין.',\n },\n select: 'בחר',\n },\n 'hr-HR': {\n dragHandle: 'Ručica za povlačenje',\n loading: 'Učitavanje',\n loadingMore: 'Učitava se još',\n noResults: 'Nema rezultata',\n results: {\n one: 'Dostupno još: {count} opcija.',\n other: 'Dostupno još: {count} opcije/a.',\n },\n select: 'Odaberite',\n },\n 'hu-HU': {\n dragHandle: 'Húzófogantyú',\n loading: 'Betöltés',\n loadingMore: 'Továbbiak betöltése',\n noResults: 'Nincs találat',\n results: {\n one: '{count} lehetőség áll rendelkezésre.',\n other: '{count} lehetőség áll rendelkezésre.',\n },\n select: 'Kijelölés',\n },\n 'it-IT': {\n dragHandle: 'Punto di trascinamento',\n loading: 'Caricamento',\n loadingMore: 'Caricamento di altri elementi',\n noResults: 'Nessun risultato',\n results: {\n one: '{count} opzione disponibile.',\n other: '{count} opzioni disponibili.',\n },\n select: 'Seleziona',\n },\n 'ja-JP': {\n dragHandle: 'ドラッグハンドル',\n loading: '読み込み中',\n loadingMore: 'さらに読み込み中',\n noResults: '結果がありません',\n results: {\n one: '{count} 個のオプションを利用できます。',\n other: '{count} 個のオプションを利用できます。',\n },\n select: '選択',\n },\n 'ko-KR': {\n dragHandle: '드래그 핸들',\n loading: '로드 중',\n loadingMore: '더 로드하는 중',\n noResults: '결과 없음',\n results: {\n one: '{count}개 옵션을 사용할 수 있습니다.',\n other: '{count}개 옵션을 사용할 수 있습니다.',\n },\n select: '선택',\n },\n 'lt-LT': {\n dragHandle: 'Vilkimo rankenėlė',\n loading: 'Įkeliama',\n loadingMore: 'Įkeliama daugiau',\n noResults: 'Rezultatų nėra',\n results: {\n one: 'Yra {count} parinktis.',\n other: 'Yra {count} parinktys (-ių).',\n },\n select: 'Pasirinkti',\n },\n 'lv-LV': {\n dragHandle: 'Vilkšanas turis',\n loading: 'Notiek ielāde',\n loadingMore: 'Notiek papildu ielāde',\n noResults: 'Nav rezultātu',\n results: {\n one: 'Pieejamo opciju skaits: {count} opcija.',\n other: 'Pieejamo opciju skaits: {count} opcijas.',\n },\n select: 'Atlasīt',\n },\n 'nb-NO': {\n dragHandle: 'Drahåndtak',\n loading: 'Laster inn',\n loadingMore: 'Laster inn flere',\n noResults: 'Ingen resultater',\n results: {\n one: '{count} alternativ finnes.',\n other: '{count} alternativer finnes.',\n },\n select: 'Velg',\n },\n 'nl-NL': {\n dragHandle: 'Sleepgreep',\n loading: 'Laden',\n loadingMore: 'Meer laden',\n noResults: 'Geen resultaten',\n results: {\n one: '{count} optie beschikbaar.',\n other: '{count} opties beschikbaar.',\n },\n select: 'Selecteren',\n },\n 'pl-PL': {\n dragHandle: 'Uchwyt do przeciągania',\n loading: 'Ładowanie',\n loadingMore: 'Ładowanie kolejnych',\n noResults: 'Brak wyników',\n results: {\n one: 'dostępna/dostępne(-nych) {count} opcja.',\n other: 'dostępna/dostępne(-nych) {count} opcje(-i).',\n },\n select: 'Zaznacz',\n },\n 'pt-BR': {\n dragHandle: 'Alça de arrastar',\n loading: 'Carregando',\n loadingMore: 'Carregando mais',\n noResults: 'Nenhum resultado',\n results: {\n one: '{count} opção disponível.',\n other: '{count} opções disponível.',\n },\n select: 'Selecionar',\n },\n 'pt-PT': {\n dragHandle: 'Pega para arrastar',\n loading: 'A carregar',\n loadingMore: 'A carregar mais',\n noResults: 'Nenhum resultado',\n results: {\n one: '{count} opção disponível.',\n other: '{count} opções disponível.',\n },\n select: 'Selecionar',\n },\n 'ro-RO': {\n dragHandle: 'Mâner de tragere',\n loading: 'Se încarcă',\n loadingMore: 'Se încarcă mai multe',\n noResults: 'Niciun rezultat',\n results: {\n one: '{count} opțiune disponibile.',\n other: '{count} opțiuni disponibile.',\n },\n select: 'Selectare',\n },\n 'ru-RU': {\n dragHandle: 'Маркер перемещения',\n loading: 'Загрузка',\n loadingMore: 'Загрузка ещё',\n noResults: 'Нет результатов',\n results: {\n one: '{count} параметр доступно.',\n other: '{count} параметров доступно.',\n },\n select: 'Выбрать',\n },\n 'sk-SK': {\n dragHandle: 'Úchyt na presúvanie',\n loading: 'Načítava sa',\n loadingMore: 'Načítavajú sa ďalšie',\n noResults: 'Žiadne výsledky',\n results: {\n one: '{count} možnosť k dispozícii.',\n other: '{count} možnosti/-í k dispozícii.',\n },\n select: 'Vybrať',\n },\n 'sl-SI': {\n dragHandle: 'Ročica za vlečenje',\n loading: 'Nalaganje',\n loadingMore: 'Nalaganje več',\n noResults: 'Ni rezultatov',\n results: {\n one: 'Na voljo je {count} opcija.',\n other: 'Na voljo je {count} opcije.',\n },\n select: 'Izberite',\n },\n 'sr-SP': {\n dragHandle: 'Ručica za prevlačenje',\n loading: 'Učitavanje',\n loadingMore: 'Učitavanje još',\n noResults: 'Nema rezultata',\n results: {\n one: 'Dostupno još: {count} opcija.',\n other: 'Dostupno još: {count} opcije/a.',\n },\n select: 'Izaberite',\n },\n 'sv-SE': {\n dragHandle: 'Draghandtag',\n loading: 'Läser in',\n loadingMore: 'Läser in fler',\n noResults: 'Inga resultat',\n results: {\n one: '{count} alternativ tillgängliga.',\n other: '{count} alternativ tillgängliga.',\n },\n select: 'Markera',\n },\n 'tr-TR': {\n dragHandle: 'Sürükleme tutamacı',\n loading: 'Yükleniyor',\n loadingMore: 'Daha fazlası yükleniyor',\n noResults: 'Sonuç yok',\n results: {\n one: '{count} seçenek kullanılabilir.',\n other: '{count} seçenekler kullanılabilir.',\n },\n select: 'Seç',\n },\n 'uk-UA': {\n dragHandle: 'Маркер переміщення',\n loading: 'Завантаження',\n loadingMore: 'Завантаження ще',\n noResults: 'Немає результатів',\n results: {\n one: '{count} параметр доступно.',\n other: '{count} параметри(-ів) доступно.',\n },\n select: 'Вибрати',\n },\n 'zh-CN': {\n dragHandle: '拖动手柄',\n loading: '正在加载',\n loadingMore: '正在加载更多',\n noResults: '没有结果',\n results: {\n one: '有 {count} 个选项可用。',\n other: '有 {count} 个选项可用。',\n },\n select: '选择',\n },\n 'zh-TW': {\n dragHandle: '拖曳控點',\n loading: '正在載入',\n loadingMore: '正在載入更多',\n noResults: '沒有結果',\n results: {\n one: '{count} 選項 可用。',\n other: '{count} 選項 可用。',\n },\n select: '選取',\n },\n}\n\nexport { MESSAGES }\nexport type { LibraryMessages }\n"],"mappings":";AA0CA,MAAMS,WAAsD;CAC1D,SAAS;EACPR,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACPP,YAAY;EACZC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;AACF"}
|
|
1
|
+
{"version":3,"file":"messages.js","names":["LibraryMessages","calendar","dateSelected","maximumDate","minimumDate","month","next","previous","todayDate","todayDateSelected","year","characterLimit","PluralForms","clearSearch","close","copied","copy","decrease","dragHandle","increase","loading","loadingMore","noResults","remove","results","one","other","select","Partial","Record","Intl","LDMLPluralRule","MESSAGES","Readonly","few","many","two","zero"],"sources":["../../src/i18n/messages.ts"],"sourcesContent":["// The words the library writes itself: the pending ring's name, a bottom\n// sheet's drag handle, a collection's loading-more and empty rows, what\n// selecting a list's row is called, how many rows a search leaves, a\n// calendar's, a field's character limit, CopyField's button, the names of\n// SearchField's clear button, Snackbar's close button, a chip's remove button\n// and NumberField's steppers. Each one a call site might want in other words\n// stands behind a prop that names it otherwise: `pendingLabel` for the ring,\n// `aria-label` for the handle, `label` for the loading-more row,\n// `renderEmptyState` for the empty one, `selectLabel` for the selection,\n// `characterLimitLabel` for the limit, `copyLabel` and `copiedLabel` for\n// CopyField, `clearLabel`, `closeLabel` and `removeLabel` for the three\n// buttons, and `decrementLabel` and `incrementLabel` for the steppers.\n//\n// Copied from kanso-ui's src/i18n/messages.ts, one entry per locale React\n// Aria ships, and kept in step with it by hand: the web library publishes no\n// copy of its table, and a word that differs between the two would name the\n// same ring two ways. The handle's name is this table's alone, since web's\n// sheet draws its handle as decoration and names nothing. `select` is React\n// Aria's own word for a grid list row's checkbox, which web's List takes\n// from React Aria's tables rather than its own, copied here so the two read\n// the same. `results` is React Aria's too, the count its ComboBox announces,\n// which Autocomplete announces as a search narrows a list. `calendar` is\n// React Aria's calendar dictionary, which web's Calendar reads, beside the\n// names of the month and year fields that web reads from the browser's\n// `Intl.DisplayNames` and Hermes lacks, written here from the same CLDR\n// data. `clearSearch`, `close`, `decrease`, `increase` and `remove` are React\n// Aria's as well, from the search field, toast, number field and tag\n// dictionaries its own controls name those buttons from on web. The others\n// were drafted for kanso-ui's table rather than taken from a translation\n// service, and each one wants a native speaker's eye before it is trusted; a\n// call site can always pass its own words through the prop.\n\ntype LibraryMessages = {\n /**\n * The words a calendar writes: its two chevrons, the names its dates\n * take, where `{date}` is the date written out in full, and the fields\n * its month and year menus are named by.\n */\n readonly calendar: {\n /** A date the calendar holds. */\n readonly dateSelected: string\n /** Added after the latest date `maxValue` allows. */\n readonly maximumDate: string\n /** Added after the earliest date `minValue` allows. */\n readonly minimumDate: string\n /** What the month is called, after the month a menu button shows. */\n readonly month: string\n /** The chevron that moves to the next month. */\n readonly next: string\n /** The chevron that moves to the previous month. */\n readonly previous: string\n /** Today, when the calendar does not hold it. */\n readonly todayDate: string\n /** Today, when the calendar holds it. */\n readonly todayDateSelected: string\n /** What the year is called, after the year a menu button shows. */\n readonly year: string\n }\n /**\n * What a field's character limit says, for a screen reader, in the plural\n * forms the locale's rules give it; `{count}` is the limit.\n */\n readonly characterLimit: PluralForms\n /** What SearchField's clear button is called. */\n readonly clearSearch: string\n /** What Snackbar's close button is called. */\n readonly close: string\n /** What CopyField's button says, and announces, once it has copied. */\n readonly copied: string\n /** What CopyField's button says. */\n readonly copy: string\n /**\n * What NumberField's stepper that lowers the value is called; `{label}`\n * is the field's label.\n */\n readonly decrease: string\n /** What a bottom sheet's handle is called, where it is a control. */\n readonly dragHandle: string\n /**\n * What NumberField's stepper that raises the value is called; `{label}`\n * is the field's label.\n */\n readonly increase: string\n /** What a pending button's ring is called. */\n readonly loading: string\n /** What a collection's row says while more items are on their way. */\n readonly loadingMore: string\n /** What a collection with nothing in it says. */\n readonly noResults: string\n /**\n * What a removable chip's remove button is called, before the chip's own\n * text.\n */\n readonly remove: string\n /**\n * How many rows a search leaves, for a screen reader, in the plural\n * forms React Aria's table gives the locale; `{count}` is the number.\n */\n readonly results: {\n readonly one: string\n readonly other: string\n }\n /** What selecting a list's row is called, beside its checkbox. */\n readonly select: string\n}\n\n/**\n * A message in each plural form the locale's rules give it, where `other`\n * always stands in for a form the locale's entry leaves out.\n */\ntype PluralForms = Partial<Record<Intl.LDMLPluralRule, string>> & {\n readonly other: string\n}\n\nconst MESSAGES: Readonly<Record<string, LibraryMessages>> = {\n 'ar-AE': {\n calendar: {\n dateSelected: '{date} المحدد',\n maximumDate: 'آخر تاريخ متاح',\n minimumDate: 'أول تاريخ متاح',\n month: 'الشهر',\n next: 'التالي',\n previous: 'السابق',\n todayDate: 'اليوم، {date}',\n todayDateSelected: 'اليوم، {date} محدد',\n year: 'السنة',\n },\n characterLimit: {\n few: 'حتى {count} أحرف',\n many: 'حتى {count} حرفًا',\n one: 'حتى حرف واحد',\n other: 'حتى {count} حرف',\n two: 'حتى حرفين',\n zero: 'حتى {count} حرف',\n },\n clearSearch: 'مسح البحث',\n close: 'إغلاق',\n copied: 'تم النسخ',\n copy: 'نسخ',\n decrease: 'خفض {label}',\n dragHandle: 'مقبض السحب',\n increase: 'زيادة {label}',\n loading: 'جارٍ التحميل',\n loadingMore: 'جارٍ تحميل المزيد',\n noResults: 'لا توجد نتائج',\n remove: 'إزالة',\n results: {\n one: '{count} خيار متاحة.',\n other: '{count} خيارات متاحة.',\n },\n select: 'تحديد',\n },\n 'bg-BG': {\n calendar: {\n dateSelected: 'Избрано е {date}',\n maximumDate: 'Последна налична дата',\n minimumDate: 'Първа налична дата',\n month: 'месец',\n next: 'Напред',\n previous: 'Назад',\n todayDate: 'Днес, {date}',\n todayDateSelected: 'Днес, {date} са избрани',\n year: 'година',\n },\n characterLimit: {\n one: 'До {count} знак',\n other: 'До {count} знака',\n },\n clearSearch: 'Изчистване на търсене',\n close: 'Затвори',\n copied: 'Копирано',\n copy: 'Копиране',\n decrease: 'Намаляване {label}',\n dragHandle: 'Манипулатор за плъзгане',\n increase: 'Усилване {label}',\n loading: 'Зареждане',\n loadingMore: 'Зареждане на още',\n noResults: 'Няма резултати',\n remove: 'Премахване',\n results: {\n one: '{count} опция на разположение.',\n other: '{count} опции на разположение.',\n },\n select: 'Изберете',\n },\n 'cs-CZ': {\n calendar: {\n dateSelected: 'Vybráno {date}',\n maximumDate: 'Poslední dostupné datum',\n minimumDate: 'První dostupné datum',\n month: 'měsíc',\n next: 'Další',\n previous: 'Předchozí',\n todayDate: 'Dnes, {date}',\n todayDateSelected: 'Dnes, vybráno {date}',\n year: 'rok',\n },\n characterLimit: {\n few: 'Nejvýše {count} znaky',\n many: 'Nejvýše {count} znaku',\n one: 'Nejvýše {count} znak',\n other: 'Nejvýše {count} znaků',\n },\n clearSearch: 'Vymazat hledání',\n close: 'Zavřít',\n copied: 'Zkopírováno',\n copy: 'Kopírovat',\n decrease: 'Snížit {label}',\n dragHandle: 'Úchyt pro přetažení',\n increase: 'Zvýšit {label}',\n loading: 'Načítání',\n loadingMore: 'Načítání dalších',\n noResults: 'Žádné výsledky',\n remove: 'Odebrat',\n results: {\n one: 'K dispozici je {count} možnost.',\n other: 'K dispozici jsou/je {count} možnosti/-í.',\n },\n select: 'Vybrat',\n },\n 'da-DK': {\n calendar: {\n dateSelected: '{date} valgt',\n maximumDate: 'Sidste ledige dato',\n minimumDate: 'Første ledige dato',\n month: 'måned',\n next: 'Næste',\n previous: 'Forrige',\n todayDate: 'I dag, {date}',\n todayDateSelected: 'I dag, {date} valgt',\n year: 'år',\n },\n characterLimit: {\n other: 'Op til {count} tegn',\n },\n clearSearch: 'Ryd søgning',\n close: 'Luk',\n copied: 'Kopieret',\n copy: 'Kopiér',\n decrease: 'Reducer {label}',\n dragHandle: 'Trækhåndtag',\n increase: 'Øg {label}',\n loading: 'Indlæser',\n loadingMore: 'Indlæser flere',\n noResults: 'Ingen resultater',\n remove: 'Fjern',\n results: {\n one: '{count} mulighed tilgængelig.',\n other: '{count} muligheder tilgængelige.',\n },\n select: 'Vælg',\n },\n 'de-DE': {\n calendar: {\n dateSelected: '{date} ausgewählt',\n maximumDate: 'Letztes verfügbares Datum',\n minimumDate: 'Erstes verfügbares Datum',\n month: 'Monat',\n next: 'Weiter',\n previous: 'Zurück',\n todayDate: 'Heute, {date}',\n todayDateSelected: 'Heute, {date} ausgewählt',\n year: 'Jahr',\n },\n characterLimit: {\n other: 'Bis zu {count} Zeichen',\n },\n clearSearch: 'Suche zurücksetzen',\n close: 'Schließen',\n copied: 'Kopiert',\n copy: 'Kopieren',\n decrease: '{label} verringern',\n dragHandle: 'Ziehpunkt',\n increase: '{label} erhöhen',\n loading: 'Wird geladen',\n loadingMore: 'Weitere werden geladen',\n noResults: 'Keine Ergebnisse',\n remove: 'Entfernen',\n results: {\n one: '{count} Option verfügbar.',\n other: '{count} Optionen verfügbar.',\n },\n select: 'Auswählen',\n },\n 'el-GR': {\n calendar: {\n dateSelected: 'Επιλέχθηκε {date}',\n maximumDate: 'Τελευταία διαθέσιμη ημερομηνία',\n minimumDate: 'Πρώτη διαθέσιμη ημερομηνία',\n month: 'μήνας',\n next: 'Επόμενο',\n previous: 'Προηγούμενο',\n todayDate: 'Σήμερα, {date}',\n todayDateSelected: 'Σήμερα, επιλέχτηκε {date}',\n year: 'έτος',\n },\n characterLimit: {\n one: 'Έως {count} χαρακτήρας',\n other: 'Έως {count} χαρακτήρες',\n },\n clearSearch: 'Απαλοιφή αναζήτησης',\n close: 'Κλείσιμο',\n copied: 'Αντιγράφηκε',\n copy: 'Αντιγραφή',\n decrease: 'Μείωση {label}',\n dragHandle: 'Λαβή μεταφοράς',\n increase: 'Αύξηση {label}',\n loading: 'Φόρτωση',\n loadingMore: 'Φόρτωση περισσότερων',\n noResults: 'Δεν υπάρχουν αποτελέσματα',\n remove: 'Κατάργηση',\n results: {\n one: '{count} επιλογή διαθέσιμες.',\n other: '{count} επιλογές διαθέσιμες.',\n },\n select: 'Επιλογή',\n },\n 'en-US': {\n calendar: {\n dateSelected: '{date} selected',\n maximumDate: 'Last available date',\n minimumDate: 'First available date',\n month: 'month',\n next: 'Next',\n previous: 'Previous',\n todayDate: 'Today, {date}',\n todayDateSelected: 'Today, {date} selected',\n year: 'year',\n },\n characterLimit: {\n one: 'Up to {count} character',\n other: 'Up to {count} characters',\n },\n clearSearch: 'Clear search',\n close: 'Close',\n copied: 'Copied',\n copy: 'Copy',\n decrease: 'Decrease {label}',\n dragHandle: 'Drag handle',\n increase: 'Increase {label}',\n loading: 'Loading',\n loadingMore: 'Loading more',\n noResults: 'No results',\n remove: 'Remove',\n results: {\n one: '{count} option available.',\n other: '{count} options available.',\n },\n select: 'Select',\n },\n 'es-ES': {\n calendar: {\n dateSelected: '{date} seleccionado',\n maximumDate: 'Última fecha disponible',\n minimumDate: 'Primera fecha disponible',\n month: 'mes',\n next: 'Siguiente',\n previous: 'Anterior',\n todayDate: 'Hoy, {date}',\n todayDateSelected: 'Hoy, {date} seleccionado',\n year: 'año',\n },\n characterLimit: {\n one: 'Hasta {count} carácter',\n other: 'Hasta {count} caracteres',\n },\n clearSearch: 'Borrar búsqueda',\n close: 'Cerrar',\n copied: 'Copiado',\n copy: 'Copiar',\n decrease: 'Reducir {label}',\n dragHandle: 'Control de arrastre',\n increase: 'Aumentar {label}',\n loading: 'Cargando',\n loadingMore: 'Cargando más',\n noResults: 'No hay resultados',\n remove: 'Quitar',\n results: {\n one: '{count} opción disponible(s).',\n other: '{count} opciones disponible(s).',\n },\n select: 'Seleccionar',\n },\n 'et-EE': {\n calendar: {\n dateSelected: '{date} valitud',\n maximumDate: 'Viimane saadaolev kuupäev',\n minimumDate: 'Esimene saadaolev kuupäev',\n month: 'kuu',\n next: 'Järgmine',\n previous: 'Eelmine',\n todayDate: 'Täna, {date}',\n todayDateSelected: 'Täna, {date} valitud',\n year: 'aasta',\n },\n characterLimit: {\n one: 'Kuni {count} märk',\n other: 'Kuni {count} märki',\n },\n clearSearch: 'Tühjenda otsing',\n close: 'Sule',\n copied: 'Kopeeritud',\n copy: 'Kopeeri',\n decrease: 'Vähenda {label}',\n dragHandle: 'Lohistamispide',\n increase: 'Suurenda {label}',\n loading: 'Laadimine',\n loadingMore: 'Laaditakse veel',\n noResults: 'Tulemusi pole',\n remove: 'Eemalda',\n results: {\n one: '{count} valik saadaval.',\n other: '{count} valikud saadaval.',\n },\n select: 'Vali',\n },\n 'fi-FI': {\n calendar: {\n dateSelected: '{date} valittu',\n maximumDate: 'Viimeinen varattavissa oleva päivämäärä',\n minimumDate: 'Ensimmäinen varattavissa oleva päivämäärä',\n month: 'kuukausi',\n next: 'Seuraava',\n previous: 'Edellinen',\n todayDate: 'Tänään, {date}',\n todayDateSelected: 'Tänään, {date} valittu',\n year: 'vuosi',\n },\n characterLimit: {\n one: 'Enintään {count} merkki',\n other: 'Enintään {count} merkkiä',\n },\n clearSearch: 'Tyhjennä haku',\n close: 'Sulje',\n copied: 'Kopioitu',\n copy: 'Kopioi',\n decrease: 'Vähennä {label}',\n dragHandle: 'Vetokahva',\n increase: 'Lisää {label}',\n loading: 'Ladataan',\n loadingMore: 'Ladataan lisää',\n noResults: 'Ei tuloksia',\n remove: 'Poista',\n results: {\n one: '{count} vaihtoehto saatavilla.',\n other: '{count} vaihtoehtoa saatavilla.',\n },\n select: 'Valitse',\n },\n 'fr-FR': {\n calendar: {\n dateSelected: '{date} sélectionné',\n maximumDate: 'Dernière date disponible',\n minimumDate: 'Première date disponible',\n month: 'mois',\n next: 'Suivant',\n previous: 'Précédent',\n todayDate: \"Aujourd'hui, {date}\",\n todayDateSelected: 'Aujourd’hui, {date} sélectionné',\n year: 'année',\n },\n characterLimit: {\n one: 'Jusqu’à {count} caractère',\n other: 'Jusqu’à {count} caractères',\n },\n clearSearch: 'Effacer la recherche',\n close: 'Fermer',\n copied: 'Copié',\n copy: 'Copier',\n decrease: 'Diminuer {label}',\n dragHandle: 'Poignée de déplacement',\n increase: 'Augmenter {label}',\n loading: 'Chargement',\n loadingMore: 'Chargement de la suite',\n noResults: 'Aucun résultat',\n remove: 'Supprimer',\n results: {\n one: '{count} option disponible(s).',\n other: '{count} options disponible(s).',\n },\n select: 'Sélectionner',\n },\n 'he-IL': {\n calendar: {\n dateSelected: '{date} נבחר',\n maximumDate: 'תאריך פנוי אחרון',\n minimumDate: 'תאריך פנוי ראשון',\n month: 'חודש',\n next: 'הבא',\n previous: 'הקודם',\n todayDate: 'היום, {date}',\n todayDateSelected: 'היום, {date} נבחר',\n year: 'שנה',\n },\n characterLimit: {\n one: 'עד תו אחד',\n other: 'עד {count} תווים',\n two: 'עד שני תווים',\n },\n clearSearch: 'נקה חיפוש',\n close: 'סגור',\n copied: 'הועתק',\n copy: 'העתק',\n decrease: 'הקטן {label}',\n dragHandle: 'ידית גרירה',\n increase: 'הגדל {label}',\n loading: 'טוען',\n loadingMore: 'טוען עוד',\n noResults: 'אין תוצאות',\n remove: 'הסר',\n results: {\n one: 'אפשרות {count} במצב זמין.',\n other: '{count} אפשרויות במצב זמין.',\n },\n select: 'בחר',\n },\n 'hr-HR': {\n calendar: {\n dateSelected: '{date} odabran',\n maximumDate: 'Posljednji raspoloživi datum',\n minimumDate: 'Prvi raspoloživi datum',\n month: 'mjesec',\n next: 'Sljedeći',\n previous: 'Prethodni',\n todayDate: 'Danas, {date}',\n todayDateSelected: 'Danas, odabran {date}',\n year: 'godina',\n },\n characterLimit: {\n few: 'Najviše {count} znaka',\n one: 'Najviše {count} znak',\n other: 'Najviše {count} znakova',\n },\n clearSearch: 'Obriši pretragu',\n close: 'Zatvori',\n copied: 'Kopirano',\n copy: 'Kopiraj',\n decrease: 'Smanji {label}',\n dragHandle: 'Ručica za povlačenje',\n increase: 'Povećaj {label}',\n loading: 'Učitavanje',\n loadingMore: 'Učitava se još',\n noResults: 'Nema rezultata',\n remove: 'Ukloni',\n results: {\n one: 'Dostupno još: {count} opcija.',\n other: 'Dostupno još: {count} opcije/a.',\n },\n select: 'Odaberite',\n },\n 'hu-HU': {\n calendar: {\n dateSelected: '{date} kiválasztva',\n maximumDate: 'Utolsó elérhető dátum',\n minimumDate: 'Az első elérhető dátum',\n month: 'hónap',\n next: 'Következő',\n previous: 'Előző',\n todayDate: 'Ma, {date}',\n todayDateSelected: 'Ma, {date} kijelölve',\n year: 'év',\n },\n characterLimit: {\n other: 'Legfeljebb {count} karakter',\n },\n clearSearch: 'Keresés törlése',\n close: 'Bezárás',\n copied: 'Másolva',\n copy: 'Másolás',\n decrease: '{label} csökkentése',\n dragHandle: 'Húzófogantyú',\n increase: '{label} növelése',\n loading: 'Betöltés',\n loadingMore: 'Továbbiak betöltése',\n noResults: 'Nincs találat',\n remove: 'Eltávolítás',\n results: {\n one: '{count} lehetőség áll rendelkezésre.',\n other: '{count} lehetőség áll rendelkezésre.',\n },\n select: 'Kijelölés',\n },\n 'it-IT': {\n calendar: {\n dateSelected: '{date} selezionata',\n maximumDate: 'Ultima data disponibile',\n minimumDate: 'Prima data disponibile',\n month: 'mese',\n next: 'Successivo',\n previous: 'Precedente',\n todayDate: 'Oggi, {date}',\n todayDateSelected: 'Oggi, {date} selezionata',\n year: 'anno',\n },\n characterLimit: {\n one: 'Fino a {count} carattere',\n other: 'Fino a {count} caratteri',\n },\n clearSearch: 'Cancella ricerca',\n close: 'Chiudi',\n copied: 'Copiato',\n copy: 'Copia',\n decrease: 'Riduci {label}',\n dragHandle: 'Punto di trascinamento',\n increase: 'Aumenta {label}',\n loading: 'Caricamento',\n loadingMore: 'Caricamento di altri elementi',\n noResults: 'Nessun risultato',\n remove: 'Rimuovi',\n results: {\n one: '{count} opzione disponibile.',\n other: '{count} opzioni disponibili.',\n },\n select: 'Seleziona',\n },\n 'ja-JP': {\n calendar: {\n dateSelected: '{date} を選択',\n maximumDate: '最終利用可能日',\n minimumDate: '最初の利用可能日',\n month: '月',\n next: '次へ',\n previous: '前へ',\n todayDate: '本日、{date}',\n todayDateSelected: '本日、{date} を選択',\n year: '年',\n },\n characterLimit: {\n other: '最大 {count} 文字',\n },\n clearSearch: '検索をクリア',\n close: '閉じる',\n copied: 'コピーしました',\n copy: 'コピー',\n decrease: '{label}を縮小',\n dragHandle: 'ドラッグハンドル',\n increase: '{label}を拡大',\n loading: '読み込み中',\n loadingMore: 'さらに読み込み中',\n noResults: '結果がありません',\n remove: '削除',\n results: {\n one: '{count} 個のオプションを利用できます。',\n other: '{count} 個のオプションを利用できます。',\n },\n select: '選択',\n },\n 'ko-KR': {\n calendar: {\n dateSelected: '{date} 선택됨',\n maximumDate: '마지막으로 사용 가능한 일자',\n minimumDate: '처음으로 사용 가능한 일자',\n month: '월',\n next: '다음',\n previous: '이전',\n todayDate: '오늘, {date}',\n todayDateSelected: '오늘, {date} 선택됨',\n year: '년',\n },\n characterLimit: {\n other: '최대 {count}자',\n },\n clearSearch: '검색 지우기',\n close: '닫기',\n copied: '복사됨',\n copy: '복사',\n decrease: '{label} 감소',\n dragHandle: '드래그 핸들',\n increase: '{label} 증가',\n loading: '로드 중',\n loadingMore: '더 로드하는 중',\n noResults: '결과 없음',\n remove: '제거',\n results: {\n one: '{count}개 옵션을 사용할 수 있습니다.',\n other: '{count}개 옵션을 사용할 수 있습니다.',\n },\n select: '선택',\n },\n 'lt-LT': {\n calendar: {\n dateSelected: 'Pasirinkta {date}',\n maximumDate: 'Paskutinė galima data',\n minimumDate: 'Pirmoji galima data',\n month: 'mėnuo',\n next: 'Paskesnis',\n previous: 'Ankstesnis',\n todayDate: 'Šiandien, {date}',\n todayDateSelected: 'Šiandien, pasirinkta {date}',\n year: 'metai',\n },\n characterLimit: {\n few: 'Ne daugiau kaip {count} simboliai',\n many: 'Ne daugiau kaip {count} simbolio',\n one: 'Ne daugiau kaip {count} simbolis',\n other: 'Ne daugiau kaip {count} simbolių',\n },\n clearSearch: 'Išvalyti iešką',\n close: 'Uždaryti',\n copied: 'Nukopijuota',\n copy: 'Kopijuoti',\n decrease: 'Sumažinti {label}',\n dragHandle: 'Vilkimo rankenėlė',\n increase: 'Padidinti {label}',\n loading: 'Įkeliama',\n loadingMore: 'Įkeliama daugiau',\n noResults: 'Rezultatų nėra',\n remove: 'Pašalinti',\n results: {\n one: 'Yra {count} parinktis.',\n other: 'Yra {count} parinktys (-ių).',\n },\n select: 'Pasirinkti',\n },\n 'lv-LV': {\n calendar: {\n dateSelected: 'Atlasīts: {date}',\n maximumDate: 'Pēdējais pieejamais datums',\n minimumDate: 'Pirmais pieejamais datums',\n month: 'mēnesis',\n next: 'Tālāk',\n previous: 'Atpakaļ',\n todayDate: 'Šodien, {date}',\n todayDateSelected: 'Atlasīta šodiena, {date}',\n year: 'gads',\n },\n characterLimit: {\n one: 'Līdz {count} rakstzīmei',\n other: 'Līdz {count} rakstzīmēm',\n zero: 'Līdz {count} rakstzīmēm',\n },\n clearSearch: 'Notīrīt meklēšanu',\n close: 'Aizvērt',\n copied: 'Nokopēts',\n copy: 'Kopēt',\n decrease: 'Samazināšana {label}',\n dragHandle: 'Vilkšanas turis',\n increase: 'Palielināšana {label}',\n loading: 'Notiek ielāde',\n loadingMore: 'Notiek papildu ielāde',\n noResults: 'Nav rezultātu',\n remove: 'Noņemt',\n results: {\n one: 'Pieejamo opciju skaits: {count} opcija.',\n other: 'Pieejamo opciju skaits: {count} opcijas.',\n },\n select: 'Atlasīt',\n },\n 'nb-NO': {\n calendar: {\n dateSelected: '{date} valgt',\n maximumDate: 'Siste tilgjengelige dato',\n minimumDate: 'Første tilgjengelige dato',\n month: 'måned',\n next: 'Neste',\n previous: 'Forrige',\n todayDate: 'I dag, {date}',\n todayDateSelected: 'I dag, {date} valgt',\n year: 'år',\n },\n characterLimit: {\n other: 'Opptil {count} tegn',\n },\n clearSearch: 'Tøm søk',\n close: 'Lukk',\n copied: 'Kopiert',\n copy: 'Kopier',\n decrease: 'Reduser {label}',\n dragHandle: 'Drahåndtak',\n increase: 'Øk {label}',\n loading: 'Laster inn',\n loadingMore: 'Laster inn flere',\n noResults: 'Ingen resultater',\n remove: 'Fjern',\n results: {\n one: '{count} alternativ finnes.',\n other: '{count} alternativer finnes.',\n },\n select: 'Velg',\n },\n 'nl-NL': {\n calendar: {\n dateSelected: '{date} geselecteerd',\n maximumDate: 'Laatste beschikbare datum',\n minimumDate: 'Eerste beschikbare datum',\n month: 'maand',\n next: 'Volgende',\n previous: 'Vorige',\n todayDate: 'Vandaag, {date}',\n todayDateSelected: 'Vandaag, {date} geselecteerd',\n year: 'jaar',\n },\n characterLimit: {\n one: 'Maximaal {count} teken',\n other: 'Maximaal {count} tekens',\n },\n clearSearch: 'Zoekactie wissen',\n close: 'Sluiten',\n copied: 'Gekopieerd',\n copy: 'Kopiëren',\n decrease: '{label} verlagen',\n dragHandle: 'Sleepgreep',\n increase: '{label} verhogen',\n loading: 'Laden',\n loadingMore: 'Meer laden',\n noResults: 'Geen resultaten',\n remove: 'Verwijderen',\n results: {\n one: '{count} optie beschikbaar.',\n other: '{count} opties beschikbaar.',\n },\n select: 'Selecteren',\n },\n 'pl-PL': {\n calendar: {\n dateSelected: 'Wybrano {date}',\n maximumDate: 'Ostatnia dostępna data',\n minimumDate: 'Pierwsza dostępna data',\n month: 'miesiąc',\n next: 'Dalej',\n previous: 'Wstecz',\n todayDate: 'Dzisiaj, {date}',\n todayDateSelected: 'Dzisiaj wybrano {date}',\n year: 'rok',\n },\n characterLimit: {\n few: 'Maksymalnie {count} znaki',\n many: 'Maksymalnie {count} znaków',\n one: 'Maksymalnie {count} znak',\n other: 'Maksymalnie {count} znaku',\n },\n clearSearch: 'Wyczyść zawartość wyszukiwania',\n close: 'Zamknij',\n copied: 'Skopiowano',\n copy: 'Kopiuj',\n decrease: 'Zmniejsz {label}',\n dragHandle: 'Uchwyt do przeciągania',\n increase: 'Zwiększ {label}',\n loading: 'Ładowanie',\n loadingMore: 'Ładowanie kolejnych',\n noResults: 'Brak wyników',\n remove: 'Usuń',\n results: {\n one: 'dostępna/dostępne(-nych) {count} opcja.',\n other: 'dostępna/dostępne(-nych) {count} opcje(-i).',\n },\n select: 'Zaznacz',\n },\n 'pt-BR': {\n calendar: {\n dateSelected: '{date} selecionado',\n maximumDate: 'Última data disponível',\n minimumDate: 'Primeira data disponível',\n month: 'mês',\n next: 'Próximo',\n previous: 'Anterior',\n todayDate: 'Hoje, {date}',\n todayDateSelected: 'Hoje, {date} selecionado',\n year: 'ano',\n },\n characterLimit: {\n one: 'Até {count} caractere',\n other: 'Até {count} caracteres',\n },\n clearSearch: 'Limpar pesquisa',\n close: 'Fechar',\n copied: 'Copiado',\n copy: 'Copiar',\n decrease: 'Diminuir {label}',\n dragHandle: 'Alça de arrastar',\n increase: 'Aumentar {label}',\n loading: 'Carregando',\n loadingMore: 'Carregando mais',\n noResults: 'Nenhum resultado',\n remove: 'Remover',\n results: {\n one: '{count} opção disponível.',\n other: '{count} opções disponível.',\n },\n select: 'Selecionar',\n },\n 'pt-PT': {\n calendar: {\n dateSelected: '{date} selecionado',\n maximumDate: 'Última data disponível',\n minimumDate: 'Primeira data disponível',\n month: 'mês',\n next: 'Próximo',\n previous: 'Anterior',\n todayDate: 'Hoje, {date}',\n todayDateSelected: 'Hoje, {date} selecionado',\n year: 'ano',\n },\n characterLimit: {\n one: 'Até {count} carácter',\n other: 'Até {count} caracteres',\n },\n clearSearch: 'Limpar pesquisa',\n close: 'Fechar',\n copied: 'Copiado',\n copy: 'Copiar',\n decrease: 'Diminuir {label}',\n dragHandle: 'Pega para arrastar',\n increase: 'Aumentar {label}',\n loading: 'A carregar',\n loadingMore: 'A carregar mais',\n noResults: 'Nenhum resultado',\n remove: 'Eliminar',\n results: {\n one: '{count} opção disponível.',\n other: '{count} opções disponível.',\n },\n select: 'Selecionar',\n },\n 'ro-RO': {\n calendar: {\n dateSelected: '{date} selectată',\n maximumDate: 'Ultima dată disponibilă',\n minimumDate: 'Prima dată disponibilă',\n month: 'lună',\n next: 'Următorul',\n previous: 'Înainte',\n todayDate: 'Astăzi, {date}',\n todayDateSelected: 'Azi, {date} selectată',\n year: 'an',\n },\n characterLimit: {\n few: 'Maximum {count} caractere',\n one: 'Maximum {count} caracter',\n other: 'Maximum {count} de caractere',\n },\n clearSearch: 'Ştergeţi căutarea',\n close: 'Închideţi',\n copied: 'Copiat',\n copy: 'Copiați',\n decrease: 'Scădere {label}',\n dragHandle: 'Mâner de tragere',\n increase: 'Creștere {label}',\n loading: 'Se încarcă',\n loadingMore: 'Se încarcă mai multe',\n noResults: 'Niciun rezultat',\n remove: 'Îndepărtaţi',\n results: {\n one: '{count} opțiune disponibile.',\n other: '{count} opțiuni disponibile.',\n },\n select: 'Selectare',\n },\n 'ru-RU': {\n calendar: {\n dateSelected: 'Выбрано {date}',\n maximumDate: 'Последняя доступная дата',\n minimumDate: 'Первая доступная дата',\n month: 'месяц',\n next: 'Далее',\n previous: 'Назад',\n todayDate: 'Сегодня, {date}',\n todayDateSelected: 'Сегодня, выбрано {date}',\n year: 'год',\n },\n characterLimit: {\n few: 'Не более {count} символов',\n many: 'Не более {count} символов',\n one: 'Не более {count} символа',\n other: 'Не более {count} символа',\n },\n clearSearch: 'Очистить поиск',\n close: 'Закрыть',\n copied: 'Скопировано',\n copy: 'Копировать',\n decrease: 'Уменьшение {label}',\n dragHandle: 'Маркер перемещения',\n increase: 'Увеличение {label}',\n loading: 'Загрузка',\n loadingMore: 'Загрузка ещё',\n noResults: 'Нет результатов',\n remove: 'Удалить',\n results: {\n one: '{count} параметр доступно.',\n other: '{count} параметров доступно.',\n },\n select: 'Выбрать',\n },\n 'sk-SK': {\n calendar: {\n dateSelected: 'Vybratý dátum {date}',\n maximumDate: 'Posledný dostupný dátum',\n minimumDate: 'Prvý dostupný dátum',\n month: 'mesiac',\n next: 'Nasledujúce',\n previous: 'Predchádzajúce',\n todayDate: 'Dnes {date}',\n todayDateSelected: 'Vybratý dnešný dátum {date}',\n year: 'rok',\n },\n characterLimit: {\n few: 'Najviac {count} znaky',\n many: 'Najviac {count} znaku',\n one: 'Najviac {count} znak',\n other: 'Najviac {count} znakov',\n },\n clearSearch: 'Vymazať vyhľadávanie',\n close: 'Zatvoriť',\n copied: 'Skopírované',\n copy: 'Kopírovať',\n decrease: 'Znížiť {label}',\n dragHandle: 'Úchyt na presúvanie',\n increase: 'Zvýšiť {label}',\n loading: 'Načítava sa',\n loadingMore: 'Načítavajú sa ďalšie',\n noResults: 'Žiadne výsledky',\n remove: 'Odstrániť',\n results: {\n one: '{count} možnosť k dispozícii.',\n other: '{count} možnosti/-í k dispozícii.',\n },\n select: 'Vybrať',\n },\n 'sl-SI': {\n calendar: {\n dateSelected: '{date} izbrano',\n maximumDate: 'Zadnji razpoložljivi datum',\n minimumDate: 'Prvi razpoložljivi datum',\n month: 'mesec',\n next: 'Naprej',\n previous: 'Nazaj',\n todayDate: 'Danes, {date}',\n todayDateSelected: 'Danes, {date} izbrano',\n year: 'leto',\n },\n characterLimit: {\n few: 'Največ {count} znaki',\n one: 'Največ {count} znak',\n other: 'Največ {count} znakov',\n two: 'Največ {count} znaka',\n },\n clearSearch: 'Počisti iskanje',\n close: 'Zapri',\n copied: 'Kopirano',\n copy: 'Kopiraj',\n decrease: 'Upadati {label}',\n dragHandle: 'Ročica za vlečenje',\n increase: 'Povečajte {label}',\n loading: 'Nalaganje',\n loadingMore: 'Nalaganje več',\n noResults: 'Ni rezultatov',\n remove: 'Odstrani',\n results: {\n one: 'Na voljo je {count} opcija.',\n other: 'Na voljo je {count} opcije.',\n },\n select: 'Izberite',\n },\n 'sr-SP': {\n calendar: {\n dateSelected: '{date} izabran',\n maximumDate: 'Zadnji raspoloživi datum',\n minimumDate: 'Prvi raspoloživi datum',\n month: 'месец',\n next: 'Sledeći',\n previous: 'Prethodni',\n todayDate: 'Danas, {date}',\n todayDateSelected: 'Danas, izabran {date}',\n year: 'година',\n },\n characterLimit: {\n few: 'Najviše {count} znaka',\n one: 'Najviše {count} znak',\n other: 'Najviše {count} znakova',\n },\n clearSearch: 'Obriši pretragu',\n close: 'Zatvori',\n copied: 'Kopirano',\n copy: 'Kopiraj',\n decrease: 'Smanji {label}',\n dragHandle: 'Ručica za prevlačenje',\n increase: 'Povećaj {label}',\n loading: 'Učitavanje',\n loadingMore: 'Učitavanje još',\n noResults: 'Nema rezultata',\n remove: 'Ukloni',\n results: {\n one: 'Dostupno još: {count} opcija.',\n other: 'Dostupno još: {count} opcije/a.',\n },\n select: 'Izaberite',\n },\n 'sv-SE': {\n calendar: {\n dateSelected: '{date} har valts',\n maximumDate: 'Sista tillgängliga datum',\n minimumDate: 'Första tillgängliga datum',\n month: 'månad',\n next: 'Nästa',\n previous: 'Föregående',\n todayDate: 'Idag, {date}',\n todayDateSelected: 'Idag, {date} har valts',\n year: 'år',\n },\n characterLimit: {\n other: 'Högst {count} tecken',\n },\n clearSearch: 'Rensa sökning',\n close: 'Stäng',\n copied: 'Kopierat',\n copy: 'Kopiera',\n decrease: 'Minska {label}',\n dragHandle: 'Draghandtag',\n increase: 'Öka {label}',\n loading: 'Läser in',\n loadingMore: 'Läser in fler',\n noResults: 'Inga resultat',\n remove: 'Ta bort',\n results: {\n one: '{count} alternativ tillgängliga.',\n other: '{count} alternativ tillgängliga.',\n },\n select: 'Markera',\n },\n 'tr-TR': {\n calendar: {\n dateSelected: '{date} seçildi',\n maximumDate: 'Son müsait tarih',\n minimumDate: 'İlk müsait tarih',\n month: 'ay',\n next: 'Sonraki',\n previous: 'Önceki',\n todayDate: 'Bugün, {date}',\n todayDateSelected: 'Bugün, {date} seçildi',\n year: 'yıl',\n },\n characterLimit: {\n other: 'En fazla {count} karakter',\n },\n clearSearch: 'Aramayı temizle',\n close: 'Kapat',\n copied: 'Kopyalandı',\n copy: 'Kopyala',\n decrease: '{label} azalt',\n dragHandle: 'Sürükleme tutamacı',\n increase: '{label} arttır',\n loading: 'Yükleniyor',\n loadingMore: 'Daha fazlası yükleniyor',\n noResults: 'Sonuç yok',\n remove: 'Kaldır',\n results: {\n one: '{count} seçenek kullanılabilir.',\n other: '{count} seçenekler kullanılabilir.',\n },\n select: 'Seç',\n },\n 'uk-UA': {\n calendar: {\n dateSelected: 'Вибрано {date}',\n maximumDate: 'Остання доступна дата',\n minimumDate: 'Перша доступна дата',\n month: 'місяць',\n next: 'Наступний',\n previous: 'Попередній',\n todayDate: 'Сьогодні, {date}',\n todayDateSelected: 'Сьогодні, вибрано {date}',\n year: 'рік',\n },\n characterLimit: {\n few: 'Не більше {count} символів',\n many: 'Не більше {count} символів',\n one: 'Не більше {count} символу',\n other: 'Не більше {count} символу',\n },\n clearSearch: 'Очистити пошук',\n close: 'Закрити',\n copied: 'Скопійовано',\n copy: 'Копіювати',\n decrease: 'Зменшити {label}',\n dragHandle: 'Маркер переміщення',\n increase: 'Збільшити {label}',\n loading: 'Завантаження',\n loadingMore: 'Завантаження ще',\n noResults: 'Немає результатів',\n remove: 'Вилучити',\n results: {\n one: '{count} параметр доступно.',\n other: '{count} параметри(-ів) доступно.',\n },\n select: 'Вибрати',\n },\n 'zh-CN': {\n calendar: {\n dateSelected: '已选择 {date}',\n maximumDate: '最后一个可用日期',\n minimumDate: '第一个可用日期',\n month: '月',\n next: '下一页',\n previous: '上一页',\n todayDate: '今天,即 {date}',\n todayDateSelected: '已选择今天,即 {date}',\n year: '年',\n },\n characterLimit: {\n other: '最多 {count} 个字符',\n },\n clearSearch: '清除搜索',\n close: '关闭',\n copied: '已复制',\n copy: '复制',\n decrease: '降低 {label}',\n dragHandle: '拖动手柄',\n increase: '提高 {label}',\n loading: '正在加载',\n loadingMore: '正在加载更多',\n noResults: '没有结果',\n remove: '删除',\n results: {\n one: '有 {count} 个选项可用。',\n other: '有 {count} 个选项可用。',\n },\n select: '选择',\n },\n 'zh-TW': {\n calendar: {\n dateSelected: '已選取 {date}',\n maximumDate: '最後一個可用日期',\n minimumDate: '第一個可用日期',\n month: '月',\n next: '下一頁',\n previous: '上一頁',\n todayDate: '今天,{date}',\n todayDateSelected: '已選取今天,{date}',\n year: '年',\n },\n characterLimit: {\n other: '最多 {count} 個字元',\n },\n clearSearch: '清除搜尋條件',\n close: '關閉',\n copied: '已複製',\n copy: '複製',\n decrease: '縮小 {label}',\n dragHandle: '拖曳控點',\n increase: '放大 {label}',\n loading: '正在載入',\n loadingMore: '正在載入更多',\n noResults: '沒有結果',\n remove: '移除',\n results: {\n one: '{count} 選項 可用。',\n other: '{count} 選項 可用。',\n },\n select: '選取',\n },\n}\n\nexport { MESSAGES }\nexport type { LibraryMessages, PluralForms }\n"],"mappings":";AAkHA,MAAMgC,WAAsD;CAC1D,SAAS;EACP/B,UAAU;GACRC,cAAc;GACdC,aAAa;GACbC,aAAa;GACbC,OAAO;GACP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GACnBC,MAAM;EACR;EACAC,gBAAgB,EACde,OAAO,iBACT;EACAb,aAAa;EACbC,OAAO;EACPC,QAAQ;EACRC,MAAM;EACNC,UAAU;EACVC,YAAY;EACZC,UAAU;EACVC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,QAAQ;EACRC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;CACA,SAAS;EACP1B,UAAU;GACRC,cAAc;GACdC,aAAa;GACbC,aAAa;GACbC,OAAO;GACPC,MAAM;GACNC,UAAU;GACVC,WAAW;GACXC,mBAAmB;GACnBC,MAAM;EACR;EACAC,gBAAgB,EACde,OAAO,iBACT;EACAb,aAAa;EACbC,OAAO;EACPC,QAAQ;EACRC,MAAM;EACNC,UAAU;EACVC,YAAY;EACZC,UAAU;EACVC,SAAS;EACTC,aAAa;EACbC,WAAW;EACXC,QAAQ;EACRC,SAAS;GACPC,KAAK;GACLC,OAAO;EACT;EACAC,QAAQ;CACV;AACF"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
//#region src/i18n/provider.d.ts
|
|
3
|
+
type I18nProviderProps = {
|
|
4
|
+
readonly children?: ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* The BCP 47 locale the components inside write their words and numbers
|
|
7
|
+
* in. Left unset, the device's, as React Aria's provider falls back to the
|
|
8
|
+
* browser's, so a provider inside another given none does not inherit its
|
|
9
|
+
* locale.
|
|
10
|
+
*/
|
|
11
|
+
readonly locale?: string;
|
|
12
|
+
};
|
|
13
|
+
/** The locale a `useLocale()` reads, and the direction the app lays out in. */
|
|
14
|
+
type Locale = {
|
|
15
|
+
/**
|
|
16
|
+
* The writing direction the app lays out in, `I18nManager`'s, which is
|
|
17
|
+
* what React Native mirrors a layout by.
|
|
18
|
+
*/
|
|
19
|
+
readonly direction: 'ltr' | 'rtl';
|
|
20
|
+
/** The BCP 47 locale the components write in. */
|
|
21
|
+
readonly locale: string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Sets the locale every component inside writes in, as React Aria's
|
|
25
|
+
* `I18nProvider` does for kanso-ui on web: the library's own words, such as a
|
|
26
|
+
* pending ring's name or a list's empty row, and its numbers and dates, such
|
|
27
|
+
* as a Currency's amount or a Calendar's month.
|
|
28
|
+
*
|
|
29
|
+
* ```tsx
|
|
30
|
+
* <I18nProvider locale="pt-BR">
|
|
31
|
+
* <App />
|
|
32
|
+
* </I18nProvider>
|
|
33
|
+
* ```
|
|
34
|
+
*
|
|
35
|
+
* A component given a `locale` of its own writes in that one instead. A
|
|
36
|
+
* locale the runtime cannot parse, here or on a component, gives way to the
|
|
37
|
+
* device's. The provider sets no writing direction: React Native lays out by
|
|
38
|
+
* `I18nManager`, which an app turns over with `forceRTL` and a reload.
|
|
39
|
+
*/
|
|
40
|
+
declare function I18nProvider({ children, locale }: I18nProviderProps): import("react").JSX.Element;
|
|
41
|
+
/**
|
|
42
|
+
* The locale the components around the call write in, and the direction the
|
|
43
|
+
* app lays out in, as React Aria's `useLocale()` returns them on web.
|
|
44
|
+
*
|
|
45
|
+
* ```tsx
|
|
46
|
+
* const { locale } = useLocale()
|
|
47
|
+
* const date = new Intl.DateTimeFormat(locale).format(value)
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
declare function useLocale(): Locale;
|
|
51
|
+
//#endregion
|
|
52
|
+
export { I18nProvider, type I18nProviderProps, type Locale, useLocale };
|
|
53
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { localeOf } from "../number/locale.js";
|
|
2
|
+
import { messagesFor } from "./index.js";
|
|
3
|
+
import { c } from "react/compiler-runtime";
|
|
4
|
+
import { I18nManager } from "react-native";
|
|
5
|
+
import { createContext, use } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
//#region src/i18n/provider.tsx
|
|
8
|
+
const LocaleContext = createContext(void 0);
|
|
9
|
+
/**
|
|
10
|
+
* Sets the locale every component inside writes in, as React Aria's
|
|
11
|
+
* `I18nProvider` does for kanso-ui on web: the library's own words, such as a
|
|
12
|
+
* pending ring's name or a list's empty row, and its numbers and dates, such
|
|
13
|
+
* as a Currency's amount or a Calendar's month.
|
|
14
|
+
*
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <I18nProvider locale="pt-BR">
|
|
17
|
+
* <App />
|
|
18
|
+
* </I18nProvider>
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* A component given a `locale` of its own writes in that one instead. A
|
|
22
|
+
* locale the runtime cannot parse, here or on a component, gives way to the
|
|
23
|
+
* device's. The provider sets no writing direction: React Native lays out by
|
|
24
|
+
* `I18nManager`, which an app turns over with `forceRTL` and a reload.
|
|
25
|
+
*/
|
|
26
|
+
function I18nProvider(t0) {
|
|
27
|
+
const $ = c(3);
|
|
28
|
+
const { children, locale } = t0;
|
|
29
|
+
let t1;
|
|
30
|
+
if ($[0] !== children || $[1] !== locale) {
|
|
31
|
+
t1 = /* @__PURE__ */ jsx(LocaleContext, {
|
|
32
|
+
value: locale,
|
|
33
|
+
children
|
|
34
|
+
});
|
|
35
|
+
$[0] = children;
|
|
36
|
+
$[1] = locale;
|
|
37
|
+
$[2] = t1;
|
|
38
|
+
} else t1 = $[2];
|
|
39
|
+
return t1;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* The locale the components around the call write in, and the direction the
|
|
43
|
+
* app lays out in, as React Aria's `useLocale()` returns them on web.
|
|
44
|
+
*
|
|
45
|
+
* ```tsx
|
|
46
|
+
* const { locale } = useLocale()
|
|
47
|
+
* const date = new Intl.DateTimeFormat(locale).format(value)
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
function useLocale() {
|
|
51
|
+
const $ = c(2);
|
|
52
|
+
const t0 = useLocaleOf(void 0);
|
|
53
|
+
let t1;
|
|
54
|
+
if ($[0] !== t0) {
|
|
55
|
+
t1 = {
|
|
56
|
+
direction: I18nManager.isRTL ? "rtl" : "ltr",
|
|
57
|
+
locale: t0
|
|
58
|
+
};
|
|
59
|
+
$[0] = t0;
|
|
60
|
+
$[1] = t1;
|
|
61
|
+
} else t1 = $[1];
|
|
62
|
+
return t1;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The locale a component writes in: its own `locale` prop where it has one,
|
|
66
|
+
* then the provider's, then the device's. A malformed one gives way to the
|
|
67
|
+
* device's rather than to the next in line.
|
|
68
|
+
*/
|
|
69
|
+
function useLocaleOf(own) {
|
|
70
|
+
const provided = use(LocaleContext);
|
|
71
|
+
return localeOf(own ?? provided);
|
|
72
|
+
}
|
|
73
|
+
/** The library's words in the locale `useLocaleOf` resolves. */
|
|
74
|
+
function useMessages(own) {
|
|
75
|
+
const $ = c(2);
|
|
76
|
+
const t0 = useLocaleOf(own);
|
|
77
|
+
let t1;
|
|
78
|
+
if ($[0] !== t0) {
|
|
79
|
+
t1 = messagesFor(t0);
|
|
80
|
+
$[0] = t0;
|
|
81
|
+
$[1] = t1;
|
|
82
|
+
} else t1 = $[1];
|
|
83
|
+
return t1;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* The nearest provider's locale as given, undefined outside one, for an
|
|
87
|
+
* overlay to hand on to what it draws in the host at the app's root, where
|
|
88
|
+
* a provider inside the app would not otherwise reach.
|
|
89
|
+
*/
|
|
90
|
+
function useProvidedLocale() {
|
|
91
|
+
return use(LocaleContext);
|
|
92
|
+
}
|
|
93
|
+
//#endregion
|
|
94
|
+
export { I18nProvider, useLocale, useLocaleOf, useMessages, useProvidedLocale };
|
|
95
|
+
|
|
96
|
+
//# sourceMappingURL=provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.js","names":["ReactNode","createContext","use","I18nManager","LibraryMessages","messagesFor","localeOf","LocaleContext","undefined","I18nProviderProps","children","locale","Locale","direction","I18nProvider","t0","$","_c","t1","useLocale","useLocaleOf","isRTL","own","provided","useMessages","useProvidedLocale","_c"],"sources":["../../src/i18n/provider.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\n\nimport { createContext, use } from 'react'\nimport { I18nManager } from 'react-native'\n\nimport type { LibraryMessages } from '.'\n\nimport { messagesFor } from '.'\nimport { localeOf } from '../number/locale'\n\n// The locale an app sets for everything inside it, as React Aria's\n// `I18nProvider` does for kanso-ui on web. Undefined, outside any provider or\n// inside one given no locale, is the device's.\nconst LocaleContext = createContext<string | undefined>(undefined)\n\ntype I18nProviderProps = {\n readonly children?: ReactNode\n /**\n * The BCP 47 locale the components inside write their words and numbers\n * in. Left unset, the device's, as React Aria's provider falls back to the\n * browser's, so a provider inside another given none does not inherit its\n * locale.\n */\n readonly locale?: string\n}\n\n/** The locale a `useLocale()` reads, and the direction the app lays out in. */\ntype Locale = {\n /**\n * The writing direction the app lays out in, `I18nManager`'s, which is\n * what React Native mirrors a layout by.\n */\n readonly direction: 'ltr' | 'rtl'\n /** The BCP 47 locale the components write in. */\n readonly locale: string\n}\n\n/**\n * Sets the locale every component inside writes in, as React Aria's\n * `I18nProvider` does for kanso-ui on web: the library's own words, such as a\n * pending ring's name or a list's empty row, and its numbers and dates, such\n * as a Currency's amount or a Calendar's month.\n *\n * ```tsx\n * <I18nProvider locale=\"pt-BR\">\n * <App />\n * </I18nProvider>\n * ```\n *\n * A component given a `locale` of its own writes in that one instead. A\n * locale the runtime cannot parse, here or on a component, gives way to the\n * device's. The provider sets no writing direction: React Native lays out by\n * `I18nManager`, which an app turns over with `forceRTL` and a reload.\n */\nfunction I18nProvider({ children, locale }: I18nProviderProps) {\n return <LocaleContext value={locale}>{children}</LocaleContext>\n}\n\n/**\n * The locale the components around the call write in, and the direction the\n * app lays out in, as React Aria's `useLocale()` returns them on web.\n *\n * ```tsx\n * const { locale } = useLocale()\n * const date = new Intl.DateTimeFormat(locale).format(value)\n * ```\n */\nfunction useLocale(): Locale {\n return {\n direction: I18nManager.isRTL ? 'rtl' : 'ltr',\n locale: useLocaleOf(undefined),\n }\n}\n\n/**\n * The locale a component writes in: its own `locale` prop where it has one,\n * then the provider's, then the device's. A malformed one gives way to the\n * device's rather than to the next in line.\n */\nfunction useLocaleOf(own: string | undefined): string {\n const provided = use(LocaleContext)\n return localeOf(own ?? provided)\n}\n\n/** The library's words in the locale `useLocaleOf` resolves. */\nfunction useMessages(own?: string): LibraryMessages {\n return messagesFor(useLocaleOf(own))\n}\n\n/**\n * The nearest provider's locale as given, undefined outside one, for an\n * overlay to hand on to what it draws in the host at the app's root, where\n * a provider inside the app would not otherwise reach.\n */\nfunction useProvidedLocale(): string | undefined {\n return use(LocaleContext)\n}\n\nexport { I18nProvider, useLocale, useLocaleOf, useMessages, useProvidedLocale }\nexport type { I18nProviderProps, Locale }\n"],"mappings":";;;;;;;AAaA,MAAMO,gBAAgBN,cAAkCO,KAAAA,CAAS;;;;;;;;;;;;;;;;;;AAyCjE,SAAAM,aAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAsB,MAAA,EAAAP,UAAAC,WAAAI;CAAuC,IAAAG;CAAA,IAAAF,EAAA,OAAAN,YAAAM,EAAA,OAAAL,QAAA;EACpDO,KAAA,oBAAC,eAAD;GAAsBP,OAAAA;GAASD;EAAjB,CAAA;EAA0CM,EAAA,KAAAN;EAAAM,EAAA,KAAAL;EAAAK,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,OAAxDE;AAAwD;;;;;;;;;;AAYjE,SAAAC,YAAA;CAAA,MAAAH,IAAAC,EAAA,CAAA;CAGY,MAAAF,KAAAK,YAAYZ,KAAAA,CAAS;CAAC,IAAAU;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAFzBG,KAAA;GAAAL,WACMV,YAAWkB,QAAX,QAAA;GAAiCV,QACpCI;EACV;EAACC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,OAHME;AAGN;;;;;;AAQH,SAASE,YAAYE,KAAiC;CACpD,MAAMC,WAAWrB,IAAIK,aAAa;CAClC,OAAOD,SAASgB,OAAOC,QAAQ;AACjC;;AAGA,SAAAC,YAAAF,KAAA;CAAA,MAAAN,IAAAC,EAAA,CAAA;CACqB,MAAAF,KAAAK,YAAYE,GAAG;CAAC,IAAAJ;CAAA,IAAAF,EAAA,OAAAD,IAAA;EAA5BG,KAAAb,YAAYU,EAAgB;EAACC,EAAA,KAAAD;EAAAC,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,OAA7BE;AAA6B;;;;;;AAQtC,SAASO,oBAAwC;CAC/C,OAAOvB,IAAIK,aAAa;AAC1B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { AppBar, AppBarProps } from "./components/app-bar/index.js";
|
|
|
2
2
|
import { Autocomplete, AutocompleteFilter, AutocompleteProps } from "./components/autocomplete/index.js";
|
|
3
3
|
import { Avatar, AvatarProps } from "./components/avatar/index.js";
|
|
4
4
|
import { Button, ButtonProps, ButtonShape, ButtonSize, ButtonVariant } from "./components/button/index.js";
|
|
5
|
+
import { Calendar, CalendarProps } from "./components/calendar/index.js";
|
|
5
6
|
import { Card, CardProps, CardVariant } from "./components/card/index.js";
|
|
6
7
|
import { Checkbox, CheckboxProps } from "./components/checkbox/index.js";
|
|
7
8
|
import { Chip, ChipActionProps, ChipFilterProps, ChipProps, ChipVariant } from "./components/chip/index.js";
|
|
@@ -20,6 +21,7 @@ import { Meter, MeterProps, MeterTone } from "./components/meter/index.js";
|
|
|
20
21
|
import { KuiTheme } from "./tokens/defaults.js";
|
|
21
22
|
import { ResolvedTheme, useTheme } from "./theme/scope.js";
|
|
22
23
|
import { NavigationBar, NavigationBarItem, NavigationBarItemProps, NavigationBarProps, NavigationTabBar, NavigationTabBarProps } from "./components/navigation-bar/index.js";
|
|
24
|
+
import { NavigationRail, NavigationRailItem, NavigationRailItemProps, NavigationRailProps } from "./components/navigation-rail/index.js";
|
|
23
25
|
import { FieldVariant } from "./field/index.js";
|
|
24
26
|
import { NumberField, NumberFieldProps } from "./components/number-field/index.js";
|
|
25
27
|
import { Popover, PopoverAlign, PopoverContent, PopoverContentProps, PopoverDescription, PopoverDescriptionProps, PopoverProps, PopoverSide, PopoverSize, PopoverTitle, PopoverTitleProps, PopoverTrigger } from "./components/popover/index.js";
|
|
@@ -33,13 +35,15 @@ import { Sheet, SheetBody, SheetBodyProps, SheetContent, SheetContentProps, Shee
|
|
|
33
35
|
import { Snackbar, SnackbarAction, SnackbarOptions, SnackbarProps, SnackbarQueue } from "./components/snackbar/index.js";
|
|
34
36
|
import { Stack, StackAlign, StackGap, StackJustify, StackProps } from "./components/stack/index.js";
|
|
35
37
|
import { Switch, SwitchProps } from "./components/switch/index.js";
|
|
38
|
+
import { Tag, TagProps, TagTone, TagVariant } from "./components/tag/index.js";
|
|
36
39
|
import { TypeRole } from "./typography/roles.js";
|
|
37
40
|
import { Text, TextProps } from "./components/text/index.js";
|
|
38
41
|
import { TextField, TextFieldProps } from "./components/text-field/index.js";
|
|
39
42
|
import { IconStyle, useIconStyle } from "./glyphs/icon-style.js";
|
|
40
43
|
import { AppBarScroll, AppBarScrollOptions, useAppBarScroll } from "./hooks/useAppBarScroll.js";
|
|
41
44
|
import { WindowSizeClass, useWindowSizeClass } from "./hooks/useWindowSizeClass.js";
|
|
45
|
+
import { I18nProvider, I18nProviderProps, Locale, useLocale } from "./i18n/provider.js";
|
|
42
46
|
import { RouterProvider, RouterProviderProps } from "./router/index.js";
|
|
43
47
|
import { ThemeScope, ThemeScopeProps } from "./theme-scope.js";
|
|
44
48
|
import { Key, Selection } from "react-stately";
|
|
45
|
-
export { AppBar, type AppBarProps, type AppBarScroll, type AppBarScrollOptions, Autocomplete, type AutocompleteFilter, type AutocompleteProps, Avatar, type AvatarProps, Button, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, Card, type CardProps, type CardVariant, Checkbox, type CheckboxProps, Chip, type ChipActionProps, type ChipFilterProps, ChipGroup, ChipGroupChip, type ChipGroupChipProps, type ChipGroupProps, type ChipProps, type ChipVariant, CopyField, type CopyFieldProps, Currency, type CurrencyProps, type CurrencySignDisplay, type CurrencyTone, Dialog, DialogBody, type DialogBodyProps, DialogContent, type DialogContentProps, DialogFooter, DialogHeader, type DialogPartProps, type DialogProps, DialogTitle, type DialogTitleProps, type FieldVariant, Form, type FormHandle, type FormProps, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconStyle, type Key, type KuiTheme, Link, type LinkProps, type LinkTone, type LinkUnderline, List, ListDetail, type ListDetailProps, ListItem, type ListItemProps, ListLoadMore, type ListLoadMoreProps, type ListProps, ListRow, type ListRowProps, ListSection, type ListSectionProps, Menu, type MenuAlign, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLoadMore, type MenuLoadMoreProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, type MenuSeparatorProps, type MenuSide, MenuSubmenu, type MenuSubmenuProps, type MenuTrigger, Meter, type MeterProps, type MeterTone, NavigationBar, NavigationBarItem, type NavigationBarItemProps, type NavigationBarProps, NavigationTabBar, type NavigationTabBarProps, NumberField, type NumberFieldProps, Popover, type PopoverAlign, PopoverContent, type PopoverContentProps, PopoverDescription, type PopoverDescriptionProps, type PopoverProps, type PopoverSide, type PopoverSize, PopoverTitle, type PopoverTitleProps, type PopoverTrigger, ProductIcon, type ProductIconProps, ProgressIndicator, type ProgressIndicatorProps, type ProgressIndicatorShape, type ProgressIndicatorTone, type ProgressIndicatorVariant, Radio, RadioGroup, type RadioGroupOrientation, type RadioGroupProps, type RadioProps, type ResolvedTheme, RouterProvider, type RouterProviderProps, SearchField, type SearchFieldProps, SegmentedButton, type SegmentedButtonProps, SegmentedButtonSegment, type SegmentedButtonSegmentProps, type Selection, Separator, type SeparatorInset, type SeparatorProps, Sheet, SheetBody, type SheetBodyProps, SheetContent, type SheetContentProps, SheetFooter, SheetHandle, type SheetHandleProps, SheetHeader, type SheetPartProps, type SheetProps, SheetTitle, type SheetTitleProps, Snackbar, type SnackbarAction, type SnackbarOptions, type SnackbarProps, type SnackbarQueue, Stack, type StackAlign, type StackGap, type StackJustify, type StackProps, Switch, type SwitchProps, Text, TextField, type TextFieldProps, type TextProps, ThemeScope, type ThemeScopeProps, type TypeRole, type WindowSizeClass, useAppBarScroll, useIconStyle, useTheme, useWindowSizeClass };
|
|
49
|
+
export { AppBar, type AppBarProps, type AppBarScroll, type AppBarScrollOptions, Autocomplete, type AutocompleteFilter, type AutocompleteProps, Avatar, type AvatarProps, Button, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonVariant, Calendar, type CalendarProps, Card, type CardProps, type CardVariant, Checkbox, type CheckboxProps, Chip, type ChipActionProps, type ChipFilterProps, ChipGroup, ChipGroupChip, type ChipGroupChipProps, type ChipGroupProps, type ChipProps, type ChipVariant, CopyField, type CopyFieldProps, Currency, type CurrencyProps, type CurrencySignDisplay, type CurrencyTone, Dialog, DialogBody, type DialogBodyProps, DialogContent, type DialogContentProps, DialogFooter, DialogHeader, type DialogPartProps, type DialogProps, DialogTitle, type DialogTitleProps, type FieldVariant, Form, type FormHandle, type FormProps, I18nProvider, type I18nProviderProps, IconButton, type IconButtonProps, type IconButtonSize, type IconButtonVariant, type IconStyle, type Key, type KuiTheme, Link, type LinkProps, type LinkTone, type LinkUnderline, List, ListDetail, type ListDetailProps, ListItem, type ListItemProps, ListLoadMore, type ListLoadMoreProps, type ListProps, ListRow, type ListRowProps, ListSection, type ListSectionProps, type Locale, Menu, type MenuAlign, MenuContent, type MenuContentProps, MenuItem, type MenuItemProps, MenuLoadMore, type MenuLoadMoreProps, type MenuProps, MenuSection, type MenuSectionProps, MenuSeparator, type MenuSeparatorProps, type MenuSide, MenuSubmenu, type MenuSubmenuProps, type MenuTrigger, Meter, type MeterProps, type MeterTone, NavigationBar, NavigationBarItem, type NavigationBarItemProps, type NavigationBarProps, NavigationRail, NavigationRailItem, type NavigationRailItemProps, type NavigationRailProps, NavigationTabBar, type NavigationTabBarProps, NumberField, type NumberFieldProps, Popover, type PopoverAlign, PopoverContent, type PopoverContentProps, PopoverDescription, type PopoverDescriptionProps, type PopoverProps, type PopoverSide, type PopoverSize, PopoverTitle, type PopoverTitleProps, type PopoverTrigger, ProductIcon, type ProductIconProps, ProgressIndicator, type ProgressIndicatorProps, type ProgressIndicatorShape, type ProgressIndicatorTone, type ProgressIndicatorVariant, Radio, RadioGroup, type RadioGroupOrientation, type RadioGroupProps, type RadioProps, type ResolvedTheme, RouterProvider, type RouterProviderProps, SearchField, type SearchFieldProps, SegmentedButton, type SegmentedButtonProps, SegmentedButtonSegment, type SegmentedButtonSegmentProps, type Selection, Separator, type SeparatorInset, type SeparatorProps, Sheet, SheetBody, type SheetBodyProps, SheetContent, type SheetContentProps, SheetFooter, SheetHandle, type SheetHandleProps, SheetHeader, type SheetPartProps, type SheetProps, SheetTitle, type SheetTitleProps, Snackbar, type SnackbarAction, type SnackbarOptions, type SnackbarProps, type SnackbarQueue, Stack, type StackAlign, type StackGap, type StackJustify, type StackProps, Switch, type SwitchProps, Tag, type TagProps, type TagTone, type TagVariant, Text, TextField, type TextFieldProps, type TextProps, ThemeScope, type ThemeScopeProps, type TypeRole, type WindowSizeClass, useAppBarScroll, useIconStyle, useLocale, useTheme, useWindowSizeClass };
|
package/dist/index.js
CHANGED
|
@@ -3,11 +3,14 @@ import { useAppBarScroll } from "./hooks/useAppBarScroll.js";
|
|
|
3
3
|
import { useTheme } from "./theme/scope.js";
|
|
4
4
|
import { Text } from "./components/text/index.js";
|
|
5
5
|
import { AppBar } from "./components/app-bar/index.js";
|
|
6
|
+
import { I18nProvider, useLocale } from "./i18n/provider.js";
|
|
6
7
|
import { Autocomplete } from "./components/autocomplete/index.js";
|
|
7
8
|
import { Avatar } from "./components/avatar/index.js";
|
|
8
9
|
import { RouterProvider } from "./router/index.js";
|
|
9
10
|
import { ProgressIndicator } from "./components/progress-indicator/index.js";
|
|
10
11
|
import { Button } from "./components/button/index.js";
|
|
12
|
+
import { IconButton } from "./components/icon-button/index.js";
|
|
13
|
+
import { Calendar } from "./components/calendar/index.js";
|
|
11
14
|
import { Card } from "./components/card/index.js";
|
|
12
15
|
import { Checkbox } from "./components/checkbox/index.js";
|
|
13
16
|
import { Chip } from "./components/chip/index.js";
|
|
@@ -17,7 +20,6 @@ import { Currency } from "./components/currency/index.js";
|
|
|
17
20
|
import { useWindowSizeClass } from "./hooks/useWindowSizeClass.js";
|
|
18
21
|
import { Dialog, DialogBody, DialogContent, DialogFooter, DialogHeader, DialogTitle } from "./components/dialog/index.js";
|
|
19
22
|
import { Form } from "./components/form/index.js";
|
|
20
|
-
import { IconButton } from "./components/icon-button/index.js";
|
|
21
23
|
import { Link } from "./components/link/index.js";
|
|
22
24
|
import { List, ListLoadMore, ListRow, ListSection } from "./components/list/index.js";
|
|
23
25
|
import { ListDetail } from "./components/list-detail/index.js";
|
|
@@ -26,6 +28,7 @@ import { Separator } from "./components/separator/index.js";
|
|
|
26
28
|
import { Menu, MenuContent, MenuItem, MenuLoadMore, MenuSection, MenuSeparator, MenuSubmenu } from "./components/menu/index.js";
|
|
27
29
|
import { Meter } from "./components/meter/index.js";
|
|
28
30
|
import { NavigationBar, NavigationBarItem, NavigationTabBar } from "./components/navigation-bar/index.js";
|
|
31
|
+
import { NavigationRail, NavigationRailItem } from "./components/navigation-rail/index.js";
|
|
29
32
|
import { NumberField } from "./components/number-field/index.js";
|
|
30
33
|
import { Popover, PopoverContent, PopoverDescription, PopoverTitle } from "./components/popover/index.js";
|
|
31
34
|
import { ProductIcon } from "./components/product-icon/index.js";
|
|
@@ -36,6 +39,7 @@ import { Sheet, SheetBody, SheetContent, SheetFooter, SheetHandle, SheetHeader,
|
|
|
36
39
|
import { Snackbar } from "./components/snackbar/index.js";
|
|
37
40
|
import { Stack } from "./components/stack/index.js";
|
|
38
41
|
import { Switch } from "./components/switch/index.js";
|
|
42
|
+
import { Tag } from "./components/tag/index.js";
|
|
39
43
|
import { TextField } from "./components/text-field/index.js";
|
|
40
44
|
import { ThemeScope } from "./theme-scope.js";
|
|
41
|
-
export { AppBar, Autocomplete, Avatar, Button, Card, Checkbox, Chip, ChipGroup, ChipGroupChip, CopyField, Currency, Dialog, DialogBody, DialogContent, DialogFooter, DialogHeader, DialogTitle, Form, IconButton, Link, List, ListDetail, ListItem, ListLoadMore, ListRow, ListSection, Menu, MenuContent, MenuItem, MenuLoadMore, MenuSection, MenuSeparator, MenuSubmenu, Meter, NavigationBar, NavigationBarItem, NavigationTabBar, NumberField, Popover, PopoverContent, PopoverDescription, PopoverTitle, ProductIcon, ProgressIndicator, Radio, RadioGroup, RouterProvider, SearchField, SegmentedButton, SegmentedButtonSegment, Separator, Sheet, SheetBody, SheetContent, SheetFooter, SheetHandle, SheetHeader, SheetTitle, Snackbar, Stack, Switch, Text, TextField, ThemeScope, useAppBarScroll, useIconStyle, useTheme, useWindowSizeClass };
|
|
45
|
+
export { AppBar, Autocomplete, Avatar, Button, Calendar, Card, Checkbox, Chip, ChipGroup, ChipGroupChip, CopyField, Currency, Dialog, DialogBody, DialogContent, DialogFooter, DialogHeader, DialogTitle, Form, I18nProvider, IconButton, Link, List, ListDetail, ListItem, ListLoadMore, ListRow, ListSection, Menu, MenuContent, MenuItem, MenuLoadMore, MenuSection, MenuSeparator, MenuSubmenu, Meter, NavigationBar, NavigationBarItem, NavigationRail, NavigationRailItem, NavigationTabBar, NumberField, Popover, PopoverContent, PopoverDescription, PopoverTitle, ProductIcon, ProgressIndicator, Radio, RadioGroup, RouterProvider, SearchField, SegmentedButton, SegmentedButtonSegment, Separator, Sheet, SheetBody, SheetContent, SheetFooter, SheetHandle, SheetHeader, SheetTitle, Snackbar, Stack, Switch, Tag, Text, TextField, ThemeScope, useAppBarScroll, useIconStyle, useLocale, useTheme, useWindowSizeClass };
|
package/dist/indicator/index.js
CHANGED
|
@@ -3,7 +3,6 @@ import { useTheme } from "../theme/scope.js";
|
|
|
3
3
|
import { composeStyles } from "../theme/styles.js";
|
|
4
4
|
import { withOpacity } from "../theme/color.js";
|
|
5
5
|
import { Text as Text$1 } from "../components/text/index.js";
|
|
6
|
-
import { localeOf } from "../number/locale.js";
|
|
7
6
|
import { styles, stylesOf } from "./styles.js";
|
|
8
7
|
import { c } from "react/compiler-runtime";
|
|
9
8
|
import { View } from "react-native";
|
|
@@ -132,7 +131,7 @@ function readingOf({ formatOptions = { style: "percent" }, locale, maxValue, min
|
|
|
132
131
|
const clamped = Math.min(Math.max(value, minValue), maxValue);
|
|
133
132
|
const range = maxValue - minValue;
|
|
134
133
|
const share = range === 0 ? 0 : (clamped - minValue) / range;
|
|
135
|
-
const text = valueLabel ?? new NumberFormatter(
|
|
134
|
+
const text = valueLabel ?? new NumberFormatter(locale, formatOptions).format(formatOptions.style === "percent" ? share : clamped);
|
|
136
135
|
return {
|
|
137
136
|
percentage: share * 100,
|
|
138
137
|
text,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ReactNode","LayoutChangeEvent","ViewStyle","AnimatedStyle","SharedValue","NumberFormatter","useEffect","useState","View","Animated","Easing","useAnimatedStyle","useReducedMotion","useSharedValue","withTiming","Text","useIconStyle","localeOf","withOpacity","useTheme","composeStyles","RESERVED","styles","stylesOf","IndicatorColors","active","track","IndicatorTiming","duration","easing","IndicatorTone","activeLength","width","percentage","Math","max","fillOf","color","backgroundColor","IndicatorLabels","t0","$","_c","label","value","theme","hasLabel","undefined","hasValue","t1","t2","t3","t4","labels","IndicatorLine","activeOpacity","children","colors","sheet","opacity","get","T0","stop","line","readingOf","formatOptions","style","locale","maxValue","minValue","valueLabel","Intl","NumberFormatOptions","clamped","min","range","share","text","format","useEased","target","timing","reduceMotion","shown","x1","y1","x2","y2","set","bezier","useIndicatorColors","tone","slot","onSurface","secondaryContainer","useMeasuredWidth","setWidth","Symbol","for","event","nativeEvent","layout","onLayout","_c","Text"],"sources":["../../src/indicator/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { LayoutChangeEvent, ViewStyle } from 'react-native'\nimport type { AnimatedStyle, SharedValue } from 'react-native-reanimated'\n\nimport { NumberFormatter } from '@internationalized/number'\nimport { useEffect, useState } from 'react'\nimport { View } from 'react-native'\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useReducedMotion,\n useSharedValue,\n withTiming,\n} from 'react-native-reanimated'\n\nimport { Text } from '../components/text'\nimport { useIconStyle } from '../glyphs/icon-style'\nimport { localeOf } from '../number/locale'\nimport { withOpacity } from '../theme/color'\nimport { useTheme } from '../theme/scope'\nimport { composeStyles } from '../theme/styles'\nimport { RESERVED, styles, stylesOf } from './styles'\n\n// The pieces a linear indicator is drawn from, shared by ProgressIndicator and\n// Meter as web's src/indicator is. The styles they use are in ./styles.ts.\n//\n// Web lays the line out with `calc()` against the row's own width. React\n// Native has no `calc()`, so the row is measured through `onLayout` and the\n// active indicator's width worked out from that, which is also the length a\n// wave along the line follows.\n\n/** What a line draws its parts in. */\ntype IndicatorColors = {\n /** The active indicator and the stop indicator. */\n readonly active: string\n /** The track. */\n readonly track: string\n}\n\n/** How a value that changes moves: a duration in ms and a cubic Bézier. */\ntype IndicatorTiming = {\n readonly duration: number\n readonly easing: readonly [number, number, number, number]\n}\n\n/**\n * The line's colour. `primary` is the page's own pair. `negative` and\n * `positive` swap the active indicator and the stop indicator alone, leaving\n * the track in secondary container, so a column of meters reads as one scale\n * with bars of different colours. `inherit` takes the colour of the slot the\n * line sits in for both, and gives the track a quarter of it.\n */\ntype IndicatorTone = 'inherit' | 'negative' | 'positive' | 'primary'\n\n/**\n * The active indicator's length at a value: the value's share of what the two\n * gaps and the stop leave of the row, as web's `activeAt` gives it. A share of\n * the whole row would run the row 12dp long at the maximum, with the stop\n * drawn past its end.\n */\nfunction activeLength(width: number, percentage: number) {\n 'worklet'\n return (Math.max(0, width - RESERVED) * percentage) / 100\n}\n\n// A view's fill, built by a call rather than written inline at the prop,\n// which is what react-perf's no-new-object-as-prop is after.\nfunction fillOf(color: string) {\n return { backgroundColor: color }\n}\n\n/**\n * The label and, optionally, the value, on a row above the indicator, both in\n * the label-large role and on-surface-variant. Renders nothing when there is\n * neither to show.\n */\nfunction IndicatorLabels({\n label,\n value,\n}: {\n readonly label: string | undefined\n readonly value: string | undefined\n}) {\n const theme = useTheme()\n const hasLabel = label !== undefined && label !== ''\n const hasValue = value !== undefined && value !== ''\n\n if (!hasLabel && !hasValue) {\n return null\n }\n\n return (\n <View style={stylesOf(theme).labels}>\n {hasLabel ? (\n <Text style={styles.label} tone=\"muted\" variant=\"labelLarge\">\n {label}\n </Text>\n ) : null}\n {hasValue ? (\n <Text\n numberOfLines={1}\n style={styles.value}\n tone=\"muted\"\n variant=\"labelLarge\"\n >\n {value}\n </Text>\n ) : null}\n </View>\n )\n}\n\n/**\n * The page's line: the active indicator at its share of the measured width,\n * the track taking what is left, and the stop indicator at the end. Anything\n * passed as `children` is drawn inside the track, which is what the progress\n * indicator's buffer fills it with; with none the track is solid.\n * `activeOpacity` is how far the active indicator shows, which is how the\n * progress indicator fades it under a wave.\n */\nfunction IndicatorLine({\n activeOpacity,\n children,\n colors,\n percentage,\n width,\n}: {\n readonly activeOpacity?: SharedValue<number>\n readonly children?: ReactNode\n readonly colors: IndicatorColors\n readonly percentage: SharedValue<number>\n readonly width: number\n}) {\n const theme = useTheme()\n const sheet = stylesOf(theme)\n const active = useAnimatedStyle(() => {\n 'worklet'\n return {\n opacity: activeOpacity === undefined ? 1 : activeOpacity.get(),\n width: activeLength(width, percentage.get()),\n }\n })\n\n return (\n <View style={styles.line}>\n <Animated.View\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.active,\n sheet.active,\n fillOf(colors.active),\n active,\n )}\n />\n <View\n style={composeStyles<ViewStyle>(\n styles.track,\n sheet.track,\n children === undefined ? fillOf(colors.track) : undefined,\n )}\n >\n {children}\n </View>\n <View\n style={composeStyles<ViewStyle>(\n styles.stop,\n sheet.stop,\n fillOf(colors.active),\n )}\n />\n </View>\n )\n}\n\n/**\n * The value as React Aria's `useProgressBar` and `useMeter` read it: clamped to the range,\n * as a percentage of it, and written out by `formatOptions` in the locale,\n * the share of the range under a percent style and the value itself under\n * any other, unless `valueLabel` says it in words.\n */\nfunction readingOf({\n formatOptions = { style: 'percent' },\n locale,\n maxValue,\n minValue,\n value,\n valueLabel,\n}: {\n readonly formatOptions: Intl.NumberFormatOptions | undefined\n readonly locale: string | undefined\n readonly maxValue: number\n readonly minValue: number\n readonly value: number\n readonly valueLabel: string | undefined\n}) {\n const clamped = Math.min(Math.max(value, minValue), maxValue)\n const range = maxValue - minValue\n const share = range === 0 ? 0 : (clamped - minValue) / range\n const text =\n valueLabel ??\n new NumberFormatter(localeOf(locale), formatOptions).format(\n formatOptions.style === 'percent' ? share : clamped,\n )\n\n return { percentage: share * 100, text, value: clamped }\n}\n\n/**\n * A value that moves to each new target over `timing`, or jumps to it while\n * the reader has asked for reduced motion, as web's transition drops to `0s`\n * there. It starts at its first target, so nothing moves as it mounts.\n */\nfunction useEased(target: number, timing: IndicatorTiming) {\n const reduceMotion = useReducedMotion()\n const shown = useSharedValue(target)\n const { duration } = timing\n const [x1, y1, x2, y2] = timing.easing\n\n useEffect(() => {\n shown.set(\n reduceMotion\n ? target\n : withTiming(target, {\n duration,\n easing: Easing.bezier(x1, y1, x2, y2),\n }),\n )\n }, [duration, reduceMotion, shown, target, x1, x2, y1, y2])\n\n return shown\n}\n\n/**\n * The colours a tone draws the line in. `inherit` reads the colour of the\n * slot the line sits in, as a button hands its content colour to what it\n * holds, and falls back to on-surface outside one.\n */\nfunction useIndicatorColors(tone: IndicatorTone): IndicatorColors {\n const { colors } = useTheme()\n const slot = useIconStyle().color\n\n if (tone === 'inherit') {\n const color = typeof slot === 'string' ? slot : colors.onSurface\n\n return { active: color, track: withOpacity(color, 0.25) }\n }\n\n return { active: colors[tone], track: colors.secondaryContainer }\n}\n\n/** The width a view was last laid out at, and the handler that reads it. */\nfunction useMeasuredWidth() {\n const [width, setWidth] = useState(0)\n\n return {\n onLayout: (event: LayoutChangeEvent) => {\n setWidth(event.nativeEvent.layout.width)\n },\n width,\n }\n}\n\nexport {\n activeLength,\n fillOf,\n IndicatorLabels,\n IndicatorLine,\n readingOf,\n useEased,\n useIndicatorColors,\n useMeasuredWidth,\n}\nexport type { IndicatorColors, IndicatorTiming, IndicatorTone }\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA4DA,SAAS+B,aAAaC,OAAeC,YAAoB;CACvD;CACA,OAAQC,KAAKC,IAAI,GAAGH,QAAAA,EAAgB,IAAIC,aAAc;AACxD;AAIA,SAASG,OAAOC,OAAe;CAC7B,OAAO,EAAEC,iBAAiBD,MAAM;AAClC;;;;;;AAOA,SAAAE,gBAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAyB,MAAA,EAAAC,OAAAC,UAAAJ;CAOvB,MAAAK,QAAc1B,SAAS;CACvB,MAAA2B,WAAiBH,UAAUI,KAAAA,KAAaJ,UAAU;CAClD,MAAAK,WAAiBJ,UAAUG,KAAAA,KAAaH,UAAU;CAElD,IAAI,CAACE,YAAD,CAAcE,UAAQ,OACjB;CACR,IAAAC;CAAA,IAAAR,EAAA,OAAAI,OAAA;EAGcI,KAAA1B,SAASsB,KAAK;EAACJ,EAAA,KAAAI;EAAAJ,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,OAAAK,YAAAL,EAAA,OAAAE,OAAA;EACzBO,KAAAJ,WACC,oBAAC0D,QAAD;GAAa,OAAAlF,OAAMqB;GAAa,MAAA;GAAgB,SAAA;GAC7CA,UAAAA;EADE,CAAA,IADN;EAIOF,EAAA,KAAAK;EAAAL,EAAA,KAAAE;EAAAF,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,IAAAU;CAAA,IAAAV,EAAA,OAAAO,YAAAP,EAAA,OAAAG,OAAA;EACPO,KAAAH,WACC,oBAACwD,QAAD;GACiB,eAAA;GACR,OAAAlF,OAAMsB;GACR,MAAA;GACG,SAAA;GAEP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QAAUe;GAAYd,OAAS+B,OAAMqC;EAAoB;EAACrD,EAAA,KAAAgB,OAAAqC;EAAArD,EAAA,KAAAD;EAAAC,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OAA1DQ;AAA0D;;AAInE,SAAA8C,mBAAA;CAAA,MAAAtD,IAAAC,EAAA,CAAA;CACE,MAAA,CAAAV,OAAAgE,YAA0BzF,SAAS,CAAC;CAAC,IAAAiC;CAAA,IAAAC,EAAA,OAAAwD,OAAAC,IAAA,2BAAA,GAAA;EAGzB1D,MAAA2D,UAAA;GACRH,SAASG,MAAKC,YAAYC,OAAOrE,KAAM;EAAC;EACzCS,EAAA,KAAAD;CAAA,OAAAA,KAAAC,EAAA;CAAA,IAAAQ;CAAA,IAAAR,EAAA,OAAAT,OAAA;EAHIiB,KAAA;GAAAqD,UACK9D;GAETR;EAEH;EAACS,EAAA,KAAAT;EAAAS,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OALMQ;AAKN"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ReactNode","LayoutChangeEvent","ViewStyle","AnimatedStyle","SharedValue","NumberFormatter","useEffect","useState","View","Animated","Easing","useAnimatedStyle","useReducedMotion","useSharedValue","withTiming","Text","useIconStyle","withOpacity","useTheme","composeStyles","RESERVED","styles","stylesOf","IndicatorColors","active","track","IndicatorTiming","duration","easing","IndicatorTone","activeLength","width","percentage","Math","max","fillOf","color","backgroundColor","IndicatorLabels","t0","$","_c","label","value","theme","hasLabel","undefined","hasValue","t1","t2","t3","t4","labels","IndicatorLine","activeOpacity","children","colors","sheet","opacity","get","T0","stop","line","readingOf","formatOptions","style","locale","maxValue","minValue","valueLabel","Intl","NumberFormatOptions","clamped","min","range","share","text","format","useEased","target","timing","reduceMotion","shown","x1","y1","x2","y2","set","bezier","useIndicatorColors","tone","slot","onSurface","secondaryContainer","useMeasuredWidth","setWidth","Symbol","for","event","nativeEvent","layout","onLayout","_c","Text"],"sources":["../../src/indicator/index.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport type { LayoutChangeEvent, ViewStyle } from 'react-native'\nimport type { AnimatedStyle, SharedValue } from 'react-native-reanimated'\n\nimport { NumberFormatter } from '@internationalized/number'\nimport { useEffect, useState } from 'react'\nimport { View } from 'react-native'\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useReducedMotion,\n useSharedValue,\n withTiming,\n} from 'react-native-reanimated'\n\nimport { Text } from '../components/text'\nimport { useIconStyle } from '../glyphs/icon-style'\nimport { withOpacity } from '../theme/color'\nimport { useTheme } from '../theme/scope'\nimport { composeStyles } from '../theme/styles'\nimport { RESERVED, styles, stylesOf } from './styles'\n\n// The pieces a linear indicator is drawn from, shared by ProgressIndicator and\n// Meter as web's src/indicator is. The styles they use are in ./styles.ts.\n//\n// Web lays the line out with `calc()` against the row's own width. React\n// Native has no `calc()`, so the row is measured through `onLayout` and the\n// active indicator's width worked out from that, which is also the length a\n// wave along the line follows.\n\n/** What a line draws its parts in. */\ntype IndicatorColors = {\n /** The active indicator and the stop indicator. */\n readonly active: string\n /** The track. */\n readonly track: string\n}\n\n/** How a value that changes moves: a duration in ms and a cubic Bézier. */\ntype IndicatorTiming = {\n readonly duration: number\n readonly easing: readonly [number, number, number, number]\n}\n\n/**\n * The line's colour. `primary` is the page's own pair. `negative` and\n * `positive` swap the active indicator and the stop indicator alone, leaving\n * the track in secondary container, so a column of meters reads as one scale\n * with bars of different colours. `inherit` takes the colour of the slot the\n * line sits in for both, and gives the track a quarter of it.\n */\ntype IndicatorTone = 'inherit' | 'negative' | 'positive' | 'primary'\n\n/**\n * The active indicator's length at a value: the value's share of what the two\n * gaps and the stop leave of the row, as web's `activeAt` gives it. A share of\n * the whole row would run the row 12dp long at the maximum, with the stop\n * drawn past its end.\n */\nfunction activeLength(width: number, percentage: number) {\n 'worklet'\n return (Math.max(0, width - RESERVED) * percentage) / 100\n}\n\n// A view's fill, built by a call rather than written inline at the prop,\n// which is what react-perf's no-new-object-as-prop is after.\nfunction fillOf(color: string) {\n return { backgroundColor: color }\n}\n\n/**\n * The label and, optionally, the value, on a row above the indicator, both in\n * the label-large role and on-surface-variant. Renders nothing when there is\n * neither to show.\n */\nfunction IndicatorLabels({\n label,\n value,\n}: {\n readonly label: string | undefined\n readonly value: string | undefined\n}) {\n const theme = useTheme()\n const hasLabel = label !== undefined && label !== ''\n const hasValue = value !== undefined && value !== ''\n\n if (!hasLabel && !hasValue) {\n return null\n }\n\n return (\n <View style={stylesOf(theme).labels}>\n {hasLabel ? (\n <Text style={styles.label} tone=\"muted\" variant=\"labelLarge\">\n {label}\n </Text>\n ) : null}\n {hasValue ? (\n <Text\n numberOfLines={1}\n style={styles.value}\n tone=\"muted\"\n variant=\"labelLarge\"\n >\n {value}\n </Text>\n ) : null}\n </View>\n )\n}\n\n/**\n * The page's line: the active indicator at its share of the measured width,\n * the track taking what is left, and the stop indicator at the end. Anything\n * passed as `children` is drawn inside the track, which is what the progress\n * indicator's buffer fills it with; with none the track is solid.\n * `activeOpacity` is how far the active indicator shows, which is how the\n * progress indicator fades it under a wave.\n */\nfunction IndicatorLine({\n activeOpacity,\n children,\n colors,\n percentage,\n width,\n}: {\n readonly activeOpacity?: SharedValue<number>\n readonly children?: ReactNode\n readonly colors: IndicatorColors\n readonly percentage: SharedValue<number>\n readonly width: number\n}) {\n const theme = useTheme()\n const sheet = stylesOf(theme)\n const active = useAnimatedStyle(() => {\n 'worklet'\n return {\n opacity: activeOpacity === undefined ? 1 : activeOpacity.get(),\n width: activeLength(width, percentage.get()),\n }\n })\n\n return (\n <View style={styles.line}>\n <Animated.View\n style={composeStyles<AnimatedStyle<ViewStyle>>(\n styles.active,\n sheet.active,\n fillOf(colors.active),\n active,\n )}\n />\n <View\n style={composeStyles<ViewStyle>(\n styles.track,\n sheet.track,\n children === undefined ? fillOf(colors.track) : undefined,\n )}\n >\n {children}\n </View>\n <View\n style={composeStyles<ViewStyle>(\n styles.stop,\n sheet.stop,\n fillOf(colors.active),\n )}\n />\n </View>\n )\n}\n\n/**\n * The value as React Aria's `useProgressBar` and `useMeter` read it: clamped to the range,\n * as a percentage of it, and written out by `formatOptions` in the locale,\n * the share of the range under a percent style and the value itself under\n * any other, unless `valueLabel` says it in words.\n */\nfunction readingOf({\n formatOptions = { style: 'percent' },\n locale,\n maxValue,\n minValue,\n value,\n valueLabel,\n}: {\n readonly formatOptions: Intl.NumberFormatOptions | undefined\n readonly locale: string\n readonly maxValue: number\n readonly minValue: number\n readonly value: number\n readonly valueLabel: string | undefined\n}) {\n const clamped = Math.min(Math.max(value, minValue), maxValue)\n const range = maxValue - minValue\n const share = range === 0 ? 0 : (clamped - minValue) / range\n const text =\n valueLabel ??\n new NumberFormatter(locale, formatOptions).format(\n formatOptions.style === 'percent' ? share : clamped,\n )\n\n return { percentage: share * 100, text, value: clamped }\n}\n\n/**\n * A value that moves to each new target over `timing`, or jumps to it while\n * the reader has asked for reduced motion, as web's transition drops to `0s`\n * there. It starts at its first target, so nothing moves as it mounts.\n */\nfunction useEased(target: number, timing: IndicatorTiming) {\n const reduceMotion = useReducedMotion()\n const shown = useSharedValue(target)\n const { duration } = timing\n const [x1, y1, x2, y2] = timing.easing\n\n useEffect(() => {\n shown.set(\n reduceMotion\n ? target\n : withTiming(target, {\n duration,\n easing: Easing.bezier(x1, y1, x2, y2),\n }),\n )\n }, [duration, reduceMotion, shown, target, x1, x2, y1, y2])\n\n return shown\n}\n\n/**\n * The colours a tone draws the line in. `inherit` reads the colour of the\n * slot the line sits in, as a button hands its content colour to what it\n * holds, and falls back to on-surface outside one.\n */\nfunction useIndicatorColors(tone: IndicatorTone): IndicatorColors {\n const { colors } = useTheme()\n const slot = useIconStyle().color\n\n if (tone === 'inherit') {\n const color = typeof slot === 'string' ? slot : colors.onSurface\n\n return { active: color, track: withOpacity(color, 0.25) }\n }\n\n return { active: colors[tone], track: colors.secondaryContainer }\n}\n\n/** The width a view was last laid out at, and the handler that reads it. */\nfunction useMeasuredWidth() {\n const [width, setWidth] = useState(0)\n\n return {\n onLayout: (event: LayoutChangeEvent) => {\n setWidth(event.nativeEvent.layout.width)\n },\n width,\n }\n}\n\nexport {\n activeLength,\n fillOf,\n IndicatorLabels,\n IndicatorLine,\n readingOf,\n useEased,\n useIndicatorColors,\n useMeasuredWidth,\n}\nexport type { IndicatorColors, IndicatorTiming, IndicatorTone }\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA2DA,SAAS8B,aAAaC,OAAeC,YAAoB;CACvD;CACA,OAAQC,KAAKC,IAAI,GAAGH,QAAAA,EAAgB,IAAIC,aAAc;AACxD;AAIA,SAASG,OAAOC,OAAe;CAC7B,OAAO,EAAEC,iBAAiBD,MAAM;AAClC;;;;;;AAOA,SAAAE,gBAAAC,IAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAyB,MAAA,EAAAC,OAAAC,UAAAJ;CAOvB,MAAAK,QAAc1B,SAAS;CACvB,MAAA2B,WAAiBH,UAAUI,KAAAA,KAAaJ,UAAU;CAClD,MAAAK,WAAiBJ,UAAUG,KAAAA,KAAaH,UAAU;CAElD,IAAI,CAACE,YAAD,CAAcE,UAAQ,OACjB;CACR,IAAAC;CAAA,IAAAR,EAAA,OAAAI,OAAA;EAGcI,KAAA1B,SAASsB,KAAK;EAACJ,EAAA,KAAAI;EAAAJ,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAS;CAAA,IAAAT,EAAA,OAAAK,YAAAL,EAAA,OAAAE,OAAA;EACzBO,KAAAJ,WACC,oBAAC0D,QAAD;GAAa,OAAAlF,OAAMqB;GAAa,MAAA;GAAgB,SAAA;GAC7CA,UAAAA;EADE,CAAA,IADN;EAIOF,EAAA,KAAAK;EAAAL,EAAA,KAAAE;EAAAF,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,IAAAU;CAAA,IAAAV,EAAA,OAAAO,YAAAP,EAAA,OAAAG,OAAA;EACPO,KAAAH,WACC,oBAACwD,QAAD;GACiB,eAAA;G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