@expo/ui 0.2.0-beta.8 → 0.2.0-beta.9
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 +17 -58
- package/android/build.gradle +8 -8
- package/android/src/main/java/expo/modules/ui/AlertDialogView.kt +2 -3
- package/android/src/main/java/expo/modules/ui/ChipView.kt +3 -4
- package/android/src/main/java/expo/modules/ui/ComposeViews.kt +13 -33
- package/android/src/main/java/expo/modules/ui/DatePickerView.kt +2 -3
- package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +4 -55
- package/android/src/main/java/expo/modules/ui/Modifiers.kt +6 -35
- package/android/src/main/java/expo/modules/ui/PickerView.kt +2 -3
- package/android/src/main/java/expo/modules/ui/ProgressView.kt +2 -3
- package/android/src/main/java/expo/modules/ui/ShapeView.kt +11 -66
- package/android/src/main/java/expo/modules/ui/SliderView.kt +2 -3
- package/android/src/main/java/expo/modules/ui/SwitchView.kt +3 -4
- package/android/src/main/java/expo/modules/ui/TextInputView.kt +2 -3
- package/android/src/main/java/expo/modules/ui/button/Button.kt +9 -30
- package/android/src/main/java/expo/modules/ui/menu/ContextMenu.kt +1 -2
- package/build/jetpack-compose/AlertDialog/index.d.ts +1 -3
- package/build/jetpack-compose/AlertDialog/index.d.ts.map +1 -1
- package/build/jetpack-compose/Button/index.d.ts +3 -8
- package/build/jetpack-compose/Button/index.d.ts.map +1 -1
- package/build/jetpack-compose/Chip/index.d.ts +4 -4
- package/build/jetpack-compose/ContextMenu/index.d.ts +15 -3
- package/build/jetpack-compose/ContextMenu/index.d.ts.map +1 -1
- package/build/jetpack-compose/DatePicker/index.d.ts +1 -3
- package/build/jetpack-compose/DatePicker/index.d.ts.map +1 -1
- package/build/jetpack-compose/Picker/index.d.ts +2 -3
- package/build/jetpack-compose/Picker/index.d.ts.map +1 -1
- package/build/jetpack-compose/Progress/index.d.ts +2 -6
- package/build/jetpack-compose/Progress/index.d.ts.map +1 -1
- package/build/jetpack-compose/Shape/index.d.ts +7 -13
- package/build/jetpack-compose/Shape/index.d.ts.map +1 -1
- package/build/jetpack-compose/Slider/index.d.ts +1 -3
- package/build/jetpack-compose/Slider/index.d.ts.map +1 -1
- package/build/jetpack-compose/Switch/index.d.ts +3 -5
- package/build/jetpack-compose/Switch/index.d.ts.map +1 -1
- package/build/jetpack-compose/TextInput/index.d.ts +1 -3
- package/build/jetpack-compose/TextInput/index.d.ts.map +1 -1
- package/build/jetpack-compose/index.d.ts +0 -4
- package/build/jetpack-compose/index.d.ts.map +1 -1
- package/build/jetpack-compose/modifiers.d.ts +1 -8
- package/build/jetpack-compose/modifiers.d.ts.map +1 -1
- package/build/{jetpack-compose/layout.d.ts → jetpack-compose-primitives/index.d.ts} +11 -14
- package/build/jetpack-compose-primitives/index.d.ts.map +1 -0
- package/build/swift-ui/BottomSheet/index.d.ts +6 -6
- package/build/swift-ui/Button/index.d.ts +6 -8
- package/build/swift-ui/Button/index.d.ts.map +1 -1
- package/build/swift-ui/Chart/index.d.ts +5 -41
- package/build/swift-ui/Chart/index.d.ts.map +1 -1
- package/build/swift-ui/ContentUnavailableView/index.d.ts +0 -5
- package/build/swift-ui/ContentUnavailableView/index.d.ts.map +1 -1
- package/build/swift-ui/ContextMenu/index.d.ts +15 -2
- package/build/swift-ui/ContextMenu/index.d.ts.map +1 -1
- package/build/swift-ui/ContextMenu/types.d.ts +4 -4
- 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/Form/index.d.ts +0 -1
- package/build/swift-ui/Form/index.d.ts.map +1 -1
- package/build/swift-ui/Gauge/index.d.ts +3 -1
- package/build/swift-ui/Gauge/index.d.ts.map +1 -1
- package/build/swift-ui/Host/index.d.ts +1 -6
- package/build/swift-ui/Host/index.d.ts.map +1 -1
- package/build/swift-ui/Image/index.d.ts +1 -2
- package/build/swift-ui/Image/index.d.ts.map +1 -1
- package/build/swift-ui/Label/index.d.ts +2 -3
- package/build/swift-ui/Label/index.d.ts.map +1 -1
- package/build/swift-ui/LabeledContent/index.d.ts +3 -3
- package/build/swift-ui/LabeledContent/index.d.ts.map +1 -1
- package/build/swift-ui/Layout/index.d.ts +1 -2
- package/build/swift-ui/Layout/index.d.ts.map +1 -1
- package/build/swift-ui/List/index.d.ts +1 -1
- package/build/swift-ui/List/index.d.ts.map +1 -1
- package/build/swift-ui/Picker/index.d.ts +2 -4
- package/build/swift-ui/Picker/index.d.ts.map +1 -1
- package/build/swift-ui/Section/index.d.ts +2 -15
- package/build/swift-ui/Section/index.d.ts.map +1 -1
- package/build/swift-ui/SecureField/index.d.ts +1 -16
- package/build/swift-ui/SecureField/index.d.ts.map +1 -1
- package/build/swift-ui/ShareLink/index.d.ts +2 -8
- package/build/swift-ui/ShareLink/index.d.ts.map +1 -1
- package/build/swift-ui/Slider/index.d.ts +1 -2
- package/build/swift-ui/Slider/index.d.ts.map +1 -1
- package/build/swift-ui/Switch/index.d.ts +2 -8
- package/build/swift-ui/Switch/index.d.ts.map +1 -1
- package/build/swift-ui/Text/index.d.ts +2 -10
- package/build/swift-ui/Text/index.d.ts.map +1 -1
- package/build/swift-ui/TextField/index.d.ts +5 -44
- package/build/swift-ui/TextField/index.d.ts.map +1 -1
- package/build/swift-ui/index.d.ts +0 -3
- package/build/swift-ui/index.d.ts.map +1 -1
- package/build/swift-ui/modifiers/containerShape.d.ts +7 -4
- package/build/swift-ui/modifiers/containerShape.d.ts.map +1 -1
- package/build/swift-ui/modifiers/createModifier.d.ts +0 -1
- package/build/swift-ui/modifiers/createModifier.d.ts.map +1 -1
- package/build/swift-ui/modifiers/index.d.ts +55 -331
- package/build/swift-ui/modifiers/index.d.ts.map +1 -1
- package/build/utils/index.d.ts.map +1 -1
- package/expo-module.config.json +1 -1
- package/ios/BottomSheetView.swift +9 -1
- package/ios/Button/Button.swift +1 -0
- package/ios/Button/ButtonProps.swift +7 -1
- package/ios/CapsuleView.swift +8 -1
- package/ios/ChartView.swift +25 -64
- package/ios/CircleView.swift +7 -1
- package/ios/ColorPickerView.swift +8 -1
- package/ios/ConcentricRectangleView.swift +8 -1
- package/ios/ContentUnavailableView.swift +8 -1
- package/ios/ContextMenu/ContextMenu.swift +3 -0
- package/ios/ContextMenu/ContextMenuRecords.swift +7 -1
- package/ios/DateTimePickerView.swift +8 -1
- package/ios/DisclosureGroupView.swift +8 -1
- package/ios/DividerView.swift +7 -1
- package/ios/EllipseView.swift +7 -1
- package/ios/ExpoUIModule.swift +39 -88
- package/ios/FormView.swift +8 -1
- package/ios/Gauge/Gauge.swift +1 -0
- package/ios/Gauge/GaugeProps.swift +7 -1
- package/ios/GlassEffectContainerView.swift +7 -1
- package/ios/GroupView.swift +8 -1
- package/ios/HStackView.swift +8 -1
- package/ios/HostView.swift +4 -46
- package/ios/ImageView.swift +8 -1
- package/ios/Label.swift +13 -16
- package/ios/LabeledContentView.swift +10 -55
- package/ios/List.swift +8 -1
- package/ios/Modifiers/CommonViewModifiers.swift +29 -0
- package/ios/Modifiers/ViewModifierRegistry.swift +95 -651
- package/ios/PickerView.swift +8 -1
- package/ios/ProgressView.swift +8 -1
- package/ios/RectangleView.swift +7 -1
- package/ios/RoundedRectangleView.swift +8 -1
- package/ios/SectionView.swift +10 -86
- package/ios/SecureField/SecureFieldView.swift +9 -31
- package/ios/ShareLinkView.swift +111 -0
- package/ios/SliderView.swift +8 -1
- package/ios/SpacerView.swift +8 -1
- package/ios/SwitchView.swift +9 -12
- package/ios/TextField/TextFieldView.swift +15 -102
- package/ios/TextView.swift +38 -16
- package/ios/UnevenRoundedRectangleView.swift +8 -1
- package/ios/VStackView.swift +8 -1
- package/ios/ZStackView.swift +8 -1
- package/jetpack-compose-primitives.d.ts +1 -0
- package/jetpack-compose-primitives.js +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9-sources.jar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9-sources.jar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9-sources.jar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9-sources.jar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9-sources.jar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9.aar.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9.aar.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9.aar.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9.aar.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8.module → 0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9.module} +29 -29
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9.module.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9.module.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9.module.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9.module.sha512 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8.pom → 0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9.pom} +7 -7
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9.pom.md5 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9.pom.sha1 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9.pom.sha256 +1 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.9/expo.modules.ui-0.2.0-beta.9.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 +8 -4
- package/src/jetpack-compose/AlertDialog/index.tsx +1 -3
- package/src/jetpack-compose/Button/index.tsx +4 -11
- package/src/jetpack-compose/Chip/index.tsx +4 -4
- package/src/jetpack-compose/ContextMenu/index.tsx +17 -3
- package/src/jetpack-compose/DatePicker/index.tsx +1 -3
- package/src/jetpack-compose/Picker/index.tsx +2 -3
- package/src/jetpack-compose/Progress/index.tsx +2 -6
- package/src/jetpack-compose/Shape/index.tsx +12 -65
- package/src/jetpack-compose/Slider/index.tsx +1 -3
- package/src/jetpack-compose/Switch/index.tsx +3 -5
- package/src/jetpack-compose/TextInput/index.tsx +1 -3
- package/src/jetpack-compose/index.ts +0 -5
- package/src/jetpack-compose/modifiers.ts +1 -11
- package/src/{jetpack-compose/layout.tsx → jetpack-compose-primitives/index.tsx} +24 -56
- package/src/swift-ui/BottomSheet/index.tsx +6 -6
- package/src/swift-ui/Button/index.tsx +6 -8
- package/src/swift-ui/Chart/index.tsx +5 -43
- package/src/swift-ui/ContentUnavailableView/index.tsx +4 -5
- package/src/swift-ui/ContextMenu/index.tsx +16 -2
- package/src/swift-ui/ContextMenu/types.ts +4 -4
- package/src/swift-ui/DatePicker/index.tsx +2 -2
- package/src/swift-ui/Form/index.tsx +0 -1
- package/src/swift-ui/Gauge/index.tsx +3 -1
- package/src/swift-ui/Host/index.tsx +2 -11
- package/src/swift-ui/Image/index.tsx +1 -2
- package/src/swift-ui/Label/index.tsx +2 -3
- package/src/swift-ui/LabeledContent/index.tsx +6 -22
- package/src/swift-ui/Layout/index.tsx +1 -2
- package/src/swift-ui/List/index.tsx +1 -1
- package/src/swift-ui/Picker/index.tsx +2 -4
- package/src/swift-ui/Section/index.tsx +5 -27
- package/src/swift-ui/SecureField/index.tsx +3 -26
- package/src/swift-ui/ShareLink/index.tsx +7 -37
- package/src/swift-ui/Slider/index.tsx +1 -2
- package/src/swift-ui/Switch/index.tsx +2 -9
- package/src/swift-ui/Text/index.tsx +4 -13
- package/src/swift-ui/TextField/index.tsx +9 -50
- package/src/swift-ui/index.tsx +0 -3
- package/src/swift-ui/modifiers/containerShape.ts +9 -4
- package/src/swift-ui/modifiers/createModifier.ts +0 -1
- package/src/swift-ui/modifiers/index.ts +75 -408
- package/src/utils/index.ts +0 -3
- package/android/src/main/java/expo/modules/ui/BottomSheetView.kt +0 -67
- package/android/src/main/java/expo/modules/ui/CarouselView.kt +0 -151
- package/build/jetpack-compose/BottomSheet/index.d.ts +0 -21
- package/build/jetpack-compose/BottomSheet/index.d.ts.map +0 -1
- package/build/jetpack-compose/Carousel/index.d.ts +0 -38
- package/build/jetpack-compose/Carousel/index.d.ts.map +0 -1
- package/build/jetpack-compose/Host/index.d.ts +0 -8
- package/build/jetpack-compose/Host/index.d.ts.map +0 -1
- package/build/jetpack-compose/layout.d.ts.map +0 -1
- package/build/swift-ui/Grid/index.d.ts +0 -27
- package/build/swift-ui/Grid/index.d.ts.map +0 -1
- package/build/swift-ui/Popover/index.d.ts +0 -32
- package/build/swift-ui/Popover/index.d.ts.map +0 -1
- package/build/swift-ui/Stepper/index.d.ts +0 -29
- package/build/swift-ui/Stepper/index.d.ts.map +0 -1
- package/build/swift-ui/modifiers/background.d.ts +0 -10
- package/build/swift-ui/modifiers/background.d.ts.map +0 -1
- package/build/swift-ui/modifiers/shapes/index.d.ts +0 -35
- package/build/swift-ui/modifiers/shapes/index.d.ts.map +0 -1
- package/build/swift-ui/modifiers/types.d.ts +0 -5
- package/build/swift-ui/modifiers/types.d.ts.map +0 -1
- package/ios/GridView.swift +0 -44
- package/ios/Modifiers/BackgroundModifier.swift +0 -37
- package/ios/Modifiers/ContainerShapeModifier.swift +0 -27
- package/ios/Modifiers/FontModifier.swift +0 -65
- package/ios/Modifiers/GlassEffectModifier.swift +0 -92
- package/ios/Modifiers/RefreshableModifier.swift +0 -59
- package/ios/Modifiers/ShapeTypes.swift +0 -62
- package/ios/Popover/PopoverComponents.swift +0 -18
- package/ios/Popover/PopoverProps.swift +0 -59
- package/ios/Popover/PopoverView.swift +0 -64
- package/ios/ShareLink/AsyncShareableItemUtils.swift +0 -79
- package/ios/ShareLink/ShareLinkView.swift +0 -112
- package/ios/StepperView.swift +0 -45
- package/ios/UIBaseView.swift +0 -57
- package/ios/UIBaseViewProps.swift +0 -25
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8-sources.jar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-beta.8/expo.modules.ui-0.2.0-beta.8.pom.sha512 +0 -1
- package/src/jetpack-compose/BottomSheet/index.tsx +0 -46
- package/src/jetpack-compose/Carousel/index.tsx +0 -57
- package/src/jetpack-compose/Host/index.tsx +0 -25
- package/src/swift-ui/Grid/index.tsx +0 -65
- package/src/swift-ui/Popover/index.tsx +0 -71
- package/src/swift-ui/Stepper/index.tsx +0 -56
- package/src/swift-ui/modifiers/background.ts +0 -12
- package/src/swift-ui/modifiers/shapes/index.ts +0 -32
- package/src/swift-ui/modifiers/types.ts +0 -23
package/CHANGELOG.md
CHANGED
|
@@ -10,54 +10,11 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
-
## 0.2.0-beta.
|
|
13
|
+
## 0.2.0-beta.9 — 2025-12-05
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
- [Android] Move all `jetpack-compose-primitives` components to `jetpack-compose` namespace. ([#40272](https://github.com/expo/expo/pull/40272) by [@aleqsio](https://github.com/aleqsio))
|
|
18
|
-
|
|
19
|
-
### 🎉 New features
|
|
20
|
-
|
|
21
|
-
- [iOS] Add `refreshable` modifier. ([#40201](https://github.com/expo/expo/pull/40201) by [@christianwooldridge](https://github.com/christianwooldridge))
|
|
22
|
-
- [iOS] Add RTL support in swiftui. ([#40335](https://github.com/expo/expo/pull/40335) by [@kfirfitousi](https://github.com/kfirfitousi))
|
|
23
|
-
- [Android] Add Carousel component. ([#40325](https://github.com/expo/expo/pull/40325) by [@aleqsio](https://github.com/aleqsio))
|
|
24
|
-
- [iOS] Add `scrollDismissesKeyboard` modifier. ([#40201](https://github.com/expo/expo/pull/40201) by [@christianwooldridge](https://github.com/christianwooldridge))
|
|
25
|
-
- [Android] Add Android BottomSheet ([#37553](https://github.com/expo/expo/pull/37553) by [@Jeroen-G](https://github.com/Jeroen-G))
|
|
26
|
-
- [Android] Move all components to use Host ([#40244](https://github.com/expo/expo/pull/40244) by [@aleqsio](https://github.com/aleqsio))
|
|
27
|
-
- [Android] Add support for modifiers in primitives, add clip modifier. ([#40164](https://github.com/expo/expo/pull/40164) by [@aleqsio](https://github.com/aleqsio))
|
|
28
|
-
- Add scoped compose modifiers, move testID to modifiers. ([#39155](https://github.com/expo/expo/pull/39155) by [@aleqsio](https://github.com/aleqsio))
|
|
29
|
-
- [Android] Add custom button shapes. ([#40163](https://github.com/expo/expo/pull/40163) by [@aleqsio](https://github.com/aleqsio))
|
|
30
|
-
- [iOS] Add ref methods and onChangeFocus to TextField and SecureField. ([#39898](https://github.com/expo/expo/pull/39898) by [@aleqsio](https://github.com/aleqsio))
|
|
31
|
-
- [iOS] Add SF symbol typings ([#39802](https://github.com/expo/expo/pull/39802) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
32
|
-
- [iOS] Add `scrollContentBackground` and `listRowBackground` modifier. ([#40195](https://github.com/expo/expo/pull/40195) by [@doombladeoff](https://github.com/doombladeoff))
|
|
33
|
-
- Added `onAppear` and `onDisappear` modifiers to `swift-ui`. ([#40056](https://github.com/expo/expo/pull/40056) by [@kudo](https://github.com/kudo))
|
|
34
|
-
- [iOS] Add Stepper component. ([#39813](https://github.com/expo/expo/pull/39813) by [@hryhoriiK97](https://github.com/hryhoriiK97))
|
|
35
|
-
- [ios] Add text modifiers (`truncationMode`, `kerning`, `allowsTightening`, `textCase`, `underline`, `strikethrough`, `multilineTextAlignment`,`textSelection` and `lineSpacing`) ([#40282](https://github.com/expo/expo/pull/40282) by [@doombladeoff](https://github.com/doombladeoff))
|
|
36
|
-
- [iOS] Added `header` and `footer` props for sections, support for collapsible sections, and headerProminence modifier ([#40340](https://github.com/expo/expo/pull/40340) by [@doombladeoff](https://github.com/doombladeoff))
|
|
37
|
-
- [iOS] Add new modifiers (`listRowInsets`, `listSectionMargins`, `badgeProminence`, `badge`) ([#40329](https://github.com/expo/expo/pull/40329) by [@doombladeoff](https://github.com/doombladeoff))
|
|
38
|
-
- Add Interpolated string support in button ([#40416](https://github.com/expo/expo/pull/40416) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
|
|
39
|
-
- [iOS] Added Popover component ([#40454](https://github.com/expo/expo/pull/40454) by [@doombladeoff](https://github.com/doombladeoff))
|
|
40
|
-
- [iOS] Add RectangleMark and RuleMark support to Chart component ([#40046](https://github.com/expo/expo/pull/40046) by [@hryhoriiK97](https://github.com/hryhoriiK97))
|
|
41
|
-
- Adds selection API in text field, autoFocus, onSubmit event and rounded rectangle (squircle) support in glassEffect. ([#40455](https://github.com/expo/expo/pull/40455) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
|
|
42
|
-
- [iOS] Add `font` modifier ([#40553](https://github.com/expo/expo/pull/40553) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
43
|
-
- [iOS] Add `getItemAsync` to `ShareLink` ([#40391](https://github.com/expo/expo/pull/40391) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
|
|
44
|
-
- [iOS] Add Grid component and modifiers `gridCellUnsizedAxes`, `gridCellColumns`, `gridColumnAlignment`, `gridCellAnchor` ([#40485](https://github.com/expo/expo/pull/40485) by [@doombladeoff](https://github.com/doombladeoff))
|
|
45
|
-
- [iOS] Add `labelView` to LabeledContent component ([#40798](https://github.com/expo/expo/pull/40798) by [@focux](https://github.com/focux))
|
|
46
|
-
- [iOS] - Add shape in `background` modifier and fix `foregroundStyle` modifer in `Label` ([#40748](https://github.com/expo/expo/pull/40748) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
47
|
-
- [iOS] - Add `systemImage` property to `Switch` component ([#40838](https://github.com/expo/expo/pull/40838) by [@focux](https://github.com/focux))
|
|
48
|
-
|
|
49
|
-
### 🐛 Bug fixes
|
|
50
|
-
|
|
51
|
-
- [iOS] remove empty section header spacing when no title provided ([#40296](https://github.com/expo/expo/pull/40296) by [@dylancom](https://github.com/dylancom))
|
|
52
|
-
- [iOS] Merge edge and axis paddings correctly in PaddingModifier ([#40414](https://github.com/expo/expo/pull/40414) by [@lucabc2000](https://github.com/lucabc2000))
|
|
53
|
-
- [iOS] Enhance PaddingModifier to support default SwiftUI padding when no custom values are provided ([#40715](https://github.com/expo/expo/pull/40715) by [@betomoedano](https://github.com/betomoedano))
|
|
54
|
-
|
|
55
|
-
### 💡 Others
|
|
56
|
-
|
|
57
|
-
- [docs] Improve consistency and remove invalid platform checks. ([#40362](https://github.com/expo/expo/pull/40362) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
|
|
58
|
-
- Refactored `CommonViewProps` to `UIBaseViewProps` and reduced duplicated code. ([#40492](https://github.com/expo/expo/pull/40492) by [@kudo](https://github.com/kudo))
|
|
15
|
+
_This version does not introduce any user-facing changes._
|
|
59
16
|
|
|
60
|
-
## 0.2.0-beta.7
|
|
17
|
+
## 0.2.0-beta.7 — 2025-10-09
|
|
61
18
|
|
|
62
19
|
### 🎉 New features
|
|
63
20
|
|
|
@@ -68,24 +25,23 @@
|
|
|
68
25
|
|
|
69
26
|
- [iOS] Make `ContextMenu` more composable. ([#40254](https://github.com/expo/expo/pull/40254) by [@intergalacticspacehighway](https://github.com/intergalacticspacehighway))
|
|
70
27
|
|
|
71
|
-
## 0.2.0-beta.6
|
|
28
|
+
## 0.2.0-beta.6 — 2025-10-01
|
|
72
29
|
|
|
73
30
|
### 🐛 Bug fixes
|
|
74
31
|
|
|
75
|
-
- [iOS] Add `buttonStyle` modifier. ([#40119](https://github.com/expo/expo/pull/40119) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
32
|
+
- [iOS] Add `buttonStyle` modifier. ([#40119](https://github.com/expo/expo/pull/40119) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
76
33
|
|
|
77
|
-
## 0.2.0-beta.5
|
|
34
|
+
## 0.2.0-beta.5 — 2025-10-01
|
|
78
35
|
|
|
79
36
|
### 🎉 New features
|
|
80
37
|
|
|
81
38
|
- [iOS] Add `variableValue` prop to Image component for SF Symbols with variable color support ([#39852](https://github.com/expo/expo/pull/39852) by [@morellodev](https://github.com/morellodev))
|
|
82
|
-
- [iOS] Adds `Rectangle`, `RoundedRectangle`, `UnevenRoundedRectangle`, `Circle`, `Ellipse`, `Capsule` shape components and `fill` modifier ([#39793](https://github.com/expo/expo/pull/39793) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
83
|
-
- [iOS] Add `ignoreSafeArea` modifier ([#39804](https://github.com/expo/expo/pull/39804) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
84
|
-
- [iOS] Add `presentationDetents`, `presentationDragIndicator`, `interactiveDismissDisabled` props to `BottomSheet`. ([#39952](https://github.com/expo/expo/pull/39952) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
85
|
-
- [iOS] Add `ConcentricRectangle` shape ([#39907](https://github.com/expo/expo/pull/39907) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
39
|
+
- [iOS] Adds `Rectangle`, `RoundedRectangle`, `UnevenRoundedRectangle`, `Circle`, `Ellipse`, `Capsule` shape components and `fill` modifier ([#39793](https://github.com/expo/expo/pull/39793) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
40
|
+
- [iOS] Add `ignoreSafeArea` modifier ([#39804](https://github.com/expo/expo/pull/39804) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
41
|
+
- [iOS] Add `presentationDetents`, `presentationDragIndicator`, `interactiveDismissDisabled` props to `BottomSheet`. ([#39952](https://github.com/expo/expo/pull/39952) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
42
|
+
- [iOS] Add `ConcentricRectangle` shape ([#39907](https://github.com/expo/expo/pull/39907) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
86
43
|
- [iOS] Add disabled modifier for swiftui. ([#39864](https://github.com/expo/expo/pull/39864) by [@hryhoriiK97](https://github.com/hryhoriiK97))
|
|
87
|
-
- Add Interpolated string support in button ([#39932](https://github.com/expo/expo/pull/39932) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
88
|
-
- [iOS] list section spacing modifier ([#40291](https://github.com/expo/expo/pull/40291) by [@dylancom](https://github.com/dylancom))
|
|
44
|
+
- Add Interpolated string support in button ([#39932](https://github.com/expo/expo/pull/39932) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
89
45
|
|
|
90
46
|
### 🐛 Bug fixes
|
|
91
47
|
|
|
@@ -93,13 +49,16 @@
|
|
|
93
49
|
|
|
94
50
|
### 💡 Others
|
|
95
51
|
|
|
96
|
-
- [ios] - Set host dimension synchronously on native ([#40017](https://github.com/expo/expo/pull/40017) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
52
|
+
- [ios] - Set host dimension synchronously on native ([#40017](https://github.com/expo/expo/pull/40017) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
53
|
+
|
|
54
|
+
## 0.2.0-beta.4 — 2025-09-22
|
|
55
|
+
|
|
56
|
+
### 🎉 New features
|
|
97
57
|
|
|
98
|
-
|
|
58
|
+
- Add SF symbol typings ([#39802](https://github.com/expo/expo/pull/39802) by [@nishan](https://github.com/intergalacticspacehighway))
|
|
99
59
|
|
|
100
60
|
### 🐛 Bug fixes
|
|
101
61
|
|
|
102
|
-
- [iOS] Add correct color value types. ([#39899](https://github.com/expo/expo/pull/39899) by [@EvanBacon](https://github.com/EvanBacon))
|
|
103
62
|
- [iOS] Updated description for glass button styles availability ([#39736](https://github.com/expo/expo/pull/39736) by [@terijaki](https://github.com/terijaki))
|
|
104
63
|
|
|
105
64
|
## 0.2.0-beta.3 — 2025-09-16
|
package/android/build.gradle
CHANGED
|
@@ -12,13 +12,13 @@ apply plugin: 'expo-module-gradle-plugin'
|
|
|
12
12
|
apply plugin: 'org.jetbrains.kotlin.plugin.compose'
|
|
13
13
|
|
|
14
14
|
group = 'expo.modules.ui'
|
|
15
|
-
version = '0.2.0-beta.
|
|
15
|
+
version = '0.2.0-beta.9'
|
|
16
16
|
|
|
17
17
|
android {
|
|
18
18
|
namespace "expo.modules.ui"
|
|
19
19
|
defaultConfig {
|
|
20
20
|
versionCode 1
|
|
21
|
-
versionName "0.2.0-beta.
|
|
21
|
+
versionName "0.2.0-beta.9"
|
|
22
22
|
}
|
|
23
23
|
buildFeatures {
|
|
24
24
|
compose true
|
|
@@ -29,11 +29,11 @@ android {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
dependencies {
|
|
32
|
-
implementation 'androidx.compose.foundation:foundation-android:1.
|
|
33
|
-
implementation 'androidx.compose.ui:ui-android:1.
|
|
34
|
-
implementation "androidx.compose.material3:material3:1.3.
|
|
35
|
-
implementation 'androidx.lifecycle:lifecycle-runtime:2.
|
|
36
|
-
implementation 'androidx.fragment:fragment-ktx:1.8.
|
|
37
|
-
implementation 'androidx.compose.material3:material3-android:1.3.
|
|
32
|
+
implementation 'androidx.compose.foundation:foundation-android:1.7.6'
|
|
33
|
+
implementation 'androidx.compose.ui:ui-android:1.7.6'
|
|
34
|
+
implementation "androidx.compose.material3:material3:1.3.1"
|
|
35
|
+
implementation 'androidx.lifecycle:lifecycle-runtime:2.8.7'
|
|
36
|
+
implementation 'androidx.fragment:fragment-ktx:1.8.5'
|
|
37
|
+
implementation 'androidx.compose.material3:material3-android:1.3.1'
|
|
38
38
|
implementation "androidx.graphics:graphics-shapes:1.0.1"
|
|
39
39
|
}
|
|
@@ -13,7 +13,6 @@ import androidx.compose.ui.Modifier
|
|
|
13
13
|
import expo.modules.kotlin.views.ExpoComposeView
|
|
14
14
|
import expo.modules.kotlin.viewevent.EventDispatcher
|
|
15
15
|
import expo.modules.kotlin.records.Record
|
|
16
|
-
import expo.modules.kotlin.views.ComposableScope
|
|
17
16
|
import java.io.Serializable
|
|
18
17
|
|
|
19
18
|
open class AlertDialogButtonPressedEvent() : Record, Serializable
|
|
@@ -28,13 +27,13 @@ data class AlertDialogProps(
|
|
|
28
27
|
) : ComposeProps
|
|
29
28
|
|
|
30
29
|
class AlertDialogView(context: Context, appContext: AppContext) :
|
|
31
|
-
ExpoComposeView<AlertDialogProps>(context, appContext) {
|
|
30
|
+
ExpoComposeView<AlertDialogProps>(context, appContext, withHostingView = true) {
|
|
32
31
|
override val props = AlertDialogProps()
|
|
33
32
|
private val onDismissPressed by EventDispatcher<AlertDialogButtonPressedEvent>()
|
|
34
33
|
private val onConfirmPressed by EventDispatcher<AlertDialogButtonPressedEvent>()
|
|
35
34
|
|
|
36
35
|
@Composable
|
|
37
|
-
override fun
|
|
36
|
+
override fun Content(modifier: Modifier) {
|
|
38
37
|
val (title) = props.title
|
|
39
38
|
val (text) = props.text
|
|
40
39
|
val (confirmButtonText) = props.confirmButtonText
|
|
@@ -12,7 +12,6 @@ import androidx.compose.ui.unit.dp
|
|
|
12
12
|
import expo.modules.kotlin.AppContext
|
|
13
13
|
import expo.modules.kotlin.records.Record
|
|
14
14
|
import expo.modules.kotlin.viewevent.EventDispatcher
|
|
15
|
-
import expo.modules.kotlin.views.ComposableScope
|
|
16
15
|
import expo.modules.kotlin.views.ComposeProps
|
|
17
16
|
import expo.modules.kotlin.views.ExpoComposeView
|
|
18
17
|
import java.io.Serializable
|
|
@@ -31,7 +30,7 @@ data class ChipProps(
|
|
|
31
30
|
) : ComposeProps
|
|
32
31
|
|
|
33
32
|
class ChipView(context: Context, appContext: AppContext) :
|
|
34
|
-
ExpoComposeView<ChipProps>(context, appContext) {
|
|
33
|
+
ExpoComposeView<ChipProps>(context, appContext, withHostingView = true) {
|
|
35
34
|
|
|
36
35
|
override val props = ChipProps()
|
|
37
36
|
|
|
@@ -40,7 +39,7 @@ class ChipView(context: Context, appContext: AppContext) :
|
|
|
40
39
|
|
|
41
40
|
@OptIn(ExperimentalMaterial3Api::class)
|
|
42
41
|
@Composable
|
|
43
|
-
override fun
|
|
42
|
+
override fun Content(modifier: Modifier) {
|
|
44
43
|
val variant by props.variant
|
|
45
44
|
val label by props.label
|
|
46
45
|
val leadingIcon by props.leadingIcon
|
|
@@ -50,7 +49,7 @@ class ChipView(context: Context, appContext: AppContext) :
|
|
|
50
49
|
val enabled by props.enabled
|
|
51
50
|
val selected by props.selected
|
|
52
51
|
|
|
53
|
-
val chipModifier =
|
|
52
|
+
val chipModifier = modifier
|
|
54
53
|
.padding(4.dp)
|
|
55
54
|
.wrapContentSize(Alignment.Center)
|
|
56
55
|
|
|
@@ -3,7 +3,6 @@ package expo.modules.ui
|
|
|
3
3
|
import android.content.Context
|
|
4
4
|
import android.graphics.Color as AndroidColor
|
|
5
5
|
import androidx.compose.foundation.layout.Arrangement
|
|
6
|
-
import androidx.compose.foundation.layout.Box
|
|
7
6
|
import androidx.compose.foundation.layout.Column
|
|
8
7
|
import androidx.compose.foundation.layout.Row
|
|
9
8
|
import androidx.compose.material3.Text
|
|
@@ -21,8 +20,6 @@ import expo.modules.kotlin.AppContext
|
|
|
21
20
|
import expo.modules.kotlin.types.Enumerable
|
|
22
21
|
import expo.modules.kotlin.views.ComposeProps
|
|
23
22
|
import expo.modules.kotlin.views.ExpoComposeView
|
|
24
|
-
import expo.modules.kotlin.views.ComposableScope
|
|
25
|
-
import expo.modules.kotlin.views.with
|
|
26
23
|
|
|
27
24
|
enum class HorizontalArrangement(val value: String) : Enumerable {
|
|
28
25
|
START("start"),
|
|
@@ -97,20 +94,20 @@ data class LayoutProps(
|
|
|
97
94
|
val verticalArrangement: MutableState<VerticalArrangement> = mutableStateOf(VerticalArrangement.TOP),
|
|
98
95
|
val horizontalAlignment: MutableState<HorizontalAlignment> = mutableStateOf(HorizontalAlignment.START),
|
|
99
96
|
val verticalAlignment: MutableState<VerticalAlignment> = mutableStateOf(VerticalAlignment.TOP),
|
|
100
|
-
val modifiers: MutableState<List<ExpoModifier
|
|
97
|
+
val modifiers: MutableState<List<ExpoModifier>> = mutableStateOf(emptyList())
|
|
101
98
|
) : ComposeProps
|
|
102
99
|
|
|
103
100
|
class RowView(context: Context, appContext: AppContext) : ExpoComposeView<LayoutProps>(context, appContext) {
|
|
104
101
|
override val props = LayoutProps()
|
|
105
102
|
|
|
106
103
|
@Composable
|
|
107
|
-
override fun
|
|
104
|
+
override fun Content(modifier: Modifier) {
|
|
108
105
|
Row(
|
|
109
106
|
horizontalArrangement = props.horizontalArrangement.value.toComposeArrangement(),
|
|
110
107
|
verticalAlignment = props.verticalAlignment.value.toComposeAlignment(),
|
|
111
|
-
modifier = Modifier.fromExpoModifiers(props.modifiers.value
|
|
108
|
+
modifier = modifier.then(Modifier.fromExpoModifiers(props.modifiers.value))
|
|
112
109
|
) {
|
|
113
|
-
Children(
|
|
110
|
+
Children()
|
|
114
111
|
}
|
|
115
112
|
}
|
|
116
113
|
}
|
|
@@ -119,26 +116,13 @@ class ColumnView(context: Context, appContext: AppContext) : ExpoComposeView<Lay
|
|
|
119
116
|
override val props = LayoutProps()
|
|
120
117
|
|
|
121
118
|
@Composable
|
|
122
|
-
override fun
|
|
119
|
+
override fun Content(modifier: Modifier) {
|
|
123
120
|
Column(
|
|
124
121
|
verticalArrangement = props.verticalArrangement.value.toComposeArrangement(),
|
|
125
122
|
horizontalAlignment = props.horizontalAlignment.value.toComposeAlignment(),
|
|
126
|
-
modifier = Modifier.fromExpoModifiers(props.modifiers.value
|
|
127
|
-
) {
|
|
128
|
-
Children(this@Content.with(columnScope = this@Column))
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
class BoxView(context: Context, appContext: AppContext) : ExpoComposeView<LayoutProps>(context, appContext) {
|
|
134
|
-
override val props = LayoutProps()
|
|
135
|
-
|
|
136
|
-
@Composable
|
|
137
|
-
override fun ComposableScope.Content() {
|
|
138
|
-
Box(
|
|
139
|
-
modifier = Modifier.fromExpoModifiers(props.modifiers.value, this@Content)
|
|
123
|
+
modifier = modifier.then(Modifier.fromExpoModifiers(props.modifiers.value))
|
|
140
124
|
) {
|
|
141
|
-
Children(
|
|
125
|
+
Children()
|
|
142
126
|
}
|
|
143
127
|
}
|
|
144
128
|
}
|
|
@@ -185,10 +169,10 @@ class TextView(context: Context, appContext: AppContext) : ExpoComposeView<TextP
|
|
|
185
169
|
override val props = TextProps()
|
|
186
170
|
|
|
187
171
|
@Composable
|
|
188
|
-
override fun
|
|
172
|
+
override fun Content(modifier: Modifier) {
|
|
189
173
|
Text(
|
|
190
174
|
text = props.text.value,
|
|
191
|
-
modifier = Modifier.fromExpoModifiers(props.modifiers.value),
|
|
175
|
+
modifier = modifier.then(Modifier.fromExpoModifiers(props.modifiers.value)),
|
|
192
176
|
color = colorToComposeColor(props.color.value),
|
|
193
177
|
style = TextStyle(
|
|
194
178
|
fontSize = props.fontSize.value.sp,
|
|
@@ -198,17 +182,13 @@ class TextView(context: Context, appContext: AppContext) : ExpoComposeView<TextP
|
|
|
198
182
|
}
|
|
199
183
|
}
|
|
200
184
|
|
|
201
|
-
class
|
|
185
|
+
class ContainerView(context: Context, appContext: AppContext) :
|
|
202
186
|
ExpoComposeView<ComposeProps>(context, appContext, withHostingView = true) {
|
|
203
187
|
@Composable
|
|
204
|
-
override fun
|
|
205
|
-
for (index in 0..<this
|
|
188
|
+
override fun Content(modifier: Modifier) {
|
|
189
|
+
for (index in 0..<this.size) {
|
|
206
190
|
val child = getChildAt(index) as? ExpoComposeView<*> ?: continue
|
|
207
|
-
|
|
208
|
-
with(child) {
|
|
209
|
-
Content()
|
|
210
|
-
}
|
|
211
|
-
}
|
|
191
|
+
child.Content(modifier = modifier)
|
|
212
192
|
}
|
|
213
193
|
}
|
|
214
194
|
}
|
|
@@ -25,7 +25,6 @@ import expo.modules.kotlin.types.Enumerable
|
|
|
25
25
|
import expo.modules.kotlin.viewevent.EventDispatcher
|
|
26
26
|
import expo.modules.kotlin.views.ComposeProps
|
|
27
27
|
import expo.modules.kotlin.views.ExpoComposeView
|
|
28
|
-
import expo.modules.kotlin.views.ComposableScope
|
|
29
28
|
import java.util.Calendar
|
|
30
29
|
import java.util.Date
|
|
31
30
|
import android.graphics.Color as AndroidColor
|
|
@@ -69,12 +68,12 @@ data class DateTimePickerProps(
|
|
|
69
68
|
@SuppressLint("ViewConstructor")
|
|
70
69
|
@OptIn(ExperimentalMaterial3Api::class)
|
|
71
70
|
class DateTimePickerView(context: Context, appContext: AppContext) :
|
|
72
|
-
ExpoComposeView<DateTimePickerProps>(context, appContext) {
|
|
71
|
+
ExpoComposeView<DateTimePickerProps>(context, appContext, withHostingView = true) {
|
|
73
72
|
override val props = DateTimePickerProps()
|
|
74
73
|
private val onDateSelected by EventDispatcher<DatePickerResult>()
|
|
75
74
|
|
|
76
75
|
@Composable
|
|
77
|
-
override fun
|
|
76
|
+
override fun Content(modifier: Modifier) {
|
|
78
77
|
if (props.displayedComponents.value == DisplayedComponents.HOUR_AND_MINUTE) {
|
|
79
78
|
ExpoTimePicker(props = props, modifier = Modifier.fromExpoModifiers(props.modifiers.value)) {
|
|
80
79
|
onDateSelected(it)
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
package expo.modules.ui
|
|
2
2
|
|
|
3
3
|
import android.graphics.Color
|
|
4
|
-
import androidx.compose.animation.animateContentSize
|
|
5
|
-
import androidx.compose.animation.core.Spring
|
|
6
|
-
import androidx.compose.animation.core.spring
|
|
7
4
|
import androidx.compose.foundation.BorderStroke
|
|
8
5
|
import androidx.compose.foundation.background
|
|
9
6
|
import androidx.compose.foundation.border
|
|
@@ -15,9 +12,9 @@ import androidx.compose.foundation.layout.size
|
|
|
15
12
|
import androidx.compose.ui.Modifier
|
|
16
13
|
import androidx.compose.ui.draw.alpha
|
|
17
14
|
import androidx.compose.ui.draw.blur
|
|
18
|
-
import androidx.compose.ui.draw.clip
|
|
19
15
|
import androidx.compose.ui.draw.rotate
|
|
20
16
|
import androidx.compose.ui.draw.shadow
|
|
17
|
+
import androidx.compose.ui.unit.Dp
|
|
21
18
|
import androidx.compose.ui.unit.dp
|
|
22
19
|
import androidx.compose.ui.zIndex
|
|
23
20
|
import expo.modules.kotlin.jni.JavaScriptFunction
|
|
@@ -42,10 +39,6 @@ class ExpoUIModule : Module() {
|
|
|
42
39
|
}
|
|
43
40
|
}
|
|
44
41
|
|
|
45
|
-
View(BottomSheetView::class) {
|
|
46
|
-
Events("onIsOpenedChange")
|
|
47
|
-
}
|
|
48
|
-
|
|
49
42
|
// Defines a single view for now – a single choice segmented control
|
|
50
43
|
View(PickerView::class) {
|
|
51
44
|
Events("onOptionSelected")
|
|
@@ -92,12 +85,10 @@ class ExpoUIModule : Module() {
|
|
|
92
85
|
}
|
|
93
86
|
}
|
|
94
87
|
|
|
95
|
-
View(BoxView::class)
|
|
96
88
|
View(RowView::class)
|
|
97
89
|
View(ColumnView::class)
|
|
98
|
-
View(
|
|
90
|
+
View(ContainerView::class)
|
|
99
91
|
View(TextView::class)
|
|
100
|
-
View(CarouselView::class)
|
|
101
92
|
|
|
102
93
|
View(AlertDialogView::class) {
|
|
103
94
|
Events(
|
|
@@ -113,12 +104,8 @@ class ExpoUIModule : Module() {
|
|
|
113
104
|
)
|
|
114
105
|
}
|
|
115
106
|
|
|
116
|
-
Function("
|
|
117
|
-
return@Function ExpoModifier(Modifier.padding(all.
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
Function("padding") { start: Int, top: Int, end: Int, bottom: Int ->
|
|
121
|
-
return@Function ExpoModifier(Modifier.padding(start.dp, top.dp, end.dp, bottom.dp))
|
|
107
|
+
Function("padding") { all: Int ->
|
|
108
|
+
return@Function ExpoModifier(Modifier.padding(Dp(all.toFloat())))
|
|
122
109
|
}
|
|
123
110
|
|
|
124
111
|
Function("size") { width: Int, height: Int ->
|
|
@@ -173,44 +160,6 @@ class ExpoUIModule : Module() {
|
|
|
173
160
|
return@Function ExpoModifier(Modifier.zIndex(index))
|
|
174
161
|
}
|
|
175
162
|
|
|
176
|
-
Function("animateContentSize") { dampingRatio: Float?, stiffness: Float? ->
|
|
177
|
-
return@Function ExpoModifier(
|
|
178
|
-
Modifier.animateContentSize(
|
|
179
|
-
spring(dampingRatio = dampingRatio ?: Spring.DampingRatioNoBouncy, stiffness = stiffness ?: Spring.StiffnessMedium)
|
|
180
|
-
)
|
|
181
|
-
)
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
Function("weight") { weight: Float ->
|
|
185
|
-
val scopedExpoModifier = ExpoModifier {
|
|
186
|
-
it.rowScope?.run {
|
|
187
|
-
Modifier.weight(weight)
|
|
188
|
-
} ?: it.columnScope?.run {
|
|
189
|
-
Modifier.weight(weight)
|
|
190
|
-
} ?: Modifier
|
|
191
|
-
}
|
|
192
|
-
return@Function scopedExpoModifier
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
Function("matchParentSize") {
|
|
196
|
-
val scopedExpoModifier = ExpoModifier {
|
|
197
|
-
it.boxScope?.run {
|
|
198
|
-
Modifier.matchParentSize()
|
|
199
|
-
} ?: Modifier
|
|
200
|
-
}
|
|
201
|
-
return@Function scopedExpoModifier
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
Function("testID") { testID: String ->
|
|
205
|
-
return@Function ExpoModifier(Modifier.applyTestTag(testID))
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
Function("clip") { shapeRecord: ShapeRecord ->
|
|
209
|
-
val shape = shapeFromShapeRecord(shapeRecord)
|
|
210
|
-
?: return@Function Modifier
|
|
211
|
-
return@Function ExpoModifier(Modifier.clip(shape))
|
|
212
|
-
}
|
|
213
|
-
|
|
214
163
|
// TODO: Consider implementing semantics, layoutId, clip, navigationBarsPadding, systemBarsPadding
|
|
215
164
|
}
|
|
216
165
|
}
|
|
@@ -1,44 +1,15 @@
|
|
|
1
1
|
package expo.modules.ui
|
|
2
2
|
|
|
3
|
-
import androidx.compose.ui.ExperimentalComposeUiApi
|
|
4
3
|
import androidx.compose.ui.Modifier
|
|
5
|
-
import androidx.compose.ui.platform.testTag
|
|
6
|
-
import androidx.compose.ui.semantics.semantics
|
|
7
|
-
import androidx.compose.ui.semantics.testTagsAsResourceId
|
|
8
4
|
import expo.modules.kotlin.sharedobjects.SharedRef
|
|
9
|
-
import expo.modules.kotlin.views.ComposableScope
|
|
10
5
|
|
|
11
|
-
class ExpoModifier(ref: Modifier?) : SharedRef<Modifier?>(ref)
|
|
12
|
-
var getFromScope: ((ComposableScope) -> Modifier)? = null
|
|
13
|
-
|
|
14
|
-
constructor(getFromScope: (ComposableScope) -> Modifier) : this(null) {
|
|
15
|
-
this.getFromScope = getFromScope
|
|
16
|
-
}
|
|
17
|
-
}
|
|
6
|
+
class ExpoModifier(ref: Modifier?) : SharedRef<Modifier?>(ref)
|
|
18
7
|
|
|
19
8
|
fun Modifier.fromExpoModifiers(
|
|
20
|
-
modifiers: List<ExpoModifier
|
|
21
|
-
composableScope: ComposableScope? = null
|
|
9
|
+
modifiers: List<ExpoModifier>
|
|
22
10
|
): Modifier {
|
|
23
|
-
return modifiers
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return@fold it.then(acc)
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
modifier.ref?.then(acc) ?: acc
|
|
30
|
-
} ?: Modifier
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/**
|
|
34
|
-
* Applies a test tag to a modifier if a testID is provided.
|
|
35
|
-
*/
|
|
36
|
-
@OptIn(ExperimentalComposeUiApi::class)
|
|
37
|
-
fun Modifier.applyTestTag(testID: String?): Modifier =
|
|
38
|
-
if (!testID.isNullOrEmpty()) {
|
|
39
|
-
this
|
|
40
|
-
.semantics { testTagsAsResourceId = true }
|
|
41
|
-
.testTag(testID)
|
|
42
|
-
} else {
|
|
43
|
-
this
|
|
11
|
+
return modifiers.fold(this) { acc, modifier ->
|
|
12
|
+
val ref = modifier.ref
|
|
13
|
+
ref?.let { acc.then(it) } ?: acc
|
|
44
14
|
}
|
|
15
|
+
}
|
|
@@ -29,7 +29,6 @@ import expo.modules.kotlin.records.Record
|
|
|
29
29
|
import expo.modules.kotlin.viewevent.EventDispatcher
|
|
30
30
|
import expo.modules.kotlin.views.ComposeProps
|
|
31
31
|
import expo.modules.kotlin.views.ExpoComposeView
|
|
32
|
-
import expo.modules.kotlin.views.ComposableScope
|
|
33
32
|
|
|
34
33
|
class PickerColors : Record {
|
|
35
34
|
@Field
|
|
@@ -79,12 +78,12 @@ data class PickerProps(
|
|
|
79
78
|
) : ComposeProps
|
|
80
79
|
|
|
81
80
|
class PickerView(context: Context, appContext: AppContext) :
|
|
82
|
-
ExpoComposeView<PickerProps>(context, appContext) {
|
|
81
|
+
ExpoComposeView<PickerProps>(context, appContext, withHostingView = true) {
|
|
83
82
|
override val props = PickerProps()
|
|
84
83
|
private val onOptionSelected by EventDispatcher()
|
|
85
84
|
|
|
86
85
|
@Composable
|
|
87
|
-
override fun
|
|
86
|
+
override fun Content(modifier: Modifier) {
|
|
88
87
|
val (selectedIndex) = props.selectedIndex
|
|
89
88
|
val (options) = props.options
|
|
90
89
|
val (colors) = props.elementColors
|
|
@@ -17,7 +17,6 @@ import expo.modules.kotlin.types.Enumerable
|
|
|
17
17
|
import expo.modules.kotlin.views.AutoSizingComposable
|
|
18
18
|
import expo.modules.kotlin.views.ComposeProps
|
|
19
19
|
import expo.modules.kotlin.views.Direction
|
|
20
|
-
import expo.modules.kotlin.views.ComposableScope
|
|
21
20
|
import java.util.EnumSet
|
|
22
21
|
|
|
23
22
|
enum class ProgressVariant(val value: String) : Enumerable {
|
|
@@ -39,11 +38,11 @@ data class ProgressProps(
|
|
|
39
38
|
) : ComposeProps
|
|
40
39
|
|
|
41
40
|
class ProgressView(context: Context, appContext: AppContext) :
|
|
42
|
-
ExpoComposeView<ProgressProps>(context, appContext) {
|
|
41
|
+
ExpoComposeView<ProgressProps>(context, appContext, withHostingView = true) {
|
|
43
42
|
override val props = ProgressProps()
|
|
44
43
|
|
|
45
44
|
@Composable
|
|
46
|
-
override fun
|
|
45
|
+
override fun Content(modifier: Modifier) {
|
|
47
46
|
val (variant) = props.variant
|
|
48
47
|
val (progress) = props.progress
|
|
49
48
|
val (color) = props.color
|
|
@@ -18,21 +18,14 @@ import androidx.compose.runtime.Composable
|
|
|
18
18
|
import androidx.compose.runtime.mutableIntStateOf
|
|
19
19
|
import androidx.compose.runtime.mutableStateOf
|
|
20
20
|
import androidx.compose.ui.geometry.Size
|
|
21
|
-
import androidx.compose.ui.graphics.Outline
|
|
22
21
|
import androidx.compose.ui.graphics.Path
|
|
23
|
-
import androidx.compose.ui.graphics.Shape
|
|
24
|
-
import androidx.compose.ui.unit.Density
|
|
25
|
-
import androidx.compose.ui.unit.LayoutDirection
|
|
26
22
|
import androidx.graphics.shapes.CornerRounding
|
|
27
23
|
import androidx.graphics.shapes.circle
|
|
28
24
|
import androidx.graphics.shapes.pill
|
|
29
25
|
import androidx.graphics.shapes.pillStar
|
|
30
26
|
import androidx.graphics.shapes.rectangle
|
|
31
27
|
import androidx.graphics.shapes.star
|
|
32
|
-
import expo.modules.kotlin.records.Field
|
|
33
|
-
import expo.modules.kotlin.records.Record
|
|
34
28
|
import expo.modules.kotlin.types.Enumerable
|
|
35
|
-
import expo.modules.kotlin.views.ComposableScope
|
|
36
29
|
import android.graphics.Color as GraphicsColor
|
|
37
30
|
|
|
38
31
|
enum class ShapeType(val value: String) : Enumerable {
|
|
@@ -124,55 +117,11 @@ private fun createRectanglePath(size: Size, cornerRounding: Float, smoothing: Fl
|
|
|
124
117
|
).toPath().asComposePath()
|
|
125
118
|
}
|
|
126
119
|
|
|
127
|
-
|
|
128
|
-
@Field
|
|
129
|
-
val cornerRounding: Float = 0.0f,
|
|
130
|
-
@Field
|
|
131
|
-
val smoothing: Float = 0.0f,
|
|
132
|
-
@Field
|
|
133
|
-
val verticesCount: Int = 6,
|
|
134
|
-
@Field
|
|
135
|
-
val innerRadius: Float = 0.0f,
|
|
136
|
-
@Field
|
|
137
|
-
val radius: Float = 0.0f,
|
|
138
|
-
@Field
|
|
139
|
-
val type: ShapeType = ShapeType.CIRCLE
|
|
140
|
-
) : Record
|
|
141
|
-
|
|
142
|
-
fun pathFromShapeRecord(record: ShapeRecord, size: Size): Path {
|
|
143
|
-
val cornerRounding = record.cornerRounding
|
|
144
|
-
val smoothing = record.smoothing
|
|
145
|
-
val innerRadius = record.innerRadius
|
|
146
|
-
val radius = record.radius
|
|
147
|
-
val shapeType = record.type
|
|
148
|
-
val verticesCount = record.verticesCount
|
|
149
|
-
return runCatching {
|
|
150
|
-
when (shapeType) {
|
|
151
|
-
ShapeType.STAR -> createStarPath(size = size, cornerRounding = cornerRounding, smoothing = smoothing, innerRadius = innerRadius, radius = radius, verticesCount = verticesCount)
|
|
152
|
-
ShapeType.PILL_STAR -> createPillStarPath(size = size, cornerRounding = cornerRounding, smoothing = smoothing, innerRadius = innerRadius, verticesCount = verticesCount)
|
|
153
|
-
ShapeType.PILL -> createPillPath(size = size, smoothing = smoothing)
|
|
154
|
-
ShapeType.CIRCLE -> createCirclePath(size = size, radius = radius, verticesCount = verticesCount)
|
|
155
|
-
ShapeType.RECTANGLE -> createRectanglePath(size = size, cornerRounding = cornerRounding, smoothing = smoothing)
|
|
156
|
-
ShapeType.POLYGON -> createPolygonPath(size = size, cornerRounding = cornerRounding, smoothing = smoothing, verticesCount = verticesCount)
|
|
157
|
-
}
|
|
158
|
-
}.getOrNull() ?: Path()
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
fun shapeFromShapeRecord(shapeRecord: ShapeRecord?): Shape? {
|
|
162
|
-
if (shapeRecord == null) return null
|
|
163
|
-
return object : Shape {
|
|
164
|
-
override fun createOutline(size: Size, layoutDirection: LayoutDirection, density: Density): Outline {
|
|
165
|
-
val path = pathFromShapeRecord(shapeRecord, size)
|
|
166
|
-
return Outline.Generic(path)
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
class ShapeView(context: Context, appContext: AppContext) : ExpoComposeView<ShapeProps>(context, appContext) {
|
|
120
|
+
class ShapeView(context: Context, appContext: AppContext) : ExpoComposeView<ShapeProps>(context, appContext, withHostingView = true) {
|
|
172
121
|
override val props = ShapeProps()
|
|
173
122
|
|
|
174
123
|
@Composable
|
|
175
|
-
override fun
|
|
124
|
+
override fun Content(modifier: Modifier) {
|
|
176
125
|
val (smoothing) = props.smoothing
|
|
177
126
|
val (cornerRounding) = props.cornerRounding
|
|
178
127
|
val (innerRadius) = props.innerRadius
|
|
@@ -181,20 +130,16 @@ class ShapeView(context: Context, appContext: AppContext) : ExpoComposeView<Shap
|
|
|
181
130
|
val (verticesCount) = props.verticesCount
|
|
182
131
|
val (color) = props.color
|
|
183
132
|
Box(
|
|
184
|
-
modifier = Modifier
|
|
185
|
-
.fromExpoModifiers(props.modifiers.value)
|
|
133
|
+
modifier = Modifier.fromExpoModifiers(props.modifiers.value)
|
|
186
134
|
.drawWithCache {
|
|
187
|
-
val path =
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
),
|
|
196
|
-
size
|
|
197
|
-
)
|
|
135
|
+
val path = when (shapeType) {
|
|
136
|
+
ShapeType.STAR -> createStarPath(size = size, cornerRounding = cornerRounding, smoothing = smoothing, innerRadius = innerRadius, radius = radius, verticesCount = verticesCount)
|
|
137
|
+
ShapeType.PILL_STAR -> createPillStarPath(size = size, cornerRounding = cornerRounding, smoothing = smoothing, innerRadius = innerRadius, verticesCount = verticesCount)
|
|
138
|
+
ShapeType.PILL -> createPillPath(size = size, smoothing = smoothing)
|
|
139
|
+
ShapeType.CIRCLE -> createCirclePath(size = size, radius = radius, verticesCount = verticesCount)
|
|
140
|
+
ShapeType.RECTANGLE -> createRectanglePath(size = size, cornerRounding = cornerRounding, smoothing = smoothing)
|
|
141
|
+
ShapeType.POLYGON -> createPolygonPath(size = size, cornerRounding = cornerRounding, smoothing = smoothing, verticesCount = verticesCount)
|
|
142
|
+
}
|
|
198
143
|
|
|
199
144
|
onDrawBehind {
|
|
200
145
|
drawPath(path, color = color.composeOrNull ?: Color.Transparent)
|