@expo/ui 56.0.18 → 56.0.19

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 (405) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/main/java/expo/modules/ui/DatePickerView.kt +33 -8
  4. package/build/community/bottom-sheet/BottomSheet.android.d.ts.map +1 -1
  5. package/build/community/bottom-sheet/BottomSheet.ios.d.ts.map +1 -1
  6. package/build/community/bottom-sheet/scrollContextReset.d.ts +5 -0
  7. package/build/community/bottom-sheet/scrollContextReset.d.ts.map +1 -0
  8. package/build/community/datetime-picker/DateTimePicker.d.ts.map +1 -1
  9. package/build/community/datetime-picker/types.d.ts +2 -2
  10. package/build/community/datetime-picker/types.d.ts.map +1 -1
  11. package/build/community/menu/types.d.ts +2 -2
  12. package/build/community/menu/types.d.ts.map +1 -1
  13. package/build/community/pager-view/types.d.ts +2 -2
  14. package/build/community/pager-view/types.d.ts.map +1 -1
  15. package/build/community/segmented-control/types.d.ts +2 -2
  16. package/build/community/segmented-control/types.d.ts.map +1 -1
  17. package/build/community/slider/types.d.ts +2 -2
  18. package/build/community/slider/types.d.ts.map +1 -1
  19. package/build/jetpack-compose/AlertDialog/index.d.ts +2 -2
  20. package/build/jetpack-compose/AlertDialog/index.d.ts.map +1 -1
  21. package/build/jetpack-compose/AnimatedVisibility/index.d.ts +2 -2
  22. package/build/jetpack-compose/AnimatedVisibility/index.d.ts.map +1 -1
  23. package/build/jetpack-compose/Badge/index.d.ts +2 -2
  24. package/build/jetpack-compose/Badge/index.d.ts.map +1 -1
  25. package/build/jetpack-compose/BadgedBox/index.d.ts +2 -2
  26. package/build/jetpack-compose/BadgedBox/index.d.ts.map +1 -1
  27. package/build/jetpack-compose/BasicAlertDialog/index.d.ts +2 -2
  28. package/build/jetpack-compose/BasicAlertDialog/index.d.ts.map +1 -1
  29. package/build/jetpack-compose/Box/index.d.ts +2 -2
  30. package/build/jetpack-compose/Box/index.d.ts.map +1 -1
  31. package/build/jetpack-compose/Button/index.d.ts +2 -2
  32. package/build/jetpack-compose/Button/index.d.ts.map +1 -1
  33. package/build/jetpack-compose/Card/index.d.ts +6 -6
  34. package/build/jetpack-compose/Card/index.d.ts.map +1 -1
  35. package/build/jetpack-compose/Carousel/index.d.ts +6 -6
  36. package/build/jetpack-compose/Carousel/index.d.ts.map +1 -1
  37. package/build/jetpack-compose/Checkbox/index.d.ts +4 -4
  38. package/build/jetpack-compose/Checkbox/index.d.ts.map +1 -1
  39. package/build/jetpack-compose/Chip/index.d.ts +8 -8
  40. package/build/jetpack-compose/Chip/index.d.ts.map +1 -1
  41. package/build/jetpack-compose/Column/index.d.ts +2 -2
  42. package/build/jetpack-compose/Column/index.d.ts.map +1 -1
  43. package/build/jetpack-compose/DatePicker/index.d.ts +6 -6
  44. package/build/jetpack-compose/DatePicker/index.d.ts.map +1 -1
  45. package/build/jetpack-compose/DockedSearchBar/index.d.ts +2 -2
  46. package/build/jetpack-compose/DockedSearchBar/index.d.ts.map +1 -1
  47. package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts +2 -2
  48. package/build/jetpack-compose/DropdownMenu/DropdownMenuItem.d.ts.map +1 -1
  49. package/build/jetpack-compose/DropdownMenu/index.d.ts +2 -2
  50. package/build/jetpack-compose/DropdownMenu/index.d.ts.map +1 -1
  51. package/build/jetpack-compose/ExposedDropdownMenuBox/ExposedDropdownMenu.d.ts +2 -2
  52. package/build/jetpack-compose/ExposedDropdownMenuBox/ExposedDropdownMenu.d.ts.map +1 -1
  53. package/build/jetpack-compose/ExposedDropdownMenuBox/index.d.ts +2 -2
  54. package/build/jetpack-compose/ExposedDropdownMenuBox/index.d.ts.map +1 -1
  55. package/build/jetpack-compose/FloatingActionButton/index.d.ts +8 -6
  56. package/build/jetpack-compose/FloatingActionButton/index.d.ts.map +1 -1
  57. package/build/jetpack-compose/FlowRow/index.d.ts +2 -2
  58. package/build/jetpack-compose/FlowRow/index.d.ts.map +1 -1
  59. package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts +4 -4
  60. package/build/jetpack-compose/HorizontalFloatingToolbar/index.d.ts.map +1 -1
  61. package/build/jetpack-compose/HorizontalPager/index.d.ts +2 -2
  62. package/build/jetpack-compose/HorizontalPager/index.d.ts.map +1 -1
  63. package/build/jetpack-compose/Host/index.d.ts +2 -2
  64. package/build/jetpack-compose/Host/index.d.ts.map +1 -1
  65. package/build/jetpack-compose/Icon/index.d.ts +2 -2
  66. package/build/jetpack-compose/Icon/index.d.ts.map +1 -1
  67. package/build/jetpack-compose/IconButton/index.d.ts +2 -2
  68. package/build/jetpack-compose/IconButton/index.d.ts.map +1 -1
  69. package/build/jetpack-compose/LazyColumn/index.d.ts +2 -2
  70. package/build/jetpack-compose/LazyColumn/index.d.ts.map +1 -1
  71. package/build/jetpack-compose/LazyRow/index.d.ts +2 -2
  72. package/build/jetpack-compose/LazyRow/index.d.ts.map +1 -1
  73. package/build/jetpack-compose/ListItem/index.d.ts +2 -2
  74. package/build/jetpack-compose/ListItem/index.d.ts.map +1 -1
  75. package/build/jetpack-compose/LoadingIndicator/index.d.ts +2 -2
  76. package/build/jetpack-compose/LoadingIndicator/index.d.ts.map +1 -1
  77. package/build/jetpack-compose/ModalBottomSheet/index.d.ts +2 -2
  78. package/build/jetpack-compose/ModalBottomSheet/index.d.ts.map +1 -1
  79. package/build/jetpack-compose/MultiChoiceSegmentedButtonRow/index.d.ts +2 -2
  80. package/build/jetpack-compose/MultiChoiceSegmentedButtonRow/index.d.ts.map +1 -1
  81. package/build/jetpack-compose/NavigationBar/index.d.ts +4 -4
  82. package/build/jetpack-compose/NavigationBar/index.d.ts.map +1 -1
  83. package/build/jetpack-compose/Progress/index.d.ts +9 -8
  84. package/build/jetpack-compose/Progress/index.d.ts.map +1 -1
  85. package/build/jetpack-compose/PullToRefreshBox/index.d.ts +4 -4
  86. package/build/jetpack-compose/PullToRefreshBox/index.d.ts.map +1 -1
  87. package/build/jetpack-compose/RadioButton/index.d.ts +2 -2
  88. package/build/jetpack-compose/RadioButton/index.d.ts.map +1 -1
  89. package/build/jetpack-compose/Row/index.d.ts +2 -2
  90. package/build/jetpack-compose/Row/index.d.ts.map +1 -1
  91. package/build/jetpack-compose/SearchBar/index.d.ts +2 -2
  92. package/build/jetpack-compose/SearchBar/index.d.ts.map +1 -1
  93. package/build/jetpack-compose/SegmentedButton/index.d.ts +2 -2
  94. package/build/jetpack-compose/SegmentedButton/index.d.ts.map +1 -1
  95. package/build/jetpack-compose/Shape/index.d.ts +2 -2
  96. package/build/jetpack-compose/Shape/index.d.ts.map +1 -1
  97. package/build/jetpack-compose/SingleChoiceSegmentedButtonRow/index.d.ts +2 -2
  98. package/build/jetpack-compose/SingleChoiceSegmentedButtonRow/index.d.ts.map +1 -1
  99. package/build/jetpack-compose/Slider/index.d.ts +2 -2
  100. package/build/jetpack-compose/Slider/index.d.ts.map +1 -1
  101. package/build/jetpack-compose/Snackbar/index.d.ts +4 -4
  102. package/build/jetpack-compose/Snackbar/index.d.ts.map +1 -1
  103. package/build/jetpack-compose/Spacer/index.d.ts +2 -2
  104. package/build/jetpack-compose/Spacer/index.d.ts.map +1 -1
  105. package/build/jetpack-compose/Surface/index.d.ts +2 -2
  106. package/build/jetpack-compose/Surface/index.d.ts.map +1 -1
  107. package/build/jetpack-compose/Switch/index.d.ts +2 -2
  108. package/build/jetpack-compose/Switch/index.d.ts.map +1 -1
  109. package/build/jetpack-compose/SyncSwitch/index.d.ts +2 -2
  110. package/build/jetpack-compose/SyncSwitch/index.d.ts.map +1 -1
  111. package/build/jetpack-compose/Text/index.d.ts +2 -2
  112. package/build/jetpack-compose/Text/index.d.ts.map +1 -1
  113. package/build/jetpack-compose/TextField/BasicTextField.d.ts +2 -2
  114. package/build/jetpack-compose/TextField/BasicTextField.d.ts.map +1 -1
  115. package/build/jetpack-compose/TextField/TextField.d.ts +4 -4
  116. package/build/jetpack-compose/TextField/TextField.d.ts.map +1 -1
  117. package/build/jetpack-compose/ToggleButton/index.d.ts +2 -2
  118. package/build/jetpack-compose/ToggleButton/index.d.ts.map +1 -1
  119. package/build/jetpack-compose/Tooltip/index.d.ts +6 -6
  120. package/build/jetpack-compose/Tooltip/index.d.ts.map +1 -1
  121. package/build/swift-ui/AccessoryWidgetBackground/index.d.ts +2 -1
  122. package/build/swift-ui/AccessoryWidgetBackground/index.d.ts.map +1 -1
  123. package/build/swift-ui/Alert/index.d.ts +2 -2
  124. package/build/swift-ui/Alert/index.d.ts.map +1 -1
  125. package/build/swift-ui/BottomSheet/index.d.ts +2 -2
  126. package/build/swift-ui/BottomSheet/index.d.ts.map +1 -1
  127. package/build/swift-ui/Button/index.d.ts +2 -2
  128. package/build/swift-ui/Button/index.d.ts.map +1 -1
  129. package/build/swift-ui/Chart/index.d.ts +2 -2
  130. package/build/swift-ui/Chart/index.d.ts.map +1 -1
  131. package/build/swift-ui/ColorPicker/index.d.ts +2 -2
  132. package/build/swift-ui/ColorPicker/index.d.ts.map +1 -1
  133. package/build/swift-ui/ConfirmationDialog/index.d.ts +2 -2
  134. package/build/swift-ui/ConfirmationDialog/index.d.ts.map +1 -1
  135. package/build/swift-ui/ContextMenu/types.d.ts +4 -4
  136. package/build/swift-ui/ContextMenu/types.d.ts.map +1 -1
  137. package/build/swift-ui/DatePicker/index.d.ts +2 -2
  138. package/build/swift-ui/DatePicker/index.d.ts.map +1 -1
  139. package/build/swift-ui/Divider/index.d.ts +2 -1
  140. package/build/swift-ui/Divider/index.d.ts.map +1 -1
  141. package/build/swift-ui/Gauge/index.d.ts +2 -2
  142. package/build/swift-ui/Gauge/index.d.ts.map +1 -1
  143. package/build/swift-ui/GlassEffectContainer/index.d.ts +2 -2
  144. package/build/swift-ui/GlassEffectContainer/index.d.ts.map +1 -1
  145. package/build/swift-ui/Grid/index.d.ts +2 -2
  146. package/build/swift-ui/Grid/index.d.ts.map +1 -1
  147. package/build/swift-ui/HStack/index.d.ts +2 -2
  148. package/build/swift-ui/HStack/index.d.ts.map +1 -1
  149. package/build/swift-ui/Host/index.d.ts +9 -3
  150. package/build/swift-ui/Host/index.d.ts.map +1 -1
  151. package/build/swift-ui/Label/index.d.ts +2 -2
  152. package/build/swift-ui/Label/index.d.ts.map +1 -1
  153. package/build/swift-ui/LabeledContent/index.d.ts +2 -2
  154. package/build/swift-ui/LabeledContent/index.d.ts.map +1 -1
  155. package/build/swift-ui/LazyHStack/index.d.ts +2 -2
  156. package/build/swift-ui/LazyHStack/index.d.ts.map +1 -1
  157. package/build/swift-ui/LazyVStack/index.d.ts +2 -2
  158. package/build/swift-ui/LazyVStack/index.d.ts.map +1 -1
  159. package/build/swift-ui/Link/index.d.ts +2 -2
  160. package/build/swift-ui/Link/index.d.ts.map +1 -1
  161. package/build/swift-ui/List/ListForEach.d.ts +2 -2
  162. package/build/swift-ui/List/ListForEach.d.ts.map +1 -1
  163. package/build/swift-ui/Mask/index.d.ts +2 -2
  164. package/build/swift-ui/Mask/index.d.ts.map +1 -1
  165. package/build/swift-ui/Menu/types.d.ts +2 -2
  166. package/build/swift-ui/Menu/types.d.ts.map +1 -1
  167. package/build/swift-ui/Namespace.d.ts +2 -2
  168. package/build/swift-ui/Namespace.d.ts.map +1 -1
  169. package/build/swift-ui/Overlay/index.d.ts +2 -2
  170. package/build/swift-ui/Overlay/index.d.ts.map +1 -1
  171. package/build/swift-ui/Popover/index.d.ts +2 -2
  172. package/build/swift-ui/Popover/index.d.ts.map +1 -1
  173. package/build/swift-ui/ProgressView/index.d.ts +2 -2
  174. package/build/swift-ui/ProgressView/index.d.ts.map +1 -1
  175. package/build/swift-ui/RNHostView.d.ts +2 -2
  176. package/build/swift-ui/RNHostView.d.ts.map +1 -1
  177. package/build/swift-ui/ScrollView/index.d.ts +2 -2
  178. package/build/swift-ui/ScrollView/index.d.ts.map +1 -1
  179. package/build/swift-ui/Section/index.d.ts +2 -2
  180. package/build/swift-ui/Section/index.d.ts.map +1 -1
  181. package/build/swift-ui/SecureField/index.d.ts +2 -2
  182. package/build/swift-ui/SecureField/index.d.ts.map +1 -1
  183. package/build/swift-ui/ShareLink/index.d.ts +2 -2
  184. package/build/swift-ui/ShareLink/index.d.ts.map +1 -1
  185. package/build/swift-ui/Slider/index.d.ts +2 -2
  186. package/build/swift-ui/Slider/index.d.ts.map +1 -1
  187. package/build/swift-ui/Stepper/index.d.ts +2 -2
  188. package/build/swift-ui/Stepper/index.d.ts.map +1 -1
  189. package/build/swift-ui/SwipeActions/index.d.ts +4 -4
  190. package/build/swift-ui/SwipeActions/index.d.ts.map +1 -1
  191. package/build/swift-ui/SyncToggle/index.d.ts +2 -2
  192. package/build/swift-ui/SyncToggle/index.d.ts.map +1 -1
  193. package/build/swift-ui/TabView/Tab.d.ts +2 -2
  194. package/build/swift-ui/TabView/Tab.d.ts.map +1 -1
  195. package/build/swift-ui/TabView/index.d.ts +2 -2
  196. package/build/swift-ui/TabView/index.d.ts.map +1 -1
  197. package/build/swift-ui/TextField/index.d.ts +2 -2
  198. package/build/swift-ui/TextField/index.d.ts.map +1 -1
  199. package/build/swift-ui/Toggle/index.d.ts +2 -2
  200. package/build/swift-ui/Toggle/index.d.ts.map +1 -1
  201. package/build/swift-ui/VStack/index.d.ts +2 -2
  202. package/build/swift-ui/VStack/index.d.ts.map +1 -1
  203. package/build/swift-ui/ZStack/index.d.ts +2 -2
  204. package/build/swift-ui/ZStack/index.d.ts.map +1 -1
  205. package/build/swift-ui/modifiers/index.d.ts +59 -1
  206. package/build/swift-ui/modifiers/index.d.ts.map +1 -1
  207. package/build/swift-ui/modifiers/presentationModifiers.d.ts +19 -0
  208. package/build/swift-ui/modifiers/presentationModifiers.d.ts.map +1 -1
  209. package/build/universal/Button/index.d.ts.map +1 -1
  210. package/build/universal/Checkbox/index.d.ts.map +1 -1
  211. package/build/universal/Collapsible/index.d.ts.map +1 -1
  212. package/build/universal/FieldGroup/FieldGroup.d.ts.map +1 -1
  213. package/build/universal/FieldGroup/FieldSection.d.ts.map +1 -1
  214. package/build/universal/Host/index.d.ts +1 -2
  215. package/build/universal/Host/index.d.ts.map +1 -1
  216. package/build/universal/Host/types.d.ts +16 -2
  217. package/build/universal/Host/types.d.ts.map +1 -1
  218. package/build/universal/ListItem/ListItem.android.d.ts.map +1 -1
  219. package/build/universal/ListItem/ListItem.ios.d.ts.map +1 -1
  220. package/build/universal/ListItem/types.d.ts +8 -0
  221. package/build/universal/ListItem/types.d.ts.map +1 -1
  222. package/build/universal/Picker/Picker.d.ts.map +1 -1
  223. package/build/universal/Slider/index.d.ts.map +1 -1
  224. package/build/universal/Switch/index.d.ts.map +1 -1
  225. package/build/universal/TextInput/index.d.ts.map +1 -1
  226. package/build/universal/hooks.d.ts +11 -0
  227. package/build/universal/hooks.d.ts.map +1 -1
  228. package/build/universal/keyboardEvent.fx.d.ts +2 -0
  229. package/build/universal/keyboardEvent.fx.d.ts.map +1 -0
  230. package/build/universal/webUtils.d.ts +66 -0
  231. package/build/universal/webUtils.d.ts.map +1 -0
  232. package/expo-module.config.json +1 -1
  233. package/ios/HostView.swift +15 -0
  234. package/ios/Modifiers/PresentationModifiers.swift +30 -0
  235. package/ios/Modifiers/ViewModifierRegistry.swift +115 -11
  236. package/ios/Modifiers/WidgetModifiers.swift +1 -1
  237. package/ios/RNHostView.swift +5 -0
  238. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.18/expo.modules.ui-56.0.18-sources.jar → 56.0.19/expo.modules.ui-56.0.19-sources.jar} +0 -0
  239. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19-sources.jar.md5 +1 -0
  240. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19-sources.jar.sha1 +1 -0
  241. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19-sources.jar.sha256 +1 -0
  242. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19-sources.jar.sha512 +1 -0
  243. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.aar +0 -0
  244. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.aar.md5 +1 -0
  245. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.aar.sha1 +1 -0
  246. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.aar.sha256 +1 -0
  247. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.aar.sha512 +1 -0
  248. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.18/expo.modules.ui-56.0.18.module → 56.0.19/expo.modules.ui-56.0.19.module} +22 -22
  249. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.module.md5 +1 -0
  250. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.module.sha1 +1 -0
  251. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.module.sha256 +1 -0
  252. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.module.sha512 +1 -0
  253. package/local-maven-repo/expo/modules/ui/expo.modules.ui/{56.0.18/expo.modules.ui-56.0.18.pom → 56.0.19/expo.modules.ui-56.0.19.pom} +1 -1
  254. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.pom.md5 +1 -0
  255. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.pom.sha1 +1 -0
  256. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.pom.sha256 +1 -0
  257. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.19/expo.modules.ui-56.0.19.pom.sha512 +1 -0
  258. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml +4 -4
  259. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.md5 +1 -1
  260. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha1 +1 -1
  261. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha256 +1 -1
  262. package/local-maven-repo/expo/modules/ui/expo.modules.ui/maven-metadata.xml.sha512 +1 -1
  263. package/package.json +4 -9
  264. package/plugin/tsconfig.tsbuildinfo +1 -0
  265. package/src/State/index.fx.ts +4 -5
  266. package/src/community/bottom-sheet/BottomSheet.android.tsx +6 -1
  267. package/src/community/bottom-sheet/BottomSheet.ios.tsx +8 -4
  268. package/src/community/bottom-sheet/scrollContextReset.tsx +24 -0
  269. package/src/community/datetime-picker/DateTimePicker.tsx +9 -1
  270. package/src/community/datetime-picker/types.tsx +2 -2
  271. package/src/community/menu/types.tsx +2 -2
  272. package/src/community/pager-view/types.tsx +2 -2
  273. package/src/community/segmented-control/types.tsx +2 -2
  274. package/src/community/slider/types.tsx +2 -2
  275. package/src/jetpack-compose/AlertDialog/index.tsx +2 -2
  276. package/src/jetpack-compose/AnimatedVisibility/index.tsx +2 -2
  277. package/src/jetpack-compose/Badge/index.tsx +2 -2
  278. package/src/jetpack-compose/BadgedBox/index.tsx +2 -2
  279. package/src/jetpack-compose/BasicAlertDialog/index.tsx +2 -2
  280. package/src/jetpack-compose/Box/index.tsx +2 -2
  281. package/src/jetpack-compose/Button/index.tsx +2 -2
  282. package/src/jetpack-compose/Card/index.tsx +6 -6
  283. package/src/jetpack-compose/Carousel/index.tsx +6 -6
  284. package/src/jetpack-compose/Checkbox/index.tsx +4 -4
  285. package/src/jetpack-compose/Chip/index.tsx +8 -8
  286. package/src/jetpack-compose/Column/index.tsx +2 -2
  287. package/src/jetpack-compose/DatePicker/index.tsx +6 -6
  288. package/src/jetpack-compose/DockedSearchBar/index.tsx +2 -2
  289. package/src/jetpack-compose/DropdownMenu/DropdownMenuItem.tsx +2 -2
  290. package/src/jetpack-compose/DropdownMenu/index.tsx +2 -2
  291. package/src/jetpack-compose/ExposedDropdownMenuBox/ExposedDropdownMenu.tsx +2 -2
  292. package/src/jetpack-compose/ExposedDropdownMenuBox/index.tsx +2 -2
  293. package/src/jetpack-compose/FloatingActionButton/index.tsx +6 -6
  294. package/src/jetpack-compose/FlowRow/index.tsx +2 -2
  295. package/src/jetpack-compose/HorizontalFloatingToolbar/index.tsx +4 -4
  296. package/src/jetpack-compose/HorizontalPager/index.tsx +2 -2
  297. package/src/jetpack-compose/Host/index.tsx +2 -2
  298. package/src/jetpack-compose/Icon/index.tsx +2 -2
  299. package/src/jetpack-compose/IconButton/index.tsx +2 -2
  300. package/src/jetpack-compose/LazyColumn/index.tsx +2 -2
  301. package/src/jetpack-compose/LazyRow/index.tsx +2 -2
  302. package/src/jetpack-compose/ListItem/index.tsx +2 -2
  303. package/src/jetpack-compose/LoadingIndicator/index.tsx +2 -2
  304. package/src/jetpack-compose/ModalBottomSheet/index.tsx +2 -2
  305. package/src/jetpack-compose/MultiChoiceSegmentedButtonRow/index.tsx +2 -2
  306. package/src/jetpack-compose/NavigationBar/index.tsx +4 -4
  307. package/src/jetpack-compose/Progress/index.tsx +7 -7
  308. package/src/jetpack-compose/PullToRefreshBox/index.tsx +4 -4
  309. package/src/jetpack-compose/RadioButton/index.tsx +2 -2
  310. package/src/jetpack-compose/Row/index.tsx +2 -2
  311. package/src/jetpack-compose/SearchBar/index.tsx +2 -2
  312. package/src/jetpack-compose/SegmentedButton/index.tsx +2 -2
  313. package/src/jetpack-compose/Shape/index.tsx +2 -2
  314. package/src/jetpack-compose/SingleChoiceSegmentedButtonRow/index.tsx +2 -2
  315. package/src/jetpack-compose/Slider/index.tsx +2 -2
  316. package/src/jetpack-compose/Snackbar/index.tsx +4 -4
  317. package/src/jetpack-compose/Spacer/index.tsx +2 -2
  318. package/src/jetpack-compose/Surface/index.tsx +2 -2
  319. package/src/jetpack-compose/Switch/index.tsx +2 -2
  320. package/src/jetpack-compose/SyncSwitch/index.tsx +2 -2
  321. package/src/jetpack-compose/Text/index.tsx +2 -2
  322. package/src/jetpack-compose/TextField/BasicTextField.tsx +2 -2
  323. package/src/jetpack-compose/TextField/TextField.tsx +4 -4
  324. package/src/jetpack-compose/ToggleButton/index.tsx +2 -2
  325. package/src/jetpack-compose/Tooltip/index.tsx +6 -6
  326. package/src/swift-ui/AccessoryWidgetBackground/index.tsx +1 -1
  327. package/src/swift-ui/Alert/index.tsx +2 -2
  328. package/src/swift-ui/BottomSheet/index.tsx +2 -2
  329. package/src/swift-ui/Button/index.tsx +2 -2
  330. package/src/swift-ui/Chart/index.tsx +2 -2
  331. package/src/swift-ui/ColorPicker/index.tsx +2 -2
  332. package/src/swift-ui/ConfirmationDialog/index.tsx +2 -2
  333. package/src/swift-ui/ContextMenu/types.ts +4 -4
  334. package/src/swift-ui/DatePicker/index.tsx +2 -2
  335. package/src/swift-ui/Divider/index.tsx +1 -1
  336. package/src/swift-ui/Gauge/index.tsx +2 -2
  337. package/src/swift-ui/GlassEffectContainer/index.tsx +2 -2
  338. package/src/swift-ui/Grid/index.tsx +2 -2
  339. package/src/swift-ui/HStack/index.tsx +2 -2
  340. package/src/swift-ui/Host/index.tsx +12 -3
  341. package/src/swift-ui/Label/index.tsx +2 -2
  342. package/src/swift-ui/LabeledContent/index.tsx +2 -2
  343. package/src/swift-ui/LazyHStack/index.tsx +2 -2
  344. package/src/swift-ui/LazyVStack/index.tsx +2 -2
  345. package/src/swift-ui/Link/index.tsx +2 -2
  346. package/src/swift-ui/List/ListForEach.tsx +2 -2
  347. package/src/swift-ui/Mask/index.tsx +2 -2
  348. package/src/swift-ui/Menu/types.ts +2 -2
  349. package/src/swift-ui/Namespace.tsx +2 -2
  350. package/src/swift-ui/Overlay/index.tsx +2 -2
  351. package/src/swift-ui/Popover/index.tsx +2 -2
  352. package/src/swift-ui/ProgressView/index.tsx +2 -2
  353. package/src/swift-ui/RNHostView.tsx +2 -2
  354. package/src/swift-ui/ScrollView/index.tsx +2 -2
  355. package/src/swift-ui/Section/index.tsx +2 -2
  356. package/src/swift-ui/SecureField/index.tsx +2 -2
  357. package/src/swift-ui/ShareLink/index.tsx +2 -2
  358. package/src/swift-ui/Slider/index.tsx +2 -2
  359. package/src/swift-ui/Stepper/index.tsx +2 -2
  360. package/src/swift-ui/SwipeActions/index.tsx +4 -4
  361. package/src/swift-ui/SyncToggle/index.tsx +2 -2
  362. package/src/swift-ui/TabView/Tab.tsx +2 -2
  363. package/src/swift-ui/TabView/index.tsx +2 -2
  364. package/src/swift-ui/TextField/index.tsx +2 -2
  365. package/src/swift-ui/Toggle/index.tsx +2 -2
  366. package/src/swift-ui/VStack/index.tsx +2 -2
  367. package/src/swift-ui/ZStack/index.tsx +2 -2
  368. package/src/swift-ui/modifiers/index.ts +80 -0
  369. package/src/swift-ui/modifiers/presentationModifiers.ts +22 -0
  370. package/src/ts-declarations/react-native-web.d.ts +31 -3
  371. package/src/universal/Button/index.tsx +83 -35
  372. package/src/universal/Checkbox/index.tsx +85 -30
  373. package/src/universal/Collapsible/index.tsx +5 -17
  374. package/src/universal/FieldGroup/FieldGroup.tsx +5 -15
  375. package/src/universal/FieldGroup/FieldSection.tsx +14 -31
  376. package/src/universal/Host/index.tsx +44 -30
  377. package/src/universal/Host/types.ts +17 -2
  378. package/src/universal/ListItem/ListItem.android.tsx +10 -2
  379. package/src/universal/ListItem/ListItem.ios.tsx +23 -6
  380. package/src/universal/ListItem/types.ts +10 -0
  381. package/src/universal/Picker/Picker.tsx +74 -29
  382. package/src/universal/Slider/index.tsx +90 -9
  383. package/src/universal/Switch/index.android.tsx +2 -2
  384. package/src/universal/Switch/index.tsx +77 -18
  385. package/src/universal/TextInput/index.tsx +49 -13
  386. package/src/universal/hooks.ts +25 -1
  387. package/src/universal/keyboardEvent.fx.ts +28 -0
  388. package/src/universal/webUtils.ts +245 -0
  389. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18-sources.jar.md5 +0 -1
  390. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18-sources.jar.sha1 +0 -1
  391. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18-sources.jar.sha256 +0 -1
  392. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18-sources.jar.sha512 +0 -1
  393. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar +0 -0
  394. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.md5 +0 -1
  395. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.sha1 +0 -1
  396. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.sha256 +0 -1
  397. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.aar.sha512 +0 -1
  398. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.module.md5 +0 -1
  399. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.module.sha1 +0 -1
  400. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.module.sha256 +0 -1
  401. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.module.sha512 +0 -1
  402. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.md5 +0 -1
  403. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.sha1 +0 -1
  404. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.sha256 +0 -1
  405. package/local-maven-repo/expo/modules/ui/expo.modules.ui/56.0.18/expo.modules.ui-56.0.18.pom.sha512 +0 -1
@@ -5,7 +5,7 @@ import { type ViewEvent } from '../../types';
5
5
  import { createViewModifierEventListener } from '../modifiers/utils';
6
6
  import { type CommonViewModifierProps } from '../types';
7
7
 
8
- export type TabViewProps = {
8
+ export interface TabViewProps extends CommonViewModifierProps {
9
9
  /**
10
10
  * The selected tab (controlled mode). Pair with `onSelectionChange`.
11
11
  * Pass `defaultSelection` instead to let the native view manage state.
@@ -24,7 +24,7 @@ export type TabViewProps = {
24
24
  * `<TabView.Tab>` elements defining the pages.
25
25
  */
26
26
  children: React.ReactElement | React.ReactElement[];
27
- } & CommonViewModifierProps;
27
+ }
28
28
 
29
29
  type NativeTabViewProps = Omit<TabViewProps, 'onSelectionChange'> &
30
30
  ViewEvent<'onSelectionChange', { selection: string }>;
@@ -28,7 +28,7 @@ export type TextFieldRef = {
28
28
  */
29
29
  export type TextFieldSelection = { start: number; end: number };
30
30
 
31
- export type TextFieldProps = {
31
+ export interface TextFieldProps extends CommonViewModifierProps {
32
32
  ref?: Ref<TextFieldRef>;
33
33
  /**
34
34
  * An observable state that holds the current text.
@@ -80,7 +80,7 @@ export type TextFieldProps = {
80
80
  * placeholder's styling).
81
81
  */
82
82
  children?: React.ReactNode;
83
- } & CommonViewModifierProps;
83
+ }
84
84
 
85
85
  export type NativeTextFieldProps = Omit<
86
86
  TextFieldProps,
@@ -5,7 +5,7 @@ import type { SFSymbol } from 'sf-symbols-typescript';
5
5
  import { createViewModifierEventListener } from '../modifiers/utils';
6
6
  import { type CommonViewModifierProps } from '../types';
7
7
 
8
- export type ToggleProps = {
8
+ export interface ToggleProps extends CommonViewModifierProps {
9
9
  /**
10
10
  * A Boolean value that determines the on/off state of the toggle.
11
11
  */
@@ -28,7 +28,7 @@ export type ToggleProps = {
28
28
  * the first represents the title and the second represents the subtitle.
29
29
  */
30
30
  children?: React.ReactNode;
31
- } & CommonViewModifierProps;
31
+ }
32
32
 
33
33
  type NativeToggleProps = Omit<ToggleProps, 'onIsOnChange'> & {
34
34
  onIsOnChange: (event: NativeSyntheticEvent<{ isOn: boolean }>) => void;
@@ -3,7 +3,7 @@ import { requireNativeView } from 'expo';
3
3
  import { createViewModifierEventListener } from '../modifiers/utils';
4
4
  import { type CommonViewModifierProps } from '../types';
5
5
 
6
- export type VStackProps = {
6
+ export interface VStackProps extends CommonViewModifierProps {
7
7
  children: React.ReactNode;
8
8
  /**
9
9
  * The horizontal alignment of children within the stack.
@@ -13,7 +13,7 @@ export type VStackProps = {
13
13
  * The spacing between children.
14
14
  */
15
15
  spacing?: number;
16
- } & CommonViewModifierProps;
16
+ }
17
17
 
18
18
  const VStackNativeView: React.ComponentType<VStackProps> = requireNativeView(
19
19
  'ExpoUI',
@@ -3,13 +3,13 @@ import { requireNativeView } from 'expo';
3
3
  import { createViewModifierEventListener } from '../modifiers/utils';
4
4
  import { type Alignment, type CommonViewModifierProps } from '../types';
5
5
 
6
- export type ZStackProps = {
6
+ export interface ZStackProps extends CommonViewModifierProps {
7
7
  children: React.ReactNode;
8
8
  /**
9
9
  * The alignment of children within the stack.
10
10
  */
11
11
  alignment?: Alignment;
12
- } & CommonViewModifierProps;
12
+ }
13
13
 
14
14
  const ZStackNativeView: React.ComponentType<ZStackProps> = requireNativeView(
15
15
  'ExpoUI',
@@ -465,6 +465,65 @@ export const hidden = (hidden: boolean = true) => createModifier('hidden', { hid
465
465
  */
466
466
  export const disabled = (disabled: boolean = true) => createModifier('disabled', { disabled });
467
467
 
468
+ /**
469
+ * Adds a redaction reason to this view hierarchy, replacing rendered content
470
+ * with placeholders. Useful for skeleton loading states. Maps to SwiftUI's
471
+ * `redacted(reason:)`.
472
+ *
473
+ * `placeholder` redacts the whole subtree; `privacy` and `invalidated` redact
474
+ * only descendants marked `privacySensitive()` or `invalidatableContent()`.
475
+ * Reasons are additive and can be combined in an array; use `unredacted()` to
476
+ * exempt a subtree. The `invalidated` reason requires iOS 17+.
477
+ *
478
+ * @param reasons - The redaction reason or reasons to apply (an empty array applies none). Defaults to `'placeholder'`.
479
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/redacted(reason:)).
480
+ */
481
+ export const redacted = (
482
+ reasons:
483
+ | 'placeholder'
484
+ | 'privacy'
485
+ | 'invalidated'
486
+ | ('placeholder' | 'privacy' | 'invalidated')[] = 'placeholder'
487
+ ) =>
488
+ createModifier('redacted', {
489
+ reasons: Array.isArray(reasons) ? reasons : [reasons],
490
+ });
491
+
492
+ /**
493
+ * Removes any redaction reason inherited from an ancestor `redacted(...)` for
494
+ * this subtree. The counterpart to `redacted`; use it to exempt specific content
495
+ * from a redacted parent. Maps to SwiftUI's `unredacted()`.
496
+ *
497
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/unredacted()).
498
+ */
499
+ export const unredacted = () => createModifier('unredacted', {});
500
+
501
+ /**
502
+ * Marks the view as containing sensitive, private data, redacted only when the
503
+ * `privacy` redaction reason is applied to an ancestor (for example `redacted('privacy')`).
504
+ * It has no effect on its own and does not auto-redact screenshots. Maps to
505
+ * SwiftUI's `privacySensitive(_:)`.
506
+ *
507
+ * @param sensitive - Whether the view contains sensitive content. Defaults to `true`.
508
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/privacysensitive(_:)).
509
+ */
510
+ export const privacySensitive = (sensitive: boolean = true) =>
511
+ createModifier('privacySensitive', { sensitive });
512
+
513
+ /**
514
+ * Marks the view's content as invalidatable. It is restyled with the "pending
515
+ * update" appearance only when the `invalidated` redaction reason is applied to
516
+ * an ancestor (for example `redacted('invalidated')`). Maps to SwiftUI's
517
+ * `invalidatableContent(_:)`.
518
+ *
519
+ * @param invalidatable - Whether the content can be invalidated. Defaults to `true`.
520
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/invalidatablecontent(_:)).
521
+ * @platform ios 17.0+
522
+ * @platform tvos 17.0+
523
+ */
524
+ export const invalidatableContent = (invalidatable: boolean = true) =>
525
+ createModifier('invalidatableContent', { invalidatable });
526
+
468
527
  /**
469
528
  * Sets the z-index (display order) of a view.
470
529
  * @param index - The z-index value.
@@ -776,6 +835,22 @@ export const accessibilityIdentifier = (identifier: string) =>
776
835
  export const accessibilityHidden = (hidden: boolean = true) =>
777
836
  createModifier('accessibilityHidden', { hidden });
778
837
 
838
+ /**
839
+ * Controls how a view's child accessibility elements are exposed, mirroring SwiftUI's
840
+ * `accessibilityElement(children:)`. It creates a new accessibility element (or modifies
841
+ * the existing one) and applies the chosen behavior to the subtree.
842
+ *
843
+ * Complements `accessibilityHidden`, which hides a single leaf, by acting on the whole subtree.
844
+ *
845
+ * @param children - How the child accessibility elements are treated:
846
+ * - `ignore` - hide the children; the new element starts with no properties, so pair it with `accessibilityLabel` (default).
847
+ * - `combine` - merge the children's accessibility properties into the new element.
848
+ * - `contain` - keep the children as accessible elements, grouped in the new element as a container (navigated in order).
849
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/accessibilityelement(children:)).
850
+ */
851
+ export const accessibilityElement = (children: 'ignore' | 'combine' | 'contain' = 'ignore') =>
852
+ createModifier('accessibilityElement', { children });
853
+
779
854
  /**
780
855
  * Sets layout priority for the view.
781
856
  * @param priority - Layout priority value.
@@ -1451,6 +1526,10 @@ export type BuiltInModifier =
1451
1526
  | ReturnType<typeof tint>
1452
1527
  | ReturnType<typeof hidden>
1453
1528
  | ReturnType<typeof disabled>
1529
+ | ReturnType<typeof redacted>
1530
+ | ReturnType<typeof unredacted>
1531
+ | ReturnType<typeof privacySensitive>
1532
+ | ReturnType<typeof invalidatableContent>
1454
1533
  | ReturnType<typeof zIndex>
1455
1534
  | ReturnType<typeof blur>
1456
1535
  | ReturnType<typeof brightness>
@@ -1474,6 +1553,7 @@ export type BuiltInModifier =
1474
1553
  | ReturnType<typeof accessibilityInputLabels>
1475
1554
  | ReturnType<typeof accessibilityIdentifier>
1476
1555
  | ReturnType<typeof accessibilityHidden>
1556
+ | ReturnType<typeof accessibilityElement>
1477
1557
  | ReturnType<typeof layoutPriority>
1478
1558
  | ReturnType<typeof mask>
1479
1559
  | ReturnType<typeof overlay>
@@ -103,3 +103,25 @@ export const presentationBackground = (color: string) =>
103
103
  */
104
104
  export const interactiveDismissDisabled = (isDisabled: boolean = true) =>
105
105
  createModifier('interactiveDismissDisabled', { isDisabled });
106
+
107
+ /**
108
+ * Sizing behavior for a sheet presentation.
109
+ * - `'automatic'`: The system default sizing.
110
+ * - `'fitted'`: Sizes the sheet to fit its content.
111
+ * - `'form'`: A compact, centered form sheet.
112
+ * - `'page'`: A larger page sheet.
113
+ *
114
+ * @remarks Sizing mainly affects the regular size class (iPad); in a compact size class (iPhone)
115
+ * sheets remain edge-attached and detents drive the height.
116
+ */
117
+ export type PresentationSizingType = 'automatic' | 'fitted' | 'form' | 'page';
118
+
119
+ /**
120
+ * Sets the sizing of a sheet presentation.
121
+ * @param sizing - The sizing behavior to apply.
122
+ * @platform ios 18.0+
123
+ * @platform tvos 18.0+
124
+ * @see Official [SwiftUI documentation](https://developer.apple.com/documentation/swiftui/view/presentationsizing(_:)).
125
+ */
126
+ export const presentationSizing = (sizing: PresentationSizingType) =>
127
+ createModifier('presentationSizing', { sizing });
@@ -97,11 +97,37 @@ declare module 'react-native' {
97
97
  }
98
98
 
99
99
  export interface ViewProps extends WebAccessibilityProps {
100
+ dataSet?: Record<string, string | undefined>;
100
101
  dir?: string;
101
102
  role?: WebRole;
102
103
  }
103
104
 
104
- export interface ImageStyle {
105
+ /**
106
+ * Animations and transitions
107
+ */
108
+
109
+ type AnimationDirection = 'alternate' | 'alternate-reverse' | 'normal' | 'reverse';
110
+ type AnimationFillMode = 'none' | 'forwards' | 'backwards' | 'both';
111
+ type AnimationIterationCount = number | 'infinite';
112
+ type AnimationKeyframes = Record<string, ImageStyle | TextStyle | ViewStyle>;
113
+ type AnimationPlayState = 'paused' | 'running';
114
+
115
+ export interface AnimationStyles {
116
+ animationDelay?: string;
117
+ animationDirection?: AnimationDirection;
118
+ animationDuration?: string;
119
+ animationFillMode?: AnimationFillMode;
120
+ animationIterationCount?: AnimationIterationCount;
121
+ animationKeyframes?: AnimationKeyframes | AnimationKeyframes[];
122
+ animationPlayState?: AnimationPlayState;
123
+ animationTimingFunction?: string;
124
+ transitionDelay?: string;
125
+ transitionDuration?: string;
126
+ transitionProperty?: string;
127
+ transitionTimingFunction?: string;
128
+ }
129
+
130
+ export interface ImageStyle extends AnimationStyles {
105
131
  display?: DisplayValue;
106
132
  height?: WebDimensionValue;
107
133
  width?: WebDimensionValue;
@@ -113,7 +139,7 @@ declare module 'react-native' {
113
139
  paddingBottom?: WebDimensionValue;
114
140
  }
115
141
 
116
- export interface TextStyle {
142
+ export interface TextStyle extends AnimationStyles {
117
143
  display?: DisplayValue;
118
144
  height?: WebDimensionValue;
119
145
  width?: WebDimensionValue;
@@ -123,9 +149,11 @@ declare module 'react-native' {
123
149
  paddingRight?: WebDimensionValue;
124
150
  paddingTop?: WebDimensionValue;
125
151
  paddingBottom?: WebDimensionValue;
152
+ whiteSpace?: 'normal' | 'nowrap' | 'pre' | 'pre-line' | 'pre-wrap';
126
153
  }
127
154
 
128
- export interface ViewStyle {
155
+ export interface ViewStyle extends AnimationStyles {
156
+ appearance?: 'none' | 'auto';
129
157
  display?: DisplayValue;
130
158
  height?: WebDimensionValue;
131
159
  width?: WebDimensionValue;
@@ -1,40 +1,60 @@
1
- import { Pressable, StyleSheet, Text, type TextStyle, type ViewStyle } from 'react-native';
1
+ import { Pressable, StyleSheet, Text } from 'react-native';
2
2
 
3
- import type { ButtonProps, ButtonVariant } from './types';
4
- import { useUniversalLifecycle } from '../hooks';
3
+ import type { ButtonProps } from './types';
4
+ import { useFocusVisible, useUniversalLifecycle } from '../hooks';
5
+ import { colors, durations, easings, shadows } from '../webUtils';
5
6
 
6
- const styles = StyleSheet.create({
7
- button: {
8
- paddingHorizontal: 16,
9
- paddingVertical: 10,
7
+ const buttonStyles = StyleSheet.create({
8
+ base: {
9
+ alignItems: 'center',
10
+ backgroundColor: colors.primary[500],
10
11
  borderRadius: 8,
11
- userSelect: 'none',
12
+ boxShadow: shadows.button,
13
+ display: 'inline-flex',
14
+ height: 40,
15
+ justifyContent: 'center',
16
+ outlineStyle: 'solid',
17
+ outlineWidth: 0,
18
+ paddingHorizontal: 16,
19
+ transitionDuration: durations.fast,
20
+ transitionProperty: 'background-color, color, box-shadow, transform',
21
+ transitionTimingFunction: easings.standard,
22
+ whiteSpace: 'nowrap',
23
+ },
24
+ outlined: {
25
+ backgroundColor: 'transparent',
26
+ boxShadow: `inset 0 0 0 1px ${colors.gray[300]}`,
12
27
  },
28
+ text: {
29
+ backgroundColor: 'transparent',
30
+ boxShadow: 'none',
31
+ },
32
+ focused: { boxShadow: shadows.focus },
13
33
  disabled: { opacity: 0.5 },
14
34
  hidden: { display: 'none' },
15
- label: { textAlign: 'center' },
35
+ hovered: { backgroundColor: colors.primary[600] },
36
+ hoveredOutlined: { backgroundColor: colors.gray[50] },
37
+ hoveredText: { backgroundColor: colors.gray[50] },
38
+ pressed: {
39
+ backgroundColor: colors.primary[700],
40
+ transform: 'translateY(0.5px)',
41
+ },
42
+ pressedOutlined: { backgroundColor: colors.gray[100] },
43
+ pressedText: { backgroundColor: colors.gray[100] },
16
44
  });
17
45
 
18
- const variantStyles = StyleSheet.create({
19
- filled: { backgroundColor: '#007AFF' },
20
- outlined: {
21
- borderColor: '#007AFF',
22
- borderWidth: 1,
46
+ const textStyles = StyleSheet.create({
47
+ base: {
48
+ color: colors.primary.foreground,
49
+ fontSize: 14,
50
+ fontWeight: '500',
51
+ lineHeight: 14,
52
+ textAlign: 'center',
53
+ userSelect: 'none',
23
54
  },
24
- text: {},
25
- } satisfies Record<ButtonVariant, ViewStyle>);
26
-
27
- const variantHoverStyles = StyleSheet.create({
28
- filled: { backgroundColor: '#0066DB' },
29
- outlined: { backgroundColor: 'rgba(0, 122, 255, 0.08)' },
30
- text: { backgroundColor: 'rgba(0, 122, 255, 0.08)' },
31
- } satisfies Record<ButtonVariant, ViewStyle>);
32
-
33
- const variantLabelStyles = StyleSheet.create({
34
- filled: { color: '#FFFFFF' },
35
- outlined: { color: '#007AFF' },
36
- text: { color: '#007AFF' },
37
- } satisfies Record<ButtonVariant, TextStyle>);
55
+ outlined: { color: colors.gray[900] },
56
+ text: { color: colors.primary[600] },
57
+ });
38
58
 
39
59
  /**
40
60
  * A pressable button that supports multiple visual variants.
@@ -53,21 +73,49 @@ export function Button({
53
73
  }: ButtonProps) {
54
74
  useUniversalLifecycle(onAppear, onDisappear);
55
75
 
76
+ const { focusVisible, onFocus, onBlur } = useFocusVisible();
77
+
56
78
  return (
57
79
  <Pressable
58
80
  role="button"
81
+ onFocus={onFocus}
82
+ onBlur={onBlur}
59
83
  onPress={onPress}
60
84
  disabled={disabled}
61
85
  testID={testID}
62
- style={({ hovered }) => [
63
- styles.button,
64
- variantStyles[variant],
86
+ style={({ hovered, pressed }) => [
87
+ buttonStyles.base,
88
+ variant === 'outlined' && buttonStyles.outlined,
89
+ variant === 'text' && buttonStyles.text,
90
+
91
+ hovered && [
92
+ buttonStyles.hovered,
93
+ variant === 'outlined' && buttonStyles.hoveredOutlined,
94
+ variant === 'text' && buttonStyles.hoveredText,
95
+ ],
96
+
97
+ pressed && [
98
+ buttonStyles.pressed,
99
+ variant === 'outlined' && buttonStyles.pressedOutlined,
100
+ variant === 'text' && buttonStyles.pressedText,
101
+ ],
102
+
65
103
  style,
66
- hovered && !disabled && variantHoverStyles[variant],
67
- hidden && styles.hidden,
68
- disabled && styles.disabled,
104
+
105
+ focusVisible && buttonStyles.focused,
106
+ hidden && buttonStyles.hidden,
107
+ disabled && buttonStyles.disabled,
69
108
  ]}>
70
- {children ?? <Text style={[styles.label, variantLabelStyles[variant]]}>{label}</Text>}
109
+ {children ?? (
110
+ <Text
111
+ style={[
112
+ textStyles.base,
113
+ variant === 'outlined' && textStyles.outlined,
114
+ variant === 'text' && textStyles.text,
115
+ ]}>
116
+ {label}
117
+ </Text>
118
+ )}
71
119
  </Pressable>
72
120
  );
73
121
  }
@@ -1,56 +1,111 @@
1
- import type { ComponentProps } from 'react';
2
- import {
3
- StyleSheet,
4
- Text,
5
- unstable_createElement,
6
- useColorScheme,
7
- View,
8
- type ViewProps,
9
- } from 'react-native';
1
+ import { Pressable, StyleSheet, Text, View } from 'react-native';
10
2
 
11
3
  import type { CheckboxProps } from './types';
4
+ import { useFocusVisible } from '../hooks';
5
+ import { colors, createWebComponent, durations, easings, shadows } from '../webUtils';
6
+
7
+ const Input = createWebComponent('input');
12
8
 
13
9
  const styles = StyleSheet.create({
14
- label: {
15
- flexDirection: 'row',
16
- display: 'inline-flex',
10
+ view: {
17
11
  alignItems: 'center',
18
- gap: 8,
19
12
  cursor: 'pointer',
13
+ display: 'inline-flex',
14
+ flexDirection: 'row',
15
+ gap: 10,
20
16
  },
21
- disabled: {
22
- opacity: 0.5,
17
+ viewDisabled: {
23
18
  cursor: 'auto',
24
19
  },
25
- cursorInherit: {
26
- // @ts-expect-error
27
- cursor: 'inherit',
20
+ input: {
21
+ position: 'absolute',
22
+ opacity: 0,
23
+ pointerEvents: 'none',
24
+ margin: 0,
25
+ width: 0,
26
+ height: 0,
27
+ },
28
+ pressable: {
29
+ backgroundColor: colors.background,
30
+ borderColor: colors.gray[300],
31
+ borderRadius: 6,
32
+ borderStyle: 'solid',
33
+ borderWidth: 1.5,
34
+ height: 18,
35
+ outlineStyle: 'solid',
36
+ outlineWidth: 0,
37
+ transitionDuration: durations.fast,
38
+ transitionProperty: 'all',
39
+ transitionTimingFunction: easings.standard,
40
+ width: 18,
41
+ },
42
+ hovered: {
43
+ borderColor: colors.primary[500],
28
44
  },
29
- darkText: {
30
- color: '#fff',
45
+ focused: {
46
+ boxShadow: shadows.focus,
47
+ },
48
+ checked: {
49
+ backgroundColor: colors.primary[500],
50
+ borderColor: colors.primary[500],
51
+ },
52
+ disabled: {
53
+ cursor: 'auto',
54
+ opacity: 0.5,
55
+ },
56
+ text: {
57
+ color: colors.foreground,
58
+ lineHeight: 20,
59
+ userSelect: 'none',
31
60
  },
32
61
  });
33
62
 
34
- const NativeCheckbox = (
35
- props: Omit<ComponentProps<'input'>, 'style' | 'type'> & { style?: ViewProps['style'] }
36
- ) => unstable_createElement('input', { ...props, type: 'checkbox' });
37
-
38
63
  /**
39
64
  * A toggle control that represents a checked or unchecked state.
40
65
  */
41
66
  export function Checkbox({ value, onValueChange, label, disabled = false, testID }: CheckboxProps) {
42
- const isDark = useColorScheme() === 'dark';
67
+ const { focusVisible, onFocus, onBlur } = useFocusVisible();
43
68
 
44
69
  return (
45
- <View role="label" aria-disabled={disabled} style={[styles.label, disabled && styles.disabled]}>
46
- <NativeCheckbox
70
+ <View
71
+ aria-disabled={disabled}
72
+ role="label"
73
+ style={[styles.view, disabled && styles.viewDisabled]}>
74
+ <Input
75
+ type="checkbox"
76
+ focusable
77
+ onFocus={onFocus}
78
+ onBlur={onBlur}
47
79
  checked={value}
48
- onChange={(e) => onValueChange(e.target.checked)}
80
+ onChange={({ target: { checked } }) => onValueChange(checked)}
49
81
  disabled={disabled}
50
82
  data-testid={testID}
51
- style={styles.cursorInherit}
83
+ style={styles.input}
52
84
  />
53
- {label != null && <Text style={isDark && styles.darkText}>{label}</Text>}
85
+
86
+ <Pressable
87
+ tabIndex={-1}
88
+ style={({ hovered }) => [
89
+ styles.pressable,
90
+ hovered && !disabled && styles.hovered,
91
+ value && styles.checked,
92
+ focusVisible && styles.focused,
93
+ disabled && styles.disabled,
94
+ ]}>
95
+ {value && (
96
+ <svg
97
+ xmlns="http://www.w3.org/2000/svg"
98
+ viewBox="0 0 16 16"
99
+ fill="none"
100
+ stroke="white"
101
+ strokeWidth="1.75"
102
+ strokeLinecap="round"
103
+ strokeLinejoin="round">
104
+ <polyline points="3 8.5 6.5 12 13 4.5" />
105
+ </svg>
106
+ )}
107
+ </Pressable>
108
+ {label != null && <Text style={styles.text}>{label}</Text>}
54
109
  </View>
55
110
  );
56
111
  }
@@ -1,23 +1,11 @@
1
- import type { ComponentProps, SyntheticEvent } from 'react';
2
- import {
3
- StyleSheet,
4
- Text,
5
- unstable_createElement,
6
- useColorScheme,
7
- View,
8
- type TextProps,
9
- type ViewProps,
10
- } from 'react-native';
1
+ import type { SyntheticEvent } from 'react';
2
+ import { StyleSheet, Text, useColorScheme, View } from 'react-native';
11
3
 
12
4
  import type { CollapsibleProps } from './types';
5
+ import { createWebComponent } from '../webUtils';
13
6
 
14
- const Details = (
15
- props: Omit<ComponentProps<'details'>, 'style'> & { style?: TextProps['style'] }
16
- ) => unstable_createElement('details', props);
17
-
18
- const Summary = (
19
- props: Omit<ComponentProps<'summary'>, 'style'> & { style?: ViewProps['style'] }
20
- ) => unstable_createElement('summary', props);
7
+ const Details = createWebComponent('details');
8
+ const Summary = createWebComponent('summary');
21
9
 
22
10
  /**
23
11
  * A primitive that toggles visibility of its content via a labelled tappable
@@ -1,24 +1,21 @@
1
- import { ScrollView, StyleSheet, useColorScheme } from 'react-native';
1
+ import { ScrollView, StyleSheet } from 'react-native';
2
2
 
3
3
  import { groupFieldGroupChildren } from './groupChildren';
4
4
  import type { FieldGroupProps } from './types';
5
5
  import { useUniversalLifecycle } from '../hooks';
6
+ import { colors } from '../webUtils';
6
7
 
7
8
  const styles = StyleSheet.create({
8
9
  container: {
9
- backgroundColor: '#f2f2f7',
10
+ backgroundColor: colors.gray[50],
10
11
  flex: 1,
11
12
  },
12
- containerDark: {
13
- backgroundColor: '#000000',
14
- },
15
13
  hidden: {
16
14
  display: 'none',
17
15
  },
18
16
  contentContainer: {
19
- paddingHorizontal: 16,
20
- paddingVertical: 16,
21
17
  gap: 24,
18
+ padding: 16,
22
19
  },
23
20
  });
24
21
 
@@ -39,16 +36,9 @@ export function FieldGroup({
39
36
  }: FieldGroupProps) {
40
37
  useUniversalLifecycle(onAppear, onDisappear);
41
38
 
42
- const isDarkScheme = useColorScheme() === 'dark';
43
-
44
39
  return (
45
40
  <ScrollView
46
- style={[
47
- styles.container,
48
- isDarkScheme && styles.containerDark,
49
- style,
50
- hidden && styles.hidden,
51
- ]}
41
+ style={[styles.container, style, hidden && styles.hidden]}
52
42
  contentContainerStyle={styles.contentContainer}
53
43
  testID={testID}>
54
44
  {groupFieldGroupChildren(children)}