@expo/ui 56.0.18 → 56.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +25 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/DatePickerView.kt +33 -8
- package/build/community/bottom-sheet/BottomSheet.android.d.ts.map +1 -1
- package/build/community/bottom-sheet/BottomSheet.ios.d.ts.map +1 -1
- package/build/community/bottom-sheet/scrollContextReset.d.ts +5 -0
- package/build/community/bottom-sheet/scrollContextReset.d.ts.map +1 -0
- package/build/community/datetime-picker/DateTimePicker.d.ts.map +1 -1
- package/build/community/datetime-picker/types.d.ts +2 -2
- package/build/community/datetime-picker/types.d.ts.map +1 -1
- package/build/community/menu/types.d.ts +2 -2
- package/build/community/menu/types.d.ts.map +1 -1
- package/build/community/pager-view/types.d.ts +2 -2
- package/build/community/pager-view/types.d.ts.map +1 -1
- package/build/community/segmented-control/types.d.ts +2 -2
- package/build/community/segmented-control/types.d.ts.map +1 -1
- package/build/community/slider/types.d.ts +2 -2
- package/build/community/slider/types.d.ts.map +1 -1
- package/build/jetpack-compose/AlertDialog/index.d.ts +2 -2
- package/build/jetpack-compose/AlertDialog/index.d.ts.map +1 -1
- package/build/jetpack-compose/AnimatedVisibility/index.d.ts +2 -2
- package/build/jetpack-compose/AnimatedVisibility/index.d.ts.map +1 -1
- package/build/jetpack-compose/Badge/index.d.ts +2 -2
- package/build/jetpack-compose/Badge/index.d.ts.map +1 -1
- package/build/jetpack-compose/BadgedBox/index.d.ts +2 -2
- package/build/jetpack-compose/BadgedBox/index.d.ts.map +1 -1
- package/build/jetpack-compose/BasicAlertDialog/index.d.ts +2 -2
- package/build/jetpack-compose/BasicAlertDialog/index.d.ts.map +1 -1
- package/build/jetpack-compose/Box/index.d.ts +2 -2
- package/build/jetpack-compose/Box/index.d.ts.map +1 -1
- package/build/jetpack-compose/Button/index.d.ts +2 -2
- package/build/jetpack-compose/Button/index.d.ts.map +1 -1
- package/build/jetpack-compose/Card/index.d.ts +6 -6
- package/build/jetpack-compose/Card/index.d.ts.map +1 -1
- package/build/jetpack-compose/Carousel/index.d.ts +6 -6
- package/build/jetpack-compose/Carousel/index.d.ts.map +1 -1
- package/build/jetpack-compose/Checkbox/index.d.ts +4 -4
- package/build/jetpack-compose/Checkbox/index.d.ts.map +1 -1
- package/build/jetpack-compose/Chip/index.d.ts +8 -8
- package/build/jetpack-compose/Chip/index.d.ts.map +1 -1
- package/build/jetpack-compose/Column/index.d.ts +2 -2
- package/build/jetpack-compose/Column/index.d.ts.map +1 -1
- package/build/jetpack-compose/DatePicker/index.d.ts +6 -6
- package/build/jetpack-compose/DatePicker/index.d.ts.map +1 -1
- package/build/jetpack-compose/DockedSearchBar/index.d.ts +2 -2
- package/build/jetpack-compose/DockedSearchBar/index.d.ts.map +1 -1
- package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts +2 -2
- package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
- package/build/jetpack-compose/DropdownMenu/index.d.ts +2 -2
- package/build/jetpack-compose/DropdownMenu/index.d.ts.map +1 -1
- package/build/jetpack-compose/ExposedDropdownMenuBox/ExposedDropdownMenu.d.ts +2 -2
- package/build/jetpack-compose/ExposedDropdownMenuBox/ExposedDropdownMenu.d.ts.map +1 -1
- package/build/jetpack-compose/ExposedDropdownMenuBox/index.d.ts +2 -2
- package/build/jetpack-compose/ExposedDropdownMenuBox/index.d.ts.map +1 -1
- package/build/jetpack-compose/FloatingActionButton/index.d.ts +8 -6
- package/build/jetpack-compose/FloatingActionButton/index.d.ts.map +1 -1
- package/build/jetpack-compose/FlowRow/index.d.ts +2 -2
- package/build/jetpack-compose/FlowRow/index.d.ts.map +1 -1
- package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts +4 -4
- package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts.map +1 -1
- package/build/jetpack-compose/HorizontalPager/index.d.ts +2 -2
- package/build/jetpack-compose/HorizontalPager/index.d.ts.map +1 -1
- package/build/jetpack-compose/Host/index.d.ts +2 -2
- package/build/jetpack-compose/Host/index.d.ts.map +1 -1
- package/build/jetpack-compose/Icon/index.d.ts +2 -2
- package/build/jetpack-compose/Icon/index.d.ts.map +1 -1
- package/build/jetpack-compose/IconButton/index.d.ts +2 -2
- package/build/jetpack-compose/IconButton/index.d.ts.map +1 -1
- package/build/jetpack-compose/LazyColumn/index.d.ts +2 -2
- package/build/jetpack-compose/LazyColumn/index.d.ts.map +1 -1
- package/build/jetpack-compose/LazyRow/index.d.ts +2 -2
- package/build/jetpack-compose/LazyRow/index.d.ts.map +1 -1
- package/build/jetpack-compose/ListItem/index.d.ts +2 -2
- package/build/jetpack-compose/ListItem/index.d.ts.map +1 -1
- package/build/jetpack-compose/LoadingIndicator/index.d.ts +2 -2
- package/build/jetpack-compose/LoadingIndicator/index.d.ts.map +1 -1
- package/build/jetpack-compose/ModalBottomSheet/index.d.ts +2 -2
- package/build/jetpack-compose/ModalBottomSheet/index.d.ts.map +1 -1
- package/build/jetpack-compose/MultiChoiceSegmentedButtonRow/index.d.ts +2 -2
- package/build/jetpack-compose/MultiChoiceSegmentedButtonRow/index.d.ts.map +1 -1
- package/build/jetpack-compose/NavigationBar/index.d.ts +4 -4
- package/build/jetpack-compose/NavigationBar/index.d.ts.map +1 -1
- package/build/jetpack-compose/Progress/index.d.ts +9 -8
- package/build/jetpack-compose/Progress/index.d.ts.map +1 -1
- package/build/jetpack-compose/PullToRefreshBox/index.d.ts +4 -4
- package/build/jetpack-compose/PullToRefreshBox/index.d.ts.map +1 -1
- package/build/jetpack-compose/RadioButton/index.d.ts +2 -2
- package/build/jetpack-compose/RadioButton/index.d.ts.map +1 -1
- package/build/jetpack-compose/Row/index.d.ts +2 -2
- package/build/jetpack-compose/Row/index.d.ts.map +1 -1
- package/build/jetpack-compose/SearchBar/index.d.ts +2 -2
- package/build/jetpack-compose/SearchBar/index.d.ts.map +1 -1
- package/build/jetpack-compose/SegmentedButton/index.d.ts +2 -2
- package/build/jetpack-compose/SegmentedButton/index.d.ts.map +1 -1
- package/build/jetpack-compose/Shape/index.d.ts +2 -2
- package/build/jetpack-compose/Shape/index.d.ts.map +1 -1
- package/build/jetpack-compose/SingleChoiceSegmentedButtonRow/index.d.ts +2 -2
- package/build/jetpack-compose/SingleChoiceSegmentedButtonRow/index.d.ts.map +1 -1
- package/build/jetpack-compose/Slider/index.d.ts +2 -2
- package/build/jetpack-compose/Slider/index.d.ts.map +1 -1
- package/build/jetpack-compose/Snackbar/index.d.ts +4 -4
- package/build/jetpack-compose/Snackbar/index.d.ts.map +1 -1
- package/build/jetpack-compose/Spacer/index.d.ts +2 -2
- package/build/jetpack-compose/Spacer/index.d.ts.map +1 -1
- package/build/jetpack-compose/Surface/index.d.ts +2 -2
- package/build/jetpack-compose/Surface/index.d.ts.map +1 -1
- package/build/jetpack-compose/Switch/index.d.ts +2 -2
- package/build/jetpack-compose/Switch/index.d.ts.map +1 -1
- package/build/jetpack-compose/SyncSwitch/index.d.ts +2 -2
- package/build/jetpack-compose/SyncSwitch/index.d.ts.map +1 -1
- package/build/jetpack-compose/Text/index.d.ts +2 -2
- package/build/jetpack-compose/Text/index.d.ts.map +1 -1
- package/build/jetpack-compose/TextField/BasicTextField.d.ts +2 -2
- package/build/jetpack-compose/TextField/BasicTextField.d.ts.map +1 -1
- package/build/jetpack-compose/TextField/TextField.d.ts +4 -4
- package/build/jetpack-compose/TextField/TextField.d.ts.map +1 -1
- package/build/jetpack-compose/ToggleButton/index.d.ts +2 -2
- package/build/jetpack-compose/ToggleButton/index.d.ts.map +1 -1
- package/build/jetpack-compose/Tooltip/index.d.ts +6 -6
- package/build/jetpack-compose/Tooltip/index.d.ts.map +1 -1
- package/build/swift-ui/AccessoryWidgetBackground/index.d.ts +2 -1
- package/build/swift-ui/AccessoryWidgetBackground/index.d.ts.map +1 -1
- package/build/swift-ui/Alert/index.d.ts +2 -2
- package/build/swift-ui/Alert/index.d.ts.map +1 -1
- package/build/swift-ui/BottomSheet/index.d.ts +2 -2
- package/build/swift-ui/BottomSheet/index.d.ts.map +1 -1
- package/build/swift-ui/Button/index.d.ts +2 -2
- package/build/swift-ui/Button/index.d.ts.map +1 -1
- package/build/swift-ui/Chart/index.d.ts +2 -2
- package/build/swift-ui/Chart/index.d.ts.map +1 -1
- package/build/swift-ui/ColorPicker/index.d.ts +2 -2
- package/build/swift-ui/ColorPicker/index.d.ts.map +1 -1
- package/build/swift-ui/ConfirmationDialog/index.d.ts +2 -2
- package/build/swift-ui/ConfirmationDialog/index.d.ts.map +1 -1
- package/build/swift-ui/ContextMenu/types.d.ts +4 -4
- package/build/swift-ui/ContextMenu/types.d.ts.map +1 -1
- package/build/swift-ui/DatePicker/index.d.ts +2 -2
- package/build/swift-ui/DatePicker/index.d.ts.map +1 -1
- package/build/swift-ui/Divider/index.d.ts +2 -1
- package/build/swift-ui/Divider/index.d.ts.map +1 -1
- package/build/swift-ui/Gauge/index.d.ts +2 -2
- package/build/swift-ui/Gauge/index.d.ts.map +1 -1
- package/build/swift-ui/GlassEffectContainer/index.d.ts +2 -2
- package/build/swift-ui/GlassEffectContainer/index.d.ts.map +1 -1
- package/build/swift-ui/Grid/index.d.ts +2 -2
- package/build/swift-ui/Grid/index.d.ts.map +1 -1
- package/build/swift-ui/HStack/index.d.ts +2 -2
- package/build/swift-ui/HStack/index.d.ts.map +1 -1
- package/build/swift-ui/Host/index.d.ts +9 -3
- package/build/swift-ui/Host/index.d.ts.map +1 -1
- package/build/swift-ui/Label/index.d.ts +2 -2
- package/build/swift-ui/Label/index.d.ts.map +1 -1
- package/build/swift-ui/LabeledContent/index.d.ts +2 -2
- package/build/swift-ui/LabeledContent/index.d.ts.map +1 -1
- package/build/swift-ui/LazyHStack/index.d.ts +2 -2
- package/build/swift-ui/LazyHStack/index.d.ts.map +1 -1
- package/build/swift-ui/LazyVStack/index.d.ts +2 -2
- package/build/swift-ui/LazyVStack/index.d.ts.map +1 -1
- package/build/swift-ui/Link/index.d.ts +2 -2
- package/build/swift-ui/Link/index.d.ts.map +1 -1
- package/build/swift-ui/List/ListForEach.d.ts +2 -2
- package/build/swift-ui/List/ListForEach.d.ts.map +1 -1
- package/build/swift-ui/Mask/index.d.ts +2 -2
- package/build/swift-ui/Mask/index.d.ts.map +1 -1
- package/build/swift-ui/Menu/types.d.ts +2 -2
- package/build/swift-ui/Menu/types.d.ts.map +1 -1
- package/build/swift-ui/Namespace.d.ts +2 -2
- package/build/swift-ui/Namespace.d.ts.map +1 -1
- package/build/swift-ui/Overlay/index.d.ts +2 -2
- package/build/swift-ui/Overlay/index.d.ts.map +1 -1
- package/build/swift-ui/Popover/index.d.ts +2 -2
- package/build/swift-ui/Popover/index.d.ts.map +1 -1
- package/build/swift-ui/ProgressView/index.d.ts +2 -2
- package/build/swift-ui/ProgressView/index.d.ts.map +1 -1
- package/build/swift-ui/RNHostView.d.ts +2 -2
- package/build/swift-ui/RNHostView.d.ts.map +1 -1
- package/build/swift-ui/ScrollView/index.d.ts +2 -2
- package/build/swift-ui/ScrollView/index.d.ts.map +1 -1
- package/build/swift-ui/Section/index.d.ts +2 -2
- package/build/swift-ui/Section/index.d.ts.map +1 -1
- package/build/swift-ui/SecureField/index.d.ts +2 -2
- package/build/swift-ui/SecureField/index.d.ts.map +1 -1
- package/build/swift-ui/ShareLink/index.d.ts +2 -2
- package/build/swift-ui/ShareLink/index.d.ts.map +1 -1
- package/build/swift-ui/Slider/index.d.ts +2 -2
- package/build/swift-ui/Slider/index.d.ts.map +1 -1
- package/build/swift-ui/Stepper/index.d.ts +2 -2
- package/build/swift-ui/Stepper/index.d.ts.map +1 -1
- package/build/swift-ui/SwipeActions/index.d.ts +4 -4
- package/build/swift-ui/SwipeActions/index.d.ts.map +1 -1
- package/build/swift-ui/SyncToggle/index.d.ts +2 -2
- package/build/swift-ui/SyncToggle/index.d.ts.map +1 -1
- package/build/swift-ui/TabView/Tab.d.ts +2 -2
- package/build/swift-ui/TabView/Tab.d.ts.map +1 -1
- package/build/swift-ui/TabView/index.d.ts +2 -2
- package/build/swift-ui/TabView/index.d.ts.map +1 -1
- package/build/swift-ui/TextField/index.d.ts +2 -2
- package/build/swift-ui/TextField/index.d.ts.map +1 -1
- package/build/swift-ui/Toggle/index.d.ts +2 -2
- package/build/swift-ui/Toggle/index.d.ts.map +1 -1
- package/build/swift-ui/VStack/index.d.ts +2 -2
- package/build/swift-ui/VStack/index.d.ts.map +1 -1
- package/build/swift-ui/ZStack/index.d.ts +2 -2
- package/build/swift-ui/ZStack/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/index.d.ts +59 -1
- package/build/swift-ui/modifiers/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/presentationModifiers.d.ts +19 -0
- package/build/swift-ui/modifiers/presentationModifiers.d.ts.map +1 -1
- package/build/universal/Button/index.d.ts.map +1 -1
- package/build/universal/Checkbox/index.d.ts.map +1 -1
- package/build/universal/Collapsible/index.d.ts.map +1 -1
- package/build/universal/FieldGroup/FieldGroup.d.ts.map +1 -1
- package/build/universal/FieldGroup/FieldSection.d.ts.map +1 -1
- package/build/universal/Host/index.d.ts +1 -2
- package/build/universal/Host/index.d.ts.map +1 -1
- package/build/universal/Host/types.d.ts +16 -2
- package/build/universal/Host/types.d.ts.map +1 -1
- package/build/universal/ListItem/ListItem.android.d.ts.map +1 -1
- package/build/universal/ListItem/ListItem.ios.d.ts.map +1 -1
- package/build/universal/ListItem/types.d.ts +8 -0
- package/build/universal/ListItem/types.d.ts.map +1 -1
- package/build/universal/Picker/Picker.d.ts.map +1 -1
- package/build/universal/Slider/index.d.ts.map +1 -1
- package/build/universal/Switch/index.d.ts.map +1 -1
- package/build/universal/TextInput/index.d.ts.map +1 -1
- package/build/universal/hooks.d.ts +11 -0
- package/build/universal/hooks.d.ts.map +1 -1
- package/build/universal/keyboardEvent.fx.d.ts +2 -0
- package/build/universal/keyboardEvent.fx.d.ts.map +1 -0
- package/build/universal/webUtils.d.ts +66 -0
- package/build/universal/webUtils.d.ts.map +1 -0
- package/expo-module.config.json +1 -1
- package/ios/HostView.swift +15 -0
- package/ios/Modifiers/PresentationModifiers.swift +30 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +115 -11
- package/ios/Modifiers/WidgetModifiers.swift +1 -1
- package/ios/RNHostView.swift +5 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.18/expo.modules.ui-56.0.18-sources.jar → 56.0.19/expo.modules.ui-56.0.19-sources.jar} +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.18/expo.modules.ui-56.0.18.module → 56.0.19/expo.modules.ui-56.0.19.module} +22 -22
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.18/expo.modules.ui-56.0.18.pom → 56.0.19/expo.modules.ui-56.0.19.pom} +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.pom.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
- package/package.json +4 -9
- package/plugin/tsconfig.tsbuildinfo +1 -0
- package/src/State/index.fx.ts +4 -5
- package/src/community/bottom-sheet/BottomSheet.android.tsx +6 -1
- package/src/community/bottom-sheet/BottomSheet.ios.tsx +8 -4
- package/src/community/bottom-sheet/scrollContextReset.tsx +24 -0
- package/src/community/datetime-picker/DateTimePicker.tsx +9 -1
- package/src/community/datetime-picker/types.tsx +2 -2
- package/src/community/menu/types.tsx +2 -2
- package/src/community/pager-view/types.tsx +2 -2
- package/src/community/segmented-control/types.tsx +2 -2
- package/src/community/slider/types.tsx +2 -2
- package/src/jetpack-compose/AlertDialog/index.tsx +2 -2
- package/src/jetpack-compose/AnimatedVisibility/index.tsx +2 -2
- package/src/jetpack-compose/Badge/index.tsx +2 -2
- package/src/jetpack-compose/BadgedBox/index.tsx +2 -2
- package/src/jetpack-compose/BasicAlertDialog/index.tsx +2 -2
- package/src/jetpack-compose/Box/index.tsx +2 -2
- package/src/jetpack-compose/Button/index.tsx +2 -2
- package/src/jetpack-compose/Card/index.tsx +6 -6
- package/src/jetpack-compose/Carousel/index.tsx +6 -6
- package/src/jetpack-compose/Checkbox/index.tsx +4 -4
- package/src/jetpack-compose/Chip/index.tsx +8 -8
- package/src/jetpack-compose/Column/index.tsx +2 -2
- package/src/jetpack-compose/DatePicker/index.tsx +6 -6
- package/src/jetpack-compose/DockedSearchBar/index.tsx +2 -2
- package/src/jetpack-compose/DropdownMenu/DropdownMenuItem.tsx +2 -2
- package/src/jetpack-compose/DropdownMenu/index.tsx +2 -2
- package/src/jetpack-compose/ExposedDropdownMenuBox/ExposedDropdownMenu.tsx +2 -2
- package/src/jetpack-compose/ExposedDropdownMenuBox/index.tsx +2 -2
- package/src/jetpack-compose/FloatingActionButton/index.tsx +6 -6
- package/src/jetpack-compose/FlowRow/index.tsx +2 -2
- package/src/jetpack-compose/HorizontalFloatingToolbar/index.tsx +4 -4
- package/src/jetpack-compose/HorizontalPager/index.tsx +2 -2
- package/src/jetpack-compose/Host/index.tsx +2 -2
- package/src/jetpack-compose/Icon/index.tsx +2 -2
- package/src/jetpack-compose/IconButton/index.tsx +2 -2
- package/src/jetpack-compose/LazyColumn/index.tsx +2 -2
- package/src/jetpack-compose/LazyRow/index.tsx +2 -2
- package/src/jetpack-compose/ListItem/index.tsx +2 -2
- package/src/jetpack-compose/LoadingIndicator/index.tsx +2 -2
- package/src/jetpack-compose/ModalBottomSheet/index.tsx +2 -2
- package/src/jetpack-compose/MultiChoiceSegmentedButtonRow/index.tsx +2 -2
- package/src/jetpack-compose/NavigationBar/index.tsx +4 -4
- package/src/jetpack-compose/Progress/index.tsx +7 -7
- package/src/jetpack-compose/PullToRefreshBox/index.tsx +4 -4
- package/src/jetpack-compose/RadioButton/index.tsx +2 -2
- package/src/jetpack-compose/Row/index.tsx +2 -2
- package/src/jetpack-compose/SearchBar/index.tsx +2 -2
- package/src/jetpack-compose/SegmentedButton/index.tsx +2 -2
- package/src/jetpack-compose/Shape/index.tsx +2 -2
- package/src/jetpack-compose/SingleChoiceSegmentedButtonRow/index.tsx +2 -2
- package/src/jetpack-compose/Slider/index.tsx +2 -2
- package/src/jetpack-compose/Snackbar/index.tsx +4 -4
- package/src/jetpack-compose/Spacer/index.tsx +2 -2
- package/src/jetpack-compose/Surface/index.tsx +2 -2
- package/src/jetpack-compose/Switch/index.tsx +2 -2
- package/src/jetpack-compose/SyncSwitch/index.tsx +2 -2
- package/src/jetpack-compose/Text/index.tsx +2 -2
- package/src/jetpack-compose/TextField/BasicTextField.tsx +2 -2
- package/src/jetpack-compose/TextField/TextField.tsx +4 -4
- package/src/jetpack-compose/ToggleButton/index.tsx +2 -2
- package/src/jetpack-compose/Tooltip/index.tsx +6 -6
- package/src/swift-ui/AccessoryWidgetBackground/index.tsx +1 -1
- package/src/swift-ui/Alert/index.tsx +2 -2
- package/src/swift-ui/BottomSheet/index.tsx +2 -2
- package/src/swift-ui/Button/index.tsx +2 -2
- package/src/swift-ui/Chart/index.tsx +2 -2
- package/src/swift-ui/ColorPicker/index.tsx +2 -2
- package/src/swift-ui/ConfirmationDialog/index.tsx +2 -2
- package/src/swift-ui/ContextMenu/types.ts +4 -4
- package/src/swift-ui/DatePicker/index.tsx +2 -2
- package/src/swift-ui/Divider/index.tsx +1 -1
- package/src/swift-ui/Gauge/index.tsx +2 -2
- package/src/swift-ui/GlassEffectContainer/index.tsx +2 -2
- package/src/swift-ui/Grid/index.tsx +2 -2
- package/src/swift-ui/HStack/index.tsx +2 -2
- package/src/swift-ui/Host/index.tsx +12 -3
- package/src/swift-ui/Label/index.tsx +2 -2
- package/src/swift-ui/LabeledContent/index.tsx +2 -2
- package/src/swift-ui/LazyHStack/index.tsx +2 -2
- package/src/swift-ui/LazyVStack/index.tsx +2 -2
- package/src/swift-ui/Link/index.tsx +2 -2
- package/src/swift-ui/List/ListForEach.tsx +2 -2
- package/src/swift-ui/Mask/index.tsx +2 -2
- package/src/swift-ui/Menu/types.ts +2 -2
- package/src/swift-ui/Namespace.tsx +2 -2
- package/src/swift-ui/Overlay/index.tsx +2 -2
- package/src/swift-ui/Popover/index.tsx +2 -2
- package/src/swift-ui/ProgressView/index.tsx +2 -2
- package/src/swift-ui/RNHostView.tsx +2 -2
- package/src/swift-ui/ScrollView/index.tsx +2 -2
- package/src/swift-ui/Section/index.tsx +2 -2
- package/src/swift-ui/SecureField/index.tsx +2 -2
- package/src/swift-ui/ShareLink/index.tsx +2 -2
- package/src/swift-ui/Slider/index.tsx +2 -2
- package/src/swift-ui/Stepper/index.tsx +2 -2
- package/src/swift-ui/SwipeActions/index.tsx +4 -4
- package/src/swift-ui/SyncToggle/index.tsx +2 -2
- package/src/swift-ui/TabView/Tab.tsx +2 -2
- package/src/swift-ui/TabView/index.tsx +2 -2
- package/src/swift-ui/TextField/index.tsx +2 -2
- package/src/swift-ui/Toggle/index.tsx +2 -2
- package/src/swift-ui/VStack/index.tsx +2 -2
- package/src/swift-ui/ZStack/index.tsx +2 -2
- package/src/swift-ui/modifiers/index.ts +80 -0
- package/src/swift-ui/modifiers/presentationModifiers.ts +22 -0
- package/src/ts-declarations/react-native-web.d.ts +31 -3
- package/src/universal/Button/index.tsx +83 -35
- package/src/universal/Checkbox/index.tsx +85 -30
- package/src/universal/Collapsible/index.tsx +5 -17
- package/src/universal/FieldGroup/FieldGroup.tsx +5 -15
- package/src/universal/FieldGroup/FieldSection.tsx +14 -31
- package/src/universal/Host/index.tsx +44 -30
- package/src/universal/Host/types.ts +17 -2
- package/src/universal/ListItem/ListItem.android.tsx +10 -2
- package/src/universal/ListItem/ListItem.ios.tsx +23 -6
- package/src/universal/ListItem/types.ts +10 -0
- package/src/universal/Picker/Picker.tsx +74 -29
- package/src/universal/Slider/index.tsx +90 -9
- package/src/universal/Switch/index.android.tsx +2 -2
- package/src/universal/Switch/index.tsx +77 -18
- package/src/universal/TextInput/index.tsx +49 -13
- package/src/universal/hooks.ts +25 -1
- package/src/universal/keyboardEvent.fx.ts +28 -0
- package/src/universal/webUtils.ts +245 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.sha512 +0 -1
|
@@ -1,19 +1,66 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { View, Text, StyleSheet } from 'react-native';
|
|
2
2
|
|
|
3
3
|
import type { SwitchProps } from './types';
|
|
4
|
+
import { useFocusVisible } from '../hooks';
|
|
5
|
+
import { colors, createWebComponent, durations, easings, shadows } from '../webUtils';
|
|
6
|
+
|
|
7
|
+
const Input = createWebComponent('input');
|
|
4
8
|
|
|
5
9
|
const styles = StyleSheet.create({
|
|
6
10
|
view: {
|
|
7
|
-
flexDirection: 'row',
|
|
8
11
|
alignItems: 'center',
|
|
9
|
-
|
|
10
|
-
|
|
12
|
+
cursor: 'pointer',
|
|
13
|
+
display: 'inline-flex',
|
|
14
|
+
flexDirection: 'row',
|
|
15
|
+
gap: 10,
|
|
11
16
|
},
|
|
12
|
-
|
|
17
|
+
viewDisabled: {
|
|
18
|
+
cursor: 'auto',
|
|
13
19
|
opacity: 0.5,
|
|
14
20
|
},
|
|
15
|
-
|
|
16
|
-
|
|
21
|
+
input: {
|
|
22
|
+
position: 'absolute',
|
|
23
|
+
opacity: 0,
|
|
24
|
+
pointerEvents: 'none',
|
|
25
|
+
margin: 0,
|
|
26
|
+
width: 0,
|
|
27
|
+
height: 0,
|
|
28
|
+
},
|
|
29
|
+
text: {
|
|
30
|
+
color: colors.foreground,
|
|
31
|
+
userSelect: 'none',
|
|
32
|
+
},
|
|
33
|
+
track: {
|
|
34
|
+
backgroundColor: colors.gray[300],
|
|
35
|
+
borderRadius: 22 / 2,
|
|
36
|
+
height: 22,
|
|
37
|
+
position: 'relative',
|
|
38
|
+
transitionDuration: durations.base,
|
|
39
|
+
transitionProperty: 'background-color',
|
|
40
|
+
transitionTimingFunction: easings.standard,
|
|
41
|
+
width: 36,
|
|
42
|
+
},
|
|
43
|
+
trackChecked: {
|
|
44
|
+
backgroundColor: colors.primary[500],
|
|
45
|
+
},
|
|
46
|
+
focused: {
|
|
47
|
+
boxShadow: shadows.focus,
|
|
48
|
+
},
|
|
49
|
+
thumb: {
|
|
50
|
+
position: 'absolute',
|
|
51
|
+
top: 2,
|
|
52
|
+
left: 2,
|
|
53
|
+
backgroundColor: '#fff',
|
|
54
|
+
borderRadius: 18 / 2,
|
|
55
|
+
boxShadow: '0 1px 2px rgba(0, 0, 0, 0.15), 0 1px 3px rgba(0, 0, 0, 0.1)',
|
|
56
|
+
height: 18,
|
|
57
|
+
width: 18,
|
|
58
|
+
transitionDuration: durations.base,
|
|
59
|
+
transitionProperty: 'transform',
|
|
60
|
+
transitionTimingFunction: easings.standard,
|
|
61
|
+
},
|
|
62
|
+
thumbChecked: {
|
|
63
|
+
transform: 'translateX(14px)',
|
|
17
64
|
},
|
|
18
65
|
});
|
|
19
66
|
|
|
@@ -21,19 +68,31 @@ const styles = StyleSheet.create({
|
|
|
21
68
|
* A toggle control that switches between on and off states.
|
|
22
69
|
*/
|
|
23
70
|
export function Switch({ value, onValueChange, label, disabled = false, testID }: SwitchProps) {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
if (label) {
|
|
27
|
-
return (
|
|
28
|
-
<View style={[styles.view, disabled && styles.disabled]}>
|
|
29
|
-
<Text style={isDark && styles.darkText}>{label}</Text>
|
|
30
|
-
<RNSwitch value={value} onValueChange={onValueChange} disabled={disabled} testID={testID} />
|
|
31
|
-
</View>
|
|
32
|
-
);
|
|
33
|
-
}
|
|
71
|
+
const { focusVisible, onFocus, onBlur } = useFocusVisible();
|
|
34
72
|
|
|
35
73
|
return (
|
|
36
|
-
<
|
|
74
|
+
<View
|
|
75
|
+
aria-disabled={disabled}
|
|
76
|
+
role="label"
|
|
77
|
+
style={[styles.view, disabled && styles.viewDisabled]}>
|
|
78
|
+
<Input
|
|
79
|
+
type="checkbox"
|
|
80
|
+
role="switch"
|
|
81
|
+
onFocus={onFocus}
|
|
82
|
+
onBlur={onBlur}
|
|
83
|
+
checked={value}
|
|
84
|
+
disabled={disabled}
|
|
85
|
+
testID={testID}
|
|
86
|
+
style={styles.input}
|
|
87
|
+
onChange={({ target: { checked } }) => onValueChange(checked)}
|
|
88
|
+
/>
|
|
89
|
+
|
|
90
|
+
{label != null && <Text style={styles.text}>{label}</Text>}
|
|
91
|
+
|
|
92
|
+
<View style={[styles.track, value && styles.trackChecked, focusVisible && styles.focused]}>
|
|
93
|
+
<View style={[styles.thumb, value && styles.thumbChecked]} />
|
|
94
|
+
</View>
|
|
95
|
+
</View>
|
|
37
96
|
);
|
|
38
97
|
}
|
|
39
98
|
|
|
@@ -1,11 +1,39 @@
|
|
|
1
|
-
import { useImperativeHandle, useRef } from 'react';
|
|
2
|
-
import { TextInput as RNTextInput, StyleSheet
|
|
1
|
+
import { useImperativeHandle, useRef, useState } from 'react';
|
|
2
|
+
import { TextInput as RNTextInput, StyleSheet } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { useNativeState } from '../State';
|
|
5
5
|
import type { TextInputProps } from './types';
|
|
6
|
+
import { colors, durations, easings, shadows } from '../webUtils';
|
|
6
7
|
|
|
7
8
|
const styles = StyleSheet.create({
|
|
8
|
-
|
|
9
|
+
input: {
|
|
10
|
+
backgroundColor: colors.background,
|
|
11
|
+
borderColor: colors.gray[200],
|
|
12
|
+
borderRadius: 8,
|
|
13
|
+
borderStyle: 'solid',
|
|
14
|
+
borderWidth: 1,
|
|
15
|
+
boxShadow: shadows.input,
|
|
16
|
+
boxSizing: 'border-box',
|
|
17
|
+
color: colors.gray[900],
|
|
18
|
+
display: 'flex',
|
|
19
|
+
fontSize: 14,
|
|
20
|
+
height: 40,
|
|
21
|
+
outlineStyle: 'solid',
|
|
22
|
+
outlineWidth: 0,
|
|
23
|
+
paddingHorizontal: 12,
|
|
24
|
+
paddingVertical: 0,
|
|
25
|
+
transitionDuration: durations.fast,
|
|
26
|
+
transitionProperty: 'border-color, box-shadow, background-color',
|
|
27
|
+
transitionTimingFunction: easings.standard,
|
|
28
|
+
},
|
|
29
|
+
focused: {
|
|
30
|
+
borderColor: colors.primary[500],
|
|
31
|
+
boxShadow: shadows.focus,
|
|
32
|
+
},
|
|
33
|
+
multiline: {
|
|
34
|
+
height: 'auto',
|
|
35
|
+
paddingVertical: 11,
|
|
36
|
+
},
|
|
9
37
|
});
|
|
10
38
|
|
|
11
39
|
export function TextInput({
|
|
@@ -45,7 +73,7 @@ export function TextInput({
|
|
|
45
73
|
onSelectionChange,
|
|
46
74
|
selectTextOnFocus,
|
|
47
75
|
}: TextInputProps) {
|
|
48
|
-
const
|
|
76
|
+
const [focused, setFocused] = useState(false);
|
|
49
77
|
const initialFallbackRef = useRef(defaultValue ?? '');
|
|
50
78
|
const fallback = useNativeState<string>(initialFallbackRef.current);
|
|
51
79
|
const state = value ?? fallback;
|
|
@@ -79,7 +107,7 @@ export function TextInput({
|
|
|
79
107
|
ref={innerRef}
|
|
80
108
|
value={state.value}
|
|
81
109
|
placeholder={placeholder}
|
|
82
|
-
placeholderTextColor={placeholderTextColor}
|
|
110
|
+
placeholderTextColor={placeholderTextColor ?? colors.gray[500]}
|
|
83
111
|
autoFocus={autoFocus}
|
|
84
112
|
editable={editable}
|
|
85
113
|
readOnly={readOnly}
|
|
@@ -98,15 +126,15 @@ export function TextInput({
|
|
|
98
126
|
returnKeyType={returnKeyType}
|
|
99
127
|
enterKeyHint={enterKeyHint}
|
|
100
128
|
cursorColor={cursorColor}
|
|
101
|
-
style={[
|
|
102
|
-
isDark && styles.darkInput,
|
|
103
|
-
style,
|
|
104
|
-
textStyle,
|
|
105
|
-
textAlign && textAlign !== 'auto' ? { textAlign } : null,
|
|
106
|
-
]}
|
|
107
129
|
onSubmitEditing={onSubmitEditing ? (e) => onSubmitEditing(e.nativeEvent.text) : undefined}
|
|
108
|
-
onFocus={
|
|
109
|
-
|
|
130
|
+
onFocus={() => {
|
|
131
|
+
setFocused(true);
|
|
132
|
+
onFocus?.();
|
|
133
|
+
}}
|
|
134
|
+
onBlur={() => {
|
|
135
|
+
setFocused(false);
|
|
136
|
+
onBlur?.();
|
|
137
|
+
}}
|
|
110
138
|
onChangeText={(text) => {
|
|
111
139
|
state.value = text;
|
|
112
140
|
onChangeText?.(text);
|
|
@@ -129,6 +157,14 @@ export function TextInput({
|
|
|
129
157
|
}
|
|
130
158
|
: undefined
|
|
131
159
|
}
|
|
160
|
+
style={[
|
|
161
|
+
styles.input,
|
|
162
|
+
focused && styles.focused,
|
|
163
|
+
multiline && styles.multiline,
|
|
164
|
+
style,
|
|
165
|
+
textStyle,
|
|
166
|
+
textAlign && textAlign !== 'auto' ? { textAlign } : null,
|
|
167
|
+
]}
|
|
132
168
|
/>
|
|
133
169
|
);
|
|
134
170
|
}
|
package/src/universal/hooks.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { useEffect, useRef } from 'react';
|
|
1
|
+
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
+
|
|
3
|
+
import { wasLastInputKeyboard } from './keyboardEvent.fx';
|
|
2
4
|
|
|
3
5
|
/**
|
|
4
6
|
* Shared hook for onAppear/onDisappear lifecycle callbacks.
|
|
@@ -18,3 +20,25 @@ export function useUniversalLifecycle(onAppear?: () => void, onDisappear?: () =>
|
|
|
18
20
|
};
|
|
19
21
|
}, []);
|
|
20
22
|
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Tracks whether the element should display a keyboard focus indicator,
|
|
26
|
+
* mirroring the browser's `:focus-visible` heuristic. Spread the returned
|
|
27
|
+
* `onFocus`/`onBlur` onto a focusable element (e.g. `Pressable`) and read
|
|
28
|
+
* `focusVisible` to conditionally apply focus styles.
|
|
29
|
+
*/
|
|
30
|
+
export function useFocusVisible() {
|
|
31
|
+
const [focusVisible, setFocusVisible] = useState(false);
|
|
32
|
+
|
|
33
|
+
const onFocus = useCallback(() => {
|
|
34
|
+
if (wasLastInputKeyboard()) {
|
|
35
|
+
setFocusVisible(true);
|
|
36
|
+
}
|
|
37
|
+
}, []);
|
|
38
|
+
|
|
39
|
+
const onBlur = useCallback(() => {
|
|
40
|
+
setFocusVisible(false);
|
|
41
|
+
}, []);
|
|
42
|
+
|
|
43
|
+
return { focusVisible, onFocus, onBlur };
|
|
44
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
|
|
3
|
+
// Default to true on other platforms than web (native, SSR) so any focus
|
|
4
|
+
// event registers as keyboard-driven there. On web, a pointer event flips this
|
|
5
|
+
// to false before the focus event fires.
|
|
6
|
+
let lastInputWasKeyboard = Platform.OS !== 'web';
|
|
7
|
+
|
|
8
|
+
export const wasLastInputKeyboard = () => lastInputWasKeyboard;
|
|
9
|
+
|
|
10
|
+
if (Platform.OS === 'web' && typeof window !== 'undefined') {
|
|
11
|
+
window.addEventListener(
|
|
12
|
+
'keydown',
|
|
13
|
+
(event) => {
|
|
14
|
+
if (!event.altKey && !event.ctrlKey && !event.metaKey) {
|
|
15
|
+
lastInputWasKeyboard = true;
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
true
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
const listener = () => {
|
|
22
|
+
lastInputWasKeyboard = false;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
window.addEventListener('mousedown', listener, true);
|
|
26
|
+
window.addEventListener('pointerdown', listener, true);
|
|
27
|
+
window.addEventListener('touchstart', listener, true);
|
|
28
|
+
}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import type { ComponentProps, ElementType } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
processColor,
|
|
4
|
+
unstable_createElement,
|
|
5
|
+
type ColorValue,
|
|
6
|
+
type ImageStyle,
|
|
7
|
+
type StyleProp,
|
|
8
|
+
type TextStyle,
|
|
9
|
+
type ViewStyle,
|
|
10
|
+
} from 'react-native';
|
|
11
|
+
|
|
12
|
+
type Simplify<T> = { [K in keyof T]: T[K] };
|
|
13
|
+
type Merge<A, B> = Simplify<Omit<A, keyof B> & B>;
|
|
14
|
+
|
|
15
|
+
type WebComponentProps<T extends ElementType> = Merge<
|
|
16
|
+
ComponentProps<T>,
|
|
17
|
+
{
|
|
18
|
+
dataSet?: Record<string, string | undefined>;
|
|
19
|
+
focusable?: boolean;
|
|
20
|
+
style?: StyleProp<ImageStyle | TextStyle | ViewStyle>;
|
|
21
|
+
testID?: string;
|
|
22
|
+
}
|
|
23
|
+
>;
|
|
24
|
+
|
|
25
|
+
export const createWebComponent =
|
|
26
|
+
<T extends ElementType>(type: T) =>
|
|
27
|
+
(props: WebComponentProps<T>) =>
|
|
28
|
+
unstable_createElement(type, props);
|
|
29
|
+
|
|
30
|
+
export const css = (strings: TemplateStringsArray, ...values: unknown[]): string =>
|
|
31
|
+
strings
|
|
32
|
+
.reduce((acc, s, i) => acc + s + (i < values.length ? String(values[i]) : ''), '')
|
|
33
|
+
.replace(/\s+/g, ' ')
|
|
34
|
+
.trim();
|
|
35
|
+
|
|
36
|
+
const lightVariables = css`
|
|
37
|
+
--expo-ui-background: #ffffff;
|
|
38
|
+
--expo-ui-foreground: #000000;
|
|
39
|
+
|
|
40
|
+
--expo-ui-gray-50: #f9fafb;
|
|
41
|
+
--expo-ui-gray-100: #f0f1f2;
|
|
42
|
+
--expo-ui-gray-150: #eaecf0;
|
|
43
|
+
--expo-ui-gray-200: #e1e4e8;
|
|
44
|
+
--expo-ui-gray-300: #d7dbdf;
|
|
45
|
+
--expo-ui-gray-400: #c9d1d9;
|
|
46
|
+
--expo-ui-gray-500: #687076;
|
|
47
|
+
--expo-ui-gray-600: #596068;
|
|
48
|
+
--expo-ui-gray-700: #37414a;
|
|
49
|
+
--expo-ui-gray-800: #25292e;
|
|
50
|
+
--expo-ui-gray-900: #11181c;
|
|
51
|
+
|
|
52
|
+
--expo-ui-shadow-button: 0 1px 2px 0 rgba(0, 0, 0, 0.08);
|
|
53
|
+
`;
|
|
54
|
+
|
|
55
|
+
const darkVariables = css`
|
|
56
|
+
--expo-ui-background: #0b0f14;
|
|
57
|
+
--expo-ui-foreground: #ffffff;
|
|
58
|
+
|
|
59
|
+
--expo-ui-gray-50: #111418;
|
|
60
|
+
--expo-ui-gray-100: #1d2128;
|
|
61
|
+
--expo-ui-gray-150: #252932;
|
|
62
|
+
--expo-ui-gray-200: #1f242c;
|
|
63
|
+
--expo-ui-gray-300: #30363d;
|
|
64
|
+
--expo-ui-gray-400: #484f58;
|
|
65
|
+
--expo-ui-gray-500: #6e7781;
|
|
66
|
+
--expo-ui-gray-600: #9aa4ae;
|
|
67
|
+
--expo-ui-gray-700: #4b5560;
|
|
68
|
+
--expo-ui-gray-800: #c0c8d0;
|
|
69
|
+
--expo-ui-gray-900: #e6edf3;
|
|
70
|
+
|
|
71
|
+
--expo-ui-shadow-button: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
|
|
72
|
+
`;
|
|
73
|
+
|
|
74
|
+
export const colors = {
|
|
75
|
+
background: 'var(--expo-ui-background)',
|
|
76
|
+
foreground: 'var(--expo-ui-foreground)',
|
|
77
|
+
|
|
78
|
+
red: '#cf222e',
|
|
79
|
+
|
|
80
|
+
primary: {
|
|
81
|
+
foreground: 'var(--expo-ui-primary-foreground)',
|
|
82
|
+
50: 'var(--expo-ui-primary-50)',
|
|
83
|
+
100: 'var(--expo-ui-primary-100)',
|
|
84
|
+
200: 'var(--expo-ui-primary-200)',
|
|
85
|
+
300: 'var(--expo-ui-primary-300)',
|
|
86
|
+
400: 'var(--expo-ui-primary-400)',
|
|
87
|
+
500: 'var(--expo-ui-primary-500)',
|
|
88
|
+
600: 'var(--expo-ui-primary-600)',
|
|
89
|
+
700: 'var(--expo-ui-primary-700)',
|
|
90
|
+
800: 'var(--expo-ui-primary-800)',
|
|
91
|
+
900: 'var(--expo-ui-primary-900)',
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
gray: {
|
|
95
|
+
50: 'var(--expo-ui-gray-50)',
|
|
96
|
+
100: 'var(--expo-ui-gray-100)',
|
|
97
|
+
200: 'var(--expo-ui-gray-200)',
|
|
98
|
+
300: 'var(--expo-ui-gray-300)',
|
|
99
|
+
400: 'var(--expo-ui-gray-400)',
|
|
100
|
+
500: 'var(--expo-ui-gray-500)',
|
|
101
|
+
600: 'var(--expo-ui-gray-600)',
|
|
102
|
+
700: 'var(--expo-ui-gray-700)',
|
|
103
|
+
800: 'var(--expo-ui-gray-800)',
|
|
104
|
+
900: 'var(--expo-ui-gray-900)',
|
|
105
|
+
},
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export const durations = {
|
|
109
|
+
fast: '120ms',
|
|
110
|
+
base: '120ms',
|
|
111
|
+
slow: '280ms',
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export const easings = {
|
|
115
|
+
standard: 'cubic-bezier(0.4, 0, 0.2, 1)',
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export const shadows = {
|
|
119
|
+
button: 'var(--expo-ui-shadow-button)',
|
|
120
|
+
focus: '0 0 0 3px color-mix(in oklab, var(--expo-ui-primary-500) 35%, transparent)',
|
|
121
|
+
input: '0 1px 0 rgba(0, 0, 0, 0.02)',
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
export const globalCss = css`
|
|
125
|
+
:root {
|
|
126
|
+
${lightVariables}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
@media (prefers-color-scheme: dark) {
|
|
130
|
+
:root:not([data-theme]) {
|
|
131
|
+
${darkVariables}
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
[data-theme='dark'] {
|
|
136
|
+
${darkVariables}
|
|
137
|
+
}
|
|
138
|
+
`;
|
|
139
|
+
|
|
140
|
+
// Color utils
|
|
141
|
+
|
|
142
|
+
const DEFAULT_PRIMARY_COLOR = '#007aff';
|
|
143
|
+
|
|
144
|
+
type Lch = [number, number, number];
|
|
145
|
+
|
|
146
|
+
const srgbToLinear = (c: number): number =>
|
|
147
|
+
c <= 0.04045 ? c / 12.92 : Math.pow((c + 0.055) / 1.055, 2.4);
|
|
148
|
+
|
|
149
|
+
const linearToSrgb = (c: number): number =>
|
|
150
|
+
c <= 0.0031308 ? 12.92 * c : 1.055 * Math.pow(c, 1 / 2.4) - 0.055;
|
|
151
|
+
|
|
152
|
+
const hexToLch = (hex: string): Lch => {
|
|
153
|
+
const raw = hex.replace('#', '');
|
|
154
|
+
const body = raw.length === 3 ? Array.from(raw, (c) => c + c).join('') : raw;
|
|
155
|
+
|
|
156
|
+
const r = srgbToLinear(Number.parseInt(body.slice(0, 2), 16) / 255);
|
|
157
|
+
const g = srgbToLinear(Number.parseInt(body.slice(2, 4), 16) / 255);
|
|
158
|
+
const b = srgbToLinear(Number.parseInt(body.slice(4, 6), 16) / 255);
|
|
159
|
+
|
|
160
|
+
const l = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);
|
|
161
|
+
const m = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);
|
|
162
|
+
const s = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);
|
|
163
|
+
|
|
164
|
+
const L = 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s;
|
|
165
|
+
const labA = 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s;
|
|
166
|
+
const labB = 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s;
|
|
167
|
+
|
|
168
|
+
return [L, Math.sqrt(labA * labA + labB * labB), Math.atan2(labB, labA)];
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
const lchToHex = ([L, chroma, hue]: Lch): string => {
|
|
172
|
+
const a = chroma * Math.cos(hue);
|
|
173
|
+
const b = chroma * Math.sin(hue);
|
|
174
|
+
|
|
175
|
+
const l_ = L + 0.3963377774 * a + 0.2158037573 * b;
|
|
176
|
+
const m_ = L - 0.1055613458 * a - 0.0638541728 * b;
|
|
177
|
+
const s_ = L - 0.0894841775 * a - 1.291485548 * b;
|
|
178
|
+
|
|
179
|
+
const l = l_ * l_ * l_;
|
|
180
|
+
const m = m_ * m_ * m_;
|
|
181
|
+
const s = s_ * s_ * s_;
|
|
182
|
+
|
|
183
|
+
const r = +4.0767416621 * l - 3.3077115913 * m + 0.2309699292 * s;
|
|
184
|
+
const g = -1.2684380046 * l + 2.6097574011 * m - 0.3413193965 * s;
|
|
185
|
+
const bl = -0.0041960863 * l - 0.7034186147 * m + 1.707614701 * s;
|
|
186
|
+
|
|
187
|
+
const cl = (c: number): number => Math.max(0, Math.min(255, Math.round(linearToSrgb(c) * 255)));
|
|
188
|
+
return '#' + [cl(r), cl(g), cl(bl)].map((x) => x.toString(16).padStart(2, '0')).join('');
|
|
189
|
+
};
|
|
190
|
+
|
|
191
|
+
// Steps tuned for sensible UI scale. Lightness targets are perceptual (OKLCH).
|
|
192
|
+
// Chroma multiplier softens lightest and darkest stops so they don't read neon.
|
|
193
|
+
const PRIMARY_STOPS = [
|
|
194
|
+
{ step: 50, L: 0.975, cMul: 0.08 },
|
|
195
|
+
{ step: 100, L: 0.945, cMul: 0.2 },
|
|
196
|
+
{ step: 200, L: 0.89, cMul: 0.45 },
|
|
197
|
+
{ step: 300, L: 0.81, cMul: 0.7 },
|
|
198
|
+
{ step: 400, L: 0.7, cMul: 0.9 },
|
|
199
|
+
{ step: 500, L: null, cMul: 1.0 }, // anchor at user input
|
|
200
|
+
{ step: 600, L: 0.5, cMul: 1.0 },
|
|
201
|
+
{ step: 700, L: 0.42, cMul: 0.95 },
|
|
202
|
+
{ step: 800, L: 0.34, cMul: 0.85 },
|
|
203
|
+
{ step: 900, L: 0.25, cMul: 0.7 },
|
|
204
|
+
] as const;
|
|
205
|
+
|
|
206
|
+
type PrimaryColorScale = Record<
|
|
207
|
+
`--expo-ui-primary-${'foreground' | (typeof PRIMARY_STOPS)[number]['step']}`,
|
|
208
|
+
string
|
|
209
|
+
>;
|
|
210
|
+
|
|
211
|
+
// Normalize any `ColorValue` (named color, `rgb()` / `rgba()`, hex string, or
|
|
212
|
+
// processed number) to a `#RRGGBB` string. `processColor` returns an
|
|
213
|
+
// `0xAARRGGBB` integer (or `null`/`undefined` for invalid input); alpha is
|
|
214
|
+
// dropped since the scale only needs the base hue.
|
|
215
|
+
const colorValueToHex = (color: ColorValue): string | null => {
|
|
216
|
+
const argb = processColor(color);
|
|
217
|
+
|
|
218
|
+
if (typeof argb !== 'number') {
|
|
219
|
+
return null;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
const r = (argb >> 16) & 0xff;
|
|
223
|
+
const g = (argb >> 8) & 0xff;
|
|
224
|
+
const b = argb & 0xff;
|
|
225
|
+
return '#' + [r, g, b].map((c) => c.toString(16).padStart(2, '0')).join('');
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
export const generatePrimaryColorScale = (
|
|
229
|
+
color: ColorValue | undefined = DEFAULT_PRIMARY_COLOR
|
|
230
|
+
): Record<string, string> => {
|
|
231
|
+
const [L, C, H] = hexToLch(colorValueToHex(color) ?? DEFAULT_PRIMARY_COLOR);
|
|
232
|
+
|
|
233
|
+
const scale = {
|
|
234
|
+
// Contrast for filled buttons: pick white or a hue-tinted near-black based on L of 500
|
|
235
|
+
'--expo-ui-primary-foreground': L < 0.74 ? '#ffffff' : lchToHex([0.18, C * 0.1, H]),
|
|
236
|
+
} as PrimaryColorScale;
|
|
237
|
+
|
|
238
|
+
for (const { step, L: tgtL, cMul } of PRIMARY_STOPS) {
|
|
239
|
+
const newL = tgtL == null ? L : tgtL;
|
|
240
|
+
const newC = C * cMul;
|
|
241
|
+
scale[`--expo-ui-primary-${step}`] = lchToHex([newL, newC, H]);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
return scale;
|
|
245
|
+
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
22f57bb7a0ea0016c8efa6cde687934b
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
071ba8aee8e6056c59d7f18aa247e536e110f493
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
e456560887c0d9471dbddf4b7f5c232432a588ecb6b531120c9ce193f8d2f07d
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
a3762cf9549225df1a60ad90cdf83586c4bb6358cecaa627f78a299a8aa5bd23ebebc740d6c0cc7acbf75d134e3c45ca8059459c6fcbc796beeeb4cb5d9dbfb8
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar
DELETED
|
Binary file
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
e06c3debed9c38c907f69263825babb0
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
b229f74d58ec12ae4375dc666928d118938e19e4
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c5040a0bd6a33de8ffca965c4d5e5953897f6776a239283b146d677e2e7221ed
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d10bffe2657a8f7e5e1886eec9a1404d7b6d5bcef4a50b6db763986302cbad9ae02c61a0f1996d52c2d558cc5dbc989f3ef5ad53cfc2370df88e643b377b19ee
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.module.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
cfb5d19b5d8c8d355790d7d444b4a45e
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.module.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0988151e459560e5e43657673bd44622ec339e10
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
daa61c8a7fb9d0f2e326c3018e5a459a828cde6430210274c43903bc38717d61
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ab8cb4cd46417dda5090e5be5e92283e74982782289b297bb067b957bea5cfc8e2ee968da086be2a599dee0f85580dbc4686e06e15150b629c6e3e670eb44483
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4b309ef8bee0c327f5959b979471a865
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
8ebee813de77620f097bd91d83faf80624ff860d
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
4d652208d530e23197763eb2f3b32fd084e6065ca63b29da0c3b454a07d586be
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
8c2c74ce7cfe2b19bb8bf9999c7e9ab968616a25b6419741f99e93e8d15adde4d8e6fb59bd6eeb58b0b6293b21a17d6449438f960524ff163065d28b475b3140
|