@expo/ui 56.0.15 → 56.0.16

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.
Files changed (97) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +14 -0
  4. package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +45 -0
  5. package/android/src/main/java/expo/modules/ui/NavigationBarView.kt +95 -0
  6. package/android/src/main/java/expo/modules/ui/TextFieldView.kt +34 -24
  7. package/build/jetpack-compose/NavigationBar/index.d.ts +101 -0
  8. package/build/jetpack-compose/NavigationBar/index.d.ts.map +1 -0
  9. package/build/jetpack-compose/index.d.ts +1 -0
  10. package/build/jetpack-compose/index.d.ts.map +1 -1
  11. package/build/jetpack-compose/modifiers/index.d.ts +31 -0
  12. package/build/jetpack-compose/modifiers/index.d.ts.map +1 -1
  13. package/build/swift-ui/DisclosureGroup/index.d.ts +11 -2
  14. package/build/swift-ui/DisclosureGroup/index.d.ts.map +1 -1
  15. package/build/swift-ui/Image/index.d.ts +4 -0
  16. package/build/swift-ui/Image/index.d.ts.map +1 -1
  17. package/build/swift-ui/Label/index.d.ts +5 -0
  18. package/build/swift-ui/Label/index.d.ts.map +1 -1
  19. package/build/swift-ui/modifiers/index.d.ts +68 -1
  20. package/build/swift-ui/modifiers/index.d.ts.map +1 -1
  21. package/build/universal/Collapsible/index.android.d.ts +1 -1
  22. package/build/universal/Collapsible/index.android.d.ts.map +1 -1
  23. package/build/universal/Collapsible/index.d.ts +1 -1
  24. package/build/universal/Collapsible/index.d.ts.map +1 -1
  25. package/build/universal/Collapsible/index.ios.d.ts +1 -1
  26. package/build/universal/Collapsible/index.ios.d.ts.map +1 -1
  27. package/build/universal/Collapsible/types.d.ts +5 -0
  28. package/build/universal/Collapsible/types.d.ts.map +1 -1
  29. package/build/universal/TextInput/index.android.d.ts.map +1 -1
  30. package/expo-module.config.json +1 -1
  31. package/ios/BottomSheetView.swift +1 -1
  32. package/ios/DisclosureGroupView.swift +36 -13
  33. package/ios/ImageView.swift +19 -9
  34. package/ios/Label.swift +26 -2
  35. package/ios/Modifiers/ButtonBorderShapeModifier.swift +46 -0
  36. package/ios/Modifiers/DynamicTypeSizeModifier.swift +56 -0
  37. package/ios/Modifiers/FontModifier.swift +4 -1
  38. package/ios/Modifiers/ViewModifierRegistry.swift +57 -8
  39. package/ios/SecureFieldView.swift +17 -1
  40. package/ios/TextFieldView.swift +33 -2
  41. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.15/expo.modules.ui-56.0.15-sources.jar → 56.0.16/expo.modules.ui-56.0.16-sources.jar} +0 -0
  42. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16-sources.jar.md5 +1 -0
  43. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16-sources.jar.sha1 +1 -0
  44. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16-sources.jar.sha256 +1 -0
  45. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16-sources.jar.sha512 +1 -0
  46. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.aar +0 -0
  47. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.aar.md5 +1 -0
  48. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.aar.sha1 +1 -0
  49. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.aar.sha256 +1 -0
  50. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.aar.sha512 +1 -0
  51. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.15/expo.modules.ui-56.0.15.module → 56.0.16/expo.modules.ui-56.0.16.module} +22 -22
  52. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.module.md5 +1 -0
  53. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.module.sha1 +1 -0
  54. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.module.sha256 +1 -0
  55. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.module.sha512 +1 -0
  56. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.15/expo.modules.ui-56.0.15.pom → 56.0.16/expo.modules.ui-56.0.16.pom} +1 -1
  57. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.pom.md5 +1 -0
  58. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.pom.sha1 +1 -0
  59. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.pom.sha256 +1 -0
  60. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.16/expo.modules.ui-56.0.16.pom.sha512 +1 -0
  61. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
  62. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
  63. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
  64. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
  65. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
  66. package/package.json +4 -4
  67. package/src/State/useNativeState.ts +0 -8
  68. package/src/community/segmented-control/SegmentedControl.ios.tsx +1 -1
  69. package/src/jetpack-compose/NavigationBar/index.tsx +174 -0
  70. package/src/jetpack-compose/index.ts +1 -0
  71. package/src/jetpack-compose/modifiers/index.ts +36 -0
  72. package/src/swift-ui/DisclosureGroup/index.tsx +14 -2
  73. package/src/swift-ui/Image/index.tsx +4 -0
  74. package/src/swift-ui/Label/index.tsx +8 -1
  75. package/src/swift-ui/modifiers/index.ts +101 -0
  76. package/src/universal/Collapsible/index.android.tsx +10 -2
  77. package/src/universal/Collapsible/index.ios.tsx +17 -3
  78. package/src/universal/Collapsible/index.tsx +8 -2
  79. package/src/universal/Collapsible/types.ts +7 -0
  80. package/src/universal/TextInput/index.android.tsx +31 -4
  81. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15-sources.jar.md5 +0 -1
  82. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15-sources.jar.sha1 +0 -1
  83. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15-sources.jar.sha256 +0 -1
  84. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15-sources.jar.sha512 +0 -1
  85. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.aar +0 -0
  86. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.aar.md5 +0 -1
  87. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.aar.sha1 +0 -1
  88. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.aar.sha256 +0 -1
  89. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.aar.sha512 +0 -1
  90. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.module.md5 +0 -1
  91. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.module.sha1 +0 -1
  92. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.module.sha256 +0 -1
  93. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.module.sha512 +0 -1
  94. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.pom.md5 +0 -1
  95. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.pom.sha1 +0 -1
  96. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.pom.sha256 +0 -1
  97. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.15/expo.modules.ui-56.0.15.pom.sha512 +0 -1
@@ -486,6 +486,26 @@ internal struct AccessibilityValueModifier: ViewModifier, Record {
486
486
  }
487
487
  }
488
488
 
489
+ internal struct AccessibilityIdentifierModifier: ViewModifier, Record {
490
+ @Field var identifier: String?
491
+
492
+ func body(content: Content) -> some View {
493
+ if let identifier = identifier {
494
+ content.accessibilityIdentifier(identifier)
495
+ } else {
496
+ content
497
+ }
498
+ }
499
+ }
500
+
501
+ internal struct AccessibilityHiddenModifier: ViewModifier, Record {
502
+ @Field var hidden: Bool = true
503
+
504
+ func body(content: Content) -> some View {
505
+ content.accessibilityHidden(hidden)
506
+ }
507
+ }
508
+
489
509
  internal struct LayoutPriorityModifier: ViewModifier, Record {
490
510
  @Field var priority: Double = 0
491
511
 
@@ -712,6 +732,22 @@ internal struct ListRowSeparator: ViewModifier, Record {
712
732
  }
713
733
  }
714
734
 
735
+ internal struct ListRowSpacing: ViewModifier, Record {
736
+ @Field var spacing: Double?
737
+
738
+ func body(content: Content) -> some View {
739
+ #if os(iOS)
740
+ if #available(iOS 15.0, *) {
741
+ content.listRowSpacing(spacing.map { CGFloat($0) })
742
+ } else {
743
+ content
744
+ }
745
+ #else
746
+ content
747
+ #endif
748
+ }
749
+ }
750
+
715
751
  internal enum TextTruncationModeTypes: String, Enumerable {
716
752
  case head
717
753
  case middle
@@ -1212,14 +1248,7 @@ public class ViewModifierRegistry {
1212
1248
  return text.monospacedDigit()
1213
1249
  case "font":
1214
1250
  guard let modifier = try? FontModifier(from: params, appContext: appContext) else { return text }
1215
- if let family = modifier.family {
1216
- return text.font(Font.custom(family, size: modifier.size ?? 17))
1217
- }
1218
- return text.font(.system(
1219
- size: modifier.size ?? 17,
1220
- weight: modifier.weight?.toSwiftUI() ?? .regular,
1221
- design: modifier.design?.toSwiftUI() ?? .default
1222
- ))
1251
+ return text.font(modifier.resolveFont())
1223
1252
  case "foregroundColor":
1224
1253
  guard let modifier = try? ForegroundColorModifier(from: params, appContext: appContext),
1225
1254
  let color = modifier.color else { return text }
@@ -1535,6 +1564,14 @@ extension ViewModifierRegistry {
1535
1564
  return try AccessibilityValueModifier(from: params, appContext: appContext)
1536
1565
  }
1537
1566
 
1567
+ register("accessibilityIdentifier") { params, appContext, _ in
1568
+ return try AccessibilityIdentifierModifier(from: params, appContext: appContext)
1569
+ }
1570
+
1571
+ register("accessibilityHidden") { params, appContext, _ in
1572
+ return try AccessibilityHiddenModifier(from: params, appContext: appContext)
1573
+ }
1574
+
1538
1575
  register("layoutPriority") { params, appContext, _ in
1539
1576
  return try LayoutPriorityModifier(from: params, appContext: appContext)
1540
1577
  }
@@ -1599,6 +1636,10 @@ extension ViewModifierRegistry {
1599
1636
  return try ButtonStyleModifier(from: params, appContext: appContext)
1600
1637
  }
1601
1638
 
1639
+ register("buttonBorderShape") { params, appContext, _ in
1640
+ return try ButtonBorderShapeModifier(from: params, appContext: appContext)
1641
+ }
1642
+
1602
1643
  register("toggleStyle") { params, appContext, _ in
1603
1644
  return try ToggleStyleModifier(from: params, appContext: appContext)
1604
1645
  }
@@ -1627,6 +1668,10 @@ extension ViewModifierRegistry {
1627
1668
  return try ListRowSeparator(from: params, appContext: appContext)
1628
1669
  }
1629
1670
 
1671
+ register("listRowSpacing") { params, appContext, _ in
1672
+ return try ListRowSpacing(from: params, appContext: appContext)
1673
+ }
1674
+
1630
1675
  register("truncationMode") { params, appContext, _ in
1631
1676
  return try TextTruncationMode(from: params, appContext: appContext)
1632
1677
  }
@@ -1703,6 +1748,10 @@ extension ViewModifierRegistry {
1703
1748
  return try FontModifier(from: params, appContext: appContext)
1704
1749
  }
1705
1750
 
1751
+ register("dynamicTypeSize") { params, appContext, _ in
1752
+ return try DynamicTypeSizeModifier(from: params, appContext: appContext)
1753
+ }
1754
+
1706
1755
  register("gridCellUnsizedAxes") { params, appContext, _ in
1707
1756
  return try GridCellUnsizedAxes(from: params, appContext: appContext)
1708
1757
  }
@@ -70,8 +70,22 @@ private struct StatefulSecureField: View {
70
70
  @FocusState.Binding var isFocused: Bool
71
71
  let promptText: Text?
72
72
 
73
+ // See `StatefulTextField.userMutatingState` in TextFieldView.swift.
74
+ @State private var userMutatingState = false
75
+
76
+ private var textBinding: Binding<String> {
77
+ Binding(
78
+ get: { (state.value as? String) ?? "" },
79
+ set: { newValue in
80
+ let current = (state.value as? String) ?? ""
81
+ guard newValue != current else { return }
82
+ userMutatingState = true
83
+ state.value = newValue
84
+ }
85
+ )
86
+ }
87
+
73
88
  var body: some View {
74
- let textBinding = state.binding("")
75
89
  SecureField(
76
90
  promptText == nil ? props.placeholder : "",
77
91
  text: textBinding,
@@ -84,10 +98,12 @@ private struct StatefulSecureField: View {
84
98
  }
85
99
  }
86
100
  .onChange(of: state.value as? String) { newValue in
101
+ guard userMutatingState else { return }
87
102
  if let max = props.maxLength, let str = newValue, str.count > max {
88
103
  state.value = String(str.prefix(max))
89
104
  return
90
105
  }
106
+ userMutatingState = false
91
107
  props.onTextChange(["value": newValue])
92
108
  props.onTextChangeSync?.invoke(arguments: [newValue])
93
109
  }
@@ -123,13 +123,27 @@ private struct StatefulTextField: View {
123
123
  @FocusState.Binding var isFocused: Bool
124
124
  let promptText: Text?
125
125
 
126
+ // True only while the current `state.value` change came from the user typing.
127
+ @State private var userMutatingState = false
128
+
126
129
  private var swiftUIAxis: Axis {
127
130
  props.axis == .vertical ? .vertical : .horizontal
128
131
  }
129
132
 
133
+ private var textBinding: Binding<String> {
134
+ Binding(
135
+ get: { (state.value as? String) ?? "" },
136
+ set: { newValue in
137
+ let current = (state.value as? String) ?? ""
138
+ guard newValue != current else { return }
139
+ userMutatingState = true
140
+ state.value = newValue
141
+ }
142
+ )
143
+ }
144
+
130
145
  @ViewBuilder
131
146
  var textField: some View {
132
- let textBinding = state.binding("")
133
147
  if #available(iOS 16.0, tvOS 16.0, *) {
134
148
  TextField(
135
149
  promptText == nil ? props.placeholder : "",
@@ -156,10 +170,12 @@ private struct StatefulTextField: View {
156
170
  }
157
171
  }
158
172
  .onChange(of: state.value as? String) { newValue in
173
+ guard userMutatingState else { return }
159
174
  if let max = props.maxLength, let str = newValue, str.count > max {
160
175
  state.value = String(str.prefix(max))
161
176
  return
162
177
  }
178
+ userMutatingState = false
163
179
  props.onTextChange(["value": newValue])
164
180
  props.onTextChangeSync?.invoke(arguments: [newValue])
165
181
  }
@@ -184,13 +200,26 @@ private struct StatefulSelectableTextField: View {
184
200
  let promptText: Text?
185
201
 
186
202
  @State private var localSelection: SwiftUI.TextSelection?
203
+ // See `StatefulTextField.userMutatingState`.
204
+ @State private var userMutatingState = false
187
205
 
188
206
  private var swiftUIAxis: Axis {
189
207
  props.axis == .vertical ? .vertical : .horizontal
190
208
  }
191
209
 
210
+ private var textBinding: Binding<String> {
211
+ Binding(
212
+ get: { (state.value as? String) ?? "" },
213
+ set: { newValue in
214
+ let current = (state.value as? String) ?? ""
215
+ guard newValue != current else { return }
216
+ userMutatingState = true
217
+ state.value = newValue
218
+ }
219
+ )
220
+ }
221
+
192
222
  var body: some View {
193
- let textBinding = state.binding("")
194
223
  TextField(
195
224
  promptText == nil ? props.placeholder : "",
196
225
  text: textBinding,
@@ -221,10 +250,12 @@ private struct StatefulSelectableTextField: View {
221
250
  props.onSelectionChange(["start": start, "end": end])
222
251
  }
223
252
  .onChange(of: state.value as? String) { newValue in
253
+ guard userMutatingState else { return }
224
254
  if let max = props.maxLength, let str = newValue, str.count > max {
225
255
  state.value = String(str.prefix(max))
226
256
  return
227
257
  }
258
+ userMutatingState = false
228
259
  props.onTextChange(["value": newValue])
229
260
  props.onTextChangeSync?.invoke(arguments: [newValue])
230
261
  }
@@ -0,0 +1 @@
1
+ 869fc2b13a7487be231ecffde437bf73d138786f9d20b04d843c59c2d95f376c
@@ -0,0 +1 @@
1
+ 84b9331a94360a66891a0d1d33f82f6b9e90df27e7b209774b02a9a3732dafa4d58bb800952273b60d2c3a4b5c102dbc03ac418bc6123c33b39da4c515f5c2ea
@@ -0,0 +1 @@
1
+ 12ad717dbdbff8ac4cf80073d6ce7996265718cc
@@ -0,0 +1 @@
1
+ d3b7205e40a307e5b1e4c3e9cb1a067fdef2c1b49984e9df3222448c856b55a2
@@ -0,0 +1 @@
1
+ 0a92657dee5473065082fc5fa71f484a728b7f3a1ef0a8a80144ae17a1c71fffc60a6dd98a8c9e932eca828a2258a29df0529f471a1c6ee4503bc0ff7f46705d
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "expo.modules.ui",
5
5
  "module": "expo.modules.ui",
6
- "version": "56.0.15",
6
+ "version": "56.0.16",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
@@ -24,13 +24,13 @@
24
24
  },
25
25
  "files": [
26
26
  {
27
- "name": "expo.modules.ui-56.0.15.aar",
28
- "url": "expo.modules.ui-56.0.15.aar",
29
- "size": 1839545,
30
- "sha512": "b0183591c16d8ba78c2d0e6aad2044b660811a5fb2126302a5f746dff169fc93fd4547d4c73ccf35bfefa083fde9819acbf3bb0fa4f6c80869e0d225880047a2",
31
- "sha256": "27c02acb624ed6593fe2380e495a636970bc9033ae9cd00132029c7b8ecf899e",
32
- "sha1": "7100e52679119435cf14936c7a715d729b763e16",
33
- "md5": "790df1c5a23dc1ac9a8521284af9bc15"
27
+ "name": "expo.modules.ui-56.0.16.aar",
28
+ "url": "expo.modules.ui-56.0.16.aar",
29
+ "size": 1884250,
30
+ "sha512": "0a92657dee5473065082fc5fa71f484a728b7f3a1ef0a8a80144ae17a1c71fffc60a6dd98a8c9e932eca828a2258a29df0529f471a1c6ee4503bc0ff7f46705d",
31
+ "sha256": "d3b7205e40a307e5b1e4c3e9cb1a067fdef2c1b49984e9df3222448c856b55a2",
32
+ "sha1": "12ad717dbdbff8ac4cf80073d6ce7996265718cc",
33
+ "md5": "86b861e8240bfa02ed19115b82f2191b"
34
34
  }
35
35
  ]
36
36
  },
@@ -141,13 +141,13 @@
141
141
  ],
142
142
  "files": [
143
143
  {
144
- "name": "expo.modules.ui-56.0.15.aar",
145
- "url": "expo.modules.ui-56.0.15.aar",
146
- "size": 1839545,
147
- "sha512": "b0183591c16d8ba78c2d0e6aad2044b660811a5fb2126302a5f746dff169fc93fd4547d4c73ccf35bfefa083fde9819acbf3bb0fa4f6c80869e0d225880047a2",
148
- "sha256": "27c02acb624ed6593fe2380e495a636970bc9033ae9cd00132029c7b8ecf899e",
149
- "sha1": "7100e52679119435cf14936c7a715d729b763e16",
150
- "md5": "790df1c5a23dc1ac9a8521284af9bc15"
144
+ "name": "expo.modules.ui-56.0.16.aar",
145
+ "url": "expo.modules.ui-56.0.16.aar",
146
+ "size": 1884250,
147
+ "sha512": "0a92657dee5473065082fc5fa71f484a728b7f3a1ef0a8a80144ae17a1c71fffc60a6dd98a8c9e932eca828a2258a29df0529f471a1c6ee4503bc0ff7f46705d",
148
+ "sha256": "d3b7205e40a307e5b1e4c3e9cb1a067fdef2c1b49984e9df3222448c856b55a2",
149
+ "sha1": "12ad717dbdbff8ac4cf80073d6ce7996265718cc",
150
+ "md5": "86b861e8240bfa02ed19115b82f2191b"
151
151
  }
152
152
  ]
153
153
  },
@@ -161,13 +161,13 @@
161
161
  },
162
162
  "files": [
163
163
  {
164
- "name": "expo.modules.ui-56.0.15-sources.jar",
165
- "url": "expo.modules.ui-56.0.15-sources.jar",
166
- "size": 87333,
167
- "sha512": "ba1daa456b3e0d92466af0c58b5ddd0bdd0a4c5f06c727bf7d34acd69e78c42187295b575199cefa3b2098d59eeb1ab6fcf2463c339fd6af2a186224a14f505d",
168
- "sha256": "01e5734d4e704ab1ff81ad1651eae63e0c5317dbba712328b1721270d303e0cf",
169
- "sha1": "cef9c4c1296a5c70d6a61965cba485c2dd802f47",
170
- "md5": "2cf329d52090d6202b7a70c1cb7c2a4b"
164
+ "name": "expo.modules.ui-56.0.16-sources.jar",
165
+ "url": "expo.modules.ui-56.0.16-sources.jar",
166
+ "size": 88918,
167
+ "sha512": "84b9331a94360a66891a0d1d33f82f6b9e90df27e7b209774b02a9a3732dafa4d58bb800952273b60d2c3a4b5c102dbc03ac418bc6123c33b39da4c515f5c2ea",
168
+ "sha256": "869fc2b13a7487be231ecffde437bf73d138786f9d20b04d843c59c2d95f376c",
169
+ "sha1": "4ed8efb025b6e6c393bc9c3f5f13f3c28bedda50",
170
+ "md5": "930e8ab7442da199117ed6e88be44b5b"
171
171
  }
172
172
  ]
173
173
  }
@@ -0,0 +1 @@
1
+ a5ec14f774ba7cbc4f094af1684ea54873600661
@@ -0,0 +1 @@
1
+ 47111fef1e88685da6b2a1018c17235ccf956aa41eb1f8d1fdde4cbe7df86f80
@@ -0,0 +1 @@
1
+ 9266793e40dca55e2a32d8aea44e3428f82f69f0c0d3f696de7fa38ab9ea5fdaabd237173b0a810e5920eebf3f1d132d38bb058d8ef27061220dccc8aff00727
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>expo.modules.ui</groupId>
11
11
  <artifactId>expo.modules.ui</artifactId>
12
- <version>56.0.15</version>
12
+ <version>56.0.16</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.ui</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -0,0 +1 @@
1
+ 49737ff4ff40390e2e7c5828b663ee45ab9556bc
@@ -0,0 +1 @@
1
+ 4932698b7ce04c8c5f3fabfbc39b79826395202f6c0cc3ab57f90ff1081a0208
@@ -0,0 +1 @@
1
+ ccd7c8e428bea422d337383c18e11ceefad80526b9b8fcf1daa4c5f55bb8008b3426dfaf3fe9ee49bbac0ba2eb347f520a0eee6cc3c8ee71af0ab3203a47ff0d
@@ -3,11 +3,11 @@
3
3
  <groupId>expo.modules.ui</groupId>
4
4
  <artifactId>expo.modules.ui</artifactId>
5
5
  <versioning>
6
- <latest>56.0.15</latest>
7
- <release>56.0.15</release>
6
+ <latest>56.0.16</latest>
7
+ <release>56.0.16</release>
8
8
  <versions>
9
- <version>56.0.15</version>
9
+ <version>56.0.16</version>
10
10
  </versions>
11
- <lastUpdated>20260529100208</lastUpdated>
11
+ <lastUpdated>20260605211303</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- b63599942a3f767839b2ab4661aa9f0b
1
+ 06d44b3caa511e0c357fa5a4b97c3867
@@ -1 +1 @@
1
- 5ed1689c481832ae81351f3296fa74efa0ad8104
1
+ 6b09b188d3943a03a462cc08d80212d62490d2b9
@@ -1 +1 @@
1
- 38ac5032a6f49787dcf8f493b77d9546a7d81a06288bac319a98bad6f79ec877
1
+ 680aeda3449ab8b21e06cec91465124d63053367f1be0fa5c6b005526a0eccf4
@@ -1 +1 @@
1
- 7138619d0626a7b454da7b4ffed89dcdc169737955a85beae665e23c404dae52117ae7f1857bdc186018c782c44da47e73912e80e635f2edf60a40cef085a5a9
1
+ 3a7cfc9313dacce167a1c0e9ff4519e357d5043205c6c16e47365cf5c5db3ea7b5660c5981e619f5e3d3f2079768975ba35d8eea6adb0d2bd9afd9543a4787d0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/ui",
3
- "version": "56.0.15",
3
+ "version": "56.0.16",
4
4
  "description": "A collection of UI components",
5
5
  "sideEffects": [
6
6
  "*.fx.js"
@@ -95,8 +95,8 @@
95
95
  "@types/react": "~19.2.0",
96
96
  "react-native-reanimated": "4.3.1",
97
97
  "react-native-worklets": "0.8.3",
98
- "expo": "56.0.7",
99
- "expo-module-scripts": "56.0.2"
98
+ "expo": "56.0.9",
99
+ "expo-module-scripts": "56.0.3"
100
100
  },
101
101
  "jest": {
102
102
  "preset": "expo-module-scripts"
@@ -124,7 +124,7 @@
124
124
  "optional": true
125
125
  }
126
126
  },
127
- "gitHead": "a7adc95c1747db1e92655feba56d0e62660098db",
127
+ "gitHead": "175f1e78e3444ca99ddea473faea6777a0656668",
128
128
  "scripts": {
129
129
  "build": "expo-module build",
130
130
  "clean": "expo-module clean",
@@ -71,19 +71,11 @@ type NativeObservableState = {
71
71
  * Adds a `value` property that delegates to the native `getValue`/`setValue` functions.
72
72
  */
73
73
  function defineValueProperty(state: NativeObservableState): void {
74
- let warnedOnJSWrite = false;
75
74
  Object.defineProperty(state, 'value', {
76
75
  get() {
77
76
  return state.getValue();
78
77
  },
79
78
  set(v: unknown) {
80
- if (__DEV__ && !warnedOnJSWrite && worklets && !worklets.isUIRuntime()) {
81
- warnedOnJSWrite = true;
82
- console.warn(
83
- 'ObservableState.value was set from the JS thread, the result may be unexpected. ' +
84
- 'Use a worklet to update the state.'
85
- );
86
- }
87
79
  state.setValue({ value: v });
88
80
  },
89
81
  });
@@ -35,7 +35,7 @@ export function SegmentedControl(props: SegmentedControlProps) {
35
35
  };
36
36
 
37
37
  return (
38
- <Host matchContents={{ vertical: true }} style={style}>
38
+ <Host matchContents={{ vertical: true }} style={style} ignoreSafeArea="all">
39
39
  <Picker
40
40
  selection={selectedIndex}
41
41
  onSelectionChange={handleSelectionChange}
@@ -0,0 +1,174 @@
1
+ import { requireNativeView } from 'expo';
2
+ import { type ColorValue } from 'react-native';
3
+
4
+ import { type ModifierConfig, type ViewEvent } from '../../types';
5
+ import { createViewModifierEventListener } from '../modifiers';
6
+
7
+ type SlotProps = {
8
+ children: React.ReactNode;
9
+ };
10
+
11
+ type NativeSlotViewProps = {
12
+ slotName: string;
13
+ children: React.ReactNode;
14
+ };
15
+
16
+ /**
17
+ * Colors for navigation bar items in different states.
18
+ */
19
+ export type NavigationBarItemColors = {
20
+ selectedIconColor?: ColorValue;
21
+ selectedTextColor?: ColorValue;
22
+ selectedIndicatorColor?: ColorValue;
23
+ unselectedIconColor?: ColorValue;
24
+ unselectedTextColor?: ColorValue;
25
+ disabledIconColor?: ColorValue;
26
+ disabledTextColor?: ColorValue;
27
+ };
28
+
29
+ export type NavigationBarProps = {
30
+ /**
31
+ * Background color of the navigation bar.
32
+ * @default NavigationBarDefaults.containerColor
33
+ */
34
+ containerColor?: ColorValue;
35
+ /**
36
+ * Preferred content color inside the navigation bar.
37
+ * @default contentColorFor(containerColor)
38
+ */
39
+ contentColor?: ColorValue;
40
+ /**
41
+ * Tonal elevation in dp.
42
+ * @default NavigationBarDefaults.Elevation
43
+ */
44
+ tonalElevation?: number;
45
+ /**
46
+ * Modifiers for the component.
47
+ */
48
+ modifiers?: ModifierConfig[];
49
+ /**
50
+ * Navigation bar items.
51
+ */
52
+ children?: React.ReactNode;
53
+ };
54
+
55
+ export type NavigationBarItemProps = {
56
+ /**
57
+ * Whether this item is currently selected.
58
+ */
59
+ selected: boolean;
60
+ /**
61
+ * Callback that is called when the item is clicked.
62
+ */
63
+ onClick?: () => void;
64
+ /**
65
+ * Whether the item is enabled.
66
+ * @default true
67
+ */
68
+ enabled?: boolean;
69
+ /**
70
+ * Whether to always show the label.
71
+ * @default true
72
+ */
73
+ alwaysShowLabel?: boolean;
74
+ /**
75
+ * Colors for the item in different states.
76
+ */
77
+ colors?: NavigationBarItemColors;
78
+ /**
79
+ * Modifiers for the component.
80
+ */
81
+ modifiers?: ModifierConfig[];
82
+ /**
83
+ * Children containing `Icon`, `SelectedIcon`, and `Label` slots.
84
+ */
85
+ children?: React.ReactNode;
86
+ };
87
+
88
+ type NativeNavigationBarItemProps = Omit<NavigationBarItemProps, 'onClick'> &
89
+ ViewEvent<'onButtonPressed', void>;
90
+
91
+ const NavigationBarNativeView: React.ComponentType<NavigationBarProps> = requireNativeView(
92
+ 'ExpoUI',
93
+ 'NavigationBarView'
94
+ );
95
+
96
+ const NavigationBarItemNativeView: React.ComponentType<NativeNavigationBarItemProps> =
97
+ requireNativeView('ExpoUI', 'NavigationBarItemView');
98
+
99
+ const SlotNativeView: React.ComponentType<NativeSlotViewProps> = requireNativeView(
100
+ 'ExpoUI',
101
+ 'SlotView'
102
+ );
103
+
104
+ function transformNavigationBarProps(props: NavigationBarProps): NavigationBarProps {
105
+ const { modifiers, ...restProps } = props;
106
+ return {
107
+ modifiers,
108
+ ...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
109
+ ...restProps,
110
+ };
111
+ }
112
+
113
+ function transformNavigationBarItemProps(
114
+ props: NavigationBarItemProps
115
+ ): NativeNavigationBarItemProps {
116
+ const { modifiers, onClick, ...restProps } = props;
117
+ return {
118
+ modifiers,
119
+ ...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
120
+ ...restProps,
121
+ onButtonPressed: () => onClick?.(),
122
+ };
123
+ }
124
+
125
+ /**
126
+ * Icon slot for `NavigationBarItem`.
127
+ */
128
+ function NavigationBarItemIcon(props: SlotProps) {
129
+ return <SlotNativeView slotName="icon">{props.children}</SlotNativeView>;
130
+ }
131
+
132
+ /**
133
+ * Selected icon slot for `NavigationBarItem`. Falls back to `Icon` when omitted.
134
+ */
135
+ function NavigationBarItemSelectedIcon(props: SlotProps) {
136
+ return <SlotNativeView slotName="selectedIcon">{props.children}</SlotNativeView>;
137
+ }
138
+
139
+ /**
140
+ * Label slot for `NavigationBarItem`.
141
+ */
142
+ function NavigationBarItemLabel(props: SlotProps) {
143
+ return <SlotNativeView slotName="label">{props.children}</SlotNativeView>;
144
+ }
145
+
146
+ /**
147
+ * A Material Design 3 navigation bar.
148
+ */
149
+ export function NavigationBar(props: NavigationBarProps) {
150
+ const { children, ...restProps } = props;
151
+ return (
152
+ <NavigationBarNativeView {...transformNavigationBarProps(restProps)}>
153
+ {children}
154
+ </NavigationBarNativeView>
155
+ );
156
+ }
157
+
158
+ /**
159
+ * A Material Design 3 navigation bar item. Must be used inside `NavigationBar`.
160
+ */
161
+ function NavigationBarItemComponent(props: NavigationBarItemProps) {
162
+ const { children, ...restProps } = props;
163
+ return (
164
+ <NavigationBarItemNativeView {...transformNavigationBarItemProps(restProps)}>
165
+ {children}
166
+ </NavigationBarItemNativeView>
167
+ );
168
+ }
169
+
170
+ NavigationBarItemComponent.Icon = NavigationBarItemIcon;
171
+ NavigationBarItemComponent.SelectedIcon = NavigationBarItemSelectedIcon;
172
+ NavigationBarItemComponent.Label = NavigationBarItemLabel;
173
+
174
+ export { NavigationBarItemComponent as NavigationBarItem };
@@ -41,6 +41,7 @@ export {
41
41
  export * from './ToggleButton';
42
42
  export * from './Shape';
43
43
  export * from './ModalBottomSheet';
44
+ export * from './NavigationBar';
44
45
  export * from './Carousel';
45
46
  export {
46
47
  HorizontalPager,