@expo/ui 1.0.0-canary-20250403-13261ac → 1.0.0-canary-20250404-87e2506
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 +1 -0
- package/android/build.gradle +2 -2
- package/expo-module.config.json +1 -7
- package/ios/BottomSheetView.swift +12 -8
- package/ios/Button/Button.swift +6 -2
- package/ios/ColorPickerView.swift +2 -2
- package/ios/ContextMenu/ContextMenu.swift +13 -13
- package/ios/DateTimePickerView.swift +6 -2
- package/ios/Gauge/Gauge.swift +6 -2
- package/ios/Label.swift +7 -2
- package/ios/List.swift +7 -2
- package/ios/PickerView.swift +6 -2
- package/ios/ProgressView.swift +6 -2
- package/ios/SectionView.swift +2 -2
- package/ios/SliderView.swift +6 -2
- package/ios/SwitchView.swift +6 -2
- package/ios/TextInput/TextInputView.swift +7 -2
- package/package.json +3 -4
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac-sources.jar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac-sources.jar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac-sources.jar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac-sources.jar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac-sources.jar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac.aar +0 -0
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac.aar.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac.aar.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac.aar.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac.aar.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac.module +0 -129
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac.module.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac.module.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac.module.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac.module.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac.pom +0 -71
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac.pom.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac.pom.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac.pom.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/1.0.0-canary-20250403-13261ac/expo.modules.ui-1.0.0-canary-20250403-13261ac.pom.sha512 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +0 -13
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +0 -1
- package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
- Drop section polyfill for Android ([#35305](https://github.com/expo/expo/pull/35305) by [@aleqsio](https://github.com/aleqsio))
|
|
32
32
|
- Standardize platform key ordering in `expo-module.config.json`. ([#35003](https://github.com/expo/expo/pull/35003) by [@reichhartd](https://github.com/reichhartd))
|
|
33
33
|
- Dismiss context menu when a menu item is tapped on Android ([#35365](https://github.com/expo/expo/pull/35365) by [@fobos531](https://github.com/fobos531))
|
|
34
|
+
- Migrated SwiftUI views with backward compatible `WithHostingView`. ([#35553](https://github.com/expo/expo/pull/35553) by [@kudo](https://github.com/kudo))
|
|
34
35
|
|
|
35
36
|
## 0.0.2 — 2025-02-11
|
|
36
37
|
|
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 = '
|
|
15
|
+
version = '0.0.2'
|
|
16
16
|
|
|
17
17
|
android {
|
|
18
18
|
namespace "expo.modules.ui"
|
|
19
19
|
defaultConfig {
|
|
20
20
|
versionCode 1
|
|
21
|
-
versionName "
|
|
21
|
+
versionName "0.0.2"
|
|
22
22
|
}
|
|
23
23
|
buildFeatures {
|
|
24
24
|
compose true
|
package/expo-module.config.json
CHANGED
|
@@ -4,12 +4,6 @@
|
|
|
4
4
|
"modules": ["ExpoUIModule"]
|
|
5
5
|
},
|
|
6
6
|
"android": {
|
|
7
|
-
"modules": ["expo.modules.ui.ExpoUIModule"]
|
|
8
|
-
"publication": {
|
|
9
|
-
"groupId": "expo.modules.ui",
|
|
10
|
-
"artifactId": "expo.modules.ui",
|
|
11
|
-
"version": "1.0.0-canary-20250403-13261ac",
|
|
12
|
-
"repository": "local-maven-repo"
|
|
13
|
-
}
|
|
7
|
+
"modules": ["expo.modules.ui.ExpoUIModule"]
|
|
14
8
|
}
|
|
15
9
|
}
|
|
@@ -31,23 +31,27 @@ private struct ReadHeightModifier: ViewModifier {
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
struct BottomSheetView: ExpoSwiftUI.View {
|
|
35
|
-
@
|
|
34
|
+
struct BottomSheetView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
|
|
35
|
+
@ObservedObject var props: BottomSheetProps
|
|
36
36
|
|
|
37
37
|
@State private var isOpened = true
|
|
38
38
|
@State var height: CGFloat = 0
|
|
39
39
|
|
|
40
|
+
init(props: BottomSheetProps) {
|
|
41
|
+
self.props = props
|
|
42
|
+
}
|
|
43
|
+
|
|
40
44
|
var body: some View {
|
|
41
45
|
if #available(iOS 16.0, tvOS 16.0, *) {
|
|
42
46
|
Rectangle().hidden()
|
|
47
|
+
.modifier(ReadHeightModifier())
|
|
48
|
+
.onPreferenceChange(HeightPreferenceKey.self) { height in
|
|
49
|
+
if let height {
|
|
50
|
+
self.height = height
|
|
51
|
+
}
|
|
52
|
+
}
|
|
43
53
|
.sheet(isPresented: $isOpened) {
|
|
44
54
|
Children()
|
|
45
|
-
.modifier(ReadHeightModifier())
|
|
46
|
-
.onPreferenceChange(HeightPreferenceKey.self) { height in
|
|
47
|
-
if let height {
|
|
48
|
-
self.height = height
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
55
|
.presentationDetents([.height(self.height)])
|
|
52
56
|
}
|
|
53
57
|
.onChange(of: isOpened, perform: { newIsOpened in
|
package/ios/Button/Button.swift
CHANGED
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
import SwiftUI
|
|
4
4
|
import ExpoModulesCore
|
|
5
5
|
|
|
6
|
-
struct Button: ExpoSwiftUI.View {
|
|
7
|
-
@
|
|
6
|
+
struct Button: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
|
|
7
|
+
@ObservedObject var props: ButtonProps
|
|
8
8
|
@EnvironmentObject var shadowNodeProxy: ExpoSwiftUI.ShadowNodeProxy
|
|
9
9
|
|
|
10
|
+
init(props: ButtonProps) {
|
|
11
|
+
self.props = props
|
|
12
|
+
}
|
|
13
|
+
|
|
10
14
|
var body: some View {
|
|
11
15
|
ExpoSwiftUI.AutoSizingStack(shadowNodeProxy: shadowNodeProxy, axis: .both) {
|
|
12
16
|
SwiftUI.Button(
|
|
@@ -10,8 +10,8 @@ class ColorPickerProps: ExpoSwiftUI.ViewProps {
|
|
|
10
10
|
var onValueChanged = EventDispatcher()
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
struct ColorPickerView: ExpoSwiftUI.View {
|
|
14
|
-
@
|
|
13
|
+
struct ColorPickerView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
|
|
14
|
+
@ObservedObject var props: ColorPickerProps
|
|
15
15
|
@State private var previousHex: String = ""
|
|
16
16
|
@State private var selection: Color = .clear
|
|
17
17
|
|
|
@@ -35,21 +35,21 @@ struct MenuItems: View {
|
|
|
35
35
|
var body: some View {
|
|
36
36
|
ForEach(fromElements ?? []) { elem in
|
|
37
37
|
if let button = elem.button {
|
|
38
|
-
ExpoUI.Button(
|
|
38
|
+
ExpoUI.Button(props: button)
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
if let picker = elem.picker {
|
|
42
|
-
ExpoUI.PickerView(
|
|
42
|
+
ExpoUI.PickerView(props: picker)
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
if let `switch` = elem.switch {
|
|
46
|
-
ExpoUI.SwitchView(
|
|
46
|
+
ExpoUI.SwitchView(props: `switch`).environmentObject(shadowNodeProxy)
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
if let submenu = elem.submenu {
|
|
50
50
|
SinglePressContextMenu(
|
|
51
51
|
elements: submenu.elements,
|
|
52
|
-
activationElement: ExpoUI.Button(
|
|
52
|
+
activationElement: ExpoUI.Button(props: submenu.button),
|
|
53
53
|
props: props
|
|
54
54
|
)
|
|
55
55
|
}
|
|
@@ -108,29 +108,29 @@ struct LongPressContextMenuWithPreview<ActivationElement: View, Preview: View>:
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
struct ContextMenuPreview: ExpoSwiftUI.View {
|
|
112
|
-
@
|
|
111
|
+
struct ContextMenuPreview: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
|
|
112
|
+
@ObservedObject var props: ContextMenuPreviewProps
|
|
113
113
|
|
|
114
114
|
var body: some View {
|
|
115
115
|
Children()
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
|
|
119
|
-
struct ContextMenuActivationElement: ExpoSwiftUI.View {
|
|
120
|
-
@
|
|
119
|
+
struct ContextMenuActivationElement: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
|
|
120
|
+
@ObservedObject var props: ContextMenuActivationElementProps
|
|
121
121
|
|
|
122
122
|
var body: some View {
|
|
123
123
|
Children()
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
struct ContextMenu: ExpoSwiftUI.View {
|
|
128
|
-
@
|
|
127
|
+
struct ContextMenu: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
|
|
128
|
+
@ObservedObject var props: ContextMenuProps
|
|
129
129
|
|
|
130
130
|
var body: some View {
|
|
131
131
|
if props.activationMethod == .singlePress {
|
|
132
132
|
let activationElement = props.children?.filter({
|
|
133
|
-
|
|
133
|
+
ExpoSwiftUI.isHostingViewOfType(view: $0, viewType: ContextMenuActivationElement.self)
|
|
134
134
|
})
|
|
135
135
|
SinglePressContextMenu(
|
|
136
136
|
elements: props.elements,
|
|
@@ -139,10 +139,10 @@ struct ContextMenu: ExpoSwiftUI.View {
|
|
|
139
139
|
)
|
|
140
140
|
} else {
|
|
141
141
|
let preview = props.children?.filter({
|
|
142
|
-
|
|
142
|
+
ExpoSwiftUI.isHostingViewOfType(view: $0, viewType: ContextMenuPreview.self)
|
|
143
143
|
})
|
|
144
144
|
let activationElement = props.children?.filter({
|
|
145
|
-
|
|
145
|
+
ExpoSwiftUI.isHostingViewOfType(view: $0, viewType: ContextMenuActivationElement.self)
|
|
146
146
|
})
|
|
147
147
|
if preview?.count ?? 0 > 0 {
|
|
148
148
|
LongPressContextMenuWithPreview(
|
|
@@ -10,11 +10,15 @@ class DateTimePickerProps: ExpoSwiftUI.ViewProps {
|
|
|
10
10
|
var onDateSelected = EventDispatcher()
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
struct DateTimePickerView: ExpoSwiftUI.View {
|
|
14
|
-
@
|
|
13
|
+
struct DateTimePickerView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
|
|
14
|
+
@ObservedObject var props: DateTimePickerProps
|
|
15
15
|
@EnvironmentObject var shadowNodeProxy: ExpoSwiftUI.ShadowNodeProxy
|
|
16
16
|
@State private var date = Date()
|
|
17
17
|
|
|
18
|
+
init(props: DateTimePickerProps) {
|
|
19
|
+
self.props = props
|
|
20
|
+
}
|
|
21
|
+
|
|
18
22
|
var body: some View {
|
|
19
23
|
#if os(tvOS)
|
|
20
24
|
return Text("DateTimePicker is not supported on tvOS")
|
package/ios/Gauge/Gauge.swift
CHANGED
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
import SwiftUI
|
|
4
4
|
import ExpoModulesCore
|
|
5
5
|
|
|
6
|
-
struct GaugeView: ExpoSwiftUI.View {
|
|
7
|
-
@
|
|
6
|
+
struct GaugeView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
|
|
7
|
+
@ObservedObject var props: GaugeProps
|
|
8
8
|
@EnvironmentObject var shadowNodeProxy: ExpoSwiftUI.ShadowNodeProxy
|
|
9
9
|
|
|
10
|
+
init(props: GaugeProps) {
|
|
11
|
+
self.props = props
|
|
12
|
+
}
|
|
13
|
+
|
|
10
14
|
var body: some View {
|
|
11
15
|
#if !os(tvOS)
|
|
12
16
|
if #available(iOS 16.0, *) {
|
package/ios/Label.swift
CHANGED
|
@@ -9,9 +9,14 @@ class LabelViewProps: ExpoSwiftUI.ViewProps {
|
|
|
9
9
|
@Field var color: Color?
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
struct LabelView: ExpoSwiftUI.View {
|
|
13
|
-
@
|
|
12
|
+
struct LabelView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
|
|
13
|
+
@ObservedObject var props: LabelViewProps
|
|
14
14
|
@EnvironmentObject var shadowNodeProxy: ExpoSwiftUI.ShadowNodeProxy
|
|
15
|
+
|
|
16
|
+
init(props: LabelViewProps) {
|
|
17
|
+
self.props = props
|
|
18
|
+
}
|
|
19
|
+
|
|
15
20
|
var body: some View {
|
|
16
21
|
ExpoSwiftUI.AutoSizingStack(shadowNodeProxy: shadowNodeProxy, axis: .both) {
|
|
17
22
|
Label(
|
package/ios/List.swift
CHANGED
|
@@ -15,11 +15,16 @@ class ListProps: ExpoSwiftUI.ViewProps {
|
|
|
15
15
|
var onSelectionChange = EventDispatcher()
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
struct ListView: ExpoSwiftUI.View {
|
|
19
|
-
@
|
|
18
|
+
struct ListView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
|
|
19
|
+
@ObservedObject var props: ListProps
|
|
20
20
|
@State private var selection: Set<Int> = []
|
|
21
21
|
@State var editModeEnabled: EditMode = .inactive
|
|
22
22
|
@State var search: String = ""
|
|
23
|
+
|
|
24
|
+
init(props: ListProps) {
|
|
25
|
+
self.props = props
|
|
26
|
+
}
|
|
27
|
+
|
|
23
28
|
var body: some View {
|
|
24
29
|
let list = List(selection: props.selectEnabled ? $selection : nil) {
|
|
25
30
|
UnwrappedChildren { child, isHostingView in
|
package/ios/PickerView.swift
CHANGED
|
@@ -12,12 +12,16 @@ class PickerProps: ExpoSwiftUI.ViewProps {
|
|
|
12
12
|
var onOptionSelected = EventDispatcher()
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
struct PickerView: ExpoSwiftUI.View {
|
|
15
|
+
struct PickerView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
|
|
16
16
|
@State var selection: Int = 0
|
|
17
17
|
@State var prevSelectedIndex: Int?
|
|
18
|
-
@
|
|
18
|
+
@ObservedObject var props: PickerProps
|
|
19
19
|
@EnvironmentObject var shadowNodeProxy: ExpoSwiftUI.ShadowNodeProxy
|
|
20
20
|
|
|
21
|
+
init(props: PickerProps) {
|
|
22
|
+
self.props = props
|
|
23
|
+
}
|
|
24
|
+
|
|
21
25
|
var body: some View {
|
|
22
26
|
if #available(iOS 17.0, tvOS 17.0, *) {
|
|
23
27
|
ExpoSwiftUI.AutoSizingStack(shadowNodeProxy: shadowNodeProxy) {
|
package/ios/ProgressView.swift
CHANGED
|
@@ -14,10 +14,14 @@ class ProgressProps: ExpoSwiftUI.ViewProps {
|
|
|
14
14
|
@Field var color: Color?
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
struct ProgressView: ExpoSwiftUI.View {
|
|
18
|
-
@
|
|
17
|
+
struct ProgressView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
|
|
18
|
+
@ObservedObject var props: ProgressProps
|
|
19
19
|
@EnvironmentObject var shadowNodeProxy: ExpoSwiftUI.ShadowNodeProxy
|
|
20
20
|
|
|
21
|
+
init(props: ProgressProps) {
|
|
22
|
+
self.props = props
|
|
23
|
+
}
|
|
24
|
+
|
|
21
25
|
var body: some View {
|
|
22
26
|
ExpoSwiftUI.AutoSizingStack(
|
|
23
27
|
shadowNodeProxy: shadowNodeProxy,
|
package/ios/SectionView.swift
CHANGED
|
@@ -10,8 +10,8 @@ class SectionProps: ExpoSwiftUI.ViewProps {
|
|
|
10
10
|
let IPAD_OFFSET: CGFloat = 30
|
|
11
11
|
let IPHONE_OFFSET: CGFloat = 40
|
|
12
12
|
|
|
13
|
-
struct SectionView: ExpoSwiftUI.View {
|
|
14
|
-
@
|
|
13
|
+
struct SectionView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
|
|
14
|
+
@ObservedObject var props: SectionProps
|
|
15
15
|
|
|
16
16
|
var body: some View {
|
|
17
17
|
let form = Form {
|
package/ios/SliderView.swift
CHANGED
|
@@ -21,10 +21,14 @@ func getStep(_ min: Float, _ max: Float, _ steps: Int) -> Float {
|
|
|
21
21
|
return (max - min) / Float(steps + 1)
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
struct SliderView: ExpoSwiftUI.View {
|
|
25
|
-
@
|
|
24
|
+
struct SliderView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
|
|
25
|
+
@ObservedObject var props: SliderProps
|
|
26
26
|
@State var value: Float = 0.0
|
|
27
27
|
|
|
28
|
+
init(props: SliderProps) {
|
|
29
|
+
self.props = props
|
|
30
|
+
}
|
|
31
|
+
|
|
28
32
|
var body: some View {
|
|
29
33
|
#if !os(tvOS)
|
|
30
34
|
Slider(value: $value, in: props.min...props.max, step: getStep(props.min, props.max, props.steps) )
|
package/ios/SwitchView.swift
CHANGED
|
@@ -11,11 +11,15 @@ class SwitchProps: ExpoSwiftUI.ViewProps {
|
|
|
11
11
|
var onValueChange = EventDispatcher()
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
struct SwitchView: ExpoSwiftUI.View {
|
|
15
|
-
@
|
|
14
|
+
struct SwitchView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
|
|
15
|
+
@ObservedObject var props: SwitchProps
|
|
16
16
|
@EnvironmentObject var shadowNodeProxy: ExpoSwiftUI.ShadowNodeProxy
|
|
17
17
|
@State var checked: Bool = false
|
|
18
18
|
|
|
19
|
+
init(props: SwitchProps) {
|
|
20
|
+
self.props = props
|
|
21
|
+
}
|
|
22
|
+
|
|
19
23
|
var body: some View {
|
|
20
24
|
ExpoSwiftUI.AutoSizingStack(shadowNodeProxy: shadowNodeProxy, axis: .both) {
|
|
21
25
|
Toggle(isOn: $checked, label: { props.label != nil ? Text(props.label ?? "") : nil })
|
|
@@ -50,10 +50,15 @@ func allowMultiLine() -> Bool {
|
|
|
50
50
|
#endif
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
struct TextInputView: ExpoSwiftUI.View {
|
|
54
|
-
@
|
|
53
|
+
struct TextInputView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
|
|
54
|
+
@ObservedObject var props: TextInputProps
|
|
55
55
|
@EnvironmentObject var shadowNodeProxy: ExpoSwiftUI.ShadowNodeProxy
|
|
56
56
|
@State private var value: String = ""
|
|
57
|
+
|
|
58
|
+
init(props: TextInputProps) {
|
|
59
|
+
self.props = props
|
|
60
|
+
}
|
|
61
|
+
|
|
57
62
|
var body: some View {
|
|
58
63
|
ExpoSwiftUI.AutoSizingStack(shadowNodeProxy: shadowNodeProxy, axis: .vertical) {
|
|
59
64
|
if #available(iOS 16.0, tvOS 16.0, *) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@expo/ui",
|
|
3
|
-
"version": "1.0.0-canary-
|
|
3
|
+
"version": "1.0.0-canary-20250404-87e2506",
|
|
4
4
|
"description": "A collection of UI components",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "expo-module build",
|
|
@@ -27,12 +27,11 @@
|
|
|
27
27
|
"dependencies": {},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/react": "~19.0.10",
|
|
30
|
-
"expo-module-scripts": "4.0.
|
|
30
|
+
"expo-module-scripts": "4.0.6-canary-20250404-87e2506"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"expo": "*",
|
|
34
34
|
"react": "*",
|
|
35
35
|
"react-native": "*"
|
|
36
|
-
}
|
|
37
|
-
"gitHead": "13261ac5856369e1ce42ef4c380d5af1d7a40392"
|
|
36
|
+
}
|
|
38
37
|
}
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
827813510f5daea5fd9a370e8defe9dc
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5905f8110e008d896ea83a743d14bb18ecd3c114
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
bc580bbabd4e610965ee63a54f6370c78a187e09efd13253100da1ab38df0a63
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3eb044ba2b8482cd3a9407bf91354510d02728ced583ac6739dc7a21916f29b11cf45db2c6b8593d5436b5f41b081407a9ced7bbc8dd07e8d92751825dfb47b9
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
a43c3073ebe299829cfcd8024bd111ef
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
5f0efa80907c54cb1f7403fc2e6bae5468d0ca74
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
fbe7808cd6dfbf479a8d348b4bef6cae735e56bb17397f8a8ae9b72d2e0aa6bf
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
ff74a71ddddb93d3554e1a7552d79483a9700d40f2dc7407f63d84de23cbdb63cecff2e41cc98415ccca7b69b66a9425b2f2e50d1bc7c49f03774af0554245f6
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"formatVersion": "1.1",
|
|
3
|
-
"component": {
|
|
4
|
-
"group": "expo.modules.ui",
|
|
5
|
-
"module": "expo.modules.ui",
|
|
6
|
-
"version": "1.0.0-canary-20250403-13261ac",
|
|
7
|
-
"attributes": {
|
|
8
|
-
"org.gradle.status": "release"
|
|
9
|
-
}
|
|
10
|
-
},
|
|
11
|
-
"createdBy": {
|
|
12
|
-
"gradle": {
|
|
13
|
-
"version": "8.13"
|
|
14
|
-
}
|
|
15
|
-
},
|
|
16
|
-
"variants": [
|
|
17
|
-
{
|
|
18
|
-
"name": "releaseVariantReleaseApiPublication",
|
|
19
|
-
"attributes": {
|
|
20
|
-
"org.gradle.category": "library",
|
|
21
|
-
"org.gradle.dependency.bundling": "external",
|
|
22
|
-
"org.gradle.libraryelements": "aar",
|
|
23
|
-
"org.gradle.usage": "java-api"
|
|
24
|
-
},
|
|
25
|
-
"files": [
|
|
26
|
-
{
|
|
27
|
-
"name": "expo.modules.ui-1.0.0-canary-20250403-13261ac.aar",
|
|
28
|
-
"url": "expo.modules.ui-1.0.0-canary-20250403-13261ac.aar",
|
|
29
|
-
"size": 172868,
|
|
30
|
-
"sha512": "ff74a71ddddb93d3554e1a7552d79483a9700d40f2dc7407f63d84de23cbdb63cecff2e41cc98415ccca7b69b66a9425b2f2e50d1bc7c49f03774af0554245f6",
|
|
31
|
-
"sha256": "fbe7808cd6dfbf479a8d348b4bef6cae735e56bb17397f8a8ae9b72d2e0aa6bf",
|
|
32
|
-
"sha1": "5f0efa80907c54cb1f7403fc2e6bae5468d0ca74",
|
|
33
|
-
"md5": "a43c3073ebe299829cfcd8024bd111ef"
|
|
34
|
-
}
|
|
35
|
-
]
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"name": "releaseVariantReleaseRuntimePublication",
|
|
39
|
-
"attributes": {
|
|
40
|
-
"org.gradle.category": "library",
|
|
41
|
-
"org.gradle.dependency.bundling": "external",
|
|
42
|
-
"org.gradle.libraryelements": "aar",
|
|
43
|
-
"org.gradle.usage": "java-runtime"
|
|
44
|
-
},
|
|
45
|
-
"dependencies": [
|
|
46
|
-
{
|
|
47
|
-
"group": "org.jetbrains.kotlin",
|
|
48
|
-
"module": "kotlin-stdlib-jdk7",
|
|
49
|
-
"version": {
|
|
50
|
-
"requires": "2.0.21"
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
"group": "androidx.compose.foundation",
|
|
55
|
-
"module": "foundation-android",
|
|
56
|
-
"version": {
|
|
57
|
-
"requires": "1.7.6"
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
"group": "androidx.compose.ui",
|
|
62
|
-
"module": "ui-android",
|
|
63
|
-
"version": {
|
|
64
|
-
"requires": "1.7.6"
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"group": "androidx.compose.material3",
|
|
69
|
-
"module": "material3",
|
|
70
|
-
"version": {
|
|
71
|
-
"requires": "1.3.1"
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"group": "androidx.lifecycle",
|
|
76
|
-
"module": "lifecycle-runtime",
|
|
77
|
-
"version": {
|
|
78
|
-
"requires": "2.8.7"
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
"group": "androidx.fragment",
|
|
83
|
-
"module": "fragment-ktx",
|
|
84
|
-
"version": {
|
|
85
|
-
"requires": "1.8.5"
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
"group": "androidx.compose.material3",
|
|
90
|
-
"module": "material3-android",
|
|
91
|
-
"version": {
|
|
92
|
-
"requires": "1.3.1"
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
],
|
|
96
|
-
"files": [
|
|
97
|
-
{
|
|
98
|
-
"name": "expo.modules.ui-1.0.0-canary-20250403-13261ac.aar",
|
|
99
|
-
"url": "expo.modules.ui-1.0.0-canary-20250403-13261ac.aar",
|
|
100
|
-
"size": 172868,
|
|
101
|
-
"sha512": "ff74a71ddddb93d3554e1a7552d79483a9700d40f2dc7407f63d84de23cbdb63cecff2e41cc98415ccca7b69b66a9425b2f2e50d1bc7c49f03774af0554245f6",
|
|
102
|
-
"sha256": "fbe7808cd6dfbf479a8d348b4bef6cae735e56bb17397f8a8ae9b72d2e0aa6bf",
|
|
103
|
-
"sha1": "5f0efa80907c54cb1f7403fc2e6bae5468d0ca74",
|
|
104
|
-
"md5": "a43c3073ebe299829cfcd8024bd111ef"
|
|
105
|
-
}
|
|
106
|
-
]
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
"name": "releaseVariantReleaseSourcePublication",
|
|
110
|
-
"attributes": {
|
|
111
|
-
"org.gradle.category": "documentation",
|
|
112
|
-
"org.gradle.dependency.bundling": "external",
|
|
113
|
-
"org.gradle.docstype": "sources",
|
|
114
|
-
"org.gradle.usage": "java-runtime"
|
|
115
|
-
},
|
|
116
|
-
"files": [
|
|
117
|
-
{
|
|
118
|
-
"name": "expo.modules.ui-1.0.0-canary-20250403-13261ac-sources.jar",
|
|
119
|
-
"url": "expo.modules.ui-1.0.0-canary-20250403-13261ac-sources.jar",
|
|
120
|
-
"size": 13238,
|
|
121
|
-
"sha512": "3eb044ba2b8482cd3a9407bf91354510d02728ced583ac6739dc7a21916f29b11cf45db2c6b8593d5436b5f41b081407a9ced7bbc8dd07e8d92751825dfb47b9",
|
|
122
|
-
"sha256": "bc580bbabd4e610965ee63a54f6370c78a187e09efd13253100da1ab38df0a63",
|
|
123
|
-
"sha1": "5905f8110e008d896ea83a743d14bb18ecd3c114",
|
|
124
|
-
"md5": "827813510f5daea5fd9a370e8defe9dc"
|
|
125
|
-
}
|
|
126
|
-
]
|
|
127
|
-
}
|
|
128
|
-
]
|
|
129
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
c5747cdbdb6574f6ec05e2ef21d58bc9
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0906175f18fa50bd434337487989c3cf9eea7518
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
2f591ee102793afbf8154f6c4a662d96b7141ddc1b8265b137f1eb7a45e1d41c
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
deed96288cddfbc6afc7e37a2f1a18d593b1d957130060c0dc2751de3ede8b127e2a29fcf0d179083146f0046a303325a4b66ea859607977c8016c4458834d46
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
|
3
|
-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
|
4
|
-
<!-- This module was also published with a richer model, Gradle metadata, -->
|
|
5
|
-
<!-- which should be used instead. Do not delete the following line which -->
|
|
6
|
-
<!-- is to indicate to Gradle or any Gradle module metadata file consumer -->
|
|
7
|
-
<!-- that they should prefer consuming it instead. -->
|
|
8
|
-
<!-- do_not_remove: published-with-gradle-metadata -->
|
|
9
|
-
<modelVersion>4.0.0</modelVersion>
|
|
10
|
-
<groupId>expo.modules.ui</groupId>
|
|
11
|
-
<artifactId>expo.modules.ui</artifactId>
|
|
12
|
-
<version>1.0.0-canary-20250403-13261ac</version>
|
|
13
|
-
<packaging>aar</packaging>
|
|
14
|
-
<name>expo.modules.ui</name>
|
|
15
|
-
<url>https://github.com/expo/expo</url>
|
|
16
|
-
<licenses>
|
|
17
|
-
<license>
|
|
18
|
-
<name>MIT License</name>
|
|
19
|
-
<url>https://github.com/expo/expo/blob/main/LICENSE</url>
|
|
20
|
-
</license>
|
|
21
|
-
</licenses>
|
|
22
|
-
<scm>
|
|
23
|
-
<connection>https://github.com/expo/expo.git</connection>
|
|
24
|
-
<developerConnection>https://github.com/expo/expo.git</developerConnection>
|
|
25
|
-
<url>https://github.com/expo/expo</url>
|
|
26
|
-
</scm>
|
|
27
|
-
<dependencies>
|
|
28
|
-
<dependency>
|
|
29
|
-
<groupId>org.jetbrains.kotlin</groupId>
|
|
30
|
-
<artifactId>kotlin-stdlib-jdk7</artifactId>
|
|
31
|
-
<version>2.0.21</version>
|
|
32
|
-
<scope>runtime</scope>
|
|
33
|
-
</dependency>
|
|
34
|
-
<dependency>
|
|
35
|
-
<groupId>androidx.compose.foundation</groupId>
|
|
36
|
-
<artifactId>foundation-android</artifactId>
|
|
37
|
-
<version>1.7.6</version>
|
|
38
|
-
<scope>runtime</scope>
|
|
39
|
-
</dependency>
|
|
40
|
-
<dependency>
|
|
41
|
-
<groupId>androidx.compose.ui</groupId>
|
|
42
|
-
<artifactId>ui-android</artifactId>
|
|
43
|
-
<version>1.7.6</version>
|
|
44
|
-
<scope>runtime</scope>
|
|
45
|
-
</dependency>
|
|
46
|
-
<dependency>
|
|
47
|
-
<groupId>androidx.compose.material3</groupId>
|
|
48
|
-
<artifactId>material3</artifactId>
|
|
49
|
-
<version>1.3.1</version>
|
|
50
|
-
<scope>runtime</scope>
|
|
51
|
-
</dependency>
|
|
52
|
-
<dependency>
|
|
53
|
-
<groupId>androidx.lifecycle</groupId>
|
|
54
|
-
<artifactId>lifecycle-runtime</artifactId>
|
|
55
|
-
<version>2.8.7</version>
|
|
56
|
-
<scope>runtime</scope>
|
|
57
|
-
</dependency>
|
|
58
|
-
<dependency>
|
|
59
|
-
<groupId>androidx.fragment</groupId>
|
|
60
|
-
<artifactId>fragment-ktx</artifactId>
|
|
61
|
-
<version>1.8.5</version>
|
|
62
|
-
<scope>runtime</scope>
|
|
63
|
-
</dependency>
|
|
64
|
-
<dependency>
|
|
65
|
-
<groupId>androidx.compose.material3</groupId>
|
|
66
|
-
<artifactId>material3-android</artifactId>
|
|
67
|
-
<version>1.3.1</version>
|
|
68
|
-
<scope>runtime</scope>
|
|
69
|
-
</dependency>
|
|
70
|
-
</dependencies>
|
|
71
|
-
</project>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
32ca5b74ad0db123d25471eb9a52e2dc
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
74365e86125a0c1d094af9003fefe323f81ed6ab
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
203a48b39cf11fee368c106fb922b74355471870d0a002bb256c9f31be2573f5
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
e68623faef0c51689e8d97e7e9e5dec8f796d49e45bc5826377511bf2f83304b525c856738d040531470bd7199b7166c72cc5bf2af0a27dc6c2825d300b9e0a3
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<metadata>
|
|
3
|
-
<groupId>expo.modules.ui</groupId>
|
|
4
|
-
<artifactId>expo.modules.ui</artifactId>
|
|
5
|
-
<versioning>
|
|
6
|
-
<latest>1.0.0-canary-20250403-13261ac</latest>
|
|
7
|
-
<release>1.0.0-canary-20250403-13261ac</release>
|
|
8
|
-
<versions>
|
|
9
|
-
<version>1.0.0-canary-20250403-13261ac</version>
|
|
10
|
-
</versions>
|
|
11
|
-
<lastUpdated>20250402223115</lastUpdated>
|
|
12
|
-
</versioning>
|
|
13
|
-
</metadata>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
63086fcd029fe400f20b2d982695e16c
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
59a4c5d640e666106bb6a8c23b898a7d23464d21
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
795f0f5117a38f721ed509060275927b6890dd7aa5db336dad3848d4833a1a44
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
372072a8797092331995cd9ed2813d6610f9d51e56f293736400c77c7cd8233df8deea913b54918344cf50600e4b579ffcaa044de46d9d9be1222a92dff05405
|