@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
@@ -0,0 +1,207 @@
1
+ import { requireNativeView } from 'expo';
2
+ import { type ColorValue } from 'react-native';
3
+
4
+ import { ModifierConfig, ViewEvent } from '../../types';
5
+ import { createViewModifierEventListener } from '../modifiers/utils';
6
+
7
+ type SlotChildProps = {
8
+ children: React.ReactNode;
9
+ };
10
+
11
+ type NativeSlotViewProps = {
12
+ slotName: string;
13
+ children: React.ReactNode;
14
+ };
15
+
16
+ /**
17
+ * Props shared by all `FloatingActionButton` variants.
18
+ */
19
+ export type FloatingActionButtonProps = {
20
+ /**
21
+ * Slot-based children (use `.Icon` sub-component).
22
+ */
23
+ children: React.ReactNode;
24
+
25
+ /**
26
+ * The background color of the button container.
27
+ * Defaults to `FloatingActionButtonDefaults.containerColor` (primary container).
28
+ */
29
+ containerColor?: ColorValue;
30
+
31
+ /**
32
+ * Callback invoked when the button is clicked.
33
+ */
34
+ onClick?: () => void;
35
+
36
+ /**
37
+ * Modifiers for the component.
38
+ */
39
+ modifiers?: ModifierConfig[];
40
+ };
41
+
42
+ /**
43
+ * Props for the `SmallFloatingActionButton` component.
44
+ * Same as {@link FloatingActionButtonProps}.
45
+ */
46
+ export type SmallFloatingActionButtonProps = FloatingActionButtonProps;
47
+
48
+ /**
49
+ * Props for the `LargeFloatingActionButton` component.
50
+ * Same as {@link FloatingActionButtonProps}.
51
+ */
52
+ export type LargeFloatingActionButtonProps = FloatingActionButtonProps;
53
+
54
+ /**
55
+ * Props for the `ExtendedFloatingActionButton` component.
56
+ */
57
+ export type ExtendedFloatingActionButtonProps = FloatingActionButtonProps & {
58
+ /**
59
+ * Slot-based children (use `.Icon` and `.Text` sub-components).
60
+ */
61
+ children: React.ReactNode;
62
+
63
+ /**
64
+ * Controls whether the label is shown (expanded) or hidden (collapsed).
65
+ * @default true
66
+ */
67
+ expanded?: boolean;
68
+ };
69
+
70
+ /**
71
+ * @hidden
72
+ */
73
+ type NativeFloatingActionButtonProps = Omit<FloatingActionButtonProps, 'onClick'> &
74
+ ViewEvent<'onButtonPressed', void> & {
75
+ variant: string;
76
+ expanded?: boolean;
77
+ };
78
+
79
+ const FloatingActionButtonNativeView: React.ComponentType<NativeFloatingActionButtonProps> =
80
+ requireNativeView('ExpoUI', 'FloatingActionButtonView');
81
+
82
+ const SlotNativeView: React.ComponentType<NativeSlotViewProps> = requireNativeView(
83
+ 'ExpoUI',
84
+ 'SlotView'
85
+ );
86
+
87
+ function FABIcon(props: SlotChildProps) {
88
+ return <SlotNativeView slotName="icon">{props.children}</SlotNativeView>;
89
+ }
90
+
91
+ function FABText(props: SlotChildProps) {
92
+ return <SlotNativeView slotName="text">{props.children}</SlotNativeView>;
93
+ }
94
+
95
+ function transformProps(
96
+ props: FloatingActionButtonProps & { variant: string; expanded?: boolean }
97
+ ): NativeFloatingActionButtonProps {
98
+ const { children, onClick, modifiers, ...restProps } = props;
99
+
100
+ return {
101
+ modifiers,
102
+ ...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
103
+ ...restProps,
104
+ children,
105
+ onButtonPressed: onClick,
106
+ };
107
+ }
108
+
109
+ /**
110
+ * Renders a Material Design 3 small `FloatingActionButton`.
111
+ *
112
+ * Wraps [`SmallFloatingActionButton`](https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#SmallFloatingActionButton(kotlin.Function0,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.material3.FloatingActionButtonElevation,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function0)).
113
+ *
114
+ * @example
115
+ * ```tsx
116
+ * import { SmallFloatingActionButton, Host, Icon } from '@expo/ui/jetpack-compose';
117
+ *
118
+ * <Host matchContents>
119
+ * <SmallFloatingActionButton onClick={() => console.log('pressed')}>
120
+ * <SmallFloatingActionButton.Icon>
121
+ * <Icon source={require('./assets/add.xml')} />
122
+ * </SmallFloatingActionButton.Icon>
123
+ * </SmallFloatingActionButton>
124
+ * </Host>
125
+ * ```
126
+ */
127
+ function SmallFloatingActionButtonComponent(props: SmallFloatingActionButtonProps) {
128
+ return <FloatingActionButtonNativeView {...transformProps({ ...props, variant: 'small' })} />;
129
+ }
130
+ SmallFloatingActionButtonComponent.Icon = FABIcon;
131
+ export { SmallFloatingActionButtonComponent as SmallFloatingActionButton };
132
+
133
+ /**
134
+ * Renders a Material Design 3 standard `FloatingActionButton`.
135
+ *
136
+ * Wraps [`FloatingActionButton`](https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#FloatingActionButton(kotlin.Function0,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.material3.FloatingActionButtonElevation,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function0)).
137
+ *
138
+ * @example
139
+ * ```tsx
140
+ * import { FloatingActionButton, Host, Icon } from '@expo/ui/jetpack-compose';
141
+ *
142
+ * <Host matchContents>
143
+ * <FloatingActionButton onClick={() => console.log('pressed')}>
144
+ * <FloatingActionButton.Icon>
145
+ * <Icon source={require('./assets/add.xml')} />
146
+ * </FloatingActionButton.Icon>
147
+ * </FloatingActionButton>
148
+ * </Host>
149
+ * ```
150
+ */
151
+ function FloatingActionButtonComponent(props: FloatingActionButtonProps) {
152
+ return <FloatingActionButtonNativeView {...transformProps({ ...props, variant: 'medium' })} />;
153
+ }
154
+ FloatingActionButtonComponent.Icon = FABIcon;
155
+ export { FloatingActionButtonComponent as FloatingActionButton };
156
+
157
+ /**
158
+ * Renders a Material Design 3 large `FloatingActionButton`.
159
+ *
160
+ * Wraps [`LargeFloatingActionButton`](https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#LargeFloatingActionButton(kotlin.Function0,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.material3.FloatingActionButtonElevation,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function0)).
161
+ *
162
+ * @example
163
+ * ```tsx
164
+ * import { LargeFloatingActionButton, Host, Icon } from '@expo/ui/jetpack-compose';
165
+ *
166
+ * <Host matchContents>
167
+ * <LargeFloatingActionButton onClick={() => console.log('pressed')}>
168
+ * <LargeFloatingActionButton.Icon>
169
+ * <Icon source={require('./assets/add.xml')} />
170
+ * </LargeFloatingActionButton.Icon>
171
+ * </LargeFloatingActionButton>
172
+ * </Host>
173
+ * ```
174
+ */
175
+ function LargeFloatingActionButtonComponent(props: LargeFloatingActionButtonProps) {
176
+ return <FloatingActionButtonNativeView {...transformProps({ ...props, variant: 'large' })} />;
177
+ }
178
+ LargeFloatingActionButtonComponent.Icon = FABIcon;
179
+ export { LargeFloatingActionButtonComponent as LargeFloatingActionButton };
180
+
181
+ /**
182
+ * Renders a Material Design 3 `ExtendedFloatingActionButton` with animated label expansion.
183
+ *
184
+ * Wraps [`ExtendedFloatingActionButton`](https://developer.android.com/reference/kotlin/androidx/compose/material3/package-summary#ExtendedFloatingActionButton(kotlin.Function0,androidx.compose.ui.Modifier,androidx.compose.ui.graphics.Shape,androidx.compose.ui.graphics.Color,androidx.compose.ui.graphics.Color,androidx.compose.material3.FloatingActionButtonElevation,androidx.compose.foundation.interaction.MutableInteractionSource,kotlin.Function1)).
185
+ *
186
+ * @example
187
+ * ```tsx
188
+ * import { ExtendedFloatingActionButton, Host, Icon, Text } from '@expo/ui/jetpack-compose';
189
+ *
190
+ * <Host matchContents>
191
+ * <ExtendedFloatingActionButton expanded={true} onClick={() => console.log('pressed')}>
192
+ * <ExtendedFloatingActionButton.Icon>
193
+ * <Icon source={require('./assets/edit.xml')} />
194
+ * </ExtendedFloatingActionButton.Icon>
195
+ * <ExtendedFloatingActionButton.Text>
196
+ * <Text>Edit</Text>
197
+ * </ExtendedFloatingActionButton.Text>
198
+ * </ExtendedFloatingActionButton>
199
+ * </Host>
200
+ * ```
201
+ */
202
+ function ExtendedFloatingActionButtonComponent(props: ExtendedFloatingActionButtonProps) {
203
+ return <FloatingActionButtonNativeView {...transformProps({ ...props, variant: 'extended' })} />;
204
+ }
205
+ ExtendedFloatingActionButtonComponent.Icon = FABIcon;
206
+ ExtendedFloatingActionButtonComponent.Text = FABText;
207
+ export { ExtendedFloatingActionButtonComponent as ExtendedFloatingActionButton };
@@ -21,7 +21,7 @@ export type HorizontalFloatingToolbarProps = {
21
21
  modifiers?: ExpoModifier[];
22
22
  };
23
23
 
24
- export type FloatingActionButtonProps = {
24
+ export type HorizontalFloatingToolbarFloatingActionButtonProps = {
25
25
  /**
26
26
  * A callback that is called when the button is pressed.
27
27
  */
@@ -54,7 +54,9 @@ const SlotNativeView: React.ComponentType<NativeSlotViewProps> = requireNativeVi
54
54
  * FloatingActionButton component for HorizontalFloatingToolbar.
55
55
  * This component marks its children to be rendered in the FAB slot.
56
56
  */
57
- export function HorizontalFloatingToolbarFloatingActionButton(props: FloatingActionButtonProps) {
57
+ export function HorizontalFloatingToolbarFloatingActionButton(
58
+ props: HorizontalFloatingToolbarFloatingActionButtonProps
59
+ ) {
58
60
  return (
59
61
  <SlotNativeView slotName="floatingActionButton" onSlotEvent={props.onPress}>
60
62
  {props.children}
@@ -1,88 +1,81 @@
1
1
  import { requireNativeView } from 'expo';
2
2
  import { type ColorValue } from 'react-native';
3
3
 
4
- import { ExpoModifier, ViewEvent } from '../../types';
5
- import { ButtonElementColors } from '../Button';
6
- import { parseJSXShape, ShapeJSXElement, ShapeRecordProps } from '../Shape';
7
- import { createViewModifierEventListener } from '../modifiers/utils';
4
+ import type { ModifierConfig, ViewEvent } from '../../types';
5
+ import { transformButtonProps } from '../Button';
6
+ import { type ShapeJSXElement, type ShapeRecordProps } from '../Shape';
8
7
 
9
8
  /**
10
- * The built-in button styles available on Android.
11
- * - `outlined` - A button with an outline.
12
- * - `elevated` - A filled button with a shadow.
9
+ * Colors for icon button elements.
13
10
  */
14
- export type IconButtonVariant = 'default' | 'bordered' | 'outlined';
11
+ export type IconButtonColors = {
12
+ containerColor?: ColorValue;
13
+ contentColor?: ColorValue;
14
+ disabledContainerColor?: ColorValue;
15
+ disabledContentColor?: ColorValue;
16
+ };
15
17
 
16
18
  export type IconButtonProps = {
17
19
  /**
18
- * A callback that is called when the button is pressed.
19
- */
20
- onPress?: () => void;
21
- /**
22
- * The button variant.
20
+ * Callback that is called when the icon button is clicked.
23
21
  */
24
- variant?: IconButtonVariant;
22
+ onClick?: () => void;
25
23
  /**
26
- * The text to display inside the button.
24
+ * Whether the icon button is enabled for user interaction.
25
+ * @default true
27
26
  */
28
- children?: React.JSX.Element;
27
+ enabled?: boolean;
29
28
  /**
30
- * Colors for button's core elements.
29
+ * Colors for icon button elements.
31
30
  * @platform android
32
31
  */
33
- elementColors?: ButtonElementColors;
32
+ colors?: IconButtonColors;
34
33
  /**
35
- * Button color.
34
+ * The shape of the icon button.
36
35
  */
37
- color?: ColorValue;
38
36
  shape?: ShapeJSXElement;
39
37
  /**
40
- * Disabled state of the button.
38
+ * Modifiers for the component.
41
39
  */
42
- disabled?: boolean;
43
-
40
+ modifiers?: ModifierConfig[];
44
41
  /**
45
- * Modifiers for the component.
42
+ * Content to display inside the icon button.
46
43
  */
47
- modifiers?: ExpoModifier[];
44
+ children: React.ReactNode;
48
45
  };
49
46
 
50
- /**
51
- * @hidden
52
- */
53
- export type NativeIconButtonProps = Omit<IconButtonProps, 'role' | 'onPress' | 'shape'> & {
47
+ type NativeIconButtonProps = Omit<IconButtonProps, 'onClick' | 'shape' | 'children'> & {
54
48
  shape?: ShapeRecordProps;
49
+ children?: React.ReactNode;
55
50
  } & ViewEvent<'onButtonPressed', void>;
56
51
 
57
- // We have to work around the `role` and `onPress` props being reserved by React Native.
58
- const IconButtonNativeView: React.ComponentType<NativeIconButtonProps> = requireNativeView(
59
- 'ExpoUI',
60
- 'IconButton'
61
- );
52
+ function createIconButtonComponent(name: string) {
53
+ const NativeView: React.ComponentType<NativeIconButtonProps> = requireNativeView('ExpoUI', name);
62
54
 
63
- function transformIconButtonProps(props: IconButtonProps): NativeIconButtonProps {
64
- const { children, onPress, shape, modifiers, ...restProps } = props;
65
-
66
- return {
67
- modifiers,
68
- ...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
69
- ...restProps,
70
- children,
71
- shape: parseJSXShape(shape),
72
- onButtonPressed: onPress,
73
- elementColors: props.elementColors
74
- ? props.elementColors
75
- : props.color
76
- ? {
77
- containerColor: props.color,
78
- }
79
- : undefined,
80
- };
55
+ function Component(props: IconButtonProps) {
56
+ const { children, ...restProps } = props;
57
+ return <NativeView {...transformButtonProps(restProps)}>{children}</NativeView>;
58
+ }
59
+ Component.displayName = name;
60
+ return Component;
81
61
  }
82
62
 
83
63
  /**
84
- * Displays a native button component.
64
+ * A standard icon button with no background.
85
65
  */
86
- export function IconButton(props: IconButtonProps) {
87
- return <IconButtonNativeView {...transformIconButtonProps(props)} />;
88
- }
66
+ export const IconButton = createIconButtonComponent('IconButton');
67
+
68
+ /**
69
+ * A filled icon button with a solid background.
70
+ */
71
+ export const FilledIconButton = createIconButtonComponent('FilledIconButton');
72
+
73
+ /**
74
+ * A filled tonal icon button with a muted background.
75
+ */
76
+ export const FilledTonalIconButton = createIconButtonComponent('FilledTonalIconButton');
77
+
78
+ /**
79
+ * An outlined icon button with a border and no fill.
80
+ */
81
+ export const OutlinedIconButton = createIconButtonComponent('OutlinedIconButton');
@@ -0,0 +1,34 @@
1
+ import { requireNativeView } from 'expo';
2
+
3
+ import { type ModifierConfig } from '../../types';
4
+ import { createViewModifierEventListener } from '../modifiers/utils';
5
+
6
+ export type MultiChoiceSegmentedButtonRowProps = {
7
+ /**
8
+ * SegmentedButton children.
9
+ */
10
+ children: React.ReactNode;
11
+ /**
12
+ * Modifiers for the component.
13
+ */
14
+ modifiers?: ModifierConfig[];
15
+ };
16
+
17
+ const MultiChoiceSegmentedButtonRowNativeView: React.ComponentType<MultiChoiceSegmentedButtonRowProps> =
18
+ requireNativeView('ExpoUI', 'MultiChoiceSegmentedButtonRowView');
19
+
20
+ /**
21
+ * A row container for multi-choice `SegmentedButton` children.
22
+ * Maps to Material 3 `MultiChoiceSegmentedButtonRow`.
23
+ */
24
+ export function MultiChoiceSegmentedButtonRow(props: MultiChoiceSegmentedButtonRowProps) {
25
+ const { children, modifiers, ...restProps } = props;
26
+ return (
27
+ <MultiChoiceSegmentedButtonRowNativeView
28
+ modifiers={modifiers}
29
+ {...(modifiers ? createViewModifierEventListener(modifiers) : undefined)}
30
+ {...restProps}>
31
+ {children}
32
+ </MultiChoiceSegmentedButtonRowNativeView>
33
+ );
34
+ }
@@ -1,102 +1,160 @@
1
1
  import { requireNativeView } from 'expo';
2
- import { ColorValue } from 'react-native';
2
+ import { type ColorValue } from 'react-native';
3
3
 
4
- import { ExpoModifier } from '../../types';
4
+ import { type ModifierConfig } from '../../types';
5
5
  import { createViewModifierEventListener } from '../modifiers/utils';
6
6
 
7
- export type ProgressElementColors = {
8
- /**
9
- * Track color.
10
- *
11
- * @platform android
12
- */
13
- trackColor?: ColorValue;
14
- };
7
+ /**
8
+ * Stroke cap style for progress indicators.
9
+ */
10
+ export type StrokeCap = 'round' | 'butt' | 'square';
15
11
 
16
- export type CircularProgressProps = {
12
+ /**
13
+ * Common props shared by all progress indicator variants.
14
+ */
15
+ type BaseProgressProps = {
17
16
  /**
18
- * The current progress value of the slider. This is a number between `0` and `1`.
17
+ * The current progress value between `0` and `1`. Omit for indeterminate.
19
18
  */
20
19
  progress?: number | null;
21
20
  /**
22
- * Progress color.
21
+ * Progress indicator color.
23
22
  */
24
23
  color?: ColorValue;
25
24
  /**
26
- * Colors for switch's core elements.
27
- * @platform android
25
+ * Track (background) color.
28
26
  */
29
- elementColors?: ProgressElementColors;
27
+ trackColor?: ColorValue;
30
28
  /**
31
29
  * Modifiers for the component.
32
30
  */
33
- modifiers?: ExpoModifier[];
31
+ modifiers?: ModifierConfig[];
34
32
  };
35
33
 
36
- export type LinearProgressProps = {
37
- /**
38
- * The current progress value of the slider. This is a number between `0` and `1`.
39
- */
40
- progress?: number | null;
34
+ function transformProps<T extends BaseProgressProps>(props: T): T {
35
+ const { modifiers, ...restProps } = props;
36
+ return {
37
+ modifiers,
38
+ ...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
39
+ ...restProps,
40
+ } as T;
41
+ }
42
+
43
+ function createProgressComponent<P extends BaseProgressProps>(
44
+ viewName: string
45
+ ): React.ComponentType<P> {
46
+ const NativeView: React.ComponentType<P> = requireNativeView('ExpoUI', viewName);
47
+ return function ProgressComponent(props: P) {
48
+ return <NativeView {...transformProps(props)} />;
49
+ };
50
+ }
51
+
52
+ // region LinearProgressIndicator
53
+
54
+ /**
55
+ * Configuration for the stop indicator dot at the end of the determinate linear progress track.
56
+ * When provided, draws a stop indicator with the given options. Omit to use the Compose default.
57
+ */
58
+ export type DrawStopIndicatorConfig = {
41
59
  /**
42
- * Progress color.
60
+ * Color of the stop indicator. Defaults to the indicator's color.
43
61
  */
44
62
  color?: ColorValue;
45
63
  /**
46
- * Colors for switch's core elements.
47
- * @platform android
64
+ * Stroke cap style for the stop indicator. Defaults to the indicator's strokeCap.
48
65
  */
49
- elementColors?: ProgressElementColors;
66
+ strokeCap?: StrokeCap;
50
67
  /**
51
- * Modifiers for the component.
68
+ * Size of the stop indicator in dp. Defaults to the Material 3 default.
52
69
  */
53
- modifiers?: ExpoModifier[];
70
+ stopSize?: number;
54
71
  };
55
72
 
56
- type NativeProgressProps =
57
- | CircularProgressProps
58
- | (LinearProgressProps & {
59
- variant: 'linear' | 'circular' | 'linearWavy' | 'circularWavy';
60
- });
73
+ export type LinearProgressIndicatorProps = BaseProgressProps & {
74
+ /**
75
+ * Stroke cap style for the indicator ends.
76
+ * @default 'round'
77
+ */
78
+ strokeCap?: StrokeCap;
79
+ /**
80
+ * Gap size between the indicator and track in dp.
81
+ */
82
+ gapSize?: number;
83
+ /**
84
+ * Configuration for the stop indicator dot at the end of the determinate progress track.
85
+ */
86
+ drawStopIndicator?: DrawStopIndicatorConfig;
87
+ };
61
88
 
62
- const NativeProgressView: React.ComponentType<NativeProgressProps> = requireNativeView(
63
- 'ExpoUI',
64
- 'ProgressView'
89
+ /**
90
+ * A linear progress indicator that displays progress in a horizontal bar.
91
+ *
92
+ * Matches the Jetpack Compose `LinearProgressIndicator`.
93
+ */
94
+ export const LinearProgressIndicator = createProgressComponent<LinearProgressIndicatorProps>(
95
+ 'LinearProgressIndicatorView'
65
96
  );
66
97
 
67
- function transformProps(props: CircularProgressProps | LinearProgressProps): NativeProgressProps {
68
- const { modifiers, ...restProps } = props;
69
- return {
70
- modifiers,
71
- ...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
72
- ...restProps,
73
- };
74
- }
98
+ // endregion
75
99
 
76
- /**
77
- * Renders a `CircularProgress` component.
78
- */
79
- export function CircularProgress(props: CircularProgressProps) {
80
- return <NativeProgressView {...transformProps(props)} variant="circular" />;
81
- }
100
+ // region CircularProgressIndicator
101
+
102
+ export type CircularProgressIndicatorProps = BaseProgressProps & {
103
+ /**
104
+ * Width of the circular stroke in dp.
105
+ */
106
+ strokeWidth?: number;
107
+ /**
108
+ * Stroke cap style for the indicator ends.
109
+ * @default 'round'
110
+ */
111
+ strokeCap?: StrokeCap;
112
+ /**
113
+ * Gap size between the indicator and track in dp.
114
+ */
115
+ gapSize?: number;
116
+ };
82
117
 
83
118
  /**
84
- * Renders a `LinearProgress` component.
119
+ * A circular progress indicator that displays progress in a circular format.
120
+ *
121
+ * Matches the Jetpack Compose `CircularProgressIndicator`.
85
122
  */
86
- export function LinearProgress(props: LinearProgressProps) {
87
- return <NativeProgressView {...transformProps(props)} variant="linear" />;
88
- }
123
+ export const CircularProgressIndicator = createProgressComponent<CircularProgressIndicatorProps>(
124
+ 'CircularProgressIndicatorView'
125
+ );
126
+
127
+ // endregion
128
+
129
+ // region LinearWavyProgressIndicator
130
+
131
+ export type LinearWavyProgressIndicatorProps = BaseProgressProps & {
132
+ /**
133
+ * Size of the stop indicator in dp at the end of the determinate progress track.
134
+ */
135
+ stopSize?: number;
136
+ };
89
137
 
90
138
  /**
91
- * Renders a `CircularWavyProgress` component with wavy animation.
139
+ * A linear progress indicator with wavy animation style.
140
+ *
141
+ * Matches the Jetpack Compose `LinearWavyProgressIndicator`.
92
142
  */
93
- export function CircularWavyProgress(props: CircularProgressProps) {
94
- return <NativeProgressView {...transformProps(props)} variant="circularWavy" />;
95
- }
143
+ export const LinearWavyProgressIndicator =
144
+ createProgressComponent<LinearWavyProgressIndicatorProps>('LinearWavyProgressIndicatorView');
145
+
146
+ // endregion
147
+
148
+ // region CircularWavyProgressIndicator
149
+
150
+ export type CircularWavyProgressIndicatorProps = BaseProgressProps;
96
151
 
97
152
  /**
98
- * Renders a `LinearWavyProgress` component with wavy animation.
153
+ * A circular progress indicator with wavy animation style.
154
+ *
155
+ * Matches the Jetpack Compose `CircularWavyProgressIndicator`.
99
156
  */
100
- export function LinearWavyProgress(props: LinearProgressProps) {
101
- return <NativeProgressView {...transformProps(props)} variant="linearWavy" />;
102
- }
157
+ export const CircularWavyProgressIndicator =
158
+ createProgressComponent<CircularWavyProgressIndicatorProps>('CircularWavyProgressIndicatorView');
159
+
160
+ // endregion
@@ -1,6 +1,6 @@
1
1
  import { requireNativeView } from 'expo';
2
2
 
3
- import { type ExpoModifier, type ViewEvent } from '../../types';
3
+ import { type ModifierConfig, type ViewEvent } from '../../types';
4
4
  import { createViewModifierEventListener } from '../modifiers/utils';
5
5
 
6
6
  export type RadioButtonProps = {
@@ -15,12 +15,13 @@ export type RadioButtonProps = {
15
15
  /**
16
16
  * Modifiers for the component.
17
17
  */
18
- modifiers?: ExpoModifier[];
18
+ modifiers?: ModifierConfig[];
19
19
  };
20
20
 
21
- type NativeRadioButtonProps = Omit<RadioButtonProps, 'onClick'> & {
22
- nativeClickable: boolean;
23
- } & ViewEvent<'onNativeClick', void>;
21
+ type NativeRadioButtonProps = Omit<RadioButtonProps, 'onClick'> &
22
+ ViewEvent<'onButtonPressed', void> & {
23
+ clickable: boolean;
24
+ };
24
25
 
25
26
  const RadioButtonNativeView: React.ComponentType<NativeRadioButtonProps> = requireNativeView(
26
27
  'ExpoUI',
@@ -33,10 +34,8 @@ function transformProps(props: RadioButtonProps): NativeRadioButtonProps {
33
34
  modifiers,
34
35
  ...(modifiers ? createViewModifierEventListener(modifiers) : undefined),
35
36
  ...restProps,
36
- nativeClickable: onClick != null,
37
- onNativeClick: () => {
38
- onClick?.();
39
- },
37
+ clickable: onClick != null,
38
+ onButtonPressed: () => onClick?.(),
40
39
  };
41
40
  }
42
41