@fluentui/react-toast 9.8.1 → 9.8.3

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 (311) hide show
  1. package/CHANGELOG.md +31 -2
  2. package/dist/index.d.cts +640 -0
  3. package/lib/AriaLive.js +1 -1
  4. package/lib/AriaLive.js.map +1 -1
  5. package/lib/Toast.js +1 -1
  6. package/lib/Toast.js.map +1 -1
  7. package/lib/ToastBody.js +1 -1
  8. package/lib/ToastBody.js.map +1 -1
  9. package/lib/ToastContainer.js +1 -1
  10. package/lib/ToastContainer.js.map +1 -1
  11. package/lib/ToastFooter.js +1 -1
  12. package/lib/ToastFooter.js.map +1 -1
  13. package/lib/ToastTitle.js +1 -1
  14. package/lib/ToastTitle.js.map +1 -1
  15. package/lib/ToastTrigger.js +1 -1
  16. package/lib/ToastTrigger.js.map +1 -1
  17. package/lib/Toaster.js +1 -1
  18. package/lib/Toaster.js.map +1 -1
  19. package/lib/components/AriaLive/AriaLive.js +3 -3
  20. package/lib/components/AriaLive/AriaLive.js.map +1 -1
  21. package/lib/components/AriaLive/index.js +4 -4
  22. package/lib/components/AriaLive/index.js.map +1 -1
  23. package/lib/components/AriaLive/renderAriaLive.js +1 -1
  24. package/lib/components/AriaLive/useAriaLive.js +2 -2
  25. package/lib/components/AriaLive/useAriaLiveStyles.styles.js +1 -1
  26. package/lib/components/AriaLive/useAriaLiveStyles.styles.js.map +1 -1
  27. package/lib/components/AriaLive/useAriaLiveStyles.styles.raw.js +1 -1
  28. package/lib/components/Timer/Timer.js +2 -2
  29. package/lib/components/Timer/Timer.js.map +1 -1
  30. package/lib/components/Timer/index.js +1 -1
  31. package/lib/components/Timer/index.js.map +1 -1
  32. package/lib/components/Timer/useTimerStyles.styles.js +1 -1
  33. package/lib/components/Timer/useTimerStyles.styles.js.map +1 -1
  34. package/lib/components/Timer/useTimerStyles.styles.raw.js +1 -1
  35. package/lib/components/Toast/Toast.js +6 -6
  36. package/lib/components/Toast/Toast.js.map +1 -1
  37. package/lib/components/Toast/index.js +4 -4
  38. package/lib/components/Toast/index.js.map +1 -1
  39. package/lib/components/Toast/renderToast.js +2 -2
  40. package/lib/components/Toast/useToast.js +2 -2
  41. package/lib/components/Toast/useToast.js.map +1 -1
  42. package/lib/components/Toast/useToastStyles.styles.js +2 -2
  43. package/lib/components/Toast/useToastStyles.styles.js.map +1 -1
  44. package/lib/components/Toast/useToastStyles.styles.raw.js +2 -2
  45. package/lib/components/ToastBody/ToastBody.js +5 -5
  46. package/lib/components/ToastBody/ToastBody.js.map +1 -1
  47. package/lib/components/ToastBody/index.js +4 -4
  48. package/lib/components/ToastBody/index.js.map +1 -1
  49. package/lib/components/ToastBody/renderToastBody.js +1 -1
  50. package/lib/components/ToastBody/useToastBody.js +3 -3
  51. package/lib/components/ToastBody/useToastBody.js.map +1 -1
  52. package/lib/components/ToastBody/useToastBodyStyles.styles.js +2 -2
  53. package/lib/components/ToastBody/useToastBodyStyles.styles.js.map +1 -1
  54. package/lib/components/ToastBody/useToastBodyStyles.styles.raw.js +2 -2
  55. package/lib/components/ToastContainer/ToastContainer.js +6 -6
  56. package/lib/components/ToastContainer/ToastContainer.js.map +1 -1
  57. package/lib/components/ToastContainer/index.js +5 -5
  58. package/lib/components/ToastContainer/index.js.map +1 -1
  59. package/lib/components/ToastContainer/renderToastContainer.js +3 -3
  60. package/lib/components/ToastContainer/renderToastContainer.js.map +1 -1
  61. package/lib/components/ToastContainer/useToastContainer.js +6 -6
  62. package/lib/components/ToastContainer/useToastContainer.js.map +1 -1
  63. package/lib/components/ToastContainer/useToastContainerContextValues.js +1 -1
  64. package/lib/components/ToastContainer/useToastContainerStyles.styles.js +3 -3
  65. package/lib/components/ToastContainer/useToastContainerStyles.styles.js.map +1 -1
  66. package/lib/components/ToastContainer/useToastContainerStyles.styles.raw.js +3 -3
  67. package/lib/components/ToastFooter/ToastFooter.js +5 -5
  68. package/lib/components/ToastFooter/ToastFooter.js.map +1 -1
  69. package/lib/components/ToastFooter/index.js +4 -4
  70. package/lib/components/ToastFooter/index.js.map +1 -1
  71. package/lib/components/ToastFooter/renderToastFooter.js +1 -1
  72. package/lib/components/ToastFooter/useToastFooter.js +1 -1
  73. package/lib/components/ToastFooter/useToastFooterStyles.styles.js +1 -1
  74. package/lib/components/ToastFooter/useToastFooterStyles.styles.js.map +1 -1
  75. package/lib/components/ToastFooter/useToastFooterStyles.styles.raw.js +1 -1
  76. package/lib/components/ToastTitle/ToastTitle.js +5 -5
  77. package/lib/components/ToastTitle/ToastTitle.js.map +1 -1
  78. package/lib/components/ToastTitle/index.js +4 -4
  79. package/lib/components/ToastTitle/index.js.map +1 -1
  80. package/lib/components/ToastTitle/renderToastTitle.js +1 -1
  81. package/lib/components/ToastTitle/useToastTitle.js +5 -5
  82. package/lib/components/ToastTitle/useToastTitle.js.map +1 -1
  83. package/lib/components/ToastTitle/useToastTitleStyles.styles.js +2 -2
  84. package/lib/components/ToastTitle/useToastTitleStyles.styles.js.map +1 -1
  85. package/lib/components/ToastTitle/useToastTitleStyles.styles.raw.js +2 -2
  86. package/lib/components/ToastTrigger/ToastTrigger.js +2 -2
  87. package/lib/components/ToastTrigger/ToastTrigger.js.map +1 -1
  88. package/lib/components/ToastTrigger/index.js +3 -3
  89. package/lib/components/ToastTrigger/index.js.map +1 -1
  90. package/lib/components/ToastTrigger/useToastTrigger.js +3 -3
  91. package/lib/components/ToastTrigger/useToastTrigger.js.map +1 -1
  92. package/lib/components/Toaster/Toaster.js +4 -4
  93. package/lib/components/Toaster/Toaster.js.map +1 -1
  94. package/lib/components/Toaster/index.js +5 -5
  95. package/lib/components/Toaster/index.js.map +1 -1
  96. package/lib/components/Toaster/renderToaster.js +3 -3
  97. package/lib/components/Toaster/renderToaster.js.map +1 -1
  98. package/lib/components/Toaster/useToastAnnounce.js +2 -2
  99. package/lib/components/Toaster/useToaster.js +9 -9
  100. package/lib/components/Toaster/useToaster.js.map +1 -1
  101. package/lib/components/Toaster/useToasterFocusManagement.js +5 -5
  102. package/lib/components/Toaster/useToasterFocusManagement.js.map +1 -1
  103. package/lib/components/Toaster/useToasterStyles.styles.js +2 -2
  104. package/lib/components/Toaster/useToasterStyles.styles.js.map +1 -1
  105. package/lib/components/Toaster/useToasterStyles.styles.raw.js +2 -2
  106. package/lib/components/Toaster/useToasterStyles.styles.raw.js.map +1 -1
  107. package/lib/contexts/toastContainerContext.js +1 -1
  108. package/lib/index.js +10 -10
  109. package/lib/index.js.map +1 -1
  110. package/lib/state/index.js +4 -4
  111. package/lib/state/index.js.map +1 -1
  112. package/lib/state/useToastController.js +3 -3
  113. package/lib/state/useToastController.js.map +1 -1
  114. package/lib/state/useToaster.js +5 -5
  115. package/lib/state/useToaster.js.map +1 -1
  116. package/lib/state/vanilla/createToaster.js +2 -2
  117. package/lib/state/vanilla/dismissAllToasts.js +1 -1
  118. package/lib/state/vanilla/dismissAllToasts.js.map +1 -1
  119. package/lib/state/vanilla/dismissToast.js +1 -1
  120. package/lib/state/vanilla/dismissToast.js.map +1 -1
  121. package/lib/state/vanilla/dispatchToast.js +1 -1
  122. package/lib/state/vanilla/dispatchToast.js.map +1 -1
  123. package/lib/state/vanilla/index.js +8 -8
  124. package/lib/state/vanilla/index.js.map +1 -1
  125. package/lib/state/vanilla/pauseToast.js +1 -1
  126. package/lib/state/vanilla/pauseToast.js.map +1 -1
  127. package/lib/state/vanilla/playToast.js +1 -1
  128. package/lib/state/vanilla/playToast.js.map +1 -1
  129. package/lib/state/vanilla/updateToast.js +1 -1
  130. package/lib/state/vanilla/updateToast.js.map +1 -1
  131. package/lib-commonjs/{AriaLive.js → AriaLive.cjs} +1 -1
  132. package/lib-commonjs/{AriaLive.js.map → AriaLive.cjs.map} +1 -1
  133. package/lib-commonjs/{Toast.js → Toast.cjs} +1 -1
  134. package/lib-commonjs/{Toast.js.map → Toast.cjs.map} +1 -1
  135. package/lib-commonjs/{ToastBody.js → ToastBody.cjs} +1 -1
  136. package/lib-commonjs/{ToastBody.js.map → ToastBody.cjs.map} +1 -1
  137. package/lib-commonjs/{ToastContainer.js → ToastContainer.cjs} +1 -1
  138. package/lib-commonjs/{ToastContainer.js.map → ToastContainer.cjs.map} +1 -1
  139. package/lib-commonjs/{ToastFooter.js → ToastFooter.cjs} +1 -1
  140. package/lib-commonjs/{ToastFooter.js.map → ToastFooter.cjs.map} +1 -1
  141. package/lib-commonjs/{ToastTitle.js → ToastTitle.cjs} +1 -1
  142. package/lib-commonjs/{ToastTitle.js.map → ToastTitle.cjs.map} +1 -1
  143. package/lib-commonjs/{ToastTrigger.js → ToastTrigger.cjs} +1 -1
  144. package/lib-commonjs/{ToastTrigger.js.map → ToastTrigger.cjs.map} +1 -1
  145. package/lib-commonjs/{Toaster.js → Toaster.cjs} +1 -1
  146. package/lib-commonjs/{Toaster.js.map → Toaster.cjs.map} +1 -1
  147. package/lib-commonjs/components/AriaLive/{AriaLive.js → AriaLive.cjs} +3 -3
  148. package/lib-commonjs/components/AriaLive/{AriaLive.js.map → AriaLive.cjs.map} +1 -1
  149. package/lib-commonjs/components/AriaLive/{index.js → index.cjs} +4 -4
  150. package/lib-commonjs/components/AriaLive/{index.js.map → index.cjs.map} +1 -1
  151. package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.cjs.map +1 -0
  152. package/lib-commonjs/components/Timer/{Timer.js → Timer.cjs} +1 -1
  153. package/lib-commonjs/components/Timer/{Timer.js.map → Timer.cjs.map} +1 -1
  154. package/lib-commonjs/components/Timer/{index.js → index.cjs} +1 -1
  155. package/lib-commonjs/components/Timer/{index.js.map → index.cjs.map} +1 -1
  156. package/lib-commonjs/components/Timer/useTimerStyles.styles.cjs.map +1 -0
  157. package/lib-commonjs/components/Toast/{Toast.js → Toast.cjs} +4 -4
  158. package/lib-commonjs/components/Toast/{Toast.js.map → Toast.cjs.map} +1 -1
  159. package/lib-commonjs/components/Toast/{index.js → index.cjs} +4 -4
  160. package/lib-commonjs/components/Toast/{index.js.map → index.cjs.map} +1 -1
  161. package/lib-commonjs/components/Toast/{useToast.js → useToast.cjs} +1 -1
  162. package/lib-commonjs/components/Toast/{useToast.js.map → useToast.cjs.map} +1 -1
  163. package/lib-commonjs/components/Toast/useToastStyles.styles.cjs.map +1 -0
  164. package/lib-commonjs/components/ToastBody/{ToastBody.js → ToastBody.cjs} +3 -3
  165. package/lib-commonjs/components/ToastBody/{ToastBody.js.map → ToastBody.cjs.map} +1 -1
  166. package/lib-commonjs/components/ToastBody/{index.js → index.cjs} +4 -4
  167. package/lib-commonjs/components/ToastBody/{index.js.map → index.cjs.map} +1 -1
  168. package/lib-commonjs/components/ToastBody/{useToastBody.js → useToastBody.cjs} +1 -1
  169. package/lib-commonjs/components/ToastBody/{useToastBody.js.map → useToastBody.cjs.map} +1 -1
  170. package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.cjs.map +1 -0
  171. package/lib-commonjs/components/ToastContainer/{ToastContainer.js → ToastContainer.cjs} +4 -4
  172. package/lib-commonjs/components/ToastContainer/{ToastContainer.js.map → ToastContainer.cjs.map} +1 -1
  173. package/lib-commonjs/components/ToastContainer/{index.js → index.cjs} +5 -5
  174. package/lib-commonjs/components/ToastContainer/{index.js.map → index.cjs.map} +1 -1
  175. package/lib-commonjs/components/ToastContainer/{renderToastContainer.js → renderToastContainer.cjs} +1 -1
  176. package/lib-commonjs/components/ToastContainer/{renderToastContainer.js.map → renderToastContainer.cjs.map} +1 -1
  177. package/lib-commonjs/components/ToastContainer/{useToastContainer.js → useToastContainer.cjs} +1 -1
  178. package/lib-commonjs/components/ToastContainer/{useToastContainer.js.map → useToastContainer.cjs.map} +1 -1
  179. package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.cjs.map +1 -0
  180. package/lib-commonjs/components/ToastFooter/{ToastFooter.js → ToastFooter.cjs} +3 -3
  181. package/lib-commonjs/components/ToastFooter/{ToastFooter.js.map → ToastFooter.cjs.map} +1 -1
  182. package/lib-commonjs/components/ToastFooter/{index.js → index.cjs} +4 -4
  183. package/lib-commonjs/components/ToastFooter/{index.js.map → index.cjs.map} +1 -1
  184. package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.cjs.map +1 -0
  185. package/lib-commonjs/components/ToastTitle/{ToastTitle.js → ToastTitle.cjs} +3 -3
  186. package/lib-commonjs/components/ToastTitle/{ToastTitle.js.map → ToastTitle.cjs.map} +1 -1
  187. package/lib-commonjs/components/ToastTitle/{index.js → index.cjs} +4 -4
  188. package/lib-commonjs/components/ToastTitle/{index.js.map → index.cjs.map} +1 -1
  189. package/lib-commonjs/components/ToastTitle/{useToastTitle.js → useToastTitle.cjs} +1 -1
  190. package/lib-commonjs/components/ToastTitle/{useToastTitle.js.map → useToastTitle.cjs.map} +1 -1
  191. package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.cjs.map +1 -0
  192. package/lib-commonjs/components/ToastTrigger/{ToastTrigger.js → ToastTrigger.cjs} +2 -2
  193. package/lib-commonjs/components/ToastTrigger/{ToastTrigger.js.map → ToastTrigger.cjs.map} +1 -1
  194. package/lib-commonjs/components/ToastTrigger/{index.js → index.cjs} +3 -3
  195. package/lib-commonjs/components/ToastTrigger/{index.js.map → index.cjs.map} +1 -1
  196. package/lib-commonjs/components/ToastTrigger/{useToastTrigger.js → useToastTrigger.cjs} +1 -1
  197. package/lib-commonjs/components/ToastTrigger/{useToastTrigger.js.map → useToastTrigger.cjs.map} +1 -1
  198. package/lib-commonjs/components/Toaster/{Toaster.js → Toaster.cjs} +3 -3
  199. package/lib-commonjs/components/Toaster/{Toaster.js.map → Toaster.cjs.map} +1 -1
  200. package/lib-commonjs/components/Toaster/{index.js → index.cjs} +5 -5
  201. package/lib-commonjs/components/Toaster/{index.js.map → index.cjs.map} +1 -1
  202. package/lib-commonjs/components/Toaster/{renderToaster.js → renderToaster.cjs} +2 -2
  203. package/lib-commonjs/components/Toaster/{renderToaster.js.map → renderToaster.cjs.map} +1 -1
  204. package/lib-commonjs/components/Toaster/{useToaster.js → useToaster.cjs} +12 -12
  205. package/lib-commonjs/components/Toaster/{useToaster.js.map → useToaster.cjs.map} +1 -1
  206. package/lib-commonjs/components/Toaster/{useToasterFocusManagement.js → useToasterFocusManagement.cjs} +2 -2
  207. package/lib-commonjs/components/Toaster/{useToasterFocusManagement.js.map → useToasterFocusManagement.cjs.map} +1 -1
  208. package/lib-commonjs/components/Toaster/{useToasterStyles.styles.js → useToasterStyles.styles.cjs} +1 -1
  209. package/lib-commonjs/components/Toaster/useToasterStyles.styles.cjs.map +1 -0
  210. package/lib-commonjs/components/Toaster/{useToasterStyles.styles.raw.js → useToasterStyles.styles.raw.cjs} +1 -1
  211. package/lib-commonjs/components/Toaster/{useToasterStyles.styles.raw.js.map → useToasterStyles.styles.raw.cjs.map} +1 -1
  212. package/lib-commonjs/{index.js → index.cjs} +11 -11
  213. package/lib-commonjs/{index.js.map → index.cjs.map} +1 -1
  214. package/lib-commonjs/state/{index.js → index.cjs} +5 -5
  215. package/lib-commonjs/state/{index.js.map → index.cjs.map} +1 -1
  216. package/lib-commonjs/state/{useToastController.js → useToastController.cjs} +7 -7
  217. package/lib-commonjs/state/{useToastController.js.map → useToastController.cjs.map} +1 -1
  218. package/lib-commonjs/state/{useToaster.js → useToaster.cjs} +3 -3
  219. package/lib-commonjs/state/{useToaster.js.map → useToaster.cjs.map} +1 -1
  220. package/lib-commonjs/state/vanilla/{dismissAllToasts.js → dismissAllToasts.cjs} +1 -1
  221. package/lib-commonjs/state/vanilla/{dismissAllToasts.js.map → dismissAllToasts.cjs.map} +1 -1
  222. package/lib-commonjs/state/vanilla/{dismissToast.js → dismissToast.cjs} +1 -1
  223. package/lib-commonjs/state/vanilla/{dismissToast.js.map → dismissToast.cjs.map} +1 -1
  224. package/lib-commonjs/state/vanilla/{dispatchToast.js → dispatchToast.cjs} +1 -1
  225. package/lib-commonjs/state/vanilla/{dispatchToast.js.map → dispatchToast.cjs.map} +1 -1
  226. package/lib-commonjs/state/vanilla/{index.js → index.cjs} +8 -8
  227. package/lib-commonjs/state/vanilla/{index.js.map → index.cjs.map} +1 -1
  228. package/lib-commonjs/state/vanilla/{pauseToast.js → pauseToast.cjs} +1 -1
  229. package/lib-commonjs/state/vanilla/{pauseToast.js.map → pauseToast.cjs.map} +1 -1
  230. package/lib-commonjs/state/vanilla/{playToast.js → playToast.cjs} +1 -1
  231. package/lib-commonjs/state/vanilla/{playToast.js.map → playToast.cjs.map} +1 -1
  232. package/lib-commonjs/state/vanilla/{updateToast.js → updateToast.cjs} +1 -1
  233. package/lib-commonjs/state/vanilla/{updateToast.js.map → updateToast.cjs.map} +1 -1
  234. package/package.json +23 -17
  235. package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.js.map +0 -1
  236. package/lib-commonjs/components/Timer/useTimerStyles.styles.js.map +0 -1
  237. package/lib-commonjs/components/Toast/useToastStyles.styles.js.map +0 -1
  238. package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.js.map +0 -1
  239. package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.js.map +0 -1
  240. package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.js.map +0 -1
  241. package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.js.map +0 -1
  242. package/lib-commonjs/components/Toaster/useToasterStyles.styles.js.map +0 -1
  243. /package/lib-commonjs/components/AriaLive/{AriaLive.types.js → AriaLive.types.cjs} +0 -0
  244. /package/lib-commonjs/components/AriaLive/{AriaLive.types.js.map → AriaLive.types.cjs.map} +0 -0
  245. /package/lib-commonjs/components/AriaLive/{renderAriaLive.js → renderAriaLive.cjs} +0 -0
  246. /package/lib-commonjs/components/AriaLive/{renderAriaLive.js.map → renderAriaLive.cjs.map} +0 -0
  247. /package/lib-commonjs/components/AriaLive/{useAriaLive.js → useAriaLive.cjs} +0 -0
  248. /package/lib-commonjs/components/AriaLive/{useAriaLive.js.map → useAriaLive.cjs.map} +0 -0
  249. /package/lib-commonjs/components/AriaLive/{useAriaLiveStyles.styles.js → useAriaLiveStyles.styles.cjs} +0 -0
  250. /package/lib-commonjs/components/AriaLive/{useAriaLiveStyles.styles.raw.js → useAriaLiveStyles.styles.raw.cjs} +0 -0
  251. /package/lib-commonjs/components/AriaLive/{useAriaLiveStyles.styles.raw.js.map → useAriaLiveStyles.styles.raw.cjs.map} +0 -0
  252. /package/lib-commonjs/components/Timer/{useTimerStyles.styles.js → useTimerStyles.styles.cjs} +0 -0
  253. /package/lib-commonjs/components/Timer/{useTimerStyles.styles.raw.js → useTimerStyles.styles.raw.cjs} +0 -0
  254. /package/lib-commonjs/components/Timer/{useTimerStyles.styles.raw.js.map → useTimerStyles.styles.raw.cjs.map} +0 -0
  255. /package/lib-commonjs/components/Toast/{Toast.types.js → Toast.types.cjs} +0 -0
  256. /package/lib-commonjs/components/Toast/{Toast.types.js.map → Toast.types.cjs.map} +0 -0
  257. /package/lib-commonjs/components/Toast/{renderToast.js → renderToast.cjs} +0 -0
  258. /package/lib-commonjs/components/Toast/{renderToast.js.map → renderToast.cjs.map} +0 -0
  259. /package/lib-commonjs/components/Toast/{useToastContextValues.js → useToastContextValues.cjs} +0 -0
  260. /package/lib-commonjs/components/Toast/{useToastContextValues.js.map → useToastContextValues.cjs.map} +0 -0
  261. /package/lib-commonjs/components/Toast/{useToastStyles.styles.js → useToastStyles.styles.cjs} +0 -0
  262. /package/lib-commonjs/components/Toast/{useToastStyles.styles.raw.js → useToastStyles.styles.raw.cjs} +0 -0
  263. /package/lib-commonjs/components/Toast/{useToastStyles.styles.raw.js.map → useToastStyles.styles.raw.cjs.map} +0 -0
  264. /package/lib-commonjs/components/ToastBody/{ToastBody.types.js → ToastBody.types.cjs} +0 -0
  265. /package/lib-commonjs/components/ToastBody/{ToastBody.types.js.map → ToastBody.types.cjs.map} +0 -0
  266. /package/lib-commonjs/components/ToastBody/{renderToastBody.js → renderToastBody.cjs} +0 -0
  267. /package/lib-commonjs/components/ToastBody/{renderToastBody.js.map → renderToastBody.cjs.map} +0 -0
  268. /package/lib-commonjs/components/ToastBody/{useToastBodyStyles.styles.js → useToastBodyStyles.styles.cjs} +0 -0
  269. /package/lib-commonjs/components/ToastBody/{useToastBodyStyles.styles.raw.js → useToastBodyStyles.styles.raw.cjs} +0 -0
  270. /package/lib-commonjs/components/ToastBody/{useToastBodyStyles.styles.raw.js.map → useToastBodyStyles.styles.raw.cjs.map} +0 -0
  271. /package/lib-commonjs/components/ToastContainer/{ToastContainer.types.js → ToastContainer.types.cjs} +0 -0
  272. /package/lib-commonjs/components/ToastContainer/{ToastContainer.types.js.map → ToastContainer.types.cjs.map} +0 -0
  273. /package/lib-commonjs/components/ToastContainer/{useToastContainerContextValues.js → useToastContainerContextValues.cjs} +0 -0
  274. /package/lib-commonjs/components/ToastContainer/{useToastContainerContextValues.js.map → useToastContainerContextValues.cjs.map} +0 -0
  275. /package/lib-commonjs/components/ToastContainer/{useToastContainerStyles.styles.js → useToastContainerStyles.styles.cjs} +0 -0
  276. /package/lib-commonjs/components/ToastContainer/{useToastContainerStyles.styles.raw.js → useToastContainerStyles.styles.raw.cjs} +0 -0
  277. /package/lib-commonjs/components/ToastContainer/{useToastContainerStyles.styles.raw.js.map → useToastContainerStyles.styles.raw.cjs.map} +0 -0
  278. /package/lib-commonjs/components/ToastFooter/{ToastFooter.types.js → ToastFooter.types.cjs} +0 -0
  279. /package/lib-commonjs/components/ToastFooter/{ToastFooter.types.js.map → ToastFooter.types.cjs.map} +0 -0
  280. /package/lib-commonjs/components/ToastFooter/{renderToastFooter.js → renderToastFooter.cjs} +0 -0
  281. /package/lib-commonjs/components/ToastFooter/{renderToastFooter.js.map → renderToastFooter.cjs.map} +0 -0
  282. /package/lib-commonjs/components/ToastFooter/{useToastFooter.js → useToastFooter.cjs} +0 -0
  283. /package/lib-commonjs/components/ToastFooter/{useToastFooter.js.map → useToastFooter.cjs.map} +0 -0
  284. /package/lib-commonjs/components/ToastFooter/{useToastFooterStyles.styles.js → useToastFooterStyles.styles.cjs} +0 -0
  285. /package/lib-commonjs/components/ToastFooter/{useToastFooterStyles.styles.raw.js → useToastFooterStyles.styles.raw.cjs} +0 -0
  286. /package/lib-commonjs/components/ToastFooter/{useToastFooterStyles.styles.raw.js.map → useToastFooterStyles.styles.raw.cjs.map} +0 -0
  287. /package/lib-commonjs/components/ToastTitle/{ToastTitle.types.js → ToastTitle.types.cjs} +0 -0
  288. /package/lib-commonjs/components/ToastTitle/{ToastTitle.types.js.map → ToastTitle.types.cjs.map} +0 -0
  289. /package/lib-commonjs/components/ToastTitle/{renderToastTitle.js → renderToastTitle.cjs} +0 -0
  290. /package/lib-commonjs/components/ToastTitle/{renderToastTitle.js.map → renderToastTitle.cjs.map} +0 -0
  291. /package/lib-commonjs/components/ToastTitle/{useToastTitleStyles.styles.js → useToastTitleStyles.styles.cjs} +0 -0
  292. /package/lib-commonjs/components/ToastTitle/{useToastTitleStyles.styles.raw.js → useToastTitleStyles.styles.raw.cjs} +0 -0
  293. /package/lib-commonjs/components/ToastTitle/{useToastTitleStyles.styles.raw.js.map → useToastTitleStyles.styles.raw.cjs.map} +0 -0
  294. /package/lib-commonjs/components/ToastTrigger/{ToastTrigger.types.js → ToastTrigger.types.cjs} +0 -0
  295. /package/lib-commonjs/components/ToastTrigger/{ToastTrigger.types.js.map → ToastTrigger.types.cjs.map} +0 -0
  296. /package/lib-commonjs/components/ToastTrigger/{renderToastTrigger.js → renderToastTrigger.cjs} +0 -0
  297. /package/lib-commonjs/components/ToastTrigger/{renderToastTrigger.js.map → renderToastTrigger.cjs.map} +0 -0
  298. /package/lib-commonjs/components/Toaster/{Toaster.types.js → Toaster.types.cjs} +0 -0
  299. /package/lib-commonjs/components/Toaster/{Toaster.types.js.map → Toaster.types.cjs.map} +0 -0
  300. /package/lib-commonjs/components/Toaster/{useToastAnnounce.js → useToastAnnounce.cjs} +0 -0
  301. /package/lib-commonjs/components/Toaster/{useToastAnnounce.js.map → useToastAnnounce.cjs.map} +0 -0
  302. /package/lib-commonjs/contexts/{toastContainerContext.js → toastContainerContext.cjs} +0 -0
  303. /package/lib-commonjs/contexts/{toastContainerContext.js.map → toastContainerContext.cjs.map} +0 -0
  304. /package/lib-commonjs/state/{constants.js → constants.cjs} +0 -0
  305. /package/lib-commonjs/state/{constants.js.map → constants.cjs.map} +0 -0
  306. /package/lib-commonjs/state/{types.js → types.cjs} +0 -0
  307. /package/lib-commonjs/state/{types.js.map → types.cjs.map} +0 -0
  308. /package/lib-commonjs/state/vanilla/{createToaster.js → createToaster.cjs} +0 -0
  309. /package/lib-commonjs/state/vanilla/{createToaster.js.map → createToaster.cjs.map} +0 -0
  310. /package/lib-commonjs/state/vanilla/{getPositionStyles.js → getPositionStyles.cjs} +0 -0
  311. /package/lib-commonjs/state/vanilla/{getPositionStyles.js.map → getPositionStyles.cjs.map} +0 -0
@@ -28,7 +28,7 @@ _export(exports, {
28
28
  return _useToastTitle.useToastTitle_unstable;
29
29
  }
30
30
  });
31
- const _ToastTitle = require("./ToastTitle");
32
- const _renderToastTitle = require("./renderToastTitle");
33
- const _useToastTitle = require("./useToastTitle");
34
- const _useToastTitleStylesstyles = require("./useToastTitleStyles.styles");
31
+ const _ToastTitle = require("./ToastTitle.cjs");
32
+ const _renderToastTitle = require("./renderToastTitle.cjs");
33
+ const _useToastTitle = require("./useToastTitle.cjs");
34
+ const _useToastTitleStylesstyles = require("./useToastTitleStyles.styles.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ToastTitle/index.ts"],"sourcesContent":["export { ToastTitle } from './ToastTitle';\nexport type {\n ToastTitleBaseProps,\n ToastTitleBaseState,\n ToastTitleProps,\n ToastTitleSlots,\n ToastTitleState,\n} from './ToastTitle.types';\nexport { renderToastTitle_unstable } from './renderToastTitle';\nexport { useToastTitleBase_unstable, useToastTitle_unstable } from './useToastTitle';\nexport { toastTitleClassNames, useToastTitleStyles_unstable } from './useToastTitleStyles.styles';\n"],"names":["ToastTitle","renderToastTitle_unstable","useToastTitleBase_unstable","useToastTitle_unstable","toastTitleClassNames","useToastTitleStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,sBAAU;;;eAQVC,2CAAyB;;;eAEzBG,+CAAoB;;;eADpBF,yCAA0B;;;eACJG,uDAA4B;;;eADtBF,qCAAsB;;;4BAThC,eAAe;kCAQA,qBAAqB;+BACI,kBAAkB;2CAClB,+BAA+B"}
1
+ {"version":3,"sources":["../src/components/ToastTitle/index.ts"],"sourcesContent":["export { ToastTitle } from './ToastTitle';\nexport type {\n ToastTitleBaseProps,\n ToastTitleBaseState,\n ToastTitleProps,\n ToastTitleSlots,\n ToastTitleState,\n} from './ToastTitle.types';\nexport { renderToastTitle_unstable } from './renderToastTitle';\nexport { useToastTitleBase_unstable, useToastTitle_unstable } from './useToastTitle';\nexport { toastTitleClassNames, useToastTitleStyles_unstable } from './useToastTitleStyles.styles';\n"],"names":["ToastTitle","renderToastTitle_unstable","useToastTitleBase_unstable","useToastTitle_unstable","toastTitleClassNames","useToastTitleStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,sBAAU;;;eAQVC,2CAAyB;;;eAEzBG,+CAAoB;;;eADpBF,yCAA0B;;;eACJG,uDAA4B;;;eADtBF,qCAAsB;;;4BAThC,kBAAe;kCAQA,wBAAqB;+BACI,qBAAkB;2CAClB,kCAA+B"}
@@ -22,7 +22,7 @@ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
22
22
  const _reacticons = require("@fluentui/react-icons");
23
23
  const _reactutilities = require("@fluentui/react-utilities");
24
24
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
25
- const _toastContainerContext = require("../../contexts/toastContainerContext");
25
+ const _toastContainerContext = require("../../contexts/toastContainerContext.cjs");
26
26
  const useToastTitleBase_unstable = (props, ref)=>{
27
27
  const { intent, titleId } = (0, _toastContainerContext.useToastContainerContext)();
28
28
  return {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ToastTitle/useToastTitle.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { CheckmarkCircleFilled, DiamondDismissFilled, InfoFilled, WarningFilled } from '@fluentui/react-icons';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { useBackgroundAppearance } from '@fluentui/react-shared-contexts';\n\nimport type { ToastTitleBaseProps, ToastTitleBaseState, ToastTitleProps, ToastTitleState } from './ToastTitle.types';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\n\n/**\n * Create the base state required to render ToastTitle, without design-only props.\n *\n * @param props - props from this instance of ToastTitle\n * @param ref - reference to root HTMLElement of ToastTitle\n */\nexport const useToastTitleBase_unstable = (\n props: ToastTitleBaseProps,\n ref: React.Ref<HTMLElement>,\n): ToastTitleBaseState => {\n const { intent, titleId } = useToastContainerContext();\n\n return {\n action: slot.optional(props.action, { elementType: 'div' }),\n components: { root: 'div', media: 'div', action: 'div' },\n media: slot.optional(props.media, {\n renderByDefault: !!intent,\n elementType: 'div',\n }),\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n children: props.children,\n id: titleId,\n ...props,\n }),\n { elementType: 'div' },\n ),\n intent,\n };\n};\n\n/**\n * Create the state required to render ToastTitle.\n *\n * The returned state can be modified with hooks such as useToastTitleStyles_unstable,\n * before being passed to renderToastTitle_unstable.\n *\n * @param props - props from this instance of ToastTitle\n * @param ref - reference to root HTMLElement of ToastTitle\n */\nexport const useToastTitle_unstable = (props: ToastTitleProps, ref: React.Ref<HTMLElement>): ToastTitleState => {\n 'use no memo';\n\n const backgroundAppearance = useBackgroundAppearance();\n const baseState = useToastTitleBase_unstable(props, ref);\n\n /** Determine the role and media to render based on the intent */\n let defaultIcon;\n switch (baseState.intent) {\n case 'success':\n defaultIcon = <CheckmarkCircleFilled />;\n break;\n case 'error':\n defaultIcon = <DiamondDismissFilled />;\n break;\n case 'warning':\n defaultIcon = <WarningFilled />;\n break;\n case 'info':\n defaultIcon = <InfoFilled />;\n break;\n }\n\n return {\n ...baseState,\n media: slot.optional(props.media, {\n defaultProps: { children: defaultIcon },\n renderByDefault: !!baseState.intent,\n elementType: 'div',\n }),\n backgroundAppearance,\n };\n};\n"],"names":["React","CheckmarkCircleFilled","DiamondDismissFilled","InfoFilled","WarningFilled","getIntrinsicElementProps","slot","useBackgroundAppearance","useToastContainerContext","useToastTitleBase_unstable","props","ref","intent","titleId","action","optional","elementType","components","root","media","renderByDefault","always","children","id","useToastTitle_unstable","backgroundAppearance","baseState","defaultIcon","defaultProps"],"mappings":"AAAA;;;;;;;;;;;;IAiBaS,0BAAAA;;;0BAsCAe;eAAAA;;;;iEArDU,QAAQ;4BAEwD,wBAAwB;gCAChE,4BAA4B;qCACnC,kCAAkC;uCAGjC,uCAAuC;AAQzE,mCAAmC,CACxCd,OACAC;IAEA,MAAM,EAAEC,MAAM,EAAEC,OAAO,EAAE,OAAGL,+CAAAA;IAE5B,OAAO;QACLM,QAAQR,oBAAAA,CAAKS,QAAQ,CAACL,MAAMI,MAAM,EAAE;YAAEE,aAAa;QAAM;QACzDC,YAAY;YAAEC,MAAM;YAAOC,OAAO;YAAOL,QAAQ;QAAM;QACvDK,OAAOb,oBAAAA,CAAKS,QAAQ,CAACL,MAAMS,KAAK,EAAE;YAChCC,iBAAiB,CAAC,CAACR;YACnBI,aAAa;QACf;QACAE,MAAMZ,oBAAAA,CAAKe,MAAM,KACfhB,wCAAAA,EAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FM,KAAKA;YACLW,UAAUZ,MAAMY,QAAQ;YACxBC,IAAIV;YACJ,GAAGH,KAAK;QACV,IACA;YAAEM,aAAa;QAAM;QAEvBJ;IACF;AACF,EAAE;AAWK,+BAA+B,CAACF,OAAwBC;IAC7D;IAEA,MAAMc,2BAAuBlB,4CAAAA;IAC7B,MAAMmB,YAAYjB,2BAA2BC,OAAOC;IAEpD,+DAA+D,GAC/D,IAAIgB;IACJ,OAAQD,UAAUd,MAAM;QACtB,KAAK;YACHe,cAAAA,WAAAA,GAAc,OAAA,aAAA,CAAC1B,iCAAAA,EAAAA;YACf;QACF,KAAK;YACH0B,cAAAA,WAAAA,GAAc,OAAA,aAAA,CAACzB,gCAAAA,EAAAA;YACf;QACF,KAAK;YACHyB,cAAAA,WAAAA,GAAc,OAAA,aAAA,CAACvB,yBAAAA,EAAAA;YACf;QACF,KAAK;YACHuB,cAAAA,WAAAA,GAAc,OAAA,aAAA,CAACxB,sBAAAA,EAAAA;YACf;IACJ;IAEA,OAAO;QACL,GAAGuB,SAAS;QACZP,OAAOb,oBAAAA,CAAKS,QAAQ,CAACL,MAAMS,KAAK,EAAE;YAChCS,cAAc;gBAAEN,UAAUK;YAAY;YACtCP,iBAAiB,CAAC,CAACM,UAAUd,MAAM;YACnCI,aAAa;QACf;QACAS;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/ToastTitle/useToastTitle.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport { CheckmarkCircleFilled, DiamondDismissFilled, InfoFilled, WarningFilled } from '@fluentui/react-icons';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { useBackgroundAppearance } from '@fluentui/react-shared-contexts';\n\nimport type { ToastTitleBaseProps, ToastTitleBaseState, ToastTitleProps, ToastTitleState } from './ToastTitle.types';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\n\n/**\n * Create the base state required to render ToastTitle, without design-only props.\n *\n * @param props - props from this instance of ToastTitle\n * @param ref - reference to root HTMLElement of ToastTitle\n */\nexport const useToastTitleBase_unstable = (\n props: ToastTitleBaseProps,\n ref: React.Ref<HTMLElement>,\n): ToastTitleBaseState => {\n const { intent, titleId } = useToastContainerContext();\n\n return {\n action: slot.optional(props.action, { elementType: 'div' }),\n components: { root: 'div', media: 'div', action: 'div' },\n media: slot.optional(props.media, {\n renderByDefault: !!intent,\n elementType: 'div',\n }),\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n children: props.children,\n id: titleId,\n ...props,\n }),\n { elementType: 'div' },\n ),\n intent,\n };\n};\n\n/**\n * Create the state required to render ToastTitle.\n *\n * The returned state can be modified with hooks such as useToastTitleStyles_unstable,\n * before being passed to renderToastTitle_unstable.\n *\n * @param props - props from this instance of ToastTitle\n * @param ref - reference to root HTMLElement of ToastTitle\n */\nexport const useToastTitle_unstable = (props: ToastTitleProps, ref: React.Ref<HTMLElement>): ToastTitleState => {\n 'use no memo';\n\n const backgroundAppearance = useBackgroundAppearance();\n const baseState = useToastTitleBase_unstable(props, ref);\n\n /** Determine the role and media to render based on the intent */\n let defaultIcon;\n switch (baseState.intent) {\n case 'success':\n defaultIcon = <CheckmarkCircleFilled />;\n break;\n case 'error':\n defaultIcon = <DiamondDismissFilled />;\n break;\n case 'warning':\n defaultIcon = <WarningFilled />;\n break;\n case 'info':\n defaultIcon = <InfoFilled />;\n break;\n }\n\n return {\n ...baseState,\n media: slot.optional(props.media, {\n defaultProps: { children: defaultIcon },\n renderByDefault: !!baseState.intent,\n elementType: 'div',\n }),\n backgroundAppearance,\n };\n};\n"],"names":["React","CheckmarkCircleFilled","DiamondDismissFilled","InfoFilled","WarningFilled","getIntrinsicElementProps","slot","useBackgroundAppearance","useToastContainerContext","useToastTitleBase_unstable","props","ref","intent","titleId","action","optional","elementType","components","root","media","renderByDefault","always","children","id","useToastTitle_unstable","backgroundAppearance","baseState","defaultIcon","defaultProps"],"mappings":"AAAA;;;;;;;;;;;;IAiBaS,0BAAAA;;;0BAsCAe;eAAAA;;;;iEArDU,QAAQ;4BAEwD,wBAAwB;gCAChE,4BAA4B;qCACnC,kCAAkC;uCAGjC,0CAAuC;AAQzE,mCAAmC,CACxCd,OACAC;IAEA,MAAM,EAAEC,MAAM,EAAEC,OAAO,EAAE,OAAGL,+CAAAA;IAE5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astTitleStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeStyles, makeResetStyles, mergeClasses } from \"@griffel/react\";\nimport { tokens } from \"@fluentui/react-theme\";\nexport const toastTitleClassNames = {\n root: 'fui-ToastTitle',\n media: 'fui-ToastTitle__media',\n action: 'fui-ToastTitle__action'\n};\nconst useRootBaseClassName = makeResetStyles({\n display: 'flex',\n gridColumnEnd: 3,\n color: tokens.colorNeutralForeground1,\n wordBreak: 'break-word'\n});\nconst useMediaBaseClassName = makeResetStyles({\n display: 'flex',\n paddingTop: '2px',\n gridColumnEnd: 2,\n paddingRight: '8px',\n fontSize: '16px',\n color: tokens.colorNeutralForeground1\n});\nconst useActionBaseClassName = makeResetStyles({\n display: 'flex',\n alignItems: 'start',\n paddingLeft: '12px',\n gridColumnEnd: -1,\n color: tokens.colorBrandForeground1\n});\nconst useInvertedStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForegroundInverted2\n },\n action: {\n color: tokens.colorBrandForegroundInverted\n },\n media: {\n color: tokens.colorNeutralForegroundInverted\n }\n});\nconst useIntentIconStyles = makeStyles({\n success: {\n color: tokens.colorStatusSuccessForeground1\n },\n error: {\n color: tokens.colorStatusDangerForeground1\n },\n warning: {\n color: tokens.colorStatusWarningForeground1\n },\n info: {\n color: tokens.colorNeutralForeground2\n }\n});\nconst useIntentIconStylesInverted = makeStyles({\n success: {\n color: tokens.colorStatusSuccessForegroundInverted\n },\n error: {\n color: tokens.colorStatusDangerForegroundInverted\n },\n warning: {\n color: tokens.colorStatusWarningForegroundInverted\n },\n info: {\n color: tokens.colorNeutralForegroundInverted2\n }\n});\n/**\n * Apply styling to the ToastTitle slots based on the state\n */ export const useToastTitleStyles_unstable = (state)=>{\n const rootBaseClassName = useRootBaseClassName();\n const actionBaseClassName = useActionBaseClassName();\n const mediaBaseClassName = useMediaBaseClassName();\n const intentIconStyles = useIntentIconStyles();\n const intentIconStylesInverted = useIntentIconStylesInverted();\n const { intent } = state;\n const invertedStyles = useInvertedStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(toastTitleClassNames.root, rootBaseClassName, state.backgroundAppearance === 'inverted' && invertedStyles.root, state.root.className);\n if (state.media) {\n // eslint-disable-next-line react-hooks/immutability\n state.media.className = mergeClasses(toastTitleClassNames.media, mediaBaseClassName, state.backgroundAppearance === 'inverted' && invertedStyles.media, intent && intentIconStyles[intent], intent && state.backgroundAppearance === 'inverted' && intentIconStylesInverted[intent], state.media.className);\n }\n if (state.action) {\n // eslint-disable-next-line react-hooks/immutability\n state.action.className = mergeClasses(toastTitleClassNames.action, actionBaseClassName, state.backgroundAppearance === 'inverted' && invertedStyles.action, state.action.className);\n }\n return state;\n};\n"],"names":["__styles","__resetStyles","mergeClasses","tokens","toastTitleClassNames","root","media","action","useRootBaseClassName","useMediaBaseClassName","useActionBaseClassName","useInvertedStyles","sj55zd","d","useIntentIconStyles","success","error","warning","info","useIntentIconStylesInverted","useToastTitleStyles_unstable","state","rootBaseClassName","actionBaseClassName","mediaBaseClassName","intentIconStyles","intentIconStylesInverted","intent","invertedStyles","className","backgroundAppearance"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAGCI,oBAAoB;;;gCAmEY;eAA5BgB;;;uBArEyC,gBAAgB;AAEnE,6BAA6B;IAChCf,IAAI,EAAE,gBAAgB;IACtBC,KAAK,EAAE,uBAAuB;IAC9BC,MAAM,EAAE;AACZ,CAAC;AACD,MAAMC,oBAAoB,GAAA,WAAA,OAAGP,oBAAA,EAAA,WAAA,MAAA;IAAA;CAK5B,CAAC;AACF,MAAMQ,qBAAqB,GAAA,WAAA,OAAGR,oBAAA,EAAA,WAAA,YAAA;IAAA;IAAA;CAO7B,CAAC;AACF,MAAMS,sBAAsB,GAAA,WAAA,OAAGT,oBAAA,EAAA,WAAA,WAAA;IAAA;IAAA;CAM9B,CAAC;AACF,MAAMU,iBAAiB,GAAA,WAAA,OAAGX,eAAA,EAAA;IAAAK,IAAA,EAAA;QAAAO,MAAA,EAAA;IAAA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EAACE,oBAAoB,CAACC,IAAI,EAAEiB,iBAAiB,EAAED,KAAK,CAACS,oBAAoB,KAAK,UAAU,IAAIF,cAAc,CAACvB,IAAI,EAAEgB,KAAK,CAAChB,IAAI,CAACwB,SAAS,CAAC;IACzK,IAAIR,KAAK,CAACf,KAAK,EAAE;QACb,oDAAA;QACAe,KAAK,CAACf,KAAK,CAACuB,SAAS,OAAG3B,mBAAY,EAACE,oBAAoB,CAACE,KAAK,EAAEkB,kBAAkB,EAAEH,KAAK,CAACS,oBAAoB,KAAK,UAAU,IAAIF,cAAc,CAACtB,KAAK,EAAEqB,MAAM,IAAIF,gBAAgB,CAACE,MAAM,CAAC,EAAEA,MAAM,IAAIN,KAAK,CAACS,oBAAoB,KAAK,UAAU,IAAIJ,wBAAwB,CAACC,MAAM,CAAC,EAAEN,KAAK,CAACf,KAAK,CAACuB,SAAS,CAAC;IAC/S;IACA,IAAIR,KAAK,CAACd,MAAM,EAAE;QACd,oDAAA;QACAc,KAAK,CAACd,MAAM,CAACsB,SAAS,OAAG3B,mBAAY,EAACE,oBAAoB,CAACG,MAAM,EAAEgB,mBAAmB,EAAEF,KAAK,CAACS,oBAAoB,KAAK,UAAU,IAAIF,cAAc,CAACrB,MAAM,EAAEc,KAAK,CAACd,MAAM,CAACsB,SAAS,CAAC;IACvL;IACA,OAAOR,KAAK;AAChB,CAAC"}
@@ -9,8 +9,8 @@ Object.defineProperty(exports, "ToastTrigger", {
9
9
  return ToastTrigger;
10
10
  }
11
11
  });
12
- const _useToastTrigger = require("./useToastTrigger");
13
- const _renderToastTrigger = require("./renderToastTrigger");
12
+ const _useToastTrigger = require("./useToastTrigger.cjs");
13
+ const _renderToastTrigger = require("./renderToastTrigger.cjs");
14
14
  const ToastTrigger = (props)=>{
15
15
  const state = (0, _useToastTrigger.useToastTrigger_unstable)(props);
16
16
  return (0, _renderToastTrigger.renderToastTrigger_unstable)(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ToastTrigger/ToastTrigger.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useToastTrigger_unstable } from './useToastTrigger';\nimport { renderToastTrigger_unstable } from './renderToastTrigger';\nimport type { ToastTriggerProps } from './ToastTrigger.types';\n\n/**\n * ToastTrigger component\n */\nexport const ToastTrigger: React.FC<ToastTriggerProps> = props => {\n const state = useToastTrigger_unstable(props);\n\n return renderToastTrigger_unstable(state);\n};\n\nToastTrigger.displayName = 'ToastTrigger';\n"],"names":["useToastTrigger_unstable","renderToastTrigger_unstable","ToastTrigger","props","state","displayName"],"mappings":"AAAA;;;;;;;;;;;iCAGyC,oBAAoB;oCACjB,uBAAuB;AAM5D,MAAME,eAA4CC,CAAAA;IACvD,MAAMC,YAAQJ,yCAAAA,EAAyBG;IAEvC,WAAOF,+CAAAA,EAA4BG;AACrC,EAAE;AAEFF,aAAaG,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/ToastTrigger/ToastTrigger.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useToastTrigger_unstable } from './useToastTrigger';\nimport { renderToastTrigger_unstable } from './renderToastTrigger';\nimport type { ToastTriggerProps } from './ToastTrigger.types';\n\n/**\n * ToastTrigger component\n */\nexport const ToastTrigger: React.FC<ToastTriggerProps> = props => {\n const state = useToastTrigger_unstable(props);\n\n return renderToastTrigger_unstable(state);\n};\n\nToastTrigger.displayName = 'ToastTrigger';\n"],"names":["useToastTrigger_unstable","renderToastTrigger_unstable","ToastTrigger","props","state","displayName"],"mappings":"AAAA;;;;;;;;;;;iCAGyC,uBAAoB;oCACjB,0BAAuB;AAM5D,MAAME,eAA4CC,CAAAA;IACvD,MAAMC,YAAQJ,yCAAAA,EAAyBG;IAEvC,WAAOF,+CAAAA,EAA4BG;AACrC,EAAE;AAEFF,aAAaG,WAAW,GAAG"}
@@ -19,6 +19,6 @@ _export(exports, {
19
19
  return _useToastTrigger.useToastTrigger_unstable;
20
20
  }
21
21
  });
22
- const _ToastTrigger = require("./ToastTrigger");
23
- const _renderToastTrigger = require("./renderToastTrigger");
24
- const _useToastTrigger = require("./useToastTrigger");
22
+ const _ToastTrigger = require("./ToastTrigger.cjs");
23
+ const _renderToastTrigger = require("./renderToastTrigger.cjs");
24
+ const _useToastTrigger = require("./useToastTrigger.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ToastTrigger/index.ts"],"sourcesContent":["export { ToastTrigger } from './ToastTrigger';\nexport type { ToastTriggerChildProps, ToastTriggerProps, ToastTriggerState } from './ToastTrigger.types';\nexport { renderToastTrigger_unstable } from './renderToastTrigger';\nexport { useToastTrigger_unstable } from './useToastTrigger';\n"],"names":["ToastTrigger","renderToastTrigger_unstable","useToastTrigger_unstable"],"mappings":";;;;;;;;;;;;eAASA,0BAAY;;;eAEZC,+CAA2B;;;eAC3BC,yCAAwB;;;8BAHJ,iBAAiB;oCAEF,uBAAuB;iCAC1B,oBAAoB"}
1
+ {"version":3,"sources":["../src/components/ToastTrigger/index.ts"],"sourcesContent":["export { ToastTrigger } from './ToastTrigger';\nexport type { ToastTriggerChildProps, ToastTriggerProps, ToastTriggerState } from './ToastTrigger.types';\nexport { renderToastTrigger_unstable } from './renderToastTrigger';\nexport { useToastTrigger_unstable } from './useToastTrigger';\n"],"names":["ToastTrigger","renderToastTrigger_unstable","useToastTrigger_unstable"],"mappings":";;;;;;;;;;;;eAASA,0BAAY;;;eAEZC,+CAA2B;;;eAC3BC,yCAAwB;;;8BAHJ,oBAAiB;oCAEF,0BAAuB;iCAC1B,uBAAoB"}
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "useToastTrigger_unstable", {
11
11
  });
12
12
  const _reactutilities = require("@fluentui/react-utilities");
13
13
  const _reactaria = require("@fluentui/react-aria");
14
- const _toastContainerContext = require("../../contexts/toastContainerContext");
14
+ const _toastContainerContext = require("../../contexts/toastContainerContext.cjs");
15
15
  const useToastTrigger_unstable = (props)=>{
16
16
  const { children, disableButtonEnhancement = false } = props;
17
17
  const { close } = (0, _toastContainerContext.useToastContainerContext)();
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ToastTrigger/useToastTrigger.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport {\n applyTriggerPropsToChildren,\n getTriggerChild,\n getReactElementRef,\n useEventCallback,\n} from '@fluentui/react-utilities';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport type { ToastTriggerProps, ToastTriggerState } from './ToastTrigger.types';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\n\n/**\n * A non-visual component that wraps its child\n * and configures them to be the trigger that will close a `Toast`.\n * This component should only accept one child.\n *\n * This component sole purpose is to avoid opting out of the internal controlled open state of a `Toast`\n * Besides being a trigger that closes a toast through context this component doesn't do much,\n * making it basically unnecessary in cases where the trigger is outside of a toast.\n */\nexport const useToastTrigger_unstable = (props: ToastTriggerProps): ToastTriggerState => {\n const { children, disableButtonEnhancement = false } = props;\n const { close } = useToastContainerContext();\n\n const child = getTriggerChild(children);\n\n const handleClick = useEventCallback(\n (e: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n child?.props.onClick?.(e);\n if (!e.isDefaultPrevented()) {\n close();\n }\n },\n );\n\n const triggerChildProps = {\n ...child?.props,\n ref: getReactElementRef<HTMLButtonElement>(child),\n onClick: handleClick,\n };\n\n const ariaButtonTriggerChildProps = useARIAButtonProps(\n child?.type === 'button' || child?.type === 'a' ? child.type : 'div',\n {\n ...triggerChildProps,\n type: 'button',\n },\n );\n\n return {\n children: applyTriggerPropsToChildren(\n children,\n disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps,\n ),\n };\n};\n"],"names":["applyTriggerPropsToChildren","getTriggerChild","getReactElementRef","useEventCallback","useARIAButtonProps","useToastContainerContext","useToastTrigger_unstable","props","children","disableButtonEnhancement","close","child","handleClick","e","onClick","isDefaultPrevented","triggerChildProps","ref","ariaButtonTriggerChildProps","type"],"mappings":"AAAA;;;;;+BAsBaM;;;;;;gCAdN,4BAA4B;2BACA,uBAAuB;uCAEjB,uCAAuC;AAWzE,iCAAiC,CAACC;IACvC,MAAM,EAAEC,QAAQ,EAAEC,2BAA2B,KAAK,EAAE,GAAGF;IACvD,MAAM,EAAEG,KAAK,EAAE,OAAGL,+CAAAA;IAElB,MAAMM,YAAQV,+BAAAA,EAAgBO;IAE9B,MAAMI,kBAAcT,gCAAAA,EAClB,CAACU;YACCF,sBAAAA;QAAAA,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,wBAAAA,CAAAA,eAAAA,MAAOJ,KAAAA,AAAK,EAACO,OAAAA,AAAO,MAAA,QAApBH,yBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,qBAAAA,IAAAA,CAAAA,cAAuBE;QACvB,IAAI,CAACA,EAAEE,kBAAkB,IAAI;YAC3BL;QACF;IACF;IAGF,MAAMM,oBAAoB;WACrBL,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOJ,KAAV;QACAU,SAAKf,kCAAAA,EAAsCS;QAC3CG,SAASF;IACX;IAEA,MAAMM,kCAA8Bd,6BAAAA,EAClCO,WAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOQ,IAAAA,AAAI,MAAK,YAAYR,CAAAA,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOQ,IAAAA,AAAI,MAAK,MAAMR,MAAMQ,IAAI,GAAG,OAC/D;QACE,GAAGH,iBAAiB;QACpBG,MAAM;IACR;IAGF,OAAO;QACLX,cAAUR,2CAAAA,EACRQ,UACAC,2BAA2BO,oBAAoBE;IAEnD;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/ToastTrigger/useToastTrigger.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport {\n applyTriggerPropsToChildren,\n getTriggerChild,\n getReactElementRef,\n useEventCallback,\n} from '@fluentui/react-utilities';\nimport { useARIAButtonProps } from '@fluentui/react-aria';\nimport type { ToastTriggerProps, ToastTriggerState } from './ToastTrigger.types';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\n\n/**\n * A non-visual component that wraps its child\n * and configures them to be the trigger that will close a `Toast`.\n * This component should only accept one child.\n *\n * This component sole purpose is to avoid opting out of the internal controlled open state of a `Toast`\n * Besides being a trigger that closes a toast through context this component doesn't do much,\n * making it basically unnecessary in cases where the trigger is outside of a toast.\n */\nexport const useToastTrigger_unstable = (props: ToastTriggerProps): ToastTriggerState => {\n const { children, disableButtonEnhancement = false } = props;\n const { close } = useToastContainerContext();\n\n const child = getTriggerChild(children);\n\n const handleClick = useEventCallback(\n (e: React.MouseEvent<HTMLButtonElement & HTMLAnchorElement & HTMLDivElement>) => {\n child?.props.onClick?.(e);\n if (!e.isDefaultPrevented()) {\n close();\n }\n },\n );\n\n const triggerChildProps = {\n ...child?.props,\n ref: getReactElementRef<HTMLButtonElement>(child),\n onClick: handleClick,\n };\n\n const ariaButtonTriggerChildProps = useARIAButtonProps(\n child?.type === 'button' || child?.type === 'a' ? child.type : 'div',\n {\n ...triggerChildProps,\n type: 'button',\n },\n );\n\n return {\n children: applyTriggerPropsToChildren(\n children,\n disableButtonEnhancement ? triggerChildProps : ariaButtonTriggerChildProps,\n ),\n };\n};\n"],"names":["applyTriggerPropsToChildren","getTriggerChild","getReactElementRef","useEventCallback","useARIAButtonProps","useToastContainerContext","useToastTrigger_unstable","props","children","disableButtonEnhancement","close","child","handleClick","e","onClick","isDefaultPrevented","triggerChildProps","ref","ariaButtonTriggerChildProps","type"],"mappings":"AAAA;;;;;+BAsBaM;;;;;;gCAdN,4BAA4B;2BACA,uBAAuB;uCAEjB,0CAAuC;AAWzE,iCAAiC,CAACC;IACvC,MAAM,EAAEC,QAAQ,EAAEC,2BAA2B,KAAK,EAAE,GAAGF;IACvD,MAAM,EAAEG,KAAK,EAAE,OAAGL,+CAAAA;IAElB,MAAMM,YAAQV,+BAAAA,EAAgBO;IAE9B,MAAMI,kBAAcT,gCAAAA,EAClB,CAACU;YACCF,sBAAAA;QAAAA,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,wBAAAA,CAAAA,eAAAA,MAAOJ,KAAAA,AAAK,EAACO,OAAAA,AAAO,MAAA,QAApBH,yBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,qBAAAA,IAAAA,CAAAA,cAAuBE;QACvB,IAAI,CAACA,EAAEE,kBAAkB,IAAI;YAC3BL;QACF;IACF;IAGF,MAAMM,oBAAoB;WACrBL,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOJ,KAAV;QACAU,SAAKf,kCAAAA,EAAsCS;QAC3CG,SAASF;IACX;IAEA,MAAMM,kCAA8Bd,6BAAAA,EAClCO,WAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOQ,IAAAA,AAAI,MAAK,YAAYR,CAAAA,UAAAA,QAAAA,UAAAA,KAAAA,IAAAA,KAAAA,IAAAA,MAAOQ,IAAAA,AAAI,MAAK,MAAMR,MAAMQ,IAAI,GAAG,OAC/D;QACE,GAAGH,iBAAiB;QACpBG,MAAM;IACR;IAGF,OAAO;QACLX,cAAUR,2CAAAA,EACRQ,UACAC,2BAA2BO,oBAAoBE;IAEnD;AACF,EAAE"}
@@ -10,9 +10,9 @@ Object.defineProperty(exports, "Toaster", {
10
10
  }
11
11
  });
12
12
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
13
- const _useToaster = require("./useToaster");
14
- const _renderToaster = require("./renderToaster");
15
- const _useToasterStylesstyles = require("./useToasterStyles.styles");
13
+ const _useToaster = require("./useToaster.cjs");
14
+ const _renderToaster = require("./renderToaster.cjs");
15
+ const _useToasterStylesstyles = require("./useToasterStyles.styles.cjs");
16
16
  const Toaster = (props)=>{
17
17
  const state = (0, _useToaster.useToaster_unstable)(props);
18
18
  (0, _useToasterStylesstyles.useToasterStyles_unstable)(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Toaster/Toaster.tsx"],"sourcesContent":["'use client';\n\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport type * as React from 'react';\n\nimport { useToaster_unstable } from './useToaster';\nimport { renderToaster_unstable } from './renderToaster';\nimport { useToasterStyles_unstable } from './useToasterStyles.styles';\nimport type { ToasterProps } from './Toaster.types';\n\n/**\n * Toaster component - renders a collection of toasts dispatched imperatively\n */\nexport const Toaster: React.FC<ToasterProps> = props => {\n const state = useToaster_unstable(props);\n\n useToasterStyles_unstable(state);\n useCustomStyleHook_unstable('useToasterStyles_unstable')(state);\n return renderToaster_unstable(state);\n};\n\nToaster.displayName = 'Toaster';\n"],"names":["useCustomStyleHook_unstable","useToaster_unstable","renderToaster_unstable","useToasterStyles_unstable","Toaster","props","state","displayName"],"mappings":"AAAA;;;;;;;;;;;qCAE4C,kCAAkC;4BAG1C,eAAe;+BACZ,kBAAkB;wCACf,4BAA4B;AAM/D,MAAMI,UAAkCC,CAAAA;IAC7C,MAAMC,YAAQL,+BAAAA,EAAoBI;QAElCF,iDAAAA,EAA0BG;QAC1BN,gDAAAA,EAA4B,6BAA6BM;IACzD,WAAOJ,qCAAAA,EAAuBI;AAChC,EAAE;AAEFF,QAAQG,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/Toaster/Toaster.tsx"],"sourcesContent":["'use client';\n\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\nimport type * as React from 'react';\n\nimport { useToaster_unstable } from './useToaster';\nimport { renderToaster_unstable } from './renderToaster';\nimport { useToasterStyles_unstable } from './useToasterStyles.styles';\nimport type { ToasterProps } from './Toaster.types';\n\n/**\n * Toaster component - renders a collection of toasts dispatched imperatively\n */\nexport const Toaster: React.FC<ToasterProps> = props => {\n const state = useToaster_unstable(props);\n\n useToasterStyles_unstable(state);\n useCustomStyleHook_unstable('useToasterStyles_unstable')(state);\n return renderToaster_unstable(state);\n};\n\nToaster.displayName = 'Toaster';\n"],"names":["useCustomStyleHook_unstable","useToaster_unstable","renderToaster_unstable","useToasterStyles_unstable","Toaster","props","state","displayName"],"mappings":"AAAA;;;;;;;;;;;qCAE4C,kCAAkC;4BAG1C,kBAAe;+BACZ,qBAAkB;wCACf,+BAA4B;AAM/D,MAAMI,UAAkCC,CAAAA;IAC7C,MAAMC,YAAQL,+BAAAA,EAAoBI;QAElCF,iDAAAA,EAA0BG;QAC1BN,gDAAAA,EAA4B,6BAA6BM;IACzD,WAAOJ,qCAAAA,EAAuBI;AAChC,EAAE;AAEFF,QAAQG,WAAW,GAAG"}
@@ -28,8 +28,8 @@ _export(exports, {
28
28
  return _useToaster.useToaster_unstable;
29
29
  }
30
30
  });
31
- const _Toaster = require("./Toaster");
32
- const _renderToaster = require("./renderToaster");
33
- const _useToaster = require("./useToaster");
34
- const _useToasterStylesstyles = require("./useToasterStyles.styles");
35
- const _useToastAnnounce = require("./useToastAnnounce");
31
+ const _Toaster = require("./Toaster.cjs");
32
+ const _renderToaster = require("./renderToaster.cjs");
33
+ const _useToaster = require("./useToaster.cjs");
34
+ const _useToasterStylesstyles = require("./useToasterStyles.styles.cjs");
35
+ const _useToastAnnounce = require("./useToastAnnounce.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Toaster/index.ts"],"sourcesContent":["export { Toaster } from './Toaster';\nexport type { ToasterProps, ToasterSlots, ToasterSlotsInternal, ToasterState } from './Toaster.types';\nexport { renderToaster_unstable } from './renderToaster';\nexport { useToaster_unstable } from './useToaster';\nexport { toasterClassNames, useToasterStyles_unstable } from './useToasterStyles.styles';\nexport { useToastAnnounce } from './useToastAnnounce';\n"],"names":["Toaster","renderToaster_unstable","useToaster_unstable","toasterClassNames","useToasterStyles_unstable","useToastAnnounce"],"mappings":";;;;;;;;;;;;eAASA,gBAAO;;;eAEPC,qCAAsB;;;eAEtBE,yCAAiB;;;eACjBE,kCAAgB;;;eADGD,iDAAyB;;;eAD5CF,+BAAmB;;;yBAHJ,YAAY;+BAEG,kBAAkB;4BACrB,eAAe;wCACU,4BAA4B;kCACxD,qBAAqB"}
1
+ {"version":3,"sources":["../src/components/Toaster/index.ts"],"sourcesContent":["export { Toaster } from './Toaster';\nexport type { ToasterProps, ToasterSlots, ToasterSlotsInternal, ToasterState } from './Toaster.types';\nexport { renderToaster_unstable } from './renderToaster';\nexport { useToaster_unstable } from './useToaster';\nexport { toasterClassNames, useToasterStyles_unstable } from './useToasterStyles.styles';\nexport { useToastAnnounce } from './useToastAnnounce';\n"],"names":["Toaster","renderToaster_unstable","useToaster_unstable","toasterClassNames","useToasterStyles_unstable","useToastAnnounce"],"mappings":";;;;;;;;;;;;eAASA,gBAAO;;;eAEPC,qCAAsB;;;eAEtBE,yCAAiB;;;eACjBE,kCAAgB;;;eADGD,iDAAyB;;;eAD5CF,+BAAmB;;;yBAHJ,eAAY;+BAEG,qBAAkB;4BACrB,kBAAe;wCACU,+BAA4B;kCACxD,wBAAqB"}
@@ -11,12 +11,12 @@ Object.defineProperty(exports, "renderToaster_unstable", {
11
11
  const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
12
  const _reactutilities = require("@fluentui/react-utilities");
13
13
  const _reactportal = require("@fluentui/react-portal");
14
- const _AriaLive = require("../AriaLive");
14
+ const _index = require("../AriaLive/index.cjs");
15
15
  const renderToaster_unstable = (state)=>{
16
16
  const { announceRef, renderAriaLive, inline, mountNode } = state;
17
17
  (0, _reactutilities.assertSlots)(state);
18
18
  const hasToasts = !!state.bottomStart || !!state.bottomEnd || !!state.topStart || !!state.topEnd || !!state.top || !!state.bottom;
19
- const ariaLive = renderAriaLive ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_AriaLive.AriaLive, {
19
+ const ariaLive = renderAriaLive ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_index.AriaLive, {
20
20
  announceRef: announceRef
21
21
  }) : null;
22
22
  const positionSlots = /*#__PURE__*/ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Toaster/renderToaster.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { Portal } from '@fluentui/react-portal';\nimport type { ToasterState, ToasterSlotsInternal } from './Toaster.types';\nimport { AriaLive } from '../AriaLive';\n\n/**\n * Render the final JSX of Toaster\n */\nexport const renderToaster_unstable = (state: ToasterState): JSXElement => {\n const { announceRef, renderAriaLive, inline, mountNode } = state;\n assertSlots<ToasterSlotsInternal>(state);\n\n const hasToasts =\n !!state.bottomStart || !!state.bottomEnd || !!state.topStart || !!state.topEnd || !!state.top || !!state.bottom;\n\n const ariaLive = renderAriaLive ? <AriaLive announceRef={announceRef} /> : null;\n const positionSlots = (\n <>\n {state.bottom ? <state.bottom /> : null}\n {state.bottomStart ? <state.bottomStart /> : null}\n {state.bottomEnd ? <state.bottomEnd /> : null}\n {state.topStart ? <state.topStart /> : null}\n {state.topEnd ? <state.topEnd /> : null}\n {state.top ? <state.top /> : null}\n </>\n );\n\n if (inline) {\n return (\n <>\n {ariaLive}\n {hasToasts ? positionSlots : null}\n </>\n );\n }\n\n return (\n <>\n {ariaLive}\n {hasToasts ? <Portal mountNode={mountNode}>{positionSlots}</Portal> : null}\n </>\n );\n};\n"],"names":["assertSlots","Portal","AriaLive","renderToaster_unstable","state","announceRef","renderAriaLive","inline","mountNode","hasToasts","bottomStart","bottomEnd","topStart","topEnd","top","bottom","ariaLive","positionSlots"],"mappings":";;;;+BAYaG;;;;;;4BAXb,UAAiD;gCAErB,4BAA4B;6BAEjC,yBAAyB;0BAEvB,cAAc;AAKhC,+BAA+B,CAACC;IACrC,MAAM,EAAEC,WAAW,EAAEC,cAAc,EAAEC,MAAM,EAAEC,SAAS,EAAE,GAAGJ;IAC3DJ,+BAAAA,EAAkCI;IAElC,MAAMK,YACJ,CAAC,CAACL,MAAMM,WAAW,IAAI,CAAC,CAACN,MAAMO,SAAS,IAAI,CAAC,CAACP,MAAMQ,QAAQ,IAAI,CAAC,CAACR,MAAMS,MAAM,IAAI,CAAC,CAACT,MAAMU,GAAG,IAAI,CAAC,CAACV,MAAMW,MAAM;IAEjH,MAAMC,WAAWV,iBAAAA,WAAAA,OAAiB,eAAA,EAACJ,kBAAAA,EAAAA;QAASG,aAAaA;SAAkB;IAC3E,MAAMY,gBAAAA,WAAAA,OACJ,gBAAA,EAAA,oBAAA,EAAA;;YACGb,MAAMW,MAAM,GAAA,WAAA,GAAG,mBAAA,EAACX,MAAMW,MAAM,EAAA,CAAA,KAAM;YAClCX,MAAMM,WAAW,GAAA,WAAA,OAAG,eAAA,EAACN,MAAMM,WAAW,EAAA,CAAA,KAAM;YAC5CN,MAAMO,SAAS,GAAA,WAAA,OAAG,eAAA,EAACP,MAAMO,SAAS,EAAA,CAAA,KAAM;YACxCP,MAAMQ,QAAQ,GAAA,WAAA,OAAG,eAAA,EAACR,MAAMQ,QAAQ,EAAA,CAAA,KAAM;YACtCR,MAAMS,MAAM,GAAA,WAAA,OAAG,eAAA,EAACT,MAAMS,MAAM,EAAA,CAAA,KAAM;YAClCT,MAAMU,GAAG,GAAA,WAAA,OAAG,eAAA,EAACV,MAAMU,GAAG,EAAA,CAAA,KAAM;;;IAIjC,IAAIP,QAAQ;QACV,OAAA,WAAA,OACE,gBAAA,EAAA,oBAAA,EAAA;;gBACGS;gBACAP,YAAYQ,gBAAgB;;;IAGnC;IAEA,OAAA,WAAA,OACE,gBAAA,EAAA,oBAAA,EAAA;;YACGD;YACAP,YAAAA,WAAAA,OAAY,eAAA,EAACR,mBAAAA,EAAAA;gBAAOO,WAAWA;0BAAYS;iBAA0B;;;AAG5E,EAAE"}
1
+ {"version":3,"sources":["../src/components/Toaster/renderToaster.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { Portal } from '@fluentui/react-portal';\nimport type { ToasterState, ToasterSlotsInternal } from './Toaster.types';\nimport { AriaLive } from '../AriaLive';\n\n/**\n * Render the final JSX of Toaster\n */\nexport const renderToaster_unstable = (state: ToasterState): JSXElement => {\n const { announceRef, renderAriaLive, inline, mountNode } = state;\n assertSlots<ToasterSlotsInternal>(state);\n\n const hasToasts =\n !!state.bottomStart || !!state.bottomEnd || !!state.topStart || !!state.topEnd || !!state.top || !!state.bottom;\n\n const ariaLive = renderAriaLive ? <AriaLive announceRef={announceRef} /> : null;\n const positionSlots = (\n <>\n {state.bottom ? <state.bottom /> : null}\n {state.bottomStart ? <state.bottomStart /> : null}\n {state.bottomEnd ? <state.bottomEnd /> : null}\n {state.topStart ? <state.topStart /> : null}\n {state.topEnd ? <state.topEnd /> : null}\n {state.top ? <state.top /> : null}\n </>\n );\n\n if (inline) {\n return (\n <>\n {ariaLive}\n {hasToasts ? positionSlots : null}\n </>\n );\n }\n\n return (\n <>\n {ariaLive}\n {hasToasts ? <Portal mountNode={mountNode}>{positionSlots}</Portal> : null}\n </>\n );\n};\n"],"names":["assertSlots","Portal","AriaLive","renderToaster_unstable","state","announceRef","renderAriaLive","inline","mountNode","hasToasts","bottomStart","bottomEnd","topStart","topEnd","top","bottom","ariaLive","positionSlots"],"mappings":";;;;+BAYaG;;;;;;4BAXb,UAAiD;gCAErB,4BAA4B;6BAEjC,yBAAyB;uBAEvB,uBAAc;AAKhC,+BAA+B,CAACC;IACrC,MAAM,EAAEC,WAAW,EAAEC,cAAc,EAAEC,MAAM,EAAEC,SAAS,EAAE,GAAGJ;IAC3DJ,+BAAAA,EAAkCI;IAElC,MAAMK,YACJ,CAAC,CAACL,MAAMM,WAAW,IAAI,CAAC,CAACN,MAAMO,SAAS,IAAI,CAAC,CAACP,MAAMQ,QAAQ,IAAI,CAAC,CAACR,MAAMS,MAAM,IAAI,CAAC,CAACT,MAAMU,GAAG,IAAI,CAAC,CAACV,MAAMW,MAAM;IAEjH,MAAMC,WAAWV,iBAAAA,WAAAA,OAAiB,eAAA,EAACJ,eAAAA,EAAAA;QAASG,aAAaA;SAAkB;IAC3E,MAAMY,gBAAAA,WAAAA,OACJ,gBAAA,EAAA,oBAAA,EAAA;;YACGb,MAAMW,MAAM,GAAA,WAAA,GAAG,mBAAA,EAACX,MAAMW,MAAM,EAAA,CAAA,KAAM;YAClCX,MAAMM,WAAW,GAAA,WAAA,OAAG,eAAA,EAACN,MAAMM,WAAW,EAAA,CAAA,KAAM;YAC5CN,MAAMO,SAAS,GAAA,WAAA,OAAG,eAAA,EAACP,MAAMO,SAAS,EAAA,CAAA,KAAM;YACxCP,MAAMQ,QAAQ,GAAA,WAAA,OAAG,eAAA,EAACR,MAAMQ,QAAQ,EAAA,CAAA,KAAM;YACtCR,MAAMS,MAAM,GAAA,WAAA,OAAG,eAAA,EAACT,MAAMS,MAAM,EAAA,CAAA,KAAM;YAClCT,MAAMU,GAAG,GAAA,WAAA,OAAG,eAAA,EAACV,MAAMU,GAAG,EAAA,CAAA,KAAM;;;IAIjC,IAAIP,QAAQ;QACV,OAAA,WAAA,OACE,gBAAA,EAAA,oBAAA,EAAA;;gBACGS;gBACAP,YAAYQ,gBAAgB;;;IAGnC;IAEA,OAAA,WAAA,OACE,gBAAA,EAAA,oBAAA,EAAA;;YACGD;YACAP,YAAAA,WAAAA,OAAY,eAAA,EAACR,mBAAAA,EAAAA;gBAAOO,WAAWA;0BAAYS;iBAA0B;;;AAG5E,EAAE"}
@@ -15,14 +15,14 @@ const _reactutilities = require("@fluentui/react-utilities");
15
15
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
16
16
  const _reacttabster = require("@fluentui/react-tabster");
17
17
  const _keyboardkeys = require("@fluentui/keyboard-keys");
18
- const _state = require("../../state");
19
- const _ToastContainer = require("../ToastContainer");
20
- const _useToasterFocusManagement = require("./useToasterFocusManagement");
21
- const _useToastAnnounce = require("./useToastAnnounce");
18
+ const _index = require("../../state/index.cjs");
19
+ const _index1 = require("../ToastContainer/index.cjs");
20
+ const _useToasterFocusManagement = require("./useToasterFocusManagement.cjs");
21
+ const _useToastAnnounce = require("./useToastAnnounce.cjs");
22
22
  const useToaster_unstable = (props)=>{
23
23
  const { offset, announce: announceProp, mountNode, inline = false, ...rest } = props;
24
24
  const announceRef = _react.useRef(()=>null);
25
- const { toastsToRender, isToastVisible, pauseAllToasts, playAllToasts, tryRestoreFocus, closeAllToasts } = (0, _state.useToaster)(rest);
25
+ const { toastsToRender, isToastVisible, pauseAllToasts, playAllToasts, tryRestoreFocus, closeAllToasts } = (0, _index.useToaster)(rest);
26
26
  const announce = _react.useCallback((message, options)=>announceRef.current(message, options), []);
27
27
  const { dir } = (0, _reactsharedcontexts.useFluent_unstable)();
28
28
  const { onKeyDown: onKeyDownProp, ...rootProps } = _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('div', rest), {
@@ -48,7 +48,7 @@ const useToaster_unstable = (props)=>{
48
48
  return _reactutilities.slot.optional(toastsToRender.has(toastPosition) ? rootProps : null, {
49
49
  defaultProps: {
50
50
  ref: (0, _reactutilities.useMergedRefs)(focusManagementRef, toasterRef),
51
- children: (_toastsToRender_get = toastsToRender.get(toastPosition)) === null || _toastsToRender_get === void 0 ? void 0 : _toastsToRender_get.map((toast)=>/*#__PURE__*/ _react.createElement(_ToastContainer.ToastContainer, {
51
+ children: (_toastsToRender_get = toastsToRender.get(toastPosition)) === null || _toastsToRender_get === void 0 ? void 0 : _toastsToRender_get.map((toast)=>/*#__PURE__*/ _react.createElement(_index1.ToastContainer, {
52
52
  ...toast,
53
53
  tryRestoreFocus: tryRestoreFocus,
54
54
  intent: toast.intent,
@@ -79,12 +79,12 @@ const useToaster_unstable = (props)=>{
79
79
  root: _reactutilities.slot.always(rootProps, {
80
80
  elementType: 'div'
81
81
  }),
82
- bottomStart: usePositionSlot(_state.TOAST_POSITIONS.bottomStart),
83
- bottomEnd: usePositionSlot(_state.TOAST_POSITIONS.bottomEnd),
84
- topStart: usePositionSlot(_state.TOAST_POSITIONS.topStart),
85
- topEnd: usePositionSlot(_state.TOAST_POSITIONS.topEnd),
86
- top: usePositionSlot(_state.TOAST_POSITIONS.top),
87
- bottom: usePositionSlot(_state.TOAST_POSITIONS.bottom),
82
+ bottomStart: usePositionSlot(_index.TOAST_POSITIONS.bottomStart),
83
+ bottomEnd: usePositionSlot(_index.TOAST_POSITIONS.bottomEnd),
84
+ topStart: usePositionSlot(_index.TOAST_POSITIONS.topStart),
85
+ topEnd: usePositionSlot(_index.TOAST_POSITIONS.topEnd),
86
+ top: usePositionSlot(_index.TOAST_POSITIONS.top),
87
+ bottom: usePositionSlot(_index.TOAST_POSITIONS.bottom),
88
88
  announceRef,
89
89
  offset,
90
90
  announce: announceProp !== null && announceProp !== void 0 ? announceProp : announce,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Toaster/useToaster.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ExtractSlotProps, Slot } from '@fluentui/react-utilities';\nimport { getIntrinsicElementProps, useEventCallback, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport { Escape } from '@fluentui/keyboard-keys';\nimport type { ToasterProps, ToasterState } from './Toaster.types';\nimport type { ToastPosition } from '../../state';\nimport { TOAST_POSITIONS, useToaster } from '../../state';\nimport type { Announce } from '../AriaLive';\nimport { ToastContainer } from '../ToastContainer';\nimport { useToasterFocusManagement_unstable } from './useToasterFocusManagement';\nimport { useToastAnnounce } from './useToastAnnounce';\n\n/**\n * Create the state required to render Toaster.\n *\n * @param props - props from this instance of Toaster\n */\nexport const useToaster_unstable = (props: ToasterProps): ToasterState => {\n const { offset, announce: announceProp, mountNode, inline = false, ...rest } = props;\n const announceRef = React.useRef<Announce>(() => null);\n const { toastsToRender, isToastVisible, pauseAllToasts, playAllToasts, tryRestoreFocus, closeAllToasts } =\n useToaster<HTMLDivElement>(rest);\n const announce = React.useCallback<Announce>((message, options) => announceRef.current(message, options), []);\n const { dir } = useFluent();\n\n const { onKeyDown: onKeyDownProp, ...rootProps } = slot.always(\n getIntrinsicElementProps<ExtractSlotProps<Slot<'div'>>>('div', rest),\n {\n elementType: 'div',\n },\n );\n const focusableGroupAttr = useFocusableGroup({\n tabBehavior: 'limited-trap-focus',\n ignoreDefaultKeydown: { Escape: true },\n });\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLDivElement>) => {\n if (e.key === Escape) {\n e.preventDefault();\n closeAllToasts();\n }\n onKeyDownProp?.(e);\n });\n const usePositionSlot = (toastPosition: ToastPosition) => {\n const focusManagementRef = useToasterFocusManagement_unstable(pauseAllToasts, playAllToasts);\n const { announceToast, toasterRef } = useToastAnnounce(announceProp ?? announce);\n return slot.optional<ExtractSlotProps<Slot<'div'>>>(toastsToRender.has(toastPosition) ? rootProps : null, {\n defaultProps: {\n ref: useMergedRefs(focusManagementRef, toasterRef),\n children: toastsToRender.get(toastPosition)?.map(toast => (\n <ToastContainer\n {...toast}\n tryRestoreFocus={tryRestoreFocus}\n intent={toast.intent}\n announce={announceToast}\n key={toast.toastId}\n visible={isToastVisible(toast.toastId)}\n >\n {toast.content as React.ReactNode}\n </ToastContainer>\n )),\n onKeyDown,\n ...focusableGroupAttr,\n 'data-toaster-position': toastPosition,\n role: 'list',\n // Explicitly casting because our slot types can't handle data attributes\n } as ExtractSlotProps<Slot<'div'>>,\n elementType: 'div',\n });\n };\n\n return {\n dir,\n mountNode,\n components: {\n root: 'div',\n bottomStart: 'div',\n bottomEnd: 'div',\n topStart: 'div',\n topEnd: 'div',\n top: 'div',\n bottom: 'div',\n },\n root: slot.always(rootProps, { elementType: 'div' }),\n bottomStart: usePositionSlot(TOAST_POSITIONS.bottomStart),\n bottomEnd: usePositionSlot(TOAST_POSITIONS.bottomEnd),\n topStart: usePositionSlot(TOAST_POSITIONS.topStart),\n topEnd: usePositionSlot(TOAST_POSITIONS.topEnd),\n top: usePositionSlot(TOAST_POSITIONS.top),\n bottom: usePositionSlot(TOAST_POSITIONS.bottom),\n announceRef,\n offset,\n announce: announceProp ?? announce,\n renderAriaLive: !announceProp,\n inline,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useEventCallback","useMergedRefs","slot","useFluent_unstable","useFluent","useFocusableGroup","Escape","TOAST_POSITIONS","useToaster","ToastContainer","useToasterFocusManagement_unstable","useToastAnnounce","useToaster_unstable","props","offset","announce","announceProp","mountNode","inline","rest","announceRef","useRef","toastsToRender","isToastVisible","pauseAllToasts","playAllToasts","tryRestoreFocus","closeAllToasts","useCallback","message","options","current","dir","onKeyDown","onKeyDownProp","rootProps","always","elementType","focusableGroupAttr","tabBehavior","ignoreDefaultKeydown","e","key","preventDefault","usePositionSlot","toastPosition","focusManagementRef","announceToast","toasterRef","optional","has","defaultProps","ref","children","get","map","toast","intent","toastId","visible","content","role","components","root","bottomStart","bottomEnd","topStart","topEnd","top","bottom","renderAriaLive"],"mappings":"AAAA;;;;;+BAqBac;;;;;;;iEAnBU,QAAQ;gCAEiD,4BAA4B;qCAC5D,kCAAkC;8BAChD,0BAA0B;8BACrC,0BAA0B;uBAGL,cAAc;gCAE3B,oBAAoB;2CACA,8BAA8B;kCAChD,qBAAqB;AAO/C,4BAA4B,CAACC;IAClC,MAAM,EAAEC,MAAM,EAAEC,UAAUC,YAAY,EAAEC,SAAS,EAAEC,SAAS,KAAK,EAAE,GAAGC,MAAM,GAAGN;IAC/E,MAAMO,cAActB,OAAMuB,MAAM,CAAW,IAAM;IACjD,MAAM,EAAEC,cAAc,EAAEC,cAAc,EAAEC,cAAc,EAAEC,aAAa,EAAEC,eAAe,EAAEC,cAAc,EAAE,OACtGnB,iBAAAA,EAA2BW;IAC7B,MAAMJ,WAAWjB,OAAM8B,WAAW,CAAW,CAACC,SAASC,UAAYV,YAAYW,OAAO,CAACF,SAASC,UAAU,EAAE;IAC5G,MAAM,EAAEE,GAAG,EA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B,yBAAyBO;gBACzBgB,MAAM;YAER;YACAxB,aAAa;QACf;IACF;IAEA,OAAO;QACLL;QACAf;QACA6C,YAAY;YACVC,MAAM;YACNC,aAAa;YACbC,WAAW;YACXC,UAAU;YACVC,QAAQ;YACRC,KAAK;YACLC,QAAQ;QACV;QACAN,MAAM7D,oBAAAA,CAAKkC,MAAM,CAACD,WAAW;YAAEE,aAAa;QAAM;QAClD2B,aAAapB,gBAAgBrC,sBAAAA,CAAgByD,WAAW;QACxDC,WAAWrB,gBAAgBrC,sBAAAA,CAAgB0D,SAAS;QACpDC,UAAUtB,gBAAgBrC,sBAAAA,CAAgB2D,QAAQ;QAClDC,QAAQvB,gBAAgBrC,sBAAAA,CAAgB4D,MAAM;QAC9CC,KAAKxB,gBAAgBrC,sBAAAA,CAAgB6D,GAAG;QACxCC,QAAQzB,gBAAgBrC,sBAAAA,CAAgB8D,MAAM;QAC9CjD;QACAN;QACAC,UAAUC,iBAAAA,QAAAA,iBAAAA,KAAAA,IAAAA,eAAgBD;QAC1BuD,gBAAgB,CAACtD;QACjBE;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/Toaster/useToaster.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ExtractSlotProps, Slot } from '@fluentui/react-utilities';\nimport { getIntrinsicElementProps, useEventCallback, useMergedRefs, slot } from '@fluentui/react-utilities';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { useFocusableGroup } from '@fluentui/react-tabster';\nimport { Escape } from '@fluentui/keyboard-keys';\nimport type { ToasterProps, ToasterState } from './Toaster.types';\nimport type { ToastPosition } from '../../state';\nimport { TOAST_POSITIONS, useToaster } from '../../state';\nimport type { Announce } from '../AriaLive';\nimport { ToastContainer } from '../ToastContainer';\nimport { useToasterFocusManagement_unstable } from './useToasterFocusManagement';\nimport { useToastAnnounce } from './useToastAnnounce';\n\n/**\n * Create the state required to render Toaster.\n *\n * @param props - props from this instance of Toaster\n */\nexport const useToaster_unstable = (props: ToasterProps): ToasterState => {\n const { offset, announce: announceProp, mountNode, inline = false, ...rest } = props;\n const announceRef = React.useRef<Announce>(() => null);\n const { toastsToRender, isToastVisible, pauseAllToasts, playAllToasts, tryRestoreFocus, closeAllToasts } =\n useToaster<HTMLDivElement>(rest);\n const announce = React.useCallback<Announce>((message, options) => announceRef.current(message, options), []);\n const { dir } = useFluent();\n\n const { onKeyDown: onKeyDownProp, ...rootProps } = slot.always(\n getIntrinsicElementProps<ExtractSlotProps<Slot<'div'>>>('div', rest),\n {\n elementType: 'div',\n },\n );\n const focusableGroupAttr = useFocusableGroup({\n tabBehavior: 'limited-trap-focus',\n ignoreDefaultKeydown: { Escape: true },\n });\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLDivElement>) => {\n if (e.key === Escape) {\n e.preventDefault();\n closeAllToasts();\n }\n onKeyDownProp?.(e);\n });\n const usePositionSlot = (toastPosition: ToastPosition) => {\n const focusManagementRef = useToasterFocusManagement_unstable(pauseAllToasts, playAllToasts);\n const { announceToast, toasterRef } = useToastAnnounce(announceProp ?? announce);\n return slot.optional<ExtractSlotProps<Slot<'div'>>>(toastsToRender.has(toastPosition) ? rootProps : null, {\n defaultProps: {\n ref: useMergedRefs(focusManagementRef, toasterRef),\n children: toastsToRender.get(toastPosition)?.map(toast => (\n <ToastContainer\n {...toast}\n tryRestoreFocus={tryRestoreFocus}\n intent={toast.intent}\n announce={announceToast}\n key={toast.toastId}\n visible={isToastVisible(toast.toastId)}\n >\n {toast.content as React.ReactNode}\n </ToastContainer>\n )),\n onKeyDown,\n ...focusableGroupAttr,\n 'data-toaster-position': toastPosition,\n role: 'list',\n // Explicitly casting because our slot types can't handle data attributes\n } as ExtractSlotProps<Slot<'div'>>,\n elementType: 'div',\n });\n };\n\n return {\n dir,\n mountNode,\n components: {\n root: 'div',\n bottomStart: 'div',\n bottomEnd: 'div',\n topStart: 'div',\n topEnd: 'div',\n top: 'div',\n bottom: 'div',\n },\n root: slot.always(rootProps, { elementType: 'div' }),\n bottomStart: usePositionSlot(TOAST_POSITIONS.bottomStart),\n bottomEnd: usePositionSlot(TOAST_POSITIONS.bottomEnd),\n topStart: usePositionSlot(TOAST_POSITIONS.topStart),\n topEnd: usePositionSlot(TOAST_POSITIONS.topEnd),\n top: usePositionSlot(TOAST_POSITIONS.top),\n bottom: usePositionSlot(TOAST_POSITIONS.bottom),\n announceRef,\n offset,\n announce: announceProp ?? announce,\n renderAriaLive: !announceProp,\n inline,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useEventCallback","useMergedRefs","slot","useFluent_unstable","useFluent","useFocusableGroup","Escape","TOAST_POSITIONS","useToaster","ToastContainer","useToasterFocusManagement_unstable","useToastAnnounce","useToaster_unstable","props","offset","announce","announceProp","mountNode","inline","rest","announceRef","useRef","toastsToRender","isToastVisible","pauseAllToasts","playAllToasts","tryRestoreFocus","closeAllToasts","useCallback","message","options","current","dir","onKeyDown","onKeyDownProp","rootProps","always","elementType","focusableGroupAttr","tabBehavior","ignoreDefaultKeydown","e","key","preventDefault","usePositionSlot","toastPosition","focusManagementRef","announceToast","toasterRef","optional","has","defaultProps","ref","children","get","map","toast","intent","toastId","visible","content","role","components","root","bottomStart","bottomEnd","topStart","topEnd","top","bottom","renderAriaLive"],"mappings":"AAAA;;;;;+BAqBac;;;;;;;iEAnBU,QAAQ;gCAEiD,4BAA4B;qCAC5D,kCAAkC;8BAChD,0BAA0B;8BACrC,0BAA0B;uBAGL,uBAAc;wBAE3B,6BAAoB;2CACA,iCAA8B;kCAChD,wBAAqB;AAO/C,4BAA4B,CAACC;IAClC,MAAM,EAAEC,MAAM,EAAEC,UAAUC,YAAY,EAAEC,SAAS,EAAEC,SAAS,KAAK,EAAE,GAAGC,MAAM,GAAGN;IAC/E,MAAMO,cAActB,OAAMuB,MAAM,CAAW,IAAM;IACjD,MAAM,EAAEC,cAAc,EAAEC,cAAc,EAAEC,cAAc,EAAEC,aAAa,EAAEC,eAAe,EAAEC,cAAc,E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AAQD,MAAMC,MAAM;wBACpB1C,UAAUgC;wBACVL,KAAKc,MAAME,OAAO;wBAClBC,SAASpC,eAAeiC,MAAME,OAAO;uBAEpCF,MAAMI,OAAO;gBAGlB3B;gBACA,GAAGK,kBAAkB;gBACrB,yBAAyBO;gBACzBgB,MAAM;YAER;YACAxB,aAAa;QACf;IACF;IAEA,OAAO;QACLL;QACAf;QACA6C,YAAY;YACVC,MAAM;YACNC,aAAa;YACbC,WAAW;YACXC,UAAU;YACVC,QAAQ;YACRC,KAAK;YACLC,QAAQ;QACV;QACAN,MAAM7D,oBAAAA,CAAKkC,MAAM,CAACD,WAAW;YAAEE,aAAa;QAAM;QAClD2B,aAAapB,gBAAgBrC,sBAAAA,CAAgByD,WAAW;QACxDC,WAAWrB,gBAAgBrC,sBAAAA,CAAgB0D,SAAS;QACpDC,UAAUtB,gBAAgBrC,sBAAAA,CAAgB2D,QAAQ;QAClDC,QAAQvB,gBAAgBrC,sBAAAA,CAAgB4D,MAAM;QAC9CC,KAAKxB,gBAAgBrC,sBAAAA,CAAgB6D,GAAG;QACxCC,QAAQzB,gBAAgBrC,sBAAAA,CAAgB8D,MAAM;QAC9CjD;QACAN;QACAC,UAAUC,iBAAAA,QAAAA,iBAAAA,KAAAA,IAAAA,eAAgBD;QAC1BuD,gBAAgB,CAACtD;QACjBE;IACF;AACF,EAAE"}
@@ -14,7 +14,7 @@ const _reactutilities = require("@fluentui/react-utilities");
14
14
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
15
15
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
16
16
  const _keyboardkeys = require("@fluentui/keyboard-keys");
17
- const _ToastContainer = require("../ToastContainer");
17
+ const _index = require("../ToastContainer/index.cjs");
18
18
  const noop = ()=>undefined;
19
19
  function useToasterFocusManagement_unstable(pauseAllToasts, playAllToasts) {
20
20
  const { targetDocument } = (0, _reactsharedcontexts.useFluent_unstable)();
@@ -27,7 +27,7 @@ function useToasterFocusManagement_unstable(pauseAllToasts, playAllToasts) {
27
27
  }
28
28
  const toastContainerWalker = targetDocument.createTreeWalker(el, NodeFilter.SHOW_ELEMENT, {
29
29
  acceptNode (node) {
30
- if ((0, _reactutilities.isHTMLElement)(node) && node.classList.contains(_ToastContainer.toastContainerClassNames.root)) {
30
+ if ((0, _reactutilities.isHTMLElement)(node) && node.classList.contains(_index.toastContainerClassNames.root)) {
31
31
  return NodeFilter.FILTER_ACCEPT;
32
32
  }
33
33
  return NodeFilter.FILTER_SKIP;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Toaster/useToasterFocusManagement.ts"],"sourcesContent":["'use client';\n\nimport { isHTMLElement } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { ArrowDown, ArrowUp } from '@fluentui/keyboard-keys';\nimport { toastContainerClassNames } from '../ToastContainer';\n\nconst noop = () => undefined;\n\n/**\n * @internal\n */\nexport function useToasterFocusManagement_unstable(\n pauseAllToasts: () => void,\n playAllToasts: () => void,\n): (el: HTMLDivElement) => void {\n const { targetDocument } = useFluent();\n const cleanupListenersRef = React.useRef<() => void>(noop);\n\n return React.useCallback(\n (el: HTMLDivElement) => {\n if (!el || !targetDocument) {\n cleanupListenersRef.current();\n cleanupListenersRef.current = noop;\n return;\n }\n\n const toastContainerWalker = targetDocument.createTreeWalker(el, NodeFilter.SHOW_ELEMENT, {\n acceptNode(node: Node) {\n if (isHTMLElement(node) && node.classList.contains(toastContainerClassNames.root)) {\n return NodeFilter.FILTER_ACCEPT;\n }\n\n return NodeFilter.FILTER_SKIP;\n },\n });\n\n /**\n * FIXME: https://github.com/microsoft/tabster/issues/299\n * Toasts should be arrow navigable and focus should be trapped in a stack of tasts\n * This is a temporary measure, Tabster does not have an API yet to enable mover arrow keys from within grouppers\n * Once tabster fully supports this use case, remove this hook\n */\n const keydownListener = (e: KeyboardEvent) => {\n const { target, key } = e;\n if (!isHTMLElement(target)) {\n return;\n }\n\n if (key === ArrowDown) {\n toastContainerWalker.currentNode = target;\n let nextToastContainer = toastContainerWalker.nextNode();\n if (!nextToastContainer) {\n toastContainerWalker.currentNode = el;\n nextToastContainer = toastContainerWalker.nextNode();\n }\n\n if (isHTMLElement(nextToastContainer)) {\n nextToastContainer.focus();\n }\n }\n\n if (key === ArrowUp) {\n toastContainerWalker.currentNode = target;\n let prevToastContainer = toastContainerWalker.previousNode();\n if (prevToastContainer && prevToastContainer.contains(target)) {\n prevToastContainer = toastContainerWalker.previousNode();\n }\n\n if (!prevToastContainer) {\n toastContainerWalker.currentNode = el;\n prevToastContainer = toastContainerWalker.lastChild();\n }\n\n if (isHTMLElement(prevToastContainer)) {\n prevToastContainer.focus();\n }\n }\n };\n\n const focusInListener = (e: FocusEvent) => {\n if (\n isHTMLElement(e.currentTarget) &&\n !e.currentTarget.contains(isHTMLElement(e.relatedTarget) ? e.relatedTarget : null)\n ) {\n pauseAllToasts();\n }\n };\n\n const focusOutListener = (e: FocusEvent) => {\n if (\n isHTMLElement(e.currentTarget) &&\n !e.currentTarget.contains(isHTMLElement(e.relatedTarget) ? e.relatedTarget : null)\n ) {\n playAllToasts();\n }\n };\n\n el.addEventListener('keydown', keydownListener);\n el.addEventListener('focusin', focusInListener);\n el.addEventListener('focusout', focusOutListener);\n\n cleanupListenersRef.current = () => {\n el.removeEventListener('keydown', keydownListener);\n el.removeEventListener('focusin', focusInListener);\n el.removeEventListener('focusout', focusOutListener);\n };\n },\n [targetDocument, pauseAllToasts, playAllToasts],\n );\n}\n"],"names":["isHTMLElement","React","useFluent_unstable","useFluent","ArrowDown","ArrowUp","toastContainerClassNames","noop","undefined","useToasterFocusManagement_unstable","pauseAllToasts","playAllToasts","targetDocument","cleanupListenersRef","useRef","useCallback","el","current","toastContainerWalker","createTreeWalker","NodeFilter","SHOW_ELEMENT","acceptNode","node","classList","contains","root","FILTER_ACCEPT","FILTER_SKIP","keydownListener","e","target","key","currentNode","nextToastContainer","nextNode","focus","prevToastContainer","previousNode","lastChild","focusInListener","currentTarget","relatedTarget","focusOutListener","addEventListener","removeEventListener"],"mappings":"AAAA;;;;;+BAagBS;;;;;;;gCAXc,4BAA4B;iEACnC,QAAQ;qCACiB,kCAAkC;8BAC/C,0BAA0B;gCACpB,oBAAoB;AAE7D,MAAMF,OAAO,IAAMC;AAKZ,4CACLE,cAA0B,EAC1BC,aAAyB;IAEzB,MAAM,EAAEC,cAAc,EAAE,OAAGT,uCAAAA;IAC3B,MAAMU,sBAAsBZ,OAAMa,MAAM,CAAaP;IAErD,OAAON,OAAMc,WAAW,CACtB,CAACC;QACC,IAAI,CAACA,MAAM,CAACJ,gBAAgB;YAC1BC,oBAAoBI,OAAO;YAC3BJ,oBAAoBI,OAAO,GAAGV;YAC9B;QACF;QAEA,MAAMW,uBAAuBN,eAAeO,gBAAgB,CAACH,IAAII,WAAWC,YAAY,EAAE;YACxFC,YAAWC,IAAU;gBACnB,QAAIvB,6BAAAA,EAAcuB,SAASA,KAAKC,SAAS,CAACC,QAAQ,CAACnB,wCAAAA,CAAyBoB,IAAI,GAAG;oBACjF,OAAON,WAAWO,aAAa;gBACjC;gBAEA,OAAOP,WAAWQ,WAAW;YAC/B;QACF;QAEA;;;;;OAKC,GACD,MAAMC,kBAAkB,CAACC;YACvB,MAAM,EAAEC,MAAM,EAAEC,GAAG,EAAE,GAAGF;YACxB,IAAI,KAAC9B,6BAAAA,EAAc+B,SAAS;gBAC1B;YACF;YAEA,IAAIC,QAAQ5B,uBAAAA,EAAW;gBACrBc,qBAAqBe,WAAW,GAAGF;gBACnC,IAAIG,qBAAqBhB,qBAAqBiB,QAAQ;gBACtD,IAAI,CAACD,oBAAoB;oBACvBhB,qBAAqBe,WAAW,GAAGjB;oBACnCkB,qBAAqBhB,qBAAqBiB,QAAQ;gBACpD;gBAEA,QAAInC,6BAAAA,EAAckC,qBAAqB;oBACrCA,mBAAmBE,KAAK;gBAC1B;YACF;YAEA,IAAIJ,QAAQ3B,qBAAAA,EAAS;gBACnBa,qBAAqBe,WAAW,GAAGF;gBACnC,IAAIM,qBAAqBnB,qBAAqBoB,YAAY;gBAC1D,IAAID,sBAAsBA,mBAAmBZ,QAAQ,CAACM,SAAS;oBAC7DM,qBAAqBnB,qBAAqBoB,YAAY;gBACxD;gBAEA,IAAI,CAACD,oBAAoB;oBACvBnB,qBAAqBe,WAAW,GAAGjB;oBACnCqB,qBAAqBnB,qBAAqBqB,SAAS;gBACrD;gBAEA,IAAIvC,iCAAAA,EAAcqC,qBAAqB;oBACrCA,mBAAmBD,KAAK;gBAC1B;YACF;QACF;QAEA,MAAMI,kBAAkB,CAACV;YACvB,IACE9B,iCAAAA,EAAc8B,EAAEW,aAAa,KAC7B,CAACX,EAAEW,aAAa,CAAChB,QAAQ,KAACzB,6BAAAA,EAAc8B,EAAEY,aAAa,IAAIZ,EAAEY,aAAa,GAAG,OAC7E;gBACAhC;YACF;QACF;QAEA,MAAMiC,mBAAmB,CAACb;YACxB,QACE9B,6BAAAA,EAAc8B,EAAEW,aAAa,KAC7B,CAACX,EAAEW,aAAa,CAAChB,QAAQ,KAACzB,6BAAAA,EAAc8B,EAAEY,aAAa,IAAIZ,EAAEY,aAAa,GAAG,OAC7E;gBACA/B;YACF;QACF;QAEAK,GAAG4B,gBAAgB,CAAC,WAAWf;QAC/Bb,GAAG4B,gBAAgB,CAAC,WAAWJ;QAC/BxB,GAAG4B,gBAAgB,CAAC,YAAYD;QAEhC9B,oBAAoBI,OAAO,GAAG;YAC5BD,GAAG6B,mBAAmB,CAAC,WAAWhB;YAClCb,GAAG6B,mBAAmB,CAAC,WAAWL;YAClCxB,GAAG6B,mBAAmB,CAAC,YAAYF;QACrC;IACF,GACA;QAAC/B;QAAgBF;QAAgBC;KAAc;AAEnD"}
1
+ {"version":3,"sources":["../src/components/Toaster/useToasterFocusManagement.ts"],"sourcesContent":["'use client';\n\nimport { isHTMLElement } from '@fluentui/react-utilities';\nimport * as React from 'react';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport { ArrowDown, ArrowUp } from '@fluentui/keyboard-keys';\nimport { toastContainerClassNames } from '../ToastContainer';\n\nconst noop = () => undefined;\n\n/**\n * @internal\n */\nexport function useToasterFocusManagement_unstable(\n pauseAllToasts: () => void,\n playAllToasts: () => void,\n): (el: HTMLDivElement) => void {\n const { targetDocument } = useFluent();\n const cleanupListenersRef = React.useRef<() => void>(noop);\n\n return React.useCallback(\n (el: HTMLDivElement) => {\n if (!el || !targetDocument) {\n cleanupListenersRef.current();\n cleanupListenersRef.current = noop;\n return;\n }\n\n const toastContainerWalker = targetDocument.createTreeWalker(el, NodeFilter.SHOW_ELEMENT, {\n acceptNode(node: Node) {\n if (isHTMLElement(node) && node.classList.contains(toastContainerClassNames.root)) {\n return NodeFilter.FILTER_ACCEPT;\n }\n\n return NodeFilter.FILTER_SKIP;\n },\n });\n\n /**\n * FIXME: https://github.com/microsoft/tabster/issues/299\n * Toasts should be arrow navigable and focus should be trapped in a stack of tasts\n * This is a temporary measure, Tabster does not have an API yet to enable mover arrow keys from within grouppers\n * Once tabster fully supports this use case, remove this hook\n */\n const keydownListener = (e: KeyboardEvent) => {\n const { target, key } = e;\n if (!isHTMLElement(target)) {\n return;\n }\n\n if (key === ArrowDown) {\n toastContainerWalker.currentNode = target;\n let nextToastContainer = toastContainerWalker.nextNode();\n if (!nextToastContainer) {\n toastContainerWalker.currentNode = el;\n nextToastContainer = toastContainerWalker.nextNode();\n }\n\n if (isHTMLElement(nextToastContainer)) {\n nextToastContainer.focus();\n }\n }\n\n if (key === ArrowUp) {\n toastContainerWalker.currentNode = target;\n let prevToastContainer = toastContainerWalker.previousNode();\n if (prevToastContainer && prevToastContainer.contains(target)) {\n prevToastContainer = toastContainerWalker.previousNode();\n }\n\n if (!prevToastContainer) {\n toastContainerWalker.currentNode = el;\n prevToastContainer = toastContainerWalker.lastChild();\n }\n\n if (isHTMLElement(prevToastContainer)) {\n prevToastContainer.focus();\n }\n }\n };\n\n const focusInListener = (e: FocusEvent) => {\n if (\n isHTMLElement(e.currentTarget) &&\n !e.currentTarget.contains(isHTMLElement(e.relatedTarget) ? e.relatedTarget : null)\n ) {\n pauseAllToasts();\n }\n };\n\n const focusOutListener = (e: FocusEvent) => {\n if (\n isHTMLElement(e.currentTarget) &&\n !e.currentTarget.contains(isHTMLElement(e.relatedTarget) ? e.relatedTarget : null)\n ) {\n playAllToasts();\n }\n };\n\n el.addEventListener('keydown', keydownListener);\n el.addEventListener('focusin', focusInListener);\n el.addEventListener('focusout', focusOutListener);\n\n cleanupListenersRef.current = () => {\n el.removeEventListener('keydown', keydownListener);\n el.removeEventListener('focusin', focusInListener);\n el.removeEventListener('focusout', focusOutListener);\n };\n },\n [targetDocument, pauseAllToasts, playAllToasts],\n );\n}\n"],"names":["isHTMLElement","React","useFluent_unstable","useFluent","ArrowDown","ArrowUp","toastContainerClassNames","noop","undefined","useToasterFocusManagement_unstable","pauseAllToasts","playAllToasts","targetDocument","cleanupListenersRef","useRef","useCallback","el","current","toastContainerWalker","createTreeWalker","NodeFilter","SHOW_ELEMENT","acceptNode","node","classList","contains","root","FILTER_ACCEPT","FILTER_SKIP","keydownListener","e","target","key","currentNode","nextToastContainer","nextNode","focus","prevToastContainer","previousNode","lastChild","focusInListener","currentTarget","relatedTarget","focusOutListener","addEventListener","removeEventListener"],"mappings":"AAAA;;;;;+BAagBS;;;;;;;gCAXc,4BAA4B;iEACnC,QAAQ;qCACiB,kCAAkC;8BAC/C,0BAA0B;uBACpB,6BAAoB;AAE7D,MAAMF,OAAO,IAAMC;AAKZ,4CACLE,cAA0B,EAC1BC,aAAyB;IAEzB,MAAM,EAAEC,cAAc,EAAE,OAAGT,uCAAAA;IAC3B,MAAMU,sBAAsBZ,OAAMa,MAAM,CAAaP;IAErD,OAAON,OAAMc,WAAW,CACtB,CAACC;QACC,IAAI,CAACA,MAAM,CAACJ,gBAAgB;YAC1BC,oBAAoBI,OAAO;YAC3BJ,oBAAoBI,OAAO,GAAGV;YAC9B;QACF;QAEA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AA,EAAc8B,EAAEY,aAAa,IAAIZ,EAAEY,aAAa,GAAG,OAC7E;gBACAhC;YACF;QACF;QAEA,MAAMiC,mBAAmB,CAACb;YACxB,QACE9B,6BAAAA,EAAc8B,EAAEW,aAAa,KAC7B,CAACX,EAAEW,aAAa,CAAChB,QAAQ,KAACzB,6BAAAA,EAAc8B,EAAEY,aAAa,IAAIZ,EAAEY,aAAa,GAAG,OAC7E;gBACA/B;YACF;QACF;QAEAK,GAAG4B,gBAAgB,CAAC,WAAWf;QAC/Bb,GAAG4B,gBAAgB,CAAC,WAAWJ;QAC/BxB,GAAG4B,gBAAgB,CAAC,YAAYD;QAEhC9B,oBAAoBI,OAAO,GAAG;YAC5BD,GAAG6B,mBAAmB,CAAC,WAAWhB;YAClCb,GAAG6B,mBAAmB,CAAC,WAAWL;YAClCxB,GAAG6B,mBAAmB,CAAC,YAAYF;QACrC;IACF,GACA;QAAC/B;QAAgBF;QAAgBC;KAAc;AAEnD"}
@@ -18,7 +18,7 @@ _export(exports, {
18
18
  }
19
19
  });
20
20
  const _react = require("@griffel/react");
21
- const _index = require("../../state/index");
21
+ const _index = require("../../state/index.cjs");
22
22
  const toasterClassNames = {
23
23
  root: 'fui-Toaster'
24
24
  };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useToasterStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from \"@griffel/react\";\nimport { TOAST_POSITIONS, getPositionStyles } from \"../../state/index.js\";\nexport const toasterClassNames = {\n root: 'fui-Toaster'\n};\n/**\n * Styles for the root slot\n */ const useRootBaseClassName = makeResetStyles({\n position: 'fixed',\n width: '292px',\n pointerEvents: 'none'\n});\nconst useToasterStyles = makeStyles({\n inline: {\n position: 'absolute'\n }\n});\n/**\n * Apply styling to the Toaster slots based on the state\n */ export const useToasterStyles_unstable = (state)=>{\n const rootBaseClassName = useRootBaseClassName();\n const styles = useToasterStyles();\n const className = mergeClasses(toasterClassNames.root, rootBaseClassName, state.inline && styles.inline, state.root.className);\n if (state.bottomStart) {\n var _state_bottomStart;\n // eslint-disable-next-line react-hooks/immutability\n state.bottomStart.className = className;\n var _style;\n (_style = (_state_bottomStart = state.bottomStart).style) !== null && _style !== void 0 ? _style : _state_bottomStart.style = {};\n Object.assign(state.bottomStart.style, getPositionStyles(TOAST_POSITIONS.bottomStart, state.dir, state.offset));\n }\n if (state.bottomEnd) {\n var _state_bottomEnd;\n // eslint-disable-next-line react-hooks/immutability\n state.bottomEnd.className = className;\n var _style1;\n (_style1 = (_state_bottomEnd = state.bottomEnd).style) !== null && _style1 !== void 0 ? _style1 : _state_bottomEnd.style = {};\n Object.assign(state.bottomEnd.style, getPositionStyles(TOAST_POSITIONS.bottomEnd, state.dir, state.offset));\n }\n if (state.topStart) {\n var _state_topStart;\n // eslint-disable-next-line react-hooks/immutability\n state.topStart.className = className;\n var _style2;\n (_style2 = (_state_topStart = state.topStart).style) !== null && _style2 !== void 0 ? _style2 : _state_topStart.style = {};\n Object.assign(state.topStart.style, getPositionStyles(TOAST_POSITIONS.topStart, state.dir, state.offset));\n }\n if (state.topEnd) {\n var _state_topEnd;\n // eslint-disable-next-line react-hooks/immutability\n state.topEnd.className = className;\n var _style3;\n (_style3 = (_state_topEnd = state.topEnd).style) !== null && _style3 !== void 0 ? _style3 : _state_topEnd.style = {};\n Object.assign(state.topEnd.style, getPositionStyles(TOAST_POSITIONS.topEnd, state.dir, state.offset));\n }\n if (state.top) {\n var _state_top;\n // eslint-disable-next-line react-hooks/immutability\n state.top.className = className;\n var _style4;\n (_style4 = (_state_top = state.top).style) !== null && _style4 !== void 0 ? _style4 : _state_top.style = {};\n Object.assign(state.top.style, getPositionStyles(TOAST_POSITIONS.top, state.dir, state.offset));\n }\n if (state.bottom) {\n var _state_bottom;\n // eslint-disable-next-line react-hooks/immutability\n state.bottom.className = className;\n var _style5;\n (_style5 = (_state_bottom = state.bottom).style) !== null && _style5 !== void 0 ? _style5 : _state_bottom.style = {};\n Object.assign(state.bottom.style, getPositionStyles(TOAST_POSITIONS.bottom, state.dir, state.offset));\n }\n return state;\n};\n"],"names":["__resetStyles","__styles","mergeClasses","TOAST_POSITIONS","getPositionStyles","toasterClassNames","root","useRootBaseClassName","useToasterStyles","inline","qhf8xq","d","useToasterStyles_unstable","state","rootBaseClassName","styles","className","bottomStart","_state_bottomStart","_style","style","Object","assign","dir","offset","bottomEnd","_state_bottomEnd","_style1","topStart","_state_topStart","_style2","topEnd","_state_topEnd","_style3","top","_state_top","_style4","bottom","_state_bottom","_style5"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAGCK,iBAAiB;;;6BAiBY;eAAzBO;;;uBAnByC,gBAAgB;uBACvB,sBAAsB;AAClE,0BAA0B;IAC7BN,IAAI,EAAE;AACV,CAAC;AACD;;CAEA,GAAI,MAAMC,oBAAoB,GAAA,WAAA,OAAGP,oBAAA,EAAA,WAAA,MAAA;IAAA;CAIhC,CAAC;AACF,MAAMQ,gBAAgB,GAAA,WAAA,OAAGP,eAAA,EAAA;IAAAQ,MAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;KAAA;AAAA,CAIxB,CAAC;AAGS,mCAAmCE,KAAK,IAAG;IAClD,MAAMC,iBAAiB,GAAGP,oBAAoB,CAAC,CAAC;IAChD,MAAMQ,MAAM,GAAGP,gBAAgB,CAAC,CAAC;IACjC,MAAMQ,SAAS,OAAGd,mBAAY,EAACG,iBAAiB,CAACC,IAAI,EAAEQ,iBAAiB,EAAED,KAAK,CAACJ,MAAM,IAAIM,MAAM,CAACN,MAAM,EAAEI,KAAK,CAACP,IAAI,CAACU,SAAS,CAAC;IAC9H,IAAIH,KAAK,CAACI,WAAW,EAAE;QACnB,IAAIC,kBAAkB;QACtB,oDAAA;QACAL,KAAK,CAACI,WAAW,CAACD,SAAS,GAAGA,SAAS;QACvC,IAAIG,MAAM;SACTA,MAAM,GAAG,CAACD,kBAAkB,GAAGL,KAAK,CAACI,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SACVA,OAAO,GAAG,CAACD,aAAa,GAAGzB,KAAK,CAACwB,MAAAA,AAAM,EAAEjB,KAAAA,AAAK,MAAM,IAAI,IAAImB,OAAO,KAAK,KAAK,CAAC,GAAGA,OAAO,GAAGD,aAAa,CAAClB,KAAK,GAAG,CAAC,CAAC;QACpHC,MAAM,CAACC,MAAM,CAACT,KAAK,CAACwB,MAAM,CAACjB,KAAK,MAAEhB,wBAAiB,EAACD,sBAAe,CAACkC,MAAM,EAAExB,KAAK,CAACU,GAAG,EAAEV,KAAK,CAACW,MAAM,CAAC,CAAC;IACzG;IACA,OAAOX,KAAK;AAChB,CAAC"}
@@ -18,7 +18,7 @@ _export(exports, {
18
18
  }
19
19
  });
20
20
  const _react = require("@griffel/react");
21
- const _index = require("../../state/index");
21
+ const _index = require("../../state/index.cjs");
22
22
  const toasterClassNames = {
23
23
  root: 'fui-Toaster'
24
24
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Toaster/useToasterStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport type { ToasterSlots, ToasterState } from './Toaster.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { TOAST_POSITIONS, getPositionStyles } from '../../state/index';\n\nexport const toasterClassNames: SlotClassNames<ToasterSlots> = {\n root: 'fui-Toaster',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootBaseClassName = makeResetStyles({\n position: 'fixed',\n width: '292px',\n pointerEvents: 'none',\n});\n\nconst useToasterStyles = makeStyles({\n inline: {\n position: 'absolute',\n },\n});\n\n/**\n * Apply styling to the Toaster slots based on the state\n */\nexport const useToasterStyles_unstable = (state: ToasterState): ToasterState => {\n const rootBaseClassName = useRootBaseClassName();\n const styles = useToasterStyles();\n const className = mergeClasses(\n toasterClassNames.root,\n rootBaseClassName,\n state.inline && styles.inline,\n state.root.className,\n );\n if (state.bottomStart) {\n // eslint-disable-next-line react-hooks/immutability\n state.bottomStart.className = className;\n state.bottomStart.style ??= {};\n Object.assign(state.bottomStart.style, getPositionStyles(TOAST_POSITIONS.bottomStart, state.dir, state.offset));\n }\n\n if (state.bottomEnd) {\n // eslint-disable-next-line react-hooks/immutability\n state.bottomEnd.className = className;\n state.bottomEnd.style ??= {};\n Object.assign(state.bottomEnd.style, getPositionStyles(TOAST_POSITIONS.bottomEnd, state.dir, state.offset));\n }\n\n if (state.topStart) {\n // eslint-disable-next-line react-hooks/immutability\n state.topStart.className = className;\n state.topStart.style ??= {};\n Object.assign(state.topStart.style, getPositionStyles(TOAST_POSITIONS.topStart, state.dir, state.offset));\n }\n\n if (state.topEnd) {\n // eslint-disable-next-line react-hooks/immutability\n state.topEnd.className = className;\n state.topEnd.style ??= {};\n Object.assign(state.topEnd.style, getPositionStyles(TOAST_POSITIONS.topEnd, state.dir, state.offset));\n }\n\n if (state.top) {\n // eslint-disable-next-line react-hooks/immutability\n state.top.className = className;\n state.top.style ??= {};\n Object.assign(state.top.style, getPositionStyles(TOAST_POSITIONS.top, state.dir, state.offset));\n }\n\n if (state.bottom) {\n // eslint-disable-next-line react-hooks/immutability\n state.bottom.className = className;\n state.bottom.style ??= {};\n Object.assign(state.bottom.style, getPositionStyles(TOAST_POSITIONS.bottom, state.dir, state.offset));\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","TOAST_POSITIONS","getPositionStyles","toasterClassNames","root","useRootBaseClassName","position","width","pointerEvents","useToasterStyles","inline","useToasterStyles_unstable","state","rootBaseClassName","styles","className","bottomStart","style","Object","assign","dir","offset","bottomEnd","topStart","topEnd","top","bottom"],"mappings":"AAAA;;;;;;;;;;;;IAOaK,iBAAAA;;;6BAsBAQ;eAAAA;;;uBA3B6C,iBAAiB;uBAGxB,oBAAoB;AAEhE,0BAAwD;IAC7DP,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,2BAAuBP,sBAAAA,EAAgB;IAC3CQ,UAAU;IACVC,OAAO;IACPC,eAAe;AAC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OC,MAAM,CAACP,MAAMc,MAAM,CAACT,KAAK,MAAEf,wBAAAA,EAAkBD,sBAAAA,CAAgByB,MAAM,EAAEd,MAAMQ,GAAG,EAAER,MAAMS,MAAM;IACrG;IAEA,OAAOT;AACT,EAAE"}
1
+ {"version":3,"sources":["../src/components/Toaster/useToasterStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport type { ToasterSlots, ToasterState } from './Toaster.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { TOAST_POSITIONS, getPositionStyles } from '../../state/index';\n\nexport const toasterClassNames: SlotClassNames<ToasterSlots> = {\n root: 'fui-Toaster',\n};\n\n/**\n * Styles for the root slot\n */\nconst useRootBaseClassName = makeResetStyles({\n position: 'fixed',\n width: '292px',\n pointerEvents: 'none',\n});\n\nconst useToasterStyles = makeStyles({\n inline: {\n position: 'absolute',\n },\n});\n\n/**\n * Apply styling to the Toaster slots based on the state\n */\nexport const useToasterStyles_unstable = (state: ToasterState): ToasterState => {\n const rootBaseClassName = useRootBaseClassName();\n const styles = useToasterStyles();\n const className = mergeClasses(\n toasterClassNames.root,\n rootBaseClassName,\n state.inline && styles.inline,\n state.root.className,\n );\n if (state.bottomStart) {\n // eslint-disable-next-line react-hooks/immutability\n state.bottomStart.className = className;\n state.bottomStart.style ??= {};\n Object.assign(state.bottomStart.style, getPositionStyles(TOAST_POSITIONS.bottomStart, state.dir, state.offset));\n }\n\n if (state.bottomEnd) {\n // eslint-disable-next-line react-hooks/immutability\n state.bottomEnd.className = className;\n state.bottomEnd.style ??= {};\n Object.assign(state.bottomEnd.style, getPositionStyles(TOAST_POSITIONS.bottomEnd, state.dir, state.offset));\n }\n\n if (state.topStart) {\n // eslint-disable-next-line react-hooks/immutability\n state.topStart.className = className;\n state.topStart.style ??= {};\n Object.assign(state.topStart.style, getPositionStyles(TOAST_POSITIONS.topStart, state.dir, state.offset));\n }\n\n if (state.topEnd) {\n // eslint-disable-next-line react-hooks/immutability\n state.topEnd.className = className;\n state.topEnd.style ??= {};\n Object.assign(state.topEnd.style, getPositionStyles(TOAST_POSITIONS.topEnd, state.dir, state.offset));\n }\n\n if (state.top) {\n // eslint-disable-next-line react-hooks/immutability\n state.top.className = className;\n state.top.style ??= {};\n Object.assign(state.top.style, getPositionStyles(TOAST_POSITIONS.top, state.dir, state.offset));\n }\n\n if (state.bottom) {\n // eslint-disable-next-line react-hooks/immutability\n state.bottom.className = className;\n state.bottom.style ??= {};\n Object.assign(state.bottom.style, getPositionStyles(TOAST_POSITIONS.bottom, state.dir, state.offset));\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","TOAST_POSITIONS","getPositionStyles","toasterClassNames","root","useRootBaseClassName","position","width","pointerEvents","useToasterStyles","inline","useToasterStyles_unstable","state","rootBaseClassName","styles","className","bottomStart","style","Object","assign","dir","offset","bottomEnd","topStart","topEnd","top","bottom"],"mappings":"AAAA;;;;;;;;;;;;IAOaK,iBAAAA;;;6BAsBAQ;eAAAA;;;uBA3B6C,iBAAiB;uBAGxB,uBAAoB;AAEhE,0BAAwD;IAC7DP,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,2BAAuBP,sBAAAA,EAAgB;IAC3CQ,UAAU;IACVC,OAAO;IACPC,eAAe;AACjB;AAEA,MAAMC,uBAAmBV,iBAAAA,EAAW;IAClCW,QAAQ;QACNJ,UAAU;IACZ;AACF;AAKO,kCAAkC,CAACM;IACxC,MAAMC,oBAAoBR;IAC1B,MAAMS,SAASL;IACf,MAAMM,gBAAYf,mBAAAA,EAChBG,kBAAkBC,IAAI,EACtBS,mBACAD,MAAMF,MAAM,IAAII,OAAOJ,MAAM,EAC7BE,MAAMR,IAAI,CAACW,SAAS;IAEtB,IAAIH,MAAMI,WAAW,EAAE;YAGrBJ;QAFA,oDAAoD;QACpDA,MAAMI,WAAW,CAACD,SAAS,GAAGA;;QAC9BH,CAAAA,SAAAA,CAAAA,qBAA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A,KAAAA,IAAAA,UAAbL,cAAaK,KAAAA,GAAU,CAAC;QACxBC,OAAOC,MAAM,CAACP,MAAMY,MAAM,CAACP,KAAK,MAAEf,wBAAAA,EAAkBD,sBAAAA,CAAgBuB,MAAM,EAAEZ,MAAMQ,GAAG,EAAER,MAAMS,MAAM;IACrG;IAEA,IAAIT,MAAMa,GAAG,EAAE;YAGbb;QAFA,oDAAoD;QACpDA,MAAMa,GAAG,CAACV,SAAS,GAAGA;;QACtBH,CAAAA,UAAAA,CAAAA,aAAAA,MAAMa,GAAAA,AAAG,EAACR,KAAAA,MAAAA,QAAAA,YAAAA,KAAAA,IAAAA,UAAVL,WAAUK,KAAAA,GAAU,CAAC;QACrBC,OAAOC,MAAM,CAACP,MAAMa,GAAG,CAACR,KAAK,MAAEf,wBAAAA,EAAkBD,sBAAAA,CAAgBwB,GAAG,EAAEb,MAAMQ,GAAG,EAAER,MAAMS,MAAM;IAC/F;IAEA,IAAIT,MAAMc,MAAM,EAAE;YAGhBd;QAFA,oDAAoD;QACpDA,MAAMc,MAAM,CAACX,SAAS,GAAGA;;QACzBH,CAAAA,UAAAA,iBAAAA,MAAMc,MAAAA,AAAM,EAACT,KAAAA,MAAAA,QAAAA,YAAAA,KAAAA,IAAAA,UAAbL,cAAaK,KAAAA,GAAU,CAAC;QACxBC,OAAOC,MAAM,CAACP,MAAMc,MAAM,CAACT,KAAK,MAAEf,wBAAAA,EAAkBD,sBAAAA,CAAgByB,MAAM,EAAEd,MAAMQ,GAAG,EAAER,MAAMS,MAAM;IACrG;IAEA,OAAOT;AACT,EAAE"}
@@ -94,7 +94,7 @@ _export(exports, {
94
94
  return _ToastContainer.useToastContainer_unstable;
95
95
  },
96
96
  useToastController: function() {
97
- return _state.useToastController;
97
+ return _index.useToastController;
98
98
  },
99
99
  useToastFooterStyles_unstable: function() {
100
100
  return _ToastFooter.useToastFooterStyles_unstable;
@@ -121,7 +121,7 @@ _export(exports, {
121
121
  return _Toast.useToast_unstable;
122
122
  },
123
123
  useToaster: function() {
124
- return _state.useToaster;
124
+ return _index.useToaster;
125
125
  },
126
126
  useToasterStyles_unstable: function() {
127
127
  return _Toaster.useToasterStyles_unstable;
@@ -130,12 +130,12 @@ _export(exports, {
130
130
  return _Toaster.useToaster_unstable;
131
131
  }
132
132
  });
133
- const _state = require("./state");
134
- const _ToastTrigger = require("./ToastTrigger");
135
- const _Toaster = require("./Toaster");
136
- const _Toast = require("./Toast");
137
- const _ToastTitle = require("./ToastTitle");
138
- const _ToastBody = require("./ToastBody");
139
- const _ToastFooter = require("./ToastFooter");
140
- const _toastContainerContext = require("./contexts/toastContainerContext");
141
- const _ToastContainer = require("./ToastContainer");
133
+ const _index = require("./state/index.cjs");
134
+ const _ToastTrigger = require("./ToastTrigger.cjs");
135
+ const _Toaster = require("./Toaster.cjs");
136
+ const _Toast = require("./Toast.cjs");
137
+ const _ToastTitle = require("./ToastTitle.cjs");
138
+ const _ToastBody = require("./ToastBody.cjs");
139
+ const _ToastFooter = require("./ToastFooter.cjs");
140
+ const _toastContainerContext = require("./contexts/toastContainerContext.cjs");
141
+ const _ToastContainer = require("./ToastContainer.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { useToastController, useToaster } from './state';\nexport type {\n Announce as ToastAnnounce,\n AnnounceOptions as ToastAnnounceOptions,\n LiveMessage as ToastLiveMessage,\n} from './AriaLive';\nexport type {\n ToastPosition,\n ToastId,\n ToastOffset,\n ToastPoliteness,\n ToastStatus,\n ToastIntent,\n ToasterId,\n ToasterOptions,\n ToasterShortcuts,\n ToastImperativeRef,\n Toast as ToastData,\n ToastChangeData,\n ToastChangeHandler,\n ToastOptions,\n DispatchToastOptions as ToastDispatchOptions,\n UpdateToastOptions as ToastUpdateOptions,\n UpdateToastEventDetail as ToastUpdateEventDetail,\n} from './state';\n\nexport { ToastTrigger, useToastTrigger_unstable, renderToastTrigger_unstable } from './ToastTrigger';\nexport type { ToastTriggerChildProps, ToastTriggerProps, ToastTriggerState } from './ToastTrigger';\nexport {\n Toaster,\n useToaster_unstable,\n useToasterStyles_unstable,\n renderToaster_unstable,\n toasterClassNames,\n useToastAnnounce,\n} from './Toaster';\nexport type { ToasterProps, ToasterState, ToasterSlots } from './Toaster';\nexport {\n Toast,\n useToastStyles_unstable,\n useToastBase_unstable,\n useToast_unstable,\n renderToast_unstable,\n toastClassNames,\n} from './Toast';\nexport type { ToastBaseProps, ToastBaseState, ToastProps, ToastState, ToastSlots } from './Toast';\n\nexport {\n ToastTitle,\n useToastTitleStyles_unstable,\n useToastTitleBase_unstable,\n useToastTitle_unstable,\n renderToastTitle_unstable,\n toastTitleClassNames,\n} from './ToastTitle';\nexport type {\n ToastTitleBaseProps,\n ToastTitleBaseState,\n ToastTitleProps,\n ToastTitleState,\n ToastTitleSlots,\n} from './ToastTitle';\n\nexport {\n ToastBody,\n useToastBodyStyles_unstable,\n useToastBodyBase_unstable,\n useToastBody_unstable,\n renderToastBody_unstable,\n toastBodyClassNames,\n} from './ToastBody';\nexport type {\n ToastBodyBaseProps,\n ToastBodyBaseState,\n ToastBodyProps,\n ToastBodyState,\n ToastBodySlots,\n} from './ToastBody';\n\nexport {\n ToastFooter,\n useToastFooterStyles_unstable,\n useToastFooter_unstable,\n renderToastFooter_unstable,\n toastFooterClassNames,\n} from './ToastFooter';\nexport type { ToastFooterProps, ToastFooterState, ToastFooterSlots } from './ToastFooter';\n\nexport type { ToastContainerContextValue } from './contexts/toastContainerContext';\nexport { ToastContainerContextProvider, useToastContainerContext } from './contexts/toastContainerContext';\nexport { toastContainerClassNames } from './ToastContainer';\nexport type { ToastContainerSlots, ToastContainerProps, ToastContainerState } from './ToastContainer';\nexport {\n useToastContainer_unstable,\n renderToastContainer_unstable,\n useToastContainerContextValues_unstable,\n} from './ToastContainer';\n"],"names":["useToastController","useToaster","ToastTrigger","useToastTrigger_unstable","renderToastTrigger_unstable","Toaster","useToaster_unstable","useToasterStyles_unstable","renderToaster_unstable","toasterClassNames","useToastAnnounce","Toast","useToastStyles_unstable","useToastBase_unstable","useToast_unstable","renderToast_unstable","toastClassNames","ToastTitle","useToastTitleStyles_unstable","useToastTitleBase_unstable","useToastTitle_unstable","renderToastTitle_unstable","toastTitleClassNames","ToastBody","useToastBodyStyles_unstable","useToastBodyBase_unstable","useToastBody_unstable","renderToastBody_unstable","toastBodyClassNames","ToastFooter","useToastFooterStyles_unstable","useToastFooter_unstable","renderToastFooter_unstable","toastFooterClassNames","ToastContainerContextProvider","useToastContainerContext","toastContainerClassNames","useToastContainer_unstable","renderToastContainer_unstable","useToastContainerContextValues_unstable"],"mappings":";;;;;;;;;;;;eAsCEW,YAAK;;aA0BI;eAATY;;iCAyBoC;eAA7BW;;IATPL,WAAW;;;;eAhCXZ,sBAAU;;;eAtBHf,0BAAY;;;eAGnBG,gBAAO;;;eAuCPsB,mCAAwB;;;eA0BxBW,6CAA6B;;;eAX7BN,uCAA0B;;;eA/B1BX,qCAAyB;;+BA1BiD;eAA3BjB;;;eAgB/CW,2BAAoB;;;eAVpBP,+BAAsB;;IAqCtBoB;6CAAmB;;;eA1BnBZ,sBAAe;;;eA+CRoB,wCAAwB;;yBANV;eAArBH;;;eA/BAX,gCAAoB;;qBApBH;eAAjBb;;IACAC,gBAAgB;;;;eAMhBG,4BAAqB;;;eA0BrBY,oCAAyB;;;eADzBD,sCAA2B;;;eAE3BE,gCAAqB;;IAsBiBS,wBAAwB;;;;eAM9DI,uDAAuC,QAClC,mBAAmB;;IAHxBF;yDAA0B;;;eA7FnBrC,yBAAkB;;;eAiFzB8B,0CAA6B;;;eAC7BC,oCAAuB;;;eA3CvBnB,8BAAuB;;;eAWvBO,sCAA0B;;IAD1BD,4BAA4B;;;;eAE5BE,kCAAsB;;;eAzBDjB,sCAAwB;;;eAe7CW,wBAAiB;;;eAzCUb,iBAAU;;;eA+BrCM,kCAAyB;;;eADzBD,4BAAmB;;;uBA9B0B,UAAU;8BA0B2B,iBAAiB;yBAS9F,YAAY;uBASZ,UAAU;4BAUV,eAAe;2BAgBf,cAAc;6BAed,gBAAgB;uCAIiD,mCAAmC;gCAClE,mBAAmB"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export { useToastController, useToaster } from './state';\nexport type {\n Announce as ToastAnnounce,\n AnnounceOptions as ToastAnnounceOptions,\n LiveMessage as ToastLiveMessage,\n} from './AriaLive';\nexport type {\n ToastPosition,\n ToastId,\n ToastOffset,\n ToastPoliteness,\n ToastStatus,\n ToastIntent,\n ToasterId,\n ToasterOptions,\n ToasterShortcuts,\n ToastImperativeRef,\n Toast as ToastData,\n ToastChangeData,\n ToastChangeHandler,\n ToastOptions,\n DispatchToastOptions as ToastDispatchOptions,\n UpdateToastOptions as ToastUpdateOptions,\n UpdateToastEventDetail as ToastUpdateEventDetail,\n} from './state';\n\nexport { ToastTrigger, useToastTrigger_unstable, renderToastTrigger_unstable } from './ToastTrigger';\nexport type { ToastTriggerChildProps, ToastTriggerProps, ToastTriggerState } from './ToastTrigger';\nexport {\n Toaster,\n useToaster_unstable,\n useToasterStyles_unstable,\n renderToaster_unstable,\n toasterClassNames,\n useToastAnnounce,\n} from './Toaster';\nexport type { ToasterProps, ToasterState, ToasterSlots } from './Toaster';\nexport {\n Toast,\n useToastStyles_unstable,\n useToastBase_unstable,\n useToast_unstable,\n renderToast_unstable,\n toastClassNames,\n} from './Toast';\nexport type { ToastBaseProps, ToastBaseState, ToastProps, ToastState, ToastSlots } from './Toast';\n\nexport {\n ToastTitle,\n useToastTitleStyles_unstable,\n useToastTitleBase_unstable,\n useToastTitle_unstable,\n renderToastTitle_unstable,\n toastTitleClassNames,\n} from './ToastTitle';\nexport type {\n ToastTitleBaseProps,\n ToastTitleBaseState,\n ToastTitleProps,\n ToastTitleState,\n ToastTitleSlots,\n} from './ToastTitle';\n\nexport {\n ToastBody,\n useToastBodyStyles_unstable,\n useToastBodyBase_unstable,\n useToastBody_unstable,\n renderToastBody_unstable,\n toastBodyClassNames,\n} from './ToastBody';\nexport type {\n ToastBodyBaseProps,\n ToastBodyBaseState,\n ToastBodyProps,\n ToastBodyState,\n ToastBodySlots,\n} from './ToastBody';\n\nexport {\n ToastFooter,\n useToastFooterStyles_unstable,\n useToastFooter_unstable,\n renderToastFooter_unstable,\n toastFooterClassNames,\n} from './ToastFooter';\nexport type { ToastFooterProps, ToastFooterState, ToastFooterSlots } from './ToastFooter';\n\nexport type { ToastContainerContextValue } from './contexts/toastContainerContext';\nexport { ToastContainerContextProvider, useToastContainerContext } from './contexts/toastContainerContext';\nexport { toastContainerClassNames } from './ToastContainer';\nexport type { ToastContainerSlots, ToastContainerProps, ToastContainerState } from './ToastContainer';\nexport {\n useToastContainer_unstable,\n renderToastContainer_unstable,\n useToastContainerContextValues_unstable,\n} from './ToastContainer';\n"],"names":["useToastController","useToaster","ToastTrigger","useToastTrigger_unstable","renderToastTrigger_unstable","Toaster","useToaster_unstable","useToasterStyles_unstable","renderToaster_unstable","toasterClassNames","useToastAnnounce","Toast","useToastStyles_unstable","useToastBase_unstable","useToast_unstable","renderToast_unstable","toastClassNames","ToastTitle","useToastTitleStyles_unstable","useToastTitleBase_unstable","useToastTitle_unstable","renderToastTitle_unstable","toastTitleClassNames","ToastBody","useToastBodyStyles_unstable","useToastBodyBase_unstable","useToastBody_unstable","renderToastBody_unstable","toastBodyClassNames","ToastFooter","useToastFooterStyles_unstable","useToastFooter_unstable","renderToastFooter_unstable","toastFooterClassNames","ToastContainerContextProvider","useToastContainerContext","toastContainerClassNames","useToastContainer_unstable","renderToastContainer_unstable","useToastContainerContextValues_unstable"],"mappings":";;;;;;;;;;;;eAsCEW,YAAK;;aA0BI;eAATY;;iCAyBoC;eAA7BW;;IATPL,WAAW;;;;eAhCXZ,sBAAU;;;eAtBHf,0BAAY;;;eAGnBG,gBAAO;;;eAuCPsB,mCAAwB;;;eA0BxBW,6CAA6B;;;eAX7BN,uCAA0B;;;eA/B1BX,qCAAyB;;+BA1BiD;eAA3BjB;;;eAgB/CW,2BAAoB;;;eAVpBP,+BAAsB;;IAqCtBoB;6CAAmB;;;eA1BnBZ,sBAAe;;;eA+CRoB,wCAAwB;;yBANV;eAArBH;;;eA/BAX,gCAAoB;;qBApBH;eAAjBb;;IACAC,gBAAgB;;;;eAMhBG,4BAAqB;;;eA0BrBY,oCAAyB;;;eADzBD,sCAA2B;;;eAE3BE,gCAAqB;;IAsBiBS,wBAAwB;;;;eAM9DI,uDAAuC,QAClC,sBAAmB;;IAHxBF;yDAA0B;;;eA7FnBrC,yBAAkB;;;eAiFzB8B,0CAA6B;;;eAC7BC,oCAAuB;;;eA3CvBnB,8BAAuB;;;eAWvBO,sCAA0B;;IAD1BD,4BAA4B;;;;eAE5BE,kCAAsB;;;eAzBDjB,sCAAwB;;;eAe7CW,wBAAiB;;;eAzCUb,iBAAU;;;eA+BrCM,kCAAyB;;;eADzBD,4BAAmB;;;uBA9B0B,mBAAU;8BA0B2B,oBAAiB;yBAS9F,eAAY;uBASZ,aAAU;4BAUV,kBAAe;2BAgBf,iBAAc;6BAed,mBAAgB;uCAIiD,sCAAmC;gCAClE,sBAAmB"}
@@ -13,7 +13,7 @@ _export(exports, {
13
13
  return _constants.TOAST_POSITIONS;
14
14
  },
15
15
  getPositionStyles: function() {
16
- return _vanilla.getPositionStyles;
16
+ return _index.getPositionStyles;
17
17
  },
18
18
  useToastController: function() {
19
19
  return _useToastController.useToastController;
@@ -22,7 +22,7 @@ _export(exports, {
22
22
  return _useToaster.useToaster;
23
23
  }
24
24
  });
25
- const _useToaster = require("./useToaster");
26
- const _useToastController = require("./useToastController");
27
- const _vanilla = require("./vanilla");
28
- const _constants = require("./constants");
25
+ const _useToaster = require("./useToaster.cjs");
26
+ const _useToastController = require("./useToastController.cjs");
27
+ const _index = require("./vanilla/index.cjs");
28
+ const _constants = require("./constants.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/state/index.ts"],"sourcesContent":["export type {\n CommonToastDetail,\n DismissAllToastsEventDetail,\n DismissToastEventDetail,\n DispatchToastOptions,\n PauseToastEventDetail,\n PlayToastEventDetail,\n ShowToastEventDetail,\n Toast,\n ToastChangeData,\n ToastChangeHandler,\n ToastId,\n ToastImperativeRef,\n ToastIntent,\n ToastListenerMap,\n ToastOffset,\n ToastOffsetObject,\n ToastOptions,\n ToastPoliteness,\n ToastPosition,\n ToastStatus,\n ToasterId,\n ToasterOptions,\n ToasterShortcuts,\n UpdateToastEventDetail,\n UpdateToastOptions,\n} from './types';\nexport { useToaster } from './useToaster';\nexport { useToastController } from './useToastController';\nexport { getPositionStyles } from './vanilla';\nexport { TOAST_POSITIONS } from './constants';\n"],"names":["useToaster","useToastController","getPositionStyles","TOAST_POSITIONS"],"mappings":";;;;;;;;;;;;eA8BSG,0BAAe;;;eADfD,0BAAiB;;;eADjBD,sCAAkB;;;eADlBD,sBAAU;;;4BAAQ,eAAe;oCACP,uBAAuB;yBACxB,YAAY;2BACd,cAAc"}
1
+ {"version":3,"sources":["../src/state/index.ts"],"sourcesContent":["export type {\n CommonToastDetail,\n DismissAllToastsEventDetail,\n DismissToastEventDetail,\n DispatchToastOptions,\n PauseToastEventDetail,\n PlayToastEventDetail,\n ShowToastEventDetail,\n Toast,\n ToastChangeData,\n ToastChangeHandler,\n ToastId,\n ToastImperativeRef,\n ToastIntent,\n ToastListenerMap,\n ToastOffset,\n ToastOffsetObject,\n ToastOptions,\n ToastPoliteness,\n ToastPosition,\n ToastStatus,\n ToasterId,\n ToasterOptions,\n ToasterShortcuts,\n UpdateToastEventDetail,\n UpdateToastOptions,\n} from './types';\nexport { useToaster } from './useToaster';\nexport { useToastController } from './useToastController';\nexport { getPositionStyles } from './vanilla';\nexport { TOAST_POSITIONS } from './constants';\n"],"names":["useToaster","useToastController","getPositionStyles","TOAST_POSITIONS"],"mappings":";;;;;;;;;;;;eA8BSG,0BAAe;;;eADfD,wBAAiB;;;eADjBD,sCAAkB;;;eADlBD,sBAAU;;;4BAAQ,kBAAe;oCACP,0BAAuB;uBACxB,qBAAY;2BACd,iBAAc"}