@fluentui/react-toast 9.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (310) hide show
  1. package/CHANGELOG.json +56 -0
  2. package/CHANGELOG.md +19 -0
  3. package/LICENSE +15 -0
  4. package/README.md +5 -0
  5. package/dist/index.d.ts +485 -0
  6. package/lib/AriaLive.js +1 -0
  7. package/lib/AriaLive.js.map +1 -0
  8. package/lib/Toast.js +1 -0
  9. package/lib/Toast.js.map +1 -0
  10. package/lib/ToastBody.js +1 -0
  11. package/lib/ToastBody.js.map +1 -0
  12. package/lib/ToastContainer.js +1 -0
  13. package/lib/ToastContainer.js.map +1 -0
  14. package/lib/ToastFooter.js +1 -0
  15. package/lib/ToastFooter.js.map +1 -0
  16. package/lib/ToastTitle.js +1 -0
  17. package/lib/ToastTitle.js.map +1 -0
  18. package/lib/ToastTrigger.js +1 -0
  19. package/lib/ToastTrigger.js.map +1 -0
  20. package/lib/Toaster.js +1 -0
  21. package/lib/Toaster.js.map +1 -0
  22. package/lib/components/AriaLive/AriaLive.js +12 -0
  23. package/lib/components/AriaLive/AriaLive.js.map +1 -0
  24. package/lib/components/AriaLive/AriaLive.types.js +1 -0
  25. package/lib/components/AriaLive/AriaLive.types.js.map +1 -0
  26. package/lib/components/AriaLive/index.js +5 -0
  27. package/lib/components/AriaLive/index.js.map +1 -0
  28. package/lib/components/AriaLive/renderAriaLive.js +8 -0
  29. package/lib/components/AriaLive/renderAriaLive.js.map +1 -0
  30. package/lib/components/AriaLive/useAriaLive.js +73 -0
  31. package/lib/components/AriaLive/useAriaLive.js.map +1 -0
  32. package/lib/components/AriaLive/useAriaLiveStyles.styles.js +19 -0
  33. package/lib/components/AriaLive/useAriaLiveStyles.styles.js.map +1 -0
  34. package/lib/components/Timer/Timer.js +21 -0
  35. package/lib/components/Timer/Timer.js.map +1 -0
  36. package/lib/components/Timer/index.js +1 -0
  37. package/lib/components/Timer/index.js.map +1 -0
  38. package/lib/components/Timer/useTimerStyles.styles.js +3 -0
  39. package/lib/components/Timer/useTimerStyles.styles.js.map +1 -0
  40. package/lib/components/Toast/Toast.js +13 -0
  41. package/lib/components/Toast/Toast.js.map +1 -0
  42. package/lib/components/Toast/Toast.types.js +1 -0
  43. package/lib/components/Toast/Toast.types.js.map +1 -0
  44. package/lib/components/Toast/index.js +5 -0
  45. package/lib/components/Toast/index.js.map +1 -0
  46. package/lib/components/Toast/renderToast.js +11 -0
  47. package/lib/components/Toast/renderToast.js.map +1 -0
  48. package/lib/components/Toast/useToast.js +22 -0
  49. package/lib/components/Toast/useToast.js.map +1 -0
  50. package/lib/components/Toast/useToastContextValues.js +6 -0
  51. package/lib/components/Toast/useToastContextValues.js.map +1 -0
  52. package/lib/components/Toast/useToastStyles.styles.js +24 -0
  53. package/lib/components/Toast/useToastStyles.styles.js.map +1 -0
  54. package/lib/components/ToastBody/ToastBody.js +12 -0
  55. package/lib/components/ToastBody/ToastBody.js.map +1 -0
  56. package/lib/components/ToastBody/ToastBody.types.js +1 -0
  57. package/lib/components/ToastBody/ToastBody.types.js.map +1 -0
  58. package/lib/components/ToastBody/index.js +5 -0
  59. package/lib/components/ToastBody/index.js.map +1 -0
  60. package/lib/components/ToastBody/renderToastBody.js +8 -0
  61. package/lib/components/ToastBody/renderToastBody.js.map +1 -0
  62. package/lib/components/ToastBody/useToastBody.js +29 -0
  63. package/lib/components/ToastBody/useToastBody.js.map +1 -0
  64. package/lib/components/ToastBody/useToastBodyStyles.styles.js +32 -0
  65. package/lib/components/ToastBody/useToastBodyStyles.styles.js.map +1 -0
  66. package/lib/components/ToastContainer/ToastContainer.js +13 -0
  67. package/lib/components/ToastContainer/ToastContainer.js.map +1 -0
  68. package/lib/components/ToastContainer/ToastContainer.types.js +1 -0
  69. package/lib/components/ToastContainer/ToastContainer.types.js.map +1 -0
  70. package/lib/components/ToastContainer/index.js +6 -0
  71. package/lib/components/ToastContainer/index.js.map +1 -0
  72. package/lib/components/ToastContainer/renderToastContainer.js +21 -0
  73. package/lib/components/ToastContainer/renderToastContainer.js.map +1 -0
  74. package/lib/components/ToastContainer/useToastContainer.js +219 -0
  75. package/lib/components/ToastContainer/useToastContainer.js.map +1 -0
  76. package/lib/components/ToastContainer/useToastContainerContextValues.js +18 -0
  77. package/lib/components/ToastContainer/useToastContainerContextValues.js.map +1 -0
  78. package/lib/components/ToastContainer/useToastContainerStyles.styles.js +36 -0
  79. package/lib/components/ToastContainer/useToastContainerStyles.styles.js.map +1 -0
  80. package/lib/components/ToastFooter/ToastFooter.js +12 -0
  81. package/lib/components/ToastFooter/ToastFooter.js.map +1 -0
  82. package/lib/components/ToastFooter/ToastFooter.types.js +1 -0
  83. package/lib/components/ToastFooter/ToastFooter.types.js.map +1 -0
  84. package/lib/components/ToastFooter/index.js +5 -0
  85. package/lib/components/ToastFooter/index.js.map +1 -0
  86. package/lib/components/ToastFooter/renderToastFooter.js +8 -0
  87. package/lib/components/ToastFooter/renderToastFooter.js.map +1 -0
  88. package/lib/components/ToastFooter/useToastFooter.js +21 -0
  89. package/lib/components/ToastFooter/useToastFooter.js.map +1 -0
  90. package/lib/components/ToastFooter/useToastFooterStyles.styles.js +17 -0
  91. package/lib/components/ToastFooter/useToastFooterStyles.styles.js.map +1 -0
  92. package/lib/components/ToastTitle/ToastTitle.js +12 -0
  93. package/lib/components/ToastTitle/ToastTitle.js.map +1 -0
  94. package/lib/components/ToastTitle/ToastTitle.types.js +1 -0
  95. package/lib/components/ToastTitle/ToastTitle.types.js.map +1 -0
  96. package/lib/components/ToastTitle/index.js +5 -0
  97. package/lib/components/ToastTitle/index.js.map +1 -0
  98. package/lib/components/ToastTitle/renderToastTitle.js +8 -0
  99. package/lib/components/ToastTitle/renderToastTitle.js.map +1 -0
  100. package/lib/components/ToastTitle/useToastTitle.js +54 -0
  101. package/lib/components/ToastTitle/useToastTitle.js.map +1 -0
  102. package/lib/components/ToastTitle/useToastTitleStyles.styles.js +78 -0
  103. package/lib/components/ToastTitle/useToastTitleStyles.styles.js.map +1 -0
  104. package/lib/components/ToastTrigger/ToastTrigger.js +10 -0
  105. package/lib/components/ToastTrigger/ToastTrigger.js.map +1 -0
  106. package/lib/components/ToastTrigger/ToastTrigger.types.js +1 -0
  107. package/lib/components/ToastTrigger/ToastTrigger.types.js.map +1 -0
  108. package/lib/components/ToastTrigger/index.js +4 -0
  109. package/lib/components/ToastTrigger/index.js.map +1 -0
  110. package/lib/components/ToastTrigger/renderToastTrigger.js +5 -0
  111. package/lib/components/ToastTrigger/renderToastTrigger.js.map +1 -0
  112. package/lib/components/ToastTrigger/useToastTrigger.js +36 -0
  113. package/lib/components/ToastTrigger/useToastTrigger.js.map +1 -0
  114. package/lib/components/Toaster/Toaster.js +12 -0
  115. package/lib/components/Toaster/Toaster.js.map +1 -0
  116. package/lib/components/Toaster/Toaster.types.js +1 -0
  117. package/lib/components/Toaster/Toaster.types.js.map +1 -0
  118. package/lib/components/Toaster/index.js +5 -0
  119. package/lib/components/Toaster/index.js.map +1 -0
  120. package/lib/components/Toaster/renderToaster.js +14 -0
  121. package/lib/components/Toaster/renderToaster.js.map +1 -0
  122. package/lib/components/Toaster/useToaster.js +71 -0
  123. package/lib/components/Toaster/useToaster.js.map +1 -0
  124. package/lib/components/Toaster/useToasterStyles.styles.js +43 -0
  125. package/lib/components/Toaster/useToasterStyles.styles.js.map +1 -0
  126. package/lib/contexts/toastContainerContext.js +11 -0
  127. package/lib/contexts/toastContainerContext.js.map +1 -0
  128. package/lib/index.js +7 -0
  129. package/lib/index.js.map +1 -0
  130. package/lib/state/constants.js +14 -0
  131. package/lib/state/constants.js.map +1 -0
  132. package/lib/state/index.js +5 -0
  133. package/lib/state/index.js.map +1 -0
  134. package/lib/state/types.js +1 -0
  135. package/lib/state/types.js.map +1 -0
  136. package/lib/state/useToastController.js +57 -0
  137. package/lib/state/useToastController.js.map +1 -0
  138. package/lib/state/useToaster.js +162 -0
  139. package/lib/state/useToaster.js.map +1 -0
  140. package/lib/state/vanilla/createToaster.js +137 -0
  141. package/lib/state/vanilla/createToaster.js.map +1 -0
  142. package/lib/state/vanilla/dismissAllToasts.js +11 -0
  143. package/lib/state/vanilla/dismissAllToasts.js.map +1 -0
  144. package/lib/state/vanilla/dismissToast.js +12 -0
  145. package/lib/state/vanilla/dismissToast.js.map +1 -0
  146. package/lib/state/vanilla/dispatchToast.js +16 -0
  147. package/lib/state/vanilla/dispatchToast.js.map +1 -0
  148. package/lib/state/vanilla/getPositionStyles.js +40 -0
  149. package/lib/state/vanilla/getPositionStyles.js.map +1 -0
  150. package/lib/state/vanilla/index.js +8 -0
  151. package/lib/state/vanilla/index.js.map +1 -0
  152. package/lib/state/vanilla/pauseToast.js +12 -0
  153. package/lib/state/vanilla/pauseToast.js.map +1 -0
  154. package/lib/state/vanilla/playToast.js +12 -0
  155. package/lib/state/vanilla/playToast.js.map +1 -0
  156. package/lib/state/vanilla/updateToast.js +9 -0
  157. package/lib/state/vanilla/updateToast.js.map +1 -0
  158. package/lib-commonjs/AriaLive.js +6 -0
  159. package/lib-commonjs/AriaLive.js.map +1 -0
  160. package/lib-commonjs/Toast.js +6 -0
  161. package/lib-commonjs/Toast.js.map +1 -0
  162. package/lib-commonjs/ToastBody.js +6 -0
  163. package/lib-commonjs/ToastBody.js.map +1 -0
  164. package/lib-commonjs/ToastContainer.js +6 -0
  165. package/lib-commonjs/ToastContainer.js.map +1 -0
  166. package/lib-commonjs/ToastFooter.js +6 -0
  167. package/lib-commonjs/ToastFooter.js.map +1 -0
  168. package/lib-commonjs/ToastTitle.js +6 -0
  169. package/lib-commonjs/ToastTitle.js.map +1 -0
  170. package/lib-commonjs/ToastTrigger.js +6 -0
  171. package/lib-commonjs/ToastTrigger.js.map +1 -0
  172. package/lib-commonjs/Toaster.js +6 -0
  173. package/lib-commonjs/Toaster.js.map +1 -0
  174. package/lib-commonjs/components/AriaLive/AriaLive.js +19 -0
  175. package/lib-commonjs/components/AriaLive/AriaLive.js.map +1 -0
  176. package/lib-commonjs/components/AriaLive/AriaLive.types.js +6 -0
  177. package/lib-commonjs/components/AriaLive/AriaLive.types.js.map +1 -0
  178. package/lib-commonjs/components/AriaLive/index.js +10 -0
  179. package/lib-commonjs/components/AriaLive/index.js.map +1 -0
  180. package/lib-commonjs/components/AriaLive/renderAriaLive.js +14 -0
  181. package/lib-commonjs/components/AriaLive/renderAriaLive.js.map +1 -0
  182. package/lib-commonjs/components/AriaLive/useAriaLive.js +75 -0
  183. package/lib-commonjs/components/AriaLive/useAriaLive.js.map +1 -0
  184. package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.js +31 -0
  185. package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.js.map +1 -0
  186. package/lib-commonjs/components/Timer/Timer.js +30 -0
  187. package/lib-commonjs/components/Timer/Timer.js.map +1 -0
  188. package/lib-commonjs/components/Timer/index.js +6 -0
  189. package/lib-commonjs/components/Timer/index.js.map +1 -0
  190. package/lib-commonjs/components/Timer/useTimerStyles.styles.js +16 -0
  191. package/lib-commonjs/components/Timer/useTimerStyles.styles.js.map +1 -0
  192. package/lib-commonjs/components/Toast/Toast.js +20 -0
  193. package/lib-commonjs/components/Toast/Toast.js.map +1 -0
  194. package/lib-commonjs/components/Toast/Toast.types.js +4 -0
  195. package/lib-commonjs/components/Toast/Toast.types.js.map +1 -0
  196. package/lib-commonjs/components/Toast/index.js +10 -0
  197. package/lib-commonjs/components/Toast/index.js.map +1 -0
  198. package/lib-commonjs/components/Toast/renderToast.js +17 -0
  199. package/lib-commonjs/components/Toast/renderToast.js.map +1 -0
  200. package/lib-commonjs/components/Toast/useToast.js +23 -0
  201. package/lib-commonjs/components/Toast/useToast.js.map +1 -0
  202. package/lib-commonjs/components/Toast/useToastContextValues.js +14 -0
  203. package/lib-commonjs/components/Toast/useToastContextValues.js.map +1 -0
  204. package/lib-commonjs/components/Toast/useToastStyles.styles.js +39 -0
  205. package/lib-commonjs/components/Toast/useToastStyles.styles.js.map +1 -0
  206. package/lib-commonjs/components/ToastBody/ToastBody.js +19 -0
  207. package/lib-commonjs/components/ToastBody/ToastBody.js.map +1 -0
  208. package/lib-commonjs/components/ToastBody/ToastBody.types.js +4 -0
  209. package/lib-commonjs/components/ToastBody/ToastBody.types.js.map +1 -0
  210. package/lib-commonjs/components/ToastBody/index.js +10 -0
  211. package/lib-commonjs/components/ToastBody/index.js.map +1 -0
  212. package/lib-commonjs/components/ToastBody/renderToastBody.js +14 -0
  213. package/lib-commonjs/components/ToastBody/renderToastBody.js.map +1 -0
  214. package/lib-commonjs/components/ToastBody/useToastBody.js +30 -0
  215. package/lib-commonjs/components/ToastBody/useToastBody.js.map +1 -0
  216. package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.js +47 -0
  217. package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.js.map +1 -0
  218. package/lib-commonjs/components/ToastContainer/ToastContainer.js +20 -0
  219. package/lib-commonjs/components/ToastContainer/ToastContainer.js.map +1 -0
  220. package/lib-commonjs/components/ToastContainer/ToastContainer.types.js +6 -0
  221. package/lib-commonjs/components/ToastContainer/ToastContainer.types.js.map +1 -0
  222. package/lib-commonjs/components/ToastContainer/index.js +11 -0
  223. package/lib-commonjs/components/ToastContainer/index.js.map +1 -0
  224. package/lib-commonjs/components/ToastContainer/renderToastContainer.js +27 -0
  225. package/lib-commonjs/components/ToastContainer/renderToastContainer.js.map +1 -0
  226. package/lib-commonjs/components/ToastContainer/useToastContainer.js +220 -0
  227. package/lib-commonjs/components/ToastContainer/useToastContainer.js.map +1 -0
  228. package/lib-commonjs/components/ToastContainer/useToastContainerContextValues.js +27 -0
  229. package/lib-commonjs/components/ToastContainer/useToastContainerContextValues.js.map +1 -0
  230. package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.js +64 -0
  231. package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.js.map +1 -0
  232. package/lib-commonjs/components/ToastFooter/ToastFooter.js +19 -0
  233. package/lib-commonjs/components/ToastFooter/ToastFooter.js.map +1 -0
  234. package/lib-commonjs/components/ToastFooter/ToastFooter.types.js +4 -0
  235. package/lib-commonjs/components/ToastFooter/ToastFooter.types.js.map +1 -0
  236. package/lib-commonjs/components/ToastFooter/index.js +10 -0
  237. package/lib-commonjs/components/ToastFooter/index.js.map +1 -0
  238. package/lib-commonjs/components/ToastFooter/renderToastFooter.js +14 -0
  239. package/lib-commonjs/components/ToastFooter/renderToastFooter.js.map +1 -0
  240. package/lib-commonjs/components/ToastFooter/useToastFooter.js +22 -0
  241. package/lib-commonjs/components/ToastFooter/useToastFooter.js.map +1 -0
  242. package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.js +28 -0
  243. package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.js.map +1 -0
  244. package/lib-commonjs/components/ToastTitle/ToastTitle.js +19 -0
  245. package/lib-commonjs/components/ToastTitle/ToastTitle.js.map +1 -0
  246. package/lib-commonjs/components/ToastTitle/ToastTitle.types.js +4 -0
  247. package/lib-commonjs/components/ToastTitle/ToastTitle.types.js.map +1 -0
  248. package/lib-commonjs/components/ToastTitle/index.js +10 -0
  249. package/lib-commonjs/components/ToastTitle/index.js.map +1 -0
  250. package/lib-commonjs/components/ToastTitle/renderToastTitle.js +14 -0
  251. package/lib-commonjs/components/ToastTitle/renderToastTitle.js.map +1 -0
  252. package/lib-commonjs/components/ToastTitle/useToastTitle.js +55 -0
  253. package/lib-commonjs/components/ToastTitle/useToastTitle.js.map +1 -0
  254. package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.js +107 -0
  255. package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.js.map +1 -0
  256. package/lib-commonjs/components/ToastTrigger/ToastTrigger.js +17 -0
  257. package/lib-commonjs/components/ToastTrigger/ToastTrigger.js.map +1 -0
  258. package/lib-commonjs/components/ToastTrigger/ToastTrigger.types.js +6 -0
  259. package/lib-commonjs/components/ToastTrigger/ToastTrigger.types.js.map +1 -0
  260. package/lib-commonjs/components/ToastTrigger/index.js +9 -0
  261. package/lib-commonjs/components/ToastTrigger/index.js.map +1 -0
  262. package/lib-commonjs/components/ToastTrigger/renderToastTrigger.js +13 -0
  263. package/lib-commonjs/components/ToastTrigger/renderToastTrigger.js.map +1 -0
  264. package/lib-commonjs/components/ToastTrigger/useToastTrigger.js +37 -0
  265. package/lib-commonjs/components/ToastTrigger/useToastTrigger.js.map +1 -0
  266. package/lib-commonjs/components/Toaster/Toaster.js +19 -0
  267. package/lib-commonjs/components/Toaster/Toaster.js.map +1 -0
  268. package/lib-commonjs/components/Toaster/Toaster.types.js +4 -0
  269. package/lib-commonjs/components/Toaster/Toaster.types.js.map +1 -0
  270. package/lib-commonjs/components/Toaster/index.js +10 -0
  271. package/lib-commonjs/components/Toaster/index.js.map +1 -0
  272. package/lib-commonjs/components/Toaster/renderToaster.js +20 -0
  273. package/lib-commonjs/components/Toaster/renderToaster.js.map +1 -0
  274. package/lib-commonjs/components/Toaster/useToaster.js +76 -0
  275. package/lib-commonjs/components/Toaster/useToaster.js.map +1 -0
  276. package/lib-commonjs/components/Toaster/useToasterStyles.styles.js +54 -0
  277. package/lib-commonjs/components/Toaster/useToasterStyles.styles.js.map +1 -0
  278. package/lib-commonjs/contexts/toastContainerContext.js +26 -0
  279. package/lib-commonjs/contexts/toastContainerContext.js.map +1 -0
  280. package/lib-commonjs/index.js +48 -0
  281. package/lib-commonjs/index.js.map +1 -0
  282. package/lib-commonjs/state/constants.js +28 -0
  283. package/lib-commonjs/state/constants.js.map +1 -0
  284. package/lib-commonjs/state/index.js +20 -0
  285. package/lib-commonjs/state/index.js.map +1 -0
  286. package/lib-commonjs/state/types.js +6 -0
  287. package/lib-commonjs/state/types.js.map +1 -0
  288. package/lib-commonjs/state/useToastController.js +63 -0
  289. package/lib-commonjs/state/useToastController.js.map +1 -0
  290. package/lib-commonjs/state/useToaster.js +171 -0
  291. package/lib-commonjs/state/useToaster.js.map +1 -0
  292. package/lib-commonjs/state/vanilla/createToaster.js +142 -0
  293. package/lib-commonjs/state/vanilla/createToaster.js.map +1 -0
  294. package/lib-commonjs/state/vanilla/dismissAllToasts.js +19 -0
  295. package/lib-commonjs/state/vanilla/dismissAllToasts.js.map +1 -0
  296. package/lib-commonjs/state/vanilla/dismissToast.js +20 -0
  297. package/lib-commonjs/state/vanilla/dismissToast.js.map +1 -0
  298. package/lib-commonjs/state/vanilla/dispatchToast.js +24 -0
  299. package/lib-commonjs/state/vanilla/dispatchToast.js.map +1 -0
  300. package/lib-commonjs/state/vanilla/getPositionStyles.js +48 -0
  301. package/lib-commonjs/state/vanilla/getPositionStyles.js.map +1 -0
  302. package/lib-commonjs/state/vanilla/index.js +13 -0
  303. package/lib-commonjs/state/vanilla/index.js.map +1 -0
  304. package/lib-commonjs/state/vanilla/pauseToast.js +20 -0
  305. package/lib-commonjs/state/vanilla/pauseToast.js.map +1 -0
  306. package/lib-commonjs/state/vanilla/playToast.js +20 -0
  307. package/lib-commonjs/state/vanilla/playToast.js.map +1 -0
  308. package/lib-commonjs/state/vanilla/updateToast.js +17 -0
  309. package/lib-commonjs/state/vanilla/updateToast.js.map +1 -0
  310. package/package.json +71 -0
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "ToastContainer", {
6
+ enumerable: true,
7
+ get: ()=>ToastContainer
8
+ });
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _useToastContainer = require("./useToastContainer");
12
+ const _renderToastContainer = require("./renderToastContainer");
13
+ const _useToastContainerStylesStyles = require("./useToastContainerStyles.styles");
14
+ const _useToastContainerContextValues = require("./useToastContainerContextValues");
15
+ const ToastContainer = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
16
+ const state = (0, _useToastContainer.useToastContainer_unstable)(props, ref);
17
+ (0, _useToastContainerStylesStyles.useToastContainerStyles_unstable)(state);
18
+ return (0, _renderToastContainer.renderToastContainer_unstable)(state, (0, _useToastContainerContextValues.useToastContainerContextValues_unstable)(state));
19
+ });
20
+ ToastContainer.displayName = 'ToastContainer';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ToastContainer.js"],"sourcesContent":["import * as React from 'react';\nimport { useToastContainer_unstable } from './useToastContainer';\nimport { renderToastContainer_unstable } from './renderToastContainer';\nimport { useToastContainerStyles_unstable } from './useToastContainerStyles.styles';\nimport { useToastContainerContextValues_unstable } from './useToastContainerContextValues';\n/**\n * ToastContainer component\n */ export const ToastContainer = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useToastContainer_unstable(props, ref);\n useToastContainerStyles_unstable(state);\n return renderToastContainer_unstable(state, useToastContainerContextValues_unstable(state));\n});\nToastContainer.displayName = 'ToastContainer';\n"],"names":["ToastContainer","React","forwardRef","props","ref","state","useToastContainer_unstable","useToastContainerStyles_unstable","renderToastContainer_unstable","useToastContainerContextValues_unstable","displayName"],"mappings":";;;;+BAOiBA;;aAAAA;;;6DAPM;mCACoB;sCACG;+CACG;gDACO;AAG7C,MAAMA,iBAAiB,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IAC3E,MAAMC,QAAQC,IAAAA,6CAA0B,EAACH,OAAOC;IAChDG,IAAAA,+DAAgC,EAACF;IACjC,OAAOG,IAAAA,mDAA6B,EAACH,OAAOI,IAAAA,uEAAuC,EAACJ;AACxF;AACAL,eAAeU,WAAW,GAAG"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
6
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ToastContainer.types.js"],"sourcesContent":["import * as React from 'react';\n"],"names":[],"mappings":";;;;;6DAAuB"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./ToastContainer"), exports);
7
+ _exportStar(require("./ToastContainer.types"), exports);
8
+ _exportStar(require("./renderToastContainer"), exports);
9
+ _exportStar(require("./useToastContainer"), exports);
10
+ _exportStar(require("./useToastContainerStyles.styles"), exports);
11
+ _exportStar(require("./useToastContainerContextValues"), exports);
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './ToastContainer';\nexport * from './ToastContainer.types';\nexport * from './renderToastContainer';\nexport * from './useToastContainer';\nexport * from './useToastContainerStyles.styles';\nexport * from './useToastContainerContextValues';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA;oBACA"}
@@ -0,0 +1,27 @@
1
+ /** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderToastContainer_unstable", {
6
+ enumerable: true,
7
+ get: ()=>renderToastContainer_unstable
8
+ });
9
+ const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
10
+ const _reactUtilities = require("@fluentui/react-utilities");
11
+ const _reactTransitionGroup = require("react-transition-group");
12
+ const _toastContainerContext = require("../../contexts/toastContainerContext");
13
+ const renderToastContainer_unstable = (state, contextValues)=>{
14
+ const { onTransitionEntering , visible , transitionTimeout , remove , nodeRef } = state;
15
+ const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
16
+ return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_reactTransitionGroup.Transition, {
17
+ in: visible,
18
+ appear: true,
19
+ unmountOnExit: true,
20
+ timeout: transitionTimeout,
21
+ onExited: remove,
22
+ onEntering: onTransitionEntering,
23
+ nodeRef: nodeRef
24
+ }, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(_toastContainerContext.ToastContainerContextProvider, {
25
+ value: contextValues.toast
26
+ }, /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root), /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.timer, slotProps.timer)));
27
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["renderToastContainer.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\nimport { Transition } from 'react-transition-group';\nimport { ToastContainerContextProvider } from '../../contexts/toastContainerContext';\n/**\n * Render the final JSX of ToastContainer\n */ export const renderToastContainer_unstable = (state, contextValues)=>{\n const { onTransitionEntering , visible , transitionTimeout , remove , nodeRef } = state;\n const { slots , slotProps } = getSlotsNext(state);\n return /*#__PURE__*/ createElement(Transition, {\n in: visible,\n appear: true,\n unmountOnExit: true,\n timeout: transitionTimeout,\n onExited: remove,\n onEntering: onTransitionEntering,\n nodeRef: nodeRef\n }, /*#__PURE__*/ createElement(ToastContainerContextProvider, {\n value: contextValues.toast\n }, /*#__PURE__*/ createElement(slots.root, slotProps.root), /*#__PURE__*/ createElement(slots.timer, slotProps.timer)));\n};\n"],"names":["renderToastContainer_unstable","state","contextValues","onTransitionEntering","visible","transitionTimeout","remove","nodeRef","slots","slotProps","getSlotsNext","createElement","Transition","in","appear","unmountOnExit","timeout","onExited","onEntering","ToastContainerContextProvider","value","toast","root","timer"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAMjCA;;aAAAA;;iCANkE;gCACtD;sCACF;uCACmB;AAGnC,MAAMA,gCAAgC,CAACC,OAAOC,gBAAgB;IACrE,MAAM,EAAEC,qBAAoB,EAAGC,QAAO,EAAGC,kBAAiB,EAAGC,OAAM,EAAGC,QAAO,EAAG,GAAGN;IACnF,MAAM,EAAEO,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACT;IAC5C,OAAO,WAAW,GAAGU,IAAAA,8BAAa,EAACC,gCAAU,EAAE;QAC3CC,IAAIT;QACJU,QAAQ,IAAI;QACZC,eAAe,IAAI;QACnBC,SAASX;QACTY,UAAUX;QACVY,YAAYf;QACZI,SAASA;IACb,GAAG,WAAW,GAAGI,IAAAA,8BAAa,EAACQ,oDAA6B,EAAE;QAC1DC,OAAOlB,cAAcmB,KAAK;IAC9B,GAAG,WAAW,GAAGV,IAAAA,8BAAa,EAACH,MAAMc,IAAI,EAAEb,UAAUa,IAAI,GAAG,WAAW,GAAGX,IAAAA,8BAAa,EAACH,MAAMe,KAAK,EAAEd,UAAUc,KAAK;AACxH"}
@@ -0,0 +1,220 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useToastContainer_unstable", {
6
+ enumerable: true,
7
+ get: ()=>useToastContainer_unstable
8
+ });
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
12
+ const _reactSharedContexts = require("@fluentui/react-shared-contexts");
13
+ const _timer = require("../Timer/Timer");
14
+ const _reactTabster = require("@fluentui/react-tabster");
15
+ const intentPolitenessMap = {
16
+ success: 'assertive',
17
+ warning: 'assertive',
18
+ error: 'assertive',
19
+ info: 'polite'
20
+ };
21
+ const useToastContainer_unstable = (props, ref)=>{
22
+ const { visible , children , close: closeProp , remove , updateId , announce , data , timeout: timerTimeout , politeness: desiredPoliteness , intent ='info' , pauseOnHover , pauseOnWindowBlur , imperativeRef , tryRestoreFocus , ...rest } = props;
23
+ const titleId = (0, _reactUtilities.useId)('toast-title');
24
+ const bodyId = (0, _reactUtilities.useId)('toast-body');
25
+ const toastRef = _react.useRef(null);
26
+ const { targetDocument } = (0, _reactSharedContexts.useFluent_unstable)();
27
+ const [running, setRunning] = _react.useState(false);
28
+ const imperativePauseRef = _react.useRef(false);
29
+ const focusedToastBeforeClose = _react.useRef(false);
30
+ const close = (0, _reactUtilities.useEventCallback)(()=>{
31
+ var _toastRef_current;
32
+ const activeElement = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.activeElement;
33
+ if (activeElement && ((_toastRef_current = toastRef.current) === null || _toastRef_current === void 0 ? void 0 : _toastRef_current.contains(activeElement))) {
34
+ focusedToastBeforeClose.current = true;
35
+ }
36
+ closeProp();
37
+ });
38
+ const onStatusChange = (0, _reactUtilities.useEventCallback)((status)=>{
39
+ var _props_onStatusChange;
40
+ return (_props_onStatusChange = props.onStatusChange) === null || _props_onStatusChange === void 0 ? void 0 : _props_onStatusChange.call(props, null, {
41
+ status,
42
+ ...props
43
+ });
44
+ });
45
+ const pause = (0, _reactUtilities.useEventCallback)(()=>setRunning(false));
46
+ const play = (0, _reactUtilities.useEventCallback)(()=>{
47
+ var _toastRef_current;
48
+ if (imperativePauseRef.current) {
49
+ return;
50
+ }
51
+ var _targetDocument_activeElement;
52
+ const containsActive = !!((_toastRef_current = toastRef.current) === null || _toastRef_current === void 0 ? void 0 : _toastRef_current.contains((_targetDocument_activeElement = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.activeElement) !== null && _targetDocument_activeElement !== void 0 ? _targetDocument_activeElement : null));
53
+ if (timerTimeout < 0) {
54
+ setRunning(true);
55
+ return;
56
+ }
57
+ if (!containsActive) {
58
+ setRunning(true);
59
+ }
60
+ });
61
+ const { findFirstFocusable } = (0, _reactTabster.useFocusFinders)();
62
+ _react.useImperativeHandle(imperativeRef, ()=>({
63
+ focus: ()=>{
64
+ if (!toastRef.current) {
65
+ return;
66
+ }
67
+ const firstFocusable = findFirstFocusable(toastRef.current);
68
+ if (firstFocusable) {
69
+ firstFocusable.focus();
70
+ } else {
71
+ toastRef.current.focus();
72
+ }
73
+ },
74
+ play: ()=>{
75
+ imperativePauseRef.current = false;
76
+ play();
77
+ },
78
+ pause: ()=>{
79
+ imperativePauseRef.current = true;
80
+ pause();
81
+ }
82
+ }));
83
+ _react.useEffect(()=>{
84
+ return ()=>onStatusChange('unmounted');
85
+ }, [
86
+ onStatusChange
87
+ ]);
88
+ _react.useEffect(()=>{
89
+ if (!targetDocument) {
90
+ return;
91
+ }
92
+ if (pauseOnWindowBlur) {
93
+ var _targetDocument_defaultView, _targetDocument_defaultView1;
94
+ (_targetDocument_defaultView = targetDocument.defaultView) === null || _targetDocument_defaultView === void 0 ? void 0 : _targetDocument_defaultView.addEventListener('focus', play);
95
+ (_targetDocument_defaultView1 = targetDocument.defaultView) === null || _targetDocument_defaultView1 === void 0 ? void 0 : _targetDocument_defaultView1.addEventListener('blur', pause);
96
+ return ()=>{
97
+ var _targetDocument_defaultView, _targetDocument_defaultView1;
98
+ (_targetDocument_defaultView = targetDocument.defaultView) === null || _targetDocument_defaultView === void 0 ? void 0 : _targetDocument_defaultView.removeEventListener('focus', play);
99
+ (_targetDocument_defaultView1 = targetDocument.defaultView) === null || _targetDocument_defaultView1 === void 0 ? void 0 : _targetDocument_defaultView1.removeEventListener('blur', pause);
100
+ };
101
+ }
102
+ }, [
103
+ targetDocument,
104
+ pause,
105
+ play,
106
+ pauseOnWindowBlur
107
+ ]);
108
+ // It's impossible to animate to height: auto in CSS, the actual pixel value must be known
109
+ // Get the height of the toast before animation styles have been applied and set a CSS
110
+ // variable with its height. The CSS variable will be used by the styles
111
+ const onTransitionEntering = ()=>{
112
+ if (!toastRef.current) {
113
+ return;
114
+ }
115
+ const element = toastRef.current;
116
+ element.style.setProperty('--fui-toast-height', `${element.scrollHeight}px`);
117
+ };
118
+ // Users never actually use ToastContainer as a JSX but imperatively through useToastContainerController
119
+ const userRootSlot = data.root;
120
+ // Using a ref callback here because addEventListener supports `once`
121
+ const toastAnimationRef = _react.useCallback((el)=>{
122
+ if (el && toastRef.current) {
123
+ toastRef.current.addEventListener('animationend', ()=>{
124
+ // start toast once it's fully animated in
125
+ play();
126
+ onStatusChange('visible');
127
+ }, {
128
+ once: true
129
+ });
130
+ }
131
+ }, [
132
+ play,
133
+ onStatusChange
134
+ ]);
135
+ const onMouseEnter = (0, _reactUtilities.useEventCallback)((e)=>{
136
+ var _userRootSlot_onMouseEnter;
137
+ pause();
138
+ userRootSlot === null || userRootSlot === void 0 ? void 0 : (_userRootSlot_onMouseEnter = userRootSlot.onMouseEnter) === null || _userRootSlot_onMouseEnter === void 0 ? void 0 : _userRootSlot_onMouseEnter.call(userRootSlot, e);
139
+ });
140
+ const onMouseLeave = (0, _reactUtilities.useEventCallback)((e)=>{
141
+ var _userRootSlot_onMouseEnter;
142
+ play();
143
+ userRootSlot === null || userRootSlot === void 0 ? void 0 : (_userRootSlot_onMouseEnter = userRootSlot.onMouseEnter) === null || _userRootSlot_onMouseEnter === void 0 ? void 0 : _userRootSlot_onMouseEnter.call(userRootSlot, e);
144
+ });
145
+ const onKeyDown = (0, _reactUtilities.useEventCallback)((e)=>{
146
+ var _userRootSlot_onKeyDown;
147
+ if (e.key === 'Escape') {
148
+ e.preventDefault();
149
+ close();
150
+ }
151
+ userRootSlot === null || userRootSlot === void 0 ? void 0 : (_userRootSlot_onKeyDown = userRootSlot.onKeyDown) === null || _userRootSlot_onKeyDown === void 0 ? void 0 : _userRootSlot_onKeyDown.call(userRootSlot, e);
152
+ });
153
+ _react.useEffect(()=>{
154
+ var _toastRef_current;
155
+ if (!visible) {
156
+ return;
157
+ }
158
+ const politeness = desiredPoliteness !== null && desiredPoliteness !== void 0 ? desiredPoliteness : intentPolitenessMap[intent];
159
+ var _toastRef_current_textContent;
160
+ announce((_toastRef_current_textContent = (_toastRef_current = toastRef.current) === null || _toastRef_current === void 0 ? void 0 : _toastRef_current.textContent) !== null && _toastRef_current_textContent !== void 0 ? _toastRef_current_textContent : '', {
161
+ politeness
162
+ });
163
+ }, [
164
+ announce,
165
+ desiredPoliteness,
166
+ toastRef,
167
+ visible,
168
+ updateId,
169
+ intent
170
+ ]);
171
+ _react.useEffect(()=>{
172
+ return ()=>{
173
+ if (focusedToastBeforeClose.current) {
174
+ focusedToastBeforeClose.current = false;
175
+ tryRestoreFocus();
176
+ }
177
+ };
178
+ }, [
179
+ tryRestoreFocus
180
+ ]);
181
+ return {
182
+ components: {
183
+ timer: _timer.Timer,
184
+ root: 'div'
185
+ },
186
+ timer: (0, _reactUtilities.resolveShorthand)({
187
+ key: updateId,
188
+ onTimeout: close,
189
+ running,
190
+ timeout: timerTimeout !== null && timerTimeout !== void 0 ? timerTimeout : -1
191
+ }, {
192
+ required: true
193
+ }),
194
+ root: (0, _reactUtilities.getNativeElementProps)('div', {
195
+ ref: (0, _reactUtilities.useMergedRefs)(ref, toastRef, toastAnimationRef),
196
+ children,
197
+ tabIndex: -1,
198
+ role: 'group',
199
+ 'aria-labelledby': titleId,
200
+ 'aria-describedby': bodyId,
201
+ ...rest,
202
+ ...userRootSlot,
203
+ onMouseEnter,
204
+ onMouseLeave,
205
+ onKeyDown
206
+ }),
207
+ timerTimeout,
208
+ transitionTimeout: 500,
209
+ running,
210
+ visible,
211
+ remove,
212
+ close,
213
+ onTransitionEntering,
214
+ updateId,
215
+ nodeRef: toastRef,
216
+ intent,
217
+ titleId,
218
+ bodyId
219
+ };
220
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useToastContainer.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useMergedRefs, useEventCallback, resolveShorthand, useId } from '@fluentui/react-utilities';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { Timer } from '../Timer/Timer';\nimport { useFocusFinders } from '@fluentui/react-tabster';\nconst intentPolitenessMap = {\n success: 'assertive',\n warning: 'assertive',\n error: 'assertive',\n info: 'polite'\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 */ export const useToastContainer_unstable = (props, ref)=>{\n const { visible , children , close: closeProp , remove , updateId , announce , data , timeout: timerTimeout , politeness: desiredPoliteness , intent ='info' , pauseOnHover , pauseOnWindowBlur , imperativeRef , tryRestoreFocus , ...rest } = props;\n const titleId = useId('toast-title');\n const bodyId = useId('toast-body');\n const toastRef = React.useRef(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 close = useEventCallback(()=>{\n var _toastRef_current;\n const activeElement = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.activeElement;\n if (activeElement && ((_toastRef_current = toastRef.current) === null || _toastRef_current === void 0 ? void 0 : _toastRef_current.contains(activeElement))) {\n focusedToastBeforeClose.current = true;\n }\n closeProp();\n });\n const onStatusChange = useEventCallback((status)=>{\n var _props_onStatusChange;\n return (_props_onStatusChange = props.onStatusChange) === null || _props_onStatusChange === void 0 ? void 0 : _props_onStatusChange.call(props, null, {\n status,\n ...props\n });\n });\n const pause = useEventCallback(()=>setRunning(false));\n const play = useEventCallback(()=>{\n var _toastRef_current;\n if (imperativePauseRef.current) {\n return;\n }\n var _targetDocument_activeElement;\n const containsActive = !!((_toastRef_current = toastRef.current) === null || _toastRef_current === void 0 ? void 0 : _toastRef_current.contains((_targetDocument_activeElement = targetDocument === null || targetDocument === void 0 ? void 0 : targetDocument.activeElement) !== null && _targetDocument_activeElement !== void 0 ? _targetDocument_activeElement : null));\n if (timerTimeout < 0) {\n setRunning(true);\n return;\n }\n if (!containsActive) {\n setRunning(true);\n }\n });\n const { findFirstFocusable } = useFocusFinders();\n React.useImperativeHandle(imperativeRef, ()=>({\n focus: ()=>{\n if (!toastRef.current) {\n return;\n }\n const firstFocusable = findFirstFocusable(toastRef.current);\n if (firstFocusable) {\n firstFocusable.focus();\n } else {\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 React.useEffect(()=>{\n return ()=>onStatusChange('unmounted');\n }, [\n onStatusChange\n ]);\n React.useEffect(()=>{\n if (!targetDocument) {\n return;\n }\n if (pauseOnWindowBlur) {\n var _targetDocument_defaultView, _targetDocument_defaultView1;\n (_targetDocument_defaultView = targetDocument.defaultView) === null || _targetDocument_defaultView === void 0 ? void 0 : _targetDocument_defaultView.addEventListener('focus', play);\n (_targetDocument_defaultView1 = targetDocument.defaultView) === null || _targetDocument_defaultView1 === void 0 ? void 0 : _targetDocument_defaultView1.addEventListener('blur', pause);\n return ()=>{\n var _targetDocument_defaultView, _targetDocument_defaultView1;\n (_targetDocument_defaultView = targetDocument.defaultView) === null || _targetDocument_defaultView === void 0 ? void 0 : _targetDocument_defaultView.removeEventListener('focus', play);\n (_targetDocument_defaultView1 = targetDocument.defaultView) === null || _targetDocument_defaultView1 === void 0 ? void 0 : _targetDocument_defaultView1.removeEventListener('blur', pause);\n };\n }\n }, [\n targetDocument,\n pause,\n play,\n pauseOnWindowBlur\n ]);\n // It's impossible to animate to height: auto in CSS, the actual pixel value must be known\n // Get the height of the toast before animation styles have been applied and set a CSS\n // variable with its height. The CSS variable will be used by the styles\n const onTransitionEntering = ()=>{\n if (!toastRef.current) {\n return;\n }\n const element = toastRef.current;\n element.style.setProperty('--fui-toast-height', `${element.scrollHeight}px`);\n };\n // Users never actually use ToastContainer as a JSX but imperatively through useToastContainerController\n const userRootSlot = data.root;\n // Using a ref callback here because addEventListener supports `once`\n const toastAnimationRef = React.useCallback((el)=>{\n if (el && toastRef.current) {\n toastRef.current.addEventListener('animationend', ()=>{\n // start toast once it's fully animated in\n play();\n onStatusChange('visible');\n }, {\n once: true\n });\n }\n }, [\n play,\n onStatusChange\n ]);\n const onMouseEnter = useEventCallback((e)=>{\n var _userRootSlot_onMouseEnter;\n pause();\n userRootSlot === null || userRootSlot === void 0 ? void 0 : (_userRootSlot_onMouseEnter = userRootSlot.onMouseEnter) === null || _userRootSlot_onMouseEnter === void 0 ? void 0 : _userRootSlot_onMouseEnter.call(userRootSlot, e);\n });\n const onMouseLeave = useEventCallback((e)=>{\n var _userRootSlot_onMouseEnter;\n play();\n userRootSlot === null || userRootSlot === void 0 ? void 0 : (_userRootSlot_onMouseEnter = userRootSlot.onMouseEnter) === null || _userRootSlot_onMouseEnter === void 0 ? void 0 : _userRootSlot_onMouseEnter.call(userRootSlot, e);\n });\n const onKeyDown = useEventCallback((e)=>{\n var _userRootSlot_onKeyDown;\n if (e.key === 'Escape') {\n e.preventDefault();\n close();\n }\n userRootSlot === null || userRootSlot === void 0 ? void 0 : (_userRootSlot_onKeyDown = userRootSlot.onKeyDown) === null || _userRootSlot_onKeyDown === void 0 ? void 0 : _userRootSlot_onKeyDown.call(userRootSlot, e);\n });\n React.useEffect(()=>{\n var _toastRef_current;\n if (!visible) {\n return;\n }\n const politeness = desiredPoliteness !== null && desiredPoliteness !== void 0 ? desiredPoliteness : intentPolitenessMap[intent];\n var _toastRef_current_textContent;\n announce((_toastRef_current_textContent = (_toastRef_current = toastRef.current) === null || _toastRef_current === void 0 ? void 0 : _toastRef_current.textContent) !== null && _toastRef_current_textContent !== void 0 ? _toastRef_current_textContent : '', {\n politeness\n });\n }, [\n announce,\n desiredPoliteness,\n toastRef,\n visible,\n updateId,\n intent\n ]);\n React.useEffect(()=>{\n return ()=>{\n if (focusedToastBeforeClose.current) {\n focusedToastBeforeClose.current = false;\n tryRestoreFocus();\n }\n };\n }, [\n tryRestoreFocus\n ]);\n return {\n components: {\n timer: Timer,\n root: 'div'\n },\n timer: resolveShorthand({\n key: updateId,\n onTimeout: close,\n running,\n timeout: timerTimeout !== null && timerTimeout !== void 0 ? timerTimeout : -1\n }, {\n required: true\n }),\n root: getNativeElementProps('div', {\n ref: useMergedRefs(ref, toastRef, toastAnimationRef),\n children,\n tabIndex: -1,\n role: 'group',\n 'aria-labelledby': titleId,\n 'aria-describedby': bodyId,\n ...rest,\n ...userRootSlot,\n onMouseEnter,\n onMouseLeave,\n onKeyDown\n }),\n timerTimeout,\n transitionTimeout: 500,\n running,\n visible,\n remove,\n close,\n onTransitionEntering,\n updateId,\n nodeRef: toastRef,\n intent,\n titleId,\n bodyId\n };\n};\n"],"names":["useToastContainer_unstable","intentPolitenessMap","success","warning","error","info","props","ref","visible","children","close","closeProp","remove","updateId","announce","data","timeout","timerTimeout","politeness","desiredPoliteness","intent","pauseOnHover","pauseOnWindowBlur","imperativeRef","tryRestoreFocus","rest","titleId","useId","bodyId","toastRef","React","useRef","targetDocument","useFluent_unstable","running","setRunning","useState","imperativePauseRef","focusedToastBeforeClose","useEventCallback","_toastRef_current","activeElement","current","contains","onStatusChange","status","_props_onStatusChange","call","pause","play","_targetDocument_activeElement","containsActive","findFirstFocusable","useFocusFinders","useImperativeHandle","focus","firstFocusable","useEffect","_targetDocument_defaultView","_targetDocument_defaultView1","defaultView","addEventListener","removeEventListener","onTransitionEntering","element","style","setProperty","scrollHeight","userRootSlot","root","toastAnimationRef","useCallback","el","once","onMouseEnter","e","_userRootSlot_onMouseEnter","onMouseLeave","onKeyDown","_userRootSlot_onKeyDown","key","preventDefault","_toastRef_current_textContent","textContent","components","timer","Timer","resolveShorthand","onTimeout","required","getNativeElementProps","useMergedRefs","tabIndex","role","transitionTimeout","nodeRef"],"mappings":";;;;+BAmBiBA;;aAAAA;;;6DAnBM;gCACyE;qCAC7D;uBACb;8BACU;AAChC,MAAMC,sBAAsB;IACxBC,SAAS;IACTC,SAAS;IACTC,OAAO;IACPC,MAAM;AACV;AASW,MAAML,6BAA6B,CAACM,OAAOC,MAAM;IACxD,MAAM,EAAEC,QAAO,EAAGC,SAAQ,EAAGC,OAAOC,UAAS,EAAGC,OAAM,EAAGC,SAAQ,EAAGC,SAAQ,EAAGC,KAAI,EAAGC,SAASC,aAAY,EAAGC,YAAYC,kBAAiB,EAAGC,QAAQ,OAAM,EAAGC,aAAY,EAAGC,kBAAiB,EAAGC,cAAa,EAAGC,gBAAe,EAAG,GAAGC,MAAM,GAAGnB;IAChP,MAAMoB,UAAUC,IAAAA,qBAAK,EAAC;IACtB,MAAMC,SAASD,IAAAA,qBAAK,EAAC;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I;YACP,IAAInB,wBAAwBI,OAAO,EAAE;gBACjCJ,wBAAwBI,OAAO,GAAG,KAAK;gBACvClB;YACJ,CAAC;QACL;IACJ,GAAG;QACCA;KACH;IACD,OAAO;QACH4D,YAAY;YACRC,OAAOC,YAAK;YACZjB,MAAM;QACV;QACAgB,OAAOE,IAAAA,gCAAgB,EAAC;YACpBP,KAAKnE;YACL2E,WAAW9E;YACXwB;YACAlB,SAASC,iBAAiB,IAAI,IAAIA,iBAAiB,KAAK,IAAIA,eAAe,CAAC,CAAC;QACjF,GAAG;YACCwE,UAAU,IAAI;QAClB;QACApB,MAAMqB,IAAAA,qCAAqB,EAAC,OAAO;YAC/BnF,KAAKoF,IAAAA,6BAAa,EAACpF,KAAKsB,UAAUyC;YAClC7D;YACAmF,UAAU,CAAC;YACXC,MAAM;YACN,mBAAmBnE;YACnB,oBAAoBE;YACpB,GAAGH,IAAI;YACP,GAAG2C,YAAY;YACfM;YACAG;YACAC;QACJ;QACA7D;QACA6E,mBAAmB;QACnB5D;QACA1B;QACAI;QACAF;QACAqD;QACAlD;QACAkF,SAASlE;QACTT;QACAM;QACAE;IACJ;AACJ"}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useToastContainerContextValues_unstable", {
6
+ enumerable: true,
7
+ get: ()=>useToastContainerContextValues_unstable
8
+ });
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ function useToastContainerContextValues_unstable(state) {
12
+ const { close , intent , titleId , bodyId } = state;
13
+ const toastContainerContext = _react.useMemo(()=>({
14
+ close,
15
+ intent,
16
+ titleId,
17
+ bodyId
18
+ }), [
19
+ close,
20
+ intent,
21
+ titleId,
22
+ bodyId
23
+ ]);
24
+ return {
25
+ toast: toastContainerContext
26
+ };
27
+ }
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useToastContainerContextValues.js"],"sourcesContent":["import * as React from 'react';\nexport function useToastContainerContextValues_unstable(state) {\n const { close , intent , titleId , bodyId } = state;\n const toastContainerContext = React.useMemo(()=>({\n close,\n intent,\n titleId,\n bodyId\n }), [\n close,\n intent,\n titleId,\n bodyId\n ]);\n return {\n toast: toastContainerContext\n };\n}\n"],"names":["useToastContainerContextValues_unstable","state","close","intent","titleId","bodyId","toastContainerContext","React","useMemo","toast"],"mappings":";;;;+BACgBA;;aAAAA;;;6DADO;AAChB,SAASA,wCAAwCC,KAAK,EAAE;IAC3D,MAAM,EAAEC,MAAK,EAAGC,OAAM,EAAGC,QAAO,EAAGC,OAAM,EAAG,GAAGJ;IAC/C,MAAMK,wBAAwBC,OAAMC,OAAO,CAAC,IAAK,CAAA;YACzCN;YACAC;YACAC;YACAC;QACJ,CAAA,GAAI;QACJH;QACAC;QACAC;QACAC;KACH;IACD,OAAO;QACHI,OAAOH;IACX;AACJ"}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ toastClassNames: ()=>toastClassNames,
13
+ useToastContainerStyles_unstable: ()=>useToastContainerStyles_unstable
14
+ });
15
+ const _react = require("@griffel/react");
16
+ const toastClassNames = {
17
+ root: 'fui-ToastContainer',
18
+ timer: 'fui-ToastContainer__timer'
19
+ };
20
+ const useRootBaseClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("r1qaza64", "r1e6dlul", [
21
+ ".r1qaza64{box-sizing:border-box;margin-top:16px;min-height:44px;pointer-events:all;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);--fui-toast-height:44px;}",
22
+ ".r1qaza64[data-fui-focus-visible]{outline-width:var(--strokeWidthThick);outline-style:solid;outline-color:var(--colorStrokeFocus2);}",
23
+ ".r1e6dlul{box-sizing:border-box;margin-top:16px;min-height:44px;pointer-events:all;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);--fui-toast-height:44px;}",
24
+ ".r1e6dlul[data-fui-focus-visible]{outline-width:var(--strokeWidthThick);outline-style:solid;outline-color:var(--colorStrokeFocus2);}"
25
+ ]);
26
+ /**
27
+ * Styles for the root slot
28
+ */ const useStyles = /*#__PURE__*/ (0, _react["__styles"])({
29
+ enter: {
30
+ vin17d: "fayl5bc",
31
+ m1gqa9: "f17oyct0",
32
+ Bv12yb3: "fvv8lvk"
33
+ },
34
+ exit: {
35
+ vin17d: "f1tk3cza",
36
+ m1gqa9: "f1nx6yy9",
37
+ Bv12yb3: "f9wuypy"
38
+ }
39
+ }, {
40
+ d: [
41
+ ".fayl5bc{-webkit-animation-duration:200ms,400ms;animation-duration:200ms,400ms;}",
42
+ ".f17oyct0{-webkit-animation-delay:0ms,200ms;animation-delay:0ms,200ms;}",
43
+ ".fvv8lvk{-webkit-animation-name:f1rp83na,f5j8bii;animation-name:f1rp83na,f5j8bii;}",
44
+ ".f1tk3cza{-webkit-animation-duration:400ms,200ms;animation-duration:400ms,200ms;}",
45
+ ".f1nx6yy9{-webkit-animation-delay:0ms,400ms;animation-delay:0ms,400ms;}",
46
+ ".f9wuypy{-webkit-animation-name:fk0lfw7,f1n32sdh;animation-name:fk0lfw7,f1n32sdh;}"
47
+ ],
48
+ k: [
49
+ "@-webkit-keyframes f1rp83na{from{max-height:0;opacity:0;margin-top:0;}to{margin-top:16px;opacity:0;max-height:var(--fui-toast-height);}}",
50
+ "@keyframes f1rp83na{from{max-height:0;opacity:0;margin-top:0;}to{margin-top:16px;opacity:0;max-height:var(--fui-toast-height);}}",
51
+ "@-webkit-keyframes f5j8bii{from{opacity:0;}to{opacity:1;}}",
52
+ "@keyframes f5j8bii{from{opacity:0;}to{opacity:1;}}",
53
+ "@-webkit-keyframes fk0lfw7{from{opacity:1;}to{opacity:0;}}",
54
+ "@keyframes fk0lfw7{from{opacity:1;}to{opacity:0;}}",
55
+ "@-webkit-keyframes f1n32sdh{from{opacity:0;}to{opacity:0;margin-top:0;max-height:0;}}",
56
+ "@keyframes f1n32sdh{from{opacity:0;}to{opacity:0;margin-top:0;max-height:0;}}"
57
+ ]
58
+ });
59
+ const useToastContainerStyles_unstable = (state)=>{
60
+ const rootBaseClassName = useRootBaseClassName();
61
+ const styles = useStyles();
62
+ state.root.className = (0, _react.mergeClasses)(toastClassNames.root, rootBaseClassName, state.visible ? styles.enter : styles.exit, state.root.className);
63
+ return state;
64
+ }; //# sourceMappingURL=useToastContainerStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useToastContainerStyles.styles.js"],"sourcesContent":["import { __resetStyles, __styles, mergeClasses, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nexport const toastClassNames = {\n root: 'fui-ToastContainer',\n timer: 'fui-ToastContainer__timer'\n};\nconst useRootBaseClassName = /*#__PURE__*/__resetStyles(\"r1qaza64\", \"r1e6dlul\", [\".r1qaza64{box-sizing:border-box;margin-top:16px;min-height:44px;pointer-events:all;border-bottom-right-radius:var(--borderRadiusMedium);border-bottom-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);--fui-toast-height:44px;}\", \".r1qaza64[data-fui-focus-visible]{outline-width:var(--strokeWidthThick);outline-style:solid;outline-color:var(--colorStrokeFocus2);}\", \".r1e6dlul{box-sizing:border-box;margin-top:16px;min-height:44px;pointer-events:all;border-bottom-left-radius:var(--borderRadiusMedium);border-bottom-right-radius:var(--borderRadiusMedium);border-top-left-radius:var(--borderRadiusMedium);border-top-right-radius:var(--borderRadiusMedium);--fui-toast-height:44px;}\", \".r1e6dlul[data-fui-focus-visible]{outline-width:var(--strokeWidthThick);outline-style:solid;outline-color:var(--colorStrokeFocus2);}\"]);\n/**\n * Styles for the root slot\n */\nconst useStyles = /*#__PURE__*/__styles({\n enter: {\n vin17d: \"fayl5bc\",\n m1gqa9: \"f17oyct0\",\n Bv12yb3: \"fvv8lvk\"\n },\n exit: {\n vin17d: \"f1tk3cza\",\n m1gqa9: \"f1nx6yy9\",\n Bv12yb3: \"f9wuypy\"\n }\n}, {\n d: [\".fayl5bc{-webkit-animation-duration:200ms,400ms;animation-duration:200ms,400ms;}\", \".f17oyct0{-webkit-animation-delay:0ms,200ms;animation-delay:0ms,200ms;}\", \".fvv8lvk{-webkit-animation-name:f1rp83na,f5j8bii;animation-name:f1rp83na,f5j8bii;}\", \".f1tk3cza{-webkit-animation-duration:400ms,200ms;animation-duration:400ms,200ms;}\", \".f1nx6yy9{-webkit-animation-delay:0ms,400ms;animation-delay:0ms,400ms;}\", \".f9wuypy{-webkit-animation-name:fk0lfw7,f1n32sdh;animation-name:fk0lfw7,f1n32sdh;}\"],\n k: [\"@-webkit-keyframes f1rp83na{from{max-height:0;opacity:0;margin-top:0;}to{margin-top:16px;opacity:0;max-height:var(--fui-toast-height);}}\", \"@keyframes f1rp83na{from{max-height:0;opacity:0;margin-top:0;}to{margin-top:16px;opacity:0;max-height:var(--fui-toast-height);}}\", \"@-webkit-keyframes f5j8bii{from{opacity:0;}to{opacity:1;}}\", \"@keyframes f5j8bii{from{opacity:0;}to{opacity:1;}}\", \"@-webkit-keyframes fk0lfw7{from{opacity:1;}to{opacity:0;}}\", \"@keyframes fk0lfw7{from{opacity:1;}to{opacity:0;}}\", \"@-webkit-keyframes f1n32sdh{from{opacity:0;}to{opacity:0;margin-top:0;max-height:0;}}\", \"@keyframes f1n32sdh{from{opacity:0;}to{opacity:0;margin-top:0;max-height:0;}}\"]\n});\n/**\n * Apply styling to the ToastContainer slots based on the state\n */\nexport const useToastContainerStyles_unstable = state => {\n const rootBaseClassName = useRootBaseClassName();\n const styles = useStyles();\n state.root.className = mergeClasses(toastClassNames.root, rootBaseClassName, state.visible ? styles.enter : styles.exit, state.root.className);\n return state;\n};\n//# sourceMappingURL=useToastContainerStyles.styles.js.map"],"names":["toastClassNames","useToastContainerStyles_unstable","root","timer","useRootBaseClassName","__resetStyles","useStyles","__styles","enter","vin17d","m1gqa9","Bv12yb3","exit","d","k","state","rootBaseClassName","styles","className","mergeClasses","visible"],"mappings":";;;;;;;;;;;IAGaA,eAAe,MAAfA;IA0BAC,gCAAgC,MAAhCA;;uBA7BqD;AAG3D,MAAMD,kBAAkB;IAC7BE,MAAM;IACNC,OAAO;AACT;AACA,MAAMC,uBAAuB,WAAW,GAAEC,IAAAA,uBAAa,EAAC,YAAY,YAAY;IAAC;IAA4T;IAAwI;IAA4T;CAAuI;AACx9B;;CAEC,GACD,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCC,OAAO;QACLC,QAAQ;QACRC,QAAQ;QACRC,SAAS;IACX;IACAC,MAAM;QACJH,QAAQ;QACRC,QAAQ;QACRC,SAAS;IACX;AACF,GAAG;IACDE,GAAG;QAAC;QAAoF;QAA2E;QAAsF;QAAqF;QAA2E;KAAqF;IAC9eC,GAAG;QAAC;QAA4I;QAAoI;QAA8D;QAAsD;QAA8D;QAAsD;QAAyF;KAAgF;AACvqB;AAIO,MAAMb,mCAAmCc,CAAAA,QAAS;IACvD,MAAMC,oBAAoBZ;IAC1B,MAAMa,SAASX;IACfS,MAAMb,IAAI,CAACgB,SAAS,GAAGC,IAAAA,mBAAY,EAACnB,gBAAgBE,IAAI,EAAEc,mBAAmBD,MAAMK,OAAO,GAAGH,OAAOT,KAAK,GAAGS,OAAOL,IAAI,EAAEG,MAAMb,IAAI,CAACgB,SAAS;IAC7I,OAAOH;AACT,GACA,0DAA0D"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "ToastFooter", {
6
+ enumerable: true,
7
+ get: ()=>ToastFooter
8
+ });
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _useToastFooter = require("./useToastFooter");
12
+ const _renderToastFooter = require("./renderToastFooter");
13
+ const _useToastFooterStylesStyles = require("./useToastFooterStyles.styles");
14
+ const ToastFooter = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
15
+ const state = (0, _useToastFooter.useToastFooter_unstable)(props, ref);
16
+ (0, _useToastFooterStylesStyles.useToastFooterStyles_unstable)(state);
17
+ return (0, _renderToastFooter.renderToastFooter_unstable)(state);
18
+ });
19
+ ToastFooter.displayName = 'ToastFooter';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ToastFooter.js"],"sourcesContent":["import * as React from 'react';\nimport { useToastFooter_unstable } from './useToastFooter';\nimport { renderToastFooter_unstable } from './renderToastFooter';\nimport { useToastFooterStyles_unstable } from './useToastFooterStyles.styles';\n/**\n * ToastFooter component\n */ export const ToastFooter = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useToastFooter_unstable(props, ref);\n useToastFooterStyles_unstable(state);\n return renderToastFooter_unstable(state);\n});\nToastFooter.displayName = 'ToastFooter';\n"],"names":["ToastFooter","React","forwardRef","props","ref","state","useToastFooter_unstable","useToastFooterStyles_unstable","renderToastFooter_unstable","displayName"],"mappings":";;;;+BAMiBA;;aAAAA;;;6DANM;gCACiB;mCACG;4CACG;AAGnC,MAAMA,cAAc,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IACxE,MAAMC,QAAQC,IAAAA,uCAAuB,EAACH,OAAOC;IAC7CG,IAAAA,yDAA6B,EAACF;IAC9B,OAAOG,IAAAA,6CAA0B,EAACH;AACtC;AACAL,YAAYS,WAAW,GAAG"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":""}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
+ _exportStar(require("./ToastFooter"), exports);
7
+ _exportStar(require("./ToastFooter.types"), exports);
8
+ _exportStar(require("./renderToastFooter"), exports);
9
+ _exportStar(require("./useToastFooter"), exports);
10
+ _exportStar(require("./useToastFooterStyles.styles"), exports);
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './ToastFooter';\nexport * from './ToastFooter.types';\nexport * from './renderToastFooter';\nexport * from './useToastFooter';\nexport * from './useToastFooterStyles.styles';\n"],"names":[],"mappings":";;;;;oBAAc;oBACA;oBACA;oBACA;oBACA"}
@@ -0,0 +1,14 @@
1
+ /** @jsxRuntime classic */ /** @jsx createElement */ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderToastFooter_unstable", {
6
+ enumerable: true,
7
+ get: ()=>renderToastFooter_unstable
8
+ });
9
+ const _reactJsxRuntime = require("@fluentui/react-jsx-runtime");
10
+ const _reactUtilities = require("@fluentui/react-utilities");
11
+ const renderToastFooter_unstable = (state)=>{
12
+ const { slots , slotProps } = (0, _reactUtilities.getSlotsNext)(state);
13
+ return /*#__PURE__*/ (0, _reactJsxRuntime.createElement)(slots.root, slotProps.root);
14
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["renderToastFooter.js"],"sourcesContent":["/** @jsxRuntime classic */ /** @jsx createElement */ import { createElement } from '@fluentui/react-jsx-runtime';\nimport { getSlotsNext } from '@fluentui/react-utilities';\n/**\n * Render the final JSX of ToastFooter\n */ export const renderToastFooter_unstable = (state)=>{\n const { slots , slotProps } = getSlotsNext(state);\n return /*#__PURE__*/ createElement(slots.root, slotProps.root);\n};\n"],"names":["renderToastFooter_unstable","state","slots","slotProps","getSlotsNext","createElement","root"],"mappings":"AAAA,wBAAwB,GAAG,uBAAuB;;;;+BAIjCA;;aAAAA;;iCAJkE;gCACtD;AAGlB,MAAMA,6BAA6B,CAACC,QAAQ;IACnD,MAAM,EAAEC,MAAK,EAAGC,UAAS,EAAG,GAAGC,IAAAA,4BAAY,EAACH;IAC5C,OAAO,WAAW,GAAGI,IAAAA,8BAAa,EAACH,MAAMI,IAAI,EAAEH,UAAUG,IAAI;AACjE"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useToastFooter_unstable", {
6
+ enumerable: true,
7
+ get: ()=>useToastFooter_unstable
8
+ });
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _reactUtilities = require("@fluentui/react-utilities");
12
+ const useToastFooter_unstable = (props, ref)=>{
13
+ return {
14
+ components: {
15
+ root: 'div'
16
+ },
17
+ root: (0, _reactUtilities.getNativeElementProps)('div', {
18
+ ref,
19
+ ...props
20
+ })
21
+ };
22
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useToastFooter.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps } from '@fluentui/react-utilities';\n/**\n * Create the state required to render ToastFooter.\n *\n * The returned state can be modified with hooks such as useToastFooterStyles_unstable,\n * before being passed to renderToastFooter_unstable.\n *\n * @param props - props from this instance of ToastFooter\n * @param ref - reference to root HTMLElement of ToastFooter\n */ export const useToastFooter_unstable = (props, ref)=>{\n return {\n components: {\n root: 'div'\n },\n root: getNativeElementProps('div', {\n ref,\n ...props\n })\n };\n};\n"],"names":["useToastFooter_unstable","props","ref","components","root","getNativeElementProps"],"mappings":";;;;+BAUiBA;;aAAAA;;;6DAVM;gCACe;AAS3B,MAAMA,0BAA0B,CAACC,OAAOC,MAAM;IACrD,OAAO;QACHC,YAAY;YACRC,MAAM;QACV;QACAA,MAAMC,IAAAA,qCAAqB,EAAC,OAAO;YAC/BH;YACA,GAAGD,KAAK;QACZ;IACJ;AACJ"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ toastFooterClassNames: ()=>toastFooterClassNames,
13
+ useToastFooterStyles_unstable: ()=>useToastFooterStyles_unstable
14
+ });
15
+ const _react = require("@griffel/react");
16
+ const toastFooterClassNames = {
17
+ root: 'fui-ToastFooter'
18
+ };
19
+ /**
20
+ * Styles for the root slot
21
+ */ const useRootBaseClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("r1u6izx1", null, [
22
+ ".r1u6izx1{padding-top:16px;-ms-grid-column:2;grid-column-start:2;-ms-grid-row-span:1;grid-column-end:3;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-column-gap:14px;column-gap:14px;row-gap:14px;}"
23
+ ]);
24
+ const useToastFooterStyles_unstable = (state)=>{
25
+ const rootBaseClassName = useRootBaseClassName();
26
+ state.root.className = (0, _react.mergeClasses)(toastFooterClassNames.root, rootBaseClassName, state.root.className);
27
+ return state;
28
+ }; //# sourceMappingURL=useToastFooterStyles.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["useToastFooterStyles.styles.js"],"sourcesContent":["import { __resetStyles, mergeClasses, shorthands } from '@griffel/react';\nexport const toastFooterClassNames = {\n root: 'fui-ToastFooter'\n};\n/**\n * Styles for the root slot\n */\nconst useRootBaseClassName = /*#__PURE__*/__resetStyles(\"r1u6izx1\", null, [\".r1u6izx1{padding-top:16px;-ms-grid-column:2;grid-column-start:2;-ms-grid-row-span:1;grid-column-end:3;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-column-gap:14px;column-gap:14px;row-gap:14px;}\"]);\n/**\n * Apply styling to the ToastFooter slots based on the state\n */\nexport const useToastFooterStyles_unstable = state => {\n const rootBaseClassName = useRootBaseClassName();\n state.root.className = mergeClasses(toastFooterClassNames.root, rootBaseClassName, state.root.className);\n return state;\n};\n//# sourceMappingURL=useToastFooterStyles.styles.js.map"],"names":["toastFooterClassNames","useToastFooterStyles_unstable","root","useRootBaseClassName","__resetStyles","state","rootBaseClassName","className","mergeClasses"],"mappings":";;;;;;;;;;;IACaA,qBAAqB,MAArBA;IAUAC,6BAA6B,MAA7BA;;uBAX2C;AACjD,MAAMD,wBAAwB;IACnCE,MAAM;AACR;AACA;;CAEC,GACD,MAAMC,uBAAuB,WAAW,GAAEC,IAAAA,uBAAa,EAAC,YAAY,IAAI,EAAE;IAAC;CAAuU;AAI3Y,MAAMH,gCAAgCI,CAAAA,QAAS;IACpD,MAAMC,oBAAoBH;IAC1BE,MAAMH,IAAI,CAACK,SAAS,GAAGC,IAAAA,mBAAY,EAACR,sBAAsBE,IAAI,EAAEI,mBAAmBD,MAAMH,IAAI,CAACK,SAAS;IACvG,OAAOF;AACT,GACA,uDAAuD"}
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "ToastTitle", {
6
+ enumerable: true,
7
+ get: ()=>ToastTitle
8
+ });
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _useToastTitle = require("./useToastTitle");
12
+ const _renderToastTitle = require("./renderToastTitle");
13
+ const _useToastTitleStylesStyles = require("./useToastTitleStyles.styles");
14
+ const ToastTitle = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
15
+ const state = (0, _useToastTitle.useToastTitle_unstable)(props, ref);
16
+ (0, _useToastTitleStylesStyles.useToastTitleStyles_unstable)(state);
17
+ return (0, _renderToastTitle.renderToastTitle_unstable)(state);
18
+ });
19
+ ToastTitle.displayName = 'ToastTitle';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["ToastTitle.js"],"sourcesContent":["import * as React from 'react';\nimport { useToastTitle_unstable } from './useToastTitle';\nimport { renderToastTitle_unstable } from './renderToastTitle';\nimport { useToastTitleStyles_unstable } from './useToastTitleStyles.styles';\n/**\n * ToastTitle component\n */ export const ToastTitle = /*#__PURE__*/ React.forwardRef((props, ref)=>{\n const state = useToastTitle_unstable(props, ref);\n useToastTitleStyles_unstable(state);\n return renderToastTitle_unstable(state);\n});\nToastTitle.displayName = 'ToastTitle';\n"],"names":["ToastTitle","React","forwardRef","props","ref","state","useToastTitle_unstable","useToastTitleStyles_unstable","renderToastTitle_unstable","displayName"],"mappings":";;;;+BAMiBA;;aAAAA;;;6DANM;+BACgB;kCACG;2CACG;AAGlC,MAAMA,aAAa,WAAW,GAAGC,OAAMC,UAAU,CAAC,CAACC,OAAOC,MAAM;IACvE,MAAMC,QAAQC,IAAAA,qCAAsB,EAACH,OAAOC;IAC5CG,IAAAA,uDAA4B,EAACF;IAC7B,OAAOG,IAAAA,2CAAyB,EAACH;AACrC;AACAL,WAAWS,WAAW,GAAG"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });