@tamagui/core 1.0.1-beta.76 → 1.0.1-beta.77

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 (553) hide show
  1. package/dist/cjs/Pressability.js +0 -0
  2. package/dist/cjs/Pressability.js.map +0 -0
  3. package/dist/cjs/Pressability.native.js +0 -0
  4. package/dist/cjs/Pressability.native.js.map +0 -0
  5. package/dist/cjs/Tamagui.js +0 -0
  6. package/dist/cjs/Tamagui.js.map +0 -0
  7. package/dist/cjs/ThemeContext.js +0 -0
  8. package/dist/cjs/ThemeContext.js.map +0 -0
  9. package/dist/cjs/ThemeManager.js +0 -0
  10. package/dist/cjs/ThemeManager.js.map +0 -0
  11. package/dist/cjs/conf.js +0 -0
  12. package/dist/cjs/conf.js.map +0 -0
  13. package/dist/cjs/constants/constants.js +0 -0
  14. package/dist/cjs/constants/constants.js.map +0 -0
  15. package/dist/cjs/constants/platform.js +0 -0
  16. package/dist/cjs/constants/platform.js.map +0 -0
  17. package/dist/cjs/constants/rnw.js +0 -0
  18. package/dist/cjs/constants/rnw.js.map +0 -0
  19. package/dist/cjs/contexts/ButtonInsideButtonContext.js +0 -0
  20. package/dist/cjs/contexts/ButtonInsideButtonContext.js.map +0 -0
  21. package/dist/cjs/createComponent.js +0 -0
  22. package/dist/cjs/createComponent.js.map +0 -0
  23. package/dist/cjs/createFont.js +0 -0
  24. package/dist/cjs/createFont.js.map +0 -0
  25. package/dist/cjs/createShorthands.js +0 -0
  26. package/dist/cjs/createShorthands.js.map +0 -0
  27. package/dist/cjs/createTamagui.js +0 -0
  28. package/dist/cjs/createTamagui.js.map +0 -0
  29. package/dist/cjs/createTheme.js +0 -0
  30. package/dist/cjs/createTheme.js.map +0 -0
  31. package/dist/cjs/createTokens.js +0 -0
  32. package/dist/cjs/createTokens.js.map +0 -0
  33. package/dist/cjs/createVariable.js +0 -0
  34. package/dist/cjs/createVariable.js.map +0 -0
  35. package/dist/cjs/createVariables.js +0 -0
  36. package/dist/cjs/createVariables.js.map +0 -0
  37. package/dist/cjs/defaultComponentState.js +0 -0
  38. package/dist/cjs/defaultComponentState.js.map +0 -0
  39. package/dist/cjs/helpers/RNComponents.js +0 -0
  40. package/dist/cjs/helpers/RNComponents.js.map +0 -0
  41. package/dist/cjs/helpers/areEqualSets.js +0 -0
  42. package/dist/cjs/helpers/areEqualSets.js.map +0 -0
  43. package/dist/cjs/helpers/calc.js +0 -0
  44. package/dist/cjs/helpers/calc.js.map +0 -0
  45. package/dist/cjs/helpers/createMediaStyle.js +0 -0
  46. package/dist/cjs/helpers/createMediaStyle.js.map +0 -0
  47. package/dist/cjs/helpers/createPropMapper.js +0 -0
  48. package/dist/cjs/helpers/createPropMapper.js.map +0 -0
  49. package/dist/cjs/helpers/createShallowUpdate.js +0 -0
  50. package/dist/cjs/helpers/createShallowUpdate.js.map +0 -0
  51. package/dist/cjs/helpers/createTamaguiProvider.js +0 -0
  52. package/dist/cjs/helpers/createTamaguiProvider.js.map +0 -0
  53. package/dist/cjs/helpers/extendStaticConfig.js +0 -0
  54. package/dist/cjs/helpers/extendStaticConfig.js.map +0 -0
  55. package/dist/cjs/helpers/fixNativeShadow.js +0 -0
  56. package/dist/cjs/helpers/fixNativeShadow.js.map +0 -0
  57. package/dist/cjs/helpers/fixNativeShadow.native.js +0 -0
  58. package/dist/cjs/helpers/fixNativeShadow.native.js.map +0 -0
  59. package/dist/cjs/helpers/generateAtomicStyles.js +0 -0
  60. package/dist/cjs/helpers/generateAtomicStyles.js.map +0 -0
  61. package/dist/cjs/helpers/getExpandedShorthands.js +0 -0
  62. package/dist/cjs/helpers/getExpandedShorthands.js.map +0 -0
  63. package/dist/cjs/helpers/getSize.js +0 -0
  64. package/dist/cjs/helpers/getSize.js.map +0 -0
  65. package/dist/cjs/helpers/getSplitStyles.js +0 -0
  66. package/dist/cjs/helpers/getSplitStyles.js.map +0 -0
  67. package/dist/cjs/helpers/getStackSize.js +0 -0
  68. package/dist/cjs/helpers/getStackSize.js.map +0 -0
  69. package/dist/cjs/helpers/getStylesAtomic.js +0 -0
  70. package/dist/cjs/helpers/getStylesAtomic.js.map +0 -0
  71. package/dist/cjs/helpers/getStylesAtomic.native.js +0 -0
  72. package/dist/cjs/helpers/getStylesAtomic.native.js.map +0 -0
  73. package/dist/cjs/helpers/getTextSize.js +0 -0
  74. package/dist/cjs/helpers/getTextSize.js.map +0 -0
  75. package/dist/cjs/helpers/getVariantExtras.js +0 -0
  76. package/dist/cjs/helpers/getVariantExtras.js.map +0 -0
  77. package/dist/cjs/helpers/insertStyleRule.js +0 -0
  78. package/dist/cjs/helpers/insertStyleRule.js.map +0 -0
  79. package/dist/cjs/helpers/isObj.js +0 -0
  80. package/dist/cjs/helpers/isObj.js.map +0 -0
  81. package/dist/cjs/helpers/isTamaguiComponent.js +0 -0
  82. package/dist/cjs/helpers/isTamaguiComponent.js.map +0 -0
  83. package/dist/cjs/helpers/isTamaguiElement.js +0 -0
  84. package/dist/cjs/helpers/isTamaguiElement.js.map +0 -0
  85. package/dist/cjs/helpers/matchMedia.js +0 -0
  86. package/dist/cjs/helpers/matchMedia.js.map +0 -0
  87. package/dist/cjs/helpers/matchMedia.native.js +0 -0
  88. package/dist/cjs/helpers/matchMedia.native.js.map +0 -0
  89. package/dist/cjs/helpers/mergeProps.js +0 -0
  90. package/dist/cjs/helpers/mergeProps.js.map +0 -0
  91. package/dist/cjs/helpers/mergeTransform.js +0 -0
  92. package/dist/cjs/helpers/mergeTransform.js.map +0 -0
  93. package/dist/cjs/helpers/nativeGestureHandler.native.js +0 -0
  94. package/dist/cjs/helpers/nativeGestureHandler.native.js.map +0 -0
  95. package/dist/cjs/helpers/proxyThemeVariables.js +0 -0
  96. package/dist/cjs/helpers/proxyThemeVariables.js.map +0 -0
  97. package/dist/cjs/helpers/pseudoDescriptors.js +0 -0
  98. package/dist/cjs/helpers/pseudoDescriptors.js.map +0 -0
  99. package/dist/cjs/helpers/registerCSSVariable.js +0 -0
  100. package/dist/cjs/helpers/registerCSSVariable.js.map +0 -0
  101. package/dist/cjs/helpers/themeable.js +0 -0
  102. package/dist/cjs/helpers/themeable.js.map +0 -0
  103. package/dist/cjs/helpers/validate.js +0 -0
  104. package/dist/cjs/helpers/validate.js.map +0 -0
  105. package/dist/cjs/helpers/withStaticProperties.js +0 -0
  106. package/dist/cjs/helpers/withStaticProperties.js.map +0 -0
  107. package/dist/cjs/helpers/wrapThemeManagerContext.js +0 -0
  108. package/dist/cjs/helpers/wrapThemeManagerContext.js.map +0 -0
  109. package/dist/cjs/hooks/useConstant.js +0 -0
  110. package/dist/cjs/hooks/useConstant.js.map +0 -0
  111. package/dist/cjs/hooks/useFeatures.js +0 -0
  112. package/dist/cjs/hooks/useFeatures.js.map +0 -0
  113. package/dist/cjs/hooks/useId.js +0 -0
  114. package/dist/cjs/hooks/useId.js.map +0 -0
  115. package/dist/cjs/hooks/useIsMounted.js +0 -0
  116. package/dist/cjs/hooks/useIsMounted.js.map +0 -0
  117. package/dist/cjs/hooks/useIsTouchDevice.js +0 -0
  118. package/dist/cjs/hooks/useIsTouchDevice.js.map +0 -0
  119. package/dist/cjs/hooks/useMedia.js +0 -0
  120. package/dist/cjs/hooks/useMedia.js.map +0 -0
  121. package/dist/cjs/hooks/usePressable.js +0 -0
  122. package/dist/cjs/hooks/usePressable.js.map +0 -0
  123. package/dist/cjs/hooks/usePrevious.js +0 -0
  124. package/dist/cjs/hooks/usePrevious.js.map +0 -0
  125. package/dist/cjs/hooks/useTheme.js +0 -0
  126. package/dist/cjs/hooks/useTheme.js.map +0 -0
  127. package/dist/cjs/hooks/useUnmountEffect.js +0 -0
  128. package/dist/cjs/hooks/useUnmountEffect.js.map +0 -0
  129. package/dist/cjs/index.js +0 -0
  130. package/dist/cjs/index.js.map +0 -0
  131. package/dist/cjs/insertFont.js +1 -2
  132. package/dist/cjs/insertFont.js.map +2 -2
  133. package/dist/cjs/static.js +0 -0
  134. package/dist/cjs/static.js.map +0 -0
  135. package/dist/cjs/styled.js +0 -0
  136. package/dist/cjs/styled.js.map +0 -0
  137. package/dist/cjs/types-rnw.js +0 -0
  138. package/dist/cjs/types-rnw.js.map +0 -0
  139. package/dist/cjs/types.js +0 -0
  140. package/dist/cjs/types.js.map +0 -0
  141. package/dist/cjs/views/Slot.js +0 -0
  142. package/dist/cjs/views/Slot.js.map +0 -0
  143. package/dist/cjs/views/Stack.js +0 -0
  144. package/dist/cjs/views/Stack.js.map +0 -0
  145. package/dist/cjs/views/Text.js +0 -0
  146. package/dist/cjs/views/Text.js.map +0 -0
  147. package/dist/cjs/views/TextAncestorContext.js +0 -0
  148. package/dist/cjs/views/TextAncestorContext.js.map +0 -0
  149. package/dist/cjs/views/Theme.js +0 -0
  150. package/dist/cjs/views/Theme.js.map +0 -0
  151. package/dist/cjs/views/ThemeInverse.js +0 -0
  152. package/dist/cjs/views/ThemeInverse.js.map +0 -0
  153. package/dist/cjs/views/ThemeProvider.js +0 -0
  154. package/dist/cjs/views/ThemeProvider.js.map +0 -0
  155. package/dist/cjs/views/ThemeReset.js +0 -0
  156. package/dist/cjs/views/ThemeReset.js.map +0 -0
  157. package/dist/esm/Pressability.js +0 -0
  158. package/dist/esm/Pressability.js.map +0 -0
  159. package/dist/esm/Pressability.native.js +0 -0
  160. package/dist/esm/Pressability.native.js.map +0 -0
  161. package/dist/esm/Tamagui.js +0 -0
  162. package/dist/esm/Tamagui.js.map +0 -0
  163. package/dist/esm/ThemeContext.js +0 -0
  164. package/dist/esm/ThemeContext.js.map +0 -0
  165. package/dist/esm/ThemeManager.js +0 -0
  166. package/dist/esm/ThemeManager.js.map +0 -0
  167. package/dist/esm/conf.js +0 -0
  168. package/dist/esm/conf.js.map +0 -0
  169. package/dist/esm/constants/constants.js +0 -0
  170. package/dist/esm/constants/constants.js.map +0 -0
  171. package/dist/esm/constants/platform.js +0 -0
  172. package/dist/esm/constants/platform.js.map +0 -0
  173. package/dist/esm/constants/rnw.js +0 -0
  174. package/dist/esm/constants/rnw.js.map +0 -0
  175. package/dist/esm/contexts/ButtonInsideButtonContext.js +0 -0
  176. package/dist/esm/contexts/ButtonInsideButtonContext.js.map +0 -0
  177. package/dist/esm/createComponent.js +0 -0
  178. package/dist/esm/createComponent.js.map +0 -0
  179. package/dist/esm/createFont.js +0 -0
  180. package/dist/esm/createFont.js.map +0 -0
  181. package/dist/esm/createShorthands.js +0 -0
  182. package/dist/esm/createShorthands.js.map +0 -0
  183. package/dist/esm/createTamagui.js +0 -0
  184. package/dist/esm/createTamagui.js.map +0 -0
  185. package/dist/esm/createTheme.js +0 -0
  186. package/dist/esm/createTheme.js.map +0 -0
  187. package/dist/esm/createTokens.js +0 -0
  188. package/dist/esm/createTokens.js.map +0 -0
  189. package/dist/esm/createVariable.js +0 -0
  190. package/dist/esm/createVariable.js.map +0 -0
  191. package/dist/esm/createVariables.js +0 -0
  192. package/dist/esm/createVariables.js.map +0 -0
  193. package/dist/esm/defaultComponentState.js +0 -0
  194. package/dist/esm/defaultComponentState.js.map +0 -0
  195. package/dist/esm/helpers/RNComponents.js +0 -0
  196. package/dist/esm/helpers/RNComponents.js.map +0 -0
  197. package/dist/esm/helpers/areEqualSets.js +0 -0
  198. package/dist/esm/helpers/areEqualSets.js.map +0 -0
  199. package/dist/esm/helpers/calc.js +0 -0
  200. package/dist/esm/helpers/calc.js.map +0 -0
  201. package/dist/esm/helpers/createMediaStyle.js +0 -0
  202. package/dist/esm/helpers/createMediaStyle.js.map +0 -0
  203. package/dist/esm/helpers/createPropMapper.js +0 -0
  204. package/dist/esm/helpers/createPropMapper.js.map +0 -0
  205. package/dist/esm/helpers/createShallowUpdate.js +0 -0
  206. package/dist/esm/helpers/createShallowUpdate.js.map +0 -0
  207. package/dist/esm/helpers/createTamaguiProvider.js +0 -0
  208. package/dist/esm/helpers/createTamaguiProvider.js.map +0 -0
  209. package/dist/esm/helpers/extendStaticConfig.js +0 -0
  210. package/dist/esm/helpers/extendStaticConfig.js.map +0 -0
  211. package/dist/esm/helpers/fixNativeShadow.js +0 -0
  212. package/dist/esm/helpers/fixNativeShadow.js.map +0 -0
  213. package/dist/esm/helpers/fixNativeShadow.native.js +0 -0
  214. package/dist/esm/helpers/fixNativeShadow.native.js.map +0 -0
  215. package/dist/esm/helpers/generateAtomicStyles.js +0 -0
  216. package/dist/esm/helpers/generateAtomicStyles.js.map +0 -0
  217. package/dist/esm/helpers/getExpandedShorthands.js +0 -0
  218. package/dist/esm/helpers/getExpandedShorthands.js.map +0 -0
  219. package/dist/esm/helpers/getSize.js +0 -0
  220. package/dist/esm/helpers/getSize.js.map +0 -0
  221. package/dist/esm/helpers/getSplitStyles.js +0 -0
  222. package/dist/esm/helpers/getSplitStyles.js.map +0 -0
  223. package/dist/esm/helpers/getStackSize.js +0 -0
  224. package/dist/esm/helpers/getStackSize.js.map +0 -0
  225. package/dist/esm/helpers/getStylesAtomic.js +0 -0
  226. package/dist/esm/helpers/getStylesAtomic.js.map +0 -0
  227. package/dist/esm/helpers/getStylesAtomic.native.js +0 -0
  228. package/dist/esm/helpers/getStylesAtomic.native.js.map +0 -0
  229. package/dist/esm/helpers/getTextSize.js +0 -0
  230. package/dist/esm/helpers/getTextSize.js.map +0 -0
  231. package/dist/esm/helpers/getVariantExtras.js +0 -0
  232. package/dist/esm/helpers/getVariantExtras.js.map +0 -0
  233. package/dist/esm/helpers/insertStyleRule.js +0 -0
  234. package/dist/esm/helpers/insertStyleRule.js.map +0 -0
  235. package/dist/esm/helpers/isObj.js +0 -0
  236. package/dist/esm/helpers/isObj.js.map +0 -0
  237. package/dist/esm/helpers/isTamaguiComponent.js +0 -0
  238. package/dist/esm/helpers/isTamaguiComponent.js.map +0 -0
  239. package/dist/esm/helpers/isTamaguiElement.js +0 -0
  240. package/dist/esm/helpers/isTamaguiElement.js.map +0 -0
  241. package/dist/esm/helpers/matchMedia.js +0 -0
  242. package/dist/esm/helpers/matchMedia.js.map +0 -0
  243. package/dist/esm/helpers/matchMedia.native.js +0 -0
  244. package/dist/esm/helpers/matchMedia.native.js.map +0 -0
  245. package/dist/esm/helpers/mergeProps.js +0 -0
  246. package/dist/esm/helpers/mergeProps.js.map +0 -0
  247. package/dist/esm/helpers/mergeTransform.js +0 -0
  248. package/dist/esm/helpers/mergeTransform.js.map +0 -0
  249. package/dist/esm/helpers/nativeGestureHandler.native.js +0 -0
  250. package/dist/esm/helpers/nativeGestureHandler.native.js.map +0 -0
  251. package/dist/esm/helpers/proxyThemeVariables.js +0 -0
  252. package/dist/esm/helpers/proxyThemeVariables.js.map +0 -0
  253. package/dist/esm/helpers/pseudoDescriptors.js +0 -0
  254. package/dist/esm/helpers/pseudoDescriptors.js.map +0 -0
  255. package/dist/esm/helpers/registerCSSVariable.js +0 -0
  256. package/dist/esm/helpers/registerCSSVariable.js.map +0 -0
  257. package/dist/esm/helpers/themeable.js +0 -0
  258. package/dist/esm/helpers/themeable.js.map +0 -0
  259. package/dist/esm/helpers/validate.js +0 -0
  260. package/dist/esm/helpers/validate.js.map +0 -0
  261. package/dist/esm/helpers/withStaticProperties.js +0 -0
  262. package/dist/esm/helpers/withStaticProperties.js.map +0 -0
  263. package/dist/esm/helpers/wrapThemeManagerContext.js +0 -0
  264. package/dist/esm/helpers/wrapThemeManagerContext.js.map +0 -0
  265. package/dist/esm/hooks/useConstant.js +0 -0
  266. package/dist/esm/hooks/useConstant.js.map +0 -0
  267. package/dist/esm/hooks/useFeatures.js +0 -0
  268. package/dist/esm/hooks/useFeatures.js.map +0 -0
  269. package/dist/esm/hooks/useId.js +0 -0
  270. package/dist/esm/hooks/useId.js.map +0 -0
  271. package/dist/esm/hooks/useIsMounted.js +0 -0
  272. package/dist/esm/hooks/useIsMounted.js.map +0 -0
  273. package/dist/esm/hooks/useIsTouchDevice.js +0 -0
  274. package/dist/esm/hooks/useIsTouchDevice.js.map +0 -0
  275. package/dist/esm/hooks/useMedia.js +0 -0
  276. package/dist/esm/hooks/useMedia.js.map +0 -0
  277. package/dist/esm/hooks/usePressable.js +0 -0
  278. package/dist/esm/hooks/usePressable.js.map +0 -0
  279. package/dist/esm/hooks/usePrevious.js +0 -0
  280. package/dist/esm/hooks/usePrevious.js.map +0 -0
  281. package/dist/esm/hooks/useTheme.js +0 -0
  282. package/dist/esm/hooks/useTheme.js.map +0 -0
  283. package/dist/esm/hooks/useUnmountEffect.js +0 -0
  284. package/dist/esm/hooks/useUnmountEffect.js.map +0 -0
  285. package/dist/esm/index.js +0 -0
  286. package/dist/esm/index.js.map +0 -0
  287. package/dist/esm/insertFont.js +1 -2
  288. package/dist/esm/insertFont.js.map +2 -2
  289. package/dist/esm/static.js +0 -0
  290. package/dist/esm/static.js.map +0 -0
  291. package/dist/esm/styled.js +0 -0
  292. package/dist/esm/styled.js.map +0 -0
  293. package/dist/esm/types-rnw.js +0 -0
  294. package/dist/esm/types-rnw.js.map +0 -0
  295. package/dist/esm/types.js +0 -0
  296. package/dist/esm/types.js.map +0 -0
  297. package/dist/esm/views/Slot.js +0 -0
  298. package/dist/esm/views/Slot.js.map +0 -0
  299. package/dist/esm/views/Stack.js +0 -0
  300. package/dist/esm/views/Stack.js.map +0 -0
  301. package/dist/esm/views/Text.js +0 -0
  302. package/dist/esm/views/Text.js.map +0 -0
  303. package/dist/esm/views/TextAncestorContext.js +0 -0
  304. package/dist/esm/views/TextAncestorContext.js.map +0 -0
  305. package/dist/esm/views/Theme.js +0 -0
  306. package/dist/esm/views/Theme.js.map +0 -0
  307. package/dist/esm/views/ThemeInverse.js +0 -0
  308. package/dist/esm/views/ThemeInverse.js.map +0 -0
  309. package/dist/esm/views/ThemeProvider.js +0 -0
  310. package/dist/esm/views/ThemeProvider.js.map +0 -0
  311. package/dist/esm/views/ThemeReset.js +0 -0
  312. package/dist/esm/views/ThemeReset.js.map +0 -0
  313. package/package.json +7 -7
  314. package/types/Pressability.d.ts +0 -0
  315. package/types/Pressability.d.ts.map +0 -0
  316. package/types/Pressability.native.d.ts +0 -0
  317. package/types/Pressability.native.d.ts.map +0 -0
  318. package/types/Tamagui.d.ts +0 -0
  319. package/types/Tamagui.d.ts.map +0 -0
  320. package/types/ThemeContext.d.ts +0 -0
  321. package/types/ThemeContext.d.ts.map +0 -0
  322. package/types/ThemeManager.d.ts +0 -0
  323. package/types/ThemeManager.d.ts.map +0 -0
  324. package/types/conf.d.ts +0 -0
  325. package/types/conf.d.ts.map +0 -0
  326. package/types/constants/constants.d.ts +0 -0
  327. package/types/constants/constants.d.ts.map +0 -0
  328. package/types/constants/platform.d.ts +0 -0
  329. package/types/constants/platform.d.ts.map +0 -0
  330. package/types/constants/rnw.d.ts +0 -0
  331. package/types/constants/rnw.d.ts.map +0 -0
  332. package/types/contexts/ButtonInsideButtonContext.d.ts +0 -0
  333. package/types/contexts/ButtonInsideButtonContext.d.ts.map +0 -0
  334. package/types/createComponent.d.ts +0 -0
  335. package/types/createComponent.d.ts.map +0 -0
  336. package/types/createFont.d.ts +0 -0
  337. package/types/createFont.d.ts.map +0 -0
  338. package/types/createShorthands.d.ts +0 -0
  339. package/types/createShorthands.d.ts.map +0 -0
  340. package/types/createTamagui.d.ts +0 -0
  341. package/types/createTamagui.d.ts.map +0 -0
  342. package/types/createTheme.d.ts +0 -0
  343. package/types/createTheme.d.ts.map +0 -0
  344. package/types/createTokens.d.ts +0 -0
  345. package/types/createTokens.d.ts.map +0 -0
  346. package/types/createVariable.d.ts +0 -0
  347. package/types/createVariable.d.ts.map +0 -0
  348. package/types/createVariables.d.ts +0 -0
  349. package/types/createVariables.d.ts.map +0 -0
  350. package/types/defaultComponentState.d.ts +0 -0
  351. package/types/defaultComponentState.d.ts.map +0 -0
  352. package/types/helpers/RNComponents.d.ts +0 -0
  353. package/types/helpers/RNComponents.d.ts.map +0 -0
  354. package/types/helpers/areEqualSets.d.ts +0 -0
  355. package/types/helpers/areEqualSets.d.ts.map +0 -0
  356. package/types/helpers/calc.d.ts +0 -0
  357. package/types/helpers/calc.d.ts.map +0 -0
  358. package/types/helpers/createMediaStyle.d.ts +0 -0
  359. package/types/helpers/createMediaStyle.d.ts.map +0 -0
  360. package/types/helpers/createPropMapper.d.ts +0 -0
  361. package/types/helpers/createPropMapper.d.ts.map +0 -0
  362. package/types/helpers/createShallowUpdate.d.ts +0 -0
  363. package/types/helpers/createShallowUpdate.d.ts.map +0 -0
  364. package/types/helpers/createTamaguiProvider.d.ts +1 -0
  365. package/types/helpers/createTamaguiProvider.d.ts.map +1 -1
  366. package/types/helpers/extendStaticConfig.d.ts +0 -0
  367. package/types/helpers/extendStaticConfig.d.ts.map +0 -0
  368. package/types/helpers/fixNativeShadow.d.ts +0 -0
  369. package/types/helpers/fixNativeShadow.d.ts.map +0 -0
  370. package/types/helpers/fixNativeShadow.native.d.ts +0 -0
  371. package/types/helpers/fixNativeShadow.native.d.ts.map +0 -0
  372. package/types/helpers/generateAtomicStyles.d.ts +0 -0
  373. package/types/helpers/generateAtomicStyles.d.ts.map +0 -0
  374. package/types/helpers/getExpandedShorthands.d.ts +0 -0
  375. package/types/helpers/getExpandedShorthands.d.ts.map +0 -0
  376. package/types/helpers/getSize.d.ts +0 -0
  377. package/types/helpers/getSize.d.ts.map +0 -0
  378. package/types/helpers/getSplitStyles.d.ts +0 -0
  379. package/types/helpers/getSplitStyles.d.ts.map +0 -0
  380. package/types/helpers/getStackSize.d.ts +0 -0
  381. package/types/helpers/getStackSize.d.ts.map +0 -0
  382. package/types/helpers/getStylesAtomic.d.ts +0 -0
  383. package/types/helpers/getStylesAtomic.d.ts.map +0 -0
  384. package/types/helpers/getStylesAtomic.native.d.ts +0 -0
  385. package/types/helpers/getStylesAtomic.native.d.ts.map +0 -0
  386. package/types/helpers/getTextSize.d.ts +0 -0
  387. package/types/helpers/getTextSize.d.ts.map +0 -0
  388. package/types/helpers/getVariantExtras.d.ts +0 -0
  389. package/types/helpers/getVariantExtras.d.ts.map +0 -0
  390. package/types/helpers/insertStyleRule.d.ts +0 -0
  391. package/types/helpers/insertStyleRule.d.ts.map +0 -0
  392. package/types/helpers/isObj.d.ts +0 -0
  393. package/types/helpers/isObj.d.ts.map +0 -0
  394. package/types/helpers/isTamaguiComponent.d.ts +0 -0
  395. package/types/helpers/isTamaguiComponent.d.ts.map +0 -0
  396. package/types/helpers/isTamaguiElement.d.ts +0 -0
  397. package/types/helpers/isTamaguiElement.d.ts.map +0 -0
  398. package/types/helpers/matchMedia.d.ts +0 -0
  399. package/types/helpers/matchMedia.d.ts.map +0 -0
  400. package/types/helpers/matchMedia.native.d.ts +0 -0
  401. package/types/helpers/matchMedia.native.d.ts.map +0 -0
  402. package/types/helpers/mergeProps.d.ts +0 -0
  403. package/types/helpers/mergeProps.d.ts.map +0 -0
  404. package/types/helpers/mergeTransform.d.ts +0 -0
  405. package/types/helpers/mergeTransform.d.ts.map +0 -0
  406. package/types/helpers/nativeGestureHandler.native.d.ts +0 -0
  407. package/types/helpers/nativeGestureHandler.native.d.ts.map +0 -0
  408. package/types/helpers/proxyThemeVariables.d.ts +0 -0
  409. package/types/helpers/proxyThemeVariables.d.ts.map +0 -0
  410. package/types/helpers/pseudoDescriptors.d.ts +0 -0
  411. package/types/helpers/pseudoDescriptors.d.ts.map +0 -0
  412. package/types/helpers/registerCSSVariable.d.ts +0 -0
  413. package/types/helpers/registerCSSVariable.d.ts.map +0 -0
  414. package/types/helpers/themeable.d.ts +0 -0
  415. package/types/helpers/themeable.d.ts.map +0 -0
  416. package/types/helpers/validate.d.ts +0 -0
  417. package/types/helpers/validate.d.ts.map +0 -0
  418. package/types/helpers/withStaticProperties.d.ts +0 -0
  419. package/types/helpers/withStaticProperties.d.ts.map +0 -0
  420. package/types/helpers/wrapThemeManagerContext.d.ts +0 -0
  421. package/types/helpers/wrapThemeManagerContext.d.ts.map +0 -0
  422. package/types/hooks/useConstant.d.ts +0 -0
  423. package/types/hooks/useConstant.d.ts.map +0 -0
  424. package/types/hooks/useFeatures.d.ts +0 -0
  425. package/types/hooks/useFeatures.d.ts.map +0 -0
  426. package/types/hooks/useId.d.ts +0 -0
  427. package/types/hooks/useId.d.ts.map +0 -0
  428. package/types/hooks/useIsMounted.d.ts +0 -0
  429. package/types/hooks/useIsMounted.d.ts.map +0 -0
  430. package/types/hooks/useIsTouchDevice.d.ts +0 -0
  431. package/types/hooks/useIsTouchDevice.d.ts.map +0 -0
  432. package/types/hooks/useMedia.d.ts +0 -0
  433. package/types/hooks/useMedia.d.ts.map +0 -0
  434. package/types/hooks/usePressable.d.ts +0 -0
  435. package/types/hooks/usePressable.d.ts.map +0 -0
  436. package/types/hooks/usePrevious.d.ts +0 -0
  437. package/types/hooks/usePrevious.d.ts.map +0 -0
  438. package/types/hooks/useTheme.d.ts +0 -0
  439. package/types/hooks/useTheme.d.ts.map +0 -0
  440. package/types/hooks/useUnmountEffect.d.ts +0 -0
  441. package/types/hooks/useUnmountEffect.d.ts.map +0 -0
  442. package/types/index.d.ts +0 -0
  443. package/types/index.d.ts.map +0 -0
  444. package/types/insertFont.d.ts +0 -0
  445. package/types/insertFont.d.ts.map +0 -0
  446. package/types/static.d.ts +0 -0
  447. package/types/static.d.ts.map +0 -0
  448. package/types/styled.d.ts +0 -0
  449. package/types/styled.d.ts.map +0 -0
  450. package/types/types-rnw.d.ts +0 -0
  451. package/types/types-rnw.d.ts.map +0 -0
  452. package/types/types.d.ts +0 -0
  453. package/types/types.d.ts.map +0 -0
  454. package/types/views/Slot.d.ts +0 -0
  455. package/types/views/Slot.d.ts.map +0 -0
  456. package/types/views/Stack.d.ts +0 -0
  457. package/types/views/Stack.d.ts.map +0 -0
  458. package/types/views/Text.d.ts +0 -0
  459. package/types/views/Text.d.ts.map +0 -0
  460. package/types/views/TextAncestorContext.d.ts +0 -0
  461. package/types/views/TextAncestorContext.d.ts.map +0 -0
  462. package/types/views/Theme.d.ts +0 -0
  463. package/types/views/Theme.d.ts.map +0 -0
  464. package/types/views/ThemeInverse.d.ts +0 -0
  465. package/types/views/ThemeInverse.d.ts.map +0 -0
  466. package/types/views/ThemeProvider.d.ts +0 -0
  467. package/types/views/ThemeProvider.d.ts.map +0 -0
  468. package/types/views/ThemeReset.d.ts +0 -0
  469. package/types/views/ThemeReset.d.ts.map +0 -0
  470. package/dist/cjs/helpers/pseudos.js +0 -41
  471. package/dist/cjs/helpers/pseudos.js.map +0 -7
  472. package/dist/esm/helpers/pseudos.js +0 -18
  473. package/dist/esm/helpers/pseudos.js.map +0 -7
  474. package/dist/jsx/Pressability.js +0 -4
  475. package/dist/jsx/Pressability.native.js +0 -4
  476. package/dist/jsx/Tamagui.js +0 -38
  477. package/dist/jsx/ThemeContext.js +0 -5
  478. package/dist/jsx/ThemeManager.js +0 -194
  479. package/dist/jsx/conf.js +0 -38
  480. package/dist/jsx/constants/constants.js +0 -17
  481. package/dist/jsx/constants/platform.js +0 -25
  482. package/dist/jsx/constants/rnw.js +0 -10
  483. package/dist/jsx/contexts/ButtonInsideButtonContext.js +0 -5
  484. package/dist/jsx/createComponent.js +0 -1036
  485. package/dist/jsx/createFont.js +0 -25
  486. package/dist/jsx/createShorthands.js +0 -6
  487. package/dist/jsx/createTamagui.js +0 -245
  488. package/dist/jsx/createTheme.js +0 -6
  489. package/dist/jsx/createTokens.js +0 -11
  490. package/dist/jsx/createVariable.js +0 -64
  491. package/dist/jsx/createVariables.js +0 -31
  492. package/dist/jsx/defaultComponentState.js +0 -0
  493. package/dist/jsx/helpers/RNComponents.js +0 -11
  494. package/dist/jsx/helpers/areEqualSets.js +0 -13
  495. package/dist/jsx/helpers/calc.js +0 -46
  496. package/dist/jsx/helpers/createMediaStyle.js +0 -29
  497. package/dist/jsx/helpers/createPropMapper.js +0 -243
  498. package/dist/jsx/helpers/createShallowUpdate.js +0 -16
  499. package/dist/jsx/helpers/createTamaguiProvider.js +0 -28
  500. package/dist/jsx/helpers/extendStaticConfig.js +0 -62
  501. package/dist/jsx/helpers/fixNativeShadow.js +0 -5
  502. package/dist/jsx/helpers/fixNativeShadow.native.js +0 -28
  503. package/dist/jsx/helpers/generateAtomicStyles.js +0 -410
  504. package/dist/jsx/helpers/getExpandedShorthands.js +0 -15
  505. package/dist/jsx/helpers/getSize.js +0 -19
  506. package/dist/jsx/helpers/getSplitStyles.js +0 -380
  507. package/dist/jsx/helpers/getStackSize.js +0 -15
  508. package/dist/jsx/helpers/getStylesAtomic.js +0 -61
  509. package/dist/jsx/helpers/getStylesAtomic.native.js +0 -6
  510. package/dist/jsx/helpers/getTextSize.js +0 -31
  511. package/dist/jsx/helpers/getVariantExtras.js +0 -22
  512. package/dist/jsx/helpers/insertStyleRule.js +0 -91
  513. package/dist/jsx/helpers/isObj.js +0 -4
  514. package/dist/jsx/helpers/isTamaguiComponent.js +0 -12
  515. package/dist/jsx/helpers/isTamaguiElement.js +0 -8
  516. package/dist/jsx/helpers/matchMedia.js +0 -15
  517. package/dist/jsx/helpers/matchMedia.native.js +0 -6
  518. package/dist/jsx/helpers/mergeProps.js +0 -15
  519. package/dist/jsx/helpers/mergeTransform.js +0 -16
  520. package/dist/jsx/helpers/nativeGestureHandler.native.js +0 -1
  521. package/dist/jsx/helpers/proxyThemeVariables.js +0 -14
  522. package/dist/jsx/helpers/pseudos.js +0 -17
  523. package/dist/jsx/helpers/registerCSSVariable.js +0 -14
  524. package/dist/jsx/helpers/themeable.js +0 -22
  525. package/dist/jsx/helpers/validate.js +0 -73
  526. package/dist/jsx/helpers/withStaticProperties.js +0 -7
  527. package/dist/jsx/helpers/wrapThemeManagerContext.js +0 -7
  528. package/dist/jsx/hooks/useConstant.js +0 -11
  529. package/dist/jsx/hooks/useFeatures.js +0 -165
  530. package/dist/jsx/hooks/useId.js +0 -32
  531. package/dist/jsx/hooks/useIsMounted.js +0 -15
  532. package/dist/jsx/hooks/useIsTouchDevice.js +0 -14
  533. package/dist/jsx/hooks/useMedia.js +0 -153
  534. package/dist/jsx/hooks/usePressable.js +0 -11
  535. package/dist/jsx/hooks/usePrevious.js +0 -0
  536. package/dist/jsx/hooks/useTheme.js +0 -164
  537. package/dist/jsx/hooks/useUnmountEffect.js +0 -7
  538. package/dist/jsx/index.js +0 -64
  539. package/dist/jsx/insertFont.js +0 -64
  540. package/dist/jsx/static.js +0 -18
  541. package/dist/jsx/styled.js +0 -49
  542. package/dist/jsx/types-rnw.js +0 -0
  543. package/dist/jsx/types.js +0 -0
  544. package/dist/jsx/views/Slot.js +0 -70
  545. package/dist/jsx/views/Stack.js +0 -12
  546. package/dist/jsx/views/Text.js +0 -57
  547. package/dist/jsx/views/TextAncestorContext.js +0 -13
  548. package/dist/jsx/views/Theme.js +0 -27
  549. package/dist/jsx/views/ThemeInverse.js +0 -24
  550. package/dist/jsx/views/ThemeProvider.js +0 -34
  551. package/dist/jsx/views/ThemeReset.js +0 -32
  552. package/types/helpers/pseudos.d.ts +0 -16
  553. package/types/helpers/pseudos.d.ts.map +0 -1
@@ -1,1036 +0,0 @@
1
- import { composeEventHandlers, stylePropsView, validStyles } from "@tamagui/helpers";
2
- import { useForceUpdate } from "@tamagui/use-force-update";
3
- import React, {
4
- Children,
5
- Fragment,
6
- createElement,
7
- forwardRef,
8
- memo,
9
- useCallback,
10
- useContext,
11
- useMemo,
12
- useRef,
13
- useState
14
- } from "react";
15
- import { StyleSheet, Text, View } from "react-native";
16
- import { getConfig, onConfiguredOnce } from "./conf";
17
- import { stackDefaultStyles } from "./constants/constants";
18
- import { isWeb, useIsomorphicLayoutEffect } from "./constants/platform";
19
- import { rnw } from "./constants/rnw";
20
- import { getReturnVariablesAs } from "./helpers/createPropMapper";
21
- import { createShallowUpdate } from "./helpers/createShallowUpdate";
22
- import { extendStaticConfig, parseStaticConfig } from "./helpers/extendStaticConfig";
23
- import { insertSplitStyles, useSplitStyles } from "./helpers/getSplitStyles";
24
- import { getAllSelectors } from "./helpers/insertStyleRule";
25
- import { mergeProps } from "./helpers/mergeProps";
26
- import { proxyThemeVariables } from "./helpers/proxyThemeVariables";
27
- import { wrapThemeManagerContext } from "./helpers/wrapThemeManagerContext";
28
- import { useFeatures } from "./hooks/useFeatures";
29
- import { useIsTouchDevice } from "./hooks/useIsTouchDevice";
30
- import { mediaState } from "./hooks/useMedia";
31
- import { usePressable } from "./hooks/usePressable";
32
- import { getThemeManagerIfChanged, useTheme } from "./hooks/useTheme";
33
- import { Pressability } from "./Pressability";
34
- import { Slot, mergeEvent } from "./views/Slot";
35
- import { TextAncestorContext } from "./views/TextAncestorContext";
36
- React["keep"];
37
- const defaultComponentState = Object.freeze({
38
- hover: false,
39
- press: false,
40
- pressIn: false,
41
- focus: false,
42
- mounted: false,
43
- animation: null
44
- });
45
- const mouseUps = /* @__PURE__ */ new Set();
46
- if (typeof document !== "undefined") {
47
- document.addEventListener("mouseup", () => {
48
- mouseUps.forEach((x) => x());
49
- mouseUps.clear();
50
- });
51
- document.addEventListener("touchend", () => {
52
- mouseUps.forEach((x) => x());
53
- mouseUps.clear();
54
- });
55
- document.addEventListener("touchcancel", () => {
56
- mouseUps.forEach((x) => x());
57
- mouseUps.clear();
58
- });
59
- }
60
- function mergeShorthands({ defaultProps }, { shorthands }) {
61
- for (const key in defaultProps) {
62
- defaultProps[shorthands[key] || key] = defaultProps[key];
63
- }
64
- }
65
- let initialTheme;
66
- function createComponent(configIn, ParentComponent) {
67
- const staticConfig = (() => {
68
- const config = extendStaticConfig(configIn, ParentComponent);
69
- if ("parsed" in config) {
70
- return config;
71
- } else {
72
- return parseStaticConfig(config);
73
- }
74
- })();
75
- const defaultComponentClassName = `is_${staticConfig.componentName}`;
76
- let tamaguiConfig;
77
- let AnimatedText;
78
- let AnimatedView;
79
- let avoidClasses = true;
80
- let defaultNativeStyle;
81
- let defaultNativeStyleSheet;
82
- let tamaguiDefaultProps;
83
- let initialSplitStyles;
84
- const component = forwardRef((propsIn, forwardedRef) => {
85
- var _a, _b, _c, _d, _e;
86
- let props;
87
- if (tamaguiDefaultProps && !propsIn.asChild) {
88
- props = mergeProps(tamaguiDefaultProps, propsIn);
89
- } else {
90
- props = propsIn;
91
- }
92
- const { Component, isText, isZStack } = staticConfig;
93
- const componentName = props.componentName || staticConfig.componentName;
94
- const componentClassName = props.asChild ? "" : props.componentName ? `is_${props.componentName}` : defaultComponentClassName;
95
- if (true) {
96
- if (props["debug"]) {
97
- console.log("\u26A0\uFE0F", componentName || (Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "[Unnamed Component]", "debug on");
98
- console.log("props in:", {
99
- propsIn,
100
- props,
101
- ordered: Object.keys(props)
102
- });
103
- if (props["debug"] === "break")
104
- debugger;
105
- }
106
- }
107
- const forceUpdate = useForceUpdate();
108
- const theme = useTheme(props.theme, componentName, props, forceUpdate);
109
- const statesUsed = useState(defaultComponentState);
110
- const setStateShallow = createShallowUpdate(statesUsed[1]);
111
- let state = statesUsed[0];
112
- if (propsIn.forceStyle) {
113
- state = {
114
- ...state,
115
- [propsIn.forceStyle]: true
116
- };
117
- }
118
- const shouldAvoidClasses = !!(props.animation && avoidClasses);
119
- const shouldForcePseudo = !!propsIn.forceStyle;
120
- const hasTextAncestor = !!(isWeb ? useContext(TextAncestorContext) : false);
121
- const splitStyleState = !shouldAvoidClasses && !shouldForcePseudo ? {
122
- ...state,
123
- hasTextAncestor,
124
- dynamicStylesInline: true
125
- } : {
126
- ...state,
127
- noClassNames: true,
128
- dynamicStylesInline: true,
129
- hasTextAncestor,
130
- resolveVariablesAs: "value"
131
- };
132
- const splitStyles = useSplitStyles(props, staticConfig, theme, splitStyleState, props.asChild ? null : initialSplitStyles.classNames, props["debug"]);
133
- const { viewProps: viewPropsIn, pseudos, medias, style, classNames } = splitStyles;
134
- const useAnimations = (_a = tamaguiConfig.animations) == null ? void 0 : _a.useAnimations;
135
- const isAnimated = !!(useAnimations && props.animation);
136
- const hasEnterStyle = !!props.enterStyle;
137
- const hostRef = useRef(null);
138
- const animationFeatureStylesIn = props.animation ? { ...defaultNativeStyle, ...style } : null;
139
- const features = useFeatures(props, {
140
- forceUpdate,
141
- setStateShallow,
142
- useAnimations,
143
- state,
144
- style: animationFeatureStylesIn,
145
- pseudos,
146
- staticConfig,
147
- theme,
148
- hostRef,
149
- onDidAnimate: props.onDidAnimate
150
- });
151
- const {
152
- tag,
153
- hitSlop,
154
- asChild,
155
- children,
156
- onPress,
157
- onPressIn,
158
- onPressOut,
159
- onHoverIn,
160
- onHoverOut,
161
- space: spaceProp,
162
- spaceDirection: _spaceDirection,
163
- disabled: disabledProp,
164
- onMouseUp,
165
- onMouseDown,
166
- onMouseEnter,
167
- onMouseLeave,
168
- hrefAttrs,
169
- separator,
170
- forceStyle: _forceStyle,
171
- onClick,
172
- theme: _themeProp,
173
- defaultVariants,
174
- ...nonTamaguiProps
175
- } = viewPropsIn;
176
- const isTaggable = !Component || typeof Component === "string";
177
- const element = isWeb ? isTaggable ? tag || Component : Component : Component;
178
- const BaseTextComponent = !isWeb ? Text : element || "span";
179
- const BaseViewComponent = !isWeb ? View : element || (hasTextAncestor ? "span" : "div");
180
- let elementType = isText ? (isAnimated ? AnimatedText || Text : null) || BaseTextComponent : (isAnimated ? AnimatedView || View : null) || BaseViewComponent;
181
- elementType = Component || elementType;
182
- const isStringElement = typeof elementType === "string";
183
- const disabled = props.accessibilityState != null && props.accessibilityState.disabled === true || props.accessibilityDisabled;
184
- let viewProps;
185
- if (isWeb && !staticConfig.isReactNativeWeb) {
186
- const {
187
- onMoveShouldSetResponder,
188
- onMoveShouldSetResponderCapture,
189
- onResponderEnd,
190
- onResponderGrant,
191
- onResponderMove,
192
- onResponderReject,
193
- onResponderRelease,
194
- onResponderStart,
195
- onResponderTerminate,
196
- onResponderTerminationRequest,
197
- onScrollShouldSetResponder,
198
- onScrollShouldSetResponderCapture,
199
- onSelectionChangeShouldSetResponder,
200
- onSelectionChangeShouldSetResponderCapture,
201
- onStartShouldSetResponder,
202
- onStartShouldSetResponderCapture,
203
- nativeID,
204
- accessibilityActiveDescendant,
205
- accessibilityAtomic,
206
- accessibilityAutoComplete,
207
- accessibilityBusy,
208
- accessibilityChecked,
209
- accessibilityColumnCount,
210
- accessibilityColumnIndex,
211
- accessibilityColumnSpan,
212
- accessibilityControls,
213
- accessibilityCurrent,
214
- accessibilityDescribedBy,
215
- accessibilityDetails,
216
- accessibilityDisabled,
217
- accessibilityErrorMessage,
218
- accessibilityExpanded,
219
- accessibilityFlowTo,
220
- accessibilityHasPopup,
221
- accessibilityHidden,
222
- accessibilityInvalid,
223
- accessibilityKeyShortcuts,
224
- accessibilityLabel,
225
- accessibilityLabelledBy,
226
- accessibilityLevel,
227
- accessibilityLiveRegion,
228
- accessibilityModal,
229
- accessibilityMultiline,
230
- accessibilityMultiSelectable,
231
- accessibilityOrientation,
232
- accessibilityOwns,
233
- accessibilityPlaceholder,
234
- accessibilityPosInSet,
235
- accessibilityPressed,
236
- accessibilityReadOnly,
237
- accessibilityRequired,
238
- accessibilityRole,
239
- accessibilityRoleDescription,
240
- accessibilityRowCount,
241
- accessibilityRowIndex,
242
- accessibilityRowSpan,
243
- accessibilitySelected,
244
- accessibilitySetSize,
245
- accessibilitySort,
246
- accessibilityValueMax,
247
- accessibilityValueMin,
248
- accessibilityValueNow,
249
- accessibilityValueText,
250
- accessible,
251
- accessibilityState,
252
- accessibilityValue,
253
- collapsable,
254
- focusable,
255
- onLayout,
256
- ...webProps
257
- } = nonTamaguiProps;
258
- viewProps = webProps;
259
- assignNativePropsToWeb(elementType, viewProps, nonTamaguiProps);
260
- if (!asChild) {
261
- rnw.useElementLayout(hostRef, onLayout);
262
- rnw.useResponderEvents(hostRef, {
263
- onMoveShouldSetResponder,
264
- onMoveShouldSetResponderCapture,
265
- onResponderEnd,
266
- onResponderGrant,
267
- onResponderMove,
268
- onResponderReject,
269
- onResponderRelease,
270
- onResponderStart,
271
- onResponderTerminate,
272
- onResponderTerminationRequest,
273
- onScrollShouldSetResponder,
274
- onScrollShouldSetResponderCapture,
275
- onSelectionChangeShouldSetResponder,
276
- onSelectionChangeShouldSetResponderCapture,
277
- onStartShouldSetResponder,
278
- onStartShouldSetResponderCapture
279
- });
280
- }
281
- const platformMethodsRef = rnw.usePlatformMethods(viewProps);
282
- const setRef = rnw.useMergeRefs(hostRef, platformMethodsRef, forwardedRef);
283
- if (!isAnimated) {
284
- viewProps.ref = setRef;
285
- } else {
286
- if (forwardedRef) {
287
- viewProps.ref = forwardedRef;
288
- }
289
- }
290
- if (props.href != void 0 && hrefAttrs != void 0) {
291
- const { download, rel, target } = hrefAttrs;
292
- if (download != null) {
293
- viewProps.download = download;
294
- }
295
- if (rel != null) {
296
- viewProps.rel = rel;
297
- }
298
- if (typeof target === "string") {
299
- viewProps.target = target.charAt(0) !== "_" ? "_" + target : target;
300
- }
301
- }
302
- const _focusable = focusable != void 0 ? focusable : accessible;
303
- const role = viewProps.role;
304
- if (props["debug"]) {
305
- console.log("_focusable", focusable);
306
- }
307
- if (_focusable === false) {
308
- viewProps.tabIndex = "-1";
309
- }
310
- if (elementType === "a" || elementType === "button" || elementType === "input" || elementType === "select" || elementType === "textarea") {
311
- if (_focusable === false || accessibilityDisabled === true) {
312
- viewProps.tabIndex = "-1";
313
- }
314
- } else if (role === "button" || role === "checkbox" || role === "link" || role === "radio" || role === "textbox" || role === "switch") {
315
- if (_focusable !== false) {
316
- viewProps.tabIndex = "0";
317
- }
318
- }
319
- if (_focusable === true) {
320
- viewProps.tabIndex = "0";
321
- }
322
- } else {
323
- viewProps = nonTamaguiProps;
324
- if (forwardedRef) {
325
- viewProps.ref = forwardedRef;
326
- }
327
- }
328
- if (props["debug"]) {
329
- console.log("viewProps", elementType, viewProps.role, viewProps.tabIndex);
330
- }
331
- if (!isText && isWeb) {
332
- Children.toArray(props.children).forEach((item) => {
333
- if (typeof item === "string") {
334
- console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <View>.`);
335
- }
336
- });
337
- }
338
- const internal = useRef();
339
- if (!internal.current) {
340
- internal.current = {
341
- isMounted: true
342
- };
343
- }
344
- useIsomorphicLayoutEffect(() => {
345
- if (typeof window !== "undefined" && (hasEnterStyle || props.animation)) {
346
- setStateShallow({
347
- mounted: true
348
- });
349
- }
350
- internal.current.isMounted = true;
351
- return () => {
352
- var _a2;
353
- mouseUps.delete(unPress);
354
- internal.current.isMounted = false;
355
- (_a2 = internal.current.unmountEffects) == null ? void 0 : _a2.forEach((cb) => cb());
356
- };
357
- }, [hasEnterStyle, props.animation]);
358
- let styles;
359
- const animationStyles = state.animation ? state.animation.style : null;
360
- if (isStringElement && shouldAvoidClasses && !shouldForcePseudo) {
361
- styles = {
362
- ...defaultNativeStyle,
363
- ...animationStyles != null ? animationStyles : style,
364
- ...medias
365
- };
366
- } else {
367
- styles = [
368
- isWeb ? null : defaultNativeStyleSheet ? defaultNativeStyleSheet.base : null,
369
- animationStyles != null ? animationStyles : style,
370
- medias
371
- ];
372
- if (!animationStyles) {
373
- const initPseudos = initialSplitStyles.pseudos;
374
- const force = shouldForcePseudo;
375
- !state.mounted && addPseudoToStyles(styles, initPseudos, pseudos, "enterStyle");
376
- state.hover && addPseudoToStyles(styles, initPseudos, pseudos, "hoverStyle", force);
377
- state.focus && addPseudoToStyles(styles, initPseudos, pseudos, "focusStyle", force);
378
- state.press && addPseudoToStyles(styles, initPseudos, pseudos, "pressStyle", force);
379
- }
380
- if (shouldForcePseudo) {
381
- const next = {};
382
- for (const style2 of styles) {
383
- if (style2) {
384
- Object.assign(next, style2);
385
- }
386
- }
387
- Object.assign(splitStyles.style, next);
388
- }
389
- }
390
- if (isWeb) {
391
- const fontFamilyName = isText ? props.fontFamily || staticConfig.defaultProps.fontFamily : null;
392
- const fontFamily = fontFamilyName && fontFamilyName[0] === "$" ? fontFamilyName.slice(1) : null;
393
- const classList = [
394
- componentName ? componentClassName : "",
395
- fontFamily ? `font_${fontFamily}` : "",
396
- theme.className,
397
- classNames ? Object.values(classNames).join(" ") : ""
398
- ];
399
- const className = classList.join(" ");
400
- const style2 = animationStyles != null ? animationStyles : splitStyles.style;
401
- if (process.env.NODE_ENV === "development" && props["debug"]) {
402
- console.log(" \xBB className", { splitStyles, style: style2, isStringElement, pseudos, state, classNames, propsClassName: props.className, classList, className: className.trim().split(" "), themeClassName: theme.className, values: Object.fromEntries(Object.entries(classNames).map(([k, v]) => [v, getAllSelectors()[v]])) });
403
- }
404
- const isAnimatedReactNativeWeb = props.animation && avoidClasses;
405
- if (staticConfig.isReactNativeWeb || isAnimatedReactNativeWeb) {
406
- viewProps.dataSet = {
407
- ...viewProps.dataSet,
408
- className,
409
- id: props.id
410
- };
411
- if (props["data-is"]) {
412
- viewProps.dataSet.is = props["data-is"];
413
- }
414
- } else {
415
- viewProps.className = className;
416
- }
417
- viewProps.style = style2;
418
- } else {
419
- viewProps.style = styles;
420
- }
421
- const initialPseudos = initialSplitStyles.pseudos;
422
- const attachPress = !!((pseudos == null ? void 0 : pseudos.pressStyle) || (initialPseudos == null ? void 0 : initialPseudos.pressStyle) || onPress || onPressOut || onPressIn || onClick);
423
- const isTouch = useIsTouchDevice();
424
- const isHoverable = isWeb && !isTouch;
425
- const attachHover = isHoverable && !!(pseudos && pseudos.hoverStyle || onHoverIn || onHoverOut || onMouseEnter || onMouseLeave);
426
- const handlesPressEvents = !isStringElement && !asChild;
427
- const pressKey = handlesPressEvents ? "onPress" : "onClick";
428
- const pressInKey = handlesPressEvents ? "onPressIn" : "onMouseDown";
429
- const pressOutKey = handlesPressEvents ? "onPressOut" : "onMouseUp";
430
- const shouldAttach = !asChild && (attachPress || attachHover || "pressStyle" in props || "onPress" in props || "onPressIn" in props || "onPressOut" in props || isWeb && ("hoverStyle" in props || "onHoverIn" in props || "onHoverOut" in props || "onMouseEnter" in props || "onMouseLeave" in props));
431
- const unPress = useCallback(() => {
432
- if (!internal.current.isMounted)
433
- return;
434
- setStateShallow({
435
- press: false,
436
- pressIn: false
437
- });
438
- }, []);
439
- const events = shouldAttach ? {
440
- [pressOutKey]: attachPress ? (e) => {
441
- unPress();
442
- onPressOut == null ? void 0 : onPressOut(e);
443
- onMouseUp == null ? void 0 : onMouseUp(e);
444
- } : void 0,
445
- ...isHoverable && {
446
- onMouseEnter: attachHover ? (e) => {
447
- let next = {};
448
- if (attachHover) {
449
- next.hover = true;
450
- }
451
- if (state.pressIn) {
452
- next.press = true;
453
- }
454
- if (Object.keys(next).length) {
455
- setStateShallow(next);
456
- }
457
- onHoverIn == null ? void 0 : onHoverIn(e);
458
- onMouseEnter == null ? void 0 : onMouseEnter(e);
459
- } : void 0,
460
- onMouseLeave: attachHover ? (e) => {
461
- let next = {};
462
- mouseUps.add(unPress);
463
- if (attachHover) {
464
- next.hover = false;
465
- }
466
- if (state.pressIn) {
467
- next.press = false;
468
- next.pressIn = false;
469
- }
470
- if (Object.keys(next).length) {
471
- setStateShallow(next);
472
- }
473
- onHoverOut == null ? void 0 : onHoverOut(e);
474
- onMouseLeave == null ? void 0 : onMouseLeave(e);
475
- } : void 0
476
- },
477
- [pressInKey]: attachPress ? (e) => {
478
- setStateShallow({
479
- press: true,
480
- pressIn: true
481
- });
482
- onPressIn == null ? void 0 : onPressIn(e);
483
- onMouseDown == null ? void 0 : onMouseDown(e);
484
- if (isWeb) {
485
- mouseUps.add(unPress);
486
- }
487
- } : null,
488
- [pressKey]: attachPress ? (e) => {
489
- unPress();
490
- onClick == null ? void 0 : onClick(e);
491
- onPress == null ? void 0 : onPress(e);
492
- } : null,
493
- ...!isWeb && {
494
- cancelable: !props.rejectResponderTermination,
495
- disabled: props.disabled !== null ? props.disabled : (_b = props.accessibilityState) == null ? void 0 : _b.disabled,
496
- hitSlop: props.hitSlop,
497
- delayLongPress: props.delayLongPress,
498
- delayPressIn: props.delayPressIn,
499
- delayPressOut: props.delayPressOut,
500
- focusable: (_c = viewProps.focusable) != null ? _c : true,
501
- minPressDuration: 0
502
- }
503
- } : null;
504
- let space = spaceProp;
505
- if (features.enabled.mediaQuery) {
506
- for (const key in mediaState) {
507
- if (!mediaState[key])
508
- continue;
509
- if (props[key] && props[key].space !== void 0) {
510
- space = props[key].space;
511
- }
512
- }
513
- }
514
- let childEls = !children || asChild ? children : wrapThemeManagerContext(spacedChildren({
515
- separator,
516
- children,
517
- space,
518
- direction: props.spaceDirection || "both",
519
- isZStack
520
- }), getThemeManagerIfChanged(theme));
521
- let content;
522
- if (asChild) {
523
- elementType = Slot;
524
- viewProps = {
525
- ...viewProps,
526
- onPress,
527
- onPressIn,
528
- onPressOut
529
- };
530
- }
531
- if (isWeb) {
532
- const [pressableProps] = usePressable(events ? {
533
- disabled,
534
- ...hitSlop && {
535
- hitSlop
536
- },
537
- onPressOut: events[pressOutKey],
538
- onPressIn: events[pressInKey],
539
- onPress: events[pressKey]
540
- } : {
541
- disabled: true
542
- });
543
- if (events) {
544
- if (handlesPressEvents) {
545
- Object.assign(viewProps, pressableProps);
546
- } else {
547
- Object.assign(viewProps, events);
548
- }
549
- }
550
- }
551
- if (process.env.TAMAGUI_TARGET === "native") {
552
- const attachFocus = !!(pseudos && pseudos.focusStyle || initialPseudos && initialPseudos.focusStyle);
553
- if (attachFocus) {
554
- viewProps.onFocus = mergeEvent(viewProps.onFocus, () => {
555
- setStateShallow({ focus: true });
556
- });
557
- viewProps.onBlur = mergeEvent(viewProps.onBlur, () => {
558
- setStateShallow({ focus: false });
559
- });
560
- }
561
- }
562
- if (process.env.TAMAGUI_TARGET === "native") {
563
- const pressability = useMemo(() => {
564
- if (attachPress && events) {
565
- const pressability2 = new Pressability(events);
566
- internal.current.unmountEffects = [
567
- () => {
568
- pressability2.reset();
569
- }
570
- ];
571
- return pressability2;
572
- }
573
- }, []);
574
- if (attachPress && events) {
575
- pressability.configure(events);
576
- const eventHandlers = pressability.getEventHandlers();
577
- for (const key in eventHandlers) {
578
- if (key === "onBlur" || key === "onFocus") {
579
- continue;
580
- }
581
- const og = props[key];
582
- const val = eventHandlers[key];
583
- viewProps[key] = og ? composeEventHandlers(og, val) : val;
584
- }
585
- }
586
- }
587
- content = createElement(elementType, viewProps, childEls);
588
- if (isWeb) {
589
- const isAnimatedRNWView = isAnimated && typeof elementType !== "string";
590
- const shouldWrapWithComponentTheme = isAnimatedRNWView && getReturnVariablesAs(props, splitStyleState) === "non-color-value";
591
- const shouldWrapWithHover = events && attachHover;
592
- if (shouldWrapWithHover || shouldWrapWithComponentTheme) {
593
- const themeClassName = shouldWrapWithComponentTheme ? `${theme.className}` : "";
594
- const hoverClassName = shouldWrapWithHover ? "t_Hoverable" : "";
595
- content = <span className={`${hoverClassName} ${themeClassName}`} style={{
596
- display: "contents"
597
- }} {...shouldWrapWithHover && {
598
- onMouseEnter: events.onMouseEnter,
599
- onMouseLeave: events.onMouseLeave
600
- }}>{content}</span>;
601
- }
602
- }
603
- if (process.env.NODE_ENV === "development") {
604
- if (props["debug"]) {
605
- console.log("\u2B50\uFE0F", { propsIn: { ...props }, propsOut: { ...viewProps }, elementType, state, splitStyles, animationStyles, isStringElement, classNamesIn: (_d = props.className) == null ? void 0 : _d.split(" "), classNamesOut: (_e = viewProps.className) == null ? void 0 : _e.split(" "), events, shouldAttach, ViewComponent: elementType, viewProps, styles, pseudos, content, childEls, shouldAvoidClasses, avoidClasses, animation: props.animation, style, defaultNativeStyle, initialSplitStyles, ...typeof window !== "undefined" ? { theme, themeClassName: theme.className, staticConfig, tamaguiConfig, events, shouldAvoidClasses, shouldForcePseudo } : null });
606
- }
607
- }
608
- if (features.elements.length) {
609
- return <>
610
- {features.elements}
611
- {content}
612
- </>;
613
- }
614
- return content;
615
- });
616
- component.displayName = staticConfig.componentName;
617
- onConfiguredOnce((conf) => {
618
- var _a, _b, _c, _d;
619
- if (process.env.IS_STATIC === "is_static") {
620
- return;
621
- }
622
- tamaguiConfig = conf;
623
- mergeShorthands(staticConfig, tamaguiConfig);
624
- avoidClasses = !!((_a = tamaguiConfig.animations) == null ? void 0 : _a.avoidClasses);
625
- AnimatedText = (_b = tamaguiConfig.animations) == null ? void 0 : _b.Text;
626
- AnimatedView = (_c = tamaguiConfig == null ? void 0 : tamaguiConfig.animations) == null ? void 0 : _c.View;
627
- initialTheme = initialTheme || proxyThemeVariables(conf.themes[conf.defaultTheme || Object.keys(conf.themes)[0]]);
628
- const config = getConfig();
629
- let defaultPropsIn = staticConfig.defaultProps;
630
- const parentNames = [...staticConfig.parentNames || [], staticConfig.componentName];
631
- if (config.defaultProps && parentNames) {
632
- const len = parentNames.length;
633
- let prev;
634
- for (let i = 0; i < len; i++) {
635
- const n = parentNames[i];
636
- if (!n)
637
- continue;
638
- if (DefaultProps.has(n)) {
639
- prev = DefaultProps.get(n);
640
- continue;
641
- }
642
- const props = config.defaultProps[n];
643
- if (!props) {
644
- if (prev) {
645
- DefaultProps.set(n, prev);
646
- }
647
- continue;
648
- }
649
- prev = mergeProps(prev || {}, props);
650
- DefaultProps.set(n, prev);
651
- }
652
- const ourDefaultsMerged = DefaultProps.get(staticConfig.componentName);
653
- if (ourDefaultsMerged) {
654
- defaultPropsIn = mergeProps(defaultPropsIn, ourDefaultsMerged);
655
- }
656
- }
657
- if (process.env.NODE_ENV === "development" && defaultPropsIn["debug"] === "break") {
658
- debugger;
659
- }
660
- initialSplitStyles = insertSplitStyles(defaultPropsIn, staticConfig, initialTheme, {
661
- mounted: true,
662
- hover: false,
663
- press: false,
664
- pressIn: false,
665
- focus: false,
666
- resolveVariablesAs: "both",
667
- keepVariantsAsProps: true
668
- }, void 0, staticConfig.defaultProps["debug"]);
669
- const defaults = mergeProps(component.defaultProps, initialSplitStyles.viewProps);
670
- defaultNativeStyle = {};
671
- const validStyles2 = staticConfig.validStyles || stylePropsView;
672
- for (const key in staticConfig.defaultProps) {
673
- const val = staticConfig.defaultProps[key];
674
- if (typeof val === "string" && val[0] === "$" || !validStyles2[key] || val[0] === "_") {
675
- defaults[key] = val;
676
- } else {
677
- defaultNativeStyle[key] = val;
678
- }
679
- }
680
- defaultNativeStyleSheet = StyleSheet.create({
681
- base: defaultNativeStyle
682
- });
683
- if (Object.keys(defaults).length) {
684
- tamaguiDefaultProps = defaults;
685
- }
686
- if (process.env.NODE_ENV === "development" && ((_d = staticConfig.defaultProps) == null ? void 0 : _d.debug)) {
687
- if (process.env.IS_STATIC !== "is_static") {
688
- console.log(`\u{1F41B} [${staticConfig.componentName || "Component"}]`, {
689
- staticConfig,
690
- initialSplitStyles,
691
- tamaguiDefaultProps,
692
- defaultNativeStyle,
693
- defaults
694
- });
695
- }
696
- }
697
- });
698
- let res = component;
699
- if (configIn.memo) {
700
- res = memo(res);
701
- }
702
- res.staticConfig = {
703
- validStyles: staticConfig.validStyles || stylePropsView,
704
- ...staticConfig
705
- };
706
- res.extractable = (Component, conf) => {
707
- Component.staticConfig = extendStaticConfig({
708
- Component,
709
- ...conf,
710
- neverFlatten: true,
711
- isExtractable: true,
712
- defaultProps: {
713
- ...Component.defaultProps,
714
- ...conf == null ? void 0 : conf.defaultProps
715
- }
716
- }, res);
717
- return Component;
718
- };
719
- return res;
720
- }
721
- const DefaultProps = /* @__PURE__ */ new Map();
722
- const Unspaced = (props) => {
723
- return props.children;
724
- };
725
- Unspaced["isUnspaced"] = true;
726
- const Spacer = createComponent({
727
- memo: true,
728
- componentName: "Spacer",
729
- validStyles,
730
- defaultProps: {
731
- ...stackDefaultStyles,
732
- size: true
733
- },
734
- variants: {
735
- size: {
736
- "...size": (size, { tokens }) => {
737
- var _a;
738
- size = size == true ? "$true" : size;
739
- const sizePx = (_a = tokens.space[size]) != null ? _a : size;
740
- return {
741
- width: sizePx,
742
- height: sizePx,
743
- minWidth: sizePx,
744
- minHeight: sizePx
745
- };
746
- }
747
- },
748
- flex: {
749
- true: {
750
- flexGrow: 1
751
- }
752
- },
753
- direction: {
754
- horizontal: {
755
- height: 0,
756
- minHeight: 0
757
- },
758
- vertical: {
759
- width: 0,
760
- minWidth: 0
761
- }
762
- }
763
- },
764
- defaultVariants: {
765
- direction: "horizontal"
766
- }
767
- });
768
- function spacedChildren({
769
- isZStack,
770
- children,
771
- space,
772
- direction,
773
- spaceFlex,
774
- separator
775
- }) {
776
- const hasSpace = !!(space || spaceFlex);
777
- const hasSeparator = !(separator === void 0 || separator === null);
778
- if (!hasSpace && !hasSeparator && !isZStack) {
779
- return children;
780
- }
781
- const childrenList = Children.toArray(children);
782
- if (childrenList.length <= 1 && !isZStack) {
783
- return childrenList;
784
- }
785
- const final = [];
786
- for (const [index, child] of childrenList.entries()) {
787
- const isEmpty = child === null || child === void 0 || child === false || Array.isArray(child) && child.length === 0;
788
- if (isEmpty || !child || child["key"] && !isZStack) {
789
- final.push(child);
790
- } else {
791
- final.push(<Fragment key={index}>{isZStack ? <AbsoluteFill>{child}</AbsoluteFill> : child}</Fragment>);
792
- }
793
- if (isUnspaced(child) && index === 0) {
794
- continue;
795
- }
796
- if (isZStack) {
797
- continue;
798
- }
799
- const next = childrenList[index + 1];
800
- if (next && !isUnspaced(next)) {
801
- if (separator) {
802
- if (hasSpace) {
803
- final.push(createSpacer({
804
- key: `_${index}_before_sep_spacer`,
805
- direction,
806
- space,
807
- spaceFlex
808
- }));
809
- }
810
- final.push(React.isValidElement(separator) ? React.cloneElement(separator, { key: `sep_${index}` }) : separator);
811
- if (hasSpace) {
812
- final.push(createSpacer({
813
- key: `_${index}_after_sep_spacer`,
814
- direction,
815
- space,
816
- spaceFlex
817
- }));
818
- }
819
- } else {
820
- final.push(createSpacer({
821
- key: `_${index}_spacer`,
822
- direction,
823
- space,
824
- spaceFlex
825
- }));
826
- }
827
- }
828
- }
829
- return final;
830
- }
831
- function createSpacer({ key, direction, space, spaceFlex }) {
832
- return <Spacer key={key} direction={direction === "both" ? void 0 : direction === "row" || direction === "row-reverse" ? "horizontal" : "vertical"} size={space} {...spaceFlex && {
833
- flex: spaceFlex
834
- }} />;
835
- }
836
- function isUnspaced(child) {
837
- var _a, _b;
838
- return ((_a = child == null ? void 0 : child["type"]) == null ? void 0 : _a["isVisuallyHidden"]) || ((_b = child == null ? void 0 : child["type"]) == null ? void 0 : _b["isUnspaced"]);
839
- }
840
- function AbsoluteFill(props) {
841
- return <View pointerEvents="box-none" style={StyleSheet.absoluteFill}>{props.children}</View>;
842
- }
843
- function processIDRefList(idRefList) {
844
- return Array.isArray(idRefList) ? idRefList.join(" ") : idRefList;
845
- }
846
- const accessibilityRoleToWebRole = {
847
- adjustable: "slider",
848
- button: "button",
849
- header: "heading",
850
- image: "img",
851
- imagebutton: null,
852
- keyboardkey: null,
853
- label: null,
854
- link: "link",
855
- none: "presentation",
856
- search: "search",
857
- summary: "region",
858
- text: null
859
- };
860
- function assignNativePropsToWeb(elementType, viewProps, nativeProps) {
861
- if (!viewProps.role && nativeProps.accessibilityRole) {
862
- if (nativeProps.accessibilityRole === "none") {
863
- viewProps.role = "presentation";
864
- } else {
865
- const webRole = accessibilityRoleToWebRole[nativeProps.accessibilityRole];
866
- if (webRole != null) {
867
- viewProps.role = webRole || nativeProps.accessibilityRole;
868
- }
869
- }
870
- }
871
- if (nativeProps.accessibilityActiveDescendant != null) {
872
- viewProps["aria-activedescendant"] = nativeProps.accessibilityActiveDescendant;
873
- }
874
- if (nativeProps.accessibilityAtomic != null) {
875
- viewProps["aria-atomic"] = nativeProps.accessibilityAtomic;
876
- }
877
- if (nativeProps.accessibilityAutoComplete != null) {
878
- viewProps["aria-autocomplete"] = nativeProps.accessibilityAutoComplete;
879
- }
880
- if (nativeProps.accessibilityBusy != null) {
881
- viewProps["aria-busy"] = nativeProps.accessibilityBusy;
882
- }
883
- if (nativeProps.accessibilityChecked != null) {
884
- viewProps["aria-checked"] = nativeProps.accessibilityChecked;
885
- }
886
- if (nativeProps.accessibilityColumnCount != null) {
887
- viewProps["aria-colcount"] = nativeProps.accessibilityColumnCount;
888
- }
889
- if (nativeProps.accessibilityColumnIndex != null) {
890
- viewProps["aria-colindex"] = nativeProps.accessibilityColumnIndex;
891
- }
892
- if (nativeProps.accessibilityColumnSpan != null) {
893
- viewProps["aria-colspan"] = nativeProps.accessibilityColumnSpan;
894
- }
895
- if (nativeProps.accessibilityControls != null) {
896
- viewProps["aria-controls"] = processIDRefList(nativeProps.accessibilityControls);
897
- }
898
- if (nativeProps.accessibilityCurrent != null) {
899
- viewProps["aria-current"] = nativeProps.accessibilityCurrent;
900
- }
901
- if (nativeProps.accessibilityDescribedBy != null) {
902
- viewProps["aria-describedby"] = processIDRefList(nativeProps.accessibilityDescribedBy);
903
- }
904
- if (nativeProps.accessibilityDetails != null) {
905
- viewProps["aria-details"] = nativeProps.accessibilityDetails;
906
- }
907
- if (nativeProps.disabled === true) {
908
- viewProps["aria-disabled"] = true;
909
- if (elementType === "button" || elementType === "form" || elementType === "input" || elementType === "select" || elementType === "textarea") {
910
- viewProps.disabled = true;
911
- }
912
- }
913
- if (nativeProps.accessibilityErrorMessage != null) {
914
- viewProps["aria-errormessage"] = nativeProps.accessibilityErrorMessage;
915
- }
916
- if (nativeProps.accessibilityExpanded != null) {
917
- viewProps["aria-expanded"] = nativeProps.accessibilityExpanded;
918
- }
919
- if (nativeProps.accessibilityFlowTo != null) {
920
- viewProps["aria-flowto"] = processIDRefList(nativeProps.accessibilityFlowTo);
921
- }
922
- if (nativeProps.accessibilityHasPopup != null) {
923
- viewProps["aria-haspopup"] = nativeProps.accessibilityHasPopup;
924
- }
925
- if (nativeProps.accessibilityHidden === true) {
926
- viewProps["aria-hidden"] = nativeProps.accessibilityHidden;
927
- }
928
- if (nativeProps.accessibilityInvalid != null) {
929
- viewProps["aria-invalid"] = nativeProps.accessibilityInvalid;
930
- }
931
- if (nativeProps.accessibilityKeyShortcuts != null && Array.isArray(nativeProps.accessibilityKeyShortcuts)) {
932
- viewProps["aria-keyshortcuts"] = nativeProps.accessibilityKeyShortcuts.join(" ");
933
- }
934
- if (nativeProps.accessibilityLabel != null) {
935
- viewProps["aria-label"] = nativeProps.accessibilityLabel;
936
- }
937
- if (nativeProps.accessibilityLabelledBy != null) {
938
- viewProps["aria-labelledby"] = processIDRefList(nativeProps.accessibilityLabelledBy);
939
- }
940
- if (nativeProps.accessibilityLevel != null) {
941
- viewProps["aria-level"] = nativeProps.accessibilityLevel;
942
- }
943
- if (nativeProps.accessibilityLiveRegion != null) {
944
- viewProps["aria-live"] = nativeProps.accessibilityLiveRegion === "none" ? "off" : nativeProps.accessibilityLiveRegion;
945
- }
946
- if (nativeProps.accessibilityModal != null) {
947
- viewProps["aria-modal"] = nativeProps.accessibilityModal;
948
- }
949
- if (nativeProps.accessibilityMultiline != null) {
950
- viewProps["aria-multiline"] = nativeProps.accessibilityMultiline;
951
- }
952
- if (nativeProps.accessibilityMultiSelectable != null) {
953
- viewProps["aria-multiselectable"] = nativeProps.accessibilityMultiSelectable;
954
- }
955
- if (nativeProps.accessibilityOrientation != null) {
956
- viewProps["aria-orientation"] = nativeProps.accessibilityOrientation;
957
- }
958
- if (nativeProps.accessibilityOwns != null) {
959
- viewProps["aria-owns"] = processIDRefList(nativeProps.accessibilityOwns);
960
- }
961
- if (nativeProps.accessibilityPlaceholder != null) {
962
- viewProps["aria-placeholder"] = nativeProps.accessibilityPlaceholder;
963
- }
964
- if (nativeProps.accessibilityPosInSet != null) {
965
- viewProps["aria-posinset"] = nativeProps.accessibilityPosInSet;
966
- }
967
- if (nativeProps.accessibilityPressed != null) {
968
- viewProps["aria-pressed"] = nativeProps.accessibilityPressed;
969
- }
970
- if (nativeProps.accessibilityReadOnly != null) {
971
- viewProps["aria-readonly"] = nativeProps.accessibilityReadOnly;
972
- if (elementType === "input" || elementType === "select" || elementType === "textarea") {
973
- viewProps.readOnly = true;
974
- }
975
- }
976
- if (nativeProps.accessibilityRequired != null) {
977
- viewProps["aria-required"] = nativeProps.accessibilityRequired;
978
- if (elementType === "input" || elementType === "select" || elementType === "textarea") {
979
- viewProps.required = true;
980
- }
981
- }
982
- if (nativeProps.accessibilityRoleDescription != null) {
983
- viewProps["aria-roledescription"] = nativeProps.accessibilityRoleDescription;
984
- }
985
- if (nativeProps.accessibilityRowCount != null) {
986
- viewProps["aria-rowcount"] = nativeProps.accessibilityRowCount;
987
- }
988
- if (nativeProps.accessibilityRowIndex != null) {
989
- viewProps["aria-rowindex"] = nativeProps.accessibilityRowIndex;
990
- }
991
- if (nativeProps.accessibilityRowSpan != null) {
992
- viewProps["aria-rowspan"] = nativeProps.accessibilityRowSpan;
993
- }
994
- if (nativeProps.accessibilitySelected != null) {
995
- viewProps["aria-selected"] = nativeProps.accessibilitySelected;
996
- }
997
- if (nativeProps.accessibilitySetSize != null) {
998
- viewProps["aria-setsize"] = nativeProps.accessibilitySetSize;
999
- }
1000
- if (nativeProps.accessibilitySort != null) {
1001
- viewProps["aria-sort"] = nativeProps.accessibilitySort;
1002
- }
1003
- if (nativeProps.accessibilityValueMax != null) {
1004
- viewProps["aria-valuemax"] = nativeProps.accessibilityValueMax;
1005
- }
1006
- if (nativeProps.accessibilityValueMin != null) {
1007
- viewProps["aria-valuemin"] = nativeProps.accessibilityValueMin;
1008
- }
1009
- if (nativeProps.accessibilityValueNow != null) {
1010
- viewProps["aria-valuenow"] = nativeProps.accessibilityValueNow;
1011
- }
1012
- if (nativeProps.accessibilityValueText != null) {
1013
- viewProps["aria-valuetext"] = nativeProps.accessibilityValueText;
1014
- }
1015
- if (nativeProps.nativeID) {
1016
- viewProps.id = nativeProps.nativeID;
1017
- }
1018
- }
1019
- function addPseudoToStyles(styles, initialPseudos, pseudos, name, force = false) {
1020
- const pseudoStyle = pseudos[name];
1021
- const shouldNestObject = isWeb && name !== "enterStyle" && name !== "exitStyle";
1022
- const defaultPseudoStyle = initialPseudos[name];
1023
- const style = defaultPseudoStyle ? { ...defaultPseudoStyle, ...pseudoStyle } : pseudoStyle;
1024
- if (style) {
1025
- styles.push(shouldNestObject && !force ? { [name]: style } : style);
1026
- }
1027
- }
1028
- export {
1029
- AbsoluteFill,
1030
- Spacer,
1031
- Unspaced,
1032
- assignNativePropsToWeb,
1033
- createComponent,
1034
- mouseUps,
1035
- spacedChildren
1036
- };