@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
@@ -10,9 +10,9 @@ export type StepperProps = {
10
10
  */
11
11
  label: string;
12
12
  /**
13
- * The initial/default value of the stepper.
13
+ * The current value of the stepper.
14
14
  */
15
- defaultValue?: number;
15
+ value?: number;
16
16
  /**
17
17
  * The step value for increment/decrement operations.
18
18
  */
@@ -28,11 +28,11 @@ export type StepperProps = {
28
28
  /**
29
29
  * Called when the stepper value changes.
30
30
  */
31
- onValueChanged: (value: number) => void;
31
+ onValueChange: (value: number) => void;
32
32
  } & CommonViewModifierProps;
33
33
 
34
- type NativeStepperProps = Omit<StepperProps, 'onValueChanged'> &
35
- ViewEvent<'onValueChanged', { value: number }>;
34
+ type NativeStepperProps = Omit<StepperProps, 'onValueChange'> &
35
+ ViewEvent<'onValueChange', { value: number }>;
36
36
 
37
37
  const StepperNativeView: React.ComponentType<NativeStepperProps> = requireNativeView(
38
38
  'ExpoUI',
@@ -45,8 +45,8 @@ function transformStepperProps(props: StepperProps): NativeStepperProps {
45
45
  modifiers,
46
46
  ...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
47
47
  ...restProps,
48
- onValueChanged: ({ nativeEvent: { value } }) => {
49
- props.onValueChanged(value);
48
+ onValueChange: ({ nativeEvent: { value } }) => {
49
+ props.onValueChange(value);
50
50
  },
51
51
  };
52
52
  }
@@ -2,7 +2,12 @@ import { requireNativeView } from 'expo';
2
2
  import * as React from 'react';
3
3
 
4
4
  import { createViewModifierEventListener } from '../modifiers/utils';
5
- import { type CommonViewModifierProps } from '../types';
5
+ import { type ClosedRangeDate, type CommonViewModifierProps } from '../types';
6
+
7
+ /**
8
+ * The style used to format a date in a SwiftUI `Text` view.
9
+ */
10
+ export type TextDateStyle = 'timer' | 'relative' | 'offset' | 'date' | 'time';
6
11
 
7
12
  export interface TextProps extends CommonViewModifierProps {
8
13
  /**
@@ -14,12 +19,50 @@ export interface TextProps extends CommonViewModifierProps {
14
19
  * Enables Markdown formatting for the text content using SwiftUI LocalizedStringKey.
15
20
  */
16
21
  markdownEnabled?: boolean;
22
+
23
+ /**
24
+ * A date to display using the specified `dateStyle`. The text auto-updates as time passes.
25
+ */
26
+ date?: Date;
27
+
28
+ /**
29
+ * The style used to format the `date` prop.
30
+ * @default 'date'
31
+ */
32
+ dateStyle?: TextDateStyle;
33
+
34
+ /**
35
+ * A time interval to display as a live-updating timer.
36
+ * @platform ios 16.0+
37
+ * @platform tvos 16.0+
38
+ */
39
+ timerInterval?: ClosedRangeDate;
40
+
41
+ /**
42
+ * Whether the timer counts down (`true`) or up (`false`).
43
+ * @default true
44
+ * @platform ios 16.0+
45
+ * @platform tvos 16.0+
46
+ */
47
+ countsDown?: boolean;
48
+
49
+ /**
50
+ * A date at which the timer should appear paused.
51
+ * @platform ios 16.0+
52
+ * @platform tvos 16.0+
53
+ */
54
+ pauseTime?: Date;
17
55
  }
18
56
 
19
57
  type NativeTextProps = CommonViewModifierProps & {
20
58
  text?: string;
21
59
  children?: React.ReactNode;
22
60
  markdownEnabled?: boolean;
61
+ date?: number;
62
+ dateStyle?: TextDateStyle;
63
+ timerInterval?: { lower: number; upper: number };
64
+ countsDown?: boolean;
65
+ pauseTime?: number;
23
66
  };
24
67
 
25
68
  const TextNativeView: React.ComponentType<NativeTextProps> = requireNativeView(
@@ -28,7 +71,28 @@ const TextNativeView: React.ComponentType<NativeTextProps> = requireNativeView(
28
71
  );
29
72
 
30
73
  export function Text(props: TextProps) {
31
- const { children, modifiers, ...restProps } = props;
74
+ const { children, modifiers, date, timerInterval, pauseTime, ...restProps } = props;
75
+
76
+ // Date/timer mode: pass converted timestamps to native, ignore children
77
+ if (date != null || timerInterval != null) {
78
+ return (
79
+ <TextNativeView
80
+ modifiers={modifiers}
81
+ {...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
82
+ {...restProps}
83
+ date={date ? date.getTime() : undefined}
84
+ timerInterval={
85
+ timerInterval
86
+ ? {
87
+ lower: timerInterval.lower.getTime(),
88
+ upper: timerInterval.upper.getTime(),
89
+ }
90
+ : undefined
91
+ }
92
+ pauseTime={pauseTime ? pauseTime.getTime() : undefined}
93
+ />
94
+ );
95
+ }
32
96
 
33
97
  if (children === undefined || children === null) {
34
98
  return null;
@@ -1,9 +1,11 @@
1
+ export * from './AccessoryWidgetBackground';
1
2
  export * from './BottomSheet';
2
3
  export * from './Button';
3
4
  export * from './Chart';
4
5
  export * from './ColorPicker';
5
6
  export * from './ContentUnavailableView';
6
7
  export * from './ConfirmationDialog';
8
+ export * from './ControlGroup';
7
9
  export * from './ContextMenu';
8
10
  export * from './DatePicker';
9
11
  export * from './Divider';
@@ -238,6 +238,24 @@ export const scaleEffect = (scale: number | { x: number; y: number }) =>
238
238
  */
239
239
  export const rotationEffect = (angle: number) => createModifier('rotationEffect', { angle });
240
240
 
241
+ /**
242
+ * Applies a 3D rotation transformation.
243
+ * @param params - The rotation parameters: `angle` (in degrees), `axis` (x, y, z), and `perspective`.
244
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/rotation3deffect(_:axis:anchor:anchorz:perspective:)).
245
+ */
246
+ export const rotation3DEffect = (params: {
247
+ angle: number;
248
+ axis?: { x?: number; y?: number; z?: number };
249
+ perspective?: number;
250
+ }) =>
251
+ createModifier('rotation3DEffect', {
252
+ angle: params.angle,
253
+ axisX: params.axis?.x ?? 0,
254
+ axisY: params.axis?.y ?? 0,
255
+ axisZ: params.axis?.z ?? 0,
256
+ perspective: params.perspective ?? 1,
257
+ });
258
+
241
259
  /**
242
260
  * Applies an offset (translation) to a view.
243
261
  * @param params - The offset parameters: `x` and `y`.
@@ -549,6 +567,44 @@ export const scrollDismissesKeyboard = (
549
567
  export const scrollDisabled = (disabled: boolean = true) =>
550
568
  createModifier('scrollDisabled', { disabled });
551
569
 
570
+ type UnitPointValue =
571
+ | 'zero'
572
+ | 'topLeading'
573
+ | 'top'
574
+ | 'topTrailing'
575
+ | 'leading'
576
+ | 'center'
577
+ | 'trailing'
578
+ | 'bottomLeading'
579
+ | 'bottom'
580
+ | 'bottomTrailing';
581
+
582
+ /**
583
+ * Sets the default anchor point for a scroll view's content.
584
+ * @param anchor - The anchor point for initial scroll position and content size changes, or `null` to reset.
585
+ * @platform ios 17.0+
586
+ * @platform tvos 17.0+
587
+ * @platform macos 14.0+
588
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/defaultscrollanchor(_:)).
589
+ */
590
+ export const defaultScrollAnchor = (anchor: UnitPointValue | null) =>
591
+ createModifier('defaultScrollAnchor', { anchor });
592
+
593
+ /**
594
+ * Sets the default anchor point for a scroll view for a specific role.
595
+ * Pass `null` to opt out of a specific role while keeping anchors for other roles.
596
+ * @param anchor - The anchor point, or `null` to opt out of this role.
597
+ * @param role - The scroll anchor role: `'initialOffset'`, `'sizeChanges'`, or `'alignment'`.
598
+ * @platform ios 18.0+
599
+ * @platform tvos 18.0+
600
+ * @platform macos 15.0+
601
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/defaultscrollanchor(_:for:)).
602
+ */
603
+ export const defaultScrollAnchorForRole = (
604
+ anchor: UnitPointValue | null,
605
+ role: 'initialOffset' | 'sizeChanges' | 'alignment'
606
+ ) => createModifier('defaultScrollAnchorForRole', { anchor, role });
607
+
552
608
  /**
553
609
  * Disables the move action for a view in a list.
554
610
  * Apply to items within a `ForEach` to prevent them from being moved.
@@ -984,6 +1040,31 @@ export const listStyle = (style: ListStyle) => createModifier('listStyle', { sty
984
1040
  */
985
1041
  export const luminanceToAlpha = () => createModifier('luminanceToAlpha', {});
986
1042
 
1043
+ /**
1044
+ * Sets the mode by which SwiftUI resizes an image to fit its space.
1045
+ * @param capInsets - Inset values that indicate a portion of the image that SwiftUI doesn’t resize.
1046
+ * @param resizingMode - The mode by which SwiftUI resizes the image.
1047
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/image/resizable(capinsets:resizingmode:)).
1048
+ */
1049
+ export const resizable = (
1050
+ capInsets?: {
1051
+ top?: number;
1052
+ bottom?: number;
1053
+ leading?: number;
1054
+ trailing?: number;
1055
+ },
1056
+ resizingMode?: 'stretch' | 'tile'
1057
+ ) => createModifier('resizable', { ...capInsets, resizingMode });
1058
+
1059
+ /**
1060
+ * Specifies the how to render an Image when using the WidgetKit/WidgetRenderingMode/accented mode.
1061
+ * @param renderingMode - A constant describing how the Image should be rendered.
1062
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/image/widgetaccentedrenderingmode(_:)).
1063
+ */
1064
+ export const widgetAccentedRenderingMode = (
1065
+ renderingMode: 'fullColor' | 'accented' | 'desaturated' | 'accentedDesaturated'
1066
+ ) => createModifier('widgetAccentedRenderingMode', { renderingMode });
1067
+
987
1068
  // =============================================================================
988
1069
  // Type Definitions
989
1070
  // =============================================================================
@@ -1012,6 +1093,7 @@ export type BuiltInModifier =
1012
1093
  | ReturnType<typeof border>
1013
1094
  | ReturnType<typeof scaleEffect>
1014
1095
  | ReturnType<typeof rotationEffect>
1096
+ | ReturnType<typeof rotation3DEffect>
1015
1097
  | ReturnType<typeof offset>
1016
1098
  | ReturnType<typeof foregroundColor>
1017
1099
  | ReturnType<typeof foregroundStyle>
@@ -1053,6 +1135,8 @@ export type BuiltInModifier =
1053
1135
  | ReturnType<typeof containerRelativeFrame>
1054
1136
  | ReturnType<typeof scrollContentBackground>
1055
1137
  | ReturnType<typeof scrollDisabled>
1138
+ | ReturnType<typeof defaultScrollAnchor>
1139
+ | ReturnType<typeof defaultScrollAnchorForRole>
1056
1140
  | ReturnType<typeof moveDisabled>
1057
1141
  | ReturnType<typeof deleteDisabled>
1058
1142
  | ReturnType<typeof environment>
@@ -1083,7 +1167,9 @@ export type BuiltInModifier =
1083
1167
  | ReturnType<typeof progressViewStyle>
1084
1168
  | ReturnType<typeof gaugeStyle>
1085
1169
  | ReturnType<typeof listStyle>
1086
- | ReturnType<typeof contentTransition>;
1170
+ | ReturnType<typeof contentTransition>
1171
+ | ReturnType<typeof resizable>
1172
+ | ReturnType<typeof widgetAccentedRenderingMode>;
1087
1173
 
1088
1174
  /**
1089
1175
  * Main ViewModifier type that supports both built-in and 3rd party modifiers.
@@ -73,6 +73,11 @@ export interface PaddingProps {
73
73
  trailing?: number;
74
74
  }
75
75
 
76
+ /**
77
+ * A closed date range with lower and upper bounds.
78
+ */
79
+ export type ClosedRangeDate = { lower: Date; upper: Date };
80
+
76
81
  /**
77
82
  * Common props that can be applied to any view.
78
83
  */
@@ -1,59 +0,0 @@
1
- package expo.modules.ui
2
-
3
- import androidx.compose.material3.FilterChip
4
- import androidx.compose.material3.FilterChipDefaults
5
- import androidx.compose.material3.Text
6
- import androidx.compose.runtime.Composable
7
- import expo.modules.kotlin.records.Record
8
- import expo.modules.kotlin.views.ComposableScope
9
- import expo.modules.kotlin.views.ComposeProps
10
- import expo.modules.kotlin.views.FunctionalComposableScope
11
- import java.io.Serializable
12
-
13
- open class FilterChipPressedEvent : Record, Serializable
14
-
15
- data class FilterChipProps(
16
- val selected: Boolean = false,
17
- val label: String = "",
18
- val enabled: Boolean = true,
19
- val modifiers: ModifierList = emptyList()
20
- ) : ComposeProps
21
-
22
- @Composable
23
- fun FunctionalComposableScope.FilterChipContent(
24
- props: FilterChipProps,
25
- onPress: (FilterChipPressedEvent) -> Unit
26
- ) {
27
- val modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher)
28
-
29
- val leadingIconSlotView = findChildSlotView(view, "leadingIcon")
30
- val trailingIconSlotView = findChildSlotView(view, "trailingIcon")
31
-
32
- FilterChip(
33
- selected = props.selected,
34
- onClick = { onPress(FilterChipPressedEvent()) },
35
- label = { Text(props.label) },
36
- enabled = props.enabled,
37
- leadingIcon = leadingIconSlotView?.let {
38
- {
39
- with(ComposableScope()) {
40
- with(it) {
41
- Content()
42
- }
43
- }
44
- }
45
- },
46
- trailingIcon = trailingIconSlotView?.let {
47
- {
48
- with(ComposableScope()) {
49
- with(it) {
50
- Content()
51
- }
52
- }
53
- }
54
- },
55
- colors = FilterChipDefaults.filterChipColors(),
56
- border = FilterChipDefaults.filterChipBorder(enabled = props.enabled, selected = props.selected),
57
- modifier = modifier
58
- )
59
- }
@@ -1,161 +0,0 @@
1
- package expo.modules.ui
2
-
3
- import android.graphics.Color
4
- import androidx.compose.foundation.layout.Column
5
- import androidx.compose.foundation.layout.Row
6
- import androidx.compose.foundation.layout.fillMaxWidth
7
- import androidx.compose.foundation.layout.height
8
- import androidx.compose.foundation.layout.padding
9
- import androidx.compose.foundation.selection.selectable
10
- import androidx.compose.foundation.selection.selectableGroup
11
- import androidx.compose.material3.RadioButton
12
- import androidx.compose.material3.SegmentedButton
13
- import androidx.compose.material3.SegmentedButtonDefaults
14
- import androidx.compose.material3.SingleChoiceSegmentedButtonRow
15
- import androidx.compose.material3.Text
16
- import androidx.compose.runtime.Composable
17
- import androidx.compose.ui.Alignment
18
- import androidx.compose.ui.Modifier
19
- import androidx.compose.ui.semantics.Role
20
- import androidx.compose.ui.unit.dp
21
- import expo.modules.kotlin.records.Field
22
- import expo.modules.kotlin.records.Record
23
- import expo.modules.kotlin.views.ComposeProps
24
- import expo.modules.kotlin.views.FunctionalComposableScope
25
-
26
- class PickerColors : Record {
27
- @Field
28
- val activeBorderColor: Color? = null
29
-
30
- @Field
31
- val activeContentColor: Color? = null
32
-
33
- @Field
34
- val inactiveBorderColor: Color? = null
35
-
36
- @Field
37
- val inactiveContentColor: Color? = null
38
-
39
- @Field
40
- val disabledActiveBorderColor: Color? = null
41
-
42
- @Field
43
- val disabledActiveContentColor: Color? = null
44
-
45
- @Field
46
- val disabledInactiveBorderColor: Color? = null
47
-
48
- @Field
49
- val disabledInactiveContentColor: Color? = null
50
-
51
- @Field
52
- val activeContainerColor: Color? = null
53
-
54
- @Field
55
- val inactiveContainerColor: Color? = null
56
-
57
- @Field
58
- val disabledActiveContainerColor: Color? = null
59
-
60
- @Field
61
- val disabledInactiveContainerColor: Color? = null
62
- }
63
-
64
- data class PickerProps(
65
- val options: Array<String> = emptyArray(),
66
- val selectedIndex: Int? = null,
67
- val elementColors: PickerColors = PickerColors(),
68
- val variant: String = "segmented",
69
- val buttonModifiers: List<ModifierType> = emptyList(),
70
- val modifiers: ModifierList = emptyList()
71
- ) : ComposeProps
72
-
73
- data class PickerOptionSelectedEvent(
74
- @Field val index: Int,
75
- @Field val label: String
76
- ) : Record
77
-
78
- @Composable
79
- fun FunctionalComposableScope.PickerContent(
80
- props: PickerProps,
81
- onOptionSelected: (PickerOptionSelectedEvent) -> Unit
82
- ) {
83
- val selectedIndex = props.selectedIndex
84
- val options = props.options
85
- val colors = props.elementColors
86
- val variant = props.variant
87
-
88
- @Composable
89
- fun SegmentedComposable() {
90
- SingleChoiceSegmentedButtonRow(
91
- modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher)
92
- ) {
93
- options.forEachIndexed { index, label ->
94
- SegmentedButton(
95
- shape = SegmentedButtonDefaults.itemShape(
96
- index = index,
97
- count = options.size
98
- ),
99
- onClick = {
100
- onOptionSelected(PickerOptionSelectedEvent(index, label))
101
- },
102
- modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher),
103
- selected = index == selectedIndex,
104
- label = { Text(label) },
105
- colors = SegmentedButtonDefaults.colors(
106
- activeBorderColor = colors.activeBorderColor.compose,
107
- activeContentColor = colors.activeContentColor.compose,
108
- inactiveBorderColor = colors.inactiveBorderColor.compose,
109
- inactiveContentColor = colors.inactiveContentColor.compose,
110
- disabledActiveBorderColor = colors.disabledActiveBorderColor.compose,
111
- disabledActiveContentColor = colors.disabledActiveContentColor.compose,
112
- disabledInactiveBorderColor = colors.disabledInactiveBorderColor.compose,
113
- disabledInactiveContentColor = colors.disabledInactiveContentColor.compose,
114
- activeContainerColor = colors.activeContainerColor.compose,
115
- inactiveContainerColor = colors.inactiveContainerColor.compose,
116
- disabledActiveContainerColor = colors.disabledActiveContainerColor.compose,
117
- disabledInactiveContainerColor = colors.disabledInactiveContainerColor.compose
118
- )
119
- )
120
- }
121
- }
122
- }
123
-
124
- @Composable
125
- fun RadioComposable() {
126
- Column(Modifier.selectableGroup()) {
127
- options.forEachIndexed { index, label ->
128
- Row(
129
- Modifier.fillMaxWidth()
130
- .height(28.dp)
131
- .selectable(
132
- selected = index == selectedIndex,
133
- onClick = {
134
- onOptionSelected(PickerOptionSelectedEvent(index, label))
135
- },
136
- role = Role.RadioButton
137
- ),
138
- verticalAlignment = Alignment.CenterVertically
139
- ) {
140
- RadioButton(
141
- selected = index == selectedIndex,
142
- onClick = null
143
- )
144
- Text(
145
- text = label,
146
- modifier = Modifier.padding(start = 12.dp)
147
- )
148
- }
149
- }
150
- }
151
- }
152
-
153
- if (variant == "segmented") {
154
- SegmentedComposable()
155
- } else if (variant == "radio") {
156
- RadioComposable()
157
- } else {
158
- // Default to segmented picker
159
- SegmentedComposable()
160
- }
161
- }
@@ -1,33 +0,0 @@
1
- package expo.modules.ui
2
-
3
- import android.graphics.Color
4
- import androidx.compose.material3.Text
5
- import androidx.compose.material3.TextButton
6
- import androidx.compose.runtime.Composable
7
- import expo.modules.kotlin.views.ComposeProps
8
- import expo.modules.kotlin.views.FunctionalComposableScope
9
- import expo.modules.ui.button.ButtonPressedEvent
10
-
11
- data class TextButtonProps(
12
- val text: String = "",
13
- val color: Color? = null,
14
- val disabled: Boolean = false,
15
- val modifiers: ModifierList = emptyList()
16
- ) : ComposeProps
17
-
18
- @Composable
19
- fun FunctionalComposableScope.TextButtonContent(
20
- props: TextButtonProps,
21
- onButtonPressed: (ButtonPressedEvent) -> Unit
22
- ) {
23
- TextButton(
24
- onClick = { onButtonPressed(ButtonPressedEvent()) },
25
- enabled = !props.disabled,
26
- modifier = ModifierRegistry.applyModifiers(props.modifiers, appContext, composableScope, globalEventDispatcher)
27
- ) {
28
- Text(
29
- text = props.text,
30
- color = props.color.composeOrNull ?: androidx.compose.ui.graphics.Color.Unspecified
31
- )
32
- }
33
- }