@react-aria/i18n
Advanced tools
Comparing version 3.0.2 to 3.1.0
@@ -31,2 +31,5 @@ var _intlMessageformat = $parcel$interopDefault(require("intl-messageformat")); | ||
const $dbb62b32f79d03a795a46f9fbec514c$var$RTL_LANGS = new Set(['ae', 'ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he', 'ku', 'mzn', 'nqo', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi']); | ||
/** | ||
* Determines if a locale is read right to left using [Intl.Locale]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale}. | ||
*/ | ||
@@ -48,2 +51,5 @@ function $dbb62b32f79d03a795a46f9fbec514c$export$isRTL(locale) { | ||
/** | ||
* Gets the locale setting of the browser. | ||
*/ | ||
function $c53c7d716f930bd5da78e9efb99e3e$export$getDefaultLocale() { | ||
@@ -67,3 +73,6 @@ // @ts-ignore | ||
} | ||
} // Returns the current browser/system language, and updates when it changes. | ||
} | ||
/** | ||
* Returns the current browser/system language, and updates when it changes. | ||
*/ | ||
@@ -128,3 +137,3 @@ | ||
* Automatically updates when the locale changes, and handles caching of messages for performance. | ||
* @param strings - a mapping of languages to strings by key | ||
* @param strings - A mapping of languages to strings by key. | ||
*/ | ||
@@ -212,3 +221,3 @@ | ||
* and handles caching of the date formatter for performance. | ||
* @param options - formatting options | ||
* @param options - Formatting options. | ||
*/ | ||
@@ -236,3 +245,3 @@ | ||
* and handles caching of the number formatter for performance. | ||
* @param options - formatting options | ||
* @param options - Formatting options. | ||
*/ | ||
@@ -260,3 +269,3 @@ | ||
* and handles caching of the collator for performance. | ||
* @param options - collator options | ||
* @param options - Collator options. | ||
*/ | ||
@@ -263,0 +272,0 @@ |
@@ -18,2 +18,5 @@ import _intlMessageformat from "intl-messageformat"; | ||
const $d26e725ad56fbcb2c25f52b7de27$var$RTL_LANGS = new Set(['ae', 'ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he', 'ku', 'mzn', 'nqo', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi']); | ||
/** | ||
* Determines if a locale is read right to left using [Intl.Locale]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale}. | ||
*/ | ||
@@ -35,2 +38,5 @@ function $d26e725ad56fbcb2c25f52b7de27$export$isRTL(locale) { | ||
/** | ||
* Gets the locale setting of the browser. | ||
*/ | ||
function $e851d0b81d46abd5f971c8e95c27f1$export$getDefaultLocale() { | ||
@@ -54,3 +60,6 @@ // @ts-ignore | ||
} | ||
} // Returns the current browser/system language, and updates when it changes. | ||
} | ||
/** | ||
* Returns the current browser/system language, and updates when it changes. | ||
*/ | ||
@@ -110,3 +119,3 @@ | ||
* Automatically updates when the locale changes, and handles caching of messages for performance. | ||
* @param strings - a mapping of languages to strings by key | ||
* @param strings - A mapping of languages to strings by key. | ||
*/ | ||
@@ -192,3 +201,3 @@ | ||
* and handles caching of the date formatter for performance. | ||
* @param options - formatting options | ||
* @param options - Formatting options. | ||
*/ | ||
@@ -214,3 +223,3 @@ | ||
* and handles caching of the number formatter for performance. | ||
* @param options - formatting options | ||
* @param options - Formatting options. | ||
*/ | ||
@@ -236,3 +245,3 @@ | ||
* and handles caching of the collator for performance. | ||
* @param options - collator options | ||
* @param options - Collator options. | ||
*/ | ||
@@ -239,0 +248,0 @@ |
@@ -34,3 +34,3 @@ import { Direction } from "@react-types/shared"; | ||
* Automatically updates when the locale changes, and handles caching of messages for performance. | ||
* @param strings - a mapping of languages to strings by key | ||
* @param strings - A mapping of languages to strings by key. | ||
*/ | ||
@@ -41,3 +41,3 @@ export function useMessageFormatter(strings: MessageFormatterStrings): FormatMessage; | ||
* and handles caching of the date formatter for performance. | ||
* @param options - formatting options | ||
* @param options - Formatting options. | ||
*/ | ||
@@ -48,3 +48,3 @@ export function useDateFormatter(options?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat; | ||
* and handles caching of the number formatter for performance. | ||
* @param options - formatting options | ||
* @param options - Formatting options. | ||
*/ | ||
@@ -55,3 +55,3 @@ export function useNumberFormatter(options?: Intl.NumberFormatOptions): Intl.NumberFormat; | ||
* and handles caching of the collator for performance. | ||
* @param options - collator options | ||
* @param options - Collator options. | ||
*/ | ||
@@ -58,0 +58,0 @@ export function useCollator(options?: Intl.CollatorOptions): Intl.Collator; |
{ | ||
"name": "@react-aria/i18n", | ||
"version": "3.0.2", | ||
"version": "3.1.0", | ||
"description": "Spectrum UI components in React", | ||
@@ -21,3 +21,3 @@ "license": "Apache-2.0", | ||
"@babel/runtime": "^7.6.2", | ||
"@react-types/shared": "^3.0.2", | ||
"@react-types/shared": "^3.1.0", | ||
"intl-messageformat": "^2.2.0" | ||
@@ -31,3 +31,3 @@ }, | ||
}, | ||
"gitHead": "05003506f02a0ec173f3448f1801cbdf12b47bc7" | ||
"gitHead": "211099972fe75ee581892efd01a7f89dfb9cdf69" | ||
} |
@@ -20,3 +20,3 @@ /* | ||
* and handles caching of the collator for performance. | ||
* @param options - collator options | ||
* @param options - Collator options. | ||
*/ | ||
@@ -23,0 +23,0 @@ export function useCollator(options?: Intl.CollatorOptions): Intl.Collator { |
@@ -20,3 +20,3 @@ /* | ||
* and handles caching of the date formatter for performance. | ||
* @param options - formatting options | ||
* @param options - Formatting options. | ||
*/ | ||
@@ -23,0 +23,0 @@ export function useDateFormatter(options?: Intl.DateTimeFormatOptions): Intl.DateTimeFormat { |
@@ -24,2 +24,5 @@ /* | ||
/** | ||
* Gets the locale setting of the browser. | ||
*/ | ||
export function getDefaultLocale(): Locale { | ||
@@ -44,3 +47,5 @@ // @ts-ignore | ||
// Returns the current browser/system language, and updates when it changes. | ||
/** | ||
* Returns the current browser/system language, and updates when it changes. | ||
*/ | ||
export function useDefaultLocale() { | ||
@@ -47,0 +52,0 @@ let [defaultLocale, setDefaultLocale] = useState(currentLocale); |
@@ -29,3 +29,3 @@ /* | ||
* Automatically updates when the locale changes, and handles caching of messages for performance. | ||
* @param strings - a mapping of languages to strings by key | ||
* @param strings - A mapping of languages to strings by key. | ||
*/ | ||
@@ -32,0 +32,0 @@ export function useMessageFormatter(strings: MessageFormatterStrings): FormatMessage { |
@@ -20,3 +20,3 @@ /* | ||
* and handles caching of the number formatter for performance. | ||
* @param options - formatting options | ||
* @param options - Formatting options. | ||
*/ | ||
@@ -23,0 +23,0 @@ export function useNumberFormatter(options?: Intl.NumberFormatOptions): Intl.NumberFormat { |
@@ -17,2 +17,5 @@ /* | ||
/** | ||
* Determines if a locale is read right to left using [Intl.Locale]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale}. | ||
*/ | ||
export function isRTL(locale: string) { | ||
@@ -19,0 +22,0 @@ // If the Intl.Locale API is available, use it to get the script for the locale. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
89226
800
Updated@react-types/shared@^3.1.0