@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
|
@@ -97,11 +97,37 @@ declare module 'react-native' {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
export interface ViewProps extends WebAccessibilityProps {
|
|
100
|
+
dataSet?: Record<string, string | undefined>;
|
|
100
101
|
dir?: string;
|
|
101
102
|
role?: WebRole;
|
|
102
103
|
}
|
|
103
104
|
|
|
104
|
-
|
|
105
|
+
/**
|
|
106
|
+
* Animations and transitions
|
|
107
|
+
*/
|
|
108
|
+
|
|
109
|
+
type AnimationDirection = 'alternate' | 'alternate-reverse' | 'normal' | 'reverse';
|
|
110
|
+
type AnimationFillMode = 'none' | 'forwards' | 'backwards' | 'both';
|
|
111
|
+
type AnimationIterationCount = number | 'infinite';
|
|
112
|
+
type AnimationKeyframes = Record<string, ImageStyle | TextStyle | ViewStyle>;
|
|
113
|
+
type AnimationPlayState = 'paused' | 'running';
|
|
114
|
+
|
|
115
|
+
export interface AnimationStyles {
|
|
116
|
+
animationDelay?: string;
|
|
117
|
+
animationDirection?: AnimationDirection;
|
|
118
|
+
animationDuration?: string;
|
|
119
|
+
animationFillMode?: AnimationFillMode;
|
|
120
|
+
animationIterationCount?: AnimationIterationCount;
|
|
121
|
+
animationKeyframes?: AnimationKeyframes | AnimationKeyframes[];
|
|
122
|
+
animationPlayState?: AnimationPlayState;
|
|
123
|
+
animationTimingFunction?: string;
|
|
124
|
+
transitionDelay?: string;
|
|
125
|
+
transitionDuration?: string;
|
|
126
|
+
transitionProperty?: string;
|
|
127
|
+
transitionTimingFunction?: string;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export interface ImageStyle extends AnimationStyles {
|
|
105
131
|
display?: DisplayValue;
|
|
106
132
|
height?: WebDimensionValue;
|
|
107
133
|
width?: WebDimensionValue;
|
|
@@ -113,7 +139,7 @@ declare module 'react-native' {
|
|
|
113
139
|
paddingBottom?: WebDimensionValue;
|
|
114
140
|
}
|
|
115
141
|
|
|
116
|
-
export interface TextStyle {
|
|
142
|
+
export interface TextStyle extends AnimationStyles {
|
|
117
143
|
display?: DisplayValue;
|
|
118
144
|
height?: WebDimensionValue;
|
|
119
145
|
width?: WebDimensionValue;
|
|
@@ -123,9 +149,11 @@ declare module 'react-native' {
|
|
|
123
149
|
paddingRight?: WebDimensionValue;
|
|
124
150
|
paddingTop?: WebDimensionValue;
|
|
125
151
|
paddingBottom?: WebDimensionValue;
|
|
152
|
+
whiteSpace?: 'normal' | 'nowrap' | 'pre' | 'pre-line' | 'pre-wrap';
|
|
126
153
|
}
|
|
127
154
|
|
|
128
|
-
export interface ViewStyle {
|
|
155
|
+
export interface ViewStyle extends AnimationStyles {
|
|
156
|
+
appearance?: 'none' | 'auto';
|
|
129
157
|
display?: DisplayValue;
|
|
130
158
|
height?: WebDimensionValue;
|
|
131
159
|
width?: WebDimensionValue;
|
|
@@ -2,6 +2,7 @@ import { Button as SwiftUIButton } from '@expo/ui/swift-ui';
|
|
|
2
2
|
import { buttonStyle } from '@expo/ui/swift-ui/modifiers';
|
|
3
3
|
import type { ModifierConfig } from '@expo/ui/swift-ui/modifiers';
|
|
4
4
|
|
|
5
|
+
import { omitUserOverridden } from '../modifierUtils';
|
|
5
6
|
import { transformToModifiers } from '../transformStyle';
|
|
6
7
|
import type { ButtonProps, ButtonVariant } from './types';
|
|
7
8
|
|
|
@@ -24,7 +25,11 @@ export function Button({
|
|
|
24
25
|
testID,
|
|
25
26
|
modifiers: extraModifiers,
|
|
26
27
|
}: ButtonProps) {
|
|
27
|
-
|
|
28
|
+
// A user-supplied buttonStyle modifier replaces the variant's.
|
|
29
|
+
const buttonSpecificModifiers: ModifierConfig[] = omitUserOverridden(
|
|
30
|
+
[buttonStyle(variantButtonStyle[variant])],
|
|
31
|
+
extraModifiers
|
|
32
|
+
);
|
|
28
33
|
|
|
29
34
|
const universalModifiers = transformToModifiers(
|
|
30
35
|
style,
|
|
@@ -1,40 +1,60 @@
|
|
|
1
|
-
import { Pressable, StyleSheet, Text
|
|
1
|
+
import { Pressable, StyleSheet, Text } from 'react-native';
|
|
2
2
|
|
|
3
|
-
import type { ButtonProps
|
|
4
|
-
import { useUniversalLifecycle } from '../hooks';
|
|
3
|
+
import type { ButtonProps } from './types';
|
|
4
|
+
import { useFocusVisible, useUniversalLifecycle } from '../hooks';
|
|
5
|
+
import { colors, durations, easings, shadows } from '../webUtils';
|
|
5
6
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
const buttonStyles = StyleSheet.create({
|
|
8
|
+
base: {
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
backgroundColor: colors.primary[500],
|
|
10
11
|
borderRadius: 8,
|
|
11
|
-
|
|
12
|
+
boxShadow: shadows.button,
|
|
13
|
+
display: 'inline-flex',
|
|
14
|
+
height: 40,
|
|
15
|
+
justifyContent: 'center',
|
|
16
|
+
outlineStyle: 'solid',
|
|
17
|
+
outlineWidth: 0,
|
|
18
|
+
paddingHorizontal: 16,
|
|
19
|
+
transitionDuration: durations.fast,
|
|
20
|
+
transitionProperty: 'background-color, color, box-shadow, transform',
|
|
21
|
+
transitionTimingFunction: easings.standard,
|
|
22
|
+
whiteSpace: 'nowrap',
|
|
23
|
+
},
|
|
24
|
+
outlined: {
|
|
25
|
+
backgroundColor: 'transparent',
|
|
26
|
+
boxShadow: `inset 0 0 0 1px ${colors.gray[300]}`,
|
|
12
27
|
},
|
|
28
|
+
text: {
|
|
29
|
+
backgroundColor: 'transparent',
|
|
30
|
+
boxShadow: 'none',
|
|
31
|
+
},
|
|
32
|
+
focused: { boxShadow: shadows.focus },
|
|
13
33
|
disabled: { opacity: 0.5 },
|
|
14
34
|
hidden: { display: 'none' },
|
|
15
|
-
|
|
35
|
+
hovered: { backgroundColor: colors.primary[600] },
|
|
36
|
+
hoveredOutlined: { backgroundColor: colors.gray[50] },
|
|
37
|
+
hoveredText: { backgroundColor: colors.gray[50] },
|
|
38
|
+
pressed: {
|
|
39
|
+
backgroundColor: colors.primary[700],
|
|
40
|
+
transform: 'translateY(0.5px)',
|
|
41
|
+
},
|
|
42
|
+
pressedOutlined: { backgroundColor: colors.gray[100] },
|
|
43
|
+
pressedText: { backgroundColor: colors.gray[100] },
|
|
16
44
|
});
|
|
17
45
|
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
46
|
+
const textStyles = StyleSheet.create({
|
|
47
|
+
base: {
|
|
48
|
+
color: colors.primary.foreground,
|
|
49
|
+
fontSize: 14,
|
|
50
|
+
fontWeight: '500',
|
|
51
|
+
lineHeight: 14,
|
|
52
|
+
textAlign: 'center',
|
|
53
|
+
userSelect: 'none',
|
|
23
54
|
},
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
const variantHoverStyles = StyleSheet.create({
|
|
28
|
-
filled: { backgroundColor: '#0066DB' },
|
|
29
|
-
outlined: { backgroundColor: 'rgba(0, 122, 255, 0.08)' },
|
|
30
|
-
text: { backgroundColor: 'rgba(0, 122, 255, 0.08)' },
|
|
31
|
-
} satisfies Record<ButtonVariant, ViewStyle>);
|
|
32
|
-
|
|
33
|
-
const variantLabelStyles = StyleSheet.create({
|
|
34
|
-
filled: { color: '#FFFFFF' },
|
|
35
|
-
outlined: { color: '#007AFF' },
|
|
36
|
-
text: { color: '#007AFF' },
|
|
37
|
-
} satisfies Record<ButtonVariant, TextStyle>);
|
|
55
|
+
outlined: { color: colors.gray[900] },
|
|
56
|
+
text: { color: colors.primary[600] },
|
|
57
|
+
});
|
|
38
58
|
|
|
39
59
|
/**
|
|
40
60
|
* A pressable button that supports multiple visual variants.
|
|
@@ -53,21 +73,49 @@ export function Button({
|
|
|
53
73
|
}: ButtonProps) {
|
|
54
74
|
useUniversalLifecycle(onAppear, onDisappear);
|
|
55
75
|
|
|
76
|
+
const { focusVisible, onFocus, onBlur } = useFocusVisible();
|
|
77
|
+
|
|
56
78
|
return (
|
|
57
79
|
<Pressable
|
|
58
80
|
role="button"
|
|
81
|
+
onFocus={onFocus}
|
|
82
|
+
onBlur={onBlur}
|
|
59
83
|
onPress={onPress}
|
|
60
84
|
disabled={disabled}
|
|
61
85
|
testID={testID}
|
|
62
|
-
style={({ hovered }) => [
|
|
63
|
-
|
|
64
|
-
|
|
86
|
+
style={({ hovered, pressed }) => [
|
|
87
|
+
buttonStyles.base,
|
|
88
|
+
variant === 'outlined' && buttonStyles.outlined,
|
|
89
|
+
variant === 'text' && buttonStyles.text,
|
|
90
|
+
|
|
91
|
+
hovered && [
|
|
92
|
+
buttonStyles.hovered,
|
|
93
|
+
variant === 'outlined' && buttonStyles.hoveredOutlined,
|
|
94
|
+
variant === 'text' && buttonStyles.hoveredText,
|
|
95
|
+
],
|
|
96
|
+
|
|
97
|
+
pressed && [
|
|
98
|
+
buttonStyles.pressed,
|
|
99
|
+
variant === 'outlined' && buttonStyles.pressedOutlined,
|
|
100
|
+
variant === 'text' && buttonStyles.pressedText,
|
|
101
|
+
],
|
|
102
|
+
|
|
65
103
|
style,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
104
|
+
|
|
105
|
+
focusVisible && buttonStyles.focused,
|
|
106
|
+
hidden && buttonStyles.hidden,
|
|
107
|
+
disabled && buttonStyles.disabled,
|
|
69
108
|
]}>
|
|
70
|
-
{children ??
|
|
109
|
+
{children ?? (
|
|
110
|
+
<Text
|
|
111
|
+
style={[
|
|
112
|
+
textStyles.base,
|
|
113
|
+
variant === 'outlined' && textStyles.outlined,
|
|
114
|
+
variant === 'text' && textStyles.text,
|
|
115
|
+
]}>
|
|
116
|
+
{label}
|
|
117
|
+
</Text>
|
|
118
|
+
)}
|
|
71
119
|
</Pressable>
|
|
72
120
|
);
|
|
73
121
|
}
|
|
@@ -1,56 +1,111 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
StyleSheet,
|
|
4
|
-
Text,
|
|
5
|
-
unstable_createElement,
|
|
6
|
-
useColorScheme,
|
|
7
|
-
View,
|
|
8
|
-
type ViewProps,
|
|
9
|
-
} from 'react-native';
|
|
1
|
+
import { Pressable, StyleSheet, Text, View } from 'react-native';
|
|
10
2
|
|
|
11
3
|
import type { CheckboxProps } from './types';
|
|
4
|
+
import { useFocusVisible } from '../hooks';
|
|
5
|
+
import { colors, createWebComponent, durations, easings, shadows } from '../webUtils';
|
|
6
|
+
|
|
7
|
+
const Input = createWebComponent('input');
|
|
12
8
|
|
|
13
9
|
const styles = StyleSheet.create({
|
|
14
|
-
|
|
15
|
-
flexDirection: 'row',
|
|
16
|
-
display: 'inline-flex',
|
|
10
|
+
view: {
|
|
17
11
|
alignItems: 'center',
|
|
18
|
-
gap: 8,
|
|
19
12
|
cursor: 'pointer',
|
|
13
|
+
display: 'inline-flex',
|
|
14
|
+
flexDirection: 'row',
|
|
15
|
+
gap: 10,
|
|
20
16
|
},
|
|
21
|
-
|
|
22
|
-
opacity: 0.5,
|
|
17
|
+
viewDisabled: {
|
|
23
18
|
cursor: 'auto',
|
|
24
19
|
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
input: {
|
|
21
|
+
position: 'absolute',
|
|
22
|
+
opacity: 0,
|
|
23
|
+
pointerEvents: 'none',
|
|
24
|
+
margin: 0,
|
|
25
|
+
width: 0,
|
|
26
|
+
height: 0,
|
|
27
|
+
},
|
|
28
|
+
pressable: {
|
|
29
|
+
backgroundColor: colors.background,
|
|
30
|
+
borderColor: colors.gray[300],
|
|
31
|
+
borderRadius: 6,
|
|
32
|
+
borderStyle: 'solid',
|
|
33
|
+
borderWidth: 1.5,
|
|
34
|
+
height: 18,
|
|
35
|
+
outlineStyle: 'solid',
|
|
36
|
+
outlineWidth: 0,
|
|
37
|
+
transitionDuration: durations.fast,
|
|
38
|
+
transitionProperty: 'all',
|
|
39
|
+
transitionTimingFunction: easings.standard,
|
|
40
|
+
width: 18,
|
|
41
|
+
},
|
|
42
|
+
hovered: {
|
|
43
|
+
borderColor: colors.primary[500],
|
|
28
44
|
},
|
|
29
|
-
|
|
30
|
-
|
|
45
|
+
focused: {
|
|
46
|
+
boxShadow: shadows.focus,
|
|
47
|
+
},
|
|
48
|
+
checked: {
|
|
49
|
+
backgroundColor: colors.primary[500],
|
|
50
|
+
borderColor: colors.primary[500],
|
|
51
|
+
},
|
|
52
|
+
disabled: {
|
|
53
|
+
cursor: 'auto',
|
|
54
|
+
opacity: 0.5,
|
|
55
|
+
},
|
|
56
|
+
text: {
|
|
57
|
+
color: colors.foreground,
|
|
58
|
+
lineHeight: 20,
|
|
59
|
+
userSelect: 'none',
|
|
31
60
|
},
|
|
32
61
|
});
|
|
33
62
|
|
|
34
|
-
const NativeCheckbox = (
|
|
35
|
-
props: Omit<ComponentProps<'input'>, 'style' | 'type'> & { style?: ViewProps['style'] }
|
|
36
|
-
) => unstable_createElement('input', { ...props, type: 'checkbox' });
|
|
37
|
-
|
|
38
63
|
/**
|
|
39
64
|
* A toggle control that represents a checked or unchecked state.
|
|
40
65
|
*/
|
|
41
66
|
export function Checkbox({ value, onValueChange, label, disabled = false, testID }: CheckboxProps) {
|
|
42
|
-
const
|
|
67
|
+
const { focusVisible, onFocus, onBlur } = useFocusVisible();
|
|
43
68
|
|
|
44
69
|
return (
|
|
45
|
-
<View
|
|
46
|
-
|
|
70
|
+
<View
|
|
71
|
+
aria-disabled={disabled}
|
|
72
|
+
role="label"
|
|
73
|
+
style={[styles.view, disabled && styles.viewDisabled]}>
|
|
74
|
+
<Input
|
|
75
|
+
type="checkbox"
|
|
76
|
+
focusable
|
|
77
|
+
onFocus={onFocus}
|
|
78
|
+
onBlur={onBlur}
|
|
47
79
|
checked={value}
|
|
48
|
-
onChange={(
|
|
80
|
+
onChange={({ target: { checked } }) => onValueChange(checked)}
|
|
49
81
|
disabled={disabled}
|
|
50
82
|
data-testid={testID}
|
|
51
|
-
style={styles.
|
|
83
|
+
style={styles.input}
|
|
52
84
|
/>
|
|
53
|
-
|
|
85
|
+
|
|
86
|
+
<Pressable
|
|
87
|
+
tabIndex={-1}
|
|
88
|
+
style={({ hovered }) => [
|
|
89
|
+
styles.pressable,
|
|
90
|
+
hovered && !disabled && styles.hovered,
|
|
91
|
+
value && styles.checked,
|
|
92
|
+
focusVisible && styles.focused,
|
|
93
|
+
disabled && styles.disabled,
|
|
94
|
+
]}>
|
|
95
|
+
{value && (
|
|
96
|
+
<svg
|
|
97
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
98
|
+
viewBox="0 0 16 16"
|
|
99
|
+
fill="none"
|
|
100
|
+
stroke="white"
|
|
101
|
+
strokeWidth="1.75"
|
|
102
|
+
strokeLinecap="round"
|
|
103
|
+
strokeLinejoin="round">
|
|
104
|
+
<polyline points="3 8.5 6.5 12 13 4.5" />
|
|
105
|
+
</svg>
|
|
106
|
+
)}
|
|
107
|
+
</Pressable>
|
|
108
|
+
{label != null && <Text style={styles.text}>{label}</Text>}
|
|
54
109
|
</View>
|
|
55
110
|
);
|
|
56
111
|
}
|
|
@@ -1,23 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import {
|
|
3
|
-
StyleSheet,
|
|
4
|
-
Text,
|
|
5
|
-
unstable_createElement,
|
|
6
|
-
useColorScheme,
|
|
7
|
-
View,
|
|
8
|
-
type TextProps,
|
|
9
|
-
type ViewProps,
|
|
10
|
-
} from 'react-native';
|
|
1
|
+
import type { SyntheticEvent } from 'react';
|
|
2
|
+
import { StyleSheet, Text, useColorScheme, View } from 'react-native';
|
|
11
3
|
|
|
12
4
|
import type { CollapsibleProps } from './types';
|
|
5
|
+
import { createWebComponent } from '../webUtils';
|
|
13
6
|
|
|
14
|
-
const Details = (
|
|
15
|
-
|
|
16
|
-
) => unstable_createElement('details', props);
|
|
17
|
-
|
|
18
|
-
const Summary = (
|
|
19
|
-
props: Omit<ComponentProps<'summary'>, 'style'> & { style?: ViewProps['style'] }
|
|
20
|
-
) => unstable_createElement('summary', props);
|
|
7
|
+
const Details = createWebComponent('details');
|
|
8
|
+
const Summary = createWebComponent('summary');
|
|
21
9
|
|
|
22
10
|
/**
|
|
23
11
|
* A primitive that toggles visibility of its content via a labelled tappable
|
|
@@ -1,24 +1,21 @@
|
|
|
1
|
-
import { ScrollView, StyleSheet
|
|
1
|
+
import { ScrollView, StyleSheet } from 'react-native';
|
|
2
2
|
|
|
3
3
|
import { groupFieldGroupChildren } from './groupChildren';
|
|
4
4
|
import type { FieldGroupProps } from './types';
|
|
5
5
|
import { useUniversalLifecycle } from '../hooks';
|
|
6
|
+
import { colors } from '../webUtils';
|
|
6
7
|
|
|
7
8
|
const styles = StyleSheet.create({
|
|
8
9
|
container: {
|
|
9
|
-
backgroundColor:
|
|
10
|
+
backgroundColor: colors.gray[50],
|
|
10
11
|
flex: 1,
|
|
11
12
|
},
|
|
12
|
-
containerDark: {
|
|
13
|
-
backgroundColor: '#000000',
|
|
14
|
-
},
|
|
15
13
|
hidden: {
|
|
16
14
|
display: 'none',
|
|
17
15
|
},
|
|
18
16
|
contentContainer: {
|
|
19
|
-
paddingHorizontal: 16,
|
|
20
|
-
paddingVertical: 16,
|
|
21
17
|
gap: 24,
|
|
18
|
+
padding: 16,
|
|
22
19
|
},
|
|
23
20
|
});
|
|
24
21
|
|
|
@@ -39,16 +36,9 @@ export function FieldGroup({
|
|
|
39
36
|
}: FieldGroupProps) {
|
|
40
37
|
useUniversalLifecycle(onAppear, onDisappear);
|
|
41
38
|
|
|
42
|
-
const isDarkScheme = useColorScheme() === 'dark';
|
|
43
|
-
|
|
44
39
|
return (
|
|
45
40
|
<ScrollView
|
|
46
|
-
style={[
|
|
47
|
-
styles.container,
|
|
48
|
-
isDarkScheme && styles.containerDark,
|
|
49
|
-
style,
|
|
50
|
-
hidden && styles.hidden,
|
|
51
|
-
]}
|
|
41
|
+
style={[styles.container, style, hidden && styles.hidden]}
|
|
52
42
|
contentContainerStyle={styles.contentContainer}
|
|
53
43
|
testID={testID}>
|
|
54
44
|
{groupFieldGroupChildren(children)}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Fragment } from 'react';
|
|
2
|
-
import { StyleSheet, Text,
|
|
2
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { extractFieldSectionSlots } from './FieldSectionSlots';
|
|
5
5
|
import type { FieldSectionProps } from './types';
|
|
6
6
|
import { useUniversalLifecycle } from '../hooks';
|
|
7
|
+
import { colors } from '../webUtils';
|
|
7
8
|
|
|
8
9
|
const styles = StyleSheet.create({
|
|
9
10
|
hidden: {
|
|
@@ -11,49 +12,42 @@ const styles = StyleSheet.create({
|
|
|
11
12
|
},
|
|
12
13
|
headerContainer: {
|
|
13
14
|
paddingHorizontal: 16,
|
|
14
|
-
paddingBottom:
|
|
15
|
+
paddingBottom: 12,
|
|
15
16
|
},
|
|
16
17
|
headerText: {
|
|
17
|
-
color:
|
|
18
|
+
color: colors.gray[900],
|
|
18
19
|
fontSize: 14,
|
|
19
20
|
fontWeight: '500',
|
|
20
21
|
},
|
|
21
|
-
headerTextDark: {
|
|
22
|
-
color: '#98989e',
|
|
23
|
-
},
|
|
24
22
|
headerTextUppercase: {
|
|
25
23
|
textTransform: 'uppercase',
|
|
26
24
|
letterSpacing: 0.5,
|
|
27
25
|
fontSize: 13,
|
|
28
26
|
},
|
|
29
27
|
card: {
|
|
30
|
-
backgroundColor:
|
|
28
|
+
backgroundColor: colors.background,
|
|
31
29
|
borderRadius: 12,
|
|
30
|
+
borderStyle: 'solid',
|
|
31
|
+
borderWidth: 1,
|
|
32
|
+
borderColor: colors.gray[100],
|
|
32
33
|
overflow: 'hidden',
|
|
33
34
|
},
|
|
34
|
-
cardDark: {
|
|
35
|
-
backgroundColor: '#1c1c1e',
|
|
36
|
-
},
|
|
37
35
|
// Gives each row the same minimum height SwiftUI `Form` uses for single-line
|
|
38
36
|
// rows on iOS, so a text-only row doesn't collapse to its text intrinsic
|
|
39
37
|
// size. Taller content (e.g. a Switch) grows the row naturally. Horizontal
|
|
40
38
|
// padding matches SwiftUI `Form`'s built-in row leading/trailing inset.
|
|
41
39
|
rowWrapper: {
|
|
42
|
-
minHeight:
|
|
40
|
+
minHeight: 48,
|
|
43
41
|
justifyContent: 'center',
|
|
44
42
|
paddingHorizontal: 16,
|
|
45
43
|
},
|
|
46
44
|
divider: {
|
|
47
|
-
backgroundColor:
|
|
45
|
+
backgroundColor: colors.gray[100],
|
|
48
46
|
height: 1,
|
|
49
|
-
marginLeft: 16,
|
|
50
|
-
},
|
|
51
|
-
dividerDark: {
|
|
52
|
-
backgroundColor: '#38383a',
|
|
53
47
|
},
|
|
54
48
|
footerContainer: {
|
|
55
49
|
paddingHorizontal: 16,
|
|
56
|
-
paddingTop:
|
|
50
|
+
paddingTop: 12,
|
|
57
51
|
},
|
|
58
52
|
});
|
|
59
53
|
|
|
@@ -75,34 +69,23 @@ export function FieldSection({
|
|
|
75
69
|
}: FieldSectionProps) {
|
|
76
70
|
useUniversalLifecycle(onAppear, onDisappear);
|
|
77
71
|
|
|
78
|
-
const isDarkScheme = useColorScheme() === 'dark';
|
|
79
|
-
|
|
80
72
|
const { header, footer, rows } = extractFieldSectionSlots(children);
|
|
81
73
|
|
|
82
74
|
const headerNode =
|
|
83
75
|
header ??
|
|
84
76
|
(title ? (
|
|
85
|
-
<Text
|
|
86
|
-
style={[
|
|
87
|
-
styles.headerText,
|
|
88
|
-
isDarkScheme && styles.headerTextDark,
|
|
89
|
-
titleUppercase && styles.headerTextUppercase,
|
|
90
|
-
]}>
|
|
91
|
-
{title}
|
|
92
|
-
</Text>
|
|
77
|
+
<Text style={[styles.headerText, titleUppercase && styles.headerTextUppercase]}>{title}</Text>
|
|
93
78
|
) : null);
|
|
94
79
|
|
|
95
80
|
return (
|
|
96
81
|
<View style={[style, hidden && styles.hidden]} testID={testID}>
|
|
97
82
|
{headerNode ? <View style={styles.headerContainer}>{headerNode}</View> : null}
|
|
98
83
|
{rows.length > 0 ? (
|
|
99
|
-
<View style={
|
|
84
|
+
<View style={styles.card}>
|
|
100
85
|
{rows.map((child, index) => (
|
|
101
86
|
<Fragment key={index}>
|
|
102
87
|
<View style={styles.rowWrapper}>{child}</View>
|
|
103
|
-
{index < rows.length - 1 ?
|
|
104
|
-
<View style={[styles.divider, isDarkScheme && styles.dividerDark]} />
|
|
105
|
-
) : null}
|
|
88
|
+
{index < rows.length - 1 ? <View role="separator" style={styles.divider} /> : null}
|
|
106
89
|
</Fragment>
|
|
107
90
|
))}
|
|
108
91
|
</View>
|
|
@@ -44,6 +44,9 @@ export function extractFieldSectionSlots(children: ReactNode): ExtractedFieldSec
|
|
|
44
44
|
|
|
45
45
|
const walk = (node: ReactNode) => {
|
|
46
46
|
Children.forEach(node, (child) => {
|
|
47
|
+
if (child == null || typeof child === 'boolean') {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
47
50
|
if (!isValidElement(child)) {
|
|
48
51
|
rows.push(child);
|
|
49
52
|
return;
|
|
@@ -21,6 +21,9 @@ export function groupFieldGroupChildren(children: ReactNode): ReactNode[] {
|
|
|
21
21
|
};
|
|
22
22
|
|
|
23
23
|
Children.forEach(children, (child) => {
|
|
24
|
+
if (child == null || typeof child === 'boolean') {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
24
27
|
if (isSectionElement(child)) {
|
|
25
28
|
flush();
|
|
26
29
|
result.push(child);
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { useMemo } from 'react';
|
|
1
2
|
import { StyleSheet, View, type LayoutChangeEvent } from 'react-native';
|
|
2
3
|
|
|
4
|
+
import { generatePrimaryColorScale, globalCss } from '../webUtils';
|
|
3
5
|
import type { UniversalHostProps } from './types';
|
|
4
6
|
|
|
5
7
|
const styles = StyleSheet.create({
|
|
@@ -27,10 +29,11 @@ const styles = StyleSheet.create({
|
|
|
27
29
|
/**
|
|
28
30
|
* A bridging container that hosts SwiftUI views on iOS and Jetpack Compose views on Android.
|
|
29
31
|
* On platforms without a native UI-toolkit binding (web, RN fallback), renders a plain `View`.
|
|
30
|
-
* The `colorScheme`, `layoutDirection`, and `matchContents` props are accepted for API parity but have no effect.
|
|
31
32
|
*/
|
|
32
33
|
export function Host({
|
|
33
34
|
children,
|
|
35
|
+
colorScheme = 'unspecified',
|
|
36
|
+
seedColor,
|
|
34
37
|
ignoreSafeArea,
|
|
35
38
|
layoutDirection,
|
|
36
39
|
matchContents = false,
|
|
@@ -38,44 +41,55 @@ export function Host({
|
|
|
38
41
|
onLayoutContent,
|
|
39
42
|
style,
|
|
40
43
|
useViewportSizeMeasurement = false,
|
|
41
|
-
colorScheme: _colorScheme,
|
|
42
44
|
...rest
|
|
43
45
|
}: UniversalHostProps) {
|
|
46
|
+
const dataSet = colorScheme !== 'unspecified' ? { theme: colorScheme } : undefined;
|
|
47
|
+
const primaryColorScale = useMemo(() => generatePrimaryColorScale(seedColor), [seedColor]);
|
|
48
|
+
|
|
49
|
+
const dir =
|
|
50
|
+
layoutDirection === 'leftToRight'
|
|
51
|
+
? 'ltr'
|
|
52
|
+
: layoutDirection === 'rightToLeft'
|
|
53
|
+
? 'rtl'
|
|
54
|
+
: undefined;
|
|
55
|
+
|
|
44
56
|
const shouldMatchContents =
|
|
45
57
|
typeof matchContents === 'object'
|
|
46
58
|
? matchContents.horizontal || matchContents.vertical
|
|
47
59
|
: matchContents;
|
|
48
60
|
|
|
49
61
|
return (
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
62
|
+
<>
|
|
63
|
+
<style href="expo-ui-host" precedence="expo-ui">
|
|
64
|
+
{globalCss}
|
|
65
|
+
</style>
|
|
66
|
+
|
|
67
|
+
<View
|
|
68
|
+
dataSet={dataSet}
|
|
69
|
+
dir={dir}
|
|
70
|
+
onLayout={(event: LayoutChangeEvent) => {
|
|
71
|
+
onLayout?.(event);
|
|
60
72
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
73
|
+
onLayoutContent?.({
|
|
74
|
+
nativeEvent: {
|
|
75
|
+
width: event.nativeEvent.layout.width,
|
|
76
|
+
height: event.nativeEvent.layout.height,
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
}}
|
|
80
|
+
style={[
|
|
81
|
+
primaryColorScale,
|
|
82
|
+
ignoreSafeArea !== 'all' &&
|
|
83
|
+
(ignoreSafeArea === 'keyboard' ? styles.safeAreaWithoutKeyboard : styles.safeArea),
|
|
84
|
+
shouldMatchContents
|
|
85
|
+
? styles.matchContents
|
|
86
|
+
: useViewportSizeMeasurement && styles.matchViewport,
|
|
87
|
+
style,
|
|
88
|
+
]}
|
|
89
|
+
{...rest}>
|
|
90
|
+
{children}
|
|
91
|
+
</View>
|
|
92
|
+
</>
|
|
79
93
|
);
|
|
80
94
|
}
|
|
81
95
|
|