@oxyhq/bloom 0.50.2 → 0.51.1

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 (567) hide show
  1. package/NOTICE +89 -0
  2. package/README.md +12 -7
  3. package/lib/commonjs/avatar-group/AvatarGroup.web.js +2 -1
  4. package/lib/commonjs/avatar-group/AvatarGroup.web.js.map +1 -1
  5. package/lib/commonjs/bottom-sheet/index.web.js +2 -1
  6. package/lib/commonjs/bottom-sheet/index.web.js.map +1 -1
  7. package/lib/commonjs/context-menu/index.web.js +3 -2
  8. package/lib/commonjs/context-menu/index.web.js.map +1 -1
  9. package/lib/commonjs/dialog/Dialog.web.js +4 -3
  10. package/lib/commonjs/dialog/Dialog.web.js.map +1 -1
  11. package/lib/commonjs/frosted-icon-button/shared.js +1 -1
  12. package/lib/commonjs/index.js +90 -83
  13. package/lib/commonjs/index.js.map +1 -1
  14. package/lib/commonjs/index.web.js +116 -109
  15. package/lib/commonjs/index.web.js.map +1 -1
  16. package/lib/commonjs/menu/index.web.js +2 -1
  17. package/lib/commonjs/menu/index.web.js.map +1 -1
  18. package/lib/commonjs/popover/index.web.js +3 -2
  19. package/lib/commonjs/popover/index.web.js.map +1 -1
  20. package/lib/commonjs/portal/index.js +4 -1
  21. package/lib/commonjs/portal/index.js.map +1 -1
  22. package/lib/commonjs/progressive-blur/index.js +79 -0
  23. package/lib/commonjs/progressive-blur/index.js.map +1 -0
  24. package/lib/commonjs/progressive-blur/index.web.js +67 -0
  25. package/lib/commonjs/progressive-blur/index.web.js.map +1 -0
  26. package/lib/commonjs/progressive-blur/shared.js +66 -0
  27. package/lib/commonjs/progressive-blur/shared.js.map +1 -0
  28. package/lib/commonjs/progressive-blur/types.js +6 -0
  29. package/lib/commonjs/progressive-blur/types.js.map +1 -0
  30. package/lib/commonjs/select/index.web.js +2 -1
  31. package/lib/commonjs/select/index.web.js.map +1 -1
  32. package/lib/commonjs/styles/web-view-style.js +26 -0
  33. package/lib/commonjs/styles/web-view-style.js.map +1 -0
  34. package/lib/commonjs/tab-bar/TabBarBase.js +415 -0
  35. package/lib/commonjs/tab-bar/TabBarBase.js.map +1 -0
  36. package/lib/commonjs/tab-bar/expo-router/RouterTabBar.js +83 -0
  37. package/lib/commonjs/tab-bar/expo-router/RouterTabBar.js.map +1 -0
  38. package/lib/commonjs/tab-bar/expo-router/fading-tab-screen.js +119 -0
  39. package/lib/commonjs/tab-bar/expo-router/fading-tab-screen.js.map +1 -0
  40. package/lib/commonjs/tab-bar/expo-router/index.js +26 -0
  41. package/lib/commonjs/tab-bar/expo-router/index.js.map +1 -0
  42. package/lib/commonjs/tab-bar/glyph.js +43 -0
  43. package/lib/commonjs/tab-bar/glyph.js.map +1 -0
  44. package/lib/commonjs/tab-bar/glyph.native.js +55 -0
  45. package/lib/commonjs/tab-bar/glyph.native.js.map +1 -0
  46. package/lib/commonjs/tab-bar/index.js +65 -0
  47. package/lib/commonjs/tab-bar/index.js.map +1 -0
  48. package/lib/commonjs/tab-bar/index.web.js +67 -0
  49. package/lib/commonjs/tab-bar/index.web.js.map +1 -0
  50. package/lib/commonjs/tab-bar/minimize-context.js +127 -0
  51. package/lib/commonjs/tab-bar/minimize-context.js.map +1 -0
  52. package/lib/commonjs/tab-bar/shared.js +139 -0
  53. package/lib/commonjs/tab-bar/shared.js.map +1 -0
  54. package/lib/commonjs/tab-bar/surface-solid.js +43 -0
  55. package/lib/commonjs/tab-bar/surface-solid.js.map +1 -0
  56. package/lib/commonjs/tab-bar/surface.js +13 -0
  57. package/lib/commonjs/tab-bar/surface.js.map +1 -0
  58. package/lib/commonjs/tab-bar/surface.native.js +113 -0
  59. package/lib/commonjs/tab-bar/surface.native.js.map +1 -0
  60. package/lib/commonjs/tab-bar/surface.web.js +59 -0
  61. package/lib/commonjs/tab-bar/surface.web.js.map +1 -0
  62. package/lib/commonjs/tab-bar/types.js +6 -0
  63. package/lib/commonjs/tab-bar/types.js.map +1 -0
  64. package/lib/commonjs/toast/Positioner.js +117 -0
  65. package/lib/commonjs/toast/Positioner.js.map +1 -0
  66. package/lib/commonjs/toast/ToastContent.js +301 -0
  67. package/lib/commonjs/toast/ToastContent.js.map +1 -0
  68. package/lib/commonjs/toast/ToastHost.js +69 -0
  69. package/lib/commonjs/toast/ToastHost.js.map +1 -0
  70. package/lib/commonjs/toast/ToastHost.native.js +44 -0
  71. package/lib/commonjs/toast/ToastHost.native.js.map +1 -0
  72. package/lib/commonjs/toast/ToastIcon.js +57 -0
  73. package/lib/commonjs/toast/ToastIcon.js.map +1 -0
  74. package/lib/commonjs/toast/ToastRow.js +411 -0
  75. package/lib/commonjs/toast/ToastRow.js.map +1 -0
  76. package/lib/commonjs/toast/ToastSwipeHandler.js +189 -0
  77. package/lib/commonjs/toast/ToastSwipeHandler.js.map +1 -0
  78. package/lib/commonjs/toast/Toaster.js +205 -0
  79. package/lib/commonjs/toast/Toaster.js.map +1 -0
  80. package/lib/commonjs/toast/animations.js +274 -0
  81. package/lib/commonjs/toast/animations.js.map +1 -0
  82. package/lib/commonjs/toast/constants.js +56 -0
  83. package/lib/commonjs/toast/constants.js.map +1 -0
  84. package/lib/commonjs/toast/context.js +42 -0
  85. package/lib/commonjs/toast/context.js.map +1 -0
  86. package/lib/commonjs/toast/index.js +32 -126
  87. package/lib/commonjs/toast/index.js.map +1 -1
  88. package/lib/commonjs/toast/position-utils.js +115 -0
  89. package/lib/commonjs/toast/position-utils.js.map +1 -0
  90. package/lib/commonjs/toast/positioner-utils.js +141 -0
  91. package/lib/commonjs/toast/positioner-utils.js.map +1 -0
  92. package/lib/commonjs/toast/toast-comparator.js +28 -0
  93. package/lib/commonjs/toast/toast-comparator.js.map +1 -0
  94. package/lib/commonjs/toast/toast-fns.js +90 -0
  95. package/lib/commonjs/toast/toast-fns.js.map +1 -0
  96. package/lib/commonjs/toast/toast-store.js +352 -0
  97. package/lib/commonjs/toast/toast-store.js.map +1 -0
  98. package/lib/commonjs/toast/toast-timers.js +110 -0
  99. package/lib/commonjs/toast/toast-timers.js.map +1 -0
  100. package/lib/commonjs/toast/types.js +42 -0
  101. package/lib/commonjs/toast/types.js.map +1 -1
  102. package/lib/commonjs/toast/use-animated-target.js +57 -0
  103. package/lib/commonjs/toast/use-animated-target.js.map +1 -0
  104. package/lib/commonjs/toast/use-app-state.js +76 -0
  105. package/lib/commonjs/toast/use-app-state.js.map +1 -0
  106. package/lib/commonjs/toast/use-toast-colors.js +114 -0
  107. package/lib/commonjs/toast/use-toast-colors.js.map +1 -0
  108. package/lib/commonjs/toast/use-toast-position.js +40 -0
  109. package/lib/commonjs/toast/use-toast-position.js.map +1 -0
  110. package/lib/commonjs/tooltip/index.web.js +2 -1
  111. package/lib/commonjs/tooltip/index.web.js.map +1 -1
  112. package/lib/commonjs/zoomable-image-gallery/ZoomableImageGallery.js +20 -8
  113. package/lib/commonjs/zoomable-image-gallery/ZoomableImageGallery.js.map +1 -1
  114. package/lib/module/avatar-group/AvatarGroup.web.js +2 -1
  115. package/lib/module/avatar-group/AvatarGroup.web.js.map +1 -1
  116. package/lib/module/bottom-sheet/index.web.js +2 -1
  117. package/lib/module/bottom-sheet/index.web.js.map +1 -1
  118. package/lib/module/context-menu/index.web.js +3 -2
  119. package/lib/module/context-menu/index.web.js.map +1 -1
  120. package/lib/module/dialog/Dialog.web.js +4 -3
  121. package/lib/module/dialog/Dialog.web.js.map +1 -1
  122. package/lib/module/frosted-icon-button/shared.js +1 -1
  123. package/lib/module/index.js +3 -2
  124. package/lib/module/index.js.map +1 -1
  125. package/lib/module/index.web.js +3 -2
  126. package/lib/module/index.web.js.map +1 -1
  127. package/lib/module/menu/index.web.js +2 -1
  128. package/lib/module/menu/index.web.js.map +1 -1
  129. package/lib/module/popover/index.web.js +3 -2
  130. package/lib/module/popover/index.web.js.map +1 -1
  131. package/lib/module/portal/index.js +4 -1
  132. package/lib/module/portal/index.js.map +1 -1
  133. package/lib/module/progressive-blur/index.js +74 -0
  134. package/lib/module/progressive-blur/index.js.map +1 -0
  135. package/lib/module/progressive-blur/index.web.js +62 -0
  136. package/lib/module/progressive-blur/index.web.js.map +1 -0
  137. package/lib/module/progressive-blur/shared.js +60 -0
  138. package/lib/module/progressive-blur/shared.js.map +1 -0
  139. package/lib/module/progressive-blur/types.js +4 -0
  140. package/lib/module/progressive-blur/types.js.map +1 -0
  141. package/lib/module/select/index.web.js +2 -1
  142. package/lib/module/select/index.web.js.map +1 -1
  143. package/lib/module/styles/web-view-style.js +22 -0
  144. package/lib/module/styles/web-view-style.js.map +1 -0
  145. package/lib/module/tab-bar/TabBarBase.js +408 -0
  146. package/lib/module/tab-bar/TabBarBase.js.map +1 -0
  147. package/lib/module/tab-bar/expo-router/RouterTabBar.js +78 -0
  148. package/lib/module/tab-bar/expo-router/RouterTabBar.js.map +1 -0
  149. package/lib/module/tab-bar/expo-router/fading-tab-screen.js +113 -0
  150. package/lib/module/tab-bar/expo-router/fading-tab-screen.js.map +1 -0
  151. package/lib/module/tab-bar/expo-router/index.js +15 -0
  152. package/lib/module/tab-bar/expo-router/index.js.map +1 -0
  153. package/lib/module/tab-bar/glyph.js +38 -0
  154. package/lib/module/tab-bar/glyph.js.map +1 -0
  155. package/lib/module/tab-bar/glyph.native.js +50 -0
  156. package/lib/module/tab-bar/glyph.native.js.map +1 -0
  157. package/lib/module/tab-bar/index.js +24 -0
  158. package/lib/module/tab-bar/index.js.map +1 -0
  159. package/lib/module/tab-bar/index.web.js +26 -0
  160. package/lib/module/tab-bar/index.web.js.map +1 -0
  161. package/lib/module/tab-bar/minimize-context.js +118 -0
  162. package/lib/module/tab-bar/minimize-context.js.map +1 -0
  163. package/lib/module/tab-bar/shared.js +132 -0
  164. package/lib/module/tab-bar/shared.js.map +1 -0
  165. package/lib/module/tab-bar/surface-solid.js +37 -0
  166. package/lib/module/tab-bar/surface-solid.js.map +1 -0
  167. package/lib/module/tab-bar/surface.js +31 -0
  168. package/lib/module/tab-bar/surface.js.map +1 -0
  169. package/lib/module/tab-bar/surface.native.js +109 -0
  170. package/lib/module/tab-bar/surface.native.js.map +1 -0
  171. package/lib/module/tab-bar/surface.web.js +53 -0
  172. package/lib/module/tab-bar/surface.web.js.map +1 -0
  173. package/lib/module/tab-bar/types.js +4 -0
  174. package/lib/module/tab-bar/types.js.map +1 -0
  175. package/lib/module/toast/Positioner.js +110 -0
  176. package/lib/module/toast/Positioner.js.map +1 -0
  177. package/lib/module/toast/ToastContent.js +295 -0
  178. package/lib/module/toast/ToastContent.js.map +1 -0
  179. package/lib/module/toast/ToastHost.js +63 -0
  180. package/lib/module/toast/ToastHost.js.map +1 -0
  181. package/lib/module/toast/ToastHost.native.js +38 -0
  182. package/lib/module/toast/ToastHost.native.js.map +1 -0
  183. package/lib/module/toast/ToastIcon.js +52 -0
  184. package/lib/module/toast/ToastIcon.js.map +1 -0
  185. package/lib/module/toast/ToastRow.js +407 -0
  186. package/lib/module/toast/ToastRow.js.map +1 -0
  187. package/lib/module/toast/ToastSwipeHandler.js +182 -0
  188. package/lib/module/toast/ToastSwipeHandler.js.map +1 -0
  189. package/lib/module/toast/Toaster.js +198 -0
  190. package/lib/module/toast/Toaster.js.map +1 -0
  191. package/lib/module/toast/animations.js +261 -0
  192. package/lib/module/toast/animations.js.map +1 -0
  193. package/lib/module/toast/constants.js +52 -0
  194. package/lib/module/toast/constants.js.map +1 -0
  195. package/lib/module/toast/context.js +34 -0
  196. package/lib/module/toast/context.js.map +1 -0
  197. package/lib/module/toast/index.js +27 -103
  198. package/lib/module/toast/index.js.map +1 -1
  199. package/lib/module/toast/position-utils.js +107 -0
  200. package/lib/module/toast/position-utils.js.map +1 -0
  201. package/lib/module/toast/positioner-utils.js +134 -0
  202. package/lib/module/toast/positioner-utils.js.map +1 -0
  203. package/lib/module/toast/toast-comparator.js +22 -0
  204. package/lib/module/toast/toast-comparator.js.map +1 -0
  205. package/lib/module/toast/toast-fns.js +85 -0
  206. package/lib/module/toast/toast-fns.js.map +1 -0
  207. package/lib/module/toast/toast-store.js +346 -0
  208. package/lib/module/toast/toast-store.js.map +1 -0
  209. package/lib/module/toast/toast-timers.js +104 -0
  210. package/lib/module/toast/toast-timers.js.map +1 -0
  211. package/lib/module/toast/types.js +38 -0
  212. package/lib/module/toast/types.js.map +1 -1
  213. package/lib/module/toast/use-animated-target.js +52 -0
  214. package/lib/module/toast/use-animated-target.js.map +1 -0
  215. package/lib/module/toast/use-app-state.js +70 -0
  216. package/lib/module/toast/use-app-state.js.map +1 -0
  217. package/lib/module/toast/use-toast-colors.js +109 -0
  218. package/lib/module/toast/use-toast-colors.js.map +1 -0
  219. package/lib/module/toast/use-toast-position.js +35 -0
  220. package/lib/module/toast/use-toast-position.js.map +1 -0
  221. package/lib/module/tooltip/index.web.js +2 -1
  222. package/lib/module/tooltip/index.web.js.map +1 -1
  223. package/lib/module/zoomable-image-gallery/ZoomableImageGallery.js +20 -8
  224. package/lib/module/zoomable-image-gallery/ZoomableImageGallery.js.map +1 -1
  225. package/lib/typescript/commonjs/avatar-group/AvatarGroup.web.d.ts.map +1 -1
  226. package/lib/typescript/commonjs/benefit-list/types.d.ts +2 -1
  227. package/lib/typescript/commonjs/benefit-list/types.d.ts.map +1 -1
  228. package/lib/typescript/commonjs/bottom-sheet/index.web.d.ts.map +1 -1
  229. package/lib/typescript/commonjs/context-menu/index.web.d.ts.map +1 -1
  230. package/lib/typescript/commonjs/dialog/Dialog.web.d.ts.map +1 -1
  231. package/lib/typescript/commonjs/fab/types.d.ts +4 -2
  232. package/lib/typescript/commonjs/fab/types.d.ts.map +1 -1
  233. package/lib/typescript/commonjs/frosted-icon-button/shared.d.ts +1 -1
  234. package/lib/typescript/commonjs/frosted-icon-button/types.d.ts +2 -1
  235. package/lib/typescript/commonjs/frosted-icon-button/types.d.ts.map +1 -1
  236. package/lib/typescript/commonjs/index.d.ts +2 -1
  237. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  238. package/lib/typescript/commonjs/index.web.d.ts +2 -1
  239. package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
  240. package/lib/typescript/commonjs/menu/index.web.d.ts.map +1 -1
  241. package/lib/typescript/commonjs/popover/index.web.d.ts.map +1 -1
  242. package/lib/typescript/commonjs/portal/index.d.ts.map +1 -1
  243. package/lib/typescript/commonjs/progressive-blur/index.d.ts +23 -0
  244. package/lib/typescript/commonjs/progressive-blur/index.d.ts.map +1 -0
  245. package/lib/typescript/commonjs/progressive-blur/index.web.d.ts +30 -0
  246. package/lib/typescript/commonjs/progressive-blur/index.web.d.ts.map +1 -0
  247. package/lib/typescript/commonjs/progressive-blur/shared.d.ts +35 -0
  248. package/lib/typescript/commonjs/progressive-blur/shared.d.ts.map +1 -0
  249. package/lib/typescript/commonjs/progressive-blur/types.d.ts +21 -0
  250. package/lib/typescript/commonjs/progressive-blur/types.d.ts.map +1 -0
  251. package/lib/typescript/commonjs/select/index.web.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/styles/web-view-style.d.ts +21 -0
  253. package/lib/typescript/commonjs/styles/web-view-style.d.ts.map +1 -0
  254. package/lib/typescript/commonjs/tab-bar/TabBarBase.d.ts +36 -0
  255. package/lib/typescript/commonjs/tab-bar/TabBarBase.d.ts.map +1 -0
  256. package/lib/typescript/commonjs/tab-bar/expo-router/RouterTabBar.d.ts +59 -0
  257. package/lib/typescript/commonjs/tab-bar/expo-router/RouterTabBar.d.ts.map +1 -0
  258. package/lib/typescript/commonjs/tab-bar/expo-router/fading-tab-screen.d.ts +11 -0
  259. package/lib/typescript/commonjs/tab-bar/expo-router/fading-tab-screen.d.ts.map +1 -0
  260. package/lib/typescript/commonjs/tab-bar/expo-router/index.d.ts +14 -0
  261. package/lib/typescript/commonjs/tab-bar/expo-router/index.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/tab-bar/glyph.d.ts +6 -0
  263. package/lib/typescript/commonjs/tab-bar/glyph.d.ts.map +1 -0
  264. package/lib/typescript/commonjs/tab-bar/glyph.native.d.ts +6 -0
  265. package/lib/typescript/commonjs/tab-bar/glyph.native.d.ts.map +1 -0
  266. package/lib/typescript/commonjs/tab-bar/index.d.ts +12 -0
  267. package/lib/typescript/commonjs/tab-bar/index.d.ts.map +1 -0
  268. package/lib/typescript/commonjs/tab-bar/index.web.d.ts +12 -0
  269. package/lib/typescript/commonjs/tab-bar/index.web.d.ts.map +1 -0
  270. package/lib/typescript/commonjs/tab-bar/minimize-context.d.ts +51 -0
  271. package/lib/typescript/commonjs/tab-bar/minimize-context.d.ts.map +1 -0
  272. package/lib/typescript/commonjs/tab-bar/shared.d.ts +93 -0
  273. package/lib/typescript/commonjs/tab-bar/shared.d.ts.map +1 -0
  274. package/lib/typescript/commonjs/tab-bar/surface-solid.d.ts +6 -0
  275. package/lib/typescript/commonjs/tab-bar/surface-solid.d.ts.map +1 -0
  276. package/lib/typescript/commonjs/tab-bar/surface.d.ts +29 -0
  277. package/lib/typescript/commonjs/tab-bar/surface.d.ts.map +1 -0
  278. package/lib/typescript/commonjs/tab-bar/surface.native.d.ts +6 -0
  279. package/lib/typescript/commonjs/tab-bar/surface.native.d.ts.map +1 -0
  280. package/lib/typescript/commonjs/tab-bar/surface.web.d.ts +6 -0
  281. package/lib/typescript/commonjs/tab-bar/surface.web.d.ts.map +1 -0
  282. package/lib/typescript/commonjs/tab-bar/types.d.ts +88 -0
  283. package/lib/typescript/commonjs/tab-bar/types.d.ts.map +1 -0
  284. package/lib/typescript/commonjs/toast/Positioner.d.ts +21 -0
  285. package/lib/typescript/commonjs/toast/Positioner.d.ts.map +1 -0
  286. package/lib/typescript/commonjs/toast/ToastContent.d.ts +14 -0
  287. package/lib/typescript/commonjs/toast/ToastContent.d.ts.map +1 -0
  288. package/lib/typescript/commonjs/toast/ToastHost.d.ts +6 -0
  289. package/lib/typescript/commonjs/toast/ToastHost.d.ts.map +1 -0
  290. package/lib/typescript/commonjs/toast/ToastHost.native.d.ts +6 -0
  291. package/lib/typescript/commonjs/toast/ToastHost.native.d.ts.map +1 -0
  292. package/lib/typescript/commonjs/toast/ToastIcon.d.ts +9 -0
  293. package/lib/typescript/commonjs/toast/ToastIcon.d.ts.map +1 -0
  294. package/lib/typescript/commonjs/toast/ToastRow.d.ts +80 -0
  295. package/lib/typescript/commonjs/toast/ToastRow.d.ts.map +1 -0
  296. package/lib/typescript/commonjs/toast/ToastSwipeHandler.d.ts +30 -0
  297. package/lib/typescript/commonjs/toast/ToastSwipeHandler.d.ts.map +1 -0
  298. package/lib/typescript/commonjs/toast/Toaster.d.ts +19 -0
  299. package/lib/typescript/commonjs/toast/Toaster.d.ts.map +1 -0
  300. package/lib/typescript/commonjs/toast/animations.d.ts +62 -0
  301. package/lib/typescript/commonjs/toast/animations.d.ts.map +1 -0
  302. package/lib/typescript/commonjs/toast/constants.d.ts +39 -0
  303. package/lib/typescript/commonjs/toast/constants.d.ts.map +1 -0
  304. package/lib/typescript/commonjs/toast/context.d.ts +19 -0
  305. package/lib/typescript/commonjs/toast/context.d.ts.map +1 -0
  306. package/lib/typescript/commonjs/toast/index.d.ts +23 -76
  307. package/lib/typescript/commonjs/toast/index.d.ts.map +1 -1
  308. package/lib/typescript/commonjs/toast/position-utils.d.ts +30 -0
  309. package/lib/typescript/commonjs/toast/position-utils.d.ts.map +1 -0
  310. package/lib/typescript/commonjs/toast/positioner-utils.d.ts +72 -0
  311. package/lib/typescript/commonjs/toast/positioner-utils.d.ts.map +1 -0
  312. package/lib/typescript/commonjs/toast/toast-comparator.d.ts +12 -0
  313. package/lib/typescript/commonjs/toast/toast-comparator.d.ts.map +1 -0
  314. package/lib/typescript/commonjs/toast/toast-fns.d.ts +3 -0
  315. package/lib/typescript/commonjs/toast/toast-fns.d.ts.map +1 -0
  316. package/lib/typescript/commonjs/toast/toast-store.d.ts +52 -0
  317. package/lib/typescript/commonjs/toast/toast-store.d.ts.map +1 -0
  318. package/lib/typescript/commonjs/toast/toast-timers.d.ts +24 -0
  319. package/lib/typescript/commonjs/toast/toast-timers.d.ts.map +1 -0
  320. package/lib/typescript/commonjs/toast/types.d.ts +222 -5
  321. package/lib/typescript/commonjs/toast/types.d.ts.map +1 -1
  322. package/lib/typescript/commonjs/toast/use-animated-target.d.ts +7 -0
  323. package/lib/typescript/commonjs/toast/use-animated-target.d.ts.map +1 -0
  324. package/lib/typescript/commonjs/toast/use-app-state.d.ts +18 -0
  325. package/lib/typescript/commonjs/toast/use-app-state.d.ts.map +1 -0
  326. package/lib/typescript/commonjs/toast/use-toast-colors.d.ts +22 -0
  327. package/lib/typescript/commonjs/toast/use-toast-colors.d.ts.map +1 -0
  328. package/lib/typescript/commonjs/toast/use-toast-position.d.ts +37 -0
  329. package/lib/typescript/commonjs/toast/use-toast-position.d.ts.map +1 -0
  330. package/lib/typescript/commonjs/tooltip/index.web.d.ts.map +1 -1
  331. package/lib/typescript/commonjs/zoomable-image-gallery/ZoomableImageGallery.d.ts.map +1 -1
  332. package/lib/typescript/module/avatar-group/AvatarGroup.web.d.ts.map +1 -1
  333. package/lib/typescript/module/benefit-list/types.d.ts +2 -1
  334. package/lib/typescript/module/benefit-list/types.d.ts.map +1 -1
  335. package/lib/typescript/module/bottom-sheet/index.web.d.ts.map +1 -1
  336. package/lib/typescript/module/context-menu/index.web.d.ts.map +1 -1
  337. package/lib/typescript/module/dialog/Dialog.web.d.ts.map +1 -1
  338. package/lib/typescript/module/fab/types.d.ts +4 -2
  339. package/lib/typescript/module/fab/types.d.ts.map +1 -1
  340. package/lib/typescript/module/frosted-icon-button/shared.d.ts +1 -1
  341. package/lib/typescript/module/frosted-icon-button/types.d.ts +2 -1
  342. package/lib/typescript/module/frosted-icon-button/types.d.ts.map +1 -1
  343. package/lib/typescript/module/index.d.ts +2 -1
  344. package/lib/typescript/module/index.d.ts.map +1 -1
  345. package/lib/typescript/module/index.web.d.ts +2 -1
  346. package/lib/typescript/module/index.web.d.ts.map +1 -1
  347. package/lib/typescript/module/menu/index.web.d.ts.map +1 -1
  348. package/lib/typescript/module/popover/index.web.d.ts.map +1 -1
  349. package/lib/typescript/module/portal/index.d.ts.map +1 -1
  350. package/lib/typescript/module/progressive-blur/index.d.ts +23 -0
  351. package/lib/typescript/module/progressive-blur/index.d.ts.map +1 -0
  352. package/lib/typescript/module/progressive-blur/index.web.d.ts +30 -0
  353. package/lib/typescript/module/progressive-blur/index.web.d.ts.map +1 -0
  354. package/lib/typescript/module/progressive-blur/shared.d.ts +35 -0
  355. package/lib/typescript/module/progressive-blur/shared.d.ts.map +1 -0
  356. package/lib/typescript/module/progressive-blur/types.d.ts +21 -0
  357. package/lib/typescript/module/progressive-blur/types.d.ts.map +1 -0
  358. package/lib/typescript/module/select/index.web.d.ts.map +1 -1
  359. package/lib/typescript/module/styles/web-view-style.d.ts +21 -0
  360. package/lib/typescript/module/styles/web-view-style.d.ts.map +1 -0
  361. package/lib/typescript/module/tab-bar/TabBarBase.d.ts +36 -0
  362. package/lib/typescript/module/tab-bar/TabBarBase.d.ts.map +1 -0
  363. package/lib/typescript/module/tab-bar/expo-router/RouterTabBar.d.ts +59 -0
  364. package/lib/typescript/module/tab-bar/expo-router/RouterTabBar.d.ts.map +1 -0
  365. package/lib/typescript/module/tab-bar/expo-router/fading-tab-screen.d.ts +11 -0
  366. package/lib/typescript/module/tab-bar/expo-router/fading-tab-screen.d.ts.map +1 -0
  367. package/lib/typescript/module/tab-bar/expo-router/index.d.ts +14 -0
  368. package/lib/typescript/module/tab-bar/expo-router/index.d.ts.map +1 -0
  369. package/lib/typescript/module/tab-bar/glyph.d.ts +6 -0
  370. package/lib/typescript/module/tab-bar/glyph.d.ts.map +1 -0
  371. package/lib/typescript/module/tab-bar/glyph.native.d.ts +6 -0
  372. package/lib/typescript/module/tab-bar/glyph.native.d.ts.map +1 -0
  373. package/lib/typescript/module/tab-bar/index.d.ts +12 -0
  374. package/lib/typescript/module/tab-bar/index.d.ts.map +1 -0
  375. package/lib/typescript/module/tab-bar/index.web.d.ts +12 -0
  376. package/lib/typescript/module/tab-bar/index.web.d.ts.map +1 -0
  377. package/lib/typescript/module/tab-bar/minimize-context.d.ts +51 -0
  378. package/lib/typescript/module/tab-bar/minimize-context.d.ts.map +1 -0
  379. package/lib/typescript/module/tab-bar/shared.d.ts +93 -0
  380. package/lib/typescript/module/tab-bar/shared.d.ts.map +1 -0
  381. package/lib/typescript/module/tab-bar/surface-solid.d.ts +6 -0
  382. package/lib/typescript/module/tab-bar/surface-solid.d.ts.map +1 -0
  383. package/lib/typescript/module/tab-bar/surface.d.ts +29 -0
  384. package/lib/typescript/module/tab-bar/surface.d.ts.map +1 -0
  385. package/lib/typescript/module/tab-bar/surface.native.d.ts +6 -0
  386. package/lib/typescript/module/tab-bar/surface.native.d.ts.map +1 -0
  387. package/lib/typescript/module/tab-bar/surface.web.d.ts +6 -0
  388. package/lib/typescript/module/tab-bar/surface.web.d.ts.map +1 -0
  389. package/lib/typescript/module/tab-bar/types.d.ts +88 -0
  390. package/lib/typescript/module/tab-bar/types.d.ts.map +1 -0
  391. package/lib/typescript/module/toast/Positioner.d.ts +21 -0
  392. package/lib/typescript/module/toast/Positioner.d.ts.map +1 -0
  393. package/lib/typescript/module/toast/ToastContent.d.ts +14 -0
  394. package/lib/typescript/module/toast/ToastContent.d.ts.map +1 -0
  395. package/lib/typescript/module/toast/ToastHost.d.ts +6 -0
  396. package/lib/typescript/module/toast/ToastHost.d.ts.map +1 -0
  397. package/lib/typescript/module/toast/ToastHost.native.d.ts +6 -0
  398. package/lib/typescript/module/toast/ToastHost.native.d.ts.map +1 -0
  399. package/lib/typescript/module/toast/ToastIcon.d.ts +9 -0
  400. package/lib/typescript/module/toast/ToastIcon.d.ts.map +1 -0
  401. package/lib/typescript/module/toast/ToastRow.d.ts +80 -0
  402. package/lib/typescript/module/toast/ToastRow.d.ts.map +1 -0
  403. package/lib/typescript/module/toast/ToastSwipeHandler.d.ts +30 -0
  404. package/lib/typescript/module/toast/ToastSwipeHandler.d.ts.map +1 -0
  405. package/lib/typescript/module/toast/Toaster.d.ts +19 -0
  406. package/lib/typescript/module/toast/Toaster.d.ts.map +1 -0
  407. package/lib/typescript/module/toast/animations.d.ts +62 -0
  408. package/lib/typescript/module/toast/animations.d.ts.map +1 -0
  409. package/lib/typescript/module/toast/constants.d.ts +39 -0
  410. package/lib/typescript/module/toast/constants.d.ts.map +1 -0
  411. package/lib/typescript/module/toast/context.d.ts +19 -0
  412. package/lib/typescript/module/toast/context.d.ts.map +1 -0
  413. package/lib/typescript/module/toast/index.d.ts +23 -76
  414. package/lib/typescript/module/toast/index.d.ts.map +1 -1
  415. package/lib/typescript/module/toast/position-utils.d.ts +30 -0
  416. package/lib/typescript/module/toast/position-utils.d.ts.map +1 -0
  417. package/lib/typescript/module/toast/positioner-utils.d.ts +72 -0
  418. package/lib/typescript/module/toast/positioner-utils.d.ts.map +1 -0
  419. package/lib/typescript/module/toast/toast-comparator.d.ts +12 -0
  420. package/lib/typescript/module/toast/toast-comparator.d.ts.map +1 -0
  421. package/lib/typescript/module/toast/toast-fns.d.ts +3 -0
  422. package/lib/typescript/module/toast/toast-fns.d.ts.map +1 -0
  423. package/lib/typescript/module/toast/toast-store.d.ts +52 -0
  424. package/lib/typescript/module/toast/toast-store.d.ts.map +1 -0
  425. package/lib/typescript/module/toast/toast-timers.d.ts +24 -0
  426. package/lib/typescript/module/toast/toast-timers.d.ts.map +1 -0
  427. package/lib/typescript/module/toast/types.d.ts +222 -5
  428. package/lib/typescript/module/toast/types.d.ts.map +1 -1
  429. package/lib/typescript/module/toast/use-animated-target.d.ts +7 -0
  430. package/lib/typescript/module/toast/use-animated-target.d.ts.map +1 -0
  431. package/lib/typescript/module/toast/use-app-state.d.ts +18 -0
  432. package/lib/typescript/module/toast/use-app-state.d.ts.map +1 -0
  433. package/lib/typescript/module/toast/use-toast-colors.d.ts +22 -0
  434. package/lib/typescript/module/toast/use-toast-colors.d.ts.map +1 -0
  435. package/lib/typescript/module/toast/use-toast-position.d.ts +37 -0
  436. package/lib/typescript/module/toast/use-toast-position.d.ts.map +1 -0
  437. package/lib/typescript/module/tooltip/index.web.d.ts.map +1 -1
  438. package/lib/typescript/module/zoomable-image-gallery/ZoomableImageGallery.d.ts.map +1 -1
  439. package/package.json +58 -26
  440. package/src/__tests__/TabBar.test.tsx +342 -0
  441. package/src/__tests__/TabBarGlassFallback.test.tsx +234 -0
  442. package/src/__tests__/TabBarReanimatedDeps.test.ts +130 -0
  443. package/src/__tests__/TabBarWebFork.test.ts +243 -0
  444. package/src/__tests__/ToastContent.test.tsx +192 -0
  445. package/src/__tests__/ToastHostWebFork.test.ts +155 -0
  446. package/src/__tests__/Toaster.test.tsx +527 -0
  447. package/src/__tests__/animated-style-deps.test.ts +156 -0
  448. package/src/__tests__/icon-references.test.ts +243 -0
  449. package/src/__tests__/toast-animations.test.ts +98 -0
  450. package/src/__tests__/toast-comparator.test.ts +131 -0
  451. package/src/__tests__/toast-enter-driver.test.ts +147 -0
  452. package/src/__tests__/toast-fns.test.ts +240 -0
  453. package/src/__tests__/toast-position-utils.test.ts +259 -0
  454. package/src/__tests__/toast-positioner-utils.test.ts +214 -0
  455. package/src/__tests__/toast-store.test.ts +622 -0
  456. package/src/__tests__/toast-timers.test.ts +163 -0
  457. package/src/__tests__/use-animated-target.test.tsx +60 -0
  458. package/src/__tests__/use-app-state.test.tsx +127 -0
  459. package/src/__tests__/use-toast-colors.test.tsx +189 -0
  460. package/src/__tests__/web-position-fixed.test.ts +70 -0
  461. package/src/avatar-group/AvatarGroup.web.tsx +2 -1
  462. package/src/benefit-list/types.ts +2 -1
  463. package/src/bottom-sheet/index.web.tsx +3 -2
  464. package/src/context-menu/index.web.tsx +3 -2
  465. package/src/dialog/Dialog.web.tsx +4 -3
  466. package/src/fab/types.ts +4 -2
  467. package/src/frosted-icon-button/shared.ts +1 -1
  468. package/src/frosted-icon-button/types.ts +2 -1
  469. package/src/index.ts +4 -1
  470. package/src/index.web.ts +4 -1
  471. package/src/menu/index.web.tsx +2 -1
  472. package/src/popover/index.web.tsx +3 -2
  473. package/src/portal/index.tsx +4 -1
  474. package/src/progressive-blur/index.tsx +78 -0
  475. package/src/progressive-blur/index.web.tsx +65 -0
  476. package/src/progressive-blur/shared.ts +81 -0
  477. package/src/progressive-blur/types.ts +21 -0
  478. package/src/select/index.web.tsx +2 -1
  479. package/src/styles/web-view-style.ts +21 -0
  480. package/src/tab-bar/TabBar.stories.tsx +217 -0
  481. package/src/tab-bar/TabBarBase.tsx +517 -0
  482. package/src/tab-bar/expo-router/RouterTabBar.tsx +80 -0
  483. package/src/tab-bar/expo-router/fading-tab-screen.tsx +109 -0
  484. package/src/tab-bar/expo-router/index.ts +13 -0
  485. package/src/tab-bar/glyph.native.tsx +46 -0
  486. package/src/tab-bar/glyph.tsx +31 -0
  487. package/src/tab-bar/index.ts +32 -0
  488. package/src/tab-bar/index.web.tsx +34 -0
  489. package/src/tab-bar/minimize-context.tsx +117 -0
  490. package/src/tab-bar/shared.ts +159 -0
  491. package/src/tab-bar/surface-solid.tsx +40 -0
  492. package/src/tab-bar/surface.native.tsx +122 -0
  493. package/src/tab-bar/surface.tsx +28 -0
  494. package/src/tab-bar/surface.web.tsx +56 -0
  495. package/src/tab-bar/types.ts +91 -0
  496. package/src/toast/Positioner.tsx +121 -0
  497. package/src/toast/Toast.stories.tsx +292 -65
  498. package/src/toast/ToastContent.tsx +405 -0
  499. package/src/toast/ToastHost.native.tsx +31 -0
  500. package/src/toast/ToastHost.tsx +67 -0
  501. package/src/toast/ToastIcon.tsx +55 -0
  502. package/src/toast/ToastRow.tsx +485 -0
  503. package/src/toast/ToastSwipeHandler.tsx +222 -0
  504. package/src/toast/Toaster.tsx +259 -0
  505. package/src/toast/animations.ts +313 -0
  506. package/src/toast/constants.ts +76 -0
  507. package/src/toast/context.tsx +44 -0
  508. package/src/toast/index.tsx +47 -123
  509. package/src/toast/position-utils.ts +149 -0
  510. package/src/toast/positioner-utils.ts +142 -0
  511. package/src/toast/toast-comparator.ts +41 -0
  512. package/src/toast/toast-fns.ts +104 -0
  513. package/src/toast/toast-store.ts +432 -0
  514. package/src/toast/toast-timers.ts +124 -0
  515. package/src/toast/types.ts +301 -5
  516. package/src/toast/use-animated-target.ts +61 -0
  517. package/src/toast/use-app-state.ts +77 -0
  518. package/src/toast/use-toast-colors.ts +133 -0
  519. package/src/toast/use-toast-position.ts +46 -0
  520. package/src/tooltip/index.web.tsx +2 -1
  521. package/src/zoomable-image-gallery/ZoomableImageGallery.stories.tsx +134 -0
  522. package/src/zoomable-image-gallery/ZoomableImageGallery.tsx +50 -27
  523. package/lib/commonjs/toast/Toast.js +0 -267
  524. package/lib/commonjs/toast/Toast.js.map +0 -1
  525. package/lib/commonjs/toast/const.js +0 -8
  526. package/lib/commonjs/toast/const.js.map +0 -1
  527. package/lib/commonjs/toast/index.web.js +0 -114
  528. package/lib/commonjs/toast/index.web.js.map +0 -1
  529. package/lib/commonjs/toast/sonner/index.js +0 -9
  530. package/lib/commonjs/toast/sonner/index.js.map +0 -1
  531. package/lib/commonjs/toast/sonner/index.web.js +0 -9
  532. package/lib/commonjs/toast/sonner/index.web.js.map +0 -1
  533. package/lib/module/toast/Toast.js +0 -258
  534. package/lib/module/toast/Toast.js.map +0 -1
  535. package/lib/module/toast/const.js +0 -4
  536. package/lib/module/toast/const.js.map +0 -1
  537. package/lib/module/toast/index.web.js +0 -74
  538. package/lib/module/toast/index.web.js.map +0 -1
  539. package/lib/module/toast/sonner/index.js +0 -5
  540. package/lib/module/toast/sonner/index.js.map +0 -1
  541. package/lib/module/toast/sonner/index.web.js +0 -5
  542. package/lib/module/toast/sonner/index.web.js.map +0 -1
  543. package/lib/typescript/commonjs/toast/Toast.d.ts +0 -23
  544. package/lib/typescript/commonjs/toast/Toast.d.ts.map +0 -1
  545. package/lib/typescript/commonjs/toast/const.d.ts +0 -2
  546. package/lib/typescript/commonjs/toast/const.d.ts.map +0 -1
  547. package/lib/typescript/commonjs/toast/index.web.d.ts +0 -29
  548. package/lib/typescript/commonjs/toast/index.web.d.ts.map +0 -1
  549. package/lib/typescript/commonjs/toast/sonner/index.d.ts +0 -2
  550. package/lib/typescript/commonjs/toast/sonner/index.d.ts.map +0 -1
  551. package/lib/typescript/commonjs/toast/sonner/index.web.d.ts +0 -2
  552. package/lib/typescript/commonjs/toast/sonner/index.web.d.ts.map +0 -1
  553. package/lib/typescript/module/toast/Toast.d.ts +0 -23
  554. package/lib/typescript/module/toast/Toast.d.ts.map +0 -1
  555. package/lib/typescript/module/toast/const.d.ts +0 -2
  556. package/lib/typescript/module/toast/const.d.ts.map +0 -1
  557. package/lib/typescript/module/toast/index.web.d.ts +0 -29
  558. package/lib/typescript/module/toast/index.web.d.ts.map +0 -1
  559. package/lib/typescript/module/toast/sonner/index.d.ts +0 -2
  560. package/lib/typescript/module/toast/sonner/index.d.ts.map +0 -1
  561. package/lib/typescript/module/toast/sonner/index.web.d.ts +0 -2
  562. package/lib/typescript/module/toast/sonner/index.web.d.ts.map +0 -1
  563. package/src/toast/Toast.tsx +0 -269
  564. package/src/toast/const.ts +0 -1
  565. package/src/toast/index.web.tsx +0 -101
  566. package/src/toast/sonner/index.ts +0 -3
  567. package/src/toast/sonner/index.web.ts +0 -3
@@ -0,0 +1,295 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Derived from sonner-native v0.26.4 — src/toast.tsx:440-689
5
+ * (MIT © Gunnar Torfi Steinarsson — see the top-level NOTICE), restyled with
6
+ * Bloom's design tokens and absorbing the surface/text/action styling from
7
+ * Bloom's previous `Toast.tsx`.
8
+ *
9
+ * This is the DEFAULT renderer. A consumer who passes `jsx` (via `toast.custom`)
10
+ * owns the whole row and this file is not involved.
11
+ *
12
+ * W11 — the surface elevation comes from `bloomShadowStyle('s')`, which is a
13
+ * `boxShadow` on web and RN `shadow*`/`elevation` on native. Upstream hardcodes
14
+ * iOS-only `shadowOpacity`/`shadowRadius` values, so its toast has no shadow on
15
+ * web (no `boxShadow`) and none on iOS either (no `shadowColor`).
16
+ */
17
+ import * as React from 'react';
18
+ import { Pressable, StyleSheet, Text, View } from 'react-native';
19
+ import { bloomShadowStyle } from '../design-tokens/shadows';
20
+ import { useInteractionState } from "../hooks/useInteractionState.js";
21
+ import { TimesLarge_Stroke2_Corner0_Rounded as TimesIcon } from "../icons/Times.js";
22
+ import { borderRadius, fontSize, space } from "../styles/tokens.js";
23
+ import { ToastIcon } from "./ToastIcon.js";
24
+ import { useToastColors } from "./use-toast-colors.js";
25
+ import { isToastAction } from "./types.js";
26
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
27
+ export function ToastContent({
28
+ id,
29
+ title,
30
+ description,
31
+ variant,
32
+ icon,
33
+ icons,
34
+ action,
35
+ cancel,
36
+ close,
37
+ closeButton,
38
+ dismissible,
39
+ richColors = false,
40
+ promiseOptions,
41
+ styles: styleOverrides,
42
+ style,
43
+ unstyled,
44
+ onDismiss,
45
+ actionButtonStyle,
46
+ actionButtonTextStyle,
47
+ cancelButtonStyle,
48
+ cancelButtonTextStyle,
49
+ allowFontScaling,
50
+ maxFontSizeMultiplier,
51
+ backgroundComponent
52
+ }) {
53
+ const colors = useToastColors({
54
+ variant,
55
+ richColors
56
+ });
57
+ const isLoading = Boolean(promiseOptions) || variant === 'loading';
58
+ const surfaceStyle = unstyled ? undefined : {
59
+ backgroundColor: colors.surface,
60
+ borderColor: colors.border
61
+ };
62
+ const textProps = {
63
+ allowFontScaling,
64
+ maxFontSizeMultiplier
65
+ };
66
+ return /*#__PURE__*/_jsxs(View, {
67
+ style: [unstyled ? undefined : styles.surface, surfaceStyle,
68
+ // A custom background needs the surface transparent and clipped so it can
69
+ // paint edge to edge underneath the content.
70
+ backgroundComponent ? styles.hostedBackground : undefined, styleOverrides?.toast, style],
71
+ children: [backgroundComponent, /*#__PURE__*/_jsxs(View, {
72
+ style: [unstyled ? undefined : styles.row,
73
+ // With a description the row is tall, so the icon sits at the top
74
+ // instead of being centred against two lines of text.
75
+ unstyled || !description ? undefined : styles.rowWithDescription, backgroundComponent ? styles.aboveBackground : undefined, styleOverrides?.toastContent],
76
+ children: [/*#__PURE__*/_jsx(ToastLeadingIcon, {
77
+ variant: variant,
78
+ icon: icon,
79
+ icons: icons,
80
+ isLoading: isLoading,
81
+ color: colors.icon
82
+ }), /*#__PURE__*/_jsxs(View, {
83
+ style: [styles.textContainer, styleOverrides?.textContainer],
84
+ children: [/*#__PURE__*/_jsx(Text, {
85
+ ...textProps,
86
+ style: [unstyled ? undefined : styles.title, unstyled ? undefined : {
87
+ color: colors.title
88
+ }, styleOverrides?.title],
89
+ children: title
90
+ }), description ? /*#__PURE__*/_jsx(Text, {
91
+ ...textProps,
92
+ style: [unstyled ? undefined : styles.description, unstyled ? undefined : {
93
+ color: colors.description
94
+ }, styleOverrides?.description],
95
+ children: description
96
+ }) : null, action || cancel ? /*#__PURE__*/_jsxs(View, {
97
+ style: [unstyled ? undefined : styles.buttons, styleOverrides?.buttons],
98
+ children: [isToastAction(action) ? /*#__PURE__*/_jsx(ToastActionButton, {
99
+ action: action,
100
+ colors: colors.action,
101
+ buttonStyle: actionButtonStyle,
102
+ textStyle: actionButtonTextStyle,
103
+ ...textProps
104
+ }) : action, isToastAction(cancel) ? /*#__PURE__*/_jsx(ToastActionButton, {
105
+ action: {
106
+ label: cancel.label,
107
+ onClick: () => {
108
+ cancel.onClick();
109
+ onDismiss(id);
110
+ }
111
+ },
112
+ colors: colors.action,
113
+ transparent: true,
114
+ buttonStyle: cancelButtonStyle,
115
+ textStyle: [{
116
+ color: colors.cancelText
117
+ }, cancelButtonTextStyle],
118
+ ...textProps
119
+ }) : cancel]
120
+ }) : null]
121
+ }), /*#__PURE__*/_jsx(ToastCloseButton, {
122
+ id: id,
123
+ close: close,
124
+ closeButton: closeButton,
125
+ dismissible: dismissible,
126
+ color: colors.closeButton,
127
+ onDismiss: onDismiss,
128
+ buttonStyle: styleOverrides?.closeButton,
129
+ iconStyle: styleOverrides?.closeButtonIcon
130
+ })]
131
+ })]
132
+ });
133
+ }
134
+ ToastContent.displayName = 'ToastContent';
135
+ function ToastLeadingIcon({
136
+ variant,
137
+ icon,
138
+ icons,
139
+ isLoading,
140
+ color
141
+ }) {
142
+ if (isLoading) {
143
+ return /*#__PURE__*/_jsx(_Fragment, {
144
+ children: icons.loading ?? /*#__PURE__*/_jsx(ToastIcon, {
145
+ variant: "loading",
146
+ color: color
147
+ })
148
+ });
149
+ }
150
+ if (icon) {
151
+ return /*#__PURE__*/_jsx(_Fragment, {
152
+ children: icon
153
+ });
154
+ }
155
+ if (variant && icons[variant]) {
156
+ return /*#__PURE__*/_jsx(_Fragment, {
157
+ children: icons[variant]
158
+ });
159
+ }
160
+ return /*#__PURE__*/_jsx(ToastIcon, {
161
+ variant: variant,
162
+ color: color
163
+ });
164
+ }
165
+ function ToastActionButton({
166
+ action,
167
+ colors,
168
+ transparent,
169
+ buttonStyle,
170
+ textStyle,
171
+ allowFontScaling,
172
+ maxFontSizeMultiplier
173
+ }) {
174
+ // Driven from state rather than Pressable's function-form `style`, which
175
+ // react-native-css swallows on web (dropping the base padding/radius).
176
+ const {
177
+ state: pressed,
178
+ onIn,
179
+ onOut
180
+ } = useInteractionState();
181
+ return /*#__PURE__*/_jsx(Pressable, {
182
+ onPress: action.onClick,
183
+ onPressIn: onIn,
184
+ onPressOut: onOut,
185
+ accessibilityRole: "button",
186
+ style: [styles.actionButton, transparent ? undefined : {
187
+ backgroundColor: pressed ? colors.pressedBackground : colors.background
188
+ }, buttonStyle],
189
+ children: /*#__PURE__*/_jsx(Text, {
190
+ numberOfLines: 1,
191
+ allowFontScaling: allowFontScaling,
192
+ maxFontSizeMultiplier: maxFontSizeMultiplier,
193
+ style: [styles.actionButtonText, {
194
+ color: pressed ? colors.pressedText : colors.text
195
+ }, textStyle],
196
+ children: action.label
197
+ })
198
+ });
199
+ }
200
+ function ToastCloseButton({
201
+ id,
202
+ close,
203
+ closeButton,
204
+ dismissible,
205
+ color,
206
+ onDismiss,
207
+ buttonStyle,
208
+ iconStyle
209
+ }) {
210
+ const handlePress = React.useCallback(() => {
211
+ onDismiss(id);
212
+ }, [onDismiss, id]);
213
+ if (!dismissible) {
214
+ return null;
215
+ }
216
+ if (close) {
217
+ return /*#__PURE__*/_jsx(_Fragment, {
218
+ children: close
219
+ });
220
+ }
221
+ if (!closeButton) {
222
+ return null;
223
+ }
224
+ return /*#__PURE__*/_jsx(Pressable, {
225
+ onPress: handlePress,
226
+ hitSlop: CLOSE_BUTTON_HIT_SLOP,
227
+ accessibilityRole: "button",
228
+ style: buttonStyle,
229
+ children: /*#__PURE__*/_jsx(TimesIcon, {
230
+ size: "md",
231
+ fill: color,
232
+ style: iconStyle
233
+ })
234
+ });
235
+ }
236
+ const CLOSE_BUTTON_HIT_SLOP = 10;
237
+ const styles = StyleSheet.create({
238
+ surface: {
239
+ justifyContent: 'center',
240
+ paddingHorizontal: space.lg,
241
+ paddingVertical: space.md,
242
+ marginHorizontal: space.lg,
243
+ borderRadius: borderRadius.md,
244
+ borderWidth: StyleSheet.hairlineWidth,
245
+ ...bloomShadowStyle('s')
246
+ },
247
+ hostedBackground: {
248
+ overflow: 'hidden',
249
+ backgroundColor: 'transparent'
250
+ },
251
+ aboveBackground: {
252
+ position: 'relative',
253
+ zIndex: 1
254
+ },
255
+ row: {
256
+ flexDirection: 'row',
257
+ alignItems: 'center',
258
+ gap: space.md
259
+ },
260
+ rowWithDescription: {
261
+ alignItems: 'flex-start'
262
+ },
263
+ textContainer: {
264
+ flex: 1
265
+ },
266
+ title: {
267
+ fontSize: fontSize.md,
268
+ fontWeight: '600',
269
+ lineHeight: 20
270
+ },
271
+ description: {
272
+ fontSize: fontSize.sm,
273
+ lineHeight: 20,
274
+ marginTop: space._2xs
275
+ },
276
+ buttons: {
277
+ flexDirection: 'row',
278
+ alignItems: 'center',
279
+ gap: space.sm,
280
+ marginTop: space.md
281
+ },
282
+ actionButton: {
283
+ flexGrow: 0,
284
+ alignSelf: 'flex-start',
285
+ paddingHorizontal: space.md,
286
+ paddingVertical: space.xs,
287
+ borderRadius: borderRadius.sm
288
+ },
289
+ actionButtonText: {
290
+ fontSize: fontSize.sm,
291
+ fontWeight: '600',
292
+ lineHeight: 20
293
+ }
294
+ });
295
+ //# sourceMappingURL=ToastContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Pressable","StyleSheet","Text","View","bloomShadowStyle","useInteractionState","TimesLarge_Stroke2_Corner0_Rounded","TimesIcon","borderRadius","fontSize","space","ToastIcon","useToastColors","isToastAction","jsx","_jsx","jsxs","_jsxs","Fragment","_Fragment","ToastContent","id","title","description","variant","icon","icons","action","cancel","close","closeButton","dismissible","richColors","promiseOptions","styles","styleOverrides","style","unstyled","onDismiss","actionButtonStyle","actionButtonTextStyle","cancelButtonStyle","cancelButtonTextStyle","allowFontScaling","maxFontSizeMultiplier","backgroundComponent","colors","isLoading","Boolean","surfaceStyle","undefined","backgroundColor","surface","borderColor","border","textProps","hostedBackground","toast","children","row","rowWithDescription","aboveBackground","toastContent","ToastLeadingIcon","color","textContainer","buttons","ToastActionButton","buttonStyle","textStyle","label","onClick","transparent","cancelText","ToastCloseButton","iconStyle","closeButtonIcon","displayName","loading","state","pressed","onIn","onOut","onPress","onPressIn","onPressOut","accessibilityRole","actionButton","pressedBackground","background","numberOfLines","actionButtonText","pressedText","text","handlePress","useCallback","hitSlop","CLOSE_BUTTON_HIT_SLOP","size","fill","create","justifyContent","paddingHorizontal","lg","paddingVertical","md","marginHorizontal","borderWidth","hairlineWidth","overflow","position","zIndex","flexDirection","alignItems","gap","flex","fontWeight","lineHeight","sm","marginTop","_2xs","flexGrow","alignSelf","xs"],"sourceRoot":"../../../src","sources":["toast/ToastContent.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,SAAS,EACTC,UAAU,EACVC,IAAI,EACJC,IAAI,QAGC,cAAc;AAErB,SAASC,gBAAgB,QAAQ,0BAA0B;AAC3D,SAASC,mBAAmB,QAAQ,iCAA8B;AAClE,SAASC,kCAAkC,IAAIC,SAAS,QAAQ,mBA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C,QAAQ,EAAE,CAAC;IACXC,SAAS,EAAE,YAAY;IACvBpB,iBAAiB,EAAE5F,KAAK,CAAC+F,EAAE;IAC3BD,eAAe,EAAE9F,KAAK,CAACiH,EAAE;IACzBnH,YAAY,EAAEA,YAAY,CAAC8G;EAC7B,CAAC;EACD3B,gBAAgB,EAAE;IAChBlF,QAAQ,EAAEA,QAAQ,CAAC6G,EAAE;IACrBF,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Bloom-original — the WEB / default toast host. Metro selects
5
+ * `ToastHost.native.tsx` on iOS and Android; every other bundler (and a
6
+ * consumer's `tsc`) sees this file, matching the `.native` split convention
7
+ * `design-tokens/shadows.ts` already uses.
8
+ *
9
+ * Two jobs, both of which are why the rest of the engine can stay universal:
10
+ *
11
+ * - W7: it portals into `#bloom-portal-root` and provides a `position: fixed`,
12
+ * full-viewport containing block. `Positioner`'s `position: 'absolute'` would
13
+ * otherwise anchor to the nearest positioned ancestor — react-native-web's
14
+ * `View` defaults to `relative`, so a deeply-mounted outlet would anchor to a
15
+ * provider somewhere in the tree instead of the viewport. A `Positioner.web`
16
+ * with `position: fixed` would NOT be enough: `fixed` is still contained by any
17
+ * ancestor `transform`/`filter`/`contain`, which is exactly why `Dialog` and
18
+ * `BottomSheet` portal too. Sharing the one portal root also keeps a single
19
+ * document-level overlay layer rather than a second competing one.
20
+ * - W8: portaled content sits outside the app-root `GestureHandlerRootView`, so
21
+ * swipe-to-dismiss would never receive touches. This provides its own, exactly
22
+ * as `bottom-sheet/index.web.tsx` does. Web consumers need no setup.
23
+ *
24
+ * `pointerEvents: 'box-none'` keeps the empty area click-through while the rows
25
+ * themselves stay interactive.
26
+ */
27
+ import * as React from 'react';
28
+ import { StyleSheet } from 'react-native';
29
+ import { GestureHandlerRootView } from 'react-native-gesture-handler';
30
+ import { Portal } from "../portal/index.web.js";
31
+ import { WEB_POSITION_FIXED } from "../styles/web-view-style.js";
32
+ import { Z_INDEX } from "../styles/z-index.js";
33
+ import { jsx as _jsx } from "react/jsx-runtime";
34
+ export function ToastHost({
35
+ children,
36
+ ToasterOverlayWrapper
37
+ }) {
38
+ const content = /*#__PURE__*/_jsx(GestureHandlerRootView, {
39
+ style: styles.host,
40
+ children: children
41
+ });
42
+ return /*#__PURE__*/_jsx(Portal, {
43
+ children: ToasterOverlayWrapper ? /*#__PURE__*/_jsx(ToasterOverlayWrapper, {
44
+ children: content
45
+ }) : content
46
+ });
47
+ }
48
+ ToastHost.displayName = 'ToastHost';
49
+ const styles = StyleSheet.create({
50
+ host: {
51
+ // Full-viewport containing block for `Positioner`'s `position: 'absolute'`.
52
+ position: WEB_POSITION_FIXED,
53
+ top: 0,
54
+ left: 0,
55
+ right: 0,
56
+ bottom: 0,
57
+ // Inside `#bloom-portal-root` (which owns the document layer at 999999),
58
+ // this keeps toasts above Dialog's surface (60) and tooltips (70).
59
+ zIndex: Z_INDEX.toast,
60
+ pointerEvents: 'box-none'
61
+ }
62
+ });
63
+ //# sourceMappingURL=ToastHost.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","StyleSheet","GestureHandlerRootView","Portal","WEB_POSITION_FIXED","Z_INDEX","jsx","_jsx","ToastHost","children","ToasterOverlayWrapper","content","style","styles","host","displayName","create","position","top","left","right","bottom","zIndex","toast","pointerEvents"],"sourceRoot":"../../../src","sources":["toast/ToastHost.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,sBAAsB,QAAQ,8BAA8B;AAErE,SAASC,MAAM,QAAQ,wBAAqB;AAC5C,SAASC,kBAAkB,QAAQ,6BAA0B;AAC7D,SAASC,OAAO,QAAQ,sBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAG5C,OAAO,SAASC,SAASA,CAAC;EAAEC,QAAQ;EAAEC;AAAsC,CAAC,EAAE;EAC7E,MAAMC,OAAO,gBACXJ,IAAA,CAACL,sBAAsB;IAACU,KAAK,EAAEC,MAAM,CAACC,IAAK;IAAAL,QAAA,EACxCA;EAAQ,CACa,CACzB;EAED,oBACEF,IAAA,CAACJ,MAAM;IAAAM,QAAA,EACJC,qBAAqB,gBACpBH,IAAA,CAACG,qBAAqB;MAAAD,QAAA,EAAEE;IAAO,CAAwB,CAAC,GAExDA;EACD,CACK,CAAC;AAEb;AAEAH,SAAS,CAACO,WAAW,GAAG,WAAW;AAEnC,MAAMF,MAAM,GAAGZ,UAAU,CAACe,MAAM,CAAC;EAC/BF,IAAI,EAAE;IACJ;IACAG,QAAQ,EAAEb,kBAAkB;IAC5Bc,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACT;IACA;IACAC,MAAM,EAAEjB,OAAO,CAACkB,KAAK;IACrBC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Bloom-original — the NATIVE toast host. Metro selects this file; every other
5
+ * bundler resolves the sibling `ToastHost.tsx` (web/default).
6
+ *
7
+ * On native the rows render inline in the app's own view hierarchy, which is what
8
+ * makes them respect the safe area and the app-root `GestureHandlerRootView` that
9
+ * consumers already mount. So there is nothing to portal — the host only applies
10
+ * the optional overlay wrapper.
11
+ *
12
+ * `react-native-screens` is deliberately NOT imported (D6). Upstream statically
13
+ * imports `FullWindowOverlay` from it, an undeclared dependency that only works
14
+ * because apps happen to install it. A consumer who needs a toast above a native
15
+ * iOS modal injects it themselves:
16
+ *
17
+ * ```tsx
18
+ * import { FullWindowOverlay } from 'react-native-screens';
19
+ * <ToastOutlet ToasterOverlayWrapper={FullWindowOverlay} />
20
+ * ```
21
+ */
22
+ import * as React from 'react';
23
+ import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
24
+ export function ToastHost({
25
+ children,
26
+ ToasterOverlayWrapper
27
+ }) {
28
+ if (ToasterOverlayWrapper) {
29
+ return /*#__PURE__*/_jsx(ToasterOverlayWrapper, {
30
+ children: children
31
+ });
32
+ }
33
+ return /*#__PURE__*/_jsx(_Fragment, {
34
+ children: children
35
+ });
36
+ }
37
+ ToastHost.displayName = 'ToastHost';
38
+ //# sourceMappingURL=ToastHost.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","jsx","_jsx","Fragment","_Fragment","ToastHost","children","ToasterOverlayWrapper","displayName"],"sourceRoot":"../../../src","sources":["toast/ToastHost.native.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA;AAI/B,OAAO,SAASC,SAASA,CAAC;EAAEC,QAAQ;EAAEC;AAAsC,CAAC,EAAE;EAC7E,IAAIA,qBAAqB,EAAE;IACzB,oBAAOL,IAAA,CAACK,qBAAqB;MAAAD,QAAA,EAAEA;IAAQ,CAAwB,CAAC;EAClE;EACA,oBAAOJ,IAAA,CAAAE,SAAA;IAAAE,QAAA,EAAGA;EAAQ,CAAG,CAAC;AACxB;AAEAD,SAAS,CAACG,WAAW,GAAG,WAAW","ignoreList":[]}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Replaces sonner-native v0.26.4's `src/icons.tsx` (MIT © Gunnar Torfi
5
+ * Steinarsson — see the top-level NOTICE), which ships its own inline SVG paths
6
+ * and imports `react-native-svg` directly. Bloom maps variants onto its own icon
7
+ * set instead, so the toast picks up icon changes with the rest of the library.
8
+ *
9
+ * The spinner is RN's `ActivityIndicator` rather than Bloom's `Loading`: the
10
+ * `./loading` subpath is web-forked, so importing it from this universal file
11
+ * would resolve to the native (Reanimated) build under bundlers that do not
12
+ * apply `.web` extension resolution, and to the web build under those that do —
13
+ * platform-dependent behaviour from one import. `ActivityIndicator` is universal
14
+ * (react-native-web renders a CSS-animated SVG, so nothing depends on a
15
+ * Reanimated mapper ticking on web) and a consumer who wants Bloom's spinner can
16
+ * still pass `icons={{ loading: <Loading … /> }}` on the outlet.
17
+ */
18
+ import { ActivityIndicator } from 'react-native';
19
+ import { CircleCheck_Stroke2_Corner0_Rounded as CircleCheckIcon } from "../icons/CircleCheck.js";
20
+ import { CircleInfo_Stroke2_Corner0_Rounded as CircleInfoIcon } from "../icons/CircleInfo.js";
21
+ import { CircleX_Stroke2_Corner0_Rounded as CircleXIcon } from "../icons/CircleX.js";
22
+ import { Warning_Stroke2_Corner0_Rounded as WarningIcon } from "../icons/Warning.js";
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+ const ICON_MAP = {
25
+ success: CircleCheckIcon,
26
+ error: CircleXIcon,
27
+ warning: WarningIcon,
28
+ info: CircleInfoIcon
29
+ };
30
+ export function ToastIcon({
31
+ variant,
32
+ color
33
+ }) {
34
+ // No variant means a neutral toast, which carries no icon of its own — a
35
+ // caller who wants one passes `icon`.
36
+ if (!variant) {
37
+ return null;
38
+ }
39
+ if (variant === 'loading') {
40
+ return /*#__PURE__*/_jsx(ActivityIndicator, {
41
+ size: "small",
42
+ color: color
43
+ });
44
+ }
45
+ const Icon = ICON_MAP[variant];
46
+ return /*#__PURE__*/_jsx(Icon, {
47
+ fill: color,
48
+ size: "md"
49
+ });
50
+ }
51
+ ToastIcon.displayName = 'ToastIcon';
52
+ //# sourceMappingURL=ToastIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["ActivityIndicator","CircleCheck_Stroke2_Corner0_Rounded","CircleCheckIcon","CircleInfo_Stroke2_Corner0_Rounded","CircleInfoIcon","CircleX_Stroke2_Corner0_Rounded","CircleXIcon","Warning_Stroke2_Corner0_Rounded","WarningIcon","jsx","_jsx","ICON_MAP","success","error","warning","info","ToastIcon","variant","color","size","Icon","fill","displayName"],"sourceRoot":"../../../src","sources":["toast/ToastIcon.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,iBAAiB,QAAQ,cAAc;AAEhD,SAASC,mCAAmC,IAAIC,eAAe,QAAQ,yBAAsB;AAC7F,SAASC,kCAAkC,IAAIC,cAAc,QAAQ,wBAAqB;AAC1F,SAASC,+BAA+B,IAAIC,WAAW,QAAQ,qBAAkB;AACjF,SAASC,+BAA+B,IAAIC,WAAW,QAAQ,qBAAkB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAGlF,MAAMC,QAGL,GAAG;EACFC,OAAO,EAAEV,eAAe;EACxBW,KAAK,EAAEP,WAAW;EAClBQ,OAAO,EAAEN,WAAW;EACpBO,IAAI,EAAEX;AACR,CAAC;AAED,OAAO,SAASY,SAASA,CAAC;EACxBC,OAAO;EACPC;AAIF,CAAC,EAAE;EACD;EACA;EACA,IAAI,CAACD,OAAO,EAAE;IACZ,OAAO,IAAI;EACb;EAEA,IAAIA,OAAO,KAAK,SAAS,EAAE;IACzB,oBAAOP,IAAA,CAACV,iBAAiB;MAACmB,IAAI,EAAC,OAAO;MAACD,KAAK,EAAEA;IAAM,CAAE,CAAC;EACzD;EAEA,MAAME,IAAI,GAAGT,QAAQ,CAACM,OAAO,CAAC;EAC9B,oBAAOP,IAAA,CAACU,IAAI;IAACC,IAAI,EAAEH,KAAM;IAACC,IAAI,EAAC;EAAI,CAAE,CAAC;AACxC;AAEAH,SAAS,CAACM,WAAW,GAAG,WAAW","ignoreList":[]}