@expo/ui 0.2.0-alpha.0 → 0.2.0-alpha.2

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 (350) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/ui/AlertDialogView.kt +3 -1
  4. package/android/src/main/java/expo/modules/ui/ComposeViews.kt +6 -6
  5. package/android/src/main/java/expo/modules/ui/DatePickerView.kt +4 -3
  6. package/android/src/main/java/expo/modules/ui/ExpoUIModule.kt +88 -0
  7. package/android/src/main/java/expo/modules/ui/Modifiers.kt +15 -0
  8. package/android/src/main/java/expo/modules/ui/PickerView.kt +7 -2
  9. package/android/src/main/java/expo/modules/ui/ProgressView.kt +8 -4
  10. package/android/src/main/java/expo/modules/ui/ShapeView.kt +3 -2
  11. package/android/src/main/java/expo/modules/ui/SliderView.kt +4 -2
  12. package/android/src/main/java/expo/modules/ui/SwitchView.kt +3 -2
  13. package/android/src/main/java/expo/modules/ui/TextInputView.kt +4 -2
  14. package/android/src/main/java/expo/modules/ui/button/Button.kt +17 -8
  15. package/build/jetpack-compose/AlertDialog/index.d.ts +3 -0
  16. package/build/jetpack-compose/AlertDialog/index.d.ts.map +1 -1
  17. package/build/jetpack-compose/AlertDialog/index.js +3 -1
  18. package/build/jetpack-compose/AlertDialog/index.js.map +1 -1
  19. package/build/jetpack-compose/Button/index.d.ts +3 -1
  20. package/build/jetpack-compose/Button/index.d.ts.map +1 -1
  21. package/build/jetpack-compose/Button/index.js +2 -0
  22. package/build/jetpack-compose/Button/index.js.map +1 -1
  23. package/build/jetpack-compose/ContextMenu/index.d.ts +3 -0
  24. package/build/jetpack-compose/ContextMenu/index.d.ts.map +1 -1
  25. package/build/jetpack-compose/ContextMenu/index.js +3 -1
  26. package/build/jetpack-compose/ContextMenu/index.js.map +1 -1
  27. package/build/jetpack-compose/DatePicker/index.d.ts +3 -1
  28. package/build/jetpack-compose/DatePicker/index.d.ts.map +1 -1
  29. package/build/jetpack-compose/DatePicker/index.js +2 -0
  30. package/build/jetpack-compose/DatePicker/index.js.map +1 -1
  31. package/build/jetpack-compose/Picker/index.d.ts +5 -0
  32. package/build/jetpack-compose/Picker/index.d.ts.map +1 -1
  33. package/build/jetpack-compose/Picker/index.js +4 -0
  34. package/build/jetpack-compose/Picker/index.js.map +1 -1
  35. package/build/jetpack-compose/Progress/index.d.ts +5 -0
  36. package/build/jetpack-compose/Progress/index.d.ts.map +1 -1
  37. package/build/jetpack-compose/Progress/index.js +4 -2
  38. package/build/jetpack-compose/Progress/index.js.map +1 -1
  39. package/build/jetpack-compose/Shape/index.d.ts +4 -1
  40. package/build/jetpack-compose/Shape/index.d.ts.map +1 -1
  41. package/build/jetpack-compose/Shape/index.js +3 -1
  42. package/build/jetpack-compose/Shape/index.js.map +1 -1
  43. package/build/jetpack-compose/Slider/index.d.ts +3 -1
  44. package/build/jetpack-compose/Slider/index.d.ts.map +1 -1
  45. package/build/jetpack-compose/Slider/index.js +2 -0
  46. package/build/jetpack-compose/Slider/index.js.map +1 -1
  47. package/build/jetpack-compose/Switch/index.d.ts +3 -0
  48. package/build/jetpack-compose/Switch/index.d.ts.map +1 -1
  49. package/build/jetpack-compose/Switch/index.js +2 -0
  50. package/build/jetpack-compose/Switch/index.js.map +1 -1
  51. package/build/jetpack-compose/TextInput/index.d.ts +3 -1
  52. package/build/jetpack-compose/TextInput/index.d.ts.map +1 -1
  53. package/build/jetpack-compose/TextInput/index.js +2 -0
  54. package/build/jetpack-compose/TextInput/index.js.map +1 -1
  55. package/build/jetpack-compose/index.d.ts +1 -0
  56. package/build/jetpack-compose/index.d.ts.map +1 -1
  57. package/build/jetpack-compose/index.js +1 -0
  58. package/build/jetpack-compose/index.js.map +1 -1
  59. package/build/jetpack-compose/modifiers.d.ts +14 -0
  60. package/build/jetpack-compose/modifiers.d.ts.map +1 -0
  61. package/build/jetpack-compose/modifiers.js +15 -0
  62. package/build/jetpack-compose/modifiers.js.map +1 -0
  63. package/build/swift-ui/BottomSheet/index.d.ts +2 -14
  64. package/build/swift-ui/BottomSheet/index.d.ts.map +1 -1
  65. package/build/swift-ui/BottomSheet/index.js +7 -15
  66. package/build/swift-ui/BottomSheet/index.js.map +1 -1
  67. package/build/swift-ui/Button/index.d.ts +6 -11
  68. package/build/swift-ui/Button/index.d.ts.map +1 -1
  69. package/build/swift-ui/Button/index.js +7 -14
  70. package/build/swift-ui/Button/index.js.map +1 -1
  71. package/build/swift-ui/ColorPicker/index.d.ts +3 -10
  72. package/build/swift-ui/ColorPicker/index.d.ts.map +1 -1
  73. package/build/swift-ui/ColorPicker/index.js +5 -14
  74. package/build/swift-ui/ColorPicker/index.js.map +1 -1
  75. package/build/{swift-ui-primitives/ContentUnavailableView.d.ts → swift-ui/ContentUnavailableView/index.d.ts} +3 -8
  76. package/build/swift-ui/ContentUnavailableView/index.d.ts.map +1 -0
  77. package/build/swift-ui/ContentUnavailableView/index.js +19 -0
  78. package/build/swift-ui/ContentUnavailableView/index.js.map +1 -0
  79. package/build/swift-ui/ContextMenu/Submenu.d.ts +21 -0
  80. package/build/swift-ui/ContextMenu/Submenu.d.ts.map +1 -0
  81. package/build/swift-ui/ContextMenu/Submenu.js +8 -0
  82. package/build/swift-ui/ContextMenu/Submenu.js.map +1 -0
  83. package/build/swift-ui/ContextMenu/index.d.ts +6 -87
  84. package/build/swift-ui/ContextMenu/index.d.ts.map +1 -1
  85. package/build/swift-ui/ContextMenu/index.js +11 -26
  86. package/build/swift-ui/ContextMenu/index.js.map +1 -1
  87. package/build/swift-ui/ContextMenu/types.d.ts +36 -0
  88. package/build/swift-ui/ContextMenu/types.d.ts.map +1 -0
  89. package/build/swift-ui/ContextMenu/types.js.map +1 -0
  90. package/build/swift-ui/ContextMenu/utils.d.ts +4 -4
  91. package/build/swift-ui/ContextMenu/utils.d.ts.map +1 -1
  92. package/build/swift-ui/ContextMenu/utils.js +7 -7
  93. package/build/swift-ui/ContextMenu/utils.js.map +1 -1
  94. package/build/swift-ui/DatePicker/index.d.ts +3 -21
  95. package/build/swift-ui/DatePicker/index.d.ts.map +1 -1
  96. package/build/swift-ui/DatePicker/index.js +6 -28
  97. package/build/swift-ui/DatePicker/index.js.map +1 -1
  98. package/build/{swift-ui-primitives/DisclosureGroup.d.ts → swift-ui/DisclosureGroup/index.d.ts} +2 -8
  99. package/build/swift-ui/DisclosureGroup/index.d.ts.map +1 -0
  100. package/build/swift-ui/DisclosureGroup/index.js +16 -0
  101. package/build/swift-ui/DisclosureGroup/index.js.map +1 -0
  102. package/build/{swift-ui-primitives/Form.d.ts → swift-ui/Form/index.d.ts} +2 -2
  103. package/build/swift-ui/Form/index.d.ts.map +1 -0
  104. package/build/swift-ui/Form/index.js +15 -0
  105. package/build/swift-ui/Form/index.js.map +1 -0
  106. package/build/swift-ui/Gauge/index.d.ts +4 -10
  107. package/build/swift-ui/Gauge/index.d.ts.map +1 -1
  108. package/build/swift-ui/Gauge/index.js +4 -20
  109. package/build/swift-ui/Gauge/index.js.map +1 -1
  110. package/build/swift-ui/Host/index.d.ts +2 -1
  111. package/build/swift-ui/Host/index.d.ts.map +1 -1
  112. package/build/swift-ui/Host/index.js +3 -2
  113. package/build/swift-ui/Host/index.js.map +1 -1
  114. package/build/{swift-ui-primitives/Image.d.ts → swift-ui/Image/index.d.ts} +2 -2
  115. package/build/swift-ui/Image/index.d.ts.map +1 -0
  116. package/build/{swift-ui-primitives/Image.js → swift-ui/Image/index.js} +5 -2
  117. package/build/swift-ui/Image/index.js.map +1 -0
  118. package/build/swift-ui/Label/index.d.ts +3 -10
  119. package/build/swift-ui/Label/index.d.ts.map +1 -1
  120. package/build/swift-ui/Label/index.js +3 -11
  121. package/build/swift-ui/Label/index.js.map +1 -1
  122. package/build/{swift-ui-primitives/Layout.d.ts → swift-ui/Layout/index.d.ts} +3 -3
  123. package/build/swift-ui/Layout/index.d.ts.map +1 -0
  124. package/build/{swift-ui-primitives/Layout.js → swift-ui/Layout/index.js} +15 -3
  125. package/build/swift-ui/Layout/index.js.map +1 -0
  126. package/build/swift-ui/List/index.d.ts +3 -34
  127. package/build/swift-ui/List/index.d.ts.map +1 -1
  128. package/build/swift-ui/List/index.js +7 -16
  129. package/build/swift-ui/List/index.js.map +1 -1
  130. package/build/swift-ui/Picker/index.d.ts +3 -16
  131. package/build/swift-ui/Picker/index.d.ts.map +1 -1
  132. package/build/swift-ui/Picker/index.js +7 -16
  133. package/build/swift-ui/Picker/index.js.map +1 -1
  134. package/build/swift-ui/Progress/index.d.ts +6 -19
  135. package/build/swift-ui/Progress/index.d.ts.map +1 -1
  136. package/build/swift-ui/Progress/index.js +5 -21
  137. package/build/swift-ui/Progress/index.js.map +1 -1
  138. package/build/swift-ui/Section/index.d.ts +4 -11
  139. package/build/swift-ui/Section/index.d.ts.map +1 -1
  140. package/build/swift-ui/Section/index.js +3 -11
  141. package/build/swift-ui/Section/index.js.map +1 -1
  142. package/build/swift-ui/SecureField/index.d.ts +3 -14
  143. package/build/swift-ui/SecureField/index.d.ts.map +1 -1
  144. package/build/swift-ui/SecureField/index.js +5 -14
  145. package/build/swift-ui/SecureField/index.js.map +1 -1
  146. package/build/swift-ui/ShareLink/index.d.ts +3 -10
  147. package/build/swift-ui/ShareLink/index.d.ts.map +1 -1
  148. package/build/swift-ui/ShareLink/index.js +3 -11
  149. package/build/swift-ui/ShareLink/index.js.map +1 -1
  150. package/build/swift-ui/Slider/index.d.ts +3 -15
  151. package/build/swift-ui/Slider/index.d.ts.map +1 -1
  152. package/build/swift-ui/Slider/index.js +7 -12
  153. package/build/swift-ui/Slider/index.js.map +1 -1
  154. package/build/{swift-ui-primitives/Spacer.d.ts → swift-ui/Spacer/index.d.ts} +2 -2
  155. package/build/swift-ui/Spacer/index.d.ts.map +1 -0
  156. package/build/swift-ui/Spacer/index.js +15 -0
  157. package/build/swift-ui/Spacer/index.js.map +1 -0
  158. package/build/swift-ui/Switch/index.d.ts +3 -20
  159. package/build/swift-ui/Switch/index.d.ts.map +1 -1
  160. package/build/swift-ui/Switch/index.js +7 -16
  161. package/build/swift-ui/Switch/index.js.map +1 -1
  162. package/build/{swift-ui-primitives/Text.d.ts → swift-ui/Text/index.d.ts} +2 -2
  163. package/build/swift-ui/Text/index.d.ts.map +1 -0
  164. package/build/{swift-ui-primitives/Text.js → swift-ui/Text/index.js} +5 -2
  165. package/build/swift-ui/Text/index.js.map +1 -0
  166. package/build/swift-ui/TextField/index.d.ts +4 -11
  167. package/build/swift-ui/TextField/index.d.ts.map +1 -1
  168. package/build/swift-ui/TextField/index.js +5 -14
  169. package/build/swift-ui/TextField/index.js.map +1 -1
  170. package/build/swift-ui/index.d.ts +7 -0
  171. package/build/swift-ui/index.d.ts.map +1 -1
  172. package/build/swift-ui/index.js +7 -0
  173. package/build/swift-ui/index.js.map +1 -1
  174. package/build/swift-ui/modifiers/index.d.ts +259 -0
  175. package/build/swift-ui/modifiers/index.d.ts.map +1 -0
  176. package/build/swift-ui/modifiers/index.js +224 -0
  177. package/build/swift-ui/modifiers/index.js.map +1 -0
  178. package/build/swift-ui/modifiers/utils.d.ts +15 -0
  179. package/build/swift-ui/modifiers/utils.d.ts.map +1 -0
  180. package/build/swift-ui/modifiers/utils.js +23 -0
  181. package/build/swift-ui/modifiers/utils.js.map +1 -0
  182. package/build/{swift-ui-primitives → swift-ui}/types.d.ts +47 -4
  183. package/build/swift-ui/types.d.ts.map +1 -0
  184. package/build/swift-ui/types.js +2 -0
  185. package/build/swift-ui/types.js.map +1 -0
  186. package/build/types.d.ts +3 -0
  187. package/build/types.d.ts.map +1 -1
  188. package/build/types.js.map +1 -1
  189. package/expo-module.config.json +1 -1
  190. package/ios/BottomSheetView.swift +9 -1
  191. package/ios/Button/Button.swift +1 -0
  192. package/ios/Button/ButtonProps.swift +7 -2
  193. package/ios/ColorPickerView.swift +8 -1
  194. package/ios/ContentUnavailableView.swift +3 -1
  195. package/ios/ContextMenu/ContextMenu.swift +5 -0
  196. package/ios/ContextMenu/ContextMenuRecords.swift +19 -3
  197. package/ios/DateTimePickerView.swift +8 -1
  198. package/ios/DisclosureGroupView.swift +4 -2
  199. package/ios/ExpoUIModule.swift +25 -28
  200. package/ios/FormView.swift +3 -1
  201. package/ios/Gauge/Gauge.swift +1 -0
  202. package/ios/Gauge/GaugeProps.swift +7 -1
  203. package/ios/GroupView.swift +3 -1
  204. package/ios/HStackView.swift +3 -1
  205. package/ios/HostView.swift +1 -1
  206. package/ios/ImageView.swift +3 -1
  207. package/ios/Label.swift +9 -2
  208. package/ios/List.swift +8 -2
  209. package/ios/Modifiers/CommonViewModifiers.swift +6 -3
  210. package/ios/Modifiers/View+ModifierArray.swift +27 -0
  211. package/ios/Modifiers/ViewModifierRegistry.swift +718 -0
  212. package/ios/PickerView.swift +8 -1
  213. package/ios/ProgressView.swift +8 -1
  214. package/ios/SectionView.swift +9 -20
  215. package/ios/SecureField/SecureFieldView.swift +10 -2
  216. package/ios/ShareLinkView.swift +9 -1
  217. package/ios/SliderView.swift +8 -1
  218. package/ios/SpacerView.swift +3 -1
  219. package/ios/SwitchView.swift +8 -1
  220. package/ios/TextField/TextFieldView.swift +8 -1
  221. package/ios/TextView.swift +3 -1
  222. package/ios/VStackView.swift +3 -1
  223. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2-sources.jar +0 -0
  224. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2-sources.jar.md5 +1 -0
  225. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2-sources.jar.sha1 +1 -0
  226. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2-sources.jar.sha256 +1 -0
  227. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2-sources.jar.sha512 +1 -0
  228. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.aar +0 -0
  229. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.aar.md5 +1 -0
  230. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.aar.sha1 +1 -0
  231. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.aar.sha256 +1 -0
  232. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.aar.sha512 +1 -0
  233. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.module → 0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.module} +22 -22
  234. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.module.md5 +1 -0
  235. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.module.sha1 +1 -0
  236. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.module.sha256 +1 -0
  237. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.module.sha512 +1 -0
  238. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.pom → 0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.pom} +1 -1
  239. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.pom.md5 +1 -0
  240. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.pom.sha1 +1 -0
  241. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.pom.sha256 +1 -0
  242. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.2/expo.modules.ui-0.2.0-alpha.2.pom.sha512 +1 -0
  243. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
  244. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
  245. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
  246. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
  247. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
  248. package/package.json +4 -4
  249. package/src/jetpack-compose/AlertDialog/index.tsx +12 -1
  250. package/src/jetpack-compose/Button/index.tsx +6 -1
  251. package/src/jetpack-compose/ContextMenu/index.tsx +6 -0
  252. package/src/jetpack-compose/DatePicker/index.tsx +5 -1
  253. package/src/jetpack-compose/Picker/index.tsx +10 -0
  254. package/src/jetpack-compose/Progress/index.tsx +20 -2
  255. package/src/jetpack-compose/Shape/index.tsx +17 -2
  256. package/src/jetpack-compose/Slider/index.tsx +6 -1
  257. package/src/jetpack-compose/Switch/index.tsx +7 -0
  258. package/src/jetpack-compose/TextInput/index.tsx +6 -1
  259. package/src/jetpack-compose/{index.tsx → index.ts} +1 -0
  260. package/src/jetpack-compose/modifiers.ts +19 -0
  261. package/src/swift-ui/BottomSheet/index.tsx +10 -19
  262. package/src/swift-ui/Button/index.tsx +11 -20
  263. package/src/swift-ui/ColorPicker/index.tsx +10 -18
  264. package/src/{swift-ui-primitives/ContentUnavailableView.tsx → swift-ui/ContentUnavailableView/index.tsx} +16 -9
  265. package/src/swift-ui/ContextMenu/Submenu.tsx +25 -0
  266. package/src/swift-ui/ContextMenu/index.tsx +23 -100
  267. package/src/swift-ui/ContextMenu/types.ts +47 -0
  268. package/src/swift-ui/ContextMenu/utils.ts +8 -13
  269. package/src/swift-ui/DatePicker/index.tsx +10 -40
  270. package/src/{swift-ui-primitives/DisclosureGroup.tsx → swift-ui/DisclosureGroup/index.tsx} +12 -6
  271. package/src/swift-ui/Form/index.tsx +30 -0
  272. package/src/swift-ui/Gauge/index.tsx +12 -23
  273. package/src/swift-ui/Host/index.tsx +7 -2
  274. package/src/{swift-ui-primitives/Image.tsx → swift-ui/Image/index.tsx} +6 -3
  275. package/src/swift-ui/Label/index.tsx +10 -15
  276. package/src/{swift-ui-primitives/Layout.tsx → swift-ui/Layout/index.tsx} +17 -4
  277. package/src/swift-ui/List/index.tsx +16 -28
  278. package/src/swift-ui/Picker/index.tsx +10 -22
  279. package/src/swift-ui/Progress/index.tsx +21 -28
  280. package/src/swift-ui/Section/index.tsx +11 -16
  281. package/src/swift-ui/SecureField/index.tsx +10 -22
  282. package/src/swift-ui/ShareLink/index.tsx +10 -15
  283. package/src/swift-ui/Slider/index.tsx +10 -18
  284. package/src/{swift-ui-primitives/Spacer.tsx → swift-ui/Spacer/index.tsx} +12 -2
  285. package/src/swift-ui/Switch/index.tsx +12 -22
  286. package/src/{swift-ui-primitives/Text.tsx → swift-ui/Text/index.tsx} +6 -2
  287. package/src/swift-ui/TextField/index.tsx +9 -21
  288. package/src/swift-ui/index.tsx +7 -0
  289. package/src/swift-ui/modifiers/index.ts +374 -0
  290. package/src/swift-ui/modifiers/utils.ts +33 -0
  291. package/src/{swift-ui-primitives → swift-ui}/types.ts +48 -4
  292. package/src/types.ts +4 -0
  293. package/swift-ui/index.d.ts +1 -0
  294. package/swift-ui/index.js +1 -0
  295. package/swift-ui/modifiers.d.ts +1 -0
  296. package/swift-ui/modifiers.js +1 -0
  297. package/build/swift-ui-primitives/ContentUnavailableView.d.ts.map +0 -1
  298. package/build/swift-ui-primitives/ContentUnavailableView.js +0 -15
  299. package/build/swift-ui-primitives/ContentUnavailableView.js.map +0 -1
  300. package/build/swift-ui-primitives/DisclosureGroup.d.ts.map +0 -1
  301. package/build/swift-ui-primitives/DisclosureGroup.js +0 -10
  302. package/build/swift-ui-primitives/DisclosureGroup.js.map +0 -1
  303. package/build/swift-ui-primitives/Form.d.ts.map +0 -1
  304. package/build/swift-ui-primitives/Form.js +0 -6
  305. package/build/swift-ui-primitives/Form.js.map +0 -1
  306. package/build/swift-ui-primitives/Image.d.ts.map +0 -1
  307. package/build/swift-ui-primitives/Image.js.map +0 -1
  308. package/build/swift-ui-primitives/Layout.d.ts.map +0 -1
  309. package/build/swift-ui-primitives/Layout.js.map +0 -1
  310. package/build/swift-ui-primitives/Section.d.ts +0 -6
  311. package/build/swift-ui-primitives/Section.d.ts.map +0 -1
  312. package/build/swift-ui-primitives/Section.js +0 -6
  313. package/build/swift-ui-primitives/Section.js.map +0 -1
  314. package/build/swift-ui-primitives/Spacer.d.ts.map +0 -1
  315. package/build/swift-ui-primitives/Spacer.js +0 -6
  316. package/build/swift-ui-primitives/Spacer.js.map +0 -1
  317. package/build/swift-ui-primitives/Text.d.ts.map +0 -1
  318. package/build/swift-ui-primitives/Text.js.map +0 -1
  319. package/build/swift-ui-primitives/index.d.ts +0 -24
  320. package/build/swift-ui-primitives/index.d.ts.map +0 -1
  321. package/build/swift-ui-primitives/index.js +0 -24
  322. package/build/swift-ui-primitives/index.js.map +0 -1
  323. package/build/swift-ui-primitives/types.d.ts.map +0 -1
  324. package/build/swift-ui-primitives/types.js.map +0 -1
  325. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0-sources.jar +0 -0
  326. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0-sources.jar.md5 +0 -1
  327. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0-sources.jar.sha1 +0 -1
  328. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0-sources.jar.sha256 +0 -1
  329. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0-sources.jar.sha512 +0 -1
  330. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.aar +0 -0
  331. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.aar.md5 +0 -1
  332. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.aar.sha1 +0 -1
  333. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.aar.sha256 +0 -1
  334. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.aar.sha512 +0 -1
  335. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.module.md5 +0 -1
  336. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.module.sha1 +0 -1
  337. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.module.sha256 +0 -1
  338. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.module.sha512 +0 -1
  339. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.pom.md5 +0 -1
  340. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.pom.sha1 +0 -1
  341. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.pom.sha256 +0 -1
  342. package/local-maven-repo/expo/modules/ui/expo.modules.ui/0.2.0-alpha.0/expo.modules.ui-0.2.0-alpha.0.pom.sha512 +0 -1
  343. package/src/swift-ui-primitives/Form.tsx +0 -20
  344. package/src/swift-ui-primitives/Section.tsx +0 -15
  345. package/src/swift-ui-primitives/index.tsx +0 -27
  346. package/swift-ui-primitives.d.ts +0 -1
  347. package/swift-ui-primitives.js +0 -1
  348. package/swift-ui.d.ts +0 -1
  349. package/swift-ui.js +0 -1
  350. /package/build/{swift-ui-primitives → swift-ui/ContextMenu}/types.js +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/swift-ui/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Common frame properties that can be applied to any view.\n */\nexport interface FrameProps {\n /**\n * The width of the frame.\n */\n width?: number;\n /**\n * The height of the frame.\n */\n height?: number;\n\n /**\n * The minimum width of the frame.\n */\n minWidth?: number;\n /**\n * The ideal width of the frame.\n */\n idealWidth?: number;\n /**\n * The maximum width of the frame.\n */\n maxWidth?: number;\n /**\n * The minimum height of the frame.\n */\n minHeight?: number;\n /**\n * The ideal height of the frame.\n */\n idealHeight?: number;\n /**\n * The maximum height of the frame.\n */\n maxHeight?: number;\n\n /**\n * The alignment of the content within the frame.\n */\n alignment?:\n | 'center'\n | 'leading'\n | 'trailing'\n | 'top'\n | 'bottom'\n | 'topLeading'\n | 'topTrailing'\n | 'bottomLeading'\n | 'bottomTrailing';\n}\n\n/**\n * Common padding properties that can be applied to any view.\n */\nexport interface PaddingProps {\n /**\n * The padding on the top.\n */\n top?: number;\n /**\n * The padding on the leading edge (left in LTR, right in RTL).\n */\n leading?: number;\n /**\n * The padding on the bottom.\n */\n bottom?: number;\n /**\n * The padding on the trailing edge (right in LTR, left in RTL).\n */\n trailing?: number;\n}\n\n/**\n * Common props that can be applied to any view.\n */\nexport interface CommonViewModifierProps {\n /**\n * @deprecated Use `fixedSize()` modifier instead. This prop will be removed in a future version.\n * @example\n * ```tsx\n * // Old way (deprecated)\n * <Text fixedSize={true}>Hello</Text>\n *\n * // New way (recommended)\n * <Text modifiers={[fixedSize(true)]}>Hello</Text>\n * ```\n */\n fixedSize?: boolean;\n\n /**\n * @deprecated Use `frame()` modifier instead. This prop will be removed in a future version.\n * @example\n * ```tsx\n * // Old way (deprecated)\n * <Text frame={{ width: 100, height: 50 }}>Hello</Text>\n *\n * // New way (recommended)\n * <Text modifiers={[frame({ width: 100, height: 50 })]}>Hello</Text>\n * ```\n */\n frame?: FrameProps;\n\n /**\n * @deprecated Use `padding()` modifier instead. This prop will be removed in a future version.\n * @example\n * ```tsx\n * // Old way (deprecated)\n * <Text padding={{ all: 16 }}>Hello</Text>\n *\n * // New way (recommended)\n * <Text modifiers={[padding({ all: 16 })]}>Hello</Text>\n * ```\n */\n padding?: PaddingProps;\n\n /**\n * Used to locate this view in end-to-end tests.\n */\n testID?: string;\n\n /**\n * Array of view modifiers to apply to this view.\n * Modifiers are applied in the order they appear in the array.\n *\n * @example\n * ```tsx\n * import { background, cornerRadius, shadow, frame, padding, fixedSize } from 'expo-ui/swift-ui/modifiers';\n *\n * <Text modifiers={[\n * background('#FF0000'),\n * cornerRadius(10),\n * padding({ all: 16 }),\n * frame({ width: 200 }),\n * shadow({ radius: 5, x: 0, y: 2 })\n * ]}>\n * Hello World\n * </Text>\n * ```\n */\n modifiers?: import('./modifiers').ViewModifier[];\n}\n"]}
package/build/types.d.ts CHANGED
@@ -1,7 +1,10 @@
1
+ import type { SharedObject } from 'expo';
1
2
  /**
2
3
  * @hidden
3
4
  */
4
5
  export type ViewEvent<Name extends string, Data> = Record<Name, Data extends object ? ((event: {
5
6
  nativeEvent: Data;
6
7
  }) => void) | undefined : (() => void) | undefined>;
8
+ export declare class ExpoModifier extends SharedObject {
9
+ }
7
10
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,IAAI,SAAS,MAAM,EAAE,IAAI,IAAI,MAAM,CACvD,IAAI,EACJ,IAAI,SAAS,MAAM,GACf,CAAC,CAAC,KAAK,EAAE;IAAE,WAAW,EAAE,IAAI,CAAA;CAAE,KAAK,IAAI,CAAC,GAAG,SAAS,GACpD,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAC7B,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAEzC;;GAEG;AACH,MAAM,MAAM,SAAS,CAAC,IAAI,SAAS,MAAM,EAAE,IAAI,IAAI,MAAM,CACvD,IAAI,EACJ,IAAI,SAAS,MAAM,GACf,CAAC,CAAC,KAAK,EAAE;IAAE,WAAW,EAAE,IAAI,CAAA;CAAE,KAAK,IAAI,CAAC,GAAG,SAAS,GACpD,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAC7B,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,YAAY;CAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * @hidden\n */\nexport type ViewEvent<Name extends string, Data> = Record<\n Name,\n Data extends object\n ? ((event: { nativeEvent: Data }) => void) | undefined\n : (() => void) | undefined\n>;\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { SharedObject } from 'expo';\n\n/**\n * @hidden\n */\nexport type ViewEvent<Name extends string, Data> = Record<\n Name,\n Data extends object\n ? ((event: { nativeEvent: Data }) => void) | undefined\n : (() => void) | undefined\n>;\n\nexport declare class ExpoModifier extends SharedObject {}\n"]}
@@ -9,7 +9,7 @@
9
9
  "publication": {
10
10
  "groupId": "expo.modules.ui",
11
11
  "artifactId": "expo.modules.ui",
12
- "version": "0.2.0-alpha.0",
12
+ "version": "0.2.0-alpha.2",
13
13
  "repository": "local-maven-repo"
14
14
  }
15
15
  }
@@ -3,7 +3,13 @@
3
3
  import SwiftUI
4
4
  import ExpoModulesCore
5
5
 
6
- final class BottomSheetProps: ExpoSwiftUI.ViewProps {
6
+ final class BottomSheetProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps {
7
+ @Field var fixedSize: Bool?
8
+ @Field var frame: FrameOptions?
9
+ @Field var padding: PaddingOptions?
10
+ @Field var testID: String?
11
+ @Field var modifiers: ModifierArray?
12
+
7
13
  @Field var isOpened: Bool = false
8
14
  var onIsOpenedChange = EventDispatcher()
9
15
  }
@@ -73,6 +79,7 @@ struct BottomSheetView: ExpoSwiftUI.View {
73
79
  }
74
80
  .presentationDetents([.height(self.height)])
75
81
  }
82
+ .modifier(CommonViewModifiers(props: props))
76
83
  .onChange(of: isOpened, perform: { newIsOpened in
77
84
  if props.isOpened == newIsOpened {
78
85
  return
@@ -92,6 +99,7 @@ struct BottomSheetView: ExpoSwiftUI.View {
92
99
  .sheet(isPresented: $isOpened) {
93
100
  Children()
94
101
  }
102
+ .modifier(CommonViewModifiers(props: props))
95
103
  .onChange(of: isOpened, perform: { newIsOpened in
96
104
  if props.isOpened == newIsOpened {
97
105
  return
@@ -27,6 +27,7 @@ struct Button: ExpoSwiftUI.View {
27
27
  })
28
28
  .disabled(props.disabled)
29
29
  .tint(props.color)
30
+ .modifier(CommonViewModifiers(props: props))
30
31
  // TODO: Maybe there is a way to do a switch statement similarly to the `if` extension?
31
32
  .if(props.variant == .bordered, {
32
33
  $0.buttonStyle(.bordered)
@@ -34,8 +34,13 @@ internal enum ButtonVariant: String, Enumerable {
34
34
  case glassProminent
35
35
  }
36
36
 
37
- final class ButtonProps: ExpoSwiftUI.ViewProps, Observable {
38
- required init() {}
37
+ final class ButtonProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps, Observable {
38
+ @Field var fixedSize: Bool?
39
+ @Field var frame: FrameOptions?
40
+ @Field var padding: PaddingOptions?
41
+ @Field var testID: String?
42
+ @Field var modifiers: ModifierArray?
43
+
39
44
  @Field var text: String?
40
45
  @Field var systemImage: String?
41
46
  @Field var color: Color?
@@ -3,7 +3,13 @@
3
3
  import SwiftUI
4
4
  import ExpoModulesCore
5
5
 
6
- final class ColorPickerProps: ExpoSwiftUI.ViewProps {
6
+ final class ColorPickerProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps {
7
+ @Field var fixedSize: Bool?
8
+ @Field var frame: FrameOptions?
9
+ @Field var padding: PaddingOptions?
10
+ @Field var testID: String?
11
+ @Field var modifiers: ModifierArray?
12
+
7
13
  @Field var selection: Color = .clear
8
14
  @Field var label: String?
9
15
  @Field var supportsOpacity: Bool = true
@@ -18,6 +24,7 @@ struct ColorPickerView: ExpoSwiftUI.View {
18
24
  var body: some View {
19
25
  #if !os(tvOS)
20
26
  ColorPicker(props.label ?? "", selection: $selection, supportsOpacity: props.supportsOpacity)
27
+ .modifier(CommonViewModifiers(props: props))
21
28
  .onAppear {
22
29
  selection = props.selection
23
30
  previousHex = colorToHex(props.selection)
@@ -7,10 +7,12 @@ internal final class ContentUnavailableViewProps: ExpoSwiftUI.ViewProps, CommonV
7
7
  @Field var fixedSize: Bool?
8
8
  @Field var frame: FrameOptions?
9
9
  @Field var padding: PaddingOptions?
10
+ @Field var testID: String?
11
+ @Field var modifiers: ModifierArray?
12
+
10
13
  @Field var title: String = ""
11
14
  @Field var systemImage: String = ""
12
15
  @Field var description: String = ""
13
- @Field var testID: String?
14
16
  }
15
17
 
16
18
  struct ContentUnavailableView: ExpoSwiftUI.View {
@@ -110,6 +110,7 @@ struct ContextMenuPreview: ExpoSwiftUI.View {
110
110
 
111
111
  var body: some View {
112
112
  Children()
113
+ .modifier(CommonViewModifiers(props: props))
113
114
  }
114
115
  }
115
116
 
@@ -118,6 +119,7 @@ struct ContextMenuActivationElement: ExpoSwiftUI.View {
118
119
 
119
120
  var body: some View {
120
121
  Children()
122
+ .modifier(CommonViewModifiers(props: props))
121
123
  }
122
124
  }
123
125
 
@@ -134,6 +136,7 @@ struct ContextMenu: ExpoSwiftUI.View {
134
136
  activationElement: activationElement,
135
137
  props: props
136
138
  )
139
+ .modifier(CommonViewModifiers(props: props))
137
140
  } else {
138
141
  let preview = props.children?
139
142
  .compactMap { $0.childView as? ContextMenuPreview }
@@ -148,12 +151,14 @@ struct ContextMenu: ExpoSwiftUI.View {
148
151
  preview: preview,
149
152
  props: props
150
153
  )
154
+ .modifier(CommonViewModifiers(props: props))
151
155
  } else {
152
156
  LongPressContextMenu(
153
157
  elements: props.elements,
154
158
  activationElement: activationElement,
155
159
  props: props
156
160
  )
161
+ .modifier(CommonViewModifiers(props: props))
157
162
  }
158
163
  }
159
164
  }
@@ -20,7 +20,13 @@ internal final class ContextMenuElement: Record, Identifiable {
20
20
  @Field var contextMenuElementID: String?
21
21
  }
22
22
 
23
- internal final class ContextMenuProps: ExpoSwiftUI.ViewProps {
23
+ internal final class ContextMenuProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps {
24
+ @Field var fixedSize: Bool?
25
+ @Field var frame: FrameOptions?
26
+ @Field var padding: PaddingOptions?
27
+ @Field var testID: String?
28
+ @Field var modifiers: ModifierArray?
29
+
24
30
  @Field var elements: [ContextMenuElement]
25
31
  var onContextMenuButtonPressed = EventDispatcher()
26
32
  var onContextMenuPickerOptionSelected = EventDispatcher()
@@ -28,8 +34,18 @@ internal final class ContextMenuProps: ExpoSwiftUI.ViewProps {
28
34
  @Field var activationMethod: ActivationMethod? = .singlePress
29
35
  }
30
36
 
31
- internal final class ContextMenuPreviewProps: ExpoSwiftUI.ViewProps {
37
+ internal final class ContextMenuPreviewProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps {
38
+ @Field var fixedSize: Bool?
39
+ @Field var frame: FrameOptions?
40
+ @Field var padding: PaddingOptions?
41
+ @Field var testID: String?
42
+ @Field var modifiers: ModifierArray?
32
43
  }
33
44
 
34
- internal final class ContextMenuActivationElementProps: ExpoSwiftUI.ViewProps {
45
+ internal final class ContextMenuActivationElementProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps {
46
+ @Field var fixedSize: Bool?
47
+ @Field var frame: FrameOptions?
48
+ @Field var padding: PaddingOptions?
49
+ @Field var testID: String?
50
+ @Field var modifiers: ModifierArray?
35
51
  }
@@ -1,7 +1,13 @@
1
1
  import ExpoModulesCore
2
2
  import SwiftUI
3
3
 
4
- final class DateTimePickerProps: ExpoSwiftUI.ViewProps {
4
+ final class DateTimePickerProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps {
5
+ @Field var fixedSize: Bool?
6
+ @Field var frame: FrameOptions?
7
+ @Field var padding: PaddingOptions?
8
+ @Field var testID: String?
9
+ @Field var modifiers: ModifierArray?
10
+
5
11
  @Field var title: String?
6
12
  @Field var initialDate: Date?
7
13
  @Field var variant: PickerStyle = .automatic
@@ -25,6 +31,7 @@ struct DateTimePickerView: ExpoSwiftUI.View {
25
31
  let displayedComponents = props.displayedComponents.toDatePickerComponent()
26
32
 
27
33
  DatePicker(props.title ?? "", selection: $date, displayedComponents: displayedComponents)
34
+ .modifier(CommonViewModifiers(props: props))
28
35
  .onAppear {
29
36
  date = props.initialDate ?? Date()
30
37
  }
@@ -7,9 +7,11 @@ internal final class DisclosureGroupViewProps: ExpoSwiftUI.ViewProps, CommonView
7
7
  @Field var fixedSize: Bool?
8
8
  @Field var frame: FrameOptions?
9
9
  @Field var padding: PaddingOptions?
10
+ @Field var testID: String?
11
+ @Field var modifiers: ModifierArray?
12
+
10
13
  @Field var label: String
11
14
  @Field var isExpanded: Bool = true
12
- @Field var testID: String?
13
15
  var onStateChange = EventDispatcher()
14
16
  }
15
17
 
@@ -24,6 +26,7 @@ internal struct DisclosureGroupView: ExpoSwiftUI.View {
24
26
  DisclosureGroup(props.label, isExpanded: $isExpanded) {
25
27
  Children()
26
28
  }
29
+ .modifier(CommonViewModifiers(props: props))
27
30
  .onAppear {
28
31
  isExpanded = props.isExpanded
29
32
  }
@@ -34,7 +37,6 @@ internal struct DisclosureGroupView: ExpoSwiftUI.View {
34
37
  .onChange(of: props.isExpanded) { newValue in
35
38
  isExpanded = newValue
36
39
  }
37
- .modifier(CommonViewModifiers(props: props))
38
40
  #endif
39
41
  }
40
42
  }
@@ -6,44 +6,41 @@ public final class ExpoUIModule: Module {
6
6
  public func definition() -> ModuleDefinition {
7
7
  Name("ExpoUI")
8
8
 
9
- View(Button.self)
10
- View(PickerView.self)
11
- View(SwitchView.self)
12
- View(SectionView.self)
13
9
  View(BottomSheetView.self)
14
- View(SliderView.self)
10
+ View(Button.self)
11
+ View(ColorPickerView.self)
12
+ View(DateTimePickerView.self)
13
+ View(DisclosureGroupView.self)
14
+ View(ExpoUI.ContentUnavailableView.self)
15
15
  View(ExpoUI.ContextMenu.self)
16
16
  View(ExpoUI.ContextMenuActivationElement.self)
17
17
  View(ExpoUI.ContextMenuPreview.self)
18
- View(ColorPickerView.self)
19
- View(DateTimePickerView.self)
20
- View(TextFieldView.self) {
21
- AsyncFunction("setText") { (view: TextFieldView, text: String) in
22
- view.setText(text)
23
- }
24
- }
18
+ View(FormView.self)
19
+ View(GaugeView.self)
20
+ View(GroupView.self)
21
+ View(HStackView.self)
22
+ View(HostView.self)
23
+ View(ImageView.self)
24
+ View(LabelView.self)
25
+ View(ListView.self)
26
+ View(PickerView.self)
27
+ View(ProgressView.self)
28
+ View(SectionView.self)
25
29
  View(SecureFieldView.self) {
26
30
  AsyncFunction("setText") { (view: SecureFieldView, text: String) in
27
31
  view.setText(text)
28
32
  }
29
33
  }
30
- View(ProgressView.self)
31
- View(GaugeView.self)
32
- View(ListView.self)
33
- View(LabelView.self)
34
34
  View(ShareLinkView.self)
35
- View(HostView.self)
36
-
37
- // Preview components in the "primitives" exports
38
- View(FormView.self)
39
- View(HStackView.self)
40
- View(VStackView.self)
41
- View(SectionPrimitiveView.self)
42
- View(TextView.self)
43
- View(ImageView.self)
35
+ View(SliderView.self)
44
36
  View(SpacerView.self)
45
- View(GroupView.self)
46
- View(DisclosureGroupView.self)
47
- View(ExpoUI.ContentUnavailableView.self)
37
+ View(SwitchView.self)
38
+ View(TextView.self)
39
+ View(TextFieldView.self) {
40
+ AsyncFunction("setText") { (view: TextFieldView, text: String) in
41
+ view.setText(text)
42
+ }
43
+ }
44
+ View(VStackView.self)
48
45
  }
49
46
  }
@@ -7,8 +7,10 @@ internal final class FormViewProps: ExpoSwiftUI.ViewProps, CommonViewModifierPro
7
7
  @Field var fixedSize: Bool?
8
8
  @Field var frame: FrameOptions?
9
9
  @Field var padding: PaddingOptions?
10
- @Field var scrollEnabled: Bool = true
11
10
  @Field var testID: String?
11
+ @Field var modifiers: ModifierArray?
12
+
13
+ @Field var scrollEnabled: Bool = true
12
14
  }
13
15
 
14
16
  internal struct FormView: ExpoSwiftUI.View {
@@ -21,6 +21,7 @@ struct GaugeView: ExpoSwiftUI.View {
21
21
  } maximumValueLabel: {
22
22
  optionalLabelFor(props.max)
23
23
  }
24
+ .modifier(CommonViewModifiers(props: props))
24
25
  .if(props.type == .default) { $0.gaugeStyle(.automatic) }
25
26
  .if(props.type == .circular) { $0.gaugeStyle(.accessoryCircular) }
26
27
  .if(props.type == .circularCapacity) { $0.gaugeStyle(.accessoryCircularCapacity) }
@@ -17,7 +17,13 @@ internal enum GaugeStyle: String, Enumerable {
17
17
  case linearCapacity
18
18
  }
19
19
 
20
- final class GaugeProps: ExpoSwiftUI.ViewProps {
20
+ final class GaugeProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps {
21
+ @Field var fixedSize: Bool?
22
+ @Field var frame: FrameOptions?
23
+ @Field var padding: PaddingOptions?
24
+ @Field var testID: String?
25
+ @Field var modifiers: ModifierArray?
26
+
21
27
  @Field var label: String?
22
28
  @Field var labelColor: Color?
23
29
  @Field var current: ValueOptions
@@ -7,8 +7,10 @@ internal final class GroupViewProps: ExpoSwiftUI.ViewProps, CommonViewModifierPr
7
7
  @Field var fixedSize: Bool?
8
8
  @Field var frame: FrameOptions?
9
9
  @Field var padding: PaddingOptions?
10
- @Field var useTapGesture: Bool?
11
10
  @Field var testID: String?
11
+ @Field var modifiers: ModifierArray?
12
+
13
+ @Field var useTapGesture: Bool?
12
14
  var onTap = EventDispatcher()
13
15
  }
14
16
 
@@ -30,11 +30,13 @@ internal final class HStackViewProps: ExpoSwiftUI.ViewProps, CommonViewModifierP
30
30
  @Field var fixedSize: Bool?
31
31
  @Field var frame: FrameOptions?
32
32
  @Field var padding: PaddingOptions?
33
+ @Field var testID: String?
34
+ @Field var modifiers: ModifierArray?
35
+
33
36
  @Field var spacing: Double?
34
37
  @Field var useTapGesture: Bool?
35
38
  @Field var alignment: VerticalAlignmentOptions?
36
39
  @Field var backgroundColor: Color?
37
- @Field var testID: String?
38
40
  var onTap = EventDispatcher()
39
41
  }
40
42
 
@@ -23,7 +23,7 @@ internal final class HostViewProps: ExpoSwiftUI.ViewProps {
23
23
  var onLayoutContent = EventDispatcher()
24
24
  }
25
25
 
26
- internal struct HostView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
26
+ struct HostView: ExpoSwiftUI.View, ExpoSwiftUI.WithHostingView {
27
27
  @ObservedObject var props: HostViewProps
28
28
 
29
29
  var body: some View {
@@ -7,11 +7,13 @@ internal final class ImageViewProps: ExpoSwiftUI.ViewProps, CommonViewModifierPr
7
7
  @Field var fixedSize: Bool?
8
8
  @Field var frame: FrameOptions?
9
9
  @Field var padding: PaddingOptions?
10
+ @Field var testID: String?
11
+ @Field var modifiers: ModifierArray?
12
+
10
13
  @Field var systemName: String = ""
11
14
  @Field var size: Double?
12
15
  @Field var color: Color?
13
16
  @Field var useTapGesture: Bool?
14
- @Field var testID: String?
15
17
  var onTap = EventDispatcher()
16
18
  }
17
19
 
package/ios/Label.swift CHANGED
@@ -3,7 +3,13 @@
3
3
  import ExpoModulesCore
4
4
  import SwiftUI
5
5
 
6
- final class LabelViewProps: ExpoSwiftUI.ViewProps {
6
+ final class LabelViewProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps {
7
+ @Field var fixedSize: Bool?
8
+ @Field var frame: FrameOptions?
9
+ @Field var padding: PaddingOptions?
10
+ @Field var testID: String?
11
+ @Field var modifiers: ModifierArray?
12
+
7
13
  @Field var title: String?
8
14
  @Field var systemImage: String?
9
15
  @Field var color: Color?
@@ -17,6 +23,7 @@ struct LabelView: ExpoSwiftUI.View {
17
23
  title: { Text(props.title ?? "") },
18
24
  icon: { Image(systemName: props.systemImage ?? "").foregroundStyle(props.color ?? Color.accentColor) }
19
25
  )
20
- .fixedSize()
26
+ .modifier(CommonViewModifiers(props: props))
27
+ .applyFixedSize(props.fixedSize ?? true)
21
28
  }
22
29
  }
package/ios/List.swift CHANGED
@@ -3,7 +3,13 @@
3
3
  import ExpoModulesCore
4
4
  import SwiftUI
5
5
 
6
- final class ListProps: ExpoSwiftUI.ViewProps {
6
+ final class ListProps: ExpoSwiftUI.ViewProps, CommonViewModifierProps {
7
+ @Field var fixedSize: Bool?
8
+ @Field var frame: FrameOptions?
9
+ @Field var padding: PaddingOptions?
10
+ @Field var testID: String?
11
+ @Field var modifiers: ModifierArray?
12
+
7
13
  @Field var listStyle: String = "automatic"
8
14
  @Field var moveEnabled: Bool = false
9
15
  @Field var deleteEnabled: Bool = false
@@ -34,6 +40,7 @@ struct ListView: ExpoSwiftUI.View {
34
40
  .moveDisabled(!props.moveEnabled)
35
41
  }
36
42
  .modifier(ListStyleModifer(style: props.listStyle))
43
+ .modifier(CommonViewModifiers(props: props))
37
44
  .onAppear {
38
45
  editModeEnabled = props.editModeEnabled ? .active : .inactive
39
46
  }
@@ -43,7 +50,6 @@ struct ListView: ExpoSwiftUI.View {
43
50
  }
44
51
  }
45
52
  .onChange(of: selection) { selection in
46
- print(selection)
47
53
  handleSelectionChange(selection: selection)
48
54
  }
49
55
  .modifier(ScrollDisabledModifier(scrollEnabled: props.scrollEnabled))
@@ -3,15 +3,17 @@
3
3
  import ExpoModulesCore
4
4
  import SwiftUI
5
5
 
6
- internal protocol CommonViewModifierProps {
6
+ internal protocol CommonViewModifierProps: ObservableObject {
7
7
  var fixedSize: Bool? { get }
8
8
  var frame: FrameOptions? { get }
9
9
  var padding: PaddingOptions? { get }
10
10
  var testID: String? { get }
11
+ var modifiers: ModifierArray? { get }
12
+ var globalEventDispatcher: EventDispatcher { get }
11
13
  }
12
14
 
13
- internal struct CommonViewModifiers: ViewModifier {
14
- let props: CommonViewModifierProps
15
+ internal struct CommonViewModifiers<Props: CommonViewModifierProps>: ViewModifier {
16
+ @ObservedObject var props: Props
15
17
  var defaultFrameAlignment = Alignment.center
16
18
 
17
19
  func body(content: Content) -> some View {
@@ -20,5 +22,6 @@ internal struct CommonViewModifiers: ViewModifier {
20
22
  .applyFrame(props.frame, defaultAlignment: defaultFrameAlignment)
21
23
  .applyPadding(props.padding)
22
24
  .applyAccessibilityIdentifier(props.testID)
25
+ .applyModifiers(props.modifiers, globalEventDispatcher: props.globalEventDispatcher)
23
26
  }
24
27
  }
@@ -0,0 +1,27 @@
1
+ // Copyright 2015-present 650 Industries. All rights reserved.
2
+
3
+ import ExpoModulesCore
4
+ import SwiftUI
5
+
6
+ internal typealias ModifierType = [String: Any]
7
+ internal typealias ModifierArray = [ModifierType]
8
+
9
+ internal extension View {
10
+ /**
11
+ * Applies an array of modifiers to a view using the ViewModifierRegistry.
12
+ */
13
+ @ViewBuilder
14
+ func applyModifiers(_ modifiers: ModifierArray?, globalEventDispatcher: EventDispatcher) -> some View {
15
+ if let modifiers = modifiers {
16
+ modifiers.reduce(AnyView(self)) { currentView, modifierConfig in
17
+ guard let type = modifierConfig["$type"] as? String else {
18
+ return currentView
19
+ }
20
+
21
+ return ViewModifierRegistry.shared.applyModifier(type, to: currentView, globalEventDispatcher: globalEventDispatcher, params: modifierConfig)
22
+ }
23
+ } else {
24
+ self
25
+ }
26
+ }
27
+ }