@expo/ui 55.0.1 → 55.0.3

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 (269) hide show
  1. package/CHANGELOG.md +58 -0
  2. package/CONTRIBUTING.md +30 -0
  3. package/android/build.gradle +2 -2
  4. package/android/src/main/java/expo/modules/ui/AnimatedVisibilityView.kt +130 -0
  5. package/android/src/main/java/expo/modules/ui/CardView.kt +138 -34
  6. package/android/src/main/java/expo/modules/ui/CheckboxView.kt +98 -0
  7. package/android/src/main/java/expo/modules/ui/ChipView.kt +267 -142
  8. package/android/src/main/java/expo/modules/ui/DatePickerView.kt +302 -31
  9. package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +204 -57
  10. package/android/src/main/java/expo/modules/ui/HorizontalFloatingToolbarView.kt +21 -8
  11. package/android/src/main/java/expo/modules/ui/ModifierRegistry.kt +149 -40
  12. package/android/src/main/java/expo/modules/ui/ProgressView.kt +189 -89
  13. package/android/src/main/java/expo/modules/ui/RNHostView.kt +204 -50
  14. package/android/src/main/java/expo/modules/ui/RadioButtonView.kt +3 -7
  15. package/android/src/main/java/expo/modules/ui/SegmentedButtonView.kt +115 -0
  16. package/android/src/main/java/expo/modules/ui/SegmentedControlView.kt +35 -0
  17. package/android/src/main/java/expo/modules/ui/SliderView.kt +70 -12
  18. package/android/src/main/java/expo/modules/ui/SwitchView.kt +62 -104
  19. package/android/src/main/java/expo/modules/ui/ToggleButtonView.kt +95 -57
  20. package/android/src/main/java/expo/modules/ui/button/Button.kt +117 -158
  21. package/android/src/main/java/expo/modules/ui/button/FloatingActionButton.kt +92 -0
  22. package/android/src/main/java/expo/modules/ui/button/IconButton.kt +73 -80
  23. package/android/src/main/java/expo/modules/ui/convertibles/AnimatableFloat.kt +26 -0
  24. package/android/src/main/java/expo/modules/ui/convertibles/AnimationSpecParams.kt +93 -0
  25. package/android/src/main/java/expo/modules/ui/convertibles/GraphicsLayerParams.kt +24 -0
  26. package/android/src/main/java/expo/modules/ui/menu/DropdownMenu.kt +39 -0
  27. package/android/src/main/java/expo/modules/ui/menu/DropdownMenuItem.kt +70 -0
  28. package/android/src/main/java/expo/modules/ui/menu/DropdownMenuRecords.kt +18 -0
  29. package/build/jetpack-compose/AnimatedVisibility/index.d.ts +134 -0
  30. package/build/jetpack-compose/AnimatedVisibility/index.d.ts.map +1 -0
  31. package/build/jetpack-compose/AnimatedVisibility/symbols.d.ts +3 -0
  32. package/build/jetpack-compose/AnimatedVisibility/symbols.d.ts.map +1 -0
  33. package/build/jetpack-compose/Button/index.d.ts +65 -51
  34. package/build/jetpack-compose/Button/index.d.ts.map +1 -1
  35. package/build/jetpack-compose/Card/index.d.ts +72 -14
  36. package/build/jetpack-compose/Card/index.d.ts.map +1 -1
  37. package/build/jetpack-compose/Checkbox/index.d.ts +73 -0
  38. package/build/jetpack-compose/Checkbox/index.d.ts.map +1 -0
  39. package/build/jetpack-compose/Chip/index.d.ts +247 -27
  40. package/build/jetpack-compose/Chip/index.d.ts.map +1 -1
  41. package/build/jetpack-compose/DatePicker/index.d.ts +137 -3
  42. package/build/jetpack-compose/DatePicker/index.d.ts.map +1 -1
  43. package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts +70 -0
  44. package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts.map +1 -0
  45. package/build/jetpack-compose/DropdownMenu/index.d.ts +68 -0
  46. package/build/jetpack-compose/DropdownMenu/index.d.ts.map +1 -0
  47. package/build/jetpack-compose/FloatingActionButton/index.d.ts +150 -0
  48. package/build/jetpack-compose/FloatingActionButton/index.d.ts.map +1 -0
  49. package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts +2 -2
  50. package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts.map +1 -1
  51. package/build/jetpack-compose/IconButton/index.d.ts +45 -29
  52. package/build/jetpack-compose/IconButton/index.d.ts.map +1 -1
  53. package/build/jetpack-compose/MultiChoiceSegmentedButtonRow/index.d.ts +17 -0
  54. package/build/jetpack-compose/MultiChoiceSegmentedButtonRow/index.d.ts.map +1 -0
  55. package/build/jetpack-compose/Progress/index.d.ts +78 -35
  56. package/build/jetpack-compose/Progress/index.d.ts.map +1 -1
  57. package/build/jetpack-compose/RadioButton/index.d.ts +2 -2
  58. package/build/jetpack-compose/RadioButton/index.d.ts.map +1 -1
  59. package/build/jetpack-compose/SegmentedButton/index.d.ts +74 -0
  60. package/build/jetpack-compose/SegmentedButton/index.d.ts.map +1 -0
  61. package/build/jetpack-compose/SingleChoiceSegmentedButtonRow/index.d.ts +17 -0
  62. package/build/jetpack-compose/SingleChoiceSegmentedButtonRow/index.d.ts.map +1 -0
  63. package/build/jetpack-compose/Slider/index.d.ts +34 -10
  64. package/build/jetpack-compose/Slider/index.d.ts.map +1 -1
  65. package/build/jetpack-compose/Spacer/index.d.ts +2 -2
  66. package/build/jetpack-compose/Switch/index.d.ts +25 -47
  67. package/build/jetpack-compose/Switch/index.d.ts.map +1 -1
  68. package/build/jetpack-compose/ToggleButton/index.d.ts +60 -32
  69. package/build/jetpack-compose/ToggleButton/index.d.ts.map +1 -1
  70. package/build/jetpack-compose/index.d.ts +5 -4
  71. package/build/jetpack-compose/index.d.ts.map +1 -1
  72. package/build/jetpack-compose/modifiers/animation.d.ts +44 -0
  73. package/build/jetpack-compose/modifiers/animation.d.ts.map +1 -0
  74. package/build/jetpack-compose/modifiers/index.d.ts +68 -4
  75. package/build/jetpack-compose/modifiers/index.d.ts.map +1 -1
  76. package/build/swift-ui/AccessoryWidgetBackground/index.d.ts +4 -0
  77. package/build/swift-ui/AccessoryWidgetBackground/index.d.ts.map +1 -0
  78. package/build/swift-ui/ConfirmationDialog/index.d.ts.map +1 -1
  79. package/build/swift-ui/ContextMenu/index.d.ts.map +1 -1
  80. package/build/swift-ui/ControlGroup/index.d.ts +29 -0
  81. package/build/swift-ui/ControlGroup/index.d.ts.map +1 -0
  82. package/build/swift-ui/Gauge/index.d.ts.map +1 -1
  83. package/build/swift-ui/Image/index.d.ts +7 -1
  84. package/build/swift-ui/Image/index.d.ts.map +1 -1
  85. package/build/swift-ui/Label/index.d.ts.map +1 -1
  86. package/build/swift-ui/LabeledContent/index.d.ts.map +1 -1
  87. package/build/swift-ui/Menu/index.d.ts.map +1 -1
  88. package/build/swift-ui/Picker/index.d.ts.map +1 -1
  89. package/build/swift-ui/Popover/index.d.ts.map +1 -1
  90. package/build/swift-ui/ProgressView/index.d.ts +1 -5
  91. package/build/swift-ui/ProgressView/index.d.ts.map +1 -1
  92. package/build/swift-ui/Section/index.d.ts.map +1 -1
  93. package/build/swift-ui/Slider/index.d.ts.map +1 -1
  94. package/build/swift-ui/SlotView.d.ts +5 -0
  95. package/build/swift-ui/SlotView.d.ts.map +1 -0
  96. package/build/swift-ui/Stepper/index.d.ts +3 -3
  97. package/build/swift-ui/Stepper/index.d.ts.map +1 -1
  98. package/build/swift-ui/Text/index.d.ts +33 -1
  99. package/build/swift-ui/Text/index.d.ts.map +1 -1
  100. package/build/swift-ui/index.d.ts +2 -0
  101. package/build/swift-ui/index.d.ts.map +1 -1
  102. package/build/swift-ui/modifiers/index.d.ts +54 -1
  103. package/build/swift-ui/modifiers/index.d.ts.map +1 -1
  104. package/build/swift-ui/modifiers/shapes/index.d.ts +2 -2
  105. package/build/swift-ui/types.d.ts +7 -0
  106. package/build/swift-ui/types.d.ts.map +1 -1
  107. package/expo-module.config.json +1 -1
  108. package/ios/AccessoryWidgetBackgroundView.swift +27 -0
  109. package/ios/BottomSheetView.swift +1 -6
  110. package/ios/ClosedRangeDateRecord.swift +10 -0
  111. package/ios/ColorPickerView.swift +9 -8
  112. package/ios/ConfirmationDialog/ConfirmationDialog.swift +7 -15
  113. package/ios/ConfirmationDialog/ConfirmationDialogProps.swift +0 -5
  114. package/ios/ContextMenu/ContextMenu.swift +27 -22
  115. package/ios/ContextMenu/ContextMenuRecords.swift +0 -6
  116. package/ios/ControlGroupView.swift +33 -0
  117. package/ios/DatePickerView.swift +7 -5
  118. package/ios/DisclosureGroupView.swift +5 -7
  119. package/ios/ExpoUIModule.swift +10 -32
  120. package/ios/GaugeView.swift +4 -26
  121. package/ios/HostView.swift +1 -2
  122. package/ios/ImageView.swift +22 -11
  123. package/ios/Label.swift +2 -17
  124. package/ios/LabeledContentView.swift +3 -27
  125. package/ios/ListView.swift +6 -14
  126. package/ios/Menu/MenuRecords.swift +0 -2
  127. package/ios/Menu/MenuView.swift +2 -5
  128. package/ios/Modifiers/DefaultScrollAnchorForRoleModifier.swift +32 -0
  129. package/ios/Modifiers/DefaultScrollAnchorModifier.swift +16 -0
  130. package/ios/Modifiers/ResizableModifier.swift +24 -0
  131. package/ios/Modifiers/Rotation3DEffectModifier.swift +20 -0
  132. package/ios/Modifiers/View+ModifierArray.swift +29 -0
  133. package/ios/Modifiers/ViewModifierRegistry.swift +37 -3
  134. package/ios/Modifiers/WidgetModifiers.swift +46 -0
  135. package/ios/Picker/PickerView.swift +8 -16
  136. package/ios/Popover/PopoverProps.swift +0 -4
  137. package/ios/Popover/PopoverView.swift +5 -11
  138. package/ios/ProgressView.swift +0 -5
  139. package/ios/RNHostView.swift +91 -10
  140. package/ios/SectionView.swift +9 -17
  141. package/ios/SecureFieldView.swift +0 -1
  142. package/ios/ShareLink/ShareLinkView.swift +1 -1
  143. package/ios/SliderView.swift +16 -31
  144. package/ios/SlotView.swift +38 -0
  145. package/ios/StepperView.swift +12 -16
  146. package/ios/TextFieldView.swift +0 -1
  147. package/ios/TextView.swift +37 -1
  148. package/ios/Toggle/ToggleView.swift +5 -7
  149. package/ios/UIBaseView.swift +34 -3
  150. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar +0 -0
  151. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.md5 +1 -0
  152. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.sha1 +1 -0
  153. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.sha256 +1 -0
  154. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3-sources.jar.sha512 +1 -0
  155. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar +0 -0
  156. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.md5 +1 -0
  157. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.sha1 +1 -0
  158. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.sha256 +1 -0
  159. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.aar.sha512 +1 -0
  160. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.1/expo.modules.ui-55.0.1.module → 55.0.3/expo.modules.ui-55.0.3.module} +22 -22
  161. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.md5 +1 -0
  162. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha1 +1 -0
  163. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha256 +1 -0
  164. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.module.sha512 +1 -0
  165. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{55.0.1/expo.modules.ui-55.0.1.pom → 55.0.3/expo.modules.ui-55.0.3.pom} +1 -1
  166. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.md5 +1 -0
  167. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.sha1 +1 -0
  168. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.sha256 +1 -0
  169. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.3/expo.modules.ui-55.0.3.pom.sha512 +1 -0
  170. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
  171. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
  172. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
  173. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
  174. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
  175. package/package.json +5 -2
  176. package/src/jetpack-compose/AnimatedVisibility/index.tsx +206 -0
  177. package/src/jetpack-compose/AnimatedVisibility/symbols.ts +8 -0
  178. package/src/jetpack-compose/Button/index.tsx +69 -92
  179. package/src/jetpack-compose/Card/index.tsx +105 -29
  180. package/src/jetpack-compose/Checkbox/index.tsx +126 -0
  181. package/src/jetpack-compose/Chip/index.tsx +391 -51
  182. package/src/jetpack-compose/DatePicker/index.tsx +215 -6
  183. package/src/jetpack-compose/DropdownMenu/DropdownMenuItem.tsx +126 -0
  184. package/src/jetpack-compose/DropdownMenu/index.tsx +107 -0
  185. package/src/jetpack-compose/FloatingActionButton/index.tsx +207 -0
  186. package/src/jetpack-compose/HorizontalFloatingToolbar/index.tsx +4 -2
  187. package/src/jetpack-compose/IconButton/index.tsx +49 -56
  188. package/src/jetpack-compose/MultiChoiceSegmentedButtonRow/index.tsx +34 -0
  189. package/src/jetpack-compose/Progress/index.tsx +120 -62
  190. package/src/jetpack-compose/RadioButton/index.tsx +8 -9
  191. package/src/jetpack-compose/SegmentedButton/index.tsx +109 -0
  192. package/src/jetpack-compose/SingleChoiceSegmentedButtonRow/index.tsx +34 -0
  193. package/src/jetpack-compose/Slider/index.tsx +76 -29
  194. package/src/jetpack-compose/Spacer/index.tsx +2 -2
  195. package/src/jetpack-compose/Switch/index.tsx +32 -84
  196. package/src/jetpack-compose/ToggleButton/index.tsx +67 -43
  197. package/src/jetpack-compose/index.ts +5 -4
  198. package/src/jetpack-compose/modifiers/animation.ts +37 -0
  199. package/src/jetpack-compose/modifiers/index.ts +86 -6
  200. package/src/swift-ui/AccessoryWidgetBackground/index.tsx +12 -0
  201. package/src/swift-ui/ConfirmationDialog/index.tsx +4 -12
  202. package/src/swift-ui/ContextMenu/index.tsx +6 -20
  203. package/src/swift-ui/ControlGroup/index.tsx +59 -0
  204. package/src/swift-ui/Gauge/index.tsx +5 -20
  205. package/src/swift-ui/Image/index.tsx +7 -1
  206. package/src/swift-ui/Label/index.tsx +2 -5
  207. package/src/swift-ui/LabeledContent/index.tsx +3 -12
  208. package/src/swift-ui/Menu/index.tsx +2 -6
  209. package/src/swift-ui/Picker/index.tsx +4 -11
  210. package/src/swift-ui/Popover/index.tsx +3 -12
  211. package/src/swift-ui/ProgressView/index.tsx +1 -3
  212. package/src/swift-ui/Section/index.tsx +4 -9
  213. package/src/swift-ui/Slider/index.tsx +4 -12
  214. package/src/swift-ui/SlotView.tsx +8 -0
  215. package/src/swift-ui/Stepper/index.tsx +7 -7
  216. package/src/swift-ui/Text/index.tsx +66 -2
  217. package/src/swift-ui/index.tsx +2 -0
  218. package/src/swift-ui/modifiers/index.ts +87 -1
  219. package/src/swift-ui/types.ts +5 -0
  220. package/android/src/main/java/expo/modules/ui/FilterChipView.kt +0 -59
  221. package/android/src/main/java/expo/modules/ui/PickerView.kt +0 -161
  222. package/android/src/main/java/expo/modules/ui/TextButtonView.kt +0 -33
  223. package/android/src/main/java/expo/modules/ui/menu/ContextMenu.kt +0 -183
  224. package/android/src/main/java/expo/modules/ui/menu/ContextMenuRecords.kt +0 -64
  225. package/build/jetpack-compose/Button/types.d.ts +0 -5
  226. package/build/jetpack-compose/Button/types.d.ts.map +0 -1
  227. package/build/jetpack-compose/ContextMenu/Submenu.d.ts +0 -17
  228. package/build/jetpack-compose/ContextMenu/Submenu.d.ts.map +0 -1
  229. package/build/jetpack-compose/ContextMenu/index.d.ts +0 -65
  230. package/build/jetpack-compose/ContextMenu/index.d.ts.map +0 -1
  231. package/build/jetpack-compose/ContextMenu/utils.d.ts +0 -24
  232. package/build/jetpack-compose/ContextMenu/utils.d.ts.map +0 -1
  233. package/build/jetpack-compose/FilterChip/index.d.ts +0 -49
  234. package/build/jetpack-compose/FilterChip/index.d.ts.map +0 -1
  235. package/build/jetpack-compose/Picker/index.d.ts +0 -62
  236. package/build/jetpack-compose/Picker/index.d.ts.map +0 -1
  237. package/build/jetpack-compose/TextButton/index.d.ts +0 -29
  238. package/build/jetpack-compose/TextButton/index.d.ts.map +0 -1
  239. package/ios/ConfirmationDialog/ConfirmationDialogComponents.swift +0 -26
  240. package/ios/ContextMenu/ContextMenuComponents.swift +0 -37
  241. package/ios/Menu/MenuComponents.swift +0 -12
  242. package/ios/Picker/PickerComponents.swift +0 -24
  243. package/ios/Popover/PopoverComponents.swift +0 -18
  244. package/ios/SectionComponents.swift +0 -34
  245. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1-sources.jar +0 -0
  246. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1-sources.jar.md5 +0 -1
  247. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1-sources.jar.sha1 +0 -1
  248. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1-sources.jar.sha256 +0 -1
  249. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1-sources.jar.sha512 +0 -1
  250. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.aar +0 -0
  251. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.aar.md5 +0 -1
  252. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.aar.sha1 +0 -1
  253. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.aar.sha256 +0 -1
  254. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.aar.sha512 +0 -1
  255. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.module.md5 +0 -1
  256. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.module.sha1 +0 -1
  257. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.module.sha256 +0 -1
  258. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.module.sha512 +0 -1
  259. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.pom.md5 +0 -1
  260. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.pom.sha1 +0 -1
  261. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.pom.sha256 +0 -1
  262. package/local-maven-repo/expo/modules/ui/expo.modules.ui/55.0.1/expo.modules.ui-55.0.1.pom.sha512 +0 -1
  263. package/src/jetpack-compose/Button/types.ts +0 -57
  264. package/src/jetpack-compose/ContextMenu/Submenu.tsx +0 -21
  265. package/src/jetpack-compose/ContextMenu/index.tsx +0 -149
  266. package/src/jetpack-compose/ContextMenu/utils.ts +0 -144
  267. package/src/jetpack-compose/FilterChip/index.tsx +0 -89
  268. package/src/jetpack-compose/Picker/index.tsx +0 -90
  269. package/src/jetpack-compose/TextButton/index.tsx +0 -55
@@ -13,10 +13,9 @@ internal final class ToggleProps: UIBaseViewProps {
13
13
  internal struct ToggleView: ExpoSwiftUI.View {
14
14
  @ObservedObject var props: ToggleProps
15
15
  @State var checked: Bool = false
16
-
16
+
17
17
  init(props: ToggleProps) {
18
18
  self.props = props
19
- _checked = State(initialValue: props.isOn ?? false)
20
19
  }
21
20
 
22
21
  var body: some View {
@@ -30,11 +29,10 @@ internal struct ToggleView: ExpoSwiftUI.View {
30
29
  ])
31
30
  }
32
31
  .onChange(of: props.isOn) { newValue in
33
- guard let newValue else {
34
- checked = false
35
- return
36
- }
37
- checked = newValue
32
+ checked = newValue ?? false
33
+ }
34
+ .onAppear {
35
+ checked = props.isOn ?? false
38
36
  }
39
37
  }
40
38
 
@@ -8,22 +8,24 @@ import SwiftUI
8
8
  */
9
9
  public struct UIBaseView<Props: UIBaseViewProps, Content: ExpoSwiftUI.View<Props>>: ExpoSwiftUI.View {
10
10
  @ObservedObject public var props: Props
11
+ let innerView: Content
11
12
 
12
13
  public init(props: Props) {
13
14
  self.props = props
15
+ self.innerView = Content(props: props)
14
16
  }
15
17
 
16
18
  public var body: some View {
17
- Content(props: props)
19
+ innerView
18
20
  .applyAccessibilityIdentifier(props.testID)
19
21
  .applyModifiers(props.modifiers, appContext: props.appContext, globalEventDispatcher: props.globalEventDispatcher)
20
22
  }
21
23
  }
22
24
 
23
25
  /**
24
- Base view modifier in expo-ui
25
- This is useful for View with AsyncFunctions that cannot use the `ExpoUIView` builder.
26
+ Deprecated. Use `applyModifiers` method directly instead.
26
27
  */
28
+ @available(*, deprecated, message: "Use applyModifiers method directly on the content view instead.")
27
29
  public struct UIBaseViewModifier<Props: UIBaseViewProps>: ViewModifier {
28
30
  @ObservedObject var props: Props
29
31
  var defaultFrameAlignment = Alignment.center
@@ -35,6 +37,21 @@ public struct UIBaseViewModifier<Props: UIBaseViewProps>: ViewModifier {
35
37
  }
36
38
  }
37
39
 
40
+ // MARK: - ViewWrapper
41
+
42
+ extension UIBaseView: ExpoSwiftUI.ViewWrapper {
43
+ public func getWrappedView() -> Any {
44
+ return innerView
45
+ }
46
+ }
47
+
48
+ // MARK: - FocusableView forwarding
49
+ extension UIBaseView: ExpoSwiftUI.FocusableView where Content: ExpoSwiftUI.FocusableView {
50
+ public func forceResignFirstResponder() {
51
+ innerView.forceResignFirstResponder()
52
+ }
53
+ }
54
+
38
55
  /**
39
56
  Common UI Builder in expo-ui.
40
57
  This is similar to expo-modules-core's View builder but further supports common base view props and modifiers
@@ -49,3 +66,17 @@ public func ExpoUIView<Content: ExpoSwiftUI.View>(
49
66
  ViewName(contentName)
50
67
  }
51
68
  }
69
+
70
+ /**
71
+ ExpoUIView overload that accepts a `@ViewDefinitionBuilder` closure for registering
72
+ AsyncFunctions and other view definition elements.
73
+ */
74
+ public func ExpoUIView<Content: ExpoSwiftUI.View>(
75
+ _ contentType: Content.Type,
76
+ @ExpoSwiftUI.ViewDefinitionBuilder<Content> _ elements: @escaping () -> [AnyViewDefinitionElement]
77
+ ) -> ExpoSwiftUI.ViewDefinition<Content.Props, UIBaseView<Content.Props, Content>> where Content.Props: UIBaseViewProps {
78
+ let wrappedType = UIBaseView<Content.Props, Content>.self
79
+ let contentName = String(describing: contentType)
80
+
81
+ return ExpoSwiftUI.ViewDefinition(wrappedType, name: contentName, elements: elements())
82
+ }
@@ -0,0 +1 @@
1
+ 946e37bf3649dc1cd162039cb8a8f09dda746589
@@ -0,0 +1 @@
1
+ c57afb701286b9952b45654e012a91a385a29294de33d0513f8d198f304e2469
@@ -0,0 +1 @@
1
+ 17c66704e0a4a36020c483c7fa57c36e3a00859c0ec6a021f4c05d265d211fc861c7181e5ae44d2982418c3e463da8b3bec84ecd26da1361513712e77b5ba479
@@ -0,0 +1 @@
1
+ cfdba1b98a6054184b39f6b71d33c18f385c26d2
@@ -0,0 +1 @@
1
+ b28fefc8ae185432f8d8988a2701d0f38bab89a15eebeb60a3e27462ad814be6
@@ -0,0 +1 @@
1
+ 1cadb83d41093807cf37e093484e7f8206f11e856e6eebb3d77c679800b75b9ad8dbfa074cc2f4ff75c60b9de7cba4099d76c37c11158a7551fb827b4808e615
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "expo.modules.ui",
5
5
  "module": "expo.modules.ui",
6
- "version": "55.0.1",
6
+ "version": "55.0.3",
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-55.0.1.aar",
28
- "url": "expo.modules.ui-55.0.1.aar",
29
- "size": 732681,
30
- "sha512": "35a4fa077be99bf9bebfd55d3398894d0150be4a5a60503d407a6a487290f5b2fdd0b0624986ef2781097d50a3c1fe973786fd79a738e94d1de0228b04ab3e01",
31
- "sha256": "981050003cd4b3d57f26a29a9e0466bdbdae41cc8df253b571858ba1e46a6ab9",
32
- "sha1": "6c884449165b70583d08844b02f31ab547df4438",
33
- "md5": "28406ef3849bb822054f845e1e731d11"
27
+ "name": "expo.modules.ui-55.0.3.aar",
28
+ "url": "expo.modules.ui-55.0.3.aar",
29
+ "size": 926327,
30
+ "sha512": "1cadb83d41093807cf37e093484e7f8206f11e856e6eebb3d77c679800b75b9ad8dbfa074cc2f4ff75c60b9de7cba4099d76c37c11158a7551fb827b4808e615",
31
+ "sha256": "b28fefc8ae185432f8d8988a2701d0f38bab89a15eebeb60a3e27462ad814be6",
32
+ "sha1": "cfdba1b98a6054184b39f6b71d33c18f385c26d2",
33
+ "md5": "e71e2dd13981dbfb7885feb0b0bfe390"
34
34
  }
35
35
  ]
36
36
  },
@@ -120,13 +120,13 @@
120
120
  ],
121
121
  "files": [
122
122
  {
123
- "name": "expo.modules.ui-55.0.1.aar",
124
- "url": "expo.modules.ui-55.0.1.aar",
125
- "size": 732681,
126
- "sha512": "35a4fa077be99bf9bebfd55d3398894d0150be4a5a60503d407a6a487290f5b2fdd0b0624986ef2781097d50a3c1fe973786fd79a738e94d1de0228b04ab3e01",
127
- "sha256": "981050003cd4b3d57f26a29a9e0466bdbdae41cc8df253b571858ba1e46a6ab9",
128
- "sha1": "6c884449165b70583d08844b02f31ab547df4438",
129
- "md5": "28406ef3849bb822054f845e1e731d11"
123
+ "name": "expo.modules.ui-55.0.3.aar",
124
+ "url": "expo.modules.ui-55.0.3.aar",
125
+ "size": 926327,
126
+ "sha512": "1cadb83d41093807cf37e093484e7f8206f11e856e6eebb3d77c679800b75b9ad8dbfa074cc2f4ff75c60b9de7cba4099d76c37c11158a7551fb827b4808e615",
127
+ "sha256": "b28fefc8ae185432f8d8988a2701d0f38bab89a15eebeb60a3e27462ad814be6",
128
+ "sha1": "cfdba1b98a6054184b39f6b71d33c18f385c26d2",
129
+ "md5": "e71e2dd13981dbfb7885feb0b0bfe390"
130
130
  }
131
131
  ]
132
132
  },
@@ -140,13 +140,13 @@
140
140
  },
141
141
  "files": [
142
142
  {
143
- "name": "expo.modules.ui-55.0.1-sources.jar",
144
- "url": "expo.modules.ui-55.0.1-sources.jar",
145
- "size": 51394,
146
- "sha512": "fe721d26e09241994a20838afa7aecfcd15a3c74bb104a3b42753cb73608ad6784f0d820db4b654b6fd65df1165574b8353040f8d0a2161c2e3413e18c2b9b79",
147
- "sha256": "addee5fe747747c7459fb227f67189cd0c0a064fe2a037ed67057c560e7fb335",
148
- "sha1": "6e19bff717c5770bfbfab0f7b94f6e98217dc504",
149
- "md5": "d9047cbc88b3f7cbf9728460e27dd43d"
143
+ "name": "expo.modules.ui-55.0.3-sources.jar",
144
+ "url": "expo.modules.ui-55.0.3-sources.jar",
145
+ "size": 59533,
146
+ "sha512": "17c66704e0a4a36020c483c7fa57c36e3a00859c0ec6a021f4c05d265d211fc861c7181e5ae44d2982418c3e463da8b3bec84ecd26da1361513712e77b5ba479",
147
+ "sha256": "c57afb701286b9952b45654e012a91a385a29294de33d0513f8d198f304e2469",
148
+ "sha1": "946e37bf3649dc1cd162039cb8a8f09dda746589",
149
+ "md5": "0a032184d0eac4ef04d3f10fe2ee4bbd"
150
150
  }
151
151
  ]
152
152
  }
@@ -0,0 +1 @@
1
+ 4d309366193fb9e93dfc2f528d842ef199d9356f
@@ -0,0 +1 @@
1
+ 8538fc44dce117d85e63175555983fbe9c41be3e21c0c1a38bd8284538348cfb
@@ -0,0 +1 @@
1
+ 9b945333e9fabb773714dc66ccfd5556156ad6804aa63126a4d8db3351df53287def6a225bda7c5822ed780b7aaddbd36cac41fd31094df091b99b2c4cc75780
@@ -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>55.0.1</version>
12
+ <version>55.0.3</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
+ 3296958fe9f35c69d8d5c4b2557dc5a71c45935f
@@ -0,0 +1 @@
1
+ 7c81267db605b109cc861c92c6c76b415dd5c7387766652b399877e6cd485481
@@ -0,0 +1 @@
1
+ 20a8aefc780090feeeffd634b020ce55a5288bd2c12ba66ef0c19e81b78633cb13916d8dd5fea9b4cf1b3a07c00dbeb0599c4f283800bfe7bf44c90570841e07
@@ -3,11 +3,11 @@
3
3
  <groupId>expo.modules.ui</groupId>
4
4
  <artifactId>expo.modules.ui</artifactId>
5
5
  <versioning>
6
- <latest>55.0.1</latest>
7
- <release>55.0.1</release>
6
+ <latest>55.0.3</latest>
7
+ <release>55.0.3</release>
8
8
  <versions>
9
- <version>55.0.1</version>
9
+ <version>55.0.3</version>
10
10
  </versions>
11
- <lastUpdated>20260225202620</lastUpdated>
11
+ <lastUpdated>20260317165330</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- f6c9c7a26f591d85be1f92bd770048b0
1
+ ba5645a93d7825372e7e0f45563e1cfd
@@ -1 +1 @@
1
- 606ee81d636b618e409a977c41c18f0c102cf7ed
1
+ 4f2050a563003a387527564b35508ee311916fae
@@ -1 +1 @@
1
- 27c261098239e26d801540abddfcc9df7dc49b3ae8f839fadf7157e7062366de
1
+ 0ea5ca4c5502f8f61efb4a7c56f5bd0f744abef7ed58d4388d54bab48fc602df
@@ -1 +1 @@
1
- a15e7a136c573d55ad8bfb73aecd9d47acf97323477120337ca51876f53194f40bbaeaf55cfca25ed68760ed6e241758806b61f0435247c0fa3393157f466ce3
1
+ f9f75a9f46b1a6ac2ebe41af9e8973f7fb40aa23ed7861b2ffc6a025b80dd888c25d8be8d8748473ec14243a753892d9865db99c8304416d0e63610f50f7d8ff
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@expo/ui",
3
- "version": "55.0.1",
3
+ "version": "55.0.3",
4
4
  "description": "A collection of UI components",
5
5
  "sideEffects": [
6
6
  "*.fx.js"
@@ -55,10 +55,13 @@
55
55
  "@types/react": "~19.2.0",
56
56
  "expo-module-scripts": "^55.0.2"
57
57
  },
58
+ "jest": {
59
+ "preset": "expo-module-scripts"
60
+ },
58
61
  "peerDependencies": {
59
62
  "expo": "*",
60
63
  "react": "*",
61
64
  "react-native": "*"
62
65
  },
63
- "gitHead": "39a7a009e215eb71a112f4a20dba2d471ab21108"
66
+ "gitHead": "9260ae10a08271027d85792b7128e0d4883dca4d"
64
67
  }
@@ -0,0 +1,206 @@
1
+ /**
2
+ * AnimatedVisibility — a React wrapper around Jetpack Compose's AnimatedVisibility.
3
+ *
4
+ * Architecture overview:
5
+ *
6
+ * 1. **Public API** — `EnterTransition` / `ExitTransition` factory objects produce
7
+ * chainable transition descriptors via `.plus()`, mirroring Compose's `+` operator.
8
+ *
9
+ * 2. **Internal records** — Each factory call creates an `EnterTransitionRecord` or
10
+ * `ExitTransitionRecord`, a plain JSON object with a `type` discriminator and optional
11
+ * parameters. These records are the format passed to the native Android view.
12
+ *
13
+ * 3. **Symbol-based encapsulation** — The record arrays are stored behind unique Symbols
14
+ * (`ENTER_TRANSITION_SYMBOL` / `EXIT_TRANSITION_SYMBOL`). This prevents consumers from
15
+ * accessing or constructing raw records directly, ensuring transitions are only built
16
+ * through the factory API.
17
+ *
18
+ * 4. **Chaining** — `.plus(other)` concatenates the current record array with `other`'s
19
+ * records into a new transition object. The result is a flat list, not a tree.
20
+ * e.g. `fadeIn().plus(expandIn())` → `[{ type: 'fadeIn' }, { type: 'expandIn' }]`
21
+ *
22
+ * 5. **Component** — `<AnimatedVisibility>` extracts the record arrays from the chainable
23
+ * types via their Symbols and passes them as plain JSON arrays to the native view.
24
+ */
25
+ import { requireNativeView } from 'expo';
26
+
27
+ import { PrimitiveBaseProps, transformProps } from '../layout-types';
28
+ import { ENTER_TRANSITION_SYMBOL, EXIT_TRANSITION_SYMBOL } from './symbols';
29
+
30
+ type EnterTransitionRecord = {
31
+ type:
32
+ | 'fadeIn'
33
+ | 'slideInHorizontally'
34
+ | 'slideInVertically'
35
+ | 'expandIn'
36
+ | 'expandHorizontally'
37
+ | 'expandVertically'
38
+ | 'scaleIn';
39
+ initialAlpha?: number;
40
+ /** Fraction of width: -1.0 = full width left, 1.0 = full width right */
41
+ initialOffsetX?: number;
42
+ /** Fraction of height: -1.0 = full height top, 1.0 = full height bottom */
43
+ initialOffsetY?: number;
44
+ initialScale?: number;
45
+ };
46
+
47
+ type ExitTransitionRecord = {
48
+ type:
49
+ | 'fadeOut'
50
+ | 'slideOutHorizontally'
51
+ | 'slideOutVertically'
52
+ | 'shrinkOut'
53
+ | 'shrinkHorizontally'
54
+ | 'shrinkVertically'
55
+ | 'scaleOut';
56
+ targetAlpha?: number;
57
+ /** Fraction of width: -1.0 = full width left, 1.0 = full width right */
58
+ targetOffsetX?: number;
59
+ /** Fraction of height: -1.0 = full height top, 1.0 = full height bottom */
60
+ targetOffsetY?: number;
61
+ targetScale?: number;
62
+ };
63
+
64
+ /**
65
+ * Represents an enter transition that can be combined with other enter transitions using `.plus()`.
66
+ */
67
+ export type EnterTransitionType = {
68
+ /** Combines this transition with another enter transition (mirrors Compose's `+` operator). */
69
+ plus: (other: EnterTransitionType) => EnterTransitionType;
70
+ [ENTER_TRANSITION_SYMBOL]: () => EnterTransitionRecord[];
71
+ };
72
+
73
+ /**
74
+ * Represents an exit transition that can be combined with other exit transitions using `.plus()`.
75
+ */
76
+ export type ExitTransitionType = {
77
+ /** Combines this transition with another exit transition (mirrors Compose's `+` operator). */
78
+ plus: (other: ExitTransitionType) => ExitTransitionType;
79
+ [EXIT_TRANSITION_SYMBOL]: () => ExitTransitionRecord[];
80
+ };
81
+
82
+ function createEnterTransition(records: EnterTransitionRecord[]): EnterTransitionType {
83
+ return {
84
+ plus: (other) => createEnterTransition([...records, ...other[ENTER_TRANSITION_SYMBOL]()]),
85
+ [ENTER_TRANSITION_SYMBOL]: () => records,
86
+ };
87
+ }
88
+
89
+ function createExitTransition(records: ExitTransitionRecord[]): ExitTransitionType {
90
+ return {
91
+ plus: (other) => createExitTransition([...records, ...other[EXIT_TRANSITION_SYMBOL]()]),
92
+ [EXIT_TRANSITION_SYMBOL]: () => records,
93
+ };
94
+ }
95
+
96
+ /**
97
+ * Factory for enter transitions used with `AnimatedVisibility`.
98
+ * Transitions can be combined using `.plus()`.
99
+ *
100
+ * @example
101
+ * ```tsx
102
+ * // Single transition
103
+ * EnterTransition.fadeIn()
104
+ *
105
+ * // Combined transitions
106
+ * EnterTransition.fadeIn({ initialAlpha: 0.3 })
107
+ * .plus(EnterTransition.slideInHorizontally({ initialOffsetX: 1.0 }))
108
+ * ```
109
+ */
110
+ export const EnterTransition = {
111
+ /** Fades the content in. */
112
+ fadeIn: (params?: { initialAlpha?: number }) =>
113
+ createEnterTransition([{ type: 'fadeIn', ...params }]),
114
+ /** Slides the content in horizontally. */
115
+ slideInHorizontally: (params?: { initialOffsetX?: number }) =>
116
+ createEnterTransition([{ type: 'slideInHorizontally', ...params }]),
117
+ /** Slides the content in vertically. */
118
+ slideInVertically: (params?: { initialOffsetY?: number }) =>
119
+ createEnterTransition([{ type: 'slideInVertically', ...params }]),
120
+ /** Expands the content from the center. */
121
+ expandIn: () => createEnterTransition([{ type: 'expandIn' }]),
122
+ /** Expands the content horizontally from the center. */
123
+ expandHorizontally: () => createEnterTransition([{ type: 'expandHorizontally' }]),
124
+ /** Expands the content vertically from the center. */
125
+ expandVertically: () => createEnterTransition([{ type: 'expandVertically' }]),
126
+ /** Scales the content in from a smaller size. */
127
+ scaleIn: (params?: { initialScale?: number }) =>
128
+ createEnterTransition([{ type: 'scaleIn', ...params }]),
129
+ };
130
+
131
+ /**
132
+ * Factory for exit transitions used with `AnimatedVisibility`.
133
+ * Transitions can be combined using `.plus()`.
134
+ *
135
+ * @example
136
+ * ```tsx
137
+ * // Single transition
138
+ * ExitTransition.fadeOut()
139
+ *
140
+ * // Combined transitions
141
+ * ExitTransition.fadeOut()
142
+ * .plus(ExitTransition.slideOutHorizontally({ targetOffsetX: 1.0 }))
143
+ * ```
144
+ */
145
+ export const ExitTransition = {
146
+ /** Fades the content out. */
147
+ fadeOut: (params?: { targetAlpha?: number }) =>
148
+ createExitTransition([{ type: 'fadeOut', ...params }]),
149
+ /** Slides the content out horizontally. */
150
+ slideOutHorizontally: (params?: { targetOffsetX?: number }) =>
151
+ createExitTransition([{ type: 'slideOutHorizontally', ...params }]),
152
+ /** Slides the content out vertically. */
153
+ slideOutVertically: (params?: { targetOffsetY?: number }) =>
154
+ createExitTransition([{ type: 'slideOutVertically', ...params }]),
155
+ /** Shrinks the content towards the center. */
156
+ shrinkOut: () => createExitTransition([{ type: 'shrinkOut' }]),
157
+ /** Shrinks the content horizontally towards the center. */
158
+ shrinkHorizontally: () => createExitTransition([{ type: 'shrinkHorizontally' }]),
159
+ /** Shrinks the content vertically towards the center. */
160
+ shrinkVertically: () => createExitTransition([{ type: 'shrinkVertically' }]),
161
+ /** Scales the content out to a smaller size. */
162
+ scaleOut: (params?: { targetScale?: number }) =>
163
+ createExitTransition([{ type: 'scaleOut', ...params }]),
164
+ };
165
+
166
+ export type AnimatedVisibilityProps = {
167
+ children?: React.ReactNode;
168
+ /**
169
+ * Whether the content is visible. When changed, the content will animate in or out.
170
+ */
171
+ visible: boolean;
172
+ /**
173
+ * The enter transition to use when `visible` changes to `true`.
174
+ * Use `EnterTransition` factory methods and combine with `.plus()`.
175
+ * Defaults to Compose's `fadeIn + expandIn` when not specified.
176
+ */
177
+ enterTransition?: EnterTransitionType;
178
+ /**
179
+ * The exit transition to use when `visible` changes to `false`.
180
+ * Use `ExitTransition` factory methods and combine with `.plus()`.
181
+ * Defaults to Compose's `fadeOut + shrinkOut` when not specified.
182
+ */
183
+ exitTransition?: ExitTransitionType;
184
+ } & PrimitiveBaseProps;
185
+
186
+ type AnimatedVisibilityNativeProps = Omit<
187
+ AnimatedVisibilityProps,
188
+ 'enterTransition' | 'exitTransition'
189
+ > & {
190
+ enterTransition?: EnterTransitionRecord[];
191
+ exitTransition?: ExitTransitionRecord[];
192
+ };
193
+
194
+ const AnimatedVisibilityNativeView: React.ComponentType<AnimatedVisibilityNativeProps> =
195
+ requireNativeView('ExpoUI', 'AnimatedVisibilityView');
196
+
197
+ export function AnimatedVisibility(props: AnimatedVisibilityProps) {
198
+ const { enterTransition, exitTransition, ...rest } = props;
199
+ return (
200
+ <AnimatedVisibilityNativeView
201
+ {...transformProps(rest)}
202
+ enterTransition={enterTransition?.[ENTER_TRANSITION_SYMBOL]()}
203
+ exitTransition={exitTransition?.[EXIT_TRANSITION_SYMBOL]()}
204
+ />
205
+ );
206
+ }
@@ -0,0 +1,8 @@
1
+ // Unique Symbols used as private keys on transition objects. They act as a sealed accessor:
2
+ // only this module and the component can read the underlying record arrays from an
3
+ // EnterTransitionType or ExitTransitionType, preventing consumers from bypassing the factory API.
4
+ //
5
+ // Exported from this file for internal use (component + tests), but NOT re-exported from
6
+ // the package's public index.
7
+ export const ENTER_TRANSITION_SYMBOL = Symbol('enterTransition');
8
+ export const EXIT_TRANSITION_SYMBOL = Symbol('exitTransition');