@fluentui/react-toast 9.8.1 → 9.8.2
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.
- package/CHANGELOG.md +21 -2
- package/dist/index.d.cts +640 -0
- package/lib/AriaLive.js +1 -1
- package/lib/AriaLive.js.map +1 -1
- package/lib/Toast.js +1 -1
- package/lib/Toast.js.map +1 -1
- package/lib/ToastBody.js +1 -1
- package/lib/ToastBody.js.map +1 -1
- package/lib/ToastContainer.js +1 -1
- package/lib/ToastContainer.js.map +1 -1
- package/lib/ToastFooter.js +1 -1
- package/lib/ToastFooter.js.map +1 -1
- package/lib/ToastTitle.js +1 -1
- package/lib/ToastTitle.js.map +1 -1
- package/lib/ToastTrigger.js +1 -1
- package/lib/ToastTrigger.js.map +1 -1
- package/lib/Toaster.js +1 -1
- package/lib/Toaster.js.map +1 -1
- package/lib/components/AriaLive/AriaLive.js +3 -3
- package/lib/components/AriaLive/AriaLive.js.map +1 -1
- package/lib/components/AriaLive/index.js +4 -4
- package/lib/components/AriaLive/index.js.map +1 -1
- package/lib/components/AriaLive/renderAriaLive.js +1 -1
- package/lib/components/AriaLive/useAriaLive.js +2 -2
- package/lib/components/AriaLive/useAriaLiveStyles.styles.js +1 -1
- package/lib/components/AriaLive/useAriaLiveStyles.styles.js.map +1 -1
- package/lib/components/AriaLive/useAriaLiveStyles.styles.raw.js +1 -1
- package/lib/components/Timer/Timer.js +2 -2
- package/lib/components/Timer/Timer.js.map +1 -1
- package/lib/components/Timer/index.js +1 -1
- package/lib/components/Timer/index.js.map +1 -1
- package/lib/components/Timer/useTimerStyles.styles.js +1 -1
- package/lib/components/Timer/useTimerStyles.styles.js.map +1 -1
- package/lib/components/Timer/useTimerStyles.styles.raw.js +1 -1
- package/lib/components/Toast/Toast.js +6 -6
- package/lib/components/Toast/Toast.js.map +1 -1
- package/lib/components/Toast/index.js +4 -4
- package/lib/components/Toast/index.js.map +1 -1
- package/lib/components/Toast/renderToast.js +2 -2
- package/lib/components/Toast/useToast.js +2 -2
- package/lib/components/Toast/useToast.js.map +1 -1
- package/lib/components/Toast/useToastStyles.styles.js +2 -2
- package/lib/components/Toast/useToastStyles.styles.js.map +1 -1
- package/lib/components/Toast/useToastStyles.styles.raw.js +2 -2
- package/lib/components/ToastBody/ToastBody.js +5 -5
- package/lib/components/ToastBody/ToastBody.js.map +1 -1
- package/lib/components/ToastBody/index.js +4 -4
- package/lib/components/ToastBody/index.js.map +1 -1
- package/lib/components/ToastBody/renderToastBody.js +1 -1
- package/lib/components/ToastBody/useToastBody.js +3 -3
- package/lib/components/ToastBody/useToastBody.js.map +1 -1
- package/lib/components/ToastBody/useToastBodyStyles.styles.js +2 -2
- package/lib/components/ToastBody/useToastBodyStyles.styles.js.map +1 -1
- package/lib/components/ToastBody/useToastBodyStyles.styles.raw.js +2 -2
- package/lib/components/ToastContainer/ToastContainer.js +6 -6
- package/lib/components/ToastContainer/ToastContainer.js.map +1 -1
- package/lib/components/ToastContainer/index.js +5 -5
- package/lib/components/ToastContainer/index.js.map +1 -1
- package/lib/components/ToastContainer/renderToastContainer.js +3 -3
- package/lib/components/ToastContainer/renderToastContainer.js.map +1 -1
- package/lib/components/ToastContainer/useToastContainer.js +6 -6
- package/lib/components/ToastContainer/useToastContainer.js.map +1 -1
- package/lib/components/ToastContainer/useToastContainerContextValues.js +1 -1
- package/lib/components/ToastContainer/useToastContainerStyles.styles.js +3 -3
- package/lib/components/ToastContainer/useToastContainerStyles.styles.js.map +1 -1
- package/lib/components/ToastContainer/useToastContainerStyles.styles.raw.js +3 -3
- package/lib/components/ToastFooter/ToastFooter.js +5 -5
- package/lib/components/ToastFooter/ToastFooter.js.map +1 -1
- package/lib/components/ToastFooter/index.js +4 -4
- package/lib/components/ToastFooter/index.js.map +1 -1
- package/lib/components/ToastFooter/renderToastFooter.js +1 -1
- package/lib/components/ToastFooter/useToastFooter.js +1 -1
- package/lib/components/ToastFooter/useToastFooterStyles.styles.js +1 -1
- package/lib/components/ToastFooter/useToastFooterStyles.styles.js.map +1 -1
- package/lib/components/ToastFooter/useToastFooterStyles.styles.raw.js +1 -1
- package/lib/components/ToastTitle/ToastTitle.js +5 -5
- package/lib/components/ToastTitle/ToastTitle.js.map +1 -1
- package/lib/components/ToastTitle/index.js +4 -4
- package/lib/components/ToastTitle/index.js.map +1 -1
- package/lib/components/ToastTitle/renderToastTitle.js +1 -1
- package/lib/components/ToastTitle/useToastTitle.js +5 -5
- package/lib/components/ToastTitle/useToastTitle.js.map +1 -1
- package/lib/components/ToastTitle/useToastTitleStyles.styles.js +2 -2
- package/lib/components/ToastTitle/useToastTitleStyles.styles.js.map +1 -1
- package/lib/components/ToastTitle/useToastTitleStyles.styles.raw.js +2 -2
- package/lib/components/ToastTrigger/ToastTrigger.js +2 -2
- package/lib/components/ToastTrigger/ToastTrigger.js.map +1 -1
- package/lib/components/ToastTrigger/index.js +3 -3
- package/lib/components/ToastTrigger/index.js.map +1 -1
- package/lib/components/ToastTrigger/useToastTrigger.js +3 -3
- package/lib/components/ToastTrigger/useToastTrigger.js.map +1 -1
- package/lib/components/Toaster/Toaster.js +4 -4
- package/lib/components/Toaster/Toaster.js.map +1 -1
- package/lib/components/Toaster/index.js +5 -5
- package/lib/components/Toaster/index.js.map +1 -1
- package/lib/components/Toaster/renderToaster.js +3 -3
- package/lib/components/Toaster/renderToaster.js.map +1 -1
- package/lib/components/Toaster/useToastAnnounce.js +2 -2
- package/lib/components/Toaster/useToaster.js +9 -9
- package/lib/components/Toaster/useToaster.js.map +1 -1
- package/lib/components/Toaster/useToasterFocusManagement.js +5 -5
- package/lib/components/Toaster/useToasterFocusManagement.js.map +1 -1
- package/lib/components/Toaster/useToasterStyles.styles.js +2 -2
- package/lib/components/Toaster/useToasterStyles.styles.js.map +1 -1
- package/lib/components/Toaster/useToasterStyles.styles.raw.js +2 -2
- package/lib/components/Toaster/useToasterStyles.styles.raw.js.map +1 -1
- package/lib/contexts/toastContainerContext.js +1 -1
- package/lib/index.js +10 -10
- package/lib/index.js.map +1 -1
- package/lib/state/index.js +4 -4
- package/lib/state/index.js.map +1 -1
- package/lib/state/useToastController.js +3 -3
- package/lib/state/useToastController.js.map +1 -1
- package/lib/state/useToaster.js +5 -5
- package/lib/state/useToaster.js.map +1 -1
- package/lib/state/vanilla/createToaster.js +2 -2
- package/lib/state/vanilla/dismissAllToasts.js +1 -1
- package/lib/state/vanilla/dismissAllToasts.js.map +1 -1
- package/lib/state/vanilla/dismissToast.js +1 -1
- package/lib/state/vanilla/dismissToast.js.map +1 -1
- package/lib/state/vanilla/dispatchToast.js +1 -1
- package/lib/state/vanilla/dispatchToast.js.map +1 -1
- package/lib/state/vanilla/index.js +8 -8
- package/lib/state/vanilla/index.js.map +1 -1
- package/lib/state/vanilla/pauseToast.js +1 -1
- package/lib/state/vanilla/pauseToast.js.map +1 -1
- package/lib/state/vanilla/playToast.js +1 -1
- package/lib/state/vanilla/playToast.js.map +1 -1
- package/lib/state/vanilla/updateToast.js +1 -1
- package/lib/state/vanilla/updateToast.js.map +1 -1
- package/lib-commonjs/{AriaLive.js → AriaLive.cjs} +1 -1
- package/lib-commonjs/{AriaLive.js.map → AriaLive.cjs.map} +1 -1
- package/lib-commonjs/{Toast.js → Toast.cjs} +1 -1
- package/lib-commonjs/{Toast.js.map → Toast.cjs.map} +1 -1
- package/lib-commonjs/{ToastBody.js → ToastBody.cjs} +1 -1
- package/lib-commonjs/{ToastBody.js.map → ToastBody.cjs.map} +1 -1
- package/lib-commonjs/{ToastContainer.js → ToastContainer.cjs} +1 -1
- package/lib-commonjs/{ToastContainer.js.map → ToastContainer.cjs.map} +1 -1
- package/lib-commonjs/{ToastFooter.js → ToastFooter.cjs} +1 -1
- package/lib-commonjs/{ToastFooter.js.map → ToastFooter.cjs.map} +1 -1
- package/lib-commonjs/{ToastTitle.js → ToastTitle.cjs} +1 -1
- package/lib-commonjs/{ToastTitle.js.map → ToastTitle.cjs.map} +1 -1
- package/lib-commonjs/{ToastTrigger.js → ToastTrigger.cjs} +1 -1
- package/lib-commonjs/{ToastTrigger.js.map → ToastTrigger.cjs.map} +1 -1
- package/lib-commonjs/{Toaster.js → Toaster.cjs} +1 -1
- package/lib-commonjs/{Toaster.js.map → Toaster.cjs.map} +1 -1
- package/lib-commonjs/components/AriaLive/{AriaLive.js → AriaLive.cjs} +3 -3
- package/lib-commonjs/components/AriaLive/{AriaLive.js.map → AriaLive.cjs.map} +1 -1
- package/lib-commonjs/components/AriaLive/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/AriaLive/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/Timer/{Timer.js → Timer.cjs} +1 -1
- package/lib-commonjs/components/Timer/{Timer.js.map → Timer.cjs.map} +1 -1
- package/lib-commonjs/components/Timer/{index.js → index.cjs} +1 -1
- package/lib-commonjs/components/Timer/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/Timer/useTimerStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/Toast/{Toast.js → Toast.cjs} +4 -4
- package/lib-commonjs/components/Toast/{Toast.js.map → Toast.cjs.map} +1 -1
- package/lib-commonjs/components/Toast/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/Toast/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/Toast/{useToast.js → useToast.cjs} +1 -1
- package/lib-commonjs/components/Toast/{useToast.js.map → useToast.cjs.map} +1 -1
- package/lib-commonjs/components/Toast/useToastStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/ToastBody/{ToastBody.js → ToastBody.cjs} +3 -3
- package/lib-commonjs/components/ToastBody/{ToastBody.js.map → ToastBody.cjs.map} +1 -1
- package/lib-commonjs/components/ToastBody/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/ToastBody/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/ToastBody/{useToastBody.js → useToastBody.cjs} +1 -1
- package/lib-commonjs/components/ToastBody/{useToastBody.js.map → useToastBody.cjs.map} +1 -1
- package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/ToastContainer/{ToastContainer.js → ToastContainer.cjs} +4 -4
- package/lib-commonjs/components/ToastContainer/{ToastContainer.js.map → ToastContainer.cjs.map} +1 -1
- package/lib-commonjs/components/ToastContainer/{index.js → index.cjs} +5 -5
- package/lib-commonjs/components/ToastContainer/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/ToastContainer/{renderToastContainer.js → renderToastContainer.cjs} +1 -1
- package/lib-commonjs/components/ToastContainer/{renderToastContainer.js.map → renderToastContainer.cjs.map} +1 -1
- package/lib-commonjs/components/ToastContainer/{useToastContainer.js → useToastContainer.cjs} +1 -1
- package/lib-commonjs/components/ToastContainer/{useToastContainer.js.map → useToastContainer.cjs.map} +1 -1
- package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/ToastFooter/{ToastFooter.js → ToastFooter.cjs} +3 -3
- package/lib-commonjs/components/ToastFooter/{ToastFooter.js.map → ToastFooter.cjs.map} +1 -1
- package/lib-commonjs/components/ToastFooter/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/ToastFooter/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/ToastTitle/{ToastTitle.js → ToastTitle.cjs} +3 -3
- package/lib-commonjs/components/ToastTitle/{ToastTitle.js.map → ToastTitle.cjs.map} +1 -1
- package/lib-commonjs/components/ToastTitle/{index.js → index.cjs} +4 -4
- package/lib-commonjs/components/ToastTitle/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/ToastTitle/{useToastTitle.js → useToastTitle.cjs} +1 -1
- package/lib-commonjs/components/ToastTitle/{useToastTitle.js.map → useToastTitle.cjs.map} +1 -1
- package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/ToastTrigger/{ToastTrigger.js → ToastTrigger.cjs} +2 -2
- package/lib-commonjs/components/ToastTrigger/{ToastTrigger.js.map → ToastTrigger.cjs.map} +1 -1
- package/lib-commonjs/components/ToastTrigger/{index.js → index.cjs} +3 -3
- package/lib-commonjs/components/ToastTrigger/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/ToastTrigger/{useToastTrigger.js → useToastTrigger.cjs} +1 -1
- package/lib-commonjs/components/ToastTrigger/{useToastTrigger.js.map → useToastTrigger.cjs.map} +1 -1
- package/lib-commonjs/components/Toaster/{Toaster.js → Toaster.cjs} +3 -3
- package/lib-commonjs/components/Toaster/{Toaster.js.map → Toaster.cjs.map} +1 -1
- package/lib-commonjs/components/Toaster/{index.js → index.cjs} +5 -5
- package/lib-commonjs/components/Toaster/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/components/Toaster/{renderToaster.js → renderToaster.cjs} +2 -2
- package/lib-commonjs/components/Toaster/{renderToaster.js.map → renderToaster.cjs.map} +1 -1
- package/lib-commonjs/components/Toaster/{useToaster.js → useToaster.cjs} +12 -12
- package/lib-commonjs/components/Toaster/{useToaster.js.map → useToaster.cjs.map} +1 -1
- package/lib-commonjs/components/Toaster/{useToasterFocusManagement.js → useToasterFocusManagement.cjs} +2 -2
- package/lib-commonjs/components/Toaster/{useToasterFocusManagement.js.map → useToasterFocusManagement.cjs.map} +1 -1
- package/lib-commonjs/components/Toaster/{useToasterStyles.styles.js → useToasterStyles.styles.cjs} +1 -1
- package/lib-commonjs/components/Toaster/useToasterStyles.styles.cjs.map +1 -0
- package/lib-commonjs/components/Toaster/{useToasterStyles.styles.raw.js → useToasterStyles.styles.raw.cjs} +1 -1
- package/lib-commonjs/components/Toaster/{useToasterStyles.styles.raw.js.map → useToasterStyles.styles.raw.cjs.map} +1 -1
- package/lib-commonjs/{index.js → index.cjs} +11 -11
- package/lib-commonjs/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/state/{index.js → index.cjs} +5 -5
- package/lib-commonjs/state/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/state/{useToastController.js → useToastController.cjs} +7 -7
- package/lib-commonjs/state/{useToastController.js.map → useToastController.cjs.map} +1 -1
- package/lib-commonjs/state/{useToaster.js → useToaster.cjs} +3 -3
- package/lib-commonjs/state/{useToaster.js.map → useToaster.cjs.map} +1 -1
- package/lib-commonjs/state/vanilla/{dismissAllToasts.js → dismissAllToasts.cjs} +1 -1
- package/lib-commonjs/state/vanilla/{dismissAllToasts.js.map → dismissAllToasts.cjs.map} +1 -1
- package/lib-commonjs/state/vanilla/{dismissToast.js → dismissToast.cjs} +1 -1
- package/lib-commonjs/state/vanilla/{dismissToast.js.map → dismissToast.cjs.map} +1 -1
- package/lib-commonjs/state/vanilla/{dispatchToast.js → dispatchToast.cjs} +1 -1
- package/lib-commonjs/state/vanilla/{dispatchToast.js.map → dispatchToast.cjs.map} +1 -1
- package/lib-commonjs/state/vanilla/{index.js → index.cjs} +8 -8
- package/lib-commonjs/state/vanilla/{index.js.map → index.cjs.map} +1 -1
- package/lib-commonjs/state/vanilla/{pauseToast.js → pauseToast.cjs} +1 -1
- package/lib-commonjs/state/vanilla/{pauseToast.js.map → pauseToast.cjs.map} +1 -1
- package/lib-commonjs/state/vanilla/{playToast.js → playToast.cjs} +1 -1
- package/lib-commonjs/state/vanilla/{playToast.js.map → playToast.cjs.map} +1 -1
- package/lib-commonjs/state/vanilla/{updateToast.js → updateToast.cjs} +1 -1
- package/lib-commonjs/state/vanilla/{updateToast.js.map → updateToast.cjs.map} +1 -1
- package/package.json +23 -17
- package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.js.map +0 -1
- package/lib-commonjs/components/Timer/useTimerStyles.styles.js.map +0 -1
- package/lib-commonjs/components/Toast/useToastStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.js.map +0 -1
- package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.js.map +0 -1
- package/lib-commonjs/components/Toaster/useToasterStyles.styles.js.map +0 -1
- /package/lib-commonjs/components/AriaLive/{AriaLive.types.js → AriaLive.types.cjs} +0 -0
- /package/lib-commonjs/components/AriaLive/{AriaLive.types.js.map → AriaLive.types.cjs.map} +0 -0
- /package/lib-commonjs/components/AriaLive/{renderAriaLive.js → renderAriaLive.cjs} +0 -0
- /package/lib-commonjs/components/AriaLive/{renderAriaLive.js.map → renderAriaLive.cjs.map} +0 -0
- /package/lib-commonjs/components/AriaLive/{useAriaLive.js → useAriaLive.cjs} +0 -0
- /package/lib-commonjs/components/AriaLive/{useAriaLive.js.map → useAriaLive.cjs.map} +0 -0
- /package/lib-commonjs/components/AriaLive/{useAriaLiveStyles.styles.js → useAriaLiveStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/AriaLive/{useAriaLiveStyles.styles.raw.js → useAriaLiveStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/AriaLive/{useAriaLiveStyles.styles.raw.js.map → useAriaLiveStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/Timer/{useTimerStyles.styles.js → useTimerStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/Timer/{useTimerStyles.styles.raw.js → useTimerStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/Timer/{useTimerStyles.styles.raw.js.map → useTimerStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/Toast/{Toast.types.js → Toast.types.cjs} +0 -0
- /package/lib-commonjs/components/Toast/{Toast.types.js.map → Toast.types.cjs.map} +0 -0
- /package/lib-commonjs/components/Toast/{renderToast.js → renderToast.cjs} +0 -0
- /package/lib-commonjs/components/Toast/{renderToast.js.map → renderToast.cjs.map} +0 -0
- /package/lib-commonjs/components/Toast/{useToastContextValues.js → useToastContextValues.cjs} +0 -0
- /package/lib-commonjs/components/Toast/{useToastContextValues.js.map → useToastContextValues.cjs.map} +0 -0
- /package/lib-commonjs/components/Toast/{useToastStyles.styles.js → useToastStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/Toast/{useToastStyles.styles.raw.js → useToastStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/Toast/{useToastStyles.styles.raw.js.map → useToastStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/ToastBody/{ToastBody.types.js → ToastBody.types.cjs} +0 -0
- /package/lib-commonjs/components/ToastBody/{ToastBody.types.js.map → ToastBody.types.cjs.map} +0 -0
- /package/lib-commonjs/components/ToastBody/{renderToastBody.js → renderToastBody.cjs} +0 -0
- /package/lib-commonjs/components/ToastBody/{renderToastBody.js.map → renderToastBody.cjs.map} +0 -0
- /package/lib-commonjs/components/ToastBody/{useToastBodyStyles.styles.js → useToastBodyStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/ToastBody/{useToastBodyStyles.styles.raw.js → useToastBodyStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/ToastBody/{useToastBodyStyles.styles.raw.js.map → useToastBodyStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/ToastContainer/{ToastContainer.types.js → ToastContainer.types.cjs} +0 -0
- /package/lib-commonjs/components/ToastContainer/{ToastContainer.types.js.map → ToastContainer.types.cjs.map} +0 -0
- /package/lib-commonjs/components/ToastContainer/{useToastContainerContextValues.js → useToastContainerContextValues.cjs} +0 -0
- /package/lib-commonjs/components/ToastContainer/{useToastContainerContextValues.js.map → useToastContainerContextValues.cjs.map} +0 -0
- /package/lib-commonjs/components/ToastContainer/{useToastContainerStyles.styles.js → useToastContainerStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/ToastContainer/{useToastContainerStyles.styles.raw.js → useToastContainerStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/ToastContainer/{useToastContainerStyles.styles.raw.js.map → useToastContainerStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/ToastFooter/{ToastFooter.types.js → ToastFooter.types.cjs} +0 -0
- /package/lib-commonjs/components/ToastFooter/{ToastFooter.types.js.map → ToastFooter.types.cjs.map} +0 -0
- /package/lib-commonjs/components/ToastFooter/{renderToastFooter.js → renderToastFooter.cjs} +0 -0
- /package/lib-commonjs/components/ToastFooter/{renderToastFooter.js.map → renderToastFooter.cjs.map} +0 -0
- /package/lib-commonjs/components/ToastFooter/{useToastFooter.js → useToastFooter.cjs} +0 -0
- /package/lib-commonjs/components/ToastFooter/{useToastFooter.js.map → useToastFooter.cjs.map} +0 -0
- /package/lib-commonjs/components/ToastFooter/{useToastFooterStyles.styles.js → useToastFooterStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/ToastFooter/{useToastFooterStyles.styles.raw.js → useToastFooterStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/ToastFooter/{useToastFooterStyles.styles.raw.js.map → useToastFooterStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/ToastTitle/{ToastTitle.types.js → ToastTitle.types.cjs} +0 -0
- /package/lib-commonjs/components/ToastTitle/{ToastTitle.types.js.map → ToastTitle.types.cjs.map} +0 -0
- /package/lib-commonjs/components/ToastTitle/{renderToastTitle.js → renderToastTitle.cjs} +0 -0
- /package/lib-commonjs/components/ToastTitle/{renderToastTitle.js.map → renderToastTitle.cjs.map} +0 -0
- /package/lib-commonjs/components/ToastTitle/{useToastTitleStyles.styles.js → useToastTitleStyles.styles.cjs} +0 -0
- /package/lib-commonjs/components/ToastTitle/{useToastTitleStyles.styles.raw.js → useToastTitleStyles.styles.raw.cjs} +0 -0
- /package/lib-commonjs/components/ToastTitle/{useToastTitleStyles.styles.raw.js.map → useToastTitleStyles.styles.raw.cjs.map} +0 -0
- /package/lib-commonjs/components/ToastTrigger/{ToastTrigger.types.js → ToastTrigger.types.cjs} +0 -0
- /package/lib-commonjs/components/ToastTrigger/{ToastTrigger.types.js.map → ToastTrigger.types.cjs.map} +0 -0
- /package/lib-commonjs/components/ToastTrigger/{renderToastTrigger.js → renderToastTrigger.cjs} +0 -0
- /package/lib-commonjs/components/ToastTrigger/{renderToastTrigger.js.map → renderToastTrigger.cjs.map} +0 -0
- /package/lib-commonjs/components/Toaster/{Toaster.types.js → Toaster.types.cjs} +0 -0
- /package/lib-commonjs/components/Toaster/{Toaster.types.js.map → Toaster.types.cjs.map} +0 -0
- /package/lib-commonjs/components/Toaster/{useToastAnnounce.js → useToastAnnounce.cjs} +0 -0
- /package/lib-commonjs/components/Toaster/{useToastAnnounce.js.map → useToastAnnounce.cjs.map} +0 -0
- /package/lib-commonjs/contexts/{toastContainerContext.js → toastContainerContext.cjs} +0 -0
- /package/lib-commonjs/contexts/{toastContainerContext.js.map → toastContainerContext.cjs.map} +0 -0
- /package/lib-commonjs/state/{constants.js → constants.cjs} +0 -0
- /package/lib-commonjs/state/{constants.js.map → constants.cjs.map} +0 -0
- /package/lib-commonjs/state/{types.js → types.cjs} +0 -0
- /package/lib-commonjs/state/{types.js.map → types.cjs.map} +0 -0
- /package/lib-commonjs/state/vanilla/{createToaster.js → createToaster.cjs} +0 -0
- /package/lib-commonjs/state/vanilla/{createToaster.js.map → createToaster.cjs.map} +0 -0
- /package/lib-commonjs/state/vanilla/{getPositionStyles.js → getPositionStyles.cjs} +0 -0
- /package/lib-commonjs/state/vanilla/{getPositionStyles.js.map → getPositionStyles.cjs.map} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-toast
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Tue, 11 Aug 2026 17:16:02 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.8.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-toast_v9.8.2)
|
|
8
|
+
|
|
9
|
+
Tue, 11 Aug 2026 17:16:02 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toast_v9.8.1..@fluentui/react-toast_v9.8.2)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- Ship ESM-first (type:module): valid ESM under lib/, CommonJS under lib-commonjs/*.cjs, and drop the `node` export condition - bare-Node `import` resolves ESM, `require` resolves CJS; node-targeted bundlers tree-shake. ([PR #36327](https://github.com/microsoft/fluentui/pull/36327) by martinhochel@microsoft.com)
|
|
15
|
+
- Bump @fluentui/keyboard-keys to v9.0.9 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
16
|
+
- Bump @fluentui/react-aria to v9.17.14 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
17
|
+
- Bump @fluentui/react-jsx-runtime to v9.4.5 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
18
|
+
- Bump @fluentui/react-motion to v9.16.2 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
19
|
+
- Bump @fluentui/react-motion-components-preview to v0.15.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
20
|
+
- Bump @fluentui/react-portal to v9.8.15 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
21
|
+
- Bump @fluentui/react-shared-contexts to v9.26.3 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
22
|
+
- Bump @fluentui/react-tabster to v9.26.17 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
23
|
+
- Bump @fluentui/react-theme to v9.2.2 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
24
|
+
- Bump @fluentui/react-utilities to v9.26.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
25
|
+
|
|
7
26
|
## [9.8.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-toast_v9.8.1)
|
|
8
27
|
|
|
9
|
-
Wed, 24 Jun 2026 11:
|
|
28
|
+
Wed, 24 Jun 2026 11:10:02 GMT
|
|
10
29
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toast_v9.8.0..@fluentui/react-toast_v9.8.1)
|
|
11
30
|
|
|
12
31
|
### Patches
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,640 @@
|
|
|
1
|
+
import type { ARIAButtonResultProps } from '@fluentui/react-aria';
|
|
2
|
+
import type { ARIAButtonType } from '@fluentui/react-aria';
|
|
3
|
+
import type { BackgroundAppearanceContextValue } from '@fluentui/react-shared-contexts';
|
|
4
|
+
import type { ComponentProps } from '@fluentui/react-utilities';
|
|
5
|
+
import type { ComponentState } from '@fluentui/react-utilities';
|
|
6
|
+
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
7
|
+
import type { JSXElement } from '@fluentui/react-utilities';
|
|
8
|
+
import type { PortalProps } from '@fluentui/react-portal';
|
|
9
|
+
import * as React_2 from 'react';
|
|
10
|
+
import type { Slot } from '@fluentui/react-utilities';
|
|
11
|
+
import type { SlotClassNames } from '@fluentui/react-utilities';
|
|
12
|
+
import type { TriggerProps } from '@fluentui/react-utilities';
|
|
13
|
+
|
|
14
|
+
declare type AriaLivePoliteness = 'polite' | 'assertive';
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* AriaLive Props
|
|
18
|
+
*/
|
|
19
|
+
declare type AriaLiveProps = ComponentProps<Partial<AriaLiveSlots>> & {
|
|
20
|
+
announceRef: React_2.Ref<ToastAnnounce>;
|
|
21
|
+
children?: React_2.ReactNode;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
declare type AriaLiveSlots = {
|
|
25
|
+
assertive: NonNullable<Slot<'div'>>;
|
|
26
|
+
polite: NonNullable<Slot<'div'>>;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
declare interface CommonToastDetail {
|
|
30
|
+
toasterId?: ToasterId;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Render the final JSX of Toast
|
|
35
|
+
*/
|
|
36
|
+
export declare const renderToast_unstable: (state: ToastState, contextValues: ToastContextValues) => JSXElement;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Render the final JSX of ToastBody
|
|
40
|
+
*/
|
|
41
|
+
export declare const renderToastBody_unstable: (state: ToastBodyState) => JSXElement;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Render the final JSX of ToastContainer
|
|
45
|
+
*/
|
|
46
|
+
export declare const renderToastContainer_unstable: (state: ToastContainerState, contextValues: ToastContainerContextValues) => JSXElement;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Render the final JSX of Toaster
|
|
50
|
+
*/
|
|
51
|
+
export declare const renderToaster_unstable: (state: ToasterState) => JSXElement;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Render the final JSX of ToastFooter
|
|
55
|
+
*/
|
|
56
|
+
export declare const renderToastFooter_unstable: (state: ToastFooterState) => JSXElement;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Render the final JSX of ToastTitle
|
|
60
|
+
*/
|
|
61
|
+
export declare const renderToastTitle_unstable: (state: ToastTitleState) => JSXElement;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Render the final JSX of MenuTrigger
|
|
65
|
+
*
|
|
66
|
+
* Only renders children
|
|
67
|
+
*/
|
|
68
|
+
export declare const renderToastTrigger_unstable: (state: ToastTriggerState) => JSXElement | null;
|
|
69
|
+
|
|
70
|
+
declare type TimerProps = {
|
|
71
|
+
running: boolean;
|
|
72
|
+
timeout: number;
|
|
73
|
+
onTimeout: () => void;
|
|
74
|
+
as?: 'span';
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Toast component
|
|
79
|
+
*/
|
|
80
|
+
export declare const Toast: ForwardRefComponent<ToastProps>;
|
|
81
|
+
|
|
82
|
+
export declare type ToastAnnounce = (message: string, options: ToastAnnounceOptions) => void;
|
|
83
|
+
|
|
84
|
+
export declare type ToastAnnounceOptions = {
|
|
85
|
+
politeness: AriaLivePoliteness;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Toast Props without design-only props.
|
|
90
|
+
*/
|
|
91
|
+
export declare type ToastBaseProps = Omit<ToastProps, 'appearance'>;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* State used in rendering Toast, without design-only state.
|
|
95
|
+
*/
|
|
96
|
+
export declare type ToastBaseState = Omit<ToastState, 'backgroundAppearance'>;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* ToastBody component
|
|
100
|
+
*/
|
|
101
|
+
export declare const ToastBody: ForwardRefComponent<ToastBodyProps>;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* ToastBody Props without design-only props.
|
|
105
|
+
*/
|
|
106
|
+
export declare type ToastBodyBaseProps = ToastBodyProps;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* State used in rendering ToastBody, without design-only state.
|
|
110
|
+
*/
|
|
111
|
+
export declare type ToastBodyBaseState = Omit<ToastBodyState, 'backgroundAppearance'>;
|
|
112
|
+
|
|
113
|
+
export declare const toastBodyClassNames: SlotClassNames<ToastBodySlots>;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* ToastBody Props
|
|
117
|
+
*/
|
|
118
|
+
export declare type ToastBodyProps = ComponentProps<ToastBodySlots> & {};
|
|
119
|
+
|
|
120
|
+
export declare type ToastBodySlots = {
|
|
121
|
+
root: Slot<'div'>;
|
|
122
|
+
subtitle?: Slot<'div'>;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* State used in rendering ToastBody
|
|
127
|
+
*/
|
|
128
|
+
export declare type ToastBodyState = ComponentState<ToastBodySlots> & {
|
|
129
|
+
backgroundAppearance: BackgroundAppearanceContextValue;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
export declare interface ToastChangeData extends ToastOptions, Pick<ToastData, 'updateId'> {
|
|
133
|
+
status: ToastStatus;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export declare type ToastChangeHandler = (event: null, data: ToastChangeData) => void;
|
|
137
|
+
|
|
138
|
+
export declare const toastClassNames: SlotClassNames<ToastSlots>;
|
|
139
|
+
|
|
140
|
+
export declare const toastContainerClassNames: SlotClassNames<ToastContainerSlots>;
|
|
141
|
+
|
|
142
|
+
export declare const ToastContainerContextProvider: React_2.Provider<ToastContainerContextValue | undefined>;
|
|
143
|
+
|
|
144
|
+
export declare type ToastContainerContextValue = {
|
|
145
|
+
close: () => void;
|
|
146
|
+
intent: ToastIntent | undefined;
|
|
147
|
+
bodyId: string;
|
|
148
|
+
titleId: string;
|
|
149
|
+
};
|
|
150
|
+
|
|
151
|
+
declare type ToastContainerContextValues = {
|
|
152
|
+
toast: ToastContainerContextValue;
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* ToastContainer Props
|
|
157
|
+
*/
|
|
158
|
+
export declare type ToastContainerProps = Omit<ComponentProps<Partial<ToastContainerSlots>>, 'content'> & ToastData & {
|
|
159
|
+
visible: boolean;
|
|
160
|
+
announce: ToastAnnounce;
|
|
161
|
+
intent: ToastIntent | undefined;
|
|
162
|
+
tryRestoreFocus: () => void;
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
export declare type ToastContainerSlots = {
|
|
166
|
+
root: NonNullable<Slot<'div'>>;
|
|
167
|
+
timer: NonNullable<Slot<TimerProps>>;
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* State used in rendering ToastContainer
|
|
172
|
+
*/
|
|
173
|
+
export declare type ToastContainerState = ComponentState<ToastContainerSlots> & Pick<ToastContainerProps, 'remove' | 'close' | 'updateId' | 'visible' | 'intent'> & Pick<ToastContainerContextValue, 'titleId' | 'bodyId'> & {
|
|
174
|
+
/**
|
|
175
|
+
* @deprecated Will be always "0".
|
|
176
|
+
*/
|
|
177
|
+
transitionTimeout: number;
|
|
178
|
+
timerTimeout: number;
|
|
179
|
+
running: boolean;
|
|
180
|
+
/**
|
|
181
|
+
* @deprecated Will be always no-op.
|
|
182
|
+
*/
|
|
183
|
+
onTransitionEntering: () => void;
|
|
184
|
+
/**
|
|
185
|
+
* @deprecated now merged with root ref
|
|
186
|
+
*/
|
|
187
|
+
nodeRef: React_2.Ref<HTMLDivElement>;
|
|
188
|
+
onMotionFinish?: (event: null, data: {
|
|
189
|
+
direction: 'enter' | 'exit';
|
|
190
|
+
}) => void;
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
declare type ToastContextValues = {
|
|
194
|
+
backgroundAppearance: BackgroundAppearanceContextValue;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
export declare interface ToastData<TData = object> extends ToastOptions<TData> {
|
|
198
|
+
/**
|
|
199
|
+
* Determines the visiblity of a toast
|
|
200
|
+
*/
|
|
201
|
+
close: () => void;
|
|
202
|
+
/**
|
|
203
|
+
* Removes a toast completely
|
|
204
|
+
*/
|
|
205
|
+
remove: () => void;
|
|
206
|
+
/**
|
|
207
|
+
* A number used to track updates immutably
|
|
208
|
+
*/
|
|
209
|
+
updateId: number;
|
|
210
|
+
/**
|
|
211
|
+
* Used to determine default priority when the user does not set one
|
|
212
|
+
* Simple counter of toasts dispatched.
|
|
213
|
+
*/
|
|
214
|
+
order: number;
|
|
215
|
+
imperativeRef: React_2.RefObject<ToastImperativeRef | null>;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export declare interface ToastDispatchOptions extends Partial<Omit<ToastOptions, 'toasterId'>> {
|
|
219
|
+
root?: Slot<'div'>;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/**
|
|
223
|
+
* Toaster component - renders a collection of toasts dispatched imperatively
|
|
224
|
+
*/
|
|
225
|
+
export declare const Toaster: React_2.FC<ToasterProps>;
|
|
226
|
+
|
|
227
|
+
export declare const toasterClassNames: SlotClassNames<ToasterSlots>;
|
|
228
|
+
|
|
229
|
+
export declare type ToasterId = string;
|
|
230
|
+
|
|
231
|
+
export declare interface ToasterOptions extends Pick<ToastOptions, 'position' | 'timeout' | 'pauseOnWindowBlur' | 'pauseOnHover' | 'priority'> {
|
|
232
|
+
offset?: ToastOffset;
|
|
233
|
+
toasterId?: ToasterId;
|
|
234
|
+
limit?: number;
|
|
235
|
+
shortcuts?: ToasterShortcuts;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* Toaster Props
|
|
240
|
+
*/
|
|
241
|
+
export declare type ToasterProps = Omit<ComponentProps<ToasterSlots>, 'children'> & Partial<ToasterOptions> & Pick<PortalProps, 'mountNode'> & {
|
|
242
|
+
/**
|
|
243
|
+
* User override API for aria-live narration for toasts
|
|
244
|
+
*/
|
|
245
|
+
announce?: ToastAnnounce;
|
|
246
|
+
inline?: boolean;
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
export declare interface ToasterShortcuts {
|
|
250
|
+
focus: (e: KeyboardEvent) => boolean;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export declare type ToasterSlots = {
|
|
254
|
+
/**
|
|
255
|
+
* NOTE: This root slot maps in exactly the same way to the containers rendered for each toast position
|
|
256
|
+
* There is no intention (currently) to let users customize the div for each toast position.
|
|
257
|
+
*/
|
|
258
|
+
root: Slot<'div'>;
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
declare type ToasterSlotsInternal = ToasterSlots & {
|
|
262
|
+
bottomEnd?: Slot<'div'>;
|
|
263
|
+
bottomStart?: Slot<'div'>;
|
|
264
|
+
topEnd?: Slot<'div'>;
|
|
265
|
+
topStart?: Slot<'div'>;
|
|
266
|
+
top?: Slot<'div'>;
|
|
267
|
+
bottom?: Slot<'div'>;
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* State used in rendering Toaster
|
|
272
|
+
*/
|
|
273
|
+
export declare type ToasterState = ComponentState<ToasterSlotsInternal> & Pick<AriaLiveProps, 'announceRef'> & Pick<PortalProps, 'mountNode'> & Pick<Required<ToasterProps>, 'announce' | 'inline'> & {
|
|
274
|
+
offset: ToasterOptions['offset'] | undefined;
|
|
275
|
+
renderAriaLive: boolean;
|
|
276
|
+
dir: 'rtl' | 'ltr';
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* ToastFooter component
|
|
281
|
+
*/
|
|
282
|
+
export declare const ToastFooter: ForwardRefComponent<ToastFooterProps>;
|
|
283
|
+
|
|
284
|
+
export declare const toastFooterClassNames: SlotClassNames<ToastFooterSlots>;
|
|
285
|
+
|
|
286
|
+
/**
|
|
287
|
+
* ToastFooter Props
|
|
288
|
+
*/
|
|
289
|
+
export declare type ToastFooterProps = ComponentProps<ToastFooterSlots> & {};
|
|
290
|
+
|
|
291
|
+
export declare type ToastFooterSlots = {
|
|
292
|
+
root: Slot<'div'>;
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* State used in rendering ToastFooter
|
|
297
|
+
*/
|
|
298
|
+
export declare type ToastFooterState = ComponentState<ToastFooterSlots>;
|
|
299
|
+
|
|
300
|
+
export declare type ToastId = string;
|
|
301
|
+
|
|
302
|
+
export declare type ToastImperativeRef = {
|
|
303
|
+
/**
|
|
304
|
+
* Focuses the Toast.
|
|
305
|
+
* If there are no focusable elements in the Toast, the Toast itself is focused.
|
|
306
|
+
*/
|
|
307
|
+
focus: () => void;
|
|
308
|
+
/**
|
|
309
|
+
* Resumes the timeout of a paused toast
|
|
310
|
+
*/
|
|
311
|
+
play: () => void;
|
|
312
|
+
/**
|
|
313
|
+
* Pauses the timeout of a toast
|
|
314
|
+
*/
|
|
315
|
+
pause: () => void;
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
export declare type ToastIntent = 'info' | 'success' | 'error' | 'warning';
|
|
319
|
+
|
|
320
|
+
export declare type ToastLiveMessage = {
|
|
321
|
+
message: string;
|
|
322
|
+
createdAt: number;
|
|
323
|
+
politeness: AriaLivePoliteness;
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
export declare type ToastOffset = Partial<Record<ToastPosition, ToastOffsetObject>> | ToastOffsetObject;
|
|
327
|
+
|
|
328
|
+
declare interface ToastOffsetObject {
|
|
329
|
+
horizontal?: number;
|
|
330
|
+
vertical?: number;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
export declare interface ToastOptions<TData = object> {
|
|
334
|
+
/**
|
|
335
|
+
* Uniquely identifies a toast, used for update and dismiss operations
|
|
336
|
+
*/
|
|
337
|
+
toastId: ToastId;
|
|
338
|
+
/**
|
|
339
|
+
* The position the toast should render to
|
|
340
|
+
*/
|
|
341
|
+
position: ToastPosition;
|
|
342
|
+
/**
|
|
343
|
+
* Toast content
|
|
344
|
+
*/
|
|
345
|
+
content: unknown;
|
|
346
|
+
/**
|
|
347
|
+
* Auto dismiss timeout in milliseconds
|
|
348
|
+
* @default 3000
|
|
349
|
+
*/
|
|
350
|
+
timeout: number;
|
|
351
|
+
/**
|
|
352
|
+
* Toast timeout pauses while focus is on another window
|
|
353
|
+
* @default false
|
|
354
|
+
*/
|
|
355
|
+
pauseOnWindowBlur: boolean;
|
|
356
|
+
/**
|
|
357
|
+
* Toast timeout pauses while user cursor is on the toast
|
|
358
|
+
* @default false
|
|
359
|
+
*/
|
|
360
|
+
pauseOnHover: boolean;
|
|
361
|
+
/**
|
|
362
|
+
* Toast belongs to a specific toaster
|
|
363
|
+
*/
|
|
364
|
+
toasterId: ToasterId | undefined;
|
|
365
|
+
/**
|
|
366
|
+
* Higher priority toasts will be rendered before lower priority toasts
|
|
367
|
+
*/
|
|
368
|
+
priority: number;
|
|
369
|
+
/**
|
|
370
|
+
* Used to determine [aria-live](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions) narration
|
|
371
|
+
* This will override the intent prop
|
|
372
|
+
*/
|
|
373
|
+
politeness?: ToastPoliteness;
|
|
374
|
+
/**
|
|
375
|
+
* Default toast types that determine the urgency or [aria-live](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Live_Regions) narration
|
|
376
|
+
* The UI layer may use these intents to apply specific styling.
|
|
377
|
+
* @default info
|
|
378
|
+
*/
|
|
379
|
+
intent?: ToastIntent;
|
|
380
|
+
/**
|
|
381
|
+
* Additional data that needs to be passed to the toast
|
|
382
|
+
*/
|
|
383
|
+
data: TData;
|
|
384
|
+
/**
|
|
385
|
+
* Reports changes to the Toast lifecycle
|
|
386
|
+
*/
|
|
387
|
+
onStatusChange: ToastChangeHandler | undefined;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
export declare type ToastPoliteness = 'assertive' | 'polite';
|
|
391
|
+
|
|
392
|
+
export declare type ToastPosition = 'top-end' | 'top-start' | 'bottom-end' | 'bottom-start' | 'top' | 'bottom';
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Toast Props
|
|
396
|
+
*/
|
|
397
|
+
export declare type ToastProps = ComponentProps<ToastSlots> & {
|
|
398
|
+
appearance?: BackgroundAppearanceContextValue;
|
|
399
|
+
};
|
|
400
|
+
|
|
401
|
+
export declare type ToastSlots = {
|
|
402
|
+
root: Slot<'div'>;
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
/**
|
|
406
|
+
* State used in rendering Toast
|
|
407
|
+
*/
|
|
408
|
+
export declare type ToastState = ComponentState<ToastSlots> & {
|
|
409
|
+
backgroundAppearance: BackgroundAppearanceContextValue;
|
|
410
|
+
intent?: ToastIntent | undefined;
|
|
411
|
+
};
|
|
412
|
+
|
|
413
|
+
export declare type ToastStatus = 'queued' | 'visible' | 'dismissed' | 'unmounted';
|
|
414
|
+
|
|
415
|
+
/**
|
|
416
|
+
* ToastTitle component
|
|
417
|
+
*/
|
|
418
|
+
export declare const ToastTitle: ForwardRefComponent<ToastTitleProps>;
|
|
419
|
+
|
|
420
|
+
/**
|
|
421
|
+
* ToastTitle Props without design-only props.
|
|
422
|
+
*/
|
|
423
|
+
export declare type ToastTitleBaseProps = ToastTitleProps;
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* State used in rendering ToastTitle, without design-only state.
|
|
427
|
+
*/
|
|
428
|
+
export declare type ToastTitleBaseState = Omit<ToastTitleState, 'backgroundAppearance'>;
|
|
429
|
+
|
|
430
|
+
export declare const toastTitleClassNames: SlotClassNames<ToastTitleSlots>;
|
|
431
|
+
|
|
432
|
+
/**
|
|
433
|
+
* ToastTitle Props
|
|
434
|
+
*/
|
|
435
|
+
export declare type ToastTitleProps = ComponentProps<ToastTitleSlots> & {};
|
|
436
|
+
|
|
437
|
+
export declare type ToastTitleSlots = {
|
|
438
|
+
root: NonNullable<Slot<'div'>>;
|
|
439
|
+
media?: Slot<'div'>;
|
|
440
|
+
action?: Slot<'div'>;
|
|
441
|
+
};
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* State used in rendering ToastTitle
|
|
445
|
+
*/
|
|
446
|
+
export declare type ToastTitleState = ComponentState<ToastTitleSlots> & Pick<ToastContainerContextValue, 'intent'> & {
|
|
447
|
+
backgroundAppearance: BackgroundAppearanceContextValue;
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* ToastTrigger component
|
|
452
|
+
*/
|
|
453
|
+
export declare const ToastTrigger: React_2.FC<ToastTriggerProps>;
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* Props that are passed to the child of the ToastTrigger when cloned to ensure correct behaviour for the Toast
|
|
457
|
+
*/
|
|
458
|
+
export declare type ToastTriggerChildProps<Type extends ARIAButtonType = ARIAButtonType, Props = {}> = ARIAButtonResultProps<Type, Props>;
|
|
459
|
+
|
|
460
|
+
export declare type ToastTriggerProps = TriggerProps<ToastTriggerChildProps> & {
|
|
461
|
+
/**
|
|
462
|
+
* Disables internal trigger mechanism that ensures a child provided will be a compliant ARIA button.
|
|
463
|
+
* @default false
|
|
464
|
+
*/
|
|
465
|
+
disableButtonEnhancement?: boolean;
|
|
466
|
+
};
|
|
467
|
+
|
|
468
|
+
export declare type ToastTriggerState = {
|
|
469
|
+
children: React_2.ReactElement | null;
|
|
470
|
+
};
|
|
471
|
+
|
|
472
|
+
export declare interface ToastUpdateEventDetail extends Partial<ToastOptions>, CommonToastDetail {
|
|
473
|
+
toastId: ToastId;
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
export declare interface ToastUpdateOptions extends ToastUpdateEventDetail {
|
|
477
|
+
root?: Slot<'div'>;
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
/**
|
|
481
|
+
* Create the state required to render Toast.
|
|
482
|
+
*
|
|
483
|
+
* The returned state can be modified with hooks such as useToastStyles_unstable,
|
|
484
|
+
* before being passed to renderToast_unstable.
|
|
485
|
+
*
|
|
486
|
+
* @param props - props from this instance of Toast
|
|
487
|
+
* @param ref - reference to root HTMLElement of Toast
|
|
488
|
+
*/
|
|
489
|
+
export declare const useToast_unstable: (props: ToastProps, ref: React_2.Ref<HTMLElement>) => ToastState;
|
|
490
|
+
|
|
491
|
+
/**
|
|
492
|
+
* Wraps an aria live announcement function.
|
|
493
|
+
* Aria live announcements can be detrimental once the user is already navigating
|
|
494
|
+
* multiple toasts. Once the user is focused inside the toaster, the announecments should be disabled.
|
|
495
|
+
* @param announce - The aria live announcement function to wrap
|
|
496
|
+
* @returns A function to announce a toast and a ref to attach to the toaster element
|
|
497
|
+
*/
|
|
498
|
+
export declare function useToastAnnounce(announce: ToastAnnounce): {
|
|
499
|
+
announceToast: ToastAnnounce;
|
|
500
|
+
toasterRef: React_2.RefCallback<HTMLDivElement>;
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Create the base state required to render Toast, without design-only props.
|
|
505
|
+
*
|
|
506
|
+
* @param props - props from this instance of Toast (without appearance)
|
|
507
|
+
* @param ref - reference to root HTMLElement of Toast
|
|
508
|
+
*/
|
|
509
|
+
export declare const useToastBase_unstable: (props: ToastBaseProps, ref: React_2.Ref<HTMLElement>) => ToastBaseState;
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Create the state required to render ToastBody.
|
|
513
|
+
*
|
|
514
|
+
* The returned state can be modified with hooks such as useToastBodyStyles_unstable,
|
|
515
|
+
* before being passed to renderToastBody_unstable.
|
|
516
|
+
*
|
|
517
|
+
* @param props - props from this instance of ToastBody
|
|
518
|
+
* @param ref - reference to root HTMLElement of ToastBody
|
|
519
|
+
*/
|
|
520
|
+
export declare const useToastBody_unstable: (props: ToastBodyProps, ref: React_2.Ref<HTMLElement>) => ToastBodyState;
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Create the base state required to render ToastBody, without design-only props.
|
|
524
|
+
*
|
|
525
|
+
* @param props - props from this instance of ToastBody
|
|
526
|
+
* @param ref - reference to root HTMLElement of ToastBody
|
|
527
|
+
*/
|
|
528
|
+
export declare const useToastBodyBase_unstable: (props: ToastBodyBaseProps, ref: React_2.Ref<HTMLElement>) => ToastBodyBaseState;
|
|
529
|
+
|
|
530
|
+
/**
|
|
531
|
+
* Apply styling to the ToastBody slots based on the state
|
|
532
|
+
*/
|
|
533
|
+
export declare const useToastBodyStyles_unstable: (state: ToastBodyState) => ToastBodyState;
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Create the state required to render ToastContainer.
|
|
537
|
+
*
|
|
538
|
+
* The returned state can be modified with hooks such as useToastContainerStyles_unstable,
|
|
539
|
+
* before being passed to renderToastContainer_unstable.
|
|
540
|
+
*
|
|
541
|
+
* @param props - props from this instance of ToastContainer
|
|
542
|
+
* @param ref - reference to root HTMLElement of ToastContainer
|
|
543
|
+
*/
|
|
544
|
+
export declare const useToastContainer_unstable: (props: ToastContainerProps, ref: React_2.Ref<HTMLElement>) => ToastContainerState;
|
|
545
|
+
|
|
546
|
+
export declare const useToastContainerContext: () => ToastContainerContextValue;
|
|
547
|
+
|
|
548
|
+
export declare function useToastContainerContextValues_unstable(state: ToastContainerState): ToastContainerContextValues;
|
|
549
|
+
|
|
550
|
+
/**
|
|
551
|
+
* @param toasterId - If an id is provided all imperative methods control that specific toaster
|
|
552
|
+
* @returns Imperative methods to control toasts
|
|
553
|
+
*/
|
|
554
|
+
export declare function useToastController(toasterId?: ToasterId): {
|
|
555
|
+
dispatchToast: (content: React_2.ReactNode, options?: ToastDispatchOptions) => void;
|
|
556
|
+
dismissToast: (toastId: ToastId) => void;
|
|
557
|
+
dismissAllToasts: () => void;
|
|
558
|
+
updateToast: (options: ToastUpdateOptions) => void;
|
|
559
|
+
pauseToast: (toastId: ToastId) => void;
|
|
560
|
+
playToast: (toastId: ToastId) => void;
|
|
561
|
+
};
|
|
562
|
+
|
|
563
|
+
export declare function useToaster<TElement extends HTMLElement = HTMLDivElement>(options?: Partial<ToasterOptions>): {
|
|
564
|
+
isToastVisible: (toastId: ToastId) => boolean;
|
|
565
|
+
toastsToRender: Map<ToastPosition, ToastData[]>;
|
|
566
|
+
pauseAllToasts: () => void;
|
|
567
|
+
playAllToasts: () => void;
|
|
568
|
+
tryRestoreFocus: () => void;
|
|
569
|
+
closeAllToasts: () => void;
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
/**
|
|
573
|
+
* Create the state required to render Toaster.
|
|
574
|
+
*
|
|
575
|
+
* @param props - props from this instance of Toaster
|
|
576
|
+
*/
|
|
577
|
+
export declare const useToaster_unstable: (props: ToasterProps) => ToasterState;
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Apply styling to the Toaster slots based on the state
|
|
581
|
+
*/
|
|
582
|
+
export declare const useToasterStyles_unstable: (state: ToasterState) => ToasterState;
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Create the state required to render ToastFooter.
|
|
586
|
+
*
|
|
587
|
+
* The returned state can be modified with hooks such as useToastFooterStyles_unstable,
|
|
588
|
+
* before being passed to renderToastFooter_unstable.
|
|
589
|
+
*
|
|
590
|
+
* @param props - props from this instance of ToastFooter
|
|
591
|
+
* @param ref - reference to root HTMLElement of ToastFooter
|
|
592
|
+
*/
|
|
593
|
+
export declare const useToastFooter_unstable: (props: ToastFooterProps, ref: React_2.Ref<HTMLElement>) => ToastFooterState;
|
|
594
|
+
|
|
595
|
+
/**
|
|
596
|
+
* Apply styling to the ToastFooter slots based on the state
|
|
597
|
+
*/
|
|
598
|
+
export declare const useToastFooterStyles_unstable: (state: ToastFooterState) => ToastFooterState;
|
|
599
|
+
|
|
600
|
+
/**
|
|
601
|
+
* Apply styling to the Toast slots based on the state
|
|
602
|
+
*/
|
|
603
|
+
export declare const useToastStyles_unstable: (state: ToastState) => ToastState;
|
|
604
|
+
|
|
605
|
+
/**
|
|
606
|
+
* Create the state required to render ToastTitle.
|
|
607
|
+
*
|
|
608
|
+
* The returned state can be modified with hooks such as useToastTitleStyles_unstable,
|
|
609
|
+
* before being passed to renderToastTitle_unstable.
|
|
610
|
+
*
|
|
611
|
+
* @param props - props from this instance of ToastTitle
|
|
612
|
+
* @param ref - reference to root HTMLElement of ToastTitle
|
|
613
|
+
*/
|
|
614
|
+
export declare const useToastTitle_unstable: (props: ToastTitleProps, ref: React_2.Ref<HTMLElement>) => ToastTitleState;
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* Create the base state required to render ToastTitle, without design-only props.
|
|
618
|
+
*
|
|
619
|
+
* @param props - props from this instance of ToastTitle
|
|
620
|
+
* @param ref - reference to root HTMLElement of ToastTitle
|
|
621
|
+
*/
|
|
622
|
+
export declare const useToastTitleBase_unstable: (props: ToastTitleBaseProps, ref: React_2.Ref<HTMLElement>) => ToastTitleBaseState;
|
|
623
|
+
|
|
624
|
+
/**
|
|
625
|
+
* Apply styling to the ToastTitle slots based on the state
|
|
626
|
+
*/
|
|
627
|
+
export declare const useToastTitleStyles_unstable: (state: ToastTitleState) => ToastTitleState;
|
|
628
|
+
|
|
629
|
+
/**
|
|
630
|
+
* A non-visual component that wraps its child
|
|
631
|
+
* and configures them to be the trigger that will close a `Toast`.
|
|
632
|
+
* This component should only accept one child.
|
|
633
|
+
*
|
|
634
|
+
* This component sole purpose is to avoid opting out of the internal controlled open state of a `Toast`
|
|
635
|
+
* Besides being a trigger that closes a toast through context this component doesn't do much,
|
|
636
|
+
* making it basically unnecessary in cases where the trigger is outside of a toast.
|
|
637
|
+
*/
|
|
638
|
+
export declare const useToastTrigger_unstable: (props: ToastTriggerProps) => ToastTriggerState;
|
|
639
|
+
|
|
640
|
+
export { }
|
package/lib/AriaLive.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { AriaLive, ariaLiveClassNames, renderAriaLive_unstable, useAriaLiveStyles_unstable, useAriaLive_unstable } from
|
|
1
|
+
export { AriaLive, ariaLiveClassNames, renderAriaLive_unstable, useAriaLiveStyles_unstable, useAriaLive_unstable } from "./components/AriaLive/index.js";
|
package/lib/AriaLive.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/AriaLive.ts"],"sourcesContent":["export type {\n Announce,\n AnnounceOptions,\n AriaLivePoliteness,\n AriaLiveProps,\n AriaLiveSlots,\n AriaLiveState,\n LiveMessage,\n} from './components/AriaLive/index';\nexport {\n AriaLive,\n ariaLiveClassNames,\n renderAriaLive_unstable,\n useAriaLiveStyles_unstable,\n useAriaLive_unstable,\n} from './components/AriaLive/index';\n"],"names":["AriaLive","ariaLiveClassNames","renderAriaLive_unstable","useAriaLiveStyles_unstable","useAriaLive_unstable"],"mappings":"AASA,SACEA,QAAQ,EACRC,kBAAkB,EAClBC,uBAAuB,EACvBC,0BAA0B,EAC1BC,oBAAoB,QACf,
|
|
1
|
+
{"version":3,"sources":["../src/AriaLive.ts"],"sourcesContent":["export type {\n Announce,\n AnnounceOptions,\n AriaLivePoliteness,\n AriaLiveProps,\n AriaLiveSlots,\n AriaLiveState,\n LiveMessage,\n} from './components/AriaLive/index';\nexport {\n AriaLive,\n ariaLiveClassNames,\n renderAriaLive_unstable,\n useAriaLiveStyles_unstable,\n useAriaLive_unstable,\n} from './components/AriaLive/index';\n"],"names":["AriaLive","ariaLiveClassNames","renderAriaLive_unstable","useAriaLiveStyles_unstable","useAriaLive_unstable"],"mappings":"AASA,SACEA,QAAQ,EACRC,kBAAkB,EAClBC,uBAAuB,EACvBC,0BAA0B,EAC1BC,oBAAoB,QACf,iCAA8B"}
|
package/lib/Toast.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Toast, renderToast_unstable, toastClassNames, useToastStyles_unstable, useToastBase_unstable, useToast_unstable } from
|
|
1
|
+
export { Toast, renderToast_unstable, toastClassNames, useToastStyles_unstable, useToastBase_unstable, useToast_unstable } from "./components/Toast/index.js";
|
package/lib/Toast.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Toast.ts"],"sourcesContent":["export type {\n ToastBaseProps,\n ToastBaseState,\n ToastContextValues,\n ToastProps,\n ToastSlots,\n ToastState,\n} from './components/Toast/index';\nexport {\n Toast,\n renderToast_unstable,\n toastClassNames,\n useToastStyles_unstable,\n useToastBase_unstable,\n useToast_unstable,\n} from './components/Toast/index';\n"],"names":["Toast","renderToast_unstable","toastClassNames","useToastStyles_unstable","useToastBase_unstable","useToast_unstable"],"mappings":"AAQA,SACEA,KAAK,EACLC,oBAAoB,EACpBC,eAAe,EACfC,uBAAuB,EACvBC,qBAAqB,EACrBC,iBAAiB,QACZ,
|
|
1
|
+
{"version":3,"sources":["../src/Toast.ts"],"sourcesContent":["export type {\n ToastBaseProps,\n ToastBaseState,\n ToastContextValues,\n ToastProps,\n ToastSlots,\n ToastState,\n} from './components/Toast/index';\nexport {\n Toast,\n renderToast_unstable,\n toastClassNames,\n useToastStyles_unstable,\n useToastBase_unstable,\n useToast_unstable,\n} from './components/Toast/index';\n"],"names":["Toast","renderToast_unstable","toastClassNames","useToastStyles_unstable","useToastBase_unstable","useToast_unstable"],"mappings":"AAQA,SACEA,KAAK,EACLC,oBAAoB,EACpBC,eAAe,EACfC,uBAAuB,EACvBC,qBAAqB,EACrBC,iBAAiB,QACZ,8BAA2B"}
|