@expo/ui 56.0.17 → 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 +36 -0
- package/android/build.gradle +2 -2
- package/android/src/main/java/expo/modules/ui/DatePickerView.kt +33 -8
- package/android/src/main/java/expo/modules/ui/ModalBottomSheetView.kt +14 -0
- 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/PagerView.android.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 +8 -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/RNHostView/index.d.ts +8 -0
- package/build/jetpack-compose/RNHostView/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 +60 -2
- 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/swift-ui/modifiers/widgets.d.ts +7 -0
- package/build/swift-ui/modifiers/widgets.d.ts.map +1 -1
- package/build/universal/Button/index.d.ts.map +1 -1
- package/build/universal/Button/index.ios.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/FieldGroup/FieldSectionSlots.d.ts.map +1 -1
- package/build/universal/FieldGroup/groupChildren.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/Text/index.ios.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/modifierUtils.d.ts +16 -0
- package/build/universal/modifierUtils.d.ts.map +1 -0
- package/build/universal/transformStyle.android.d.ts +3 -0
- package/build/universal/transformStyle.android.d.ts.map +1 -1
- package/build/universal/transformStyle.ios.d.ts +3 -0
- package/build/universal/transformStyle.ios.d.ts.map +1 -1
- package/build/universal/types.d.ts +2 -0
- package/build/universal/types.d.ts.map +1 -1
- 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 +119 -11
- package/ios/Modifiers/WidgetModifiers.swift +12 -0
- package/ios/RNHostView.swift +5 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.17/expo.modules.ui-56.0.17-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.17/expo.modules.ui-56.0.17.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.17/expo.modules.ui-56.0.17.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 +8 -14
- package/src/community/bottom-sheet/BottomSheet.ios.tsx +9 -5
- 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/PagerView.android.tsx +10 -6
- 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 +9 -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/RNHostView/index.tsx +8 -0
- 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 +82 -1
- package/src/swift-ui/modifiers/presentationModifiers.ts +22 -0
- package/src/swift-ui/modifiers/widgets.ts +9 -0
- package/src/ts-declarations/react-native-web.d.ts +31 -3
- package/src/universal/Button/index.ios.tsx +6 -1
- 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/FieldGroup/FieldSectionSlots.tsx +3 -0
- package/src/universal/FieldGroup/groupChildren.tsx +3 -0
- 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/Text/index.ios.tsx +3 -1
- 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/modifierUtils.ts +23 -0
- package/src/universal/transformStyle.android.ts +9 -1
- package/src/universal/transformStyle.ios.ts +9 -1
- package/src/universal/types.ts +2 -0
- package/src/universal/webUtils.ts +245 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.pom.sha512 +0 -1
|
@@ -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,23 @@
|
|
|
1
|
+
import type { ModifierConfig } from '../types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Drops derived modifiers that the user overrides through the `modifiers`
|
|
5
|
+
* escape hatch. A user-supplied modifier takes ownership of its `$type`, so
|
|
6
|
+
* the component skips the modifier of that type it would otherwise derive
|
|
7
|
+
* from `style`, `variant`, and similar props.
|
|
8
|
+
*
|
|
9
|
+
* Only pass style-derived modifiers as `derived`. Modifiers backing
|
|
10
|
+
* functional props (for example `onPress`, `onAppear`, `disabled`) must not
|
|
11
|
+
* go through this filter, or a user modifier of the same type would silently
|
|
12
|
+
* disable the prop.
|
|
13
|
+
*/
|
|
14
|
+
export function omitUserOverridden<T extends { $type: string }>(
|
|
15
|
+
derived: T[],
|
|
16
|
+
userModifiers?: readonly ModifierConfig[]
|
|
17
|
+
): T[] {
|
|
18
|
+
if (!userModifiers?.length) {
|
|
19
|
+
return derived;
|
|
20
|
+
}
|
|
21
|
+
const userTypes = new Set(userModifiers.map((modifier) => modifier.$type));
|
|
22
|
+
return derived.filter((modifier) => !userTypes.has(modifier.$type));
|
|
23
|
+
}
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
type ModifierConfig,
|
|
15
15
|
} from '@expo/ui/jetpack-compose/modifiers';
|
|
16
16
|
|
|
17
|
+
import { omitUserOverridden } from './modifierUtils';
|
|
17
18
|
import type { UniversalBaseProps, UniversalStyle } from './types';
|
|
18
19
|
|
|
19
20
|
/**
|
|
@@ -24,13 +25,16 @@ import type { UniversalBaseProps, UniversalStyle } from './types';
|
|
|
24
25
|
* box model where background includes the padding area and border is outermost:
|
|
25
26
|
* sizing → border → clip → background → padding → opacity
|
|
26
27
|
* → events → behavior → user escape-hatch
|
|
28
|
+
*
|
|
29
|
+
* Style-derived modifiers yield to user-supplied modifiers of the same
|
|
30
|
+
* `$type`, so the escape hatch can override anything derived from props.
|
|
27
31
|
*/
|
|
28
32
|
export function transformToModifiers(
|
|
29
33
|
style: UniversalStyle | undefined,
|
|
30
34
|
props: Pick<UniversalBaseProps, 'onPress' | 'disabled' | 'hidden' | 'testID'>,
|
|
31
35
|
extraModifiers?: ModifierConfig[]
|
|
32
36
|
): ModifierConfig[] {
|
|
33
|
-
|
|
37
|
+
let mods: ModifierConfig[] = [];
|
|
34
38
|
|
|
35
39
|
if (style) {
|
|
36
40
|
// Sizing (outermost)
|
|
@@ -95,6 +99,10 @@ export function transformToModifiers(
|
|
|
95
99
|
}
|
|
96
100
|
}
|
|
97
101
|
|
|
102
|
+
// A user-supplied modifier replaces any style-derived modifier of the same
|
|
103
|
+
// type. The event and behavior modifiers below are never dropped.
|
|
104
|
+
mods = omitUserOverridden(mods, extraModifiers);
|
|
105
|
+
|
|
98
106
|
// Events — Compose uses clickable modifier
|
|
99
107
|
if (props.onPress) mods.push(clickable(props.onPress));
|
|
100
108
|
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
} from '@expo/ui/swift-ui/modifiers';
|
|
20
20
|
|
|
21
21
|
import type { UniversalTextStyle } from './Text/types';
|
|
22
|
+
import { omitUserOverridden } from './modifierUtils';
|
|
22
23
|
import type { UniversalBaseProps, UniversalStyle } from './types';
|
|
23
24
|
|
|
24
25
|
const FONT_WEIGHT_MAP: Record<string, Parameters<typeof font>[0]['weight']> = {
|
|
@@ -43,6 +44,9 @@ const FONT_WEIGHT_MAP: Record<string, Parameters<typeof font>[0]['weight']> = {
|
|
|
43
44
|
* To match React Native's box model (background fills the full box):
|
|
44
45
|
* padding → sizing → background → clip → border → opacity
|
|
45
46
|
* → events → lifecycle → behavior → user escape-hatch
|
|
47
|
+
*
|
|
48
|
+
* Style-derived modifiers yield to user-supplied modifiers of the same
|
|
49
|
+
* `$type`, so the escape hatch can override anything derived from props.
|
|
46
50
|
*/
|
|
47
51
|
export function transformToModifiers(
|
|
48
52
|
style: UniversalStyle | undefined,
|
|
@@ -58,7 +62,7 @@ export function transformToModifiers(
|
|
|
58
62
|
textStyle?: UniversalTextStyle;
|
|
59
63
|
}
|
|
60
64
|
): ModifierConfig[] {
|
|
61
|
-
|
|
65
|
+
let mods: ModifierConfig[] = [];
|
|
62
66
|
|
|
63
67
|
// Text styling (innermost — applies to text content before container modifiers)
|
|
64
68
|
const textStyle = options?.textStyle;
|
|
@@ -146,6 +150,10 @@ export function transformToModifiers(
|
|
|
146
150
|
}
|
|
147
151
|
}
|
|
148
152
|
|
|
153
|
+
// A user-supplied modifier replaces any style-derived modifier of the same
|
|
154
|
+
// type. The event, lifecycle, and behavior modifiers below are never dropped.
|
|
155
|
+
mods = omitUserOverridden(mods, extraModifiers);
|
|
156
|
+
|
|
149
157
|
// Events
|
|
150
158
|
if (props.onPress) mods.push(onTapGesture(props.onPress));
|
|
151
159
|
|
package/src/universal/types.ts
CHANGED
|
@@ -44,6 +44,8 @@ export interface UniversalBaseProps {
|
|
|
44
44
|
/**
|
|
45
45
|
* Platform-specific modifier escape hatch. Pass an array of modifier configs
|
|
46
46
|
* from `@expo/ui/swift-ui/modifiers` or `@expo/ui/jetpack-compose/modifiers`.
|
|
47
|
+
* A modifier supplied here replaces any modifier of the same type that the
|
|
48
|
+
* component derives from `style` or other props.
|
|
47
49
|
* @platform android
|
|
48
50
|
* @platform ios
|
|
49
51
|
*/
|
|
@@ -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
|
-
f2d5194e36c18df1298150a82ed8f885
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
e82e406da75f0fa928868fcc7544e62b40878a6b
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
bac457301e76c3dfc74a046e5d5ed7267765368e432b1762051897bcabf7cac9
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
e557d79f5242ede237b371d5f85b1567ee12961dc1f2ba434d60649842996d377086ae27ae59a4a8f131b37d536ba3d5ddf1a6d29cadd2fb0ff6ed642ce4efc5
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.aar
DELETED
|
Binary file
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.aar.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
81713f2bd9b92dc37c26efb771e35ed8
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.aar.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
33aac01ba03ba8dca900252f3fc70770c4e03c6c
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.aar.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
866c8d63f5a18f663ce603eb908d3cdf16fb0f8dd0edfe799214cfe7f8261f0a
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.aar.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
a9a4256d94715e7932f328ad004a5df0d5016275805c751a50eb9ceb370a2a522a81c9996cf0f95a10fd22e9d1eb5ddeab3a6a7f0e1e75a8ac17c3c3e7fc5d43
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.module.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
66f5ee659e576e2fc66c487286f23de6
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.module.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
a96aa2d3f82455b3cd1195750e69322297f59cc2
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
984b14af41cf6c8453c2c30f8d0198633d3a5c554380a04b919c93525d567483
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
705123ec935a2660e4bc8e213b277405a6ebcf62c036516bcf8872df4d664b1f2fae2ed5460211f33a02af572e330a8b19a2918be92444f2a788aea50da3d989
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.pom.md5
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
df0203705304dad1184388d493a333dc
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.pom.sha1
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
a93ea47f7fa573055fe5b2f59334cc98f96e8ec9
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.pom.sha256
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
d61c5b4603103c407b0148f4385fef3257eb3d359ec1b60b36eea1ba1e7d2c3c
|
package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.17/expo.modules.ui-56.0.17.pom.sha512
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
1023aa15d84af57f96c468156c994d6c18926d43144beb43c9e3d1c6286b9e3b4dbefb8ede3e336842d27927ad095b2f664e10507e7d4c6f13ed71bc6a566794
|