You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v2.0.2: LocalePicker, translatable labels, PhoneInput country control
#89
LocalePicker: new component. A searchable region picker that shows the selected region's currency, date and number formats, and first day of the week. Keyboard accessible and RTL-aware. (feat: add LocalePicker component #49, @ujwalbajaj)
PhoneInput: typing or pasting a number that starts with + switches to the matching country and removes the dial code, along with the separator after it. Shared codes (+1, +7) keep the current country when it matches. Digits already in the field are never consumed. (feat: controllable country and dial-code detection for PhoneInput #86)
<PhoneInputcountry={country}onCountryChange={(c)=>setCountry(c.code)}labels={{searchPlaceholder: "Rechercher un pays..."}}displayLocale="fr"/>
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Added
LanguageSwitcher,PhoneInput,NavBarandTranslationWidgettake an optionallabelsprop for their built-in text: placeholders, empty states, accessible labels and screen reader announcements. Any key you leave out keeps its English default. Each component exports a typed*Labelsinterface. (feat: translatable UI labels for LanguageSwitcher, PhoneInput, NavBar and TranslationWidget (#30) #81, @iNerdStack)displayLocaleshows country names throughIntl.DisplayNames, and search matches the translated name. (feat: translatable UI labels for LanguageSwitcher, PhoneInput, NavBar and TranslationWidget (#30) #81)countryandonCountryChange.defaultCountrystill works for uncontrolled use. (feat: controllable country and dial-code detection for PhoneInput #86, @ujwalbajaj)+switches to the matching country and removes the dial code, along with the separator after it. Shared codes (+1,+7) keep the current country when it matches. Digits already in the field are never consumed. (feat: controllable country and dial-code detection for PhoneInput #86)Docs
/api/searchroute. (fix(docs): add the /api/search route behind the search dialog #83)stageClassName. (fix(docs): allow customizable preview stage height and expand navbar stage #82, @TanmayNileshShinde)No breaking changes.
searchPlaceholderandemptyMessagestill work as aliases of the matchinglabelskeys, and the direct prop wins when both are set.Full changelog: v2.0.1...v2.0.2
This discussion was created from the release v2.0.2: LocalePicker, translatable labels, PhoneInput country control.
All reactions