- All default values of provider elements’
option-*attributes are nowundefined, if you relied on<intl-displaynames>’soption-typeattribute beinglanguageby default, you need to set it tolanguageexplicitly now
- Locale list used by provider element’s internal
Intlobjects are now normalized, e.g.en_us,en-us,En-uSare now treated the same asen-US - All
option*properties are reflective now, meaning if its value is changed, its corresponding attribute will change as well - When
Intl.supportedValuesOf()is not supported, provider elements don’t verify ifoption-*/option*values are supported anymore - When
Intl.<Constructor>.supportedLocalesOf()is not supported,localeListproperty’ssupports()always returnstruenow
- Avoid throwing errors when
Intl.supportedValuesOf()and/orIntl.<Constructor>.supportedLocalesOf()not supported - Line wrapping issue in
<intl-segmenter-segment>in Safari: It only wrapped lines during the initial rendering, changing browser window size didn’t cause line wrapping
- Removed
consumerElementsproperty from provider elements
- More documentations
localeListproperty is now aDOMTokenList(#45)
- Removed
display-*attributes from<intl-locale>element
localeListproperty can access members via indexes now, e.g.myIntlElement.localeList[0].- Documentations
- Added Custom Elements Manifest file:
custom-elements.json
- Providers now observe
<html>’slangattribute changes
intl-elementsresolves properly now- Custom elements are added to
JSX.IntrinsicElementsnow
- [
intl-collator] Added the custom element - [
intl-collator-compare] Added the custom element
- [
intl-segmenter-segment] Screen readers read the full text input now, instead of every the segmented text in span elements
- [
intl-pluralrules] Added the custom element - [
intl-pluralrules-select] Added the custom element
- [
intl-numberformat-format,intl-numberformat-formattoparts] Renders when the number is 0
- [
intl-datetimeformat] Added the custom element - [
intl-datetimeformat-format] Added the custom element - [
intl-datetimeformat-formattoparts] Added the custom element - [
intl-datetimeformat-formatrange] Added the custom element - [
intl-datetimeformat-formatrangetoparts] Added the custom element
- All
partnames are in kebab case instead of camel case now
- When the
localesattrbute contains multiple locales separated by whitespaces, itsIntlobject throws errors. This is due to thelocalesargument passed into anIntlis incorrectly typed as a string instead of an array
- [
intl-numberformat] Added the custom element. - [
intl-numberformat-format] Added the custom element. - [
intl-numberformat-formattoparts] Added the custom element. - All consumer element’s
valuepart element now haslanganddirattributes set based on the first locale in their provider element’slocaleListproperty
- All attribute values are case-insensitive now.
- All consumer elements now can specify their provider element via the
providerattribute, hence, they no long need to be descendants of their provider elements - [
intl-segmenter] Added the custom element - [
intl-segmenter-segment] Added the custom element
- Redesigned all the custom element APIs, details will be added to README.md
with the
1.0.0release
- Renamed all attributes and properties to one of the following format:
option-<option key>/option<Option Key>: For options of an constructor function, e.g.option-type/optionType,option-localematcher/optionLocaleMatcher, as a result,intl-styleis nowoption-style`<method name>-<argument name>/<method name><Argument Name>: For arguments of a method, e.g.format-unit/formatUnit,of-code/ofCode, etc.locales: This attribute remains unchanged
- All
option-*attributes are not reflected from their corresponding properties anymore.
- [
intl-displaynames]: Addedvalueread only property, its value is the same as its trimmed text content - [
intl-listformat]: AddedformattedPartsread only property to return the same value asIntl.ListFormat’sformatToParts()method. - [
intl-listformat]: Addedvalueread only property, its value is the same as its trimmed text content - [
intl-relativetimeformat] Added the custom element - [
intl-locale] Added the custom element - Specifiying locales with the new
locales-from, an ancestor element with thelangattribute or an ancestorintl-localeelement
- [
intl-listformat] Ignoresintl-listitemelements with empty text content localeListproperty is now aLocaleList, which implements theDOMTokenListinterface, and can be used similarly to theclassListproperty, but accessing members with the bracket notation, e.g.localeList[0],localeList[1], etc., is not supported- Locales are now normalized to BCP 47 language tags before being passed to the
Intlconstructors, and invalid locales are now removed localeListchanges will only result inlocaleschanges iflocaleshas been defined by the user
langanddirno longer reflect the first locale inlocaleList
- Include updated files in the package
- Export custom element definition functions without automatic registering them
- Include LICENSE in the package
intl-displaynameselementintl-listformatelementintl-listitemelement