Telephone country code select (#9473)

* add telephone code select

* add flags

* run svgo on flags

* get it somewhat working on web

* get web closed state working

* verify country code we get from geo

* trim down names to shorter common versions

* add labels to other selects

* make international tel codes a static object

* add component to storybook

* Update src/lib/international-telephone-codes.ts

Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>

* update to new geo hook

* use Intl.DisplayNames, add polyfill

* use in rather than keys().includes()

---------

Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
This commit is contained in:
Samuel Newman
2025-12-10 22:12:30 +02:00
committed by GitHub
parent 07e1b3a0b6
commit 6ccda945e5
280 changed files with 1995 additions and 112 deletions
+17 -2
View File
@@ -503,9 +503,23 @@ export function Switch() {
}
export function Radio() {
const props = useContext(ItemContext)
return <BaseRadio {...props} />
}
export function BaseRadio({
hovered,
focused,
selected,
disabled,
isInvalid,
}: Pick<
ItemState,
'hovered' | 'focused' | 'selected' | 'disabled' | 'isInvalid'
>) {
const t = useTheme()
const {selected, hovered, focused, disabled, isInvalid} =
useContext(ItemContext)
const {baseStyles, baseHoverStyles, indicatorStyles} =
createSharedToggleStyles({
theme: t,
@@ -515,6 +529,7 @@ export function Radio() {
disabled,
isInvalid,
})
return (
<View
style={[