@oxyhq/bloom 0.50.1 → 0.51.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 (571) 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 +5 -3
  6. package/lib/commonjs/bottom-sheet/index.web.js.map +1 -1
  7. package/lib/commonjs/context-menu/index.web.js +6 -9
  8. package/lib/commonjs/context-menu/index.web.js.map +1 -1
  9. package/lib/commonjs/dialog/Dialog.js +12 -7
  10. package/lib/commonjs/dialog/Dialog.js.map +1 -1
  11. package/lib/commonjs/dialog/Dialog.web.js +18 -22
  12. package/lib/commonjs/dialog/Dialog.web.js.map +1 -1
  13. package/lib/commonjs/dialog/DialogHeader.js +61 -12
  14. package/lib/commonjs/dialog/DialogHeader.js.map +1 -1
  15. package/lib/commonjs/index.js +90 -83
  16. package/lib/commonjs/index.js.map +1 -1
  17. package/lib/commonjs/index.web.js +116 -109
  18. package/lib/commonjs/index.web.js.map +1 -1
  19. package/lib/commonjs/menu/index.web.js +5 -8
  20. package/lib/commonjs/menu/index.web.js.map +1 -1
  21. package/lib/commonjs/popover/index.web.js +8 -9
  22. package/lib/commonjs/popover/index.web.js.map +1 -1
  23. package/lib/commonjs/portal/index.js +4 -1
  24. package/lib/commonjs/portal/index.js.map +1 -1
  25. package/lib/commonjs/progressive-blur/index.js +79 -0
  26. package/lib/commonjs/progressive-blur/index.js.map +1 -0
  27. package/lib/commonjs/progressive-blur/index.web.js +67 -0
  28. package/lib/commonjs/progressive-blur/index.web.js.map +1 -0
  29. package/lib/commonjs/progressive-blur/shared.js +66 -0
  30. package/lib/commonjs/progressive-blur/shared.js.map +1 -0
  31. package/lib/commonjs/progressive-blur/types.js +6 -0
  32. package/lib/commonjs/progressive-blur/types.js.map +1 -0
  33. package/lib/commonjs/select/index.web.js +5 -8
  34. package/lib/commonjs/select/index.web.js.map +1 -1
  35. package/lib/commonjs/slider/Slider.js +4 -9
  36. package/lib/commonjs/slider/Slider.js.map +1 -1
  37. package/lib/commonjs/styles/web-view-style.js +26 -0
  38. package/lib/commonjs/styles/web-view-style.js.map +1 -0
  39. package/lib/commonjs/switch/Switch.js +4 -8
  40. package/lib/commonjs/switch/Switch.js.map +1 -1
  41. package/lib/commonjs/tab-bar/TabBarBase.js +415 -0
  42. package/lib/commonjs/tab-bar/TabBarBase.js.map +1 -0
  43. package/lib/commonjs/tab-bar/expo-router/RouterTabBar.js +83 -0
  44. package/lib/commonjs/tab-bar/expo-router/RouterTabBar.js.map +1 -0
  45. package/lib/commonjs/tab-bar/expo-router/fading-tab-screen.js +119 -0
  46. package/lib/commonjs/tab-bar/expo-router/fading-tab-screen.js.map +1 -0
  47. package/lib/commonjs/tab-bar/expo-router/index.js +26 -0
  48. package/lib/commonjs/tab-bar/expo-router/index.js.map +1 -0
  49. package/lib/commonjs/tab-bar/glyph.js +43 -0
  50. package/lib/commonjs/tab-bar/glyph.js.map +1 -0
  51. package/lib/commonjs/tab-bar/glyph.native.js +55 -0
  52. package/lib/commonjs/tab-bar/glyph.native.js.map +1 -0
  53. package/lib/commonjs/tab-bar/index.js +65 -0
  54. package/lib/commonjs/tab-bar/index.js.map +1 -0
  55. package/lib/commonjs/tab-bar/index.web.js +67 -0
  56. package/lib/commonjs/tab-bar/index.web.js.map +1 -0
  57. package/lib/commonjs/tab-bar/minimize-context.js +127 -0
  58. package/lib/commonjs/tab-bar/minimize-context.js.map +1 -0
  59. package/lib/commonjs/tab-bar/shared.js +139 -0
  60. package/lib/commonjs/tab-bar/shared.js.map +1 -0
  61. package/lib/commonjs/tab-bar/surface.js +50 -0
  62. package/lib/commonjs/tab-bar/surface.js.map +1 -0
  63. package/lib/commonjs/tab-bar/surface.native.js +56 -0
  64. package/lib/commonjs/tab-bar/surface.native.js.map +1 -0
  65. package/lib/commonjs/tab-bar/surface.web.js +59 -0
  66. package/lib/commonjs/tab-bar/surface.web.js.map +1 -0
  67. package/lib/commonjs/tab-bar/types.js +6 -0
  68. package/lib/commonjs/tab-bar/types.js.map +1 -0
  69. package/lib/commonjs/tabs/Tabs.js +3 -8
  70. package/lib/commonjs/tabs/Tabs.js.map +1 -1
  71. package/lib/commonjs/toast/Positioner.js +117 -0
  72. package/lib/commonjs/toast/Positioner.js.map +1 -0
  73. package/lib/commonjs/toast/ToastContent.js +301 -0
  74. package/lib/commonjs/toast/ToastContent.js.map +1 -0
  75. package/lib/commonjs/toast/ToastHost.js +69 -0
  76. package/lib/commonjs/toast/ToastHost.js.map +1 -0
  77. package/lib/commonjs/toast/ToastHost.native.js +44 -0
  78. package/lib/commonjs/toast/ToastHost.native.js.map +1 -0
  79. package/lib/commonjs/toast/ToastIcon.js +57 -0
  80. package/lib/commonjs/toast/ToastIcon.js.map +1 -0
  81. package/lib/commonjs/toast/ToastRow.js +411 -0
  82. package/lib/commonjs/toast/ToastRow.js.map +1 -0
  83. package/lib/commonjs/toast/ToastSwipeHandler.js +189 -0
  84. package/lib/commonjs/toast/ToastSwipeHandler.js.map +1 -0
  85. package/lib/commonjs/toast/Toaster.js +205 -0
  86. package/lib/commonjs/toast/Toaster.js.map +1 -0
  87. package/lib/commonjs/toast/animations.js +274 -0
  88. package/lib/commonjs/toast/animations.js.map +1 -0
  89. package/lib/commonjs/toast/constants.js +56 -0
  90. package/lib/commonjs/toast/constants.js.map +1 -0
  91. package/lib/commonjs/toast/context.js +42 -0
  92. package/lib/commonjs/toast/context.js.map +1 -0
  93. package/lib/commonjs/toast/index.js +32 -126
  94. package/lib/commonjs/toast/index.js.map +1 -1
  95. package/lib/commonjs/toast/position-utils.js +115 -0
  96. package/lib/commonjs/toast/position-utils.js.map +1 -0
  97. package/lib/commonjs/toast/positioner-utils.js +141 -0
  98. package/lib/commonjs/toast/positioner-utils.js.map +1 -0
  99. package/lib/commonjs/toast/toast-comparator.js +28 -0
  100. package/lib/commonjs/toast/toast-comparator.js.map +1 -0
  101. package/lib/commonjs/toast/toast-fns.js +90 -0
  102. package/lib/commonjs/toast/toast-fns.js.map +1 -0
  103. package/lib/commonjs/toast/toast-store.js +352 -0
  104. package/lib/commonjs/toast/toast-store.js.map +1 -0
  105. package/lib/commonjs/toast/toast-timers.js +110 -0
  106. package/lib/commonjs/toast/toast-timers.js.map +1 -0
  107. package/lib/commonjs/toast/types.js +42 -0
  108. package/lib/commonjs/toast/types.js.map +1 -1
  109. package/lib/commonjs/toast/use-animated-target.js +57 -0
  110. package/lib/commonjs/toast/use-animated-target.js.map +1 -0
  111. package/lib/commonjs/toast/use-app-state.js +76 -0
  112. package/lib/commonjs/toast/use-app-state.js.map +1 -0
  113. package/lib/commonjs/toast/use-toast-colors.js +114 -0
  114. package/lib/commonjs/toast/use-toast-colors.js.map +1 -0
  115. package/lib/commonjs/toast/use-toast-position.js +40 -0
  116. package/lib/commonjs/toast/use-toast-position.js.map +1 -0
  117. package/lib/commonjs/tooltip/index.web.js +2 -1
  118. package/lib/commonjs/tooltip/index.web.js.map +1 -1
  119. package/lib/commonjs/zoomable-image-gallery/ZoomableImageGallery.js +20 -8
  120. package/lib/commonjs/zoomable-image-gallery/ZoomableImageGallery.js.map +1 -1
  121. package/lib/module/avatar-group/AvatarGroup.web.js +2 -1
  122. package/lib/module/avatar-group/AvatarGroup.web.js.map +1 -1
  123. package/lib/module/bottom-sheet/index.web.js +5 -3
  124. package/lib/module/bottom-sheet/index.web.js.map +1 -1
  125. package/lib/module/context-menu/index.web.js +6 -9
  126. package/lib/module/context-menu/index.web.js.map +1 -1
  127. package/lib/module/dialog/Dialog.js +12 -7
  128. package/lib/module/dialog/Dialog.js.map +1 -1
  129. package/lib/module/dialog/Dialog.web.js +18 -22
  130. package/lib/module/dialog/Dialog.web.js.map +1 -1
  131. package/lib/module/dialog/DialogHeader.js +61 -12
  132. package/lib/module/dialog/DialogHeader.js.map +1 -1
  133. package/lib/module/index.js +3 -2
  134. package/lib/module/index.js.map +1 -1
  135. package/lib/module/index.web.js +3 -2
  136. package/lib/module/index.web.js.map +1 -1
  137. package/lib/module/menu/index.web.js +5 -8
  138. package/lib/module/menu/index.web.js.map +1 -1
  139. package/lib/module/popover/index.web.js +8 -9
  140. package/lib/module/popover/index.web.js.map +1 -1
  141. package/lib/module/portal/index.js +4 -1
  142. package/lib/module/portal/index.js.map +1 -1
  143. package/lib/module/progressive-blur/index.js +74 -0
  144. package/lib/module/progressive-blur/index.js.map +1 -0
  145. package/lib/module/progressive-blur/index.web.js +62 -0
  146. package/lib/module/progressive-blur/index.web.js.map +1 -0
  147. package/lib/module/progressive-blur/shared.js +60 -0
  148. package/lib/module/progressive-blur/shared.js.map +1 -0
  149. package/lib/module/progressive-blur/types.js +4 -0
  150. package/lib/module/progressive-blur/types.js.map +1 -0
  151. package/lib/module/select/index.web.js +5 -8
  152. package/lib/module/select/index.web.js.map +1 -1
  153. package/lib/module/slider/Slider.js +4 -9
  154. package/lib/module/slider/Slider.js.map +1 -1
  155. package/lib/module/styles/web-view-style.js +22 -0
  156. package/lib/module/styles/web-view-style.js.map +1 -0
  157. package/lib/module/switch/Switch.js +4 -8
  158. package/lib/module/switch/Switch.js.map +1 -1
  159. package/lib/module/tab-bar/TabBarBase.js +408 -0
  160. package/lib/module/tab-bar/TabBarBase.js.map +1 -0
  161. package/lib/module/tab-bar/expo-router/RouterTabBar.js +78 -0
  162. package/lib/module/tab-bar/expo-router/RouterTabBar.js.map +1 -0
  163. package/lib/module/tab-bar/expo-router/fading-tab-screen.js +113 -0
  164. package/lib/module/tab-bar/expo-router/fading-tab-screen.js.map +1 -0
  165. package/lib/module/tab-bar/expo-router/index.js +15 -0
  166. package/lib/module/tab-bar/expo-router/index.js.map +1 -0
  167. package/lib/module/tab-bar/glyph.js +38 -0
  168. package/lib/module/tab-bar/glyph.js.map +1 -0
  169. package/lib/module/tab-bar/glyph.native.js +50 -0
  170. package/lib/module/tab-bar/glyph.native.js.map +1 -0
  171. package/lib/module/tab-bar/index.js +24 -0
  172. package/lib/module/tab-bar/index.js.map +1 -0
  173. package/lib/module/tab-bar/index.web.js +26 -0
  174. package/lib/module/tab-bar/index.web.js.map +1 -0
  175. package/lib/module/tab-bar/minimize-context.js +118 -0
  176. package/lib/module/tab-bar/minimize-context.js.map +1 -0
  177. package/lib/module/tab-bar/shared.js +132 -0
  178. package/lib/module/tab-bar/shared.js.map +1 -0
  179. package/lib/module/tab-bar/surface.js +44 -0
  180. package/lib/module/tab-bar/surface.js.map +1 -0
  181. package/lib/module/tab-bar/surface.native.js +50 -0
  182. package/lib/module/tab-bar/surface.native.js.map +1 -0
  183. package/lib/module/tab-bar/surface.web.js +53 -0
  184. package/lib/module/tab-bar/surface.web.js.map +1 -0
  185. package/lib/module/tab-bar/types.js +4 -0
  186. package/lib/module/tab-bar/types.js.map +1 -0
  187. package/lib/module/tabs/Tabs.js +3 -8
  188. package/lib/module/tabs/Tabs.js.map +1 -1
  189. package/lib/module/toast/Positioner.js +110 -0
  190. package/lib/module/toast/Positioner.js.map +1 -0
  191. package/lib/module/toast/ToastContent.js +295 -0
  192. package/lib/module/toast/ToastContent.js.map +1 -0
  193. package/lib/module/toast/ToastHost.js +63 -0
  194. package/lib/module/toast/ToastHost.js.map +1 -0
  195. package/lib/module/toast/ToastHost.native.js +38 -0
  196. package/lib/module/toast/ToastHost.native.js.map +1 -0
  197. package/lib/module/toast/ToastIcon.js +52 -0
  198. package/lib/module/toast/ToastIcon.js.map +1 -0
  199. package/lib/module/toast/ToastRow.js +407 -0
  200. package/lib/module/toast/ToastRow.js.map +1 -0
  201. package/lib/module/toast/ToastSwipeHandler.js +182 -0
  202. package/lib/module/toast/ToastSwipeHandler.js.map +1 -0
  203. package/lib/module/toast/Toaster.js +198 -0
  204. package/lib/module/toast/Toaster.js.map +1 -0
  205. package/lib/module/toast/animations.js +261 -0
  206. package/lib/module/toast/animations.js.map +1 -0
  207. package/lib/module/toast/constants.js +52 -0
  208. package/lib/module/toast/constants.js.map +1 -0
  209. package/lib/module/toast/context.js +34 -0
  210. package/lib/module/toast/context.js.map +1 -0
  211. package/lib/module/toast/index.js +27 -103
  212. package/lib/module/toast/index.js.map +1 -1
  213. package/lib/module/toast/position-utils.js +107 -0
  214. package/lib/module/toast/position-utils.js.map +1 -0
  215. package/lib/module/toast/positioner-utils.js +134 -0
  216. package/lib/module/toast/positioner-utils.js.map +1 -0
  217. package/lib/module/toast/toast-comparator.js +22 -0
  218. package/lib/module/toast/toast-comparator.js.map +1 -0
  219. package/lib/module/toast/toast-fns.js +85 -0
  220. package/lib/module/toast/toast-fns.js.map +1 -0
  221. package/lib/module/toast/toast-store.js +346 -0
  222. package/lib/module/toast/toast-store.js.map +1 -0
  223. package/lib/module/toast/toast-timers.js +104 -0
  224. package/lib/module/toast/toast-timers.js.map +1 -0
  225. package/lib/module/toast/types.js +38 -0
  226. package/lib/module/toast/types.js.map +1 -1
  227. package/lib/module/toast/use-animated-target.js +52 -0
  228. package/lib/module/toast/use-animated-target.js.map +1 -0
  229. package/lib/module/toast/use-app-state.js +70 -0
  230. package/lib/module/toast/use-app-state.js.map +1 -0
  231. package/lib/module/toast/use-toast-colors.js +109 -0
  232. package/lib/module/toast/use-toast-colors.js.map +1 -0
  233. package/lib/module/toast/use-toast-position.js +35 -0
  234. package/lib/module/toast/use-toast-position.js.map +1 -0
  235. package/lib/module/tooltip/index.web.js +2 -1
  236. package/lib/module/tooltip/index.web.js.map +1 -1
  237. package/lib/module/zoomable-image-gallery/ZoomableImageGallery.js +20 -8
  238. package/lib/module/zoomable-image-gallery/ZoomableImageGallery.js.map +1 -1
  239. package/lib/typescript/commonjs/avatar-group/AvatarGroup.web.d.ts.map +1 -1
  240. package/lib/typescript/commonjs/bottom-sheet/index.web.d.ts.map +1 -1
  241. package/lib/typescript/commonjs/context-menu/index.web.d.ts.map +1 -1
  242. package/lib/typescript/commonjs/dialog/Dialog.d.ts.map +1 -1
  243. package/lib/typescript/commonjs/dialog/Dialog.web.d.ts.map +1 -1
  244. package/lib/typescript/commonjs/dialog/DialogHeader.d.ts.map +1 -1
  245. package/lib/typescript/commonjs/index.d.ts +2 -1
  246. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  247. package/lib/typescript/commonjs/index.web.d.ts +2 -1
  248. package/lib/typescript/commonjs/index.web.d.ts.map +1 -1
  249. package/lib/typescript/commonjs/menu/index.web.d.ts.map +1 -1
  250. package/lib/typescript/commonjs/popover/index.web.d.ts.map +1 -1
  251. package/lib/typescript/commonjs/portal/index.d.ts.map +1 -1
  252. package/lib/typescript/commonjs/progressive-blur/index.d.ts +23 -0
  253. package/lib/typescript/commonjs/progressive-blur/index.d.ts.map +1 -0
  254. package/lib/typescript/commonjs/progressive-blur/index.web.d.ts +30 -0
  255. package/lib/typescript/commonjs/progressive-blur/index.web.d.ts.map +1 -0
  256. package/lib/typescript/commonjs/progressive-blur/shared.d.ts +35 -0
  257. package/lib/typescript/commonjs/progressive-blur/shared.d.ts.map +1 -0
  258. package/lib/typescript/commonjs/progressive-blur/types.d.ts +21 -0
  259. package/lib/typescript/commonjs/progressive-blur/types.d.ts.map +1 -0
  260. package/lib/typescript/commonjs/select/index.web.d.ts.map +1 -1
  261. package/lib/typescript/commonjs/slider/Slider.d.ts.map +1 -1
  262. package/lib/typescript/commonjs/styles/web-view-style.d.ts +21 -0
  263. package/lib/typescript/commonjs/styles/web-view-style.d.ts.map +1 -0
  264. package/lib/typescript/commonjs/switch/Switch.d.ts.map +1 -1
  265. package/lib/typescript/commonjs/tab-bar/TabBarBase.d.ts +36 -0
  266. package/lib/typescript/commonjs/tab-bar/TabBarBase.d.ts.map +1 -0
  267. package/lib/typescript/commonjs/tab-bar/expo-router/RouterTabBar.d.ts +59 -0
  268. package/lib/typescript/commonjs/tab-bar/expo-router/RouterTabBar.d.ts.map +1 -0
  269. package/lib/typescript/commonjs/tab-bar/expo-router/fading-tab-screen.d.ts +11 -0
  270. package/lib/typescript/commonjs/tab-bar/expo-router/fading-tab-screen.d.ts.map +1 -0
  271. package/lib/typescript/commonjs/tab-bar/expo-router/index.d.ts +14 -0
  272. package/lib/typescript/commonjs/tab-bar/expo-router/index.d.ts.map +1 -0
  273. package/lib/typescript/commonjs/tab-bar/glyph.d.ts +6 -0
  274. package/lib/typescript/commonjs/tab-bar/glyph.d.ts.map +1 -0
  275. package/lib/typescript/commonjs/tab-bar/glyph.native.d.ts +6 -0
  276. package/lib/typescript/commonjs/tab-bar/glyph.native.d.ts.map +1 -0
  277. package/lib/typescript/commonjs/tab-bar/index.d.ts +12 -0
  278. package/lib/typescript/commonjs/tab-bar/index.d.ts.map +1 -0
  279. package/lib/typescript/commonjs/tab-bar/index.web.d.ts +12 -0
  280. package/lib/typescript/commonjs/tab-bar/index.web.d.ts.map +1 -0
  281. package/lib/typescript/commonjs/tab-bar/minimize-context.d.ts +51 -0
  282. package/lib/typescript/commonjs/tab-bar/minimize-context.d.ts.map +1 -0
  283. package/lib/typescript/commonjs/tab-bar/shared.d.ts +93 -0
  284. package/lib/typescript/commonjs/tab-bar/shared.d.ts.map +1 -0
  285. package/lib/typescript/commonjs/tab-bar/surface.d.ts +6 -0
  286. package/lib/typescript/commonjs/tab-bar/surface.d.ts.map +1 -0
  287. package/lib/typescript/commonjs/tab-bar/surface.native.d.ts +6 -0
  288. package/lib/typescript/commonjs/tab-bar/surface.native.d.ts.map +1 -0
  289. package/lib/typescript/commonjs/tab-bar/surface.web.d.ts +6 -0
  290. package/lib/typescript/commonjs/tab-bar/surface.web.d.ts.map +1 -0
  291. package/lib/typescript/commonjs/tab-bar/types.d.ts +85 -0
  292. package/lib/typescript/commonjs/tab-bar/types.d.ts.map +1 -0
  293. package/lib/typescript/commonjs/tabs/Tabs.d.ts.map +1 -1
  294. package/lib/typescript/commonjs/toast/Positioner.d.ts +21 -0
  295. package/lib/typescript/commonjs/toast/Positioner.d.ts.map +1 -0
  296. package/lib/typescript/commonjs/toast/ToastContent.d.ts +14 -0
  297. package/lib/typescript/commonjs/toast/ToastContent.d.ts.map +1 -0
  298. package/lib/typescript/commonjs/toast/ToastHost.d.ts +6 -0
  299. package/lib/typescript/commonjs/toast/ToastHost.d.ts.map +1 -0
  300. package/lib/typescript/commonjs/toast/ToastHost.native.d.ts +6 -0
  301. package/lib/typescript/commonjs/toast/ToastHost.native.d.ts.map +1 -0
  302. package/lib/typescript/commonjs/toast/ToastIcon.d.ts +9 -0
  303. package/lib/typescript/commonjs/toast/ToastIcon.d.ts.map +1 -0
  304. package/lib/typescript/commonjs/toast/ToastRow.d.ts +80 -0
  305. package/lib/typescript/commonjs/toast/ToastRow.d.ts.map +1 -0
  306. package/lib/typescript/commonjs/toast/ToastSwipeHandler.d.ts +30 -0
  307. package/lib/typescript/commonjs/toast/ToastSwipeHandler.d.ts.map +1 -0
  308. package/lib/typescript/commonjs/toast/Toaster.d.ts +19 -0
  309. package/lib/typescript/commonjs/toast/Toaster.d.ts.map +1 -0
  310. package/lib/typescript/commonjs/toast/animations.d.ts +62 -0
  311. package/lib/typescript/commonjs/toast/animations.d.ts.map +1 -0
  312. package/lib/typescript/commonjs/toast/constants.d.ts +39 -0
  313. package/lib/typescript/commonjs/toast/constants.d.ts.map +1 -0
  314. package/lib/typescript/commonjs/toast/context.d.ts +19 -0
  315. package/lib/typescript/commonjs/toast/context.d.ts.map +1 -0
  316. package/lib/typescript/commonjs/toast/index.d.ts +23 -76
  317. package/lib/typescript/commonjs/toast/index.d.ts.map +1 -1
  318. package/lib/typescript/commonjs/toast/position-utils.d.ts +30 -0
  319. package/lib/typescript/commonjs/toast/position-utils.d.ts.map +1 -0
  320. package/lib/typescript/commonjs/toast/positioner-utils.d.ts +72 -0
  321. package/lib/typescript/commonjs/toast/positioner-utils.d.ts.map +1 -0
  322. package/lib/typescript/commonjs/toast/toast-comparator.d.ts +12 -0
  323. package/lib/typescript/commonjs/toast/toast-comparator.d.ts.map +1 -0
  324. package/lib/typescript/commonjs/toast/toast-fns.d.ts +3 -0
  325. package/lib/typescript/commonjs/toast/toast-fns.d.ts.map +1 -0
  326. package/lib/typescript/commonjs/toast/toast-store.d.ts +52 -0
  327. package/lib/typescript/commonjs/toast/toast-store.d.ts.map +1 -0
  328. package/lib/typescript/commonjs/toast/toast-timers.d.ts +24 -0
  329. package/lib/typescript/commonjs/toast/toast-timers.d.ts.map +1 -0
  330. package/lib/typescript/commonjs/toast/types.d.ts +222 -5
  331. package/lib/typescript/commonjs/toast/types.d.ts.map +1 -1
  332. package/lib/typescript/commonjs/toast/use-animated-target.d.ts +7 -0
  333. package/lib/typescript/commonjs/toast/use-animated-target.d.ts.map +1 -0
  334. package/lib/typescript/commonjs/toast/use-app-state.d.ts +18 -0
  335. package/lib/typescript/commonjs/toast/use-app-state.d.ts.map +1 -0
  336. package/lib/typescript/commonjs/toast/use-toast-colors.d.ts +22 -0
  337. package/lib/typescript/commonjs/toast/use-toast-colors.d.ts.map +1 -0
  338. package/lib/typescript/commonjs/toast/use-toast-position.d.ts +37 -0
  339. package/lib/typescript/commonjs/toast/use-toast-position.d.ts.map +1 -0
  340. package/lib/typescript/commonjs/tooltip/index.web.d.ts.map +1 -1
  341. package/lib/typescript/commonjs/zoomable-image-gallery/ZoomableImageGallery.d.ts.map +1 -1
  342. package/lib/typescript/module/avatar-group/AvatarGroup.web.d.ts.map +1 -1
  343. package/lib/typescript/module/bottom-sheet/index.web.d.ts.map +1 -1
  344. package/lib/typescript/module/context-menu/index.web.d.ts.map +1 -1
  345. package/lib/typescript/module/dialog/Dialog.d.ts.map +1 -1
  346. package/lib/typescript/module/dialog/Dialog.web.d.ts.map +1 -1
  347. package/lib/typescript/module/dialog/DialogHeader.d.ts.map +1 -1
  348. package/lib/typescript/module/index.d.ts +2 -1
  349. package/lib/typescript/module/index.d.ts.map +1 -1
  350. package/lib/typescript/module/index.web.d.ts +2 -1
  351. package/lib/typescript/module/index.web.d.ts.map +1 -1
  352. package/lib/typescript/module/menu/index.web.d.ts.map +1 -1
  353. package/lib/typescript/module/popover/index.web.d.ts.map +1 -1
  354. package/lib/typescript/module/portal/index.d.ts.map +1 -1
  355. package/lib/typescript/module/progressive-blur/index.d.ts +23 -0
  356. package/lib/typescript/module/progressive-blur/index.d.ts.map +1 -0
  357. package/lib/typescript/module/progressive-blur/index.web.d.ts +30 -0
  358. package/lib/typescript/module/progressive-blur/index.web.d.ts.map +1 -0
  359. package/lib/typescript/module/progressive-blur/shared.d.ts +35 -0
  360. package/lib/typescript/module/progressive-blur/shared.d.ts.map +1 -0
  361. package/lib/typescript/module/progressive-blur/types.d.ts +21 -0
  362. package/lib/typescript/module/progressive-blur/types.d.ts.map +1 -0
  363. package/lib/typescript/module/select/index.web.d.ts.map +1 -1
  364. package/lib/typescript/module/slider/Slider.d.ts.map +1 -1
  365. package/lib/typescript/module/styles/web-view-style.d.ts +21 -0
  366. package/lib/typescript/module/styles/web-view-style.d.ts.map +1 -0
  367. package/lib/typescript/module/switch/Switch.d.ts.map +1 -1
  368. package/lib/typescript/module/tab-bar/TabBarBase.d.ts +36 -0
  369. package/lib/typescript/module/tab-bar/TabBarBase.d.ts.map +1 -0
  370. package/lib/typescript/module/tab-bar/expo-router/RouterTabBar.d.ts +59 -0
  371. package/lib/typescript/module/tab-bar/expo-router/RouterTabBar.d.ts.map +1 -0
  372. package/lib/typescript/module/tab-bar/expo-router/fading-tab-screen.d.ts +11 -0
  373. package/lib/typescript/module/tab-bar/expo-router/fading-tab-screen.d.ts.map +1 -0
  374. package/lib/typescript/module/tab-bar/expo-router/index.d.ts +14 -0
  375. package/lib/typescript/module/tab-bar/expo-router/index.d.ts.map +1 -0
  376. package/lib/typescript/module/tab-bar/glyph.d.ts +6 -0
  377. package/lib/typescript/module/tab-bar/glyph.d.ts.map +1 -0
  378. package/lib/typescript/module/tab-bar/glyph.native.d.ts +6 -0
  379. package/lib/typescript/module/tab-bar/glyph.native.d.ts.map +1 -0
  380. package/lib/typescript/module/tab-bar/index.d.ts +12 -0
  381. package/lib/typescript/module/tab-bar/index.d.ts.map +1 -0
  382. package/lib/typescript/module/tab-bar/index.web.d.ts +12 -0
  383. package/lib/typescript/module/tab-bar/index.web.d.ts.map +1 -0
  384. package/lib/typescript/module/tab-bar/minimize-context.d.ts +51 -0
  385. package/lib/typescript/module/tab-bar/minimize-context.d.ts.map +1 -0
  386. package/lib/typescript/module/tab-bar/shared.d.ts +93 -0
  387. package/lib/typescript/module/tab-bar/shared.d.ts.map +1 -0
  388. package/lib/typescript/module/tab-bar/surface.d.ts +6 -0
  389. package/lib/typescript/module/tab-bar/surface.d.ts.map +1 -0
  390. package/lib/typescript/module/tab-bar/surface.native.d.ts +6 -0
  391. package/lib/typescript/module/tab-bar/surface.native.d.ts.map +1 -0
  392. package/lib/typescript/module/tab-bar/surface.web.d.ts +6 -0
  393. package/lib/typescript/module/tab-bar/surface.web.d.ts.map +1 -0
  394. package/lib/typescript/module/tab-bar/types.d.ts +85 -0
  395. package/lib/typescript/module/tab-bar/types.d.ts.map +1 -0
  396. package/lib/typescript/module/tabs/Tabs.d.ts.map +1 -1
  397. package/lib/typescript/module/toast/Positioner.d.ts +21 -0
  398. package/lib/typescript/module/toast/Positioner.d.ts.map +1 -0
  399. package/lib/typescript/module/toast/ToastContent.d.ts +14 -0
  400. package/lib/typescript/module/toast/ToastContent.d.ts.map +1 -0
  401. package/lib/typescript/module/toast/ToastHost.d.ts +6 -0
  402. package/lib/typescript/module/toast/ToastHost.d.ts.map +1 -0
  403. package/lib/typescript/module/toast/ToastHost.native.d.ts +6 -0
  404. package/lib/typescript/module/toast/ToastHost.native.d.ts.map +1 -0
  405. package/lib/typescript/module/toast/ToastIcon.d.ts +9 -0
  406. package/lib/typescript/module/toast/ToastIcon.d.ts.map +1 -0
  407. package/lib/typescript/module/toast/ToastRow.d.ts +80 -0
  408. package/lib/typescript/module/toast/ToastRow.d.ts.map +1 -0
  409. package/lib/typescript/module/toast/ToastSwipeHandler.d.ts +30 -0
  410. package/lib/typescript/module/toast/ToastSwipeHandler.d.ts.map +1 -0
  411. package/lib/typescript/module/toast/Toaster.d.ts +19 -0
  412. package/lib/typescript/module/toast/Toaster.d.ts.map +1 -0
  413. package/lib/typescript/module/toast/animations.d.ts +62 -0
  414. package/lib/typescript/module/toast/animations.d.ts.map +1 -0
  415. package/lib/typescript/module/toast/constants.d.ts +39 -0
  416. package/lib/typescript/module/toast/constants.d.ts.map +1 -0
  417. package/lib/typescript/module/toast/context.d.ts +19 -0
  418. package/lib/typescript/module/toast/context.d.ts.map +1 -0
  419. package/lib/typescript/module/toast/index.d.ts +23 -76
  420. package/lib/typescript/module/toast/index.d.ts.map +1 -1
  421. package/lib/typescript/module/toast/position-utils.d.ts +30 -0
  422. package/lib/typescript/module/toast/position-utils.d.ts.map +1 -0
  423. package/lib/typescript/module/toast/positioner-utils.d.ts +72 -0
  424. package/lib/typescript/module/toast/positioner-utils.d.ts.map +1 -0
  425. package/lib/typescript/module/toast/toast-comparator.d.ts +12 -0
  426. package/lib/typescript/module/toast/toast-comparator.d.ts.map +1 -0
  427. package/lib/typescript/module/toast/toast-fns.d.ts +3 -0
  428. package/lib/typescript/module/toast/toast-fns.d.ts.map +1 -0
  429. package/lib/typescript/module/toast/toast-store.d.ts +52 -0
  430. package/lib/typescript/module/toast/toast-store.d.ts.map +1 -0
  431. package/lib/typescript/module/toast/toast-timers.d.ts +24 -0
  432. package/lib/typescript/module/toast/toast-timers.d.ts.map +1 -0
  433. package/lib/typescript/module/toast/types.d.ts +222 -5
  434. package/lib/typescript/module/toast/types.d.ts.map +1 -1
  435. package/lib/typescript/module/toast/use-animated-target.d.ts +7 -0
  436. package/lib/typescript/module/toast/use-animated-target.d.ts.map +1 -0
  437. package/lib/typescript/module/toast/use-app-state.d.ts +18 -0
  438. package/lib/typescript/module/toast/use-app-state.d.ts.map +1 -0
  439. package/lib/typescript/module/toast/use-toast-colors.d.ts +22 -0
  440. package/lib/typescript/module/toast/use-toast-colors.d.ts.map +1 -0
  441. package/lib/typescript/module/toast/use-toast-position.d.ts +37 -0
  442. package/lib/typescript/module/toast/use-toast-position.d.ts.map +1 -0
  443. package/lib/typescript/module/tooltip/index.web.d.ts.map +1 -1
  444. package/lib/typescript/module/zoomable-image-gallery/ZoomableImageGallery.d.ts.map +1 -1
  445. package/package.json +63 -25
  446. package/src/__tests__/TabBar.test.tsx +342 -0
  447. package/src/__tests__/TabBarReanimatedDeps.test.ts +130 -0
  448. package/src/__tests__/TabBarWebFork.test.ts +197 -0
  449. package/src/__tests__/ToastContent.test.tsx +192 -0
  450. package/src/__tests__/ToastHostWebFork.test.ts +155 -0
  451. package/src/__tests__/Toaster.test.tsx +527 -0
  452. package/src/__tests__/animated-style-deps.test.ts +156 -0
  453. package/src/__tests__/toast-animations.test.ts +98 -0
  454. package/src/__tests__/toast-comparator.test.ts +131 -0
  455. package/src/__tests__/toast-enter-driver.test.ts +147 -0
  456. package/src/__tests__/toast-fns.test.ts +240 -0
  457. package/src/__tests__/toast-position-utils.test.ts +259 -0
  458. package/src/__tests__/toast-positioner-utils.test.ts +214 -0
  459. package/src/__tests__/toast-store.test.ts +622 -0
  460. package/src/__tests__/toast-timers.test.ts +163 -0
  461. package/src/__tests__/use-animated-target.test.tsx +60 -0
  462. package/src/__tests__/use-app-state.test.tsx +127 -0
  463. package/src/__tests__/use-toast-colors.test.tsx +189 -0
  464. package/src/__tests__/web-position-fixed.test.ts +70 -0
  465. package/src/avatar-group/AvatarGroup.web.tsx +2 -1
  466. package/src/bottom-sheet/index.web.tsx +4 -3
  467. package/src/context-menu/index.web.tsx +6 -6
  468. package/src/dialog/Dialog.tsx +7 -4
  469. package/src/dialog/Dialog.web.tsx +14 -14
  470. package/src/dialog/DialogHeader.tsx +72 -17
  471. package/src/index.ts +4 -1
  472. package/src/index.web.ts +4 -1
  473. package/src/menu/index.web.tsx +5 -5
  474. package/src/popover/index.web.tsx +8 -6
  475. package/src/portal/index.tsx +4 -1
  476. package/src/progressive-blur/index.tsx +78 -0
  477. package/src/progressive-blur/index.web.tsx +65 -0
  478. package/src/progressive-blur/shared.ts +81 -0
  479. package/src/progressive-blur/types.ts +21 -0
  480. package/src/select/index.web.tsx +5 -5
  481. package/src/slider/Slider.tsx +3 -5
  482. package/src/styles/web-view-style.ts +21 -0
  483. package/src/switch/Switch.tsx +4 -5
  484. package/src/tab-bar/TabBar.stories.tsx +217 -0
  485. package/src/tab-bar/TabBarBase.tsx +517 -0
  486. package/src/tab-bar/expo-router/RouterTabBar.tsx +80 -0
  487. package/src/tab-bar/expo-router/fading-tab-screen.tsx +109 -0
  488. package/src/tab-bar/expo-router/index.ts +13 -0
  489. package/src/tab-bar/glyph.native.tsx +46 -0
  490. package/src/tab-bar/glyph.tsx +31 -0
  491. package/src/tab-bar/index.ts +32 -0
  492. package/src/tab-bar/index.web.tsx +34 -0
  493. package/src/tab-bar/minimize-context.tsx +117 -0
  494. package/src/tab-bar/shared.ts +159 -0
  495. package/src/tab-bar/surface.native.tsx +60 -0
  496. package/src/tab-bar/surface.tsx +47 -0
  497. package/src/tab-bar/surface.web.tsx +56 -0
  498. package/src/tab-bar/types.ts +88 -0
  499. package/src/tabs/Tabs.tsx +3 -5
  500. package/src/toast/Positioner.tsx +121 -0
  501. package/src/toast/Toast.stories.tsx +292 -65
  502. package/src/toast/ToastContent.tsx +405 -0
  503. package/src/toast/ToastHost.native.tsx +31 -0
  504. package/src/toast/ToastHost.tsx +67 -0
  505. package/src/toast/ToastIcon.tsx +55 -0
  506. package/src/toast/ToastRow.tsx +485 -0
  507. package/src/toast/ToastSwipeHandler.tsx +222 -0
  508. package/src/toast/Toaster.tsx +259 -0
  509. package/src/toast/animations.ts +313 -0
  510. package/src/toast/constants.ts +76 -0
  511. package/src/toast/context.tsx +44 -0
  512. package/src/toast/index.tsx +47 -123
  513. package/src/toast/position-utils.ts +149 -0
  514. package/src/toast/positioner-utils.ts +142 -0
  515. package/src/toast/toast-comparator.ts +41 -0
  516. package/src/toast/toast-fns.ts +104 -0
  517. package/src/toast/toast-store.ts +432 -0
  518. package/src/toast/toast-timers.ts +124 -0
  519. package/src/toast/types.ts +301 -5
  520. package/src/toast/use-animated-target.ts +61 -0
  521. package/src/toast/use-app-state.ts +77 -0
  522. package/src/toast/use-toast-colors.ts +133 -0
  523. package/src/toast/use-toast-position.ts +46 -0
  524. package/src/tooltip/index.web.tsx +2 -1
  525. package/src/zoomable-image-gallery/ZoomableImageGallery.stories.tsx +134 -0
  526. package/src/zoomable-image-gallery/ZoomableImageGallery.tsx +50 -27
  527. package/lib/commonjs/toast/Toast.js +0 -272
  528. package/lib/commonjs/toast/Toast.js.map +0 -1
  529. package/lib/commonjs/toast/const.js +0 -8
  530. package/lib/commonjs/toast/const.js.map +0 -1
  531. package/lib/commonjs/toast/index.web.js +0 -114
  532. package/lib/commonjs/toast/index.web.js.map +0 -1
  533. package/lib/commonjs/toast/sonner/index.js +0 -9
  534. package/lib/commonjs/toast/sonner/index.js.map +0 -1
  535. package/lib/commonjs/toast/sonner/index.web.js +0 -9
  536. package/lib/commonjs/toast/sonner/index.web.js.map +0 -1
  537. package/lib/module/toast/Toast.js +0 -263
  538. package/lib/module/toast/Toast.js.map +0 -1
  539. package/lib/module/toast/const.js +0 -4
  540. package/lib/module/toast/const.js.map +0 -1
  541. package/lib/module/toast/index.web.js +0 -74
  542. package/lib/module/toast/index.web.js.map +0 -1
  543. package/lib/module/toast/sonner/index.js +0 -5
  544. package/lib/module/toast/sonner/index.js.map +0 -1
  545. package/lib/module/toast/sonner/index.web.js +0 -5
  546. package/lib/module/toast/sonner/index.web.js.map +0 -1
  547. package/lib/typescript/commonjs/toast/Toast.d.ts +0 -23
  548. package/lib/typescript/commonjs/toast/Toast.d.ts.map +0 -1
  549. package/lib/typescript/commonjs/toast/const.d.ts +0 -2
  550. package/lib/typescript/commonjs/toast/const.d.ts.map +0 -1
  551. package/lib/typescript/commonjs/toast/index.web.d.ts +0 -29
  552. package/lib/typescript/commonjs/toast/index.web.d.ts.map +0 -1
  553. package/lib/typescript/commonjs/toast/sonner/index.d.ts +0 -2
  554. package/lib/typescript/commonjs/toast/sonner/index.d.ts.map +0 -1
  555. package/lib/typescript/commonjs/toast/sonner/index.web.d.ts +0 -2
  556. package/lib/typescript/commonjs/toast/sonner/index.web.d.ts.map +0 -1
  557. package/lib/typescript/module/toast/Toast.d.ts +0 -23
  558. package/lib/typescript/module/toast/Toast.d.ts.map +0 -1
  559. package/lib/typescript/module/toast/const.d.ts +0 -2
  560. package/lib/typescript/module/toast/const.d.ts.map +0 -1
  561. package/lib/typescript/module/toast/index.web.d.ts +0 -29
  562. package/lib/typescript/module/toast/index.web.d.ts.map +0 -1
  563. package/lib/typescript/module/toast/sonner/index.d.ts +0 -2
  564. package/lib/typescript/module/toast/sonner/index.d.ts.map +0 -1
  565. package/lib/typescript/module/toast/sonner/index.web.d.ts +0 -2
  566. package/lib/typescript/module/toast/sonner/index.web.d.ts.map +0 -1
  567. package/src/toast/Toast.tsx +0 -271
  568. package/src/toast/const.ts +0 -1
  569. package/src/toast/index.web.tsx +0 -101
  570. package/src/toast/sonner/index.ts +0 -3
  571. package/src/toast/sonner/index.web.ts +0 -3
@@ -0,0 +1,301 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ToastContent = ToastContent;
7
+ var React = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _shadows = require("../design-tokens/shadows");
10
+ var _useInteractionState = require("../hooks/useInteractionState.js");
11
+ var _Times = require("../icons/Times.js");
12
+ var _tokens = require("../styles/tokens.js");
13
+ var _ToastIcon = require("./ToastIcon.js");
14
+ var _useToastColors = require("./use-toast-colors.js");
15
+ var _types = require("./types.js");
16
+ var _jsxRuntime = require("react/jsx-runtime");
17
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
18
+ /**
19
+ * Derived from sonner-native v0.26.4 — src/toast.tsx:440-689
20
+ * (MIT © Gunnar Torfi Steinarsson — see the top-level NOTICE), restyled with
21
+ * Bloom's design tokens and absorbing the surface/text/action styling from
22
+ * Bloom's previous `Toast.tsx`.
23
+ *
24
+ * This is the DEFAULT renderer. A consumer who passes `jsx` (via `toast.custom`)
25
+ * owns the whole row and this file is not involved.
26
+ *
27
+ * W11 — the surface elevation comes from `bloomShadowStyle('s')`, which is a
28
+ * `boxShadow` on web and RN `shadow*`/`elevation` on native. Upstream hardcodes
29
+ * iOS-only `shadowOpacity`/`shadowRadius` values, so its toast has no shadow on
30
+ * web (no `boxShadow`) and none on iOS either (no `shadowColor`).
31
+ */
32
+
33
+ function ToastContent({
34
+ id,
35
+ title,
36
+ description,
37
+ variant,
38
+ icon,
39
+ icons,
40
+ action,
41
+ cancel,
42
+ close,
43
+ closeButton,
44
+ dismissible,
45
+ richColors = false,
46
+ promiseOptions,
47
+ styles: styleOverrides,
48
+ style,
49
+ unstyled,
50
+ onDismiss,
51
+ actionButtonStyle,
52
+ actionButtonTextStyle,
53
+ cancelButtonStyle,
54
+ cancelButtonTextStyle,
55
+ allowFontScaling,
56
+ maxFontSizeMultiplier,
57
+ backgroundComponent
58
+ }) {
59
+ const colors = (0, _useToastColors.useToastColors)({
60
+ variant,
61
+ richColors
62
+ });
63
+ const isLoading = Boolean(promiseOptions) || variant === 'loading';
64
+ const surfaceStyle = unstyled ? undefined : {
65
+ backgroundColor: colors.surface,
66
+ borderColor: colors.border
67
+ };
68
+ const textProps = {
69
+ allowFontScaling,
70
+ maxFontSizeMultiplier
71
+ };
72
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
73
+ style: [unstyled ? undefined : styles.surface, surfaceStyle,
74
+ // A custom background needs the surface transparent and clipped so it can
75
+ // paint edge to edge underneath the content.
76
+ backgroundComponent ? styles.hostedBackground : undefined, styleOverrides?.toast, style],
77
+ children: [backgroundComponent, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
78
+ style: [unstyled ? undefined : styles.row,
79
+ // With a description the row is tall, so the icon sits at the top
80
+ // instead of being centred against two lines of text.
81
+ unstyled || !description ? undefined : styles.rowWithDescription, backgroundComponent ? styles.aboveBackground : undefined, styleOverrides?.toastContent],
82
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ToastLeadingIcon, {
83
+ variant: variant,
84
+ icon: icon,
85
+ icons: icons,
86
+ isLoading: isLoading,
87
+ color: colors.icon
88
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
89
+ style: [styles.textContainer, styleOverrides?.textContainer],
90
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
91
+ ...textProps,
92
+ style: [unstyled ? undefined : styles.title, unstyled ? undefined : {
93
+ color: colors.title
94
+ }, styleOverrides?.title],
95
+ children: title
96
+ }), description ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
97
+ ...textProps,
98
+ style: [unstyled ? undefined : styles.description, unstyled ? undefined : {
99
+ color: colors.description
100
+ }, styleOverrides?.description],
101
+ children: description
102
+ }) : null, action || cancel ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
103
+ style: [unstyled ? undefined : styles.buttons, styleOverrides?.buttons],
104
+ children: [(0, _types.isToastAction)(action) ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ToastActionButton, {
105
+ action: action,
106
+ colors: colors.action,
107
+ buttonStyle: actionButtonStyle,
108
+ textStyle: actionButtonTextStyle,
109
+ ...textProps
110
+ }) : action, (0, _types.isToastAction)(cancel) ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ToastActionButton, {
111
+ action: {
112
+ label: cancel.label,
113
+ onClick: () => {
114
+ cancel.onClick();
115
+ onDismiss(id);
116
+ }
117
+ },
118
+ colors: colors.action,
119
+ transparent: true,
120
+ buttonStyle: cancelButtonStyle,
121
+ textStyle: [{
122
+ color: colors.cancelText
123
+ }, cancelButtonTextStyle],
124
+ ...textProps
125
+ }) : cancel]
126
+ }) : null]
127
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(ToastCloseButton, {
128
+ id: id,
129
+ close: close,
130
+ closeButton: closeButton,
131
+ dismissible: dismissible,
132
+ color: colors.closeButton,
133
+ onDismiss: onDismiss,
134
+ buttonStyle: styleOverrides?.closeButton,
135
+ iconStyle: styleOverrides?.closeButtonIcon
136
+ })]
137
+ })]
138
+ });
139
+ }
140
+ ToastContent.displayName = 'ToastContent';
141
+ function ToastLeadingIcon({
142
+ variant,
143
+ icon,
144
+ icons,
145
+ isLoading,
146
+ color
147
+ }) {
148
+ if (isLoading) {
149
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
150
+ children: icons.loading ?? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ToastIcon.ToastIcon, {
151
+ variant: "loading",
152
+ color: color
153
+ })
154
+ });
155
+ }
156
+ if (icon) {
157
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
158
+ children: icon
159
+ });
160
+ }
161
+ if (variant && icons[variant]) {
162
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
163
+ children: icons[variant]
164
+ });
165
+ }
166
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_ToastIcon.ToastIcon, {
167
+ variant: variant,
168
+ color: color
169
+ });
170
+ }
171
+ function ToastActionButton({
172
+ action,
173
+ colors,
174
+ transparent,
175
+ buttonStyle,
176
+ textStyle,
177
+ allowFontScaling,
178
+ maxFontSizeMultiplier
179
+ }) {
180
+ // Driven from state rather than Pressable's function-form `style`, which
181
+ // react-native-css swallows on web (dropping the base padding/radius).
182
+ const {
183
+ state: pressed,
184
+ onIn,
185
+ onOut
186
+ } = (0, _useInteractionState.useInteractionState)();
187
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
188
+ onPress: action.onClick,
189
+ onPressIn: onIn,
190
+ onPressOut: onOut,
191
+ accessibilityRole: "button",
192
+ style: [styles.actionButton, transparent ? undefined : {
193
+ backgroundColor: pressed ? colors.pressedBackground : colors.background
194
+ }, buttonStyle],
195
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
196
+ numberOfLines: 1,
197
+ allowFontScaling: allowFontScaling,
198
+ maxFontSizeMultiplier: maxFontSizeMultiplier,
199
+ style: [styles.actionButtonText, {
200
+ color: pressed ? colors.pressedText : colors.text
201
+ }, textStyle],
202
+ children: action.label
203
+ })
204
+ });
205
+ }
206
+ function ToastCloseButton({
207
+ id,
208
+ close,
209
+ closeButton,
210
+ dismissible,
211
+ color,
212
+ onDismiss,
213
+ buttonStyle,
214
+ iconStyle
215
+ }) {
216
+ const handlePress = React.useCallback(() => {
217
+ onDismiss(id);
218
+ }, [onDismiss, id]);
219
+ if (!dismissible) {
220
+ return null;
221
+ }
222
+ if (close) {
223
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
224
+ children: close
225
+ });
226
+ }
227
+ if (!closeButton) {
228
+ return null;
229
+ }
230
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
231
+ onPress: handlePress,
232
+ hitSlop: CLOSE_BUTTON_HIT_SLOP,
233
+ accessibilityRole: "button",
234
+ style: buttonStyle,
235
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Times.TimesLarge_Stroke2_Corner0_Rounded, {
236
+ size: "md",
237
+ fill: color,
238
+ style: iconStyle
239
+ })
240
+ });
241
+ }
242
+ const CLOSE_BUTTON_HIT_SLOP = 10;
243
+ const styles = _reactNative.StyleSheet.create({
244
+ surface: {
245
+ justifyContent: 'center',
246
+ paddingHorizontal: _tokens.space.lg,
247
+ paddingVertical: _tokens.space.md,
248
+ marginHorizontal: _tokens.space.lg,
249
+ borderRadius: _tokens.borderRadius.md,
250
+ borderWidth: _reactNative.StyleSheet.hairlineWidth,
251
+ ...(0, _shadows.bloomShadowStyle)('s')
252
+ },
253
+ hostedBackground: {
254
+ overflow: 'hidden',
255
+ backgroundColor: 'transparent'
256
+ },
257
+ aboveBackground: {
258
+ position: 'relative',
259
+ zIndex: 1
260
+ },
261
+ row: {
262
+ flexDirection: 'row',
263
+ alignItems: 'center',
264
+ gap: _tokens.space.md
265
+ },
266
+ rowWithDescription: {
267
+ alignItems: 'flex-start'
268
+ },
269
+ textContainer: {
270
+ flex: 1
271
+ },
272
+ title: {
273
+ fontSize: _tokens.fontSize.md,
274
+ fontWeight: '600',
275
+ lineHeight: 20
276
+ },
277
+ description: {
278
+ fontSize: _tokens.fontSize.sm,
279
+ lineHeight: 20,
280
+ marginTop: _tokens.space._2xs
281
+ },
282
+ buttons: {
283
+ flexDirection: 'row',
284
+ alignItems: 'center',
285
+ gap: _tokens.space.sm,
286
+ marginTop: _tokens.space.md
287
+ },
288
+ actionButton: {
289
+ flexGrow: 0,
290
+ alignSelf: 'flex-start',
291
+ paddingHorizontal: _tokens.space.md,
292
+ paddingVertical: _tokens.space.xs,
293
+ borderRadius: _tokens.borderRadius.sm
294
+ },
295
+ actionButtonText: {
296
+ fontSize: _tokens.fontSize.sm,
297
+ fontWeight: '600',
298
+ lineHeight: 20
299
+ }
300
+ });
301
+ //# sourceMappingURL=ToastContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_shadows","_useInteractionState","_Times","_tokens","_ToastIcon","_useToastColors","_types","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","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","useToastColors","isLoading","Boolean","surfaceStyle","undefined","backgroundColor","surface","borderColor","border","textProps","jsxs","View","hostedBackground","toast","children","row","rowWithDescription","aboveBackground","toastContent","jsx","ToastLeadingIcon","color","textContainer","Text","buttons","isToastAction","ToastActionButton","buttonStyle","textStyle","label","onClick","transparent","cancelText","ToastCloseButton","iconStyle","closeButtonIcon","displayName","Fragment","loading","ToastIcon","state","pressed","onIn","onOut","useInteractionState","Pressable","onPress","onPressIn","onPressOut","accessibilityRole","actionButton","pressedBackground","background","numberOfLines","actionButtonText","pressedText","text","handlePress","useCallback","hitSlop","CLOSE_BUTTON_HIT_SLOP","TimesLarge_Stroke2_Corner0_Rounded","size","fill","StyleSheet","create","justifyContent","paddingHorizontal","space","lg","paddingVertical","md","marginHorizontal","borderRadius","borderWidth","hairlineWidth","bloomShadowStyle","overflow","position","zIndex","flexDirection","alignItems","gap","flex","fontSize","fontWeight","lineHeight","sm","marginTop","_2xs","flexGrow","alignSelf","xs"],"sourceRoot":"../../../src","sources":["toast/ToastContent.tsx"],"mappings":";;;;;;AAcA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AASA,IAAAE,QAAA,GAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,eAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AAKiB,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAD,wBAAAW,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OA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EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAEd,aAAK,CAACmB,EAAE;IACbC,SAAS,EAAEpB,aAAK,CAACG;EACnB,CAAC;EACDrB,YAAY,EAAE;IACZwC,QAAQ,EAAE,CAAC;IACXC,SAAS,EAAE,YAAY;IACvBxB,iBAAiB,EAAEC,aAAK,CAACG,EAAE;IAC3BD,eAAe,EAAEF,aAAK,CAACwB,EAAE;IACzBnB,YAAY,EAAEA,oBAAY,CAACc;EAC7B,CAAC;EACDjC,gBAAgB,EAAE;IAChB8B,QAAQ,EAAEA,gBAAQ,CAACG,EAAE;IACrBF,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ToastHost = ToastHost;
7
+ var React = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _reactNativeGestureHandler = require("react-native-gesture-handler");
10
+ var _indexWeb = require("../portal/index.web.js");
11
+ var _webViewStyle = require("../styles/web-view-style.js");
12
+ var _zIndex = require("../styles/z-index.js");
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
15
+ /**
16
+ * Bloom-original — the WEB / default toast host. Metro selects
17
+ * `ToastHost.native.tsx` on iOS and Android; every other bundler (and a
18
+ * consumer's `tsc`) sees this file, matching the `.native` split convention
19
+ * `design-tokens/shadows.ts` already uses.
20
+ *
21
+ * Two jobs, both of which are why the rest of the engine can stay universal:
22
+ *
23
+ * - W7: it portals into `#bloom-portal-root` and provides a `position: fixed`,
24
+ * full-viewport containing block. `Positioner`'s `position: 'absolute'` would
25
+ * otherwise anchor to the nearest positioned ancestor — react-native-web's
26
+ * `View` defaults to `relative`, so a deeply-mounted outlet would anchor to a
27
+ * provider somewhere in the tree instead of the viewport. A `Positioner.web`
28
+ * with `position: fixed` would NOT be enough: `fixed` is still contained by any
29
+ * ancestor `transform`/`filter`/`contain`, which is exactly why `Dialog` and
30
+ * `BottomSheet` portal too. Sharing the one portal root also keeps a single
31
+ * document-level overlay layer rather than a second competing one.
32
+ * - W8: portaled content sits outside the app-root `GestureHandlerRootView`, so
33
+ * swipe-to-dismiss would never receive touches. This provides its own, exactly
34
+ * as `bottom-sheet/index.web.tsx` does. Web consumers need no setup.
35
+ *
36
+ * `pointerEvents: 'box-none'` keeps the empty area click-through while the rows
37
+ * themselves stay interactive.
38
+ */
39
+
40
+ function ToastHost({
41
+ children,
42
+ ToasterOverlayWrapper
43
+ }) {
44
+ const content = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeGestureHandler.GestureHandlerRootView, {
45
+ style: styles.host,
46
+ children: children
47
+ });
48
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_indexWeb.Portal, {
49
+ children: ToasterOverlayWrapper ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ToasterOverlayWrapper, {
50
+ children: content
51
+ }) : content
52
+ });
53
+ }
54
+ ToastHost.displayName = 'ToastHost';
55
+ const styles = _reactNative.StyleSheet.create({
56
+ host: {
57
+ // Full-viewport containing block for `Positioner`'s `position: 'absolute'`.
58
+ position: _webViewStyle.WEB_POSITION_FIXED,
59
+ top: 0,
60
+ left: 0,
61
+ right: 0,
62
+ bottom: 0,
63
+ // Inside `#bloom-portal-root` (which owns the document layer at 999999),
64
+ // this keeps toasts above Dialog's surface (60) and tooltips (70).
65
+ zIndex: _zIndex.Z_INDEX.toast,
66
+ pointerEvents: 'box-none'
67
+ }
68
+ });
69
+ //# sourceMappingURL=ToastHost.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_reactNativeGestureHandler","_indexWeb","_webViewStyle","_zIndex","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ToastHost","children","ToasterOverlayWrapper","content","jsx","GestureHandlerRootView","style","styles","host","Portal","displayName","StyleSheet","create","position","WEB_POSITION_FIXED","top","left","right","bottom","zIndex","Z_INDEX","toast","pointerEvents"],"sourceRoot":"../../../src","sources":["toast/ToastHost.tsx"],"mappings":";;;;;;AAwBA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAF,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAA4C,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,CAAAQ,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,G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AAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACT;IACA;IACAC,MAAM,EAAEC,eAAO,CAACC,KAAK;IACrBC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ToastHost = ToastHost;
7
+ var React = _interopRequireWildcard(require("react"));
8
+ var _jsxRuntime = require("react/jsx-runtime");
9
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
10
+ /**
11
+ * Bloom-original — the NATIVE toast host. Metro selects this file; every other
12
+ * bundler resolves the sibling `ToastHost.tsx` (web/default).
13
+ *
14
+ * On native the rows render inline in the app's own view hierarchy, which is what
15
+ * makes them respect the safe area and the app-root `GestureHandlerRootView` that
16
+ * consumers already mount. So there is nothing to portal — the host only applies
17
+ * the optional overlay wrapper.
18
+ *
19
+ * `react-native-screens` is deliberately NOT imported (D6). Upstream statically
20
+ * imports `FullWindowOverlay` from it, an undeclared dependency that only works
21
+ * because apps happen to install it. A consumer who needs a toast above a native
22
+ * iOS modal injects it themselves:
23
+ *
24
+ * ```tsx
25
+ * import { FullWindowOverlay } from 'react-native-screens';
26
+ * <ToastOutlet ToasterOverlayWrapper={FullWindowOverlay} />
27
+ * ```
28
+ */
29
+
30
+ function ToastHost({
31
+ children,
32
+ ToasterOverlayWrapper
33
+ }) {
34
+ if (ToasterOverlayWrapper) {
35
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(ToasterOverlayWrapper, {
36
+ children: children
37
+ });
38
+ }
39
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
40
+ children: children
41
+ });
42
+ }
43
+ ToastHost.displayName = 'ToastHost';
44
+ //# sourceMappingURL=ToastHost.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","_interopRequireWildcard","require","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ToastHost","children","ToasterOverlayWrapper","jsx","Fragment","displayName"],"sourceRoot":"../../../src","sources":["toast/ToastHost.native.tsx"],"mappings":";;;;;;AAmBA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA+B,IAAAC,WAAA,GAAAD,OAAA;AAAA,SAAAD,wBAAAG,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAL,uBAAA,YAAAA,CAAAG,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAnB/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKO,SAASkB,SAASA,CAAC;EAAEC,QAAQ;EAAEC;AAAsC,CAAC,EAAE;EAC7E,IAAIA,qBAAqB,EAAE;IACzB,oBAAO,IAAAtB,WAAA,CAAAuB,GAAA,EAACD,qBAAqB;MAAAD,QAAA,EAAEA;IAAQ,CAAwB,CAAC;EAClE;EACA,oBAAO,IAAArB,WAAA,CAAAuB,GAAA,EAAAvB,WAAA,CAAAwB,QAAA;IAAAH,QAAA,EAAGA;EAAQ,CAAG,CAAC;AACxB;AAEAD,SAAS,CAACK,WAAW,GAAG,WAAW","ignoreList":[]}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ToastIcon = ToastIcon;
7
+ var _reactNative = require("react-native");
8
+ var _CircleCheck = require("../icons/CircleCheck.js");
9
+ var _CircleInfo = require("../icons/CircleInfo.js");
10
+ var _CircleX = require("../icons/CircleX.js");
11
+ var _Warning = require("../icons/Warning.js");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ /**
14
+ * Replaces sonner-native v0.26.4's `src/icons.tsx` (MIT © Gunnar Torfi
15
+ * Steinarsson — see the top-level NOTICE), which ships its own inline SVG paths
16
+ * and imports `react-native-svg` directly. Bloom maps variants onto its own icon
17
+ * set instead, so the toast picks up icon changes with the rest of the library.
18
+ *
19
+ * The spinner is RN's `ActivityIndicator` rather than Bloom's `Loading`: the
20
+ * `./loading` subpath is web-forked, so importing it from this universal file
21
+ * would resolve to the native (Reanimated) build under bundlers that do not
22
+ * apply `.web` extension resolution, and to the web build under those that do —
23
+ * platform-dependent behaviour from one import. `ActivityIndicator` is universal
24
+ * (react-native-web renders a CSS-animated SVG, so nothing depends on a
25
+ * Reanimated mapper ticking on web) and a consumer who wants Bloom's spinner can
26
+ * still pass `icons={{ loading: <Loading … /> }}` on the outlet.
27
+ */
28
+
29
+ const ICON_MAP = {
30
+ success: _CircleCheck.CircleCheck_Stroke2_Corner0_Rounded,
31
+ error: _CircleX.CircleX_Stroke2_Corner0_Rounded,
32
+ warning: _Warning.Warning_Stroke2_Corner0_Rounded,
33
+ info: _CircleInfo.CircleInfo_Stroke2_Corner0_Rounded
34
+ };
35
+ function ToastIcon({
36
+ variant,
37
+ color
38
+ }) {
39
+ // No variant means a neutral toast, which carries no icon of its own — a
40
+ // caller who wants one passes `icon`.
41
+ if (!variant) {
42
+ return null;
43
+ }
44
+ if (variant === 'loading') {
45
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
46
+ size: "small",
47
+ color: color
48
+ });
49
+ }
50
+ const Icon = ICON_MAP[variant];
51
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, {
52
+ fill: color,
53
+ size: "md"
54
+ });
55
+ }
56
+ ToastIcon.displayName = 'ToastIcon';
57
+ //# sourceMappingURL=ToastIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_CircleCheck","_CircleInfo","_CircleX","_Warning","_jsxRuntime","ICON_MAP","success","CircleCheckIcon","error","CircleXIcon","warning","WarningIcon","info","CircleInfoIcon","ToastIcon","variant","color","jsx","ActivityIndicator","size","Icon","fill","displayName"],"sourceRoot":"../../../src","sources":["toast/ToastIcon.tsx"],"mappings":";;;;;;AAeA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAAkF,IAAAK,WAAA,GAAAL,OAAA;AApBlF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA,MAAMM,QAGL,GAAG;EACFC,OAAO,EAAEC,gDAAe;EACxBC,KAAK,EAAEC,wCAAW;EAClBC,OAAO,EAAEC,wCAAW;EACpBC,IAAI,EAAEC;AACR,CAAC;AAEM,SAASC,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,oBAAO,IAAAX,WAAA,CAAAa,GAAA,EAACnB,YAAA,CAAAoB,iBAAiB;MAACC,IAAI,EAAC,OAAO;MAACH,KAAK,EAAEA;IAAM,CAAE,CAAC;EACzD;EAEA,MAAMI,IAAI,GAAGf,QAAQ,CAACU,OAAO,CAAC;EAC9B,oBAAO,IAAAX,WAAA,CAAAa,GAAA,EAACG,IAAI;IAACC,IAAI,EAAEL,KAAM;IAACG,IAAI,EAAC;EAAI,CAAE,CAAC;AACxC;AAEAL,SAAS,CAACQ,WAAW,GAAG,WAAW","ignoreList":[]}