@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
@@ -25,4 +25,4 @@ _export(exports, {
25
25
  return _index.useToastFooter_unstable;
26
26
  }
27
27
  });
28
- const _index = require("./components/ToastFooter/index");
28
+ const _index = require("./components/ToastFooter/index.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ToastFooter.ts"],"sourcesContent":["export type { ToastFooterProps, ToastFooterSlots, ToastFooterState } from './components/ToastFooter/index';\nexport {\n ToastFooter,\n renderToastFooter_unstable,\n toastFooterClassNames,\n useToastFooterStyles_unstable,\n useToastFooter_unstable,\n} from './components/ToastFooter/index';\n"],"names":["ToastFooter","renderToastFooter_unstable","toastFooterClassNames","useToastFooterStyles_unstable","useToastFooter_unstable"],"mappings":";;;;;;;;;;;;eAEEA,kBAAW;;;eACXC,iCAA0B;;;eAC1BC,4BAAqB;;;eACrBC,oCAA6B;;;eAC7BC,8BAAuB;;;uBAClB,iCAAiC"}
1
+ {"version":3,"sources":["../src/ToastFooter.ts"],"sourcesContent":["export type { ToastFooterProps, ToastFooterSlots, ToastFooterState } from './components/ToastFooter/index';\nexport {\n ToastFooter,\n renderToastFooter_unstable,\n toastFooterClassNames,\n useToastFooterStyles_unstable,\n useToastFooter_unstable,\n} from './components/ToastFooter/index';\n"],"names":["ToastFooter","renderToastFooter_unstable","toastFooterClassNames","useToastFooterStyles_unstable","useToastFooter_unstable"],"mappings":";;;;;;;;;;;;eAEEA,kBAAW;;;eACXC,iCAA0B;;;eAC1BC,4BAAqB;;;eACrBC,oCAA6B;;;eAC7BC,8BAAuB;;;uBAClB,oCAAiC"}
@@ -28,4 +28,4 @@ _export(exports, {
28
28
  return _index.useToastTitle_unstable;
29
29
  }
30
30
  });
31
- const _index = require("./components/ToastTitle/index");
31
+ const _index = require("./components/ToastTitle/index.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ToastTitle.ts"],"sourcesContent":["export type {\n ToastTitleBaseProps,\n ToastTitleBaseState,\n ToastTitleProps,\n ToastTitleSlots,\n ToastTitleState,\n} from './components/ToastTitle/index';\nexport {\n ToastTitle,\n renderToastTitle_unstable,\n toastTitleClassNames,\n useToastTitleStyles_unstable,\n useToastTitleBase_unstable,\n useToastTitle_unstable,\n} from './components/ToastTitle/index';\n"],"names":["ToastTitle","renderToastTitle_unstable","toastTitleClassNames","useToastTitleStyles_unstable","useToastTitleBase_unstable","useToastTitle_unstable"],"mappings":";;;;;;;;;;;;eAQEA,iBAAU;;;eACVC,gCAAyB;;;eACzBC,2BAAoB;;;eAEpBE,iCAA0B;;;eAD1BD,mCAA4B;;;eAE5BE,6BAAsB;;;uBACjB,gCAAgC"}
1
+ {"version":3,"sources":["../src/ToastTitle.ts"],"sourcesContent":["export type {\n ToastTitleBaseProps,\n ToastTitleBaseState,\n ToastTitleProps,\n ToastTitleSlots,\n ToastTitleState,\n} from './components/ToastTitle/index';\nexport {\n ToastTitle,\n renderToastTitle_unstable,\n toastTitleClassNames,\n useToastTitleStyles_unstable,\n useToastTitleBase_unstable,\n useToastTitle_unstable,\n} from './components/ToastTitle/index';\n"],"names":["ToastTitle","renderToastTitle_unstable","toastTitleClassNames","useToastTitleStyles_unstable","useToastTitleBase_unstable","useToastTitle_unstable"],"mappings":";;;;;;;;;;;;eAQEA,iBAAU;;;eACVC,gCAAyB;;;eACzBC,2BAAoB;;;eAEpBE,iCAA0B;;;eAD1BD,mCAA4B;;;eAE5BE,6BAAsB;;;uBACjB,mCAAgC"}
@@ -19,4 +19,4 @@ _export(exports, {
19
19
  return _index.useToastTrigger_unstable;
20
20
  }
21
21
  });
22
- const _index = require("./components/ToastTrigger/index");
22
+ const _index = require("./components/ToastTrigger/index.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/ToastTrigger.ts"],"sourcesContent":["export type { ToastTriggerChildProps, ToastTriggerProps, ToastTriggerState } from './components/ToastTrigger/index';\nexport { ToastTrigger, renderToastTrigger_unstable, useToastTrigger_unstable } from './components/ToastTrigger/index';\n"],"names":["ToastTrigger","renderToastTrigger_unstable","useToastTrigger_unstable"],"mappings":";;;;;;;;;;;;eACSA,mBAAY;;;eAAEC,kCAA2B;;;eAAEC,+BAAwB;;;uBAAQ,kCAAkC"}
1
+ {"version":3,"sources":["../src/ToastTrigger.ts"],"sourcesContent":["export type { ToastTriggerChildProps, ToastTriggerProps, ToastTriggerState } from './components/ToastTrigger/index';\nexport { ToastTrigger, renderToastTrigger_unstable, useToastTrigger_unstable } from './components/ToastTrigger/index';\n"],"names":["ToastTrigger","renderToastTrigger_unstable","useToastTrigger_unstable"],"mappings":";;;;;;;;;;;;eACSA,mBAAY;;;eAAEC,kCAA2B;;;eAAEC,+BAAwB;;;uBAAQ,qCAAkC"}
@@ -28,4 +28,4 @@ _export(exports, {
28
28
  return _index.useToaster_unstable;
29
29
  }
30
30
  });
31
- const _index = require("./components/Toaster/index");
31
+ const _index = require("./components/Toaster/index.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/Toaster.ts"],"sourcesContent":["export type { ToasterProps, ToasterSlots, ToasterSlotsInternal, ToasterState } from './components/Toaster/index';\nexport {\n Toaster,\n renderToaster_unstable,\n toasterClassNames,\n useToasterStyles_unstable,\n useToaster_unstable,\n useToastAnnounce,\n} from './components/Toaster/index';\n"],"names":["Toaster","renderToaster_unstable","toasterClassNames","useToasterStyles_unstable","useToaster_unstable","useToastAnnounce"],"mappings":";;;;;;;;;;;;eAEEA,cAAO;;;eACPC,6BAAsB;;;eACtBC,wBAAiB;;;eAGjBG,uBAAgB;;;eAFhBF,gCAAyB;;;eACzBC,0BAAmB;;;uBAEd,6BAA6B"}
1
+ {"version":3,"sources":["../src/Toaster.ts"],"sourcesContent":["export type { ToasterProps, ToasterSlots, ToasterSlotsInternal, ToasterState } from './components/Toaster/index';\nexport {\n Toaster,\n renderToaster_unstable,\n toasterClassNames,\n useToasterStyles_unstable,\n useToaster_unstable,\n useToastAnnounce,\n} from './components/Toaster/index';\n"],"names":["Toaster","renderToaster_unstable","toasterClassNames","useToasterStyles_unstable","useToaster_unstable","useToastAnnounce"],"mappings":";;;;;;;;;;;;eAEEA,cAAO;;;eACPC,6BAAsB;;;eACtBC,wBAAiB;;;eAGjBG,uBAAgB;;;eAFhBF,gCAAyB;;;eACzBC,0BAAmB;;;uBAEd,gCAA6B"}
@@ -9,9 +9,9 @@ Object.defineProperty(exports, "AriaLive", {
9
9
  return AriaLive;
10
10
  }
11
11
  });
12
- const _useAriaLive = require("./useAriaLive");
13
- const _renderAriaLive = require("./renderAriaLive");
14
- const _useAriaLiveStylesstyles = require("./useAriaLiveStyles.styles");
12
+ const _useAriaLive = require("./useAriaLive.cjs");
13
+ const _renderAriaLive = require("./renderAriaLive.cjs");
14
+ const _useAriaLiveStylesstyles = require("./useAriaLiveStyles.styles.cjs");
15
15
  const AriaLive = (props)=>{
16
16
  const state = (0, _useAriaLive.useAriaLive_unstable)(props);
17
17
  (0, _useAriaLiveStylesstyles.useAriaLiveStyles_unstable)(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/AriaLive/AriaLive.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useAriaLive_unstable } from './useAriaLive';\nimport { renderAriaLive_unstable } from './renderAriaLive';\nimport { useAriaLiveStyles_unstable } from './useAriaLiveStyles.styles';\nimport type { AriaLiveProps } from './AriaLive.types';\n\n/**\n * A component that manages aria live announcements imperatively\n */\nexport const AriaLive: React.FC<AriaLiveProps> = props => {\n const state = useAriaLive_unstable(props);\n\n useAriaLiveStyles_unstable(state);\n return renderAriaLive_unstable(state);\n};\n\nAriaLive.displayName = 'AriaLive';\n"],"names":["useAriaLive_unstable","renderAriaLive_unstable","useAriaLiveStyles_unstable","AriaLive","props","state","displayName"],"mappings":"AAAA;;;;;;;;;;;6BAGqC,gBAAgB;gCACb,mBAAmB;yCAChB,6BAA6B;AAMjE,MAAMG,WAAoCC,CAAAA;IAC/C,MAAMC,YAAQL,iCAAAA,EAAqBI;QAEnCF,mDAAAA,EAA2BG;IAC3B,WAAOJ,uCAAAA,EAAwBI;AACjC,EAAE;AAEFF,SAASG,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/AriaLive/AriaLive.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useAriaLive_unstable } from './useAriaLive';\nimport { renderAriaLive_unstable } from './renderAriaLive';\nimport { useAriaLiveStyles_unstable } from './useAriaLiveStyles.styles';\nimport type { AriaLiveProps } from './AriaLive.types';\n\n/**\n * A component that manages aria live announcements imperatively\n */\nexport const AriaLive: React.FC<AriaLiveProps> = props => {\n const state = useAriaLive_unstable(props);\n\n useAriaLiveStyles_unstable(state);\n return renderAriaLive_unstable(state);\n};\n\nAriaLive.displayName = 'AriaLive';\n"],"names":["useAriaLive_unstable","renderAriaLive_unstable","useAriaLiveStyles_unstable","AriaLive","props","state","displayName"],"mappings":"AAAA;;;;;;;;;;;6BAGqC,mBAAgB;gCACb,sBAAmB;yCAChB,gCAA6B;AAMjE,MAAMG,WAAoCC,CAAAA;IAC/C,MAAMC,YAAQL,iCAAAA,EAAqBI;QAEnCF,mDAAAA,EAA2BG;IAC3B,WAAOJ,uCAAAA,EAAwBI;AACjC,EAAE;AAEFF,SAASG,WAAW,GAAG"}
@@ -25,7 +25,7 @@ _export(exports, {
25
25
  return _useAriaLive.useAriaLive_unstable;
26
26
  }
27
27
  });
28
- const _AriaLive = require("./AriaLive");
29
- const _renderAriaLive = require("./renderAriaLive");
30
- const _useAriaLive = require("./useAriaLive");
31
- const _useAriaLiveStylesstyles = require("./useAriaLiveStyles.styles");
28
+ const _AriaLive = require("./AriaLive.cjs");
29
+ const _renderAriaLive = require("./renderAriaLive.cjs");
30
+ const _useAriaLive = require("./useAriaLive.cjs");
31
+ const _useAriaLiveStylesstyles = require("./useAriaLiveStyles.styles.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/AriaLive/index.ts"],"sourcesContent":["export { AriaLive } from './AriaLive';\nexport type {\n Announce,\n AnnounceOptions,\n AriaLivePoliteness,\n AriaLiveProps,\n AriaLiveSlots,\n AriaLiveState,\n LiveMessage,\n} from './AriaLive.types';\nexport { renderAriaLive_unstable } from './renderAriaLive';\nexport { useAriaLive_unstable } from './useAriaLive';\nexport { ariaLiveClassNames, useAriaLiveStyles_unstable } from './useAriaLiveStyles.styles';\n"],"names":["AriaLive","renderAriaLive_unstable","useAriaLive_unstable","ariaLiveClassNames","useAriaLiveStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,kBAAQ;;;eAYRG,2CAAkB;;;eAFlBF,uCAAuB;;;eAEHG,mDAA0B;;;eAD9CF,iCAAoB;;;0BAXJ,aAAa;gCAUE,mBAAmB;6BACtB,gBAAgB;yCACU,6BAA6B"}
1
+ {"version":3,"sources":["../src/components/AriaLive/index.ts"],"sourcesContent":["export { AriaLive } from './AriaLive';\nexport type {\n Announce,\n AnnounceOptions,\n AriaLivePoliteness,\n AriaLiveProps,\n AriaLiveSlots,\n AriaLiveState,\n LiveMessage,\n} from './AriaLive.types';\nexport { renderAriaLive_unstable } from './renderAriaLive';\nexport { useAriaLive_unstable } from './useAriaLive';\nexport { ariaLiveClassNames, useAriaLiveStyles_unstable } from './useAriaLiveStyles.styles';\n"],"names":["AriaLive","renderAriaLive_unstable","useAriaLive_unstable","ariaLiveClassNames","useAriaLiveStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,kBAAQ;;;eAYRG,2CAAkB;;;eAFlBF,uCAAuB;;;eAEHG,mDAA0B;;;eAD9CF,iCAAoB;;;0BAXJ,gBAAa;gCAUE,sBAAmB;6BACtB,mBAAgB;yCACU,gCAA6B"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useAriaLiveStyles.styles.js"],"sourcesContent":["'use client';\nimport { mergeClasses, makeResetStyles } from \"@griffel/react\";\nexport const ariaLiveClassNames = {\n assertive: 'fui-AriaLive__assertive',\n polite: 'fui-AriaLive__polite'\n};\n/**\n * Styles for the root slot\n */ const useResetStyles = makeResetStyles({\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0px',\n width: '1px',\n position: 'absolute'\n});\n/**\n * Apply styling to the AriaLive slots based on the state\n */ export const useAriaLiveStyles_unstable = (state)=>{\n const visuallyHidden = useResetStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.assertive.className = mergeClasses(visuallyHidden, ariaLiveClassNames.assertive, state.assertive.className);\n // eslint-disable-next-line react-hooks/immutability\n state.polite.className = mergeClasses(visuallyHidden, ariaLiveClassNames.polite, state.polite.className);\n return state;\n};\n"],"names":["mergeClasses","__resetStyles","ariaLiveClassNames","assertive","polite","useResetStyles","useAriaLiveStyles_unstable","state","visuallyHidden","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAECE,kBAAkB;;;IAiBdI,0BAA0B;;;;uBAlBG,gBAAgB;AACvD,2BAA2B;IAC9BH,SAAS,EAAE,yBAAyB;IACpCC,MAAM,EAAE;AACZ,CAAC;AACD;;CAEA,GAAI,MAAMC,cAAc,GAAA,WAAA,OAAGJ,oBAAA,EAAA,WAAA,MAAA;IAAA;CAQ1B,CAAC;AAGS,oCAAoCM,KAAK,IAAG;IACnD,MAAMC,cAAc,GAAGH,cAAc,CAAC,CAAC;IACvC,oDAAA;IACAE,KAAK,CAACJ,SAAS,CAACM,SAAS,OAAGT,mBAAY,EAACQ,cAAc,EAAEN,kBAAkB,CAACC,SAAS,EAAEI,KAAK,CAACJ,SAAS,CAACM,SAAS,CAAC;IACjH,oDAAA;IACAF,KAAK,CAACH,MAAM,CAACK,SAAS,OAAGT,mBAAY,EAACQ,cAAc,EAAEN,kBAAkB,CAACE,MAAM,EAAEG,KAAK,CAACH,MAAM,CAACK,SAAS,CAAC;IACxG,OAAOF,KAAK;AAChB,CAAC"}
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "Timer", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _useTimerStylesstyles = require("./useTimerStyles.styles");
14
+ const _useTimerStylesstyles = require("./useTimerStyles.styles.cjs");
15
15
  const Timer = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
16
16
  const baseAnimationStyles = (0, _useTimerStylesstyles.useBaseAnimationStyles)();
17
17
  const { running, timeout, onTimeout } = props;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Timer/Timer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useBaseAnimationStyles } from './useTimerStyles.styles';\n\nexport type TimerProps = {\n running: boolean;\n timeout: number;\n // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onTimeout: () => void;\n as?: 'span';\n};\n\nexport const Timer = React.forwardRef<HTMLDivElement, TimerProps>((props, ref) => {\n const baseAnimationStyles = useBaseAnimationStyles();\n const { running, timeout, onTimeout } = props;\n\n const style: React.CSSProperties = {\n animationDuration: `${timeout}ms`,\n animationPlayState: running ? 'running' : 'paused',\n };\n\n if (timeout < 0) {\n return null;\n }\n\n return (\n <span\n onAnimationEnd={onTimeout}\n data-timer-status={style.animationPlayState}\n ref={ref}\n style={style}\n className={baseAnimationStyles}\n />\n );\n});\n\nTimer.displayName = 'Timer';\n"],"names":["React","useBaseAnimationStyles","Timer","forwardRef","props","ref","baseAnimationStyles","running","timeout","onTimeout","style","animationDuration","animationPlayState","span","onAnimationEnd","data-timer-status","className","displayName"],"mappings":"AAAA;;;;;+BAaaE;;;;;;;iEAXU,QAAQ;sCACQ,0BAA0B;AAU1D,cAAMA,WAAAA,GAAQF,OAAMG,UAAU,CAA6B,CAACC,OAAOC;IACxE,MAAMC,0BAAsBL,4CAAAA;IAC5B,MAAM,EAAEM,OAAO,EAAEC,OAAO,EAAEC,SAAS,EAAE,GAAGL;IAExC,MAAMM,QAA6B;QACjCC,mBAAmB,GAAGH,QAAQ,EAAE,CAAC;QACjCI,oBAAoBL,UAAU,YAAY;IAC5C;IAEA,IAAIC,UAAU,GAAG;QACf,OAAO;IACT;IAEA,OAAA,WAAA,GACE,OAAA,aAAA,CAACK,QAAAA;QACCC,gBAAgBL;QAChBM,qBAAmBL,MAAME,kBAAkB;QAC3CP,KAAKA;QACLK,OAAOA;QACPM,WAAWV;;AAGjB,GAAG;AAEHJ,MAAMe,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/Timer/Timer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useBaseAnimationStyles } from './useTimerStyles.styles';\n\nexport type TimerProps = {\n running: boolean;\n timeout: number;\n // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onTimeout: () => void;\n as?: 'span';\n};\n\nexport const Timer = React.forwardRef<HTMLDivElement, TimerProps>((props, ref) => {\n const baseAnimationStyles = useBaseAnimationStyles();\n const { running, timeout, onTimeout } = props;\n\n const style: React.CSSProperties = {\n animationDuration: `${timeout}ms`,\n animationPlayState: running ? 'running' : 'paused',\n };\n\n if (timeout < 0) {\n return null;\n }\n\n return (\n <span\n onAnimationEnd={onTimeout}\n data-timer-status={style.animationPlayState}\n ref={ref}\n style={style}\n className={baseAnimationStyles}\n />\n );\n});\n\nTimer.displayName = 'Timer';\n"],"names":["React","useBaseAnimationStyles","Timer","forwardRef","props","ref","baseAnimationStyles","running","timeout","onTimeout","style","animationDuration","animationPlayState","span","onAnimationEnd","data-timer-status","className","displayName"],"mappings":"AAAA;;;;;+BAaaE;;;;;;;iEAXU,QAAQ;sCACQ,6BAA0B;AAU1D,cAAMA,WAAAA,GAAQF,OAAMG,UAAU,CAA6B,CAACC,OAAOC;IACxE,MAAMC,0BAAsBL,4CAAAA;IAC5B,MAAM,EAAEM,OAAO,EAAEC,OAAO,EAAEC,SAAS,EAAE,GAAGL;IAExC,MAAMM,QAA6B;QACjCC,mBAAmB,GAAGH,QAAQ,EAAE,CAAC;QACjCI,oBAAoBL,UAAU,YAAY;IAC5C;IAEA,IAAIC,UAAU,GAAG;QACf,OAAO;IACT;IAEA,OAAA,WAAA,GACE,OAAA,aAAA,CAACK,QAAAA;QACCC,gBAAgBL;QAChBM,qBAAmBL,MAAME,kBAAkB;QAC3CP,KAAKA;QACLK,OAAOA;QACPM,WAAWV;;AAGjB,GAAG;AAEHJ,MAAMe,WAAW,GAAG"}
@@ -8,4 +8,4 @@ Object.defineProperty(exports, "Timer", {
8
8
  return _Timer.Timer;
9
9
  }
10
10
  });
11
- const _Timer = require("./Timer");
11
+ const _Timer = require("./Timer.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Timer/index.ts"],"sourcesContent":["export type { TimerProps } from './Timer';\nexport { Timer } from './Timer';\n"],"names":["Timer"],"mappings":";;;;;;;eACSA,YAAK;;;uBAAQ,UAAU"}
1
+ {"version":3,"sources":["../src/components/Timer/index.ts"],"sourcesContent":["export type { TimerProps } from './Timer';\nexport { Timer } from './Timer';\n"],"names":["Timer"],"mappings":";;;;;;;eACSA,YAAK;;;uBAAQ,aAAU"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useTimerStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles } from \"@griffel/react\";\nexport const useBaseAnimationStyles = makeResetStyles({\n animationName: {\n from: {\n opacity: 0\n },\n to: {\n opacity: 0\n }\n }\n});\n"],"names":["__resetStyles","useBaseAnimationStyles"],"mappings":"AAAA,YAAY;;;;;;;;;;;uBACoB,gBAAgB;AACzC,MAAMC,sBAAsB,GAAA,WAAA,OAAGD,oBAAA,EAAA,YAAA,WAAA;IAAA;IAAA;IAAA;CASrC,CAAC"}
@@ -11,10 +11,10 @@ Object.defineProperty(exports, "Toast", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _useToast = require("./useToast");
15
- const _renderToast = require("./renderToast");
16
- const _useToastStylesstyles = require("./useToastStyles.styles");
17
- const _useToastContextValues = require("./useToastContextValues");
14
+ const _useToast = require("./useToast.cjs");
15
+ const _renderToast = require("./renderToast.cjs");
16
+ const _useToastStylesstyles = require("./useToastStyles.styles.cjs");
17
+ const _useToastContextValues = require("./useToastContextValues.cjs");
18
18
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
19
19
  const Toast = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
20
20
  const state = (0, _useToast.useToast_unstable)(props, ref);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Toast/Toast.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useToast_unstable } from './useToast';\nimport { renderToast_unstable } from './renderToast';\nimport { useToastStyles_unstable } from './useToastStyles.styles';\nimport type { ToastProps } from './Toast.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useToastContextValues_unstable } from './useToastContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Toast component\n */\nexport const Toast: ForwardRefComponent<ToastProps> = React.forwardRef((props, ref) => {\n const state = useToast_unstable(props, ref);\n\n useToastStyles_unstable(state);\n useCustomStyleHook_unstable('useToastStyles_unstable')(state);\n\n return renderToast_unstable(state, useToastContextValues_unstable(state));\n});\n\nToast.displayName = 'Toast';\n"],"names":["React","useToast_unstable","renderToast_unstable","useToastStyles_unstable","useToastContextValues_unstable","useCustomStyleHook_unstable","Toast","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;0BACG,aAAa;6BACV,gBAAgB;sCACb,0BAA0B;uCAGnB,0BAA0B;qCAC7B,kCAAkC;AAKvE,MAAMM,QAAAA,WAAAA,GAAyCN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IAC7E,MAAMC,YAAQT,2BAAAA,EAAkBO,OAAOC;QAEvCN,6CAAAA,EAAwBO;QACxBL,gDAAAA,EAA4B,2BAA2BK;IAEvD,WAAOR,iCAAAA,EAAqBQ,WAAON,qDAAAA,EAA+BM;AACpE,GAAG;AAEHJ,MAAMK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/Toast/Toast.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useToast_unstable } from './useToast';\nimport { renderToast_unstable } from './renderToast';\nimport { useToastStyles_unstable } from './useToastStyles.styles';\nimport type { ToastProps } from './Toast.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useToastContextValues_unstable } from './useToastContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Toast component\n */\nexport const Toast: ForwardRefComponent<ToastProps> = React.forwardRef((props, ref) => {\n const state = useToast_unstable(props, ref);\n\n useToastStyles_unstable(state);\n useCustomStyleHook_unstable('useToastStyles_unstable')(state);\n\n return renderToast_unstable(state, useToastContextValues_unstable(state));\n});\n\nToast.displayName = 'Toast';\n"],"names":["React","useToast_unstable","renderToast_unstable","useToastStyles_unstable","useToastContextValues_unstable","useCustomStyleHook_unstable","Toast","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;0BACG,gBAAa;6BACV,mBAAgB;sCACb,6BAA0B;uCAGnB,6BAA0B;qCAC7B,kCAAkC;AAKvE,MAAMM,QAAAA,WAAAA,GAAyCN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IAC7E,MAAMC,YAAQT,2BAAAA,EAAkBO,OAAOC;QAEvCN,6CAAAA,EAAwBO;QACxBL,gDAAAA,EAA4B,2BAA2BK;IAEvD,WAAOR,iCAAAA,EAAqBQ,WAAON,qDAAAA,EAA+BM;AACpE,GAAG;AAEHJ,MAAMK,WAAW,GAAG"}
@@ -28,7 +28,7 @@ _export(exports, {
28
28
  return _useToast.useToast_unstable;
29
29
  }
30
30
  });
31
- const _Toast = require("./Toast");
32
- const _renderToast = require("./renderToast");
33
- const _useToast = require("./useToast");
34
- const _useToastStylesstyles = require("./useToastStyles.styles");
31
+ const _Toast = require("./Toast.cjs");
32
+ const _renderToast = require("./renderToast.cjs");
33
+ const _useToast = require("./useToast.cjs");
34
+ const _useToastStylesstyles = require("./useToastStyles.styles.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Toast/index.ts"],"sourcesContent":["export { Toast } from './Toast';\nexport type {\n ToastBaseProps,\n ToastBaseState,\n ToastContextValues,\n ToastProps,\n ToastSlots,\n ToastState,\n} from './Toast.types';\nexport { renderToast_unstable } from './renderToast';\nexport { useToastBase_unstable, useToast_unstable } from './useToast';\nexport { toastClassNames, useToastStyles_unstable } from './useToastStyles.styles';\n"],"names":["Toast","renderToast_unstable","useToastBase_unstable","useToast_unstable","toastClassNames","useToastStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,YAAK;;;eASLC,iCAAoB;;;eAEpBG,qCAAe;;;eADfF,+BAAqB;;;eACJG,6CAAuB;;;eADjBF,2BAAiB;;;uBAV3B,UAAU;6BASK,gBAAgB;0BACI,aAAa;sCACb,0BAA0B"}
1
+ {"version":3,"sources":["../src/components/Toast/index.ts"],"sourcesContent":["export { Toast } from './Toast';\nexport type {\n ToastBaseProps,\n ToastBaseState,\n ToastContextValues,\n ToastProps,\n ToastSlots,\n ToastState,\n} from './Toast.types';\nexport { renderToast_unstable } from './renderToast';\nexport { useToastBase_unstable, useToast_unstable } from './useToast';\nexport { toastClassNames, useToastStyles_unstable } from './useToastStyles.styles';\n"],"names":["Toast","renderToast_unstable","useToastBase_unstable","useToast_unstable","toastClassNames","useToastStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,YAAK;;;eASLC,iCAAoB;;;eAEpBG,qCAAe;;;eADfF,+BAAqB;;;eACJG,6CAAuB;;;eADjBF,2BAAiB;;;uBAV3B,aAAU;6BASK,mBAAgB;0BACI,gBAAa;sCACb,6BAA0B"}
@@ -18,7 +18,7 @@ _export(exports, {
18
18
  }
19
19
  });
20
20
  const _reactutilities = require("@fluentui/react-utilities");
21
- const _toastContainerContext = require("../../contexts/toastContainerContext");
21
+ const _toastContainerContext = require("../../contexts/toastContainerContext.cjs");
22
22
  const useToastBase_unstable = (props, ref)=>{
23
23
  const { intent } = (0, _toastContainerContext.useToastContainerContext)();
24
24
  return {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Toast/useToast.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { ToastBaseProps, ToastBaseState, ToastProps, ToastState } from './Toast.types';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\n\n/**\n * Create the base state required to render Toast, without design-only props.\n *\n * @param props - props from this instance of Toast (without appearance)\n * @param ref - reference to root HTMLElement of Toast\n */\nexport const useToastBase_unstable = (props: ToastBaseProps, ref: React.Ref<HTMLElement>): ToastBaseState => {\n const { intent } = useToastContainerContext();\n\n return {\n components: {\n root: '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 ...props,\n }),\n { elementType: 'div' },\n ),\n intent,\n };\n};\n\n/**\n * Create the state required to render Toast.\n *\n * The returned state can be modified with hooks such as useToastStyles_unstable,\n * before being passed to renderToast_unstable.\n *\n * @param props - props from this instance of Toast\n * @param ref - reference to root HTMLElement of Toast\n */\nexport const useToast_unstable = (props: ToastProps, ref: React.Ref<HTMLElement>): ToastState => {\n const state = useToastBase_unstable(props, ref);\n return {\n ...state,\n backgroundAppearance: props.appearance,\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useToastContainerContext","useToastBase_unstable","props","ref","intent","components","root","always","elementType","useToast_unstable","state","backgroundAppearance","appearance"],"mappings":"AAAA;;;;;;;;;;;;IAaaG,qBAAAA;;;qBA8BAQ;;;;gCAxCkC,4BAA4B;uCAElC,uCAAuC;AAQzE,8BAA8B,CAACP,OAAuBC;IAC3D,MAAM,EAAEC,MAAM,EAAE,GAAGJ,mDAAAA;IAEnB,OAAO;QACLK,YAAY;YACVC,MAAM;QACR;QACAA,MAAMP,oBAAAA,CAAKQ,MAAM,KACfT,wCAAAA,EAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FK,KAAKA;YACL,GAAGD,KAAK;QACV,IACA;YAAEM,aAAa;QAAM;QAEvBJ;IACF;AACF,EAAE;AAWK,MAAMK,oBAAoB,CAACP,OAAmBC;IACnD,MAAMO,QAAQT,sBAAsBC,OAAOC;IAC3C,OAAO;QACL,GAAGO,KAAK;QACRC,sBAAsBT,MAAMU,UAAU;IACxC;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/Toast/useToast.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { ToastBaseProps, ToastBaseState, ToastProps, ToastState } from './Toast.types';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\n\n/**\n * Create the base state required to render Toast, without design-only props.\n *\n * @param props - props from this instance of Toast (without appearance)\n * @param ref - reference to root HTMLElement of Toast\n */\nexport const useToastBase_unstable = (props: ToastBaseProps, ref: React.Ref<HTMLElement>): ToastBaseState => {\n const { intent } = useToastContainerContext();\n\n return {\n components: {\n root: '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 ...props,\n }),\n { elementType: 'div' },\n ),\n intent,\n };\n};\n\n/**\n * Create the state required to render Toast.\n *\n * The returned state can be modified with hooks such as useToastStyles_unstable,\n * before being passed to renderToast_unstable.\n *\n * @param props - props from this instance of Toast\n * @param ref - reference to root HTMLElement of Toast\n */\nexport const useToast_unstable = (props: ToastProps, ref: React.Ref<HTMLElement>): ToastState => {\n const state = useToastBase_unstable(props, ref);\n return {\n ...state,\n backgroundAppearance: props.appearance,\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useToastContainerContext","useToastBase_unstable","props","ref","intent","components","root","always","elementType","useToast_unstable","state","backgroundAppearance","appearance"],"mappings":"AAAA;;;;;;;;;;;;IAaaG,qBAAAA;;;qBA8BAQ;;;;gCAxCkC,4BAA4B;uCAElC,0CAAuC;AAQzE,8BAA8B,CAACP,OAAuBC;IAC3D,MAAM,EAAEC,MAAM,EAAE,GAAGJ,mDAAAA;IAEnB,OAAO;QACLK,YAAY;YACVC,MAAM;QACR;QACAA,MAAMP,oBAAAA,CAAKQ,MAAM,KACfT,wCAAAA,EAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FK,KAAKA;YACL,GAAGD,KAAK;QACV,IACA;YAAEM,aAAa;QAAM;QAEvBJ;IACF;AACF,EAAE;AAWK,MAAMK,oBAAoB,CAACP,OAAmBC;IACnD,MAAMO,QAAQT,sBAAsBC,OAAOC;IAC3C,OAAO;QACL,GAAGO,KAAK;QACRC,sBAAsBT,MAAMU,UAAU;IACxC;AACF,EAAE"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useToastStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from \"@griffel/react\";\nimport { tokens } from \"@fluentui/react-theme\";\nexport const toastClassNames = {\n root: 'fui-Toast'\n};\nconst useRootBaseClassName = makeResetStyles({\n display: 'grid',\n gridTemplateColumns: 'auto 1fr auto',\n padding: '12px',\n borderRadius: tokens.borderRadiusMedium,\n border: `1px solid ${tokens.colorTransparentStroke}`,\n boxShadow: tokens.shadow8,\n fontSize: tokens.fontSizeBase300,\n lineHeight: '20px',\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.colorNeutralForeground1,\n backgroundColor: tokens.colorNeutralBackground1\n});\nconst useStyles = makeStyles({\n inverted: {\n color: tokens.colorNeutralForegroundInverted2,\n backgroundColor: tokens.colorNeutralBackgroundInverted\n }\n});\n/**\n * Apply styling to the Toast slots based on the state\n */ export const useToastStyles_unstable = (state)=>{\n const rootBaseClassName = useRootBaseClassName();\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(toastClassNames.root, rootBaseClassName, state.backgroundAppearance === 'inverted' && styles.inverted, state.root.className);\n return state;\n};\n"],"names":["__resetStyles","__styles","mergeClasses","tokens","toastClassNames","root","useRootBaseClassName","useStyles","inverted","sj55zd","De3pzq","d","useToastStyles_unstable","state","rootBaseClassName","styles","className","backgroundAppearance"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAGCI,eAAe;;;IAwBXQ,uBAAuB;;;;uBA1BkB,gBAAgB;AAEnE,wBAAwB;IAC3BP,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,oBAAoB,GAAA,WAAA,OAAGN,oBAAA,EAAA,WAAA,MAAA;IAAA;CAY5B,CAAC;AACF,MAAMO,SAAS,GAAA,WAAA,OAAGN,eAAA,EAAA;IAAAO,QAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;KAAA;AAAA,CAKjB,CAAC;AAGS,iCAAiCE,KAAK,IAAG;IAChD,MAAMC,iBAAiB,GAAGR,oBAAoB,CAAC,CAAC;IAChD,MAAMS,MAAM,GAAGR,SAAS,CAAC,CAAC;IAC1B,oDAAA;IACAM,KAAK,CAACR,IAAI,CAACW,SAAS,OAAGd,mBAAY,EAACE,eAAe,CAACC,IAAI,EAAES,iBAAiB,EAAED,KAAK,CAACI,oBAAoB,KAAK,UAAU,IAAIF,MAAM,CAACP,QAAQ,EAAEK,KAAK,CAACR,IAAI,CAACW,SAAS,CAAC;IAChK,OAAOH,KAAK;AAChB,CAAC"}
@@ -11,9 +11,9 @@ Object.defineProperty(exports, "ToastBody", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _useToastBody = require("./useToastBody");
15
- const _renderToastBody = require("./renderToastBody");
16
- const _useToastBodyStylesstyles = require("./useToastBodyStyles.styles");
14
+ const _useToastBody = require("./useToastBody.cjs");
15
+ const _renderToastBody = require("./renderToastBody.cjs");
16
+ const _useToastBodyStylesstyles = require("./useToastBodyStyles.styles.cjs");
17
17
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
18
18
  const ToastBody = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
19
19
  const state = (0, _useToastBody.useToastBody_unstable)(props, ref);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ToastBody/ToastBody.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useToastBody_unstable } from './useToastBody';\nimport { renderToastBody_unstable } from './renderToastBody';\nimport { useToastBodyStyles_unstable } from './useToastBodyStyles.styles';\nimport type { ToastBodyProps } from './ToastBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ToastBody component\n */\nexport const ToastBody: ForwardRefComponent<ToastBodyProps> = React.forwardRef((props, ref) => {\n const state = useToastBody_unstable(props, ref);\n\n useToastBodyStyles_unstable(state);\n useCustomStyleHook_unstable('useToastBodyStyles_unstable')(state);\n\n return renderToastBody_unstable(state);\n});\n\nToastBody.displayName = 'ToastBody';\n"],"names":["React","useToastBody_unstable","renderToastBody_unstable","useToastBodyStyles_unstable","useCustomStyleHook_unstable","ToastBody","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;8BACO,iBAAiB;iCACd,oBAAoB;0CACjB,8BAA8B;qCAG9B,kCAAkC;AAKvE,MAAMK,YAAAA,WAAAA,GAAiDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,YAAQR,mCAAAA,EAAsBM,OAAOC;QAE3CL,qDAAAA,EAA4BM;QAC5BL,gDAAAA,EAA4B,+BAA+BK;IAE3D,WAAOP,yCAAAA,EAAyBO;AAClC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/ToastBody/ToastBody.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useToastBody_unstable } from './useToastBody';\nimport { renderToastBody_unstable } from './renderToastBody';\nimport { useToastBodyStyles_unstable } from './useToastBodyStyles.styles';\nimport type { ToastBodyProps } from './ToastBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ToastBody component\n */\nexport const ToastBody: ForwardRefComponent<ToastBodyProps> = React.forwardRef((props, ref) => {\n const state = useToastBody_unstable(props, ref);\n\n useToastBodyStyles_unstable(state);\n useCustomStyleHook_unstable('useToastBodyStyles_unstable')(state);\n\n return renderToastBody_unstable(state);\n});\n\nToastBody.displayName = 'ToastBody';\n"],"names":["React","useToastBody_unstable","renderToastBody_unstable","useToastBodyStyles_unstable","useCustomStyleHook_unstable","ToastBody","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;8BACO,oBAAiB;iCACd,uBAAoB;0CACjB,iCAA8B;qCAG9B,kCAAkC;AAKvE,MAAMK,YAAAA,WAAAA,GAAiDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,YAAQR,mCAAAA,EAAsBM,OAAOC;QAE3CL,qDAAAA,EAA4BM;QAC5BL,gDAAAA,EAA4B,+BAA+BK;IAE3D,WAAOP,yCAAAA,EAAyBO;AAClC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
@@ -28,7 +28,7 @@ _export(exports, {
28
28
  return _useToastBody.useToastBody_unstable;
29
29
  }
30
30
  });
31
- const _ToastBody = require("./ToastBody");
32
- const _renderToastBody = require("./renderToastBody");
33
- const _useToastBody = require("./useToastBody");
34
- const _useToastBodyStylesstyles = require("./useToastBodyStyles.styles");
31
+ const _ToastBody = require("./ToastBody.cjs");
32
+ const _renderToastBody = require("./renderToastBody.cjs");
33
+ const _useToastBody = require("./useToastBody.cjs");
34
+ const _useToastBodyStylesstyles = require("./useToastBodyStyles.styles.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ToastBody/index.ts"],"sourcesContent":["export { ToastBody } from './ToastBody';\nexport type {\n ToastBodyBaseProps,\n ToastBodyBaseState,\n ToastBodyProps,\n ToastBodySlots,\n ToastBodyState,\n} from './ToastBody.types';\nexport { renderToastBody_unstable } from './renderToastBody';\nexport { useToastBodyBase_unstable, useToastBody_unstable } from './useToastBody';\nexport { toastBodyClassNames, useToastBodyStyles_unstable } from './useToastBodyStyles.styles';\n"],"names":["ToastBody","renderToastBody_unstable","useToastBodyBase_unstable","useToastBody_unstable","toastBodyClassNames","useToastBodyStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,oBAAS;;;eAQTC,yCAAwB;;;eAExBG,6CAAmB;;;eADnBF,uCAAyB;;;eACJG,qDAA2B;;;eADrBF,mCAAqB;;;2BAT/B,cAAc;iCAQC,oBAAoB;8BACI,iBAAiB;0CACjB,8BAA8B"}
1
+ {"version":3,"sources":["../src/components/ToastBody/index.ts"],"sourcesContent":["export { ToastBody } from './ToastBody';\nexport type {\n ToastBodyBaseProps,\n ToastBodyBaseState,\n ToastBodyProps,\n ToastBodySlots,\n ToastBodyState,\n} from './ToastBody.types';\nexport { renderToastBody_unstable } from './renderToastBody';\nexport { useToastBodyBase_unstable, useToastBody_unstable } from './useToastBody';\nexport { toastBodyClassNames, useToastBodyStyles_unstable } from './useToastBodyStyles.styles';\n"],"names":["ToastBody","renderToastBody_unstable","useToastBodyBase_unstable","useToastBody_unstable","toastBodyClassNames","useToastBodyStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,oBAAS;;;eAQTC,yCAAwB;;;eAExBG,6CAAmB;;;eADnBF,uCAAyB;;;eACJG,qDAA2B;;;eADrBF,mCAAqB;;;2BAT/B,iBAAc;iCAQC,uBAAoB;8BACI,oBAAiB;0CACjB,iCAA8B"}
@@ -18,7 +18,7 @@ _export(exports, {
18
18
  }
19
19
  });
20
20
  const _reactutilities = require("@fluentui/react-utilities");
21
- const _toastContainerContext = require("../../contexts/toastContainerContext");
21
+ const _toastContainerContext = require("../../contexts/toastContainerContext.cjs");
22
22
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
23
23
  const useToastBodyBase_unstable = (props, ref)=>{
24
24
  const { bodyId } = (0, _toastContainerContext.useToastContainerContext)();
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ToastBody/useToastBody.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { ToastBodyBaseProps, ToastBodyBaseState, ToastBodyProps, ToastBodyState } from './ToastBody.types';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\nimport { useBackgroundAppearance } from '@fluentui/react-shared-contexts';\n\n/**\n * Create the base state required to render ToastBody, without design-only props.\n *\n * @param props - props from this instance of ToastBody\n * @param ref - reference to root HTMLElement of ToastBody\n */\nexport const useToastBodyBase_unstable = (\n props: ToastBodyBaseProps,\n ref: React.Ref<HTMLElement>,\n): ToastBodyBaseState => {\n const { bodyId } = useToastContainerContext();\n return {\n components: {\n root: 'div',\n subtitle: 'div',\n },\n subtitle: slot.optional(props.subtitle, { elementType: 'div' }),\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 id: bodyId,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n};\n\n/**\n * Create the state required to render ToastBody.\n *\n * The returned state can be modified with hooks such as useToastBodyStyles_unstable,\n * before being passed to renderToastBody_unstable.\n *\n * @param props - props from this instance of ToastBody\n * @param ref - reference to root HTMLElement of ToastBody\n */\nexport const useToastBody_unstable = (props: ToastBodyProps, ref: React.Ref<HTMLElement>): ToastBodyState => {\n const backgroundAppearance = useBackgroundAppearance();\n return {\n ...useToastBodyBase_unstable(props, ref),\n backgroundAppearance,\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useToastContainerContext","useBackgroundAppearance","useToastBodyBase_unstable","props","ref","bodyId","components","root","subtitle","optional","elementType","always","id","useToastBody_unstable","backgroundAppearance"],"mappings":"AAAA;;;;;;;;;;;;IAcaI,yBAAAA;;;yBAkCAW;;;;gCA7CkC,4BAA4B;uCAElC,uCAAuC;qCACxC,kCAAkC;AAQnE,kCAAkC,CACvCV,OACAC;IAEA,MAAM,EAAEC,MAAM,EAAE,OAAGL,+CAAAA;IACnB,OAAO;QACLM,YAAY;YACVC,MAAM;YACNC,UAAU;QACZ;QACAA,UAAUT,oBAAAA,CAAKU,QAAQ,CAACN,MAAMK,QAAQ,EAAE;YAAEE,aAAa;QAAM;QAC7DH,MAAMR,oBAAAA,CAAKY,MAAM,KACfb,wCAAAA,EAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FM,KAAKA;YACLQ,IAAIP;YACJ,GAAGF,KAAK;QACV,IACA;YAAEO,aAAa;QAAM;IAEzB;AACF,EAAE;AAWK,MAAMG,wBAAwB,CAACV,OAAuBC;IAC3D,MAAMU,2BAAuBb,4CAAAA;IAC7B,OAAO;QACL,GAAGC,0BAA0BC,OAAOC,IAAI;QACxCU;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/ToastBody/useToastBody.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { ToastBodyBaseProps, ToastBodyBaseState, ToastBodyProps, ToastBodyState } from './ToastBody.types';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\nimport { useBackgroundAppearance } from '@fluentui/react-shared-contexts';\n\n/**\n * Create the base state required to render ToastBody, without design-only props.\n *\n * @param props - props from this instance of ToastBody\n * @param ref - reference to root HTMLElement of ToastBody\n */\nexport const useToastBodyBase_unstable = (\n props: ToastBodyBaseProps,\n ref: React.Ref<HTMLElement>,\n): ToastBodyBaseState => {\n const { bodyId } = useToastContainerContext();\n return {\n components: {\n root: 'div',\n subtitle: 'div',\n },\n subtitle: slot.optional(props.subtitle, { elementType: 'div' }),\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 id: bodyId,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n};\n\n/**\n * Create the state required to render ToastBody.\n *\n * The returned state can be modified with hooks such as useToastBodyStyles_unstable,\n * before being passed to renderToastBody_unstable.\n *\n * @param props - props from this instance of ToastBody\n * @param ref - reference to root HTMLElement of ToastBody\n */\nexport const useToastBody_unstable = (props: ToastBodyProps, ref: React.Ref<HTMLElement>): ToastBodyState => {\n const backgroundAppearance = useBackgroundAppearance();\n return {\n ...useToastBodyBase_unstable(props, ref),\n backgroundAppearance,\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useToastContainerContext","useBackgroundAppearance","useToastBodyBase_unstable","props","ref","bodyId","components","root","subtitle","optional","elementType","always","id","useToastBody_unstable","backgroundAppearance"],"mappings":"AAAA;;;;;;;;;;;;IAcaI,yBAAAA;;;yBAkCAW;;;;gCA7CkC,4BAA4B;uCAElC,0CAAuC;qCACxC,kCAAkC;AAQnE,kCAAkC,CACvCV,OACAC;IAEA,MAAM,EAAEC,MAAM,EAAE,OAAGL,+CAAAA;IACnB,OAAO;QACLM,YAAY;YACVC,MAAM;YACNC,UAAU;QACZ;QACAA,UAAUT,oBAAAA,CAAKU,QAAQ,CAACN,MAAMK,QAAQ,EAAE;YAAEE,aAAa;QAAM;QAC7DH,MAAMR,oBAAAA,CAAKY,MAAM,KACfb,wCAAAA,EAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FM,KAAKA;YACLQ,IAAIP;YACJ,GAAGF,KAAK;QACV,IACA;YAAEO,aAAa;QAAM;IAEzB;AACF,EAAE;AAWK,MAAMG,wBAAwB,CAACV,OAAuBC;IAC3D,MAAMU,2BAAuBb,4CAAAA;IAC7B,OAAO;QACL,GAAGC,0BAA0BC,OAAOC,IAAI;QACxCU;IACF;AACF,EAAE"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useToastBodyStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, makeStyles, mergeClasses } from \"@griffel/react\";\nimport { tokens } from \"@fluentui/react-theme\";\nexport const toastBodyClassNames = {\n root: 'fui-ToastBody',\n subtitle: 'fui-ToastBody__subtitle'\n};\nconst useRootBaseClassName = makeResetStyles({\n gridColumnStart: 2,\n gridColumnEnd: 3,\n paddingTop: '6px',\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n fontWeight: tokens.fontWeightRegular,\n color: tokens.colorNeutralForeground1,\n wordBreak: 'break-word'\n});\nconst useSubtitleBaseClassName = makeResetStyles({\n paddingTop: '4px',\n gridColumnStart: 2,\n gridColumnEnd: 3,\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n color: tokens.colorNeutralForeground2\n});\nconst useInvertedStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForegroundInverted2\n },\n subtitle: {\n color: tokens.colorNeutralForegroundInverted2\n }\n});\n/**\n * Apply styling to the ToastBody slots based on the state\n */ export const useToastBodyStyles_unstable = (state)=>{\n const rootBaseClassName = useRootBaseClassName();\n const subtitleBaseClassName = useSubtitleBaseClassName();\n const invertedStyles = useInvertedStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(toastBodyClassNames.root, rootBaseClassName, state.backgroundAppearance === 'inverted' && invertedStyles.root, state.root.className);\n if (state.subtitle) {\n // eslint-disable-next-line react-hooks/immutability\n state.subtitle.className = mergeClasses(toastBodyClassNames.subtitle, subtitleBaseClassName, state.backgroundAppearance === 'inverted' && invertedStyles.subtitle, state.subtitle.className);\n }\n return state;\n};\n"],"names":["__resetStyles","__styles","mergeClasses","tokens","toastBodyClassNames","root","subtitle","useRootBaseClassName","useSubtitleBaseClassName","useInvertedStyles","sj55zd","d","useToastBodyStyles_unstable","state","rootBaseClassName","subtitleBaseClassName","invertedStyles","className","backgroundAppearance"],"mappings":"AAAA,YAAY;;;;;;;;;;;;IAGCI,mBAAmB;;;+BAiCY;eAA3BQ;;;uBAnCyC,gBAAgB;AAEnE,4BAA4B;IAC/BP,IAAI,EAAE,eAAe;IACrBC,QAAQ,EAAE;AACd,CAAC;AACD,MAAMC,oBAAoB,GAAA,WAAA,GAAGP,wBAAA,EAAA,YAAA,MAAA;IAAA;CAS5B,CAAC;AACF,MAAMQ,wBAAwB,GAAA,WAAA,OAAGR,oBAAA,EAAA,WAAA,MAAA;IAAA;CAQhC,CAAC;AACF,MAAMS,iBAAiB,GAAA,WAAA,OAAGR,eAAA,EAAA;IAAAI,IAAA,EAAA;QAAAK,MAAA,EAAA;IAAA;IAAAJ,QAAA,EAAA;QAAAI,MAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;KAAA;AAAA,CAOzB,CAAC;AAGS,qCAAqCE,KAAK,IAAG;IACpD,MAAMC,iBAAiB,GAAGP,oBAAoB,CAAC,CAAC;IAChD,MAAMQ,qBAAqB,GAAGP,wBAAwB,CAAC,CAAC;IACxD,MAAMQ,cAAc,GAAGP,iBAAiB,CAAC,CAAC;IAC1C,oDAAA;IACAI,KAAK,CAACR,IAAI,CAACY,SAAS,OAAGf,mBAAY,EAACE,mBAAmB,CAACC,IAAI,EAAES,iBAAiB,EAAED,KAAK,CAACK,oBAAoB,KAAK,UAAU,IAAIF,cAAc,CAACX,IAAI,EAAEQ,KAAK,CAACR,IAAI,CAACY,SAAS,CAAC;IACxK,IAAIJ,KAAK,CAACP,QAAQ,EAAE;QAChB,oDAAA;QACAO,KAAK,CAACP,QAAQ,CAACW,SAAS,OAAGf,mBAAY,EAACE,mBAAmB,CAACE,QAAQ,EAAES,qBAAqB,EAAEF,KAAK,CAACK,oBAAoB,KAAK,UAAU,IAAIF,cAAc,CAACV,QAAQ,EAAEO,KAAK,CAACP,QAAQ,CAACW,SAAS,CAAC;IAChM;IACA,OAAOJ,KAAK;AAChB,CAAC"}
@@ -11,10 +11,10 @@ Object.defineProperty(exports, "ToastContainer", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _useToastContainer = require("./useToastContainer");
15
- const _renderToastContainer = require("./renderToastContainer");
16
- const _useToastContainerStylesstyles = require("./useToastContainerStyles.styles");
17
- const _useToastContainerContextValues = require("./useToastContainerContextValues");
14
+ const _useToastContainer = require("./useToastContainer.cjs");
15
+ const _renderToastContainer = require("./renderToastContainer.cjs");
16
+ const _useToastContainerStylesstyles = require("./useToastContainerStyles.styles.cjs");
17
+ const _useToastContainerContextValues = require("./useToastContainerContextValues.cjs");
18
18
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
19
19
  const ToastContainer = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
20
20
  const state = (0, _useToastContainer.useToastContainer_unstable)(props, ref);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ToastContainer/ToastContainer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useToastContainer_unstable } from './useToastContainer';\nimport { renderToastContainer_unstable } from './renderToastContainer';\nimport { useToastContainerStyles_unstable } from './useToastContainerStyles.styles';\nimport type { ToastContainerProps } from './ToastContainer.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useToastContainerContextValues_unstable } from './useToastContainerContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ToastContainer component\n */\nexport const ToastContainer: ForwardRefComponent<ToastContainerProps> = React.forwardRef((props, ref) => {\n const state = useToastContainer_unstable(props, ref);\n\n useToastContainerStyles_unstable(state);\n useCustomStyleHook_unstable('useToastContainerStyles_unstable')(state);\n\n return renderToastContainer_unstable(state, useToastContainerContextValues_unstable(state));\n});\n\nToastContainer.displayName = 'ToastContainer';\n"],"names":["React","useToastContainer_unstable","renderToastContainer_unstable","useToastContainerStyles_unstable","useToastContainerContextValues_unstable","useCustomStyleHook_unstable","ToastContainer","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;mCACY,sBAAsB;sCACnB,yBAAyB;+CACtB,mCAAmC;gDAG5B,mCAAmC;qCAC/C,kCAAkC;AAKvE,MAAMM,iBAAAA,WAAAA,GAA2DN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,YAAQT,6CAAAA,EAA2BO,OAAOC;QAEhDN,+DAAAA,EAAiCO;QACjCL,gDAAAA,EAA4B,oCAAoCK;IAEhE,WAAOR,mDAAAA,EAA8BQ,WAAON,uEAAAA,EAAwCM;AACtF,GAAG;AAEHJ,eAAeK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/ToastContainer/ToastContainer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useToastContainer_unstable } from './useToastContainer';\nimport { renderToastContainer_unstable } from './renderToastContainer';\nimport { useToastContainerStyles_unstable } from './useToastContainerStyles.styles';\nimport type { ToastContainerProps } from './ToastContainer.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useToastContainerContextValues_unstable } from './useToastContainerContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ToastContainer component\n */\nexport const ToastContainer: ForwardRefComponent<ToastContainerProps> = React.forwardRef((props, ref) => {\n const state = useToastContainer_unstable(props, ref);\n\n useToastContainerStyles_unstable(state);\n useCustomStyleHook_unstable('useToastContainerStyles_unstable')(state);\n\n return renderToastContainer_unstable(state, useToastContainerContextValues_unstable(state));\n});\n\nToastContainer.displayName = 'ToastContainer';\n"],"names":["React","useToastContainer_unstable","renderToastContainer_unstable","useToastContainerStyles_unstable","useToastContainerContextValues_unstable","useCustomStyleHook_unstable","ToastContainer","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;mCACY,yBAAsB;sCACnB,4BAAyB;+CACtB,sCAAmC;gDAG5B,sCAAmC;qCAC/C,kCAAkC;AAKvE,MAAMM,iBAAAA,WAAAA,GAA2DN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,YAAQT,6CAAAA,EAA2BO,OAAOC;QAEhDN,+DAAAA,EAAiCO;QACjCL,gDAAAA,EAA4B,oCAAoCK;IAEhE,WAAOR,mDAAAA,EAA8BQ,WAAON,uEAAAA,EAAwCM;AACtF,GAAG;AAEHJ,eAAeK,WAAW,GAAG"}
@@ -28,8 +28,8 @@ _export(exports, {
28
28
  return _useToastContainer.useToastContainer_unstable;
29
29
  }
30
30
  });
31
- const _ToastContainer = require("./ToastContainer");
32
- const _renderToastContainer = require("./renderToastContainer");
33
- const _useToastContainer = require("./useToastContainer");
34
- const _useToastContainerStylesstyles = require("./useToastContainerStyles.styles");
35
- const _useToastContainerContextValues = require("./useToastContainerContextValues");
31
+ const _ToastContainer = require("./ToastContainer.cjs");
32
+ const _renderToastContainer = require("./renderToastContainer.cjs");
33
+ const _useToastContainer = require("./useToastContainer.cjs");
34
+ const _useToastContainerStylesstyles = require("./useToastContainerStyles.styles.cjs");
35
+ const _useToastContainerContextValues = require("./useToastContainerContextValues.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ToastContainer/index.ts"],"sourcesContent":["export { ToastContainer } from './ToastContainer';\nexport type {\n ToastContainerContextValues,\n ToastContainerProps,\n ToastContainerSlots,\n ToastContainerState,\n} from './ToastContainer.types';\nexport { renderToastContainer_unstable } from './renderToastContainer';\nexport { useToastContainer_unstable } from './useToastContainer';\nexport { toastContainerClassNames, useToastContainerStyles_unstable } from './useToastContainerStyles.styles';\nexport { useToastContainerContextValues_unstable } from './useToastContainerContextValues';\n"],"names":["ToastContainer","renderToastContainer_unstable","useToastContainer_unstable","toastContainerClassNames","useToastContainerStyles_unstable","useToastContainerContextValues_unstable"],"mappings":";;;;;;;;;;;;eAASA,8BAAc;;;eAOdC,mDAA6B;;;eAE7BE,uDAAwB;;;eACxBE,uEAAuC;;;eADbD,+DAAgC;;;eAD1DF,6CAA0B;;;gCARJ,mBAAmB;sCAOJ,yBAAyB;mCAC5B,sBAAsB;+CACU,mCAAmC;gDACtD,mCAAmC"}
1
+ {"version":3,"sources":["../src/components/ToastContainer/index.ts"],"sourcesContent":["export { ToastContainer } from './ToastContainer';\nexport type {\n ToastContainerContextValues,\n ToastContainerProps,\n ToastContainerSlots,\n ToastContainerState,\n} from './ToastContainer.types';\nexport { renderToastContainer_unstable } from './renderToastContainer';\nexport { useToastContainer_unstable } from './useToastContainer';\nexport { toastContainerClassNames, useToastContainerStyles_unstable } from './useToastContainerStyles.styles';\nexport { useToastContainerContextValues_unstable } from './useToastContainerContextValues';\n"],"names":["ToastContainer","renderToastContainer_unstable","useToastContainer_unstable","toastContainerClassNames","useToastContainerStyles_unstable","useToastContainerContextValues_unstable"],"mappings":";;;;;;;;;;;;eAASA,8BAAc;;;eAOdC,mDAA6B;;;eAE7BE,uDAAwB;;;eACxBE,uEAAuC;;;eADbD,+DAAgC;;;eAD1DF,6CAA0B;;;gCARJ,sBAAmB;sCAOJ,4BAAyB;mCAC5B,yBAAsB;+CACU,sCAAmC;gDACtD,sCAAmC"}
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "renderToastContainer_unstable", {
11
11
  });
12
12
  const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
13
13
  const _reactutilities = require("@fluentui/react-utilities");
14
- const _toastContainerContext = require("../../contexts/toastContainerContext");
14
+ const _toastContainerContext = require("../../contexts/toastContainerContext.cjs");
15
15
  const _reactmotioncomponentspreview = require("@fluentui/react-motion-components-preview");
16
16
  const renderToastContainer_unstable = (state, contextValues)=>{
17
17
  const { onMotionFinish, visible, updateId } = state;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ToastContainer/renderToastContainer.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\n'use client';\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { ToastContainerState, ToastContainerSlots, ToastContainerContextValues } from './ToastContainer.types';\nimport { ToastContainerContextProvider } from '../../contexts/toastContainerContext';\nimport { CollapseDelayed } from '@fluentui/react-motion-components-preview';\n\n/**\n * Render the final JSX of ToastContainer\n */\nexport const renderToastContainer_unstable = (\n state: ToastContainerState,\n contextValues: ToastContainerContextValues,\n): JSXElement => {\n const { onMotionFinish, visible, updateId } = state;\n assertSlots<ToastContainerSlots>(state);\n\n return (\n <ToastContainerContextProvider value={contextValues.toast}>\n <CollapseDelayed appear onMotionFinish={onMotionFinish} visible={visible} unmountOnExit>\n <state.root>\n {state.root.children}\n <state.timer key={updateId} />\n </state.root>\n </CollapseDelayed>\n </ToastContainerContextProvider>\n );\n};\n"],"names":["assertSlots","ToastContainerContextProvider","CollapseDelayed","renderToastContainer_unstable","state","contextValues","onMotionFinish","visible","updateId","value","toast","appear","unmountOnExit","root","children","timer"],"mappings":"AAAA,wBAA0B,GAC1B,iDAAiD,GAEjD;;;;;+BAWaG;;;;;;;gCATe,4BAA4B;uCAGV,uCAAuC;8CACrD,4CAA4C;AAKrE,sCAAsC,CAC3CC,OACAC;IAEA,MAAM,EAAEC,cAAc,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGJ;QAC9CJ,2BAAAA,EAAiCI;IAEjC,OAAA,WAAA,OACE,eAAA,EAACH,oDAAAA,EAAAA;QAA8BQ,OAAOJ,cAAcK,KAAK;kBACvD,WAAA,OAAA,eAAA,EAACR,6CAAAA,EAAAA;YAAgBS,MAAM,EAAA;YAACL,gBAAgBA;YAAgBC,SAASA;YAASK,aAAa,EAAA;sBACrF,WAAA,OAAA,gBAAA,EAACR,MAAMS,IAAI,EAAA;;oBACRT,MAAMS,IAAI,CAACC,QAAQ;sCACpB,eAAA,EAACV,MAAMW,KAAK,EAAA,CAAA,GAAMP;;;;;AAK5B,EAAE"}
1
+ {"version":3,"sources":["../src/components/ToastContainer/renderToastContainer.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\n'use client';\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { ToastContainerState, ToastContainerSlots, ToastContainerContextValues } from './ToastContainer.types';\nimport { ToastContainerContextProvider } from '../../contexts/toastContainerContext';\nimport { CollapseDelayed } from '@fluentui/react-motion-components-preview';\n\n/**\n * Render the final JSX of ToastContainer\n */\nexport const renderToastContainer_unstable = (\n state: ToastContainerState,\n contextValues: ToastContainerContextValues,\n): JSXElement => {\n const { onMotionFinish, visible, updateId } = state;\n assertSlots<ToastContainerSlots>(state);\n\n return (\n <ToastContainerContextProvider value={contextValues.toast}>\n <CollapseDelayed appear onMotionFinish={onMotionFinish} visible={visible} unmountOnExit>\n <state.root>\n {state.root.children}\n <state.timer key={updateId} />\n </state.root>\n </CollapseDelayed>\n </ToastContainerContextProvider>\n );\n};\n"],"names":["assertSlots","ToastContainerContextProvider","CollapseDelayed","renderToastContainer_unstable","state","contextValues","onMotionFinish","visible","updateId","value","toast","appear","unmountOnExit","root","children","timer"],"mappings":"AAAA,wBAA0B,GAC1B,iDAAiD,GAEjD;;;;;+BAWaG;;;;;;;gCATe,4BAA4B;uCAGV,0CAAuC;8CACrD,4CAA4C;AAKrE,sCAAsC,CAC3CC,OACAC;IAEA,MAAM,EAAEC,cAAc,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGJ;QAC9CJ,2BAAAA,EAAiCI;IAEjC,OAAA,WAAA,OACE,eAAA,EAACH,oDAAAA,EAAAA;QAA8BQ,OAAOJ,cAAcK,KAAK;kBACvD,WAAA,OAAA,eAAA,EAACR,6CAAAA,EAAAA;YAAgBS,MAAM,EAAA;YAACL,gBAAgBA;YAAgBC,SAASA;YAASK,aAAa,EAAA;sBACrF,WAAA,OAAA,gBAAA,EAACR,MAAMS,IAAI,EAAA;;oBACRT,MAAMS,IAAI,CAACC,QAAQ;sCACpB,eAAA,EAACV,MAAMW,KAAK,EAAA,CAAA,GAAMP;;;;;AAK5B,EAAE"}
@@ -15,7 +15,7 @@ const _reactutilities = require("@fluentui/react-utilities");
15
15
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
16
16
  const _keyboardkeys = require("@fluentui/keyboard-keys");
17
17
  const _reacttabster = require("@fluentui/react-tabster");
18
- const _Timer = require("../Timer/Timer");
18
+ const _Timer = require("../Timer/Timer.cjs");
19
19
  const intentPolitenessMap = {
20
20
  success: 'assertive',
21
21
  warning: 'assertive',
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ToastContainer/useToastContainer.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ExtractSlotProps, Slot } from '@fluentui/react-utilities';\nimport { getIntrinsicElementProps, useMergedRefs, useEventCallback, useId, slot } from '@fluentui/react-utilities';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { Delete, Tab } from '@fluentui/keyboard-keys';\nimport { useFocusableGroup, useFocusFinders } from '@fluentui/react-tabster';\nimport type { ToastStatus } from '../../state';\nimport type { ToastContainerProps, ToastContainerState } from './ToastContainer.types';\nimport type { TimerProps } from '../Timer/Timer';\nimport { Timer } from '../Timer/Timer';\n\nconst intentPolitenessMap = {\n success: 'assertive',\n warning: 'assertive',\n error: 'assertive',\n info: 'polite',\n} as const;\n\n/**\n * Create the state required to render ToastContainer.\n *\n * The returned state can be modified with hooks such as useToastContainerStyles_unstable,\n * before being passed to renderToastContainer_unstable.\n *\n * @param props - props from this instance of ToastContainer\n * @param ref - reference to root HTMLElement of ToastContainer\n */\nexport const useToastContainer_unstable = (\n props: ToastContainerProps,\n ref: React.Ref<HTMLElement>,\n): ToastContainerState => {\n const {\n visible,\n children,\n close: closeProp,\n remove,\n updateId,\n announce,\n data,\n timeout: timerTimeout,\n politeness: desiredPoliteness,\n intent = 'info',\n pauseOnHover,\n pauseOnWindowBlur,\n imperativeRef,\n tryRestoreFocus,\n content: _content, // `content` is a slot and it's type clashes with the HTMLElement `content` attribute\n ...rest\n } = props;\n const titleId = useId('toast-title');\n const bodyId = useId('toast-body');\n const toastRef = React.useRef<HTMLDivElement | null>(null);\n const { targetDocument } = useFluent_unstable();\n const [running, setRunning] = React.useState(false);\n const imperativePauseRef = React.useRef(false);\n const focusedToastBeforeClose = React.useRef(false);\n const focusableGroupAttribute = useFocusableGroup({\n tabBehavior: 'limited-trap-focus',\n // Users should only use Tab to focus into the toast\n // Escape is already reserved to dismiss all toasts\n ignoreDefaultKeydown: { Tab: true, Escape: true, Enter: true },\n });\n\n const close = useEventCallback(() => {\n const activeElement = targetDocument?.activeElement;\n if (activeElement && toastRef.current?.contains(activeElement)) {\n focusedToastBeforeClose.current = true;\n }\n\n closeProp();\n });\n const onStatusChange = useEventCallback((status: ToastStatus) => props.onStatusChange?.(null, { status, ...props }));\n const pause = useEventCallback(() => setRunning(false));\n const play = useEventCallback(() => {\n if (imperativePauseRef.current) {\n return;\n }\n const containsActive = !!toastRef.current?.contains(targetDocument?.activeElement ?? null);\n if (timerTimeout < 0) {\n setRunning(true);\n return;\n }\n\n if (!containsActive) {\n setRunning(true);\n }\n });\n\n React.useImperativeHandle(imperativeRef, () => ({\n focus: () => {\n if (!toastRef.current) {\n return;\n }\n\n toastRef.current.focus();\n },\n\n play: () => {\n imperativePauseRef.current = false;\n play();\n },\n pause: () => {\n imperativePauseRef.current = true;\n pause();\n },\n }));\n\n React.useEffect(() => {\n return () => onStatusChange('unmounted');\n }, [onStatusChange]);\n\n React.useEffect(() => {\n if (!targetDocument) {\n return;\n }\n\n if (pauseOnWindowBlur) {\n targetDocument.defaultView?.addEventListener('focus', play);\n targetDocument.defaultView?.addEventListener('blur', pause);\n return () => {\n targetDocument.defaultView?.removeEventListener('focus', play);\n targetDocument.defaultView?.removeEventListener('blur', pause);\n };\n }\n }, [targetDocument, pause, play, pauseOnWindowBlur]);\n\n // Users never actually use ToastContainer as a JSX but imperatively through useToastContainerController\n const userRootSlot = (data as { root?: ExtractSlotProps<Slot<'div'>> }).root;\n const onMotionFinish = React.useCallback(\n (_: null, { direction }: { direction: 'exit' | 'enter' }) => {\n if (direction === 'exit') {\n remove();\n }\n\n if (direction === 'enter') {\n // start toast once it's fully animated in\n play();\n onStatusChange('visible');\n }\n },\n [onStatusChange, play, remove],\n );\n\n const onMouseEnter = useEventCallback((e: React.MouseEvent<HTMLDivElement>) => {\n pause();\n userRootSlot?.onMouseEnter?.(e);\n });\n\n const onMouseLeave = useEventCallback((e: React.MouseEvent<HTMLDivElement>) => {\n play();\n userRootSlot?.onMouseEnter?.(e);\n });\n\n const { findFirstFocusable, findLastFocusable } = useFocusFinders();\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLDivElement>) => {\n if (e.key === Delete) {\n e.preventDefault();\n close();\n }\n\n if (e.key === Tab && e.currentTarget === e.target) {\n e.preventDefault();\n if (e.shiftKey) {\n findLastFocusable(e.currentTarget)?.focus();\n } else {\n findFirstFocusable(e.currentTarget)?.focus();\n }\n }\n\n userRootSlot?.onKeyDown?.(e);\n });\n\n React.useEffect(() => {\n if (!visible) {\n return;\n }\n\n const politeness = desiredPoliteness ?? intentPolitenessMap[intent];\n announce(toastRef.current?.textContent ?? '', { politeness });\n }, [announce, desiredPoliteness, toastRef, visible, updateId, intent]);\n\n React.useEffect(() => {\n return () => {\n if (focusedToastBeforeClose.current) {\n focusedToastBeforeClose.current = false;\n tryRestoreFocus();\n }\n };\n }, [tryRestoreFocus]);\n\n return {\n components: {\n timer: Timer,\n root: 'div',\n },\n timer: slot.always<TimerProps>({ onTimeout: close, running, timeout: timerTimeout ?? -1 }, { elementType: Timer }),\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: useMergedRefs(ref, toastRef) as React.Ref<HTMLDivElement>,\n children,\n tabIndex: 0,\n role: 'listitem',\n 'aria-labelledby': titleId,\n 'aria-describedby': bodyId,\n ...rest,\n ...userRootSlot,\n ...focusableGroupAttribute,\n onMouseEnter,\n onMouseLeave,\n onKeyDown,\n }),\n { elementType: 'div' },\n ),\n timerTimeout,\n transitionTimeout: 0,\n running,\n visible,\n remove,\n close,\n onTransitionEntering: () => {\n /* no-op */\n },\n updateId,\n nodeRef: toastRef,\n intent,\n titleId,\n bodyId,\n onMotionFinish,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useMergedRefs","useEventCallback","useId","slot","useFluent_unstable","Delete","Tab","useFocusableGroup","useFocusFinders","Timer","intentPolitenessMap","success","warning","error","info","useToastContainer_unstable","props","ref","visible","children","close","closeProp","remove","updateId","announce","data","timeout","timerTimeout","politeness","desiredPoliteness","intent","pauseOnHover","pauseOnWindowBlur","imperativeRef","tryRestoreFocus","content","_content","rest","titleId","bodyId","toastRef","useRef","targetDocument","running","setRunning","useState","imperativePauseRef","focusedToastBeforeClose","focusableGroupAttribute","tabBehavior","ignoreDefaultKeydown","Escape","Enter","activeElement","current","contains","onStatusChange","status","pause","play","containsActive","useImperativeHandle","focus","useEffect","defaultView","addEventListener","removeEventListener","userRootSlot","root","onMotionFinish","useCallback","_","direction","onMouseEnter","e","onMouseLeave","findFirstFocusable","findLastFocusable","onKeyDown","key","preventDefault","currentTarget","target","shiftKey","textContent","components","timer","always","onTimeout","elementType","tabIndex","role","transitionTimeout","onTransitionEntering","nodeRef"],"mappings":"AAAA;;;;;+BA6BaiB;;;;;;;iEA3BU,QAAQ;gCAEwD,4BAA4B;qCAChF,kCAAkC;8BACzC,0BAA0B;8BACH,0BAA0B;uBAIvD,iBAAiB;AAEvC,MAAML,sBAAsB;IAC1BC,SAAS;IACTC,SAAS;IACTC,OAAO;IACPC,MAAM;AACR;AAWO,mCAAmC,CACxCE,OACAC;IAEA,MAAM,EACJC,OAAO,EACPC,QAAQ,EACRC,OAAOC,SAAS,EAChBC,MAAM,EACNC,QAAQ,EACRC,QAAQ,EACRC,IAAI,EACJC,SAASC,YAAY,EACrBC,YAAYC,iBAAiB,EAC7BC,SAAS,MAAM,EACfC,YAAY,EACZC,iBAAiB,EACjBC,aAAa,EACbC,eAAe,EACfC,SAASC,QAAQ,EACjB,GAAGC,MACJ,GAAGrB;IACJ,MAAMsB,cAAUpC,qBAAAA,EAAM;IACtB,MAAMqC,aAASrC,qBAAAA,EAAM;IACrB,MAAMsC,WAAW1C,OAAM2C,MAAM,CAAwB;IACrD,MAAM,EAAEC,cAAc,EAAE,GAAGtC,2CAAAA;IAC3B,MAAM,CAACuC,SAASC,WAAW,GAAG9C,OAAM+C,QAAQ,CAAC;IAC7C,MAAMC,qBAAqBhD,OAAM2C,MAAM,CAAC;IACxC,MAAMM,0BAA0BjD,OAAM2C,MAAM,CAAC;IAC7C,MAAMO,8BAA0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AG8B,YAAY;YACf,GAAGnB,uBAAuB;YAC1ByB;YACAE;YACAG;QACF,IACA;YAAEW,aAAa;QAAM;QAEvB9D;QACAiE,mBAAmB;QACnBjD;QACAzB;QACAI;QACAF;QACAyE,sBAAsB;QACpB,SAAS,GACX;QACAtE;QACAuE,SAAStD;QACTV;QACAQ;QACAC;QACA8B;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/ToastContainer/useToastContainer.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { ExtractSlotProps, Slot } from '@fluentui/react-utilities';\nimport { getIntrinsicElementProps, useMergedRefs, useEventCallback, useId, slot } from '@fluentui/react-utilities';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { Delete, Tab } from '@fluentui/keyboard-keys';\nimport { useFocusableGroup, useFocusFinders } from '@fluentui/react-tabster';\nimport type { ToastStatus } from '../../state';\nimport type { ToastContainerProps, ToastContainerState } from './ToastContainer.types';\nimport type { TimerProps } from '../Timer/Timer';\nimport { Timer } from '../Timer/Timer';\n\nconst intentPolitenessMap = {\n success: 'assertive',\n warning: 'assertive',\n error: 'assertive',\n info: 'polite',\n} as const;\n\n/**\n * Create the state required to render ToastContainer.\n *\n * The returned state can be modified with hooks such as useToastContainerStyles_unstable,\n * before being passed to renderToastContainer_unstable.\n *\n * @param props - props from this instance of ToastContainer\n * @param ref - reference to root HTMLElement of ToastContainer\n */\nexport const useToastContainer_unstable = (\n props: ToastContainerProps,\n ref: React.Ref<HTMLElement>,\n): ToastContainerState => {\n const {\n visible,\n children,\n close: closeProp,\n remove,\n updateId,\n announce,\n data,\n timeout: timerTimeout,\n politeness: desiredPoliteness,\n intent = 'info',\n pauseOnHover,\n pauseOnWindowBlur,\n imperativeRef,\n tryRestoreFocus,\n content: _content, // `content` is a slot and it's type clashes with the HTMLElement `content` attribute\n ...rest\n } = props;\n const titleId = useId('toast-title');\n const bodyId = useId('toast-body');\n const toastRef = React.useRef<HTMLDivElement | null>(null);\n const { targetDocument } = useFluent_unstable();\n const [running, setRunning] = React.useState(false);\n const imperativePauseRef = React.useRef(false);\n const focusedToastBeforeClose = React.useRef(false);\n const focusableGroupAttribute = useFocusableGroup({\n tabBehavior: 'limited-trap-focus',\n // Users should only use Tab to focus into the toast\n // Escape is already reserved to dismiss all toasts\n ignoreDefaultKeydown: { Tab: true, Escape: true, Enter: true },\n });\n\n const close = useEventCallback(() => {\n const activeElement = targetDocument?.activeElement;\n if (activeElement && toastRef.current?.contains(activeElement)) {\n focusedToastBeforeClose.current = true;\n }\n\n closeProp();\n });\n const onStatusChange = useEventCallback((status: ToastStatus) => props.onStatusChange?.(null, { status, ...props }));\n const pause = useEventCallback(() => setRunning(false));\n const play = useEventCallback(() => {\n if (imperativePauseRef.current) {\n return;\n }\n const containsActive = !!toastRef.current?.contains(targetDocument?.activeElement ?? null);\n if (timerTimeout < 0) {\n setRunning(true);\n return;\n }\n\n if (!containsActive) {\n setRunning(true);\n }\n });\n\n React.useImperativeHandle(imperativeRef, () => ({\n focus: () => {\n if (!toastRef.current) {\n return;\n }\n\n toastRef.current.focus();\n },\n\n play: () => {\n imperativePauseRef.current = false;\n play();\n },\n pause: () => {\n imperativePauseRef.current = true;\n pause();\n },\n }));\n\n React.useEffect(() => {\n return () => onStatusChange('unmounted');\n }, [onStatusChange]);\n\n React.useEffect(() => {\n if (!targetDocument) {\n return;\n }\n\n if (pauseOnWindowBlur) {\n targetDocument.defaultView?.addEventListener('focus', play);\n targetDocument.defaultView?.addEventListener('blur', pause);\n return () => {\n targetDocument.defaultView?.removeEventListener('focus', play);\n targetDocument.defaultView?.removeEventListener('blur', pause);\n };\n }\n }, [targetDocument, pause, play, pauseOnWindowBlur]);\n\n // Users never actually use ToastContainer as a JSX but imperatively through useToastContainerController\n const userRootSlot = (data as { root?: ExtractSlotProps<Slot<'div'>> }).root;\n const onMotionFinish = React.useCallback(\n (_: null, { direction }: { direction: 'exit' | 'enter' }) => {\n if (direction === 'exit') {\n remove();\n }\n\n if (direction === 'enter') {\n // start toast once it's fully animated in\n play();\n onStatusChange('visible');\n }\n },\n [onStatusChange, play, remove],\n );\n\n const onMouseEnter = useEventCallback((e: React.MouseEvent<HTMLDivElement>) => {\n pause();\n userRootSlot?.onMouseEnter?.(e);\n });\n\n const onMouseLeave = useEventCallback((e: React.MouseEvent<HTMLDivElement>) => {\n play();\n userRootSlot?.onMouseEnter?.(e);\n });\n\n const { findFirstFocusable, findLastFocusable } = useFocusFinders();\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLDivElement>) => {\n if (e.key === Delete) {\n e.preventDefault();\n close();\n }\n\n if (e.key === Tab && e.currentTarget === e.target) {\n e.preventDefault();\n if (e.shiftKey) {\n findLastFocusable(e.currentTarget)?.focus();\n } else {\n findFirstFocusable(e.currentTarget)?.focus();\n }\n }\n\n userRootSlot?.onKeyDown?.(e);\n });\n\n React.useEffect(() => {\n if (!visible) {\n return;\n }\n\n const politeness = desiredPoliteness ?? intentPolitenessMap[intent];\n announce(toastRef.current?.textContent ?? '', { politeness });\n }, [announce, desiredPoliteness, toastRef, visible, updateId, intent]);\n\n React.useEffect(() => {\n return () => {\n if (focusedToastBeforeClose.current) {\n focusedToastBeforeClose.current = false;\n tryRestoreFocus();\n }\n };\n }, [tryRestoreFocus]);\n\n return {\n components: {\n timer: Timer,\n root: 'div',\n },\n timer: slot.always<TimerProps>({ onTimeout: close, running, timeout: timerTimeout ?? -1 }, { elementType: Timer }),\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: useMergedRefs(ref, toastRef) as React.Ref<HTMLDivElement>,\n children,\n tabIndex: 0,\n role: 'listitem',\n 'aria-labelledby': titleId,\n 'aria-describedby': bodyId,\n ...rest,\n ...userRootSlot,\n ...focusableGroupAttribute,\n onMouseEnter,\n onMouseLeave,\n onKeyDown,\n }),\n { elementType: 'div' },\n ),\n timerTimeout,\n transitionTimeout: 0,\n running,\n visible,\n remove,\n close,\n onTransitionEntering: () => {\n /* no-op */\n },\n updateId,\n nodeRef: toastRef,\n intent,\n titleId,\n bodyId,\n onMotionFinish,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useMergedRefs","useEventCallback","useId","slot","useFluent_unstable","Delete","Tab","useFocusableGroup","useFocusFinders","Timer","intentPolitenessMap","success","warning","error","info","useToastContainer_unstable","props","ref","visible","children","close","closeProp","remove","updateId","announce","data","timeout","timerTimeout","politeness","desiredPoliteness","intent","pauseOnHover","pauseOnWindowBlur","imperativeRef","tryRestoreFocus","content","_content","rest","titleId","bodyId","toastRef","useRef","targetDocument","running","setRunning","useState","imperativePauseRef","focusedToastBeforeClose","focusableGroupAttribute","tabBehavior","ignoreDefaultKeydown","Escape","Enter","activeElement","current","contains","onStatusChange","status","pause","play","containsActive","useImperativeHandle","focus","useEffect","defaultView","addEventListener","removeEventListener","userRootSlot","root","onMotionFinish","useCallback","_","direction","onMouseEnter","e","onMouseLeave","findFirstFocusable","findLastFocusable","onKeyDown","key","preventDefault","currentTarget","target","shiftKey","textContent","components","timer","always","onTimeout","elementType","tabIndex","role","transitionTimeout","onTransitionEntering","nodeRef"],"mappings":"AAAA;;;;;+BA6BaiB;;;;;;;iEA3BU,QAAQ;gCAEwD,4BAA4B;qCAChF,kCAAkC;8BACzC,0BAA0B;8BACH,0BAA0B;uBAIvD,oBAAiB;AAEvC,MAAML,sBAAsB;IAC1BC,SAAS;IACTC,SAAS;IACTC,OAAO;IACPC,MAAM;AACR;AAWO,mCAAmC,CACxCE,OACAC;IAEA,MAAM,EACJC,OAAO,EACPC,QAAQ,EACRC,OAAOC,SAAS,EAChBC,MAAM,EACNC,QAAQ,EACRC,QAAQ,EACRC,IAAI,EACJC,SAASC,YAAY,EACrBC,YAAYC,iBAAiB,EAC7BC,SAAS,MAAM,EACfC,YAAY,EACZC,iBAAiB,EACjBC,aAAa,EACbC,eAAe,EACfC,SAAS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a;YAAEC,WAAWpE;YAAOuB;YAASjB,SAASC,iBAAAA,QAAAA,iBAAAA,KAAAA,IAAAA,eAAgB,CAAC;QAAE,GAAG;YAAE8D,aAAahF,YAAAA;QAAM;QAChH2D,MAAMjE,oBAAAA,CAAKoF,MAAM,KACfxF,wCAAAA,EAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FkB,SAAKjB,6BAAAA,EAAciB,KAAKuB;YACxBrB;YACAuE,UAAU;YACVC,MAAM;YACN,mBAAmBrD;YACnB,oBAAoBC;YACpB,GAAGF,IAAI;YACP,GAAG8B,YAAY;YACf,GAAGnB,uBAAuB;YAC1ByB;YACAE;YACAG;QACF,IACA;YAAEW,aAAa;QAAM;QAEvB9D;QACAiE,mBAAmB;QACnBjD;QACAzB;QACAI;QACAF;QACAyE,sBAAsB;QACpB,SAAS,GACX;QACAtE;QACAuE,SAAStD;QACTV;QACAQ;QACAC;QACA8B;IACF;AACF,EAAE"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useToastContainerStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, mergeClasses } from \"@griffel/react\";\nimport { tokens } from \"@fluentui/react-theme\";\nimport { createCustomFocusIndicatorStyle } from \"@fluentui/react-tabster\";\nexport const toastContainerClassNames = {\n root: 'fui-ToastContainer',\n timer: 'fui-ToastContainer__timer'\n};\nconst useRootBaseClassName = makeResetStyles({\n boxSizing: 'border-box',\n marginTop: '16px',\n pointerEvents: 'all',\n borderRadius: tokens.borderRadiusMedium,\n ...createCustomFocusIndicatorStyle({\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`\n })\n});\n/**\n * Apply styling to the ToastContainer slots based on the state\n */ export const useToastContainerStyles_unstable = (state)=>{\n const rootBaseClassName = useRootBaseClassName();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(toastContainerClassNames.root, rootBaseClassName, state.root.className);\n return state;\n};\n"],"names":["__resetStyles","mergeClasses","tokens","createCustomFocusIndicatorStyle","toastContainerClassNames","root","timer","useRootBaseClassName","useToastContainerStyles_unstable","state","rootBaseClassName","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;4BAIyB;;;oCAeY;;;;uBAlBH,gBAAgB;AAGvD,MAAMI,2BAA2B;IACpCC,IAAI,EAAE,oBAAoB;IAC1BC,KAAK,EAAE;AACX,CAAC;AACD,MAAMC,oBAAoB,GAAA,WAAA,OAAGP,oBAAA,EAAA,WAAA,MAAA;IAAA;IAAA;CAQ5B,CAAC;AAGS,MAAMQ,oCAAoCC,KAAK,IAAG;IACzD,MAAMC,iBAAiB,GAAGH,oBAAoB,CAAC,CAAC;IAChD,oDAAA;IACAE,KAAK,CAACJ,IAAI,CAACM,SAAS,OAAGV,mBAAY,EAACG,wBAAwB,CAACC,IAAI,EAAEK,iBAAiB,EAAED,KAAK,CAACJ,IAAI,CAACM,SAAS,CAAC;IAC3G,OAAOF,KAAK;AAChB,CAAC"}
@@ -11,9 +11,9 @@ Object.defineProperty(exports, "ToastFooter", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _useToastFooter = require("./useToastFooter");
15
- const _renderToastFooter = require("./renderToastFooter");
16
- const _useToastFooterStylesstyles = require("./useToastFooterStyles.styles");
14
+ const _useToastFooter = require("./useToastFooter.cjs");
15
+ const _renderToastFooter = require("./renderToastFooter.cjs");
16
+ const _useToastFooterStylesstyles = require("./useToastFooterStyles.styles.cjs");
17
17
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
18
18
  const ToastFooter = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
19
19
  const state = (0, _useToastFooter.useToastFooter_unstable)(props, ref);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ToastFooter/ToastFooter.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useToastFooter_unstable } from './useToastFooter';\nimport { renderToastFooter_unstable } from './renderToastFooter';\nimport { useToastFooterStyles_unstable } from './useToastFooterStyles.styles';\nimport type { ToastFooterProps } from './ToastFooter.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ToastFooter component\n */\nexport const ToastFooter: ForwardRefComponent<ToastFooterProps> = React.forwardRef((props, ref) => {\n const state = useToastFooter_unstable(props, ref);\n\n useToastFooterStyles_unstable(state);\n useCustomStyleHook_unstable('useToastFooterStyles_unstable')(state);\n\n return renderToastFooter_unstable(state);\n});\n\nToastFooter.displayName = 'ToastFooter';\n"],"names":["React","useToastFooter_unstable","renderToastFooter_unstable","useToastFooterStyles_unstable","useCustomStyleHook_unstable","ToastFooter","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;gCACS,mBAAmB;mCAChB,sBAAsB;4CACnB,gCAAgC;qCAGlC,kCAAkC;AAKvE,MAAMK,cAAAA,WAAAA,GAAqDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,YAAQR,uCAAAA,EAAwBM,OAAOC;QAE7CL,yDAAAA,EAA8BM;QAC9BL,gDAAAA,EAA4B,iCAAiCK;IAE7D,WAAOP,6CAAAA,EAA2BO;AACpC,GAAG;AAEHJ,YAAYK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/ToastFooter/ToastFooter.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useToastFooter_unstable } from './useToastFooter';\nimport { renderToastFooter_unstable } from './renderToastFooter';\nimport { useToastFooterStyles_unstable } from './useToastFooterStyles.styles';\nimport type { ToastFooterProps } from './ToastFooter.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ToastFooter component\n */\nexport const ToastFooter: ForwardRefComponent<ToastFooterProps> = React.forwardRef((props, ref) => {\n const state = useToastFooter_unstable(props, ref);\n\n useToastFooterStyles_unstable(state);\n useCustomStyleHook_unstable('useToastFooterStyles_unstable')(state);\n\n return renderToastFooter_unstable(state);\n});\n\nToastFooter.displayName = 'ToastFooter';\n"],"names":["React","useToastFooter_unstable","renderToastFooter_unstable","useToastFooterStyles_unstable","useCustomStyleHook_unstable","ToastFooter","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;gCACS,sBAAmB;mCAChB,yBAAsB;4CACnB,mCAAgC;qCAGlC,kCAAkC;AAKvE,MAAMK,cAAAA,WAAAA,GAAqDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACzF,MAAMC,YAAQR,uCAAAA,EAAwBM,OAAOC;QAE7CL,yDAAAA,EAA8BM;QAC9BL,gDAAAA,EAA4B,iCAAiCK;IAE7D,WAAOP,6CAAAA,EAA2BO;AACpC,GAAG;AAEHJ,YAAYK,WAAW,GAAG"}
@@ -25,7 +25,7 @@ _export(exports, {
25
25
  return _useToastFooter.useToastFooter_unstable;
26
26
  }
27
27
  });
28
- const _ToastFooter = require("./ToastFooter");
29
- const _renderToastFooter = require("./renderToastFooter");
30
- const _useToastFooter = require("./useToastFooter");
31
- const _useToastFooterStylesstyles = require("./useToastFooterStyles.styles");
28
+ const _ToastFooter = require("./ToastFooter.cjs");
29
+ const _renderToastFooter = require("./renderToastFooter.cjs");
30
+ const _useToastFooter = require("./useToastFooter.cjs");
31
+ const _useToastFooterStylesstyles = require("./useToastFooterStyles.styles.cjs");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ToastFooter/index.ts"],"sourcesContent":["export { ToastFooter } from './ToastFooter';\nexport type { ToastFooterProps, ToastFooterSlots, ToastFooterState } from './ToastFooter.types';\nexport { renderToastFooter_unstable } from './renderToastFooter';\nexport { useToastFooter_unstable } from './useToastFooter';\nexport { toastFooterClassNames, useToastFooterStyles_unstable } from './useToastFooterStyles.styles';\n"],"names":["ToastFooter","renderToastFooter_unstable","useToastFooter_unstable","toastFooterClassNames","useToastFooterStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,wBAAW;;;eAEXC,6CAA0B;;;eAE1BE,iDAAqB;;;eAAEC,yDAA6B;;;eADpDF,uCAAuB;;;6BAHJ,gBAAgB;mCAED,sBAAsB;gCACzB,mBAAmB;4CACU,gCAAgC"}
1
+ {"version":3,"sources":["../src/components/ToastFooter/index.ts"],"sourcesContent":["export { ToastFooter } from './ToastFooter';\nexport type { ToastFooterProps, ToastFooterSlots, ToastFooterState } from './ToastFooter.types';\nexport { renderToastFooter_unstable } from './renderToastFooter';\nexport { useToastFooter_unstable } from './useToastFooter';\nexport { toastFooterClassNames, useToastFooterStyles_unstable } from './useToastFooterStyles.styles';\n"],"names":["ToastFooter","renderToastFooter_unstable","useToastFooter_unstable","toastFooterClassNames","useToastFooterStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,wBAAW;;;eAEXC,6CAA0B;;;eAE1BE,iDAAqB;;;eAAEC,yDAA6B;;;eADpDF,uCAAuB;;;6BAHJ,mBAAgB;mCAED,yBAAsB;gCACzB,sBAAmB;4CACU,mCAAgC"}
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useToastFooterStyles.styles.js"],"sourcesContent":["'use client';\nimport { makeResetStyles, mergeClasses } from \"@griffel/react\";\nexport const toastFooterClassNames = {\n root: 'fui-ToastFooter'\n};\n/**\n * Styles for the root slot\n */ const useRootBaseClassName = makeResetStyles({\n paddingTop: '16px',\n gridColumnStart: 2,\n gridColumnEnd: 3,\n display: 'flex',\n alignItems: 'center',\n gap: '14px'\n});\n/**\n * Apply styling to the ToastFooter slots based on the state\n */ export const useToastFooterStyles_unstable = (state)=>{\n const rootBaseClassName = useRootBaseClassName();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(toastFooterClassNames.root, rootBaseClassName, state.root.className);\n return state;\n};\n"],"names":["__resetStyles","mergeClasses","toastFooterClassNames","root","useRootBaseClassName","useToastFooterStyles_unstable","state","rootBaseClassName","className"],"mappings":"AAAA,YAAY;;;;;;;;;;;;yBAEsB;;;iCAeY;;;;uBAhBA,gBAAgB;AACvD,MAAME,wBAAwB;IACjCC,IAAI,EAAE;AACV,CAAC;AACD;;CAEA,GAAI,MAAMC,oBAAoB,GAAA,WAAA,OAAGJ,oBAAA,EAAA,WAAA,MAAA;IAAA;CAOhC,CAAC;AAGS,MAAMK,iCAAiCC,KAAK,IAAG;IACtD,MAAMC,iBAAiB,GAAGH,oBAAoB,CAAC,CAAC;IAChD,oDAAA;IACAE,KAAK,CAACH,IAAI,CAACK,SAAS,OAAGP,mBAAY,EAACC,qBAAqB,CAACC,IAAI,EAAEI,iBAAiB,EAAED,KAAK,CAACH,IAAI,CAACK,SAAS,CAAC;IACxG,OAAOF,KAAK;AAChB,CAAC"}
@@ -11,9 +11,9 @@ Object.defineProperty(exports, "ToastTitle", {
11
11
  });
12
12
  const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
13
13
  const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
14
- const _useToastTitle = require("./useToastTitle");
15
- const _renderToastTitle = require("./renderToastTitle");
16
- const _useToastTitleStylesstyles = require("./useToastTitleStyles.styles");
14
+ const _useToastTitle = require("./useToastTitle.cjs");
15
+ const _renderToastTitle = require("./renderToastTitle.cjs");
16
+ const _useToastTitleStylesstyles = require("./useToastTitleStyles.styles.cjs");
17
17
  const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
18
18
  const ToastTitle = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
19
19
  const state = (0, _useToastTitle.useToastTitle_unstable)(props, ref);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ToastTitle/ToastTitle.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useToastTitle_unstable } from './useToastTitle';\nimport { renderToastTitle_unstable } from './renderToastTitle';\nimport { useToastTitleStyles_unstable } from './useToastTitleStyles.styles';\nimport type { ToastTitleProps } from './ToastTitle.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ToastTitle component\n */\nexport const ToastTitle: ForwardRefComponent<ToastTitleProps> = React.forwardRef((props, ref) => {\n const state = useToastTitle_unstable(props, ref);\n\n useToastTitleStyles_unstable(state);\n useCustomStyleHook_unstable('useToastTitleStyles_unstable')(state);\n\n return renderToastTitle_unstable(state);\n});\n\nToastTitle.displayName = 'ToastTitle';\n"],"names":["React","useToastTitle_unstable","renderToastTitle_unstable","useToastTitleStyles_unstable","useCustomStyleHook_unstable","ToastTitle","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;+BACQ,kBAAkB;kCACf,qBAAqB;2CAClB,+BAA+B;qCAGhC,kCAAkC;AAKvE,MAAMK,aAAAA,WAAAA,GAAmDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,YAAQR,qCAAAA,EAAuBM,OAAOC;QAE5CL,uDAAAA,EAA6BM;QAC7BL,gDAAAA,EAA4B,gCAAgCK;IAE5D,WAAOP,2CAAAA,EAA0BO;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}
1
+ {"version":3,"sources":["../src/components/ToastTitle/ToastTitle.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useToastTitle_unstable } from './useToastTitle';\nimport { renderToastTitle_unstable } from './renderToastTitle';\nimport { useToastTitleStyles_unstable } from './useToastTitleStyles.styles';\nimport type { ToastTitleProps } from './ToastTitle.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ToastTitle component\n */\nexport const ToastTitle: ForwardRefComponent<ToastTitleProps> = React.forwardRef((props, ref) => {\n const state = useToastTitle_unstable(props, ref);\n\n useToastTitleStyles_unstable(state);\n useCustomStyleHook_unstable('useToastTitleStyles_unstable')(state);\n\n return renderToastTitle_unstable(state);\n});\n\nToastTitle.displayName = 'ToastTitle';\n"],"names":["React","useToastTitle_unstable","renderToastTitle_unstable","useToastTitleStyles_unstable","useCustomStyleHook_unstable","ToastTitle","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;;;;;;;;;;;;iEAEuB,QAAQ;+BACQ,qBAAkB;kCACf,wBAAqB;2CAClB,kCAA+B;qCAGhC,kCAAkC;AAKvE,MAAMK,aAAAA,WAAAA,GAAmDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACvF,MAAMC,YAAQR,qCAAAA,EAAuBM,OAAOC;QAE5CL,uDAAAA,EAA6BM;QAC7BL,gDAAAA,EAA4B,gCAAgCK;IAE5D,WAAOP,2CAAAA,EAA0BO;AACnC,GAAG;AAEHJ,WAAWK,WAAW,GAAG"}