- All default values of provider elements’
option-*
attributes are nowundefined
, if you relied on<intl-displaynames>
’soption-type
attribute beinglanguage
by default, you need to set it tolanguage
explicitly now
- Locale list used by provider element’s internal
Intl
objects are now normalized, e.g.en_us
,en-us
,En-uS
are 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,localeList
property’ssupports()
always returnstrue
now
- 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
consumerElements
property from provider elements
- More documentations
localeList
property is now aDOMTokenList
(#45)
- Removed
display-*
attributes from<intl-locale>
element
localeList
property can access members via indexes now, e.g.myIntlElement.localeList[0]
.- Documentations
- Added Custom Elements Manifest file:
custom-elements.json
- Providers now observe
<html>
’slang
attribute changes
intl-elements
resolves properly now- Custom elements are added to
JSX.IntrinsicElements
now
- [
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
part
names are in kebab case instead of camel case now
- When the
locales
attrbute contains multiple locales separated by whitespaces, itsIntl
object throws errors. This is due to thelocales
argument passed into anIntl
is 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
value
part element now haslang
anddir
attributes set based on the first locale in their provider element’slocaleList
property
- All attribute values are case-insensitive now.
- All consumer elements now can specify their provider element via the
provider
attribute, 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.0
release
- 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 now
option-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
]: Addedvalue
read only property, its value is the same as its trimmed text content - [
intl-listformat
]: AddedformattedParts
read only property to return the same value asIntl.ListFormat
’sformatToParts()
method. - [
intl-listformat
]: Addedvalue
read 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 thelang
attribute or an ancestorintl-locale
element
- [
intl-listformat
] Ignoresintl-listitem
elements with empty text content localeList
property is now aLocaleList
, which implements theDOMTokenList
interface, and can be used similarly to theclassList
property, 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
Intl
constructors, and invalid locales are now removed localeList
changes will only result inlocales
changes iflocales
has been defined by the user
lang
anddir
no 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-displaynames
elementintl-listformat
elementintl-listitem
element