blend-native 0.0.1-beta.0

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 (555) hide show
  1. package/README.md +404 -0
  2. package/lib/commonjs/a11y/announcement.js +42 -0
  3. package/lib/commonjs/a11y/announcement.js.map +1 -0
  4. package/lib/commonjs/a11y/useLiveRegion.js +37 -0
  5. package/lib/commonjs/a11y/useLiveRegion.js.map +1 -0
  6. package/lib/commonjs/adapters/cssStringAdapter.js +363 -0
  7. package/lib/commonjs/adapters/cssStringAdapter.js.map +1 -0
  8. package/lib/commonjs/adapters/optionalGradient.js +33 -0
  9. package/lib/commonjs/adapters/optionalGradient.js.map +1 -0
  10. package/lib/commonjs/adapters/surfaceStyle.js +159 -0
  11. package/lib/commonjs/adapters/surfaceStyle.js.map +1 -0
  12. package/lib/commonjs/components/Alert/Alert.js +130 -0
  13. package/lib/commonjs/components/Alert/Alert.js.map +1 -0
  14. package/lib/commonjs/components/Alert/AlertActions.js +74 -0
  15. package/lib/commonjs/components/Alert/AlertActions.js.map +1 -0
  16. package/lib/commonjs/components/Alert/AlertClose.js +48 -0
  17. package/lib/commonjs/components/Alert/AlertClose.js.map +1 -0
  18. package/lib/commonjs/components/Alert/AlertText.js +49 -0
  19. package/lib/commonjs/components/Alert/AlertText.js.map +1 -0
  20. package/lib/commonjs/components/Alert/alert.tokens.js +6 -0
  21. package/lib/commonjs/components/Alert/alert.tokens.js.map +1 -0
  22. package/lib/commonjs/components/Alert/alert.types.js +6 -0
  23. package/lib/commonjs/components/Alert/alert.types.js.map +1 -0
  24. package/lib/commonjs/components/Alert/alert.utils.js +80 -0
  25. package/lib/commonjs/components/Alert/alert.utils.js.map +1 -0
  26. package/lib/commonjs/components/Alert/index.js +51 -0
  27. package/lib/commonjs/components/Alert/index.js.map +1 -0
  28. package/lib/commonjs/components/Button/Button.js +125 -0
  29. package/lib/commonjs/components/Button/Button.js.map +1 -0
  30. package/lib/commonjs/components/Button/button.types.js +6 -0
  31. package/lib/commonjs/components/Button/button.types.js.map +1 -0
  32. package/lib/commonjs/components/Button/button.utils.js +129 -0
  33. package/lib/commonjs/components/Button/button.utils.js.map +1 -0
  34. package/lib/commonjs/components/Button/index.js +57 -0
  35. package/lib/commonjs/components/Button/index.js.map +1 -0
  36. package/lib/commonjs/components/Skeleton/Skeleton.js +154 -0
  37. package/lib/commonjs/components/Skeleton/Skeleton.js.map +1 -0
  38. package/lib/commonjs/components/Skeleton/index.js +20 -0
  39. package/lib/commonjs/components/Skeleton/index.js.map +1 -0
  40. package/lib/commonjs/components/Skeleton/skeleton.types.js +6 -0
  41. package/lib/commonjs/components/Skeleton/skeleton.types.js.map +1 -0
  42. package/lib/commonjs/components/Skeleton/skeleton.utils.js +45 -0
  43. package/lib/commonjs/components/Skeleton/skeleton.utils.js.map +1 -0
  44. package/lib/commonjs/components/Tag/Tag.js +161 -0
  45. package/lib/commonjs/components/Tag/Tag.js.map +1 -0
  46. package/lib/commonjs/components/Tag/index.js +33 -0
  47. package/lib/commonjs/components/Tag/index.js.map +1 -0
  48. package/lib/commonjs/components/Tag/tag.types.js +6 -0
  49. package/lib/commonjs/components/Tag/tag.types.js.map +1 -0
  50. package/lib/commonjs/components/Tag/tag.utils.js +69 -0
  51. package/lib/commonjs/components/Tag/tag.utils.js.map +1 -0
  52. package/lib/commonjs/components/TextInput/TextInput.js +138 -0
  53. package/lib/commonjs/components/TextInput/TextInput.js.map +1 -0
  54. package/lib/commonjs/components/TextInput/index.js +14 -0
  55. package/lib/commonjs/components/TextInput/index.js.map +1 -0
  56. package/lib/commonjs/components/TextInput/textInput.types.js +6 -0
  57. package/lib/commonjs/components/TextInput/textInput.types.js.map +1 -0
  58. package/lib/commonjs/components/TextInput/textInput.utils.js +40 -0
  59. package/lib/commonjs/components/TextInput/textInput.utils.js.map +1 -0
  60. package/lib/commonjs/components/shared/field/FieldFooter.js +51 -0
  61. package/lib/commonjs/components/shared/field/FieldFooter.js.map +1 -0
  62. package/lib/commonjs/components/shared/field/FieldLabels.js +67 -0
  63. package/lib/commonjs/components/shared/field/FieldLabels.js.map +1 -0
  64. package/lib/commonjs/components/shared/field/fieldState.js +37 -0
  65. package/lib/commonjs/components/shared/field/fieldState.js.map +1 -0
  66. package/lib/commonjs/components/shared/group.js +73 -0
  67. package/lib/commonjs/components/shared/group.js.map +1 -0
  68. package/lib/commonjs/index.js +256 -0
  69. package/lib/commonjs/index.js.map +1 -0
  70. package/lib/commonjs/motion/motion.js +128 -0
  71. package/lib/commonjs/motion/motion.js.map +1 -0
  72. package/lib/commonjs/motion/useReduceMotion.js +37 -0
  73. package/lib/commonjs/motion/useReduceMotion.js.map +1 -0
  74. package/lib/commonjs/overlay/portal.js +110 -0
  75. package/lib/commonjs/overlay/portal.js.map +1 -0
  76. package/lib/commonjs/overlay/positioning.js +122 -0
  77. package/lib/commonjs/overlay/positioning.js.map +1 -0
  78. package/lib/commonjs/overlay/safeAreaInsets.js +30 -0
  79. package/lib/commonjs/overlay/safeAreaInsets.js.map +1 -0
  80. package/lib/commonjs/overlay/sheet/BottomSheet.js +196 -0
  81. package/lib/commonjs/overlay/sheet/BottomSheet.js.map +1 -0
  82. package/lib/commonjs/overlay/sheet/sheetMath.js +60 -0
  83. package/lib/commonjs/overlay/sheet/sheetMath.js.map +1 -0
  84. package/lib/commonjs/overlay/toast/ToastOutlet.js +106 -0
  85. package/lib/commonjs/overlay/toast/ToastOutlet.js.map +1 -0
  86. package/lib/commonjs/overlay/toast/toastStore.js +76 -0
  87. package/lib/commonjs/overlay/toast/toastStore.js.map +1 -0
  88. package/lib/commonjs/overlay/useAnchoredPosition.js +85 -0
  89. package/lib/commonjs/overlay/useAnchoredPosition.js.map +1 -0
  90. package/lib/commonjs/package.json +1 -0
  91. package/lib/commonjs/primitives/Block.js +112 -0
  92. package/lib/commonjs/primitives/Block.js.map +1 -0
  93. package/lib/commonjs/primitives/Pressable.js +348 -0
  94. package/lib/commonjs/primitives/Pressable.js.map +1 -0
  95. package/lib/commonjs/primitives/PrimitiveInput.js +66 -0
  96. package/lib/commonjs/primitives/PrimitiveInput.js.map +1 -0
  97. package/lib/commonjs/primitives/Separator.js +55 -0
  98. package/lib/commonjs/primitives/Separator.js.map +1 -0
  99. package/lib/commonjs/primitives/Slot.js +78 -0
  100. package/lib/commonjs/primitives/Slot.js.map +1 -0
  101. package/lib/commonjs/primitives/Text.js +73 -0
  102. package/lib/commonjs/primitives/Text.js.map +1 -0
  103. package/lib/commonjs/primitives/pressFeedback.js +53 -0
  104. package/lib/commonjs/primitives/pressFeedback.js.map +1 -0
  105. package/lib/commonjs/primitives/textStyle.js +27 -0
  106. package/lib/commonjs/primitives/textStyle.js.map +1 -0
  107. package/lib/commonjs/primitives/tintSlot.js +45 -0
  108. package/lib/commonjs/primitives/tintSlot.js.map +1 -0
  109. package/lib/commonjs/primitives/touchTarget.js +64 -0
  110. package/lib/commonjs/primitives/touchTarget.js.map +1 -0
  111. package/lib/commonjs/theme/BlendNativeProvider.js +90 -0
  112. package/lib/commonjs/theme/BlendNativeProvider.js.map +1 -0
  113. package/lib/commonjs/theme/breakpoint.js +36 -0
  114. package/lib/commonjs/theme/breakpoint.js.map +1 -0
  115. package/lib/commonjs/theme/fonts.js +58 -0
  116. package/lib/commonjs/theme/fonts.js.map +1 -0
  117. package/lib/commonjs/theme/nativeTokenRegistry.js +44 -0
  118. package/lib/commonjs/theme/nativeTokenRegistry.js.map +1 -0
  119. package/lib/commonjs/theme/systemTheme.js +35 -0
  120. package/lib/commonjs/theme/systemTheme.js.map +1 -0
  121. package/lib/commonjs/theme/useNativeBreakpoint.js +33 -0
  122. package/lib/commonjs/theme/useNativeBreakpoint.js.map +1 -0
  123. package/lib/commonjs/theme/useNativeTokens.js +71 -0
  124. package/lib/commonjs/theme/useNativeTokens.js.map +1 -0
  125. package/lib/module/a11y/announcement.js +38 -0
  126. package/lib/module/a11y/announcement.js.map +1 -0
  127. package/lib/module/a11y/useLiveRegion.js +33 -0
  128. package/lib/module/a11y/useLiveRegion.js.map +1 -0
  129. package/lib/module/adapters/cssStringAdapter.js +352 -0
  130. package/lib/module/adapters/cssStringAdapter.js.map +1 -0
  131. package/lib/module/adapters/optionalGradient.js +29 -0
  132. package/lib/module/adapters/optionalGradient.js.map +1 -0
  133. package/lib/module/adapters/surfaceStyle.js +155 -0
  134. package/lib/module/adapters/surfaceStyle.js.map +1 -0
  135. package/lib/module/components/Alert/Alert.js +126 -0
  136. package/lib/module/components/Alert/Alert.js.map +1 -0
  137. package/lib/module/components/Alert/AlertActions.js +70 -0
  138. package/lib/module/components/Alert/AlertActions.js.map +1 -0
  139. package/lib/module/components/Alert/AlertClose.js +44 -0
  140. package/lib/module/components/Alert/AlertClose.js.map +1 -0
  141. package/lib/module/components/Alert/AlertText.js +45 -0
  142. package/lib/module/components/Alert/AlertText.js.map +1 -0
  143. package/lib/module/components/Alert/alert.tokens.js +4 -0
  144. package/lib/module/components/Alert/alert.tokens.js.map +1 -0
  145. package/lib/module/components/Alert/alert.types.js +4 -0
  146. package/lib/module/components/Alert/alert.types.js.map +1 -0
  147. package/lib/module/components/Alert/alert.utils.js +72 -0
  148. package/lib/module/components/Alert/alert.utils.js.map +1 -0
  149. package/lib/module/components/Alert/index.js +6 -0
  150. package/lib/module/components/Alert/index.js.map +1 -0
  151. package/lib/module/components/Button/Button.js +121 -0
  152. package/lib/module/components/Button/Button.js.map +1 -0
  153. package/lib/module/components/Button/button.types.js +4 -0
  154. package/lib/module/components/Button/button.types.js.map +1 -0
  155. package/lib/module/components/Button/button.utils.js +120 -0
  156. package/lib/module/components/Button/button.utils.js.map +1 -0
  157. package/lib/module/components/Button/index.js +5 -0
  158. package/lib/module/components/Button/index.js.map +1 -0
  159. package/lib/module/components/Skeleton/Skeleton.js +149 -0
  160. package/lib/module/components/Skeleton/Skeleton.js.map +1 -0
  161. package/lib/module/components/Skeleton/index.js +4 -0
  162. package/lib/module/components/Skeleton/index.js.map +1 -0
  163. package/lib/module/components/Skeleton/skeleton.types.js +4 -0
  164. package/lib/module/components/Skeleton/skeleton.types.js.map +1 -0
  165. package/lib/module/components/Skeleton/skeleton.utils.js +40 -0
  166. package/lib/module/components/Skeleton/skeleton.utils.js.map +1 -0
  167. package/lib/module/components/Tag/Tag.js +157 -0
  168. package/lib/module/components/Tag/Tag.js.map +1 -0
  169. package/lib/module/components/Tag/index.js +5 -0
  170. package/lib/module/components/Tag/index.js.map +1 -0
  171. package/lib/module/components/Tag/tag.types.js +4 -0
  172. package/lib/module/components/Tag/tag.types.js.map +1 -0
  173. package/lib/module/components/Tag/tag.utils.js +64 -0
  174. package/lib/module/components/Tag/tag.utils.js.map +1 -0
  175. package/lib/module/components/TextInput/TextInput.js +134 -0
  176. package/lib/module/components/TextInput/TextInput.js.map +1 -0
  177. package/lib/module/components/TextInput/index.js +4 -0
  178. package/lib/module/components/TextInput/index.js.map +1 -0
  179. package/lib/module/components/TextInput/textInput.types.js +4 -0
  180. package/lib/module/components/TextInput/textInput.types.js.map +1 -0
  181. package/lib/module/components/TextInput/textInput.utils.js +36 -0
  182. package/lib/module/components/TextInput/textInput.utils.js.map +1 -0
  183. package/lib/module/components/shared/field/FieldFooter.js +47 -0
  184. package/lib/module/components/shared/field/FieldFooter.js.map +1 -0
  185. package/lib/module/components/shared/field/FieldLabels.js +63 -0
  186. package/lib/module/components/shared/field/FieldLabels.js.map +1 -0
  187. package/lib/module/components/shared/field/fieldState.js +33 -0
  188. package/lib/module/components/shared/field/fieldState.js.map +1 -0
  189. package/lib/module/components/shared/group.js +68 -0
  190. package/lib/module/components/shared/group.js.map +1 -0
  191. package/lib/module/index.js +80 -0
  192. package/lib/module/index.js.map +1 -0
  193. package/lib/module/motion/motion.js +123 -0
  194. package/lib/module/motion/motion.js.map +1 -0
  195. package/lib/module/motion/useReduceMotion.js +33 -0
  196. package/lib/module/motion/useReduceMotion.js.map +1 -0
  197. package/lib/module/overlay/portal.js +104 -0
  198. package/lib/module/overlay/portal.js.map +1 -0
  199. package/lib/module/overlay/positioning.js +118 -0
  200. package/lib/module/overlay/positioning.js.map +1 -0
  201. package/lib/module/overlay/safeAreaInsets.js +27 -0
  202. package/lib/module/overlay/safeAreaInsets.js.map +1 -0
  203. package/lib/module/overlay/sheet/BottomSheet.js +190 -0
  204. package/lib/module/overlay/sheet/BottomSheet.js.map +1 -0
  205. package/lib/module/overlay/sheet/sheetMath.js +53 -0
  206. package/lib/module/overlay/sheet/sheetMath.js.map +1 -0
  207. package/lib/module/overlay/toast/ToastOutlet.js +101 -0
  208. package/lib/module/overlay/toast/ToastOutlet.js.map +1 -0
  209. package/lib/module/overlay/toast/toastStore.js +66 -0
  210. package/lib/module/overlay/toast/toastStore.js.map +1 -0
  211. package/lib/module/overlay/useAnchoredPosition.js +82 -0
  212. package/lib/module/overlay/useAnchoredPosition.js.map +1 -0
  213. package/lib/module/package.json +1 -0
  214. package/lib/module/primitives/Block.js +107 -0
  215. package/lib/module/primitives/Block.js.map +1 -0
  216. package/lib/module/primitives/Pressable.js +339 -0
  217. package/lib/module/primitives/Pressable.js.map +1 -0
  218. package/lib/module/primitives/PrimitiveInput.js +62 -0
  219. package/lib/module/primitives/PrimitiveInput.js.map +1 -0
  220. package/lib/module/primitives/Separator.js +50 -0
  221. package/lib/module/primitives/Separator.js.map +1 -0
  222. package/lib/module/primitives/Slot.js +69 -0
  223. package/lib/module/primitives/Slot.js.map +1 -0
  224. package/lib/module/primitives/Text.js +68 -0
  225. package/lib/module/primitives/Text.js.map +1 -0
  226. package/lib/module/primitives/pressFeedback.js +48 -0
  227. package/lib/module/primitives/pressFeedback.js.map +1 -0
  228. package/lib/module/primitives/textStyle.js +23 -0
  229. package/lib/module/primitives/textStyle.js.map +1 -0
  230. package/lib/module/primitives/tintSlot.js +42 -0
  231. package/lib/module/primitives/tintSlot.js.map +1 -0
  232. package/lib/module/primitives/touchTarget.js +58 -0
  233. package/lib/module/primitives/touchTarget.js.map +1 -0
  234. package/lib/module/theme/BlendNativeProvider.js +78 -0
  235. package/lib/module/theme/BlendNativeProvider.js.map +1 -0
  236. package/lib/module/theme/breakpoint.js +33 -0
  237. package/lib/module/theme/breakpoint.js.map +1 -0
  238. package/lib/module/theme/fonts.js +55 -0
  239. package/lib/module/theme/fonts.js.map +1 -0
  240. package/lib/module/theme/nativeTokenRegistry.js +40 -0
  241. package/lib/module/theme/nativeTokenRegistry.js.map +1 -0
  242. package/lib/module/theme/systemTheme.js +31 -0
  243. package/lib/module/theme/systemTheme.js.map +1 -0
  244. package/lib/module/theme/useNativeBreakpoint.js +24 -0
  245. package/lib/module/theme/useNativeBreakpoint.js.map +1 -0
  246. package/lib/module/theme/useNativeTokens.js +67 -0
  247. package/lib/module/theme/useNativeTokens.js.map +1 -0
  248. package/lib/typescript/commonjs/a11y/announcement.d.ts +26 -0
  249. package/lib/typescript/commonjs/a11y/announcement.d.ts.map +1 -0
  250. package/lib/typescript/commonjs/a11y/useLiveRegion.d.ts +17 -0
  251. package/lib/typescript/commonjs/a11y/useLiveRegion.d.ts.map +1 -0
  252. package/lib/typescript/commonjs/adapters/cssStringAdapter.d.ts +119 -0
  253. package/lib/typescript/commonjs/adapters/cssStringAdapter.d.ts.map +1 -0
  254. package/lib/typescript/commonjs/adapters/optionalGradient.d.ts +32 -0
  255. package/lib/typescript/commonjs/adapters/optionalGradient.d.ts.map +1 -0
  256. package/lib/typescript/commonjs/adapters/surfaceStyle.d.ts +75 -0
  257. package/lib/typescript/commonjs/adapters/surfaceStyle.d.ts.map +1 -0
  258. package/lib/typescript/commonjs/components/Alert/Alert.d.ts +14 -0
  259. package/lib/typescript/commonjs/components/Alert/Alert.d.ts.map +1 -0
  260. package/lib/typescript/commonjs/components/Alert/AlertActions.d.ts +13 -0
  261. package/lib/typescript/commonjs/components/Alert/AlertActions.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/components/Alert/AlertClose.d.ts +22 -0
  263. package/lib/typescript/commonjs/components/Alert/AlertClose.d.ts.map +1 -0
  264. package/lib/typescript/commonjs/components/Alert/AlertText.d.ts +19 -0
  265. package/lib/typescript/commonjs/components/Alert/AlertText.d.ts.map +1 -0
  266. package/lib/typescript/commonjs/components/Alert/alert.tokens.d.ts +17 -0
  267. package/lib/typescript/commonjs/components/Alert/alert.tokens.d.ts.map +1 -0
  268. package/lib/typescript/commonjs/components/Alert/alert.types.d.ts +70 -0
  269. package/lib/typescript/commonjs/components/Alert/alert.types.d.ts.map +1 -0
  270. package/lib/typescript/commonjs/components/Alert/alert.utils.d.ts +58 -0
  271. package/lib/typescript/commonjs/components/Alert/alert.utils.d.ts.map +1 -0
  272. package/lib/typescript/commonjs/components/Alert/index.d.ts +7 -0
  273. package/lib/typescript/commonjs/components/Alert/index.d.ts.map +1 -0
  274. package/lib/typescript/commonjs/components/Button/Button.d.ts +22 -0
  275. package/lib/typescript/commonjs/components/Button/Button.d.ts.map +1 -0
  276. package/lib/typescript/commonjs/components/Button/button.types.d.ts +37 -0
  277. package/lib/typescript/commonjs/components/Button/button.types.d.ts.map +1 -0
  278. package/lib/typescript/commonjs/components/Button/button.utils.d.ts +98 -0
  279. package/lib/typescript/commonjs/components/Button/button.utils.d.ts.map +1 -0
  280. package/lib/typescript/commonjs/components/Button/index.d.ts +5 -0
  281. package/lib/typescript/commonjs/components/Button/index.d.ts.map +1 -0
  282. package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts +7 -0
  283. package/lib/typescript/commonjs/components/Skeleton/Skeleton.d.ts.map +1 -0
  284. package/lib/typescript/commonjs/components/Skeleton/index.d.ts +3 -0
  285. package/lib/typescript/commonjs/components/Skeleton/index.d.ts.map +1 -0
  286. package/lib/typescript/commonjs/components/Skeleton/skeleton.types.d.ts +25 -0
  287. package/lib/typescript/commonjs/components/Skeleton/skeleton.types.d.ts.map +1 -0
  288. package/lib/typescript/commonjs/components/Skeleton/skeleton.utils.d.ts +21 -0
  289. package/lib/typescript/commonjs/components/Skeleton/skeleton.utils.d.ts.map +1 -0
  290. package/lib/typescript/commonjs/components/Tag/Tag.d.ts +21 -0
  291. package/lib/typescript/commonjs/components/Tag/Tag.d.ts.map +1 -0
  292. package/lib/typescript/commonjs/components/Tag/index.d.ts +4 -0
  293. package/lib/typescript/commonjs/components/Tag/index.d.ts.map +1 -0
  294. package/lib/typescript/commonjs/components/Tag/tag.types.d.ts +56 -0
  295. package/lib/typescript/commonjs/components/Tag/tag.types.d.ts.map +1 -0
  296. package/lib/typescript/commonjs/components/Tag/tag.utils.d.ts +41 -0
  297. package/lib/typescript/commonjs/components/Tag/tag.utils.d.ts.map +1 -0
  298. package/lib/typescript/commonjs/components/TextInput/TextInput.d.ts +33 -0
  299. package/lib/typescript/commonjs/components/TextInput/TextInput.d.ts.map +1 -0
  300. package/lib/typescript/commonjs/components/TextInput/index.d.ts +3 -0
  301. package/lib/typescript/commonjs/components/TextInput/index.d.ts.map +1 -0
  302. package/lib/typescript/commonjs/components/TextInput/textInput.types.d.ts +45 -0
  303. package/lib/typescript/commonjs/components/TextInput/textInput.types.d.ts.map +1 -0
  304. package/lib/typescript/commonjs/components/TextInput/textInput.utils.d.ts +35 -0
  305. package/lib/typescript/commonjs/components/TextInput/textInput.utils.d.ts.map +1 -0
  306. package/lib/typescript/commonjs/components/shared/field/FieldFooter.d.ts +22 -0
  307. package/lib/typescript/commonjs/components/shared/field/FieldFooter.d.ts.map +1 -0
  308. package/lib/typescript/commonjs/components/shared/field/FieldLabels.d.ts +27 -0
  309. package/lib/typescript/commonjs/components/shared/field/FieldLabels.d.ts.map +1 -0
  310. package/lib/typescript/commonjs/components/shared/field/fieldState.d.ts +23 -0
  311. package/lib/typescript/commonjs/components/shared/field/fieldState.d.ts.map +1 -0
  312. package/lib/typescript/commonjs/components/shared/group.d.ts +50 -0
  313. package/lib/typescript/commonjs/components/shared/group.d.ts.map +1 -0
  314. package/lib/typescript/commonjs/index.d.ts +74 -0
  315. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  316. package/lib/typescript/commonjs/motion/motion.d.ts +121 -0
  317. package/lib/typescript/commonjs/motion/motion.d.ts.map +1 -0
  318. package/lib/typescript/commonjs/motion/useReduceMotion.d.ts +14 -0
  319. package/lib/typescript/commonjs/motion/useReduceMotion.d.ts.map +1 -0
  320. package/lib/typescript/commonjs/overlay/portal.d.ts +20 -0
  321. package/lib/typescript/commonjs/overlay/portal.d.ts.map +1 -0
  322. package/lib/typescript/commonjs/overlay/positioning.d.ts +65 -0
  323. package/lib/typescript/commonjs/overlay/positioning.d.ts.map +1 -0
  324. package/lib/typescript/commonjs/overlay/safeAreaInsets.d.ts +19 -0
  325. package/lib/typescript/commonjs/overlay/safeAreaInsets.d.ts.map +1 -0
  326. package/lib/typescript/commonjs/overlay/sheet/BottomSheet.d.ts +56 -0
  327. package/lib/typescript/commonjs/overlay/sheet/BottomSheet.d.ts.map +1 -0
  328. package/lib/typescript/commonjs/overlay/sheet/sheetMath.d.ts +32 -0
  329. package/lib/typescript/commonjs/overlay/sheet/sheetMath.d.ts.map +1 -0
  330. package/lib/typescript/commonjs/overlay/toast/ToastOutlet.d.ts +17 -0
  331. package/lib/typescript/commonjs/overlay/toast/ToastOutlet.d.ts.map +1 -0
  332. package/lib/typescript/commonjs/overlay/toast/toastStore.d.ts +45 -0
  333. package/lib/typescript/commonjs/overlay/toast/toastStore.d.ts.map +1 -0
  334. package/lib/typescript/commonjs/overlay/useAnchoredPosition.d.ts +40 -0
  335. package/lib/typescript/commonjs/overlay/useAnchoredPosition.d.ts.map +1 -0
  336. package/lib/typescript/commonjs/package.json +1 -0
  337. package/lib/typescript/commonjs/primitives/Block.d.ts +37 -0
  338. package/lib/typescript/commonjs/primitives/Block.d.ts.map +1 -0
  339. package/lib/typescript/commonjs/primitives/Pressable.d.ts +135 -0
  340. package/lib/typescript/commonjs/primitives/Pressable.d.ts.map +1 -0
  341. package/lib/typescript/commonjs/primitives/PrimitiveInput.d.ts +42 -0
  342. package/lib/typescript/commonjs/primitives/PrimitiveInput.d.ts.map +1 -0
  343. package/lib/typescript/commonjs/primitives/Separator.d.ts +28 -0
  344. package/lib/typescript/commonjs/primitives/Separator.d.ts.map +1 -0
  345. package/lib/typescript/commonjs/primitives/Slot.d.ts +48 -0
  346. package/lib/typescript/commonjs/primitives/Slot.d.ts.map +1 -0
  347. package/lib/typescript/commonjs/primitives/Text.d.ts +50 -0
  348. package/lib/typescript/commonjs/primitives/Text.d.ts.map +1 -0
  349. package/lib/typescript/commonjs/primitives/pressFeedback.d.ts +39 -0
  350. package/lib/typescript/commonjs/primitives/pressFeedback.d.ts.map +1 -0
  351. package/lib/typescript/commonjs/primitives/textStyle.d.ts +13 -0
  352. package/lib/typescript/commonjs/primitives/textStyle.d.ts.map +1 -0
  353. package/lib/typescript/commonjs/primitives/tintSlot.d.ts +10 -0
  354. package/lib/typescript/commonjs/primitives/tintSlot.d.ts.map +1 -0
  355. package/lib/typescript/commonjs/primitives/touchTarget.d.ts +43 -0
  356. package/lib/typescript/commonjs/primitives/touchTarget.d.ts.map +1 -0
  357. package/lib/typescript/commonjs/theme/BlendNativeProvider.d.ts +69 -0
  358. package/lib/typescript/commonjs/theme/BlendNativeProvider.d.ts.map +1 -0
  359. package/lib/typescript/commonjs/theme/breakpoint.d.ts +27 -0
  360. package/lib/typescript/commonjs/theme/breakpoint.d.ts.map +1 -0
  361. package/lib/typescript/commonjs/theme/fonts.d.ts +34 -0
  362. package/lib/typescript/commonjs/theme/fonts.d.ts.map +1 -0
  363. package/lib/typescript/commonjs/theme/nativeTokenRegistry.d.ts +34 -0
  364. package/lib/typescript/commonjs/theme/nativeTokenRegistry.d.ts.map +1 -0
  365. package/lib/typescript/commonjs/theme/systemTheme.d.ts +25 -0
  366. package/lib/typescript/commonjs/theme/systemTheme.d.ts.map +1 -0
  367. package/lib/typescript/commonjs/theme/useNativeBreakpoint.d.ts +17 -0
  368. package/lib/typescript/commonjs/theme/useNativeBreakpoint.d.ts.map +1 -0
  369. package/lib/typescript/commonjs/theme/useNativeTokens.d.ts +4 -0
  370. package/lib/typescript/commonjs/theme/useNativeTokens.d.ts.map +1 -0
  371. package/lib/typescript/module/a11y/announcement.d.ts +26 -0
  372. package/lib/typescript/module/a11y/announcement.d.ts.map +1 -0
  373. package/lib/typescript/module/a11y/useLiveRegion.d.ts +17 -0
  374. package/lib/typescript/module/a11y/useLiveRegion.d.ts.map +1 -0
  375. package/lib/typescript/module/adapters/cssStringAdapter.d.ts +119 -0
  376. package/lib/typescript/module/adapters/cssStringAdapter.d.ts.map +1 -0
  377. package/lib/typescript/module/adapters/optionalGradient.d.ts +32 -0
  378. package/lib/typescript/module/adapters/optionalGradient.d.ts.map +1 -0
  379. package/lib/typescript/module/adapters/surfaceStyle.d.ts +75 -0
  380. package/lib/typescript/module/adapters/surfaceStyle.d.ts.map +1 -0
  381. package/lib/typescript/module/components/Alert/Alert.d.ts +14 -0
  382. package/lib/typescript/module/components/Alert/Alert.d.ts.map +1 -0
  383. package/lib/typescript/module/components/Alert/AlertActions.d.ts +13 -0
  384. package/lib/typescript/module/components/Alert/AlertActions.d.ts.map +1 -0
  385. package/lib/typescript/module/components/Alert/AlertClose.d.ts +22 -0
  386. package/lib/typescript/module/components/Alert/AlertClose.d.ts.map +1 -0
  387. package/lib/typescript/module/components/Alert/AlertText.d.ts +19 -0
  388. package/lib/typescript/module/components/Alert/AlertText.d.ts.map +1 -0
  389. package/lib/typescript/module/components/Alert/alert.tokens.d.ts +17 -0
  390. package/lib/typescript/module/components/Alert/alert.tokens.d.ts.map +1 -0
  391. package/lib/typescript/module/components/Alert/alert.types.d.ts +70 -0
  392. package/lib/typescript/module/components/Alert/alert.types.d.ts.map +1 -0
  393. package/lib/typescript/module/components/Alert/alert.utils.d.ts +58 -0
  394. package/lib/typescript/module/components/Alert/alert.utils.d.ts.map +1 -0
  395. package/lib/typescript/module/components/Alert/index.d.ts +7 -0
  396. package/lib/typescript/module/components/Alert/index.d.ts.map +1 -0
  397. package/lib/typescript/module/components/Button/Button.d.ts +22 -0
  398. package/lib/typescript/module/components/Button/Button.d.ts.map +1 -0
  399. package/lib/typescript/module/components/Button/button.types.d.ts +37 -0
  400. package/lib/typescript/module/components/Button/button.types.d.ts.map +1 -0
  401. package/lib/typescript/module/components/Button/button.utils.d.ts +98 -0
  402. package/lib/typescript/module/components/Button/button.utils.d.ts.map +1 -0
  403. package/lib/typescript/module/components/Button/index.d.ts +5 -0
  404. package/lib/typescript/module/components/Button/index.d.ts.map +1 -0
  405. package/lib/typescript/module/components/Skeleton/Skeleton.d.ts +7 -0
  406. package/lib/typescript/module/components/Skeleton/Skeleton.d.ts.map +1 -0
  407. package/lib/typescript/module/components/Skeleton/index.d.ts +3 -0
  408. package/lib/typescript/module/components/Skeleton/index.d.ts.map +1 -0
  409. package/lib/typescript/module/components/Skeleton/skeleton.types.d.ts +25 -0
  410. package/lib/typescript/module/components/Skeleton/skeleton.types.d.ts.map +1 -0
  411. package/lib/typescript/module/components/Skeleton/skeleton.utils.d.ts +21 -0
  412. package/lib/typescript/module/components/Skeleton/skeleton.utils.d.ts.map +1 -0
  413. package/lib/typescript/module/components/Tag/Tag.d.ts +21 -0
  414. package/lib/typescript/module/components/Tag/Tag.d.ts.map +1 -0
  415. package/lib/typescript/module/components/Tag/index.d.ts +4 -0
  416. package/lib/typescript/module/components/Tag/index.d.ts.map +1 -0
  417. package/lib/typescript/module/components/Tag/tag.types.d.ts +56 -0
  418. package/lib/typescript/module/components/Tag/tag.types.d.ts.map +1 -0
  419. package/lib/typescript/module/components/Tag/tag.utils.d.ts +41 -0
  420. package/lib/typescript/module/components/Tag/tag.utils.d.ts.map +1 -0
  421. package/lib/typescript/module/components/TextInput/TextInput.d.ts +33 -0
  422. package/lib/typescript/module/components/TextInput/TextInput.d.ts.map +1 -0
  423. package/lib/typescript/module/components/TextInput/index.d.ts +3 -0
  424. package/lib/typescript/module/components/TextInput/index.d.ts.map +1 -0
  425. package/lib/typescript/module/components/TextInput/textInput.types.d.ts +45 -0
  426. package/lib/typescript/module/components/TextInput/textInput.types.d.ts.map +1 -0
  427. package/lib/typescript/module/components/TextInput/textInput.utils.d.ts +35 -0
  428. package/lib/typescript/module/components/TextInput/textInput.utils.d.ts.map +1 -0
  429. package/lib/typescript/module/components/shared/field/FieldFooter.d.ts +22 -0
  430. package/lib/typescript/module/components/shared/field/FieldFooter.d.ts.map +1 -0
  431. package/lib/typescript/module/components/shared/field/FieldLabels.d.ts +27 -0
  432. package/lib/typescript/module/components/shared/field/FieldLabels.d.ts.map +1 -0
  433. package/lib/typescript/module/components/shared/field/fieldState.d.ts +23 -0
  434. package/lib/typescript/module/components/shared/field/fieldState.d.ts.map +1 -0
  435. package/lib/typescript/module/components/shared/group.d.ts +50 -0
  436. package/lib/typescript/module/components/shared/group.d.ts.map +1 -0
  437. package/lib/typescript/module/index.d.ts +74 -0
  438. package/lib/typescript/module/index.d.ts.map +1 -0
  439. package/lib/typescript/module/motion/motion.d.ts +121 -0
  440. package/lib/typescript/module/motion/motion.d.ts.map +1 -0
  441. package/lib/typescript/module/motion/useReduceMotion.d.ts +14 -0
  442. package/lib/typescript/module/motion/useReduceMotion.d.ts.map +1 -0
  443. package/lib/typescript/module/overlay/portal.d.ts +20 -0
  444. package/lib/typescript/module/overlay/portal.d.ts.map +1 -0
  445. package/lib/typescript/module/overlay/positioning.d.ts +65 -0
  446. package/lib/typescript/module/overlay/positioning.d.ts.map +1 -0
  447. package/lib/typescript/module/overlay/safeAreaInsets.d.ts +19 -0
  448. package/lib/typescript/module/overlay/safeAreaInsets.d.ts.map +1 -0
  449. package/lib/typescript/module/overlay/sheet/BottomSheet.d.ts +56 -0
  450. package/lib/typescript/module/overlay/sheet/BottomSheet.d.ts.map +1 -0
  451. package/lib/typescript/module/overlay/sheet/sheetMath.d.ts +32 -0
  452. package/lib/typescript/module/overlay/sheet/sheetMath.d.ts.map +1 -0
  453. package/lib/typescript/module/overlay/toast/ToastOutlet.d.ts +17 -0
  454. package/lib/typescript/module/overlay/toast/ToastOutlet.d.ts.map +1 -0
  455. package/lib/typescript/module/overlay/toast/toastStore.d.ts +45 -0
  456. package/lib/typescript/module/overlay/toast/toastStore.d.ts.map +1 -0
  457. package/lib/typescript/module/overlay/useAnchoredPosition.d.ts +40 -0
  458. package/lib/typescript/module/overlay/useAnchoredPosition.d.ts.map +1 -0
  459. package/lib/typescript/module/package.json +1 -0
  460. package/lib/typescript/module/primitives/Block.d.ts +37 -0
  461. package/lib/typescript/module/primitives/Block.d.ts.map +1 -0
  462. package/lib/typescript/module/primitives/Pressable.d.ts +135 -0
  463. package/lib/typescript/module/primitives/Pressable.d.ts.map +1 -0
  464. package/lib/typescript/module/primitives/PrimitiveInput.d.ts +42 -0
  465. package/lib/typescript/module/primitives/PrimitiveInput.d.ts.map +1 -0
  466. package/lib/typescript/module/primitives/Separator.d.ts +28 -0
  467. package/lib/typescript/module/primitives/Separator.d.ts.map +1 -0
  468. package/lib/typescript/module/primitives/Slot.d.ts +48 -0
  469. package/lib/typescript/module/primitives/Slot.d.ts.map +1 -0
  470. package/lib/typescript/module/primitives/Text.d.ts +50 -0
  471. package/lib/typescript/module/primitives/Text.d.ts.map +1 -0
  472. package/lib/typescript/module/primitives/pressFeedback.d.ts +39 -0
  473. package/lib/typescript/module/primitives/pressFeedback.d.ts.map +1 -0
  474. package/lib/typescript/module/primitives/textStyle.d.ts +13 -0
  475. package/lib/typescript/module/primitives/textStyle.d.ts.map +1 -0
  476. package/lib/typescript/module/primitives/tintSlot.d.ts +10 -0
  477. package/lib/typescript/module/primitives/tintSlot.d.ts.map +1 -0
  478. package/lib/typescript/module/primitives/touchTarget.d.ts +43 -0
  479. package/lib/typescript/module/primitives/touchTarget.d.ts.map +1 -0
  480. package/lib/typescript/module/theme/BlendNativeProvider.d.ts +69 -0
  481. package/lib/typescript/module/theme/BlendNativeProvider.d.ts.map +1 -0
  482. package/lib/typescript/module/theme/breakpoint.d.ts +27 -0
  483. package/lib/typescript/module/theme/breakpoint.d.ts.map +1 -0
  484. package/lib/typescript/module/theme/fonts.d.ts +34 -0
  485. package/lib/typescript/module/theme/fonts.d.ts.map +1 -0
  486. package/lib/typescript/module/theme/nativeTokenRegistry.d.ts +34 -0
  487. package/lib/typescript/module/theme/nativeTokenRegistry.d.ts.map +1 -0
  488. package/lib/typescript/module/theme/systemTheme.d.ts +25 -0
  489. package/lib/typescript/module/theme/systemTheme.d.ts.map +1 -0
  490. package/lib/typescript/module/theme/useNativeBreakpoint.d.ts +17 -0
  491. package/lib/typescript/module/theme/useNativeBreakpoint.d.ts.map +1 -0
  492. package/lib/typescript/module/theme/useNativeTokens.d.ts +4 -0
  493. package/lib/typescript/module/theme/useNativeTokens.d.ts.map +1 -0
  494. package/package.json +137 -0
  495. package/src/a11y/announcement.ts +41 -0
  496. package/src/a11y/useLiveRegion.ts +36 -0
  497. package/src/adapters/cssStringAdapter.ts +403 -0
  498. package/src/adapters/optionalGradient.ts +39 -0
  499. package/src/adapters/surfaceStyle.ts +209 -0
  500. package/src/components/Alert/Alert.tsx +167 -0
  501. package/src/components/Alert/AlertActions.tsx +98 -0
  502. package/src/components/Alert/AlertClose.tsx +53 -0
  503. package/src/components/Alert/AlertText.tsx +58 -0
  504. package/src/components/Alert/alert.tokens.ts +24 -0
  505. package/src/components/Alert/alert.types.ts +81 -0
  506. package/src/components/Alert/alert.utils.ts +94 -0
  507. package/src/components/Alert/index.ts +21 -0
  508. package/src/components/Button/Button.tsx +180 -0
  509. package/src/components/Button/button.types.ts +44 -0
  510. package/src/components/Button/button.utils.ts +213 -0
  511. package/src/components/Button/index.ts +12 -0
  512. package/src/components/Skeleton/Skeleton.tsx +196 -0
  513. package/src/components/Skeleton/index.ts +2 -0
  514. package/src/components/Skeleton/skeleton.types.ts +28 -0
  515. package/src/components/Skeleton/skeleton.utils.ts +56 -0
  516. package/src/components/Tag/Tag.tsx +204 -0
  517. package/src/components/Tag/index.ts +7 -0
  518. package/src/components/Tag/tag.types.ts +63 -0
  519. package/src/components/Tag/tag.utils.ts +82 -0
  520. package/src/components/TextInput/TextInput.tsx +165 -0
  521. package/src/components/TextInput/index.ts +2 -0
  522. package/src/components/TextInput/textInput.types.ts +54 -0
  523. package/src/components/TextInput/textInput.utils.ts +68 -0
  524. package/src/components/shared/field/FieldFooter.tsx +66 -0
  525. package/src/components/shared/field/FieldLabels.tsx +86 -0
  526. package/src/components/shared/field/fieldState.ts +39 -0
  527. package/src/components/shared/group.ts +72 -0
  528. package/src/index.ts +144 -0
  529. package/src/motion/motion.ts +115 -0
  530. package/src/motion/useReduceMotion.ts +36 -0
  531. package/src/overlay/portal.tsx +122 -0
  532. package/src/overlay/positioning.ts +196 -0
  533. package/src/overlay/safeAreaInsets.ts +36 -0
  534. package/src/overlay/sheet/BottomSheet.tsx +276 -0
  535. package/src/overlay/sheet/sheetMath.ts +58 -0
  536. package/src/overlay/toast/ToastOutlet.tsx +127 -0
  537. package/src/overlay/toast/toastStore.ts +96 -0
  538. package/src/overlay/useAnchoredPosition.ts +92 -0
  539. package/src/primitives/Block.tsx +129 -0
  540. package/src/primitives/Pressable.tsx +528 -0
  541. package/src/primitives/PrimitiveInput.tsx +87 -0
  542. package/src/primitives/Separator.tsx +65 -0
  543. package/src/primitives/Slot.tsx +94 -0
  544. package/src/primitives/Text.tsx +98 -0
  545. package/src/primitives/pressFeedback.ts +78 -0
  546. package/src/primitives/textStyle.ts +24 -0
  547. package/src/primitives/tintSlot.ts +44 -0
  548. package/src/primitives/touchTarget.ts +72 -0
  549. package/src/theme/BlendNativeProvider.tsx +147 -0
  550. package/src/theme/breakpoint.ts +38 -0
  551. package/src/theme/fonts.ts +63 -0
  552. package/src/theme/nativeTokenRegistry.ts +57 -0
  553. package/src/theme/systemTheme.ts +34 -0
  554. package/src/theme/useNativeBreakpoint.ts +27 -0
  555. package/src/theme/useNativeTokens.ts +99 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAnchoredPosition.d.ts","sourceRoot":"","sources":["../../../../src/overlay/useAnchoredPosition.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,KAAK,iBAAiB,EACtB,KAAK,IAAI,EACZ,MAAM,cAAc,CAAA;AACrB,OAAO,EAEH,KAAK,SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,SAAS,EAGjB,MAAM,kBAAe,CAAA;AAEtB;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE;IAC1C,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,eAAe,CAAC,EAAE,MAAM,CAAA;CAC3B;;;6BAa+C,iBAAiB;;EAgChE"}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import { View, type ViewProps, type ViewStyle } from 'react-native';
3
+ import { type SurfaceStyleProps } from '../adapters/surfaceStyle.js';
4
+ /**
5
+ * Native `Block` — a `View` driven by token-shaped style props.
6
+ *
7
+ * Style resolution is delegated to `resolveSurfaceStyle`, the same function
8
+ * `Pressable` uses, so a component that swaps between the two depending on
9
+ * whether it is interactive (web's `TagElement = onClick ? PrimitiveButton :
10
+ * Block` pattern) renders identically in both branches. Before that was
11
+ * shared, `Block` could not render a border, radius, shadow, or height at
12
+ * all.
13
+ *
14
+ * Note there is **no `color` prop**. On web, `Block`'s `color` maps to CSS
15
+ * `color` — a foreground value that SVG icons inherit via `currentColor`.
16
+ * RN has no such inheritance, and mapping `color` to `backgroundColor` (as
17
+ * this file previously did) silently inverted the meaning of every call
18
+ * copied over from web. Use `backgroundColor` for a background, and `Slot`
19
+ * for tinting icons.
20
+ */
21
+ export type BlockProps = SurfaceStyleProps & {
22
+ children?: React.ReactNode;
23
+ /** Escape hatch for RN styles the token props do not cover. */
24
+ style?: ViewStyle;
25
+ } & Omit<ViewProps, 'style'>;
26
+ /**
27
+ * Memoised because primitives sit at the leaves of every component tree: a
28
+ * parent re-render should not walk the whole subtree when none of the
29
+ * token-derived props changed.
30
+ */
31
+ export declare const Block: React.NamedExoticComponent<SurfaceStyleProps & {
32
+ children?: React.ReactNode;
33
+ /** Escape hatch for RN styles the token props do not cover. */
34
+ style?: ViewStyle;
35
+ } & Omit<ViewProps, "style"> & React.RefAttributes<View>>;
36
+ export default Block;
37
+ //# sourceMappingURL=Block.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["../../../../src/primitives/Block.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAA;AAC/C,OAAO,EACH,IAAI,EAIJ,KAAK,SAAS,EACd,KAAK,SAAS,EACjB,MAAM,cAAc,CAAA;AACrB,OAAO,EAEH,KAAK,iBAAiB,EACzB,MAAM,6BAA0B,CAAA;AAEjC;;;;;;;;;;;;;;;;GAgBG;AAEH,MAAM,MAAM,UAAU,GAAG,iBAAiB,GAAG;IACzC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,+DAA+D;IAC/D,KAAK,CAAC,EAAE,SAAS,CAAA;CACpB,GAAG,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAA;AA4E5B;;;;GAIG;AACH,eAAO,MAAM,KAAK;eApFH,KAAK,CAAC,SAAS;IAC1B,+DAA+D;YACvD,SAAS;yDAkFe,CAAA;AAWpC,eAAe,KAAK,CAAA"}
@@ -0,0 +1,135 @@
1
+ import React from 'react';
2
+ import { View, type GestureResponderEvent, type PressableProps, type ViewStyle } from 'react-native';
3
+ import { type SurfaceStyleProps } from '../adapters/surfaceStyle.js';
4
+ import { MIN_TOUCH_TARGET } from './touchTarget.js';
5
+ export { MIN_TOUCH_TARGET };
6
+ /**
7
+ * Native `Pressable` — the interactive surface for buttons, tags, and any
8
+ * other pressable token-driven component.
9
+ *
10
+ * Web's `PrimitiveButton` is a styled-components `button` with `_active`,
11
+ * `_hover`, `_focusVisible` and `_disabled` pseudo-state objects. RN has no
12
+ * CSS pseudo-selectors; instead `Pressable` exposes a `style` callback
13
+ * receiving `{ pressed }`. This primitive takes the same token-derived CSS
14
+ * strings, translates them through the shared adapter, and composes them per
15
+ * state.
16
+ *
17
+ * `_hover` is ignored — RN has no hover. `_focusVisible` is ignored — there
18
+ * is no focus ring on touch.
19
+ */
20
+ /**
21
+ * `expo-linear-gradient` is an **optional** peer (probe shared with
22
+ * Skeleton in `adapters/optionalGradient`). When it is absent the surface
23
+ * falls back to the gradient's first colour, which `resolveSurfaceStyle`
24
+ * already supplies as `backgroundColor` — so a gradient button degrades to
25
+ * a solid one rather than rendering transparent.
26
+ */
27
+ /**
28
+ * Note this extends `SurfaceStyleProps`, exactly as `BlockProps` does.
29
+ *
30
+ * That shared base is load-bearing, not cosmetic. Components that switch
31
+ * between `Block` and `Pressable` depending on interactivity (Tag, and web's
32
+ * `TagElement = onClick ? PrimitiveButton : Block` pattern) build one surface
33
+ * object and hand it to whichever they render. If the two accepted different
34
+ * prop sets, the extras would fall silently into `...rest` in one branch and
35
+ * vanish — and TypeScript would not catch it, because spreading an object
36
+ * into JSX skips excess-property checking. Keeping one base makes that class
37
+ * of bug unrepresentable.
38
+ */
39
+ export type PrimitivePressableProps = SurfaceStyleProps & {
40
+ children?: React.ReactNode;
41
+ /** Active-state background (CSS string). */
42
+ activeBackground?: string;
43
+ /** Disabled-state background (CSS string). */
44
+ disabledBackground?: string;
45
+ activeBorder?: string;
46
+ disabledBorder?: string;
47
+ activeBoxShadow?: string;
48
+ disabled?: boolean;
49
+ /**
50
+ * Render a spinner in place of `children` while keeping the surface
51
+ * chrome (background, border, padding) intact — the same substitution
52
+ * web performs in `renderButtonContent`.
53
+ */
54
+ loading?: boolean;
55
+ loaderColor?: string;
56
+ loaderSize?: number | 'small' | 'large';
57
+ /** Announced to screen readers when `loading` becomes true. */
58
+ loadingAccessibilityLabel?: string;
59
+ /** Pressed scale transform (web uses `scale(0.99)`). */
60
+ pressedScale?: number;
61
+ /**
62
+ * Colour of the Android ripple. Defaults to the active-state background
63
+ * token, so press feedback tracks the design system without callers
64
+ * having to supply anything.
65
+ *
66
+ * Ignored on every other platform — see the note on `pressFeedback`.
67
+ */
68
+ rippleColor?: string;
69
+ /**
70
+ * Whether the ripple is drawn without bounds (a circle centred on the
71
+ * touch, used for icon-only controls). Mirrors RN's `android_ripple.borderless`.
72
+ */
73
+ rippleBorderless?: boolean;
74
+ /**
75
+ * Minimum tappable size in points. When the rendered surface is smaller,
76
+ * `hitSlop` expands the touch area without changing the visual box.
77
+ *
78
+ * Apple HIG asks for 44x44pt and Material for 48x48dp; small controls
79
+ * (an `xs` Tag is 20pt tall) fall well under both by design, so the tap
80
+ * target has to be widened rather than the control. Pass `0` to opt out.
81
+ */
82
+ minTouchTarget?: number;
83
+ onPress?: (event: GestureResponderEvent) => void;
84
+ style?: ViewStyle;
85
+ } & Omit<PressableProps, 'style' | 'onPress' | 'disabled' | 'children'>;
86
+ /** Memoised — see the note on `Block`. */
87
+ export declare const Pressable: React.NamedExoticComponent<SurfaceStyleProps & {
88
+ children?: React.ReactNode;
89
+ /** Active-state background (CSS string). */
90
+ activeBackground?: string;
91
+ /** Disabled-state background (CSS string). */
92
+ disabledBackground?: string;
93
+ activeBorder?: string;
94
+ disabledBorder?: string;
95
+ activeBoxShadow?: string;
96
+ disabled?: boolean;
97
+ /**
98
+ * Render a spinner in place of `children` while keeping the surface
99
+ * chrome (background, border, padding) intact — the same substitution
100
+ * web performs in `renderButtonContent`.
101
+ */
102
+ loading?: boolean;
103
+ loaderColor?: string;
104
+ loaderSize?: number | "small" | "large";
105
+ /** Announced to screen readers when `loading` becomes true. */
106
+ loadingAccessibilityLabel?: string;
107
+ /** Pressed scale transform (web uses `scale(0.99)`). */
108
+ pressedScale?: number;
109
+ /**
110
+ * Colour of the Android ripple. Defaults to the active-state background
111
+ * token, so press feedback tracks the design system without callers
112
+ * having to supply anything.
113
+ *
114
+ * Ignored on every other platform — see the note on `pressFeedback`.
115
+ */
116
+ rippleColor?: string;
117
+ /**
118
+ * Whether the ripple is drawn without bounds (a circle centred on the
119
+ * touch, used for icon-only controls). Mirrors RN's `android_ripple.borderless`.
120
+ */
121
+ rippleBorderless?: boolean;
122
+ /**
123
+ * Minimum tappable size in points. When the rendered surface is smaller,
124
+ * `hitSlop` expands the touch area without changing the visual box.
125
+ *
126
+ * Apple HIG asks for 44x44pt and Material for 48x48dp; small controls
127
+ * (an `xs` Tag is 20pt tall) fall well under both by design, so the tap
128
+ * target has to be widened rather than the control. Pass `0` to opt out.
129
+ */
130
+ minTouchTarget?: number;
131
+ onPress?: (event: GestureResponderEvent) => void;
132
+ style?: ViewStyle;
133
+ } & Omit<PressableProps, "children" | "style" | "onPress" | "disabled"> & React.RefAttributes<View>>;
134
+ export default Pressable;
135
+ //# sourceMappingURL=Pressable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Pressable.d.ts","sourceRoot":"","sources":["../../../../src/primitives/Pressable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2D,MAAM,OAAO,CAAA;AAC/E,OAAO,EAGH,IAAI,EAEJ,KAAK,qBAAqB,EAE1B,KAAK,cAAc,EAEnB,KAAK,SAAS,EACjB,MAAM,cAAc,CAAA;AAMrB,OAAO,EAEH,KAAK,iBAAiB,EACzB,MAAM,6BAA0B,CAAA;AAKjC,OAAO,EACH,gBAAgB,EAInB,MAAM,kBAAe,CAAA;AAItB,OAAO,EAAE,gBAAgB,EAAE,CAAA;AAE3B;;;;;;;;;;;;;GAaG;AAEH;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,GAAG;IACtD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,4CAA4C;IAC5C,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,8CAA8C;IAC9C,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,eAAe,CAAC,EAAE,MAAM,CAAA;IAExB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAA;IACvC,+DAA+D;IAC/D,yBAAyB,CAAC,EAAE,MAAM,CAAA;IAClC,wDAAwD;IACxD,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,MAAM,CAAA;IAEvB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAA;IAChD,KAAK,CAAC,EAAE,SAAS,CAAA;CACpB,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,GAAG,SAAS,GAAG,UAAU,GAAG,UAAU,CAAC,CAAA;AAoZvE,0CAA0C;AAC1C,eAAO,MAAM,SAAS;eApcP,KAAK,CAAC,SAAS;IAC1B,4CAA4C;uBACzB,MAAM;IACzB,8CAA8C;yBACzB,MAAM;mBACZ,MAAM;qBACJ,MAAM;sBACL,MAAM;eAEb,OAAO;IAClB;;;;OAIG;cACO,OAAO;kBACH,MAAM;iBACP,MAAM,GAAG,OAAO,GAAG,OAAO;IACvC,+DAA+D;gCACnC,MAAM;IAClC,wDAAwD;mBACzC,MAAM;IACrB;;;;;;OAMG;kBACW,MAAM;IACpB;;;OAGG;uBACgB,OAAO;IAC1B;;;;;;;OAOG;qBACc,MAAM;cAEb,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI;YACxC,SAAS;oGAsZuB,CAAA;AAG5C,eAAe,SAAS,CAAA"}
@@ -0,0 +1,42 @@
1
+ import { TextInput as RNTextInput, type TextInputProps as RNTextInputProps, type TextStyle } from 'react-native';
2
+ /**
3
+ * Native `PrimitiveInput` — a bare RN `TextInput` driven by token-shaped
4
+ * text props, the input counterpart of `Text`.
5
+ *
6
+ * Deliberately *only* the text field: web's `PrimitiveInput` styles the
7
+ * `<input>` element itself with border and padding, but RN inputs carry
8
+ * leading/trailing slots, so the bordered container is a `Block` row that
9
+ * the field component owns and this primitive sits inside with `flex: 1`.
10
+ *
11
+ * Font family comes from the provider's role map (`body`), matching `Text`,
12
+ * and OS font scaling stays on per the package policy.
13
+ */
14
+ export type PrimitiveInputProps = {
15
+ /** CSS string like `"14px"` or a number. */
16
+ fontSize?: string | number;
17
+ /** CSS font-weight keyword or numeric string (`"500"`). */
18
+ fontWeight?: string | number;
19
+ /** Text colour for the current state. */
20
+ color?: string;
21
+ /** CSS line-height like `"20px"` or a number. */
22
+ lineHeight?: string | number;
23
+ /** Placeholder colour for the current state. */
24
+ placeholderColor?: string;
25
+ style?: TextStyle;
26
+ } & Omit<RNTextInputProps, 'style' | 'placeholderTextColor'>;
27
+ /** Memoised — see the note on `Block`. */
28
+ export declare const PrimitiveInput: import("react").NamedExoticComponent<{
29
+ /** CSS string like `"14px"` or a number. */
30
+ fontSize?: string | number;
31
+ /** CSS font-weight keyword or numeric string (`"500"`). */
32
+ fontWeight?: string | number;
33
+ /** Text colour for the current state. */
34
+ color?: string;
35
+ /** CSS line-height like `"20px"` or a number. */
36
+ lineHeight?: string | number;
37
+ /** Placeholder colour for the current state. */
38
+ placeholderColor?: string;
39
+ style?: TextStyle;
40
+ } & Omit<RNTextInputProps, "style" | "placeholderTextColor"> & import("react").RefAttributes<RNTextInput>>;
41
+ export default PrimitiveInput;
42
+ //# sourceMappingURL=PrimitiveInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrimitiveInput.d.ts","sourceRoot":"","sources":["../../../../src/primitives/PrimitiveInput.tsx"],"names":[],"mappings":"AACA,OAAO,EACH,SAAS,IAAI,WAAW,EAExB,KAAK,cAAc,IAAI,gBAAgB,EACvC,KAAK,SAAS,EACjB,MAAM,cAAc,CAAA;AAKrB;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,mBAAmB,GAAG;IAC9B,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B,2DAA2D;IAC3D,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,KAAK,CAAC,EAAE,SAAS,CAAA;CACpB,GAAG,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,sBAAsB,CAAC,CAAA;AAoC5D,0CAA0C;AAC1C,eAAO,MAAM,cAAc;IAhDvB,4CAA4C;eACjC,MAAM,GAAG,MAAM;IAC1B,2DAA2D;iBAC9C,MAAM,GAAG,MAAM;IAC5B,yCAAyC;YACjC,MAAM;IACd,iDAAiD;iBACpC,MAAM,GAAG,MAAM;IAC5B,gDAAgD;uBAC7B,MAAM;YACjB,SAAS;0GAsCiC,CAAA;AAatD,eAAe,cAAc,CAAA"}
@@ -0,0 +1,28 @@
1
+ import { type ViewStyle } from 'react-native';
2
+ /**
3
+ * Decorative divider.
4
+ *
5
+ * Native counterpart of web's `components/common/Seperator.tsx` — a fixed-size
6
+ * block of colour used to separate adjacent content. Alert renders one between
7
+ * its actions and its close button when the actions sit inline.
8
+ *
9
+ * Always hidden from assistive tech: it carries no information that the
10
+ * surrounding content does not already convey.
11
+ */
12
+ export type SeparatorProps = {
13
+ /** Which way the line runs. Defaults to vertical, as Alert needs. */
14
+ orientation?: 'vertical' | 'horizontal';
15
+ /** Length along the run of the line. Token string or number. */
16
+ length?: string | number;
17
+ /** Thickness across the line. Token string or number. */
18
+ thickness?: string | number;
19
+ color?: string;
20
+ style?: ViewStyle;
21
+ testID?: string;
22
+ };
23
+ export declare function Separator({ orientation, length, thickness, color, style, testID, }: SeparatorProps): import("react/jsx-runtime").JSX.Element;
24
+ export declare namespace Separator {
25
+ var displayName: string;
26
+ }
27
+ export default Separator;
28
+ //# sourceMappingURL=Separator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Separator.d.ts","sourceRoot":"","sources":["../../../../src/primitives/Separator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAI/D;;;;;;;;;GASG;AAEH,MAAM,MAAM,cAAc,GAAG;IACzB,qEAAqE;IACrE,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAA;IACvC,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACxB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAMD,wBAAgB,SAAS,CAAC,EACtB,WAAwB,EACxB,MAAuB,EACvB,SAA6B,EAC7B,KAAqB,EACrB,KAAK,EACL,MAAM,GACT,EAAE,cAAc,2CAsBhB;yBA7Be,SAAS;;;AAiCzB,eAAe,SAAS,CAAA"}
@@ -0,0 +1,48 @@
1
+ import React from 'react';
2
+ import { type ViewStyle } from 'react-native';
3
+ import { tintSlot } from './tintSlot.js';
4
+ export { tintSlot };
5
+ /**
6
+ * Leading / trailing icon slot.
7
+ *
8
+ * Shared by `Button` and `Tag`, both of which need identical behaviour and
9
+ * both of which previously got it wrong in the same three ways:
10
+ *
11
+ * 1. **Tinting.** On web, components pass `color` to `Block`, which maps to
12
+ * CSS `color`, and SVG icons pick it up through `currentColor`. The native
13
+ * `Block` mapped `color` to `backgroundColor`, so the same call painted a
14
+ * solid rectangle *behind* the icon and never tinted the icon at all. RN
15
+ * has no `currentColor`, so the tint has to be handed to the element
16
+ * explicitly — that is what this component does.
17
+ * 2. **Per-slot `maxHeight`.** `leftSlot.maxHeight` / `rightSlot.maxHeight`
18
+ * are part of the web prop contract and were ignored.
19
+ * 3. **Screen readers.** Web marks slots `aria-hidden` when the component
20
+ * also renders text, so the icon is not announced separately from the
21
+ * label. Native rendered them as visible accessibility nodes.
22
+ */
23
+ export type SlotProps = {
24
+ /** The icon element to render. */
25
+ children?: React.ReactNode;
26
+ /**
27
+ * Colour to tint the icon with. Passed to the child as `color` (and
28
+ * `fill`, which `react-native-svg` elements use).
29
+ */
30
+ color?: string;
31
+ /**
32
+ * Max height for the icon box. Accepts token strings (`"16px"`),
33
+ * percentages (`"100%"`, used by Button's inline subType), or numbers.
34
+ */
35
+ maxHeight?: string | number;
36
+ /**
37
+ * Hide from screen readers. Should be `true` whenever the parent also
38
+ * renders a text label, matching web's `aria-hidden`.
39
+ */
40
+ hidden?: boolean;
41
+ style?: ViewStyle;
42
+ testID?: string;
43
+ };
44
+ declare function SlotImpl({ children, color, maxHeight, hidden, style, testID, }: SlotProps): import("react/jsx-runtime").JSX.Element | null;
45
+ /** Memoised — see the note on `Block`. */
46
+ export declare const Slot: React.MemoExoticComponent<typeof SlotImpl>;
47
+ export default Slot;
48
+ //# sourceMappingURL=Slot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Slot.d.ts","sourceRoot":"","sources":["../../../../src/primitives/Slot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAe,MAAM,OAAO,CAAA;AACnC,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAA;AAE/D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAY,CAAA;AAErC,OAAO,EAAE,QAAQ,EAAE,CAAA;AAEnB;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,MAAM,SAAS,GAAG;IACpB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,MAAM,CAAC,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,iBAAS,QAAQ,CAAC,EACd,QAAQ,EACR,KAAK,EACL,SAAS,EACT,MAAc,EACd,KAAK,EACL,MAAM,GACT,EAAE,SAAS,kDAuBX;AAED,0CAA0C;AAC1C,eAAO,MAAM,IAAI,4CAAiB,CAAA;AAYlC,eAAe,IAAI,CAAA"}
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+ import { type TextProps as RNTextProps, type TextStyle } from 'react-native';
3
+ import type { NativeFontRole } from '../theme/fonts.js';
4
+ /**
5
+ * Native `Text` — renders a RN `Text` from token-driven style props.
6
+ *
7
+ * Mirrors the web `Text` component's API (`fontSize`, `fontWeight`, `color`,
8
+ * `lineHeight`, `textAlign`) but accepts CSS-string values directly from
9
+ * Blend tokens and translates them to `TextStyle` numbers.
10
+ *
11
+ * **Font family** comes from the provider's resolved role map (web has CSS
12
+ * inheritance; RN does not, so the provider is the inheritance mechanism).
13
+ * Defaults to the `body` role; `fontRole` picks another role and an explicit
14
+ * `fontFamily` wins outright.
15
+ *
16
+ * **Font scaling** is deliberately left ON (RN's default). The package policy
17
+ * is to respect OS Dynamic Type and let controls grow — components size with
18
+ * `minHeight`, never a fixed `height`, so scaled text expands the control
19
+ * instead of clipping. Consumers needing a cap can pass RN's own
20
+ * `maxFontSizeMultiplier` through `...rest`.
21
+ */
22
+ export type BlendTextProps = {
23
+ children?: React.ReactNode;
24
+ /** CSS string like `"14px"` or a number. */
25
+ fontSize?: string | number;
26
+ /** CSS font-weight keyword or number (`"500"`, `500`, `"bold"`). */
27
+ fontWeight?: string | number;
28
+ color?: string;
29
+ /** CSS line-height like `"20px"` or a number. */
30
+ lineHeight?: string | number;
31
+ textAlign?: 'left' | 'right' | 'center' | 'justify';
32
+ /**
33
+ * Explicit font family. Overrides the provider's role map; rarely needed
34
+ * outside consumer escape hatches.
35
+ */
36
+ fontFamily?: string;
37
+ /** Which provider font role to use when `fontFamily` is not given. */
38
+ fontRole?: NativeFontRole;
39
+ /** Set true to hide from screen readers (web `aria-hidden`). */
40
+ 'aria-hidden'?: boolean;
41
+ /** Flex display — web `Text` is sometimes `inline`; on RN Text is always inline. */
42
+ as?: string;
43
+ } & Omit<RNTextProps, 'style'> & {
44
+ style?: TextStyle;
45
+ };
46
+ declare function TextImpl({ children, fontSize, fontWeight, color, lineHeight, textAlign, fontFamily, fontRole, style, ...rest }: BlendTextProps): import("react/jsx-runtime").JSX.Element;
47
+ /** Memoised — see the note on `Block`. */
48
+ export declare const Text: React.MemoExoticComponent<typeof TextImpl>;
49
+ export default Text;
50
+ //# sourceMappingURL=Text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/primitives/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAA;AAC/C,OAAO,EAGH,KAAK,SAAS,IAAI,WAAW,EAC7B,KAAK,SAAS,EACjB,MAAM,cAAc,CAAA;AAIrB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAgB,CAAA;AAEpD;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,MAAM,cAAc,GAAG;IACzB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC1B,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC5B,SAAS,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAA;IACnD;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,cAAc,CAAA;IACzB,gEAAgE;IAChE,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,oFAAoF;IACpF,EAAE,CAAC,EAAE,MAAM,CAAA;CACd,GAAG,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG;IACzB,KAAK,CAAC,EAAE,SAAS,CAAA;CACpB,CAAA;AAEL,iBAAS,QAAQ,CAAC,EACd,QAAQ,EACR,QAAQ,EACR,UAAU,EACV,KAAK,EACL,UAAU,EACV,SAAS,EACT,UAAU,EACV,QAAiB,EACjB,KAAK,EACL,GAAG,IAAI,EACV,EAAE,cAAc,2CAoBhB;AAED,0CAA0C;AAC1C,eAAO,MAAM,IAAI,4CAAiB,CAAA;AAOlC,eAAe,IAAI,CAAA"}
@@ -0,0 +1,39 @@
1
+ import type { ViewStyle } from 'react-native';
2
+ /**
3
+ * Press feedback is platform-idiomatic, not uniform.
4
+ *
5
+ * Web scales the surface by `0.99`, and that reads correctly on iOS where a
6
+ * subtle depress is the convention. Android users expect a **ripple**, and a
7
+ * scale transform there looks like a bug. Applying both would double the
8
+ * feedback.
9
+ *
10
+ * The decision lives here — a leaf module with no `react-native` value import
11
+ * — so it is unit-testable outside a renderer, the same split as
12
+ * `theme/breakpoint.ts`, `primitives/touchTarget.ts` and the shadow handling
13
+ * in `adapters/surfaceStyle.ts`. `Pressable` passes the real `Platform.OS`.
14
+ */
15
+ export type PressFeedbackPlatform = 'ios' | 'android' | 'web' | 'windows' | 'macos';
16
+ export type AndroidRipple = {
17
+ color: string;
18
+ borderless: boolean;
19
+ };
20
+ export type PressFeedback = {
21
+ /** Passed to RN's `android_ripple`; `undefined` off Android. */
22
+ androidRipple?: AndroidRipple;
23
+ /** Style merged in while pressed; empty on Android, where the ripple carries it. */
24
+ pressedTransform: ViewStyle;
25
+ };
26
+ /**
27
+ * Ripple colour used when neither the caller nor the active-state token
28
+ * supplies one. Low-alpha black is Android's own default for light surfaces.
29
+ */
30
+ export declare const DEFAULT_RIPPLE_COLOR = "rgba(0, 0, 0, 0.12)";
31
+ export declare function resolvePressFeedback(platform: PressFeedbackPlatform, options?: {
32
+ /** Explicit ripple colour from the caller. */
33
+ rippleColor?: string;
34
+ /** Active-state background token, used when no explicit colour is set. */
35
+ activeBackgroundColor?: string;
36
+ rippleBorderless?: boolean;
37
+ pressedScale?: number;
38
+ }): PressFeedback;
39
+ //# sourceMappingURL=pressFeedback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pressFeedback.d.ts","sourceRoot":"","sources":["../../../../src/primitives/pressFeedback.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,qBAAqB,GAC3B,KAAK,GACL,SAAS,GACT,KAAK,GACL,SAAS,GACT,OAAO,CAAA;AAEb,MAAM,MAAM,aAAa,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,OAAO,CAAA;CACtB,CAAA;AAED,MAAM,MAAM,aAAa,GAAG;IACxB,gEAAgE;IAChE,aAAa,CAAC,EAAE,aAAa,CAAA;IAC7B,oFAAoF;IACpF,gBAAgB,EAAE,SAAS,CAAA;CAC9B,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,wBAAwB,CAAA;AAEzD,wBAAgB,oBAAoB,CAChC,QAAQ,EAAE,qBAAqB,EAC/B,OAAO,GAAE;IACL,8CAA8C;IAC9C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0EAA0E;IAC1E,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;CACnB,GACP,aAAa,CA0Bf"}
@@ -0,0 +1,13 @@
1
+ import type { TextStyle } from 'react-native';
2
+ /**
3
+ * Shared text-style resolution for `Text` and `PrimitiveInput`.
4
+ *
5
+ * Leaf module with only a type import from `react-native`, so it stays
6
+ * vitest-testable — the `theme/breakpoint.ts` pattern.
7
+ */
8
+ /**
9
+ * Resolve a CSS font-weight value to a RN-compatible `TextStyle['fontWeight']`.
10
+ * RN accepts `'normal' | 'bold' | '100'..'900'` (as string or number).
11
+ */
12
+ export declare function resolveFontWeight(w: string | number | undefined): TextStyle['fontWeight'];
13
+ //# sourceMappingURL=textStyle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"textStyle.d.ts","sourceRoot":"","sources":["../../../../src/primitives/textStyle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C;;;;;GAKG;AAEH;;;GAGG;AACH,wBAAgB,iBAAiB,CAC7B,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAC/B,SAAS,CAAC,YAAY,CAAC,CAQzB"}
@@ -0,0 +1,10 @@
1
+ import type { ReactNode } from 'react';
2
+ /**
3
+ * Apply a tint to an icon element.
4
+ *
5
+ * Only sets `color`, and only when the element has not set it explicitly —
6
+ * an icon rendered as `<Icon color="red" />` keeps red. Non-element children
7
+ * (a bare string, a number, `null`) are returned untouched.
8
+ */
9
+ export declare function tintSlot(node: ReactNode, color: string | undefined): ReactNode;
10
+ //# sourceMappingURL=tintSlot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tintSlot.d.ts","sourceRoot":"","sources":["../../../../src/primitives/tintSlot.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAgB,MAAM,OAAO,CAAA;AAyBpD;;;;;;GAMG;AACH,wBAAgB,QAAQ,CACpB,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,MAAM,GAAG,SAAS,GAC1B,SAAS,CAOX"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Minimum tap-target policy.
3
+ *
4
+ * Kept in its own leaf module — importing nothing from `react-native` — so it
5
+ * stays unit-testable outside a renderer. (RN's entrypoint ships Flow syntax
6
+ * that non-Metro bundlers cannot parse, so any module that value-imports it is
7
+ * unusable from a plain Node test runner. Same split as `theme/breakpoint.ts`.)
8
+ */
9
+ /** Inset applied to each edge of the touch region. */
10
+ export type HitSlop = {
11
+ top: number;
12
+ bottom: number;
13
+ left: number;
14
+ right: number;
15
+ };
16
+ /**
17
+ * Apple's Human Interface Guidelines minimum tappable size, in points. Also
18
+ * clears Material's 48dp target once RN's density conversion is applied.
19
+ */
20
+ export declare const MIN_TOUCH_TARGET = 44;
21
+ /**
22
+ * Slop needed to bring a rendered control up to the minimum tap target.
23
+ *
24
+ * Design-system controls are frequently smaller than the guideline by intent —
25
+ * an `xs` Tag is 20pt tall — so the fix is to widen the *touch* region rather
26
+ * than the control. Returns `undefined` when the control already complies (or
27
+ * when the minimum is disabled with `0`), so no `hitSlop` prop is emitted.
28
+ *
29
+ * ```
30
+ * resolveHitSlop(120, 48) -> undefined // already compliant
31
+ * resolveHitSlop(60, 20) -> { top: 12, bottom: 12, left: 0, right: 0 }
32
+ * resolveHitSlop(24, 24) -> { top: 10, bottom: 10, left: 10, right: 10 }
33
+ * ```
34
+ */
35
+ export declare function resolveHitSlop(width: number, height: number, minTouchTarget?: number): HitSlop | undefined;
36
+ /**
37
+ * Whether two slop values are equivalent.
38
+ *
39
+ * Lets callers skip a state update when a re-measure produces the same result,
40
+ * which keeps a control that never needed slop from re-rendering at all.
41
+ */
42
+ export declare function sameHitSlop(a?: HitSlop, b?: HitSlop): boolean;
43
+ //# sourceMappingURL=touchTarget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"touchTarget.d.ts","sourceRoot":"","sources":["../../../../src/primitives/touchTarget.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,sDAAsD;AACtD,MAAM,MAAM,OAAO,GAAG;IAClB,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;CAChB,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,KAAK,CAAA;AAElC;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAC1B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,cAAc,GAAE,MAAyB,GAC1C,OAAO,GAAG,SAAS,CAarB;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAS7D"}
@@ -0,0 +1,69 @@
1
+ import React from 'react';
2
+ import { FOUNDATION_THEME, Theme, type BreakpointType } from '@juspay/blend-design-system/node';
3
+ import type { NativeComponentTokenOverrides } from './nativeTokenRegistry.js';
4
+ import { type NativeFontFamilies, type NativeFontFamilyOption } from './fonts.js';
5
+ import { SYSTEM_THEME, type NativeThemeSetting } from './systemTheme.js';
6
+ /**
7
+ * Theme context for `blend-native`.
8
+ *
9
+ * Replaces the per-component `theme` prop the package shipped with. A prop
10
+ * meant no app-wide dark mode (every call site had to thread it), no nested
11
+ * theme scopes, and — most importantly — no `componentTokens` overrides,
12
+ * which is a first-class feature of web Blend that native consumers simply
13
+ * did not have.
14
+ *
15
+ * Mirrors web's `ThemeProvider` API (`{ theme, componentTokens,
16
+ * foundationTokens }`) so the two platforms are configured the same way, and
17
+ * like web it is optional: components fall back to these defaults when no
18
+ * provider is mounted.
19
+ *
20
+ * Two native-only additions:
21
+ *
22
+ * - `theme="system"` follows the OS appearance via `useColorScheme`,
23
+ * re-rendering when the user flips light/dark. The sentinel is resolved
24
+ * *before* the value enters context, so consumers only ever see a concrete
25
+ * theme.
26
+ * - `fontFamily` resolves one font family per role (see `theme/fonts.ts`) —
27
+ * RN's replacement for web's CSS font inheritance.
28
+ */
29
+ export type BlendNativeThemeValue = {
30
+ theme: Theme | string;
31
+ componentTokens: NativeComponentTokenOverrides;
32
+ foundationTokens: typeof FOUNDATION_THEME;
33
+ breakpoints: BreakpointType;
34
+ /** Resolved family per role; `null` leaves the platform font. */
35
+ fontFamily: NativeFontFamilies;
36
+ };
37
+ export declare const DEFAULT_NATIVE_THEME: BlendNativeThemeValue;
38
+ export declare const BlendNativeThemeContext: React.Context<BlendNativeThemeValue>;
39
+ export type BlendNativeProviderProps = {
40
+ children?: React.ReactNode;
41
+ /**
42
+ * `'light' | 'dark' | 'system'`. Defaults to light. `'system'` follows
43
+ * the OS appearance setting.
44
+ */
45
+ theme?: NativeThemeSetting;
46
+ /**
47
+ * Partial per-slot token overrides, deep-merged onto the active theme's
48
+ * defaults. Supply only the paths you want to change — every untouched
49
+ * path keeps its light/dark value.
50
+ */
51
+ componentTokens?: NativeComponentTokenOverrides;
52
+ /** Override foundation tokens (colours, spacing, radii, ...). */
53
+ foundationTokens?: typeof FOUNDATION_THEME;
54
+ /** Override breakpoint thresholds. */
55
+ breakpoints?: BreakpointType;
56
+ /**
57
+ * Font families per role. Defaults to the foundation `font.family`
58
+ * tokens; pass `'system'` for platform fonts, or a partial map to
59
+ * override/disable individual roles. See `theme/fonts.ts`.
60
+ */
61
+ fontFamily?: NativeFontFamilyOption;
62
+ };
63
+ export declare function BlendNativeProvider({ children, theme, componentTokens, foundationTokens, breakpoints, fontFamily, }: BlendNativeProviderProps): import("react/jsx-runtime").JSX.Element;
64
+ export declare namespace BlendNativeProvider {
65
+ var displayName: string;
66
+ }
67
+ export { SYSTEM_THEME };
68
+ export default BlendNativeProvider;
69
+ //# sourceMappingURL=BlendNativeProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BlendNativeProvider.d.ts","sourceRoot":"","sources":["../../../../src/theme/BlendNativeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiC,MAAM,OAAO,CAAA;AAErD,OAAO,EAEH,gBAAgB,EAChB,KAAK,EACL,KAAK,cAAc,EACtB,MAAM,kCAAkC,CAAA;AACzC,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,0BAAuB,CAAA;AAG1E,OAAO,EAEH,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC9B,MAAM,YAAS,CAAA;AAChB,OAAO,EAEH,YAAY,EACZ,KAAK,kBAAkB,EAC1B,MAAM,kBAAe,CAAA;AAEtB;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,MAAM,MAAM,qBAAqB,GAAG;IAChC,KAAK,EAAE,KAAK,GAAG,MAAM,CAAA;IACrB,eAAe,EAAE,6BAA6B,CAAA;IAC9C,gBAAgB,EAAE,OAAO,gBAAgB,CAAA;IACzC,WAAW,EAAE,cAAc,CAAA;IAC3B,iEAAiE;IACjE,UAAU,EAAE,kBAAkB,CAAA;CACjC,CAAA;AAID,eAAO,MAAM,oBAAoB,EAAE,qBAMlC,CAAA;AAED,eAAO,MAAM,uBAAuB,sCAC0B,CAAA;AAE9D,MAAM,MAAM,wBAAwB,GAAG;IACnC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B;;;OAGG;IACH,KAAK,CAAC,EAAE,kBAAkB,CAAA;IAC1B;;;;OAIG;IACH,eAAe,CAAC,EAAE,6BAA6B,CAAA;IAC/C,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,OAAO,gBAAgB,CAAA;IAC1C,sCAAsC;IACtC,WAAW,CAAC,EAAE,cAAc,CAAA;IAC5B;;;;OAIG;IACH,UAAU,CAAC,EAAE,sBAAsB,CAAA;CACtC,CAAA;AAED,wBAAgB,mBAAmB,CAAC,EAChC,QAAQ,EACR,KAAmB,EACnB,eAAiC,EACjC,gBAAmC,EACnC,WAAyB,EACzB,UAAU,GACb,EAAE,wBAAwB,2CAwC1B;yBA/Ce,mBAAmB;;;AAmDnC,OAAO,EAAE,YAAY,EAAE,CAAA;AAEvB,eAAe,mBAAmB,CAAA"}
@@ -0,0 +1,27 @@
1
+ import { type BreakpointType } from '@juspay/blend-design-system/node';
2
+ /**
3
+ * Pure breakpoint resolution.
4
+ *
5
+ * Kept in its own leaf module — importing nothing from `react-native` — so it
6
+ * stays testable and reusable outside a React render. `useNativeBreakpoint`
7
+ * layers the `useWindowDimensions` subscription on top.
8
+ *
9
+ * (React Native's entrypoint ships Flow syntax that non-Metro bundlers cannot
10
+ * parse, so any module that value-imports it is unusable from a plain Node
11
+ * test runner. Splitting the logic out is the same pattern the web package
12
+ * uses for `shared/datetime/timeCore.ts`.)
13
+ */
14
+ export type NativeBreakpoint = keyof BreakpointType;
15
+ /**
16
+ * Resolve a viewport width to a Blend breakpoint label.
17
+ *
18
+ * Mirrors web's `useBreakPoints` exactly, including its quirk: **only**
19
+ * 320–1023 maps to `'sm'`; everything else — including widths below 320 —
20
+ * returns `'lg'`. Reproduced deliberately so a given width resolves to the
21
+ * same tokens on both platforms.
22
+ *
23
+ * Thresholds come from `BREAKPOINTS` in the web package rather than being
24
+ * duplicated, so retuning them stays a one-line change in one place.
25
+ */
26
+ export declare function resolveBreakpoint(width: number, breakpoints?: BreakpointType): NativeBreakpoint;
27
+ //# sourceMappingURL=breakpoint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"breakpoint.d.ts","sourceRoot":"","sources":["../../../../src/theme/breakpoint.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,KAAK,cAAc,EACtB,MAAM,kCAAkC,CAAA;AAEzC;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,gBAAgB,GAAG,MAAM,cAAc,CAAA;AAEnD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC7B,KAAK,EAAE,MAAM,EACb,WAAW,GAAE,cAA4B,GAC1C,gBAAgB,CAGlB"}