@fluentui/react-toast 9.74.7-experimental.cli-api.20261006-ccaa611d58.0 → 9.75.0-experimental.css-modules.20261031-810ab07afb.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.
- package/CHANGELOG.md +45 -15
- package/README.md +8 -0
- package/lib/components/AriaLive/AriaLive.js.map +1 -1
- package/lib/components/AriaLive/AriaLive.module.css +11 -0
- package/lib/components/AriaLive/AriaLive.types.js.map +1 -1
- package/lib/components/AriaLive/index.js.map +1 -1
- package/lib/components/AriaLive/renderAriaLive.js +2 -2
- package/lib/components/AriaLive/renderAriaLive.js.map +1 -1
- package/lib/components/AriaLive/useAriaLive.js.map +1 -1
- package/lib/components/AriaLive/useAriaLiveStyles.styles.css.js +11 -0
- package/lib/components/AriaLive/useAriaLiveStyles.styles.css.js.map +1 -0
- package/lib/components/AriaLive/useAriaLiveStyles.styles.raw.css.js +11 -0
- package/lib/components/AriaLive/useAriaLiveStyles.styles.raw.css.js.map +1 -0
- package/lib/components/AriaLive/useAriaLiveStyles.styles.raw.js.map +1 -1
- package/lib/components/Timer/Timer.js.map +1 -1
- package/lib/components/Timer/Timer.module.css +15 -0
- package/lib/components/Timer/index.js.map +1 -1
- package/lib/components/Timer/useTimerStyles.styles.css.js +2 -0
- package/lib/components/Timer/useTimerStyles.styles.css.js.map +1 -0
- package/lib/components/Timer/useTimerStyles.styles.raw.css.js +2 -0
- package/lib/components/Timer/useTimerStyles.styles.raw.css.js.map +1 -0
- package/lib/components/Timer/useTimerStyles.styles.raw.js.map +1 -1
- package/lib/components/Toast/Toast.js.map +1 -1
- package/lib/components/Toast/Toast.module.css +20 -0
- package/lib/components/Toast/Toast.types.js.map +1 -1
- package/lib/components/Toast/index.js.map +1 -1
- package/lib/components/Toast/renderToast.js +2 -2
- package/lib/components/Toast/renderToast.js.map +1 -1
- package/lib/components/Toast/useToast.js.map +1 -1
- package/lib/components/Toast/useToastContextValues.js.map +1 -1
- package/lib/components/Toast/useToastStyles.styles.css.js +9 -0
- package/lib/components/Toast/useToastStyles.styles.css.js.map +1 -0
- package/lib/components/Toast/useToastStyles.styles.raw.css.js +9 -0
- package/lib/components/Toast/useToastStyles.styles.raw.css.js.map +1 -0
- package/lib/components/Toast/useToastStyles.styles.raw.js.map +1 -1
- package/lib/components/ToastBody/ToastBody.js.map +1 -1
- package/lib/components/ToastBody/ToastBody.module.css +24 -0
- package/lib/components/ToastBody/ToastBody.types.js.map +1 -1
- package/lib/components/ToastBody/index.js.map +1 -1
- package/lib/components/ToastBody/renderToastBody.js +2 -2
- package/lib/components/ToastBody/renderToastBody.js.map +1 -1
- package/lib/components/ToastBody/useToastBody.js.map +1 -1
- package/lib/components/ToastBody/useToastBodyStyles.styles.css.js +13 -0
- package/lib/components/ToastBody/useToastBodyStyles.styles.css.js.map +1 -0
- package/lib/components/ToastBody/useToastBodyStyles.styles.raw.css.js +13 -0
- package/lib/components/ToastBody/useToastBodyStyles.styles.raw.css.js.map +1 -0
- package/lib/components/ToastBody/useToastBodyStyles.styles.raw.js.map +1 -1
- package/lib/components/ToastContainer/ToastContainer.js.map +1 -1
- package/lib/components/ToastContainer/ToastContainer.module.css +12 -0
- package/lib/components/ToastContainer/ToastContainer.types.js.map +1 -1
- package/lib/components/ToastContainer/index.js.map +1 -1
- package/lib/components/ToastContainer/renderToastContainer.js.map +1 -1
- package/lib/components/ToastContainer/useToastContainer.js +4 -4
- package/lib/components/ToastContainer/useToastContainer.js.map +1 -1
- package/lib/components/ToastContainer/useToastContainerContextValues.js.map +1 -1
- package/lib/components/ToastContainer/useToastContainerStyles.styles.css.js +10 -0
- package/lib/components/ToastContainer/useToastContainerStyles.styles.css.js.map +1 -0
- package/lib/components/ToastContainer/useToastContainerStyles.styles.raw.css.js +10 -0
- package/lib/components/ToastContainer/useToastContainerStyles.styles.raw.css.js.map +1 -0
- package/lib/components/ToastContainer/useToastContainerStyles.styles.raw.js.map +1 -1
- package/lib/components/ToastFooter/ToastFooter.js.map +1 -1
- package/lib/components/ToastFooter/ToastFooter.module.css +9 -0
- package/lib/components/ToastFooter/ToastFooter.types.js.map +1 -1
- package/lib/components/ToastFooter/index.js.map +1 -1
- package/lib/components/ToastFooter/renderToastFooter.js +2 -2
- package/lib/components/ToastFooter/renderToastFooter.js.map +1 -1
- package/lib/components/ToastFooter/useToastFooter.js.map +1 -1
- package/lib/components/ToastFooter/useToastFooterStyles.styles.css.js +9 -0
- package/lib/components/ToastFooter/useToastFooterStyles.styles.css.js.map +1 -0
- package/lib/components/ToastFooter/useToastFooterStyles.styles.raw.css.js +9 -0
- package/lib/components/ToastFooter/useToastFooterStyles.styles.raw.css.js.map +1 -0
- package/lib/components/ToastFooter/useToastFooterStyles.styles.raw.js.map +1 -1
- package/lib/components/ToastTitle/ToastTitle.js.map +1 -1
- package/lib/components/ToastTitle/ToastTitle.module.css +69 -0
- package/lib/components/ToastTitle/ToastTitle.types.js.map +1 -1
- package/lib/components/ToastTitle/index.js.map +1 -1
- package/lib/components/ToastTitle/renderToastTitle.js +2 -2
- package/lib/components/ToastTitle/renderToastTitle.js.map +1 -1
- package/lib/components/ToastTitle/useToastTitle.js.map +1 -1
- package/lib/components/ToastTitle/useToastTitleStyles.styles.css.js +17 -0
- package/lib/components/ToastTitle/useToastTitleStyles.styles.css.js.map +1 -0
- package/lib/components/ToastTitle/useToastTitleStyles.styles.raw.css.js +17 -0
- package/lib/components/ToastTitle/useToastTitleStyles.styles.raw.css.js.map +1 -0
- package/lib/components/ToastTitle/useToastTitleStyles.styles.raw.js.map +1 -1
- package/lib/components/ToastTrigger/ToastTrigger.js.map +1 -1
- package/lib/components/ToastTrigger/ToastTrigger.types.js.map +1 -1
- package/lib/components/ToastTrigger/index.js.map +1 -1
- package/lib/components/ToastTrigger/renderToastTrigger.js.map +1 -1
- package/lib/components/ToastTrigger/useToastTrigger.js.map +1 -1
- package/lib/components/Toaster/Toaster.js.map +1 -1
- package/lib/components/Toaster/Toaster.module.css +11 -0
- package/lib/components/Toaster/Toaster.types.js.map +1 -1
- package/lib/components/Toaster/index.js.map +1 -1
- package/lib/components/Toaster/renderToaster.js +2 -2
- package/lib/components/Toaster/renderToaster.js.map +1 -1
- package/lib/components/Toaster/useToastAnnounce.js.map +1 -1
- package/lib/components/Toaster/useToaster.js.map +1 -1
- package/lib/components/Toaster/useToasterFocusManagement.js.map +1 -1
- package/lib/components/Toaster/useToasterStyles.styles.css.js +26 -0
- package/lib/components/Toaster/useToasterStyles.styles.css.js.map +1 -0
- package/lib/components/Toaster/useToasterStyles.styles.js +6 -12
- package/lib/components/Toaster/useToasterStyles.styles.js.map +1 -1
- package/lib/components/Toaster/useToasterStyles.styles.raw.css.js +26 -0
- package/lib/components/Toaster/useToasterStyles.styles.raw.css.js.map +1 -0
- package/lib/components/Toaster/useToasterStyles.styles.raw.js +6 -12
- package/lib/components/Toaster/useToasterStyles.styles.raw.js.map +1 -1
- package/lib/contexts/toastContainerContext.js.map +1 -1
- package/lib/state/constants.js.map +1 -1
- package/lib/state/index.js.map +1 -1
- package/lib/state/types.js.map +1 -1
- package/lib/state/useToastController.js.map +1 -1
- package/lib/state/useToaster.js.map +1 -1
- package/lib/state/vanilla/createToaster.js.map +1 -1
- package/lib/state/vanilla/dismissAllToasts.js.map +1 -1
- package/lib/state/vanilla/dismissToast.js.map +1 -1
- package/lib/state/vanilla/dispatchToast.js.map +1 -1
- package/lib/state/vanilla/getPositionStyles.js +1 -1
- package/lib/state/vanilla/getPositionStyles.js.map +1 -1
- package/lib/state/vanilla/index.js.map +1 -1
- package/lib/state/vanilla/pauseToast.js.map +1 -1
- package/lib/state/vanilla/playToast.js.map +1 -1
- package/lib/state/vanilla/updateToast.js.map +1 -1
- package/lib-commonjs/AriaLive.cjs +6 -6
- package/lib-commonjs/Toast.cjs +7 -7
- package/lib-commonjs/ToastBody.cjs +7 -7
- package/lib-commonjs/ToastContainer.cjs +7 -7
- package/lib-commonjs/ToastFooter.cjs +6 -6
- package/lib-commonjs/ToastTitle.cjs +7 -7
- package/lib-commonjs/ToastTrigger.cjs +4 -4
- package/lib-commonjs/Toaster.cjs +7 -7
- package/lib-commonjs/components/AriaLive/AriaLive.cjs.map +1 -1
- package/lib-commonjs/components/AriaLive/AriaLive.module.css +11 -0
- package/lib-commonjs/components/AriaLive/AriaLive.types.cjs.map +1 -1
- package/lib-commonjs/components/AriaLive/index.cjs +6 -6
- package/lib-commonjs/components/AriaLive/index.cjs.map +1 -1
- package/lib-commonjs/components/AriaLive/renderAriaLive.cjs.map +1 -1
- package/lib-commonjs/components/AriaLive/useAriaLive.cjs.map +1 -1
- package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.cjs +3 -3
- package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.css.cjs +30 -0
- package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.raw.css.cjs +30 -0
- package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/Timer/Timer.cjs.map +1 -1
- package/lib-commonjs/components/Timer/Timer.module.css +15 -0
- package/lib-commonjs/components/Timer/index.cjs.map +1 -1
- package/lib-commonjs/components/Timer/useTimerStyles.styles.css.cjs +13 -0
- package/lib-commonjs/components/Timer/useTimerStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/Timer/useTimerStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/Timer/useTimerStyles.styles.raw.css.cjs +13 -0
- package/lib-commonjs/components/Timer/useTimerStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/Toast/Toast.cjs.map +1 -1
- package/lib-commonjs/components/Toast/Toast.module.css +20 -0
- package/lib-commonjs/components/Toast/Toast.types.cjs.map +1 -1
- package/lib-commonjs/components/Toast/index.cjs +7 -7
- package/lib-commonjs/components/Toast/index.cjs.map +1 -1
- package/lib-commonjs/components/Toast/renderToast.cjs.map +1 -1
- package/lib-commonjs/components/Toast/useToast.cjs +3 -3
- package/lib-commonjs/components/Toast/useToast.cjs.map +1 -1
- package/lib-commonjs/components/Toast/useToastContextValues.cjs.map +1 -1
- package/lib-commonjs/components/Toast/useToastStyles.styles.cjs +3 -3
- package/lib-commonjs/components/Toast/useToastStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/Toast/useToastStyles.styles.css.cjs +28 -0
- package/lib-commonjs/components/Toast/useToastStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/Toast/useToastStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/Toast/useToastStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/Toast/useToastStyles.styles.raw.css.cjs +28 -0
- package/lib-commonjs/components/Toast/useToastStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/ToastBody/ToastBody.cjs.map +1 -1
- package/lib-commonjs/components/ToastBody/ToastBody.module.css +24 -0
- package/lib-commonjs/components/ToastBody/ToastBody.types.cjs.map +1 -1
- package/lib-commonjs/components/ToastBody/index.cjs +7 -7
- package/lib-commonjs/components/ToastBody/index.cjs.map +1 -1
- package/lib-commonjs/components/ToastBody/renderToastBody.cjs.map +1 -1
- package/lib-commonjs/components/ToastBody/useToastBody.cjs +3 -3
- package/lib-commonjs/components/ToastBody/useToastBody.cjs.map +1 -1
- package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.cjs +3 -3
- package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.css.cjs +32 -0
- package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.raw.css.cjs +32 -0
- package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/ToastContainer/ToastContainer.cjs.map +1 -1
- package/lib-commonjs/components/ToastContainer/ToastContainer.module.css +12 -0
- package/lib-commonjs/components/ToastContainer/ToastContainer.types.cjs.map +1 -1
- package/lib-commonjs/components/ToastContainer/index.cjs +7 -7
- package/lib-commonjs/components/ToastContainer/index.cjs.map +1 -1
- package/lib-commonjs/components/ToastContainer/renderToastContainer.cjs.map +1 -1
- package/lib-commonjs/components/ToastContainer/useToastContainer.cjs +4 -4
- package/lib-commonjs/components/ToastContainer/useToastContainer.cjs.map +1 -1
- package/lib-commonjs/components/ToastContainer/useToastContainerContextValues.cjs.map +1 -1
- package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.cjs +3 -3
- package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.css.cjs +29 -0
- package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.raw.css.cjs +29 -0
- package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/ToastFooter/ToastFooter.cjs.map +1 -1
- package/lib-commonjs/components/ToastFooter/ToastFooter.module.css +9 -0
- package/lib-commonjs/components/ToastFooter/ToastFooter.types.cjs.map +1 -1
- package/lib-commonjs/components/ToastFooter/index.cjs +6 -6
- package/lib-commonjs/components/ToastFooter/index.cjs.map +1 -1
- package/lib-commonjs/components/ToastFooter/renderToastFooter.cjs.map +1 -1
- package/lib-commonjs/components/ToastFooter/useToastFooter.cjs.map +1 -1
- package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.cjs +3 -3
- package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.css.cjs +28 -0
- package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.raw.css.cjs +28 -0
- package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/ToastTitle/ToastTitle.cjs.map +1 -1
- package/lib-commonjs/components/ToastTitle/ToastTitle.module.css +69 -0
- package/lib-commonjs/components/ToastTitle/ToastTitle.types.cjs.map +1 -1
- package/lib-commonjs/components/ToastTitle/index.cjs +7 -7
- package/lib-commonjs/components/ToastTitle/index.cjs.map +1 -1
- package/lib-commonjs/components/ToastTitle/renderToastTitle.cjs.map +1 -1
- package/lib-commonjs/components/ToastTitle/useToastTitle.cjs +3 -3
- package/lib-commonjs/components/ToastTitle/useToastTitle.cjs.map +1 -1
- package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.cjs +3 -3
- package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.css.cjs +36 -0
- package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.raw.css.cjs +36 -0
- package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/ToastTrigger/ToastTrigger.cjs.map +1 -1
- package/lib-commonjs/components/ToastTrigger/ToastTrigger.types.cjs.map +1 -1
- package/lib-commonjs/components/ToastTrigger/index.cjs +4 -4
- package/lib-commonjs/components/ToastTrigger/index.cjs.map +1 -1
- package/lib-commonjs/components/ToastTrigger/renderToastTrigger.cjs.map +1 -1
- package/lib-commonjs/components/ToastTrigger/useToastTrigger.cjs.map +1 -1
- package/lib-commonjs/components/Toaster/Toaster.cjs.map +1 -1
- package/lib-commonjs/components/Toaster/Toaster.module.css +11 -0
- package/lib-commonjs/components/Toaster/Toaster.types.cjs.map +1 -1
- package/lib-commonjs/components/Toaster/index.cjs +7 -7
- package/lib-commonjs/components/Toaster/index.cjs.map +1 -1
- package/lib-commonjs/components/Toaster/renderToaster.cjs.map +1 -1
- package/lib-commonjs/components/Toaster/useToastAnnounce.cjs.map +1 -1
- package/lib-commonjs/components/Toaster/useToaster.cjs.map +1 -1
- package/lib-commonjs/components/Toaster/useToasterFocusManagement.cjs.map +1 -1
- package/lib-commonjs/components/Toaster/useToasterStyles.styles.cjs +9 -15
- package/lib-commonjs/components/Toaster/useToasterStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/Toaster/useToasterStyles.styles.css.cjs +45 -0
- package/lib-commonjs/components/Toaster/useToasterStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/Toaster/useToasterStyles.styles.raw.cjs +9 -15
- package/lib-commonjs/components/Toaster/useToasterStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/Toaster/useToasterStyles.styles.raw.css.cjs +45 -0
- package/lib-commonjs/components/Toaster/useToasterStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/contexts/toastContainerContext.cjs +3 -3
- package/lib-commonjs/contexts/toastContainerContext.cjs.map +1 -1
- package/lib-commonjs/index.cjs +41 -41
- package/lib-commonjs/index.cjs.map +1 -1
- package/lib-commonjs/state/constants.cjs +3 -3
- package/lib-commonjs/state/constants.cjs.map +1 -1
- package/lib-commonjs/state/index.cjs +5 -5
- package/lib-commonjs/state/index.cjs.map +1 -1
- package/lib-commonjs/state/types.cjs.map +1 -1
- package/lib-commonjs/state/useToastController.cjs.map +1 -1
- package/lib-commonjs/state/useToaster.cjs.map +1 -1
- package/lib-commonjs/state/vanilla/createToaster.cjs.map +1 -1
- package/lib-commonjs/state/vanilla/dismissAllToasts.cjs.map +1 -1
- package/lib-commonjs/state/vanilla/dismissToast.cjs.map +1 -1
- package/lib-commonjs/state/vanilla/dispatchToast.cjs.map +1 -1
- package/lib-commonjs/state/vanilla/getPositionStyles.cjs +1 -1
- package/lib-commonjs/state/vanilla/getPositionStyles.cjs.map +1 -1
- package/lib-commonjs/state/vanilla/index.cjs +9 -9
- package/lib-commonjs/state/vanilla/index.cjs.map +1 -1
- package/lib-commonjs/state/vanilla/pauseToast.cjs.map +1 -1
- package/lib-commonjs/state/vanilla/playToast.cjs.map +1 -1
- package/lib-commonjs/state/vanilla/updateToast.cjs.map +1 -1
- package/package.json +18 -18
- package/dist/metadata/api/api-root.json +0 -1
- package/dist/metadata/index.json +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,27 +1,57 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-toast
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Sat, 31 Oct 2026 11:08:40 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
-
## [9.
|
|
7
|
+
## [9.75.0-experimental.css-modules.20261031-810ab07afb.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-toast_v9.75.0-experimental.css-modules.20261031-810ab07afb.0)
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toast_v9.8.3..@fluentui/react-toast_v9.74.7-experimental.cli-api.20261006-ccaa611d58.0)
|
|
9
|
+
Sat, 31 Oct 2026 11:08:40 GMT
|
|
11
10
|
|
|
12
11
|
### Changes
|
|
13
12
|
|
|
14
|
-
- Release 9.
|
|
15
|
-
- Bump @fluentui/keyboard-keys to v9.
|
|
16
|
-
- Bump @fluentui/react-aria to v9.
|
|
17
|
-
- Bump @fluentui/react-jsx-runtime to v9.
|
|
18
|
-
- Bump @fluentui/react-motion to v9.
|
|
19
|
-
- Bump @fluentui/react-motion-components-preview to v9.
|
|
20
|
-
- Bump @fluentui/react-portal to v9.
|
|
21
|
-
- Bump @fluentui/react-shared-contexts to v9.
|
|
22
|
-
- Bump @fluentui/react-tabster to v9.
|
|
23
|
-
- Bump @fluentui/react-theme to v9.
|
|
24
|
-
- Bump @fluentui/react-utilities to v9.
|
|
13
|
+
- Release 9.75.0-experimental.css-modules.20261031-810ab07afb ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
|
|
14
|
+
- Bump @fluentui/keyboard-keys to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
15
|
+
- Bump @fluentui/react-aria to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
16
|
+
- Bump @fluentui/react-jsx-runtime to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
17
|
+
- Bump @fluentui/react-motion to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
18
|
+
- Bump @fluentui/react-motion-components-preview to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
19
|
+
- Bump @fluentui/react-portal to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
20
|
+
- Bump @fluentui/react-shared-contexts to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
21
|
+
- Bump @fluentui/react-tabster to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
22
|
+
- Bump @fluentui/react-theme to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
23
|
+
- Bump @fluentui/react-utilities to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
24
|
+
|
|
25
|
+
## [9.8.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-toast_v9.8.5)
|
|
26
|
+
|
|
27
|
+
Mon, 19 Oct 2026 16:49:01 GMT
|
|
28
|
+
|
|
29
|
+
### Patches
|
|
30
|
+
|
|
31
|
+
- Bump @fluentui/react-aria to v9.17.16 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
32
|
+
- Bump @fluentui/react-jsx-runtime to v9.4.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
33
|
+
- Bump @fluentui/react-motion to v9.16.5 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
34
|
+
- Bump @fluentui/react-motion-components-preview to v0.15.10 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
35
|
+
- Bump @fluentui/react-portal to v9.8.17 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
36
|
+
- Bump @fluentui/react-tabster to v9.26.19 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
37
|
+
- Bump @fluentui/react-utilities to v9.27.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
38
|
+
|
|
39
|
+
## [9.8.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-toast_v9.8.4)
|
|
40
|
+
|
|
41
|
+
Tue, 22 Sep 2026 11:25:39 GMT
|
|
42
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toast_v9.8.3..@fluentui/react-toast_v9.8.4)
|
|
43
|
+
|
|
44
|
+
### Patches
|
|
45
|
+
|
|
46
|
+
- fix: remove unused react-dom and @types/react-dom peer dependencies, mark @types/react as optional ([PR #36559](https://github.com/microsoft/fluentui/pull/36559) by martinhochel@microsoft.com)
|
|
47
|
+
- Bump @fluentui/react-aria to v9.17.15 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
48
|
+
- Bump @fluentui/react-jsx-runtime to v9.4.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
49
|
+
- Bump @fluentui/react-motion to v9.16.4 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
50
|
+
- Bump @fluentui/react-motion-components-preview to v0.15.9 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
51
|
+
- Bump @fluentui/react-portal to v9.8.16 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
52
|
+
- Bump @fluentui/react-shared-contexts to v9.26.4 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
53
|
+
- Bump @fluentui/react-tabster to v9.26.18 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
54
|
+
- Bump @fluentui/react-utilities to v9.26.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
25
55
|
|
|
26
56
|
## [9.8.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-toast_v9.8.3)
|
|
27
57
|
|
package/README.md
CHANGED
|
@@ -3,3 +3,11 @@
|
|
|
3
3
|
**React Toast components for [Fluent UI React](https://react.fluentui.dev/)**
|
|
4
4
|
|
|
5
5
|
These are not production-ready components and **should never be used in product**. This space is useful for testing new components whose APIs might change before final release.
|
|
6
|
+
|
|
7
|
+
## CSS Modules alternative
|
|
8
|
+
|
|
9
|
+
Layered CSS Modules style hooks (`*.styles.css.ts`) are available as opt-in alternatives.
|
|
10
|
+
Configure the bundler to resolve `.styles` to `.styles.css.ts` before `.styles.ts`, and
|
|
11
|
+
`.styles.js` to `.styles.css.js` before `.styles.js`, and enable CSS Modules loading.
|
|
12
|
+
The default component imports continue to use Griffel. Browser styling parity, SSR,
|
|
13
|
+
and alternate-style VRT coverage must be validated before switching defaults.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AriaLive/AriaLive.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { useAriaLive_unstable } from './useAriaLive';\nimport { renderAriaLive_unstable } from './renderAriaLive';\nimport { useAriaLiveStyles_unstable } from './useAriaLiveStyles.styles';\nimport type { AriaLiveProps } from './AriaLive.types';\n\n/**\n * A component that manages aria live announcements imperatively\n */\nexport const AriaLive: React.FC<AriaLiveProps> = props => {\n const state = useAriaLive_unstable(props);\n\n useAriaLiveStyles_unstable(state);\n return renderAriaLive_unstable(state);\n};\n\nAriaLive.displayName = 'AriaLive';\n"],"names":["useAriaLive_unstable","renderAriaLive_unstable","useAriaLiveStyles_unstable","AriaLive","props","state","displayName"],"mappings":"AAAA;AAGA,SAASA,oBAAoB,QAAQ,mBAAgB;AACrD,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,0BAA0B,QAAQ,gCAA6B;AAGxE;;CAEC,GACD,OAAO,MAAMC,WAAoCC,CAAAA;IAC/C,MAAMC,QAAQL,qBAAqBI;IAEnCF,2BAA2BG;IAC3B,OAAOJ,wBAAwBI;AACjC,EAAE;AAEFF,SAASG,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AriaLive/AriaLive.types.ts"],"sourcesContent":["import type * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type AriaLiveSlots = {\n assertive: NonNullable<Slot<'div'>>;\n polite: NonNullable<Slot<'div'>>;\n};\n\nexport type AriaLivePoliteness = 'polite' | 'assertive';\n\n/**\n * AriaLive Props\n */\nexport type AriaLiveProps = ComponentProps<Partial<AriaLiveSlots>> & {\n announceRef: React.Ref<Announce>;\n children?: React.ReactNode;\n};\n\n/**\n * State used in rendering AriaLive\n */\nexport type AriaLiveState = ComponentState<AriaLiveSlots>;\n\nexport type Announce = (message: string, options: AnnounceOptions) => void;\n\nexport type LiveMessage = {\n message: string;\n createdAt: number;\n politeness: AriaLivePoliteness;\n};\n\nexport type AnnounceOptions = {\n politeness: AriaLivePoliteness;\n};\n"],"names":[],"mappings":"AA+BA,WAEE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AriaLive/index.ts"],"sourcesContent":["export { AriaLive } from './AriaLive';\nexport type {\n Announce,\n AnnounceOptions,\n AriaLivePoliteness,\n AriaLiveProps,\n AriaLiveSlots,\n AriaLiveState,\n LiveMessage,\n} from './AriaLive.types';\nexport { renderAriaLive_unstable } from './renderAriaLive';\nexport { useAriaLive_unstable } from './useAriaLive';\nexport { ariaLiveClassNames, useAriaLiveStyles_unstable } from './useAriaLiveStyles.styles';\n"],"names":["AriaLive","renderAriaLive_unstable","useAriaLive_unstable","ariaLiveClassNames","useAriaLiveStyles_unstable"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,gBAAa;AAUtC,SAASC,uBAAuB,QAAQ,sBAAmB;AAC3D,SAASC,oBAAoB,QAAQ,mBAAgB;AACrD,SAASC,kBAAkB,EAAEC,0BAA0B,QAAQ,gCAA6B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { assertSlots } from "@fluentui/react-utilities";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of AriaLive
|
|
5
5
|
*/ export const renderAriaLive_unstable = (state)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AriaLive/renderAriaLive.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { AriaLiveState, AriaLiveSlots } from './AriaLive.types';\n\n/**\n * Render the final JSX of AriaLive\n */\nexport const renderAriaLive_unstable = (state: AriaLiveState): JSXElement => {\n assertSlots<AriaLiveSlots>(state);\n\n return (\n <>\n <state.assertive />\n <state.polite />\n </>\n );\n};\n"],"names":["assertSlots","renderAriaLive_unstable","state","assertive","polite"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC;IACtCF,YAA2BE;IAE3B,qBACE;;0BACE,KAACA,MAAMC,SAAS;0BAChB,KAACD,MAAME,MAAM;;;AAGnB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AriaLive/useAriaLive.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { createPriorityQueue, useEventCallback, slot, useTimeout } from '@fluentui/react-utilities';\nimport type { AnnounceOptions, AriaLiveProps, AriaLiveState, LiveMessage } from './AriaLive.types';\n\n/** The duration the message needs to be in present in DOM for screen readers to register a change and announce */\nconst MESSAGE_DURATION = 500;\n\n/**\n * Create the state required to render AriaLive.\n *\n * The returned state can be modified with hooks such as useAriaLiveStyles_unstable,\n * before being passed to renderAriaLive_unstable.\n *\n * @param props - props from this instance of AriaLive\n */\nexport const useAriaLive_unstable = (props: AriaLiveProps): AriaLiveState => {\n const [currentMessage, setCurrentMessage] = React.useState<LiveMessage | undefined>(undefined);\n // Can't rely on Date.now() if user invokes announce more than once in a code block\n const order = React.useRef(0);\n const [messageQueue] = React.useState(() =>\n createPriorityQueue<LiveMessage>((a, b) => {\n if (a.politeness === b.politeness) {\n return a.createdAt - b.createdAt;\n }\n\n return a.politeness === 'assertive' ? -1 : 1;\n }),\n );\n\n const announce = useEventCallback((message: string, options: AnnounceOptions) => {\n const { politeness } = options;\n if (message === currentMessage?.message) {\n return;\n }\n\n const liveMessage: LiveMessage = {\n message,\n politeness,\n createdAt: order.current++,\n };\n\n if (!currentMessage) {\n setCurrentMessage(liveMessage);\n } else {\n messageQueue.enqueue(liveMessage);\n }\n });\n\n const [setMessageTimeout, clearMessageTimeout] = useTimeout();\n\n React.useEffect(() => {\n setMessageTimeout(() => {\n if (messageQueue.peek()) {\n setCurrentMessage(messageQueue.dequeue());\n } else {\n setCurrentMessage(undefined);\n }\n }, MESSAGE_DURATION);\n\n return () => clearMessageTimeout();\n }, [currentMessage, messageQueue, setMessageTimeout, clearMessageTimeout]);\n\n React.useImperativeHandle(props.announceRef, () => announce);\n\n const politeMessage = currentMessage?.politeness === 'polite' ? currentMessage.message : undefined;\n const assertiveMessage = currentMessage?.politeness === 'assertive' ? currentMessage.message : undefined;\n\n return {\n components: {\n assertive: 'div',\n polite: 'div',\n },\n\n assertive: slot.always(props.assertive, {\n defaultProps: { 'aria-live': 'assertive', children: assertiveMessage },\n elementType: 'div',\n }),\n polite: slot.always(props.polite, {\n defaultProps: { 'aria-live': 'polite', children: politeMessage },\n elementType: 'div',\n }),\n };\n};\n"],"names":["React","createPriorityQueue","useEventCallback","slot","useTimeout","MESSAGE_DURATION","useAriaLive_unstable","props","currentMessage","setCurrentMessage","useState","undefined","order","useRef","messageQueue","a","b","politeness","createdAt","announce","message","options","liveMessage","current","enqueue","setMessageTimeout","clearMessageTimeout","useEffect","peek","dequeue","useImperativeHandle","announceRef","politeMessage","assertiveMessage","components","assertive","polite","always","defaultProps","children","elementType"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,mBAAmB,EAAEC,gBAAgB,EAAEC,IAAI,EAAEC,UAAU,QAAQ,4BAA4B;AAGpG,gHAAgH,GAChH,MAAMC,mBAAmB;AAEzB;;;;;;;CAOC,GACD,OAAO,MAAMC,uBAAuB,CAACC;IACnC,MAAM,CAACC,gBAAgBC,kBAAkB,GAAGT,MAAMU,QAAQ,CAA0BC;IACpF,mFAAmF;IACnF,MAAMC,QAAQZ,MAAMa,MAAM,CAAC;IAC3B,MAAM,CAACC,aAAa,GAAGd,MAAMU,QAAQ,CAAC,IACpCT,oBAAiC,CAACc,GAAGC;YACnC,IAAID,EAAEE,UAAU,KAAKD,EAAEC,UAAU,EAAE;gBACjC,OAAOF,EAAEG,SAAS,GAAGF,EAAEE,SAAS;YAClC;YAEA,OAAOH,EAAEE,UAAU,KAAK,cAAc,CAAC,IAAI;QAC7C;IAGF,MAAME,WAAWjB,iBAAiB,CAACkB,SAAiBC;QAClD,MAAM,EAAEJ,UAAU,EAAE,GAAGI;QACvB,IAAID,aAAYZ,2BAAAA,qCAAAA,eAAgBY,OAAO,GAAE;YACvC;QACF;QAEA,MAAME,cAA2B;YAC/BF;YACAH;YACAC,WAAWN,MAAMW,OAAO;QAC1B;QAEA,IAAI,CAACf,gBAAgB;YACnBC,kBAAkBa;QACpB,OAAO;YACLR,aAAaU,OAAO,CAACF;QACvB;IACF;IAEA,MAAM,CAACG,mBAAmBC,oBAAoB,GAAGtB;IAEjDJ,MAAM2B,SAAS,CAAC;QACdF,kBAAkB;YAChB,IAAIX,aAAac,IAAI,IAAI;gBACvBnB,kBAAkBK,aAAae,OAAO;YACxC,OAAO;gBACLpB,kBAAkBE;YACpB;QACF,GAAGN;QAEH,OAAO,IAAMqB;IACf,GAAG;QAAClB;QAAgBM;QAAcW;QAAmBC;KAAoB;IAEzE1B,MAAM8B,mBAAmB,CAACvB,MAAMwB,WAAW,EAAE,IAAMZ;IAEnD,MAAMa,gBAAgBxB,CAAAA,2BAAAA,qCAAAA,eAAgBS,UAAU,MAAK,WAAWT,eAAeY,OAAO,GAAGT;IACzF,MAAMsB,mBAAmBzB,CAAAA,2BAAAA,qCAAAA,eAAgBS,UAAU,MAAK,cAAcT,eAAeY,OAAO,GAAGT;IAE/F,OAAO;QACLuB,YAAY;YACVC,WAAW;YACXC,QAAQ;QACV;QAEAD,WAAWhC,KAAKkC,MAAM,CAAC9B,MAAM4B,SAAS,EAAE;YACtCG,cAAc;gBAAE,aAAa;gBAAaC,UAAUN;YAAiB;YACrEO,aAAa;QACf;QACAJ,QAAQjC,KAAKkC,MAAM,CAAC9B,MAAM6B,MAAM,EAAE;YAChCE,cAAc;gBAAE,aAAa;gBAAUC,UAAUP;YAAc;YAC/DQ,aAAa;QACf;IACF;AACF,EAAE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import styles from "./AriaLive.module.css";
|
|
3
|
+
export const ariaLiveClassNames = {
|
|
4
|
+
assertive: 'fui-AriaLive__assertive',
|
|
5
|
+
polite: 'fui-AriaLive__polite'
|
|
6
|
+
};
|
|
7
|
+
export const useAriaLiveStyles_unstable = (state)=>{
|
|
8
|
+
state.assertive.className = clsx(styles.visuallyHidden, ariaLiveClassNames.assertive, state.assertive.className);
|
|
9
|
+
state.polite.className = clsx(styles.visuallyHidden, ariaLiveClassNames.polite, state.polite.className);
|
|
10
|
+
return state;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AriaLive/useAriaLiveStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { AriaLiveSlots, AriaLiveState } from './AriaLive.types';\nimport styles from './AriaLive.module.css';\n\nexport const ariaLiveClassNames: SlotClassNames<AriaLiveSlots> = {\n assertive: 'fui-AriaLive__assertive',\n polite: 'fui-AriaLive__polite',\n};\n\nexport const useAriaLiveStyles_unstable = (state: AriaLiveState): AriaLiveState => {\n state.assertive.className = clsx(styles.visuallyHidden, ariaLiveClassNames.assertive, state.assertive.className);\n state.polite.className = clsx(styles.visuallyHidden, ariaLiveClassNames.polite, state.polite.className);\n return state;\n};\n"],"names":["clsx","styles","ariaLiveClassNames","assertive","polite","useAriaLiveStyles_unstable","state","className","visuallyHidden"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,wBAAwB;AAE3C,OAAO,MAAMC,qBAAoD;IAC/DC,WAAW;IACXC,QAAQ;AACV,EAAE;AAEF,OAAO,MAAMC,6BAA6B,CAACC;IACzCA,MAAMH,SAAS,CAACI,SAAS,GAAGP,KAAKC,OAAOO,cAAc,EAAEN,mBAAmBC,SAAS,EAAEG,MAAMH,SAAS,CAACI,SAAS;IAC/GD,MAAMF,MAAM,CAACG,SAAS,GAAGP,KAAKC,OAAOO,cAAc,EAAEN,mBAAmBE,MAAM,EAAEE,MAAMF,MAAM,CAACG,SAAS;IACtG,OAAOD;AACT,EAAE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import styles from "./AriaLive.module.css";
|
|
3
|
+
export const ariaLiveClassNames = {
|
|
4
|
+
assertive: 'fui-AriaLive__assertive',
|
|
5
|
+
polite: 'fui-AriaLive__polite'
|
|
6
|
+
};
|
|
7
|
+
export const useAriaLiveStyles_unstable = (state)=>{
|
|
8
|
+
state.assertive.className = clsx(styles.visuallyHidden, ariaLiveClassNames.assertive, state.assertive.className);
|
|
9
|
+
state.polite.className = clsx(styles.visuallyHidden, ariaLiveClassNames.polite, state.polite.className);
|
|
10
|
+
return state;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AriaLive/useAriaLiveStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { AriaLiveSlots, AriaLiveState } from './AriaLive.types';\nimport styles from './AriaLive.module.css';\n\nexport const ariaLiveClassNames: SlotClassNames<AriaLiveSlots> = {\n assertive: 'fui-AriaLive__assertive',\n polite: 'fui-AriaLive__polite',\n};\n\nexport const useAriaLiveStyles_unstable = (state: AriaLiveState): AriaLiveState => {\n state.assertive.className = clsx(styles.visuallyHidden, ariaLiveClassNames.assertive, state.assertive.className);\n state.polite.className = clsx(styles.visuallyHidden, ariaLiveClassNames.polite, state.polite.className);\n return state;\n};\n"],"names":["clsx","styles","ariaLiveClassNames","assertive","polite","useAriaLiveStyles_unstable","state","className","visuallyHidden"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,wBAAwB;AAE3C,OAAO,MAAMC,qBAAoD;IAC/DC,WAAW;IACXC,QAAQ;AACV,EAAE;AAEF,OAAO,MAAMC,6BAA6B,CAACC;IACzCA,MAAMH,SAAS,CAACI,SAAS,GAAGP,KAAKC,OAAOO,cAAc,EAAEN,mBAAmBC,SAAS,EAAEG,MAAMH,SAAS,CAACI,SAAS;IAC/GD,MAAMF,MAAM,CAACG,SAAS,GAAGP,KAAKC,OAAOO,cAAc,EAAEN,mBAAmBE,MAAM,EAAEE,MAAMF,MAAM,CAACG,SAAS;IACtG,OAAOD;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/AriaLive/useAriaLiveStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { mergeClasses, makeResetStyles } from '@griffel/react';\nimport type { AriaLiveSlots, AriaLiveState } from './AriaLive.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const ariaLiveClassNames: SlotClassNames<AriaLiveSlots> = {\n assertive: 'fui-AriaLive__assertive',\n polite: 'fui-AriaLive__polite',\n};\n\n/**\n * Styles for the root slot\n */\nconst useResetStyles = makeResetStyles({\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0px',\n width: '1px',\n position: 'absolute',\n});\n\n/**\n * Apply styling to the AriaLive slots based on the state\n */\nexport const useAriaLiveStyles_unstable = (state: AriaLiveState): AriaLiveState => {\n const visuallyHidden = useResetStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.assertive.className = mergeClasses(visuallyHidden, ariaLiveClassNames.assertive, state.assertive.className);\n // eslint-disable-next-line react-hooks/immutability\n state.polite.className = mergeClasses(visuallyHidden, ariaLiveClassNames.polite, state.polite.className);\n\n return state;\n};\n"],"names":["mergeClasses","makeResetStyles","ariaLiveClassNames","assertive","polite","useResetStyles","clip","height","margin","overflow","padding","width","position","useAriaLiveStyles_unstable","state","visuallyHidden","className"],"mappings":"AAAA;AAEA,SAASA,YAAY,EAAEC,eAAe,QAAQ,iBAAiB;AAI/D,OAAO,MAAMC,qBAAoD;IAC/DC,WAAW;IACXC,QAAQ;AACV,EAAE;AAEF;;CAEC,GACD,MAAMC,iBAAiBJ,gBAAgB;IACrCK,MAAM;IACNC,QAAQ;IACRC,QAAQ;IACRC,UAAU;IACVC,SAAS;IACTC,OAAO;IACPC,UAAU;AACZ;AAEA;;CAEC,GACD,OAAO,MAAMC,6BAA6B,CAACC;IACzC,MAAMC,iBAAiBV;IACvB,oDAAoD;IACpDS,MAAMX,SAAS,CAACa,SAAS,GAAGhB,aAAae,gBAAgBb,mBAAmBC,SAAS,EAAEW,MAAMX,SAAS,CAACa,SAAS;IAChH,oDAAoD;IACpDF,MAAMV,MAAM,CAACY,SAAS,GAAGhB,aAAae,gBAAgBb,mBAAmBE,MAAM,EAAEU,MAAMV,MAAM,CAACY,SAAS;IAEvG,OAAOF;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Timer/Timer.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useBaseAnimationStyles } from './useTimerStyles.styles';\n\nexport type TimerProps = {\n running: boolean;\n timeout: number;\n // eslint-disable-next-line @nx/workspace-consistent-callback-type -- can't change type of existing callback\n onTimeout: () => void;\n as?: 'span';\n};\n\nexport const Timer = React.forwardRef<HTMLDivElement, TimerProps>((props, ref) => {\n const baseAnimationStyles = useBaseAnimationStyles();\n const { running, timeout, onTimeout } = props;\n\n const style: React.CSSProperties = {\n animationDuration: `${timeout}ms`,\n animationPlayState: running ? 'running' : 'paused',\n };\n\n if (timeout < 0) {\n return null;\n }\n\n return (\n <span\n onAnimationEnd={onTimeout}\n data-timer-status={style.animationPlayState}\n ref={ref}\n style={style}\n className={baseAnimationStyles}\n />\n );\n});\n\nTimer.displayName = 'Timer';\n"],"names":["React","useBaseAnimationStyles","Timer","forwardRef","props","ref","baseAnimationStyles","running","timeout","onTimeout","style","animationDuration","animationPlayState","span","onAnimationEnd","data-timer-status","className","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,sBAAsB,QAAQ,6BAA0B;AAUjE,OAAO,MAAMC,sBAAQF,MAAMG,UAAU,CAA6B,CAACC,OAAOC;IACxE,MAAMC,sBAAsBL;IAC5B,MAAM,EAAEM,OAAO,EAAEC,OAAO,EAAEC,SAAS,EAAE,GAAGL;IAExC,MAAMM,QAA6B;QACjCC,mBAAmB,GAAGH,QAAQ,EAAE,CAAC;QACjCI,oBAAoBL,UAAU,YAAY;IAC5C;IAEA,IAAIC,UAAU,GAAG;QACf,OAAO;IACT;IAEA,qBACE,oBAACK;QACCC,gBAAgBL;QAChBM,qBAAmBL,MAAME,kBAAkB;QAC3CP,KAAKA;QACLK,OAAOA;QACPM,WAAWV;;AAGjB,GAAG;AAEHJ,MAAMe,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Timer/index.ts"],"sourcesContent":["export type { TimerProps } from './Timer';\nexport { Timer } from './Timer';\n"],"names":["Timer"],"mappings":"AACA,SAASA,KAAK,QAAQ,aAAU"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Timer/useTimerStyles.styles.css.ts"],"sourcesContent":["import styles from './Timer.module.css';\n\nexport const useBaseAnimationStyles = (): string => styles.baseAnimation;\n"],"names":["styles","useBaseAnimationStyles","baseAnimation"],"mappings":"AAAA,OAAOA,YAAY,qBAAqB;AAExC,OAAO,MAAMC,yBAAyB,IAAcD,OAAOE,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Timer/useTimerStyles.styles.css.ts"],"sourcesContent":["import styles from './Timer.module.css';\n\nexport const useBaseAnimationStyles = (): string => styles.baseAnimation;\n"],"names":["styles","useBaseAnimationStyles","baseAnimation"],"mappings":"AAAA,OAAOA,YAAY,qBAAqB;AAExC,OAAO,MAAMC,yBAAyB,IAAcD,OAAOE,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Timer/useTimerStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles } from '@griffel/react';\n\nexport const useBaseAnimationStyles = makeResetStyles({\n animationName: {\n from: {\n opacity: 0,\n },\n to: {\n opacity: 0,\n },\n },\n});\n"],"names":["makeResetStyles","useBaseAnimationStyles","animationName","from","opacity","to"],"mappings":"AAAA;AAEA,SAASA,eAAe,QAAQ,iBAAiB;AAEjD,OAAO,MAAMC,yBAAyBD,gBAAgB;IACpDE,eAAe;QACbC,MAAM;YACJC,SAAS;QACX;QACAC,IAAI;YACFD,SAAS;QACX;IACF;AACF,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Toast/Toast.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useToast_unstable } from './useToast';\nimport { renderToast_unstable } from './renderToast';\nimport { useToastStyles_unstable } from './useToastStyles.styles';\nimport type { ToastProps } from './Toast.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useToastContextValues_unstable } from './useToastContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Toast component\n */\nexport const Toast: ForwardRefComponent<ToastProps> = React.forwardRef((props, ref) => {\n const state = useToast_unstable(props, ref);\n\n useToastStyles_unstable(state);\n useCustomStyleHook_unstable('useToastStyles_unstable')(state);\n\n return renderToast_unstable(state, useToastContextValues_unstable(state));\n});\n\nToast.displayName = 'Toast';\n"],"names":["React","useToast_unstable","renderToast_unstable","useToastStyles_unstable","useToastContextValues_unstable","useCustomStyleHook_unstable","Toast","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,iBAAiB,QAAQ,gBAAa;AAC/C,SAASC,oBAAoB,QAAQ,mBAAgB;AACrD,SAASC,uBAAuB,QAAQ,6BAA0B;AAGlE,SAASC,8BAA8B,QAAQ,6BAA0B;AACzE,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,sBAAyCN,MAAMO,UAAU,CAAC,CAACC,OAAOC;IAC7E,MAAMC,QAAQT,kBAAkBO,OAAOC;IAEvCN,wBAAwBO;IACxBL,4BAA4B,2BAA2BK;IAEvD,OAAOR,qBAAqBQ,OAAON,+BAA+BM;AACpE,GAAG;AAEHJ,MAAMK,WAAW,GAAG"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@layer fluentui {
|
|
2
|
+
.root {
|
|
3
|
+
display: grid;
|
|
4
|
+
grid-template-columns: auto 1fr auto;
|
|
5
|
+
padding: var(--spacingVerticalM) var(--spacingHorizontalM);
|
|
6
|
+
border-radius: var(--borderRadiusMedium);
|
|
7
|
+
border: var(--strokeWidthThin) solid var(--colorTransparentStroke);
|
|
8
|
+
box-shadow: var(--shadow8);
|
|
9
|
+
font-size: var(--fontSizeBase300);
|
|
10
|
+
line-height: var(--lineHeightBase300);
|
|
11
|
+
font-weight: var(--fontWeightSemibold);
|
|
12
|
+
color: var(--colorNeutralForeground1);
|
|
13
|
+
background-color: var(--colorNeutralBackground1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.inverted {
|
|
17
|
+
color: var(--colorNeutralForegroundInverted2);
|
|
18
|
+
background-color: var(--colorNeutralBackgroundInverted);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Toast/Toast.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { BackgroundAppearanceContextValue } from '@fluentui/react-shared-contexts';\nimport type { ToastIntent } from '../../state/types';\n\nexport type ToastSlots = {\n root: Slot<'div'>;\n};\n\nexport type ToastContextValues = {\n backgroundAppearance: BackgroundAppearanceContextValue;\n};\n\n/**\n * Toast Props\n */\nexport type ToastProps = ComponentProps<ToastSlots> & {\n appearance?: BackgroundAppearanceContextValue;\n};\n\n/**\n * Toast Props without design-only props.\n */\nexport type ToastBaseProps = Omit<ToastProps, 'appearance'>;\n\n/**\n * State used in rendering Toast\n */\nexport type ToastState = ComponentState<ToastSlots> & {\n backgroundAppearance: BackgroundAppearanceContextValue;\n intent?: ToastIntent | undefined;\n};\n\n/**\n * State used in rendering Toast, without design-only state.\n */\nexport type ToastBaseState = Omit<ToastState, 'backgroundAppearance'>;\n"],"names":[],"mappings":"AAgCA;;CAEC,GACD,WAAsE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Toast/index.ts"],"sourcesContent":["export { Toast } from './Toast';\nexport type {\n ToastBaseProps,\n ToastBaseState,\n ToastContextValues,\n ToastProps,\n ToastSlots,\n ToastState,\n} from './Toast.types';\nexport { renderToast_unstable } from './renderToast';\nexport { useToastBase_unstable, useToast_unstable } from './useToast';\nexport { toastClassNames, useToastStyles_unstable } from './useToastStyles.styles';\n"],"names":["Toast","renderToast_unstable","useToastBase_unstable","useToast_unstable","toastClassNames","useToastStyles_unstable"],"mappings":"AAAA,SAASA,KAAK,QAAQ,aAAU;AAShC,SAASC,oBAAoB,QAAQ,mBAAgB;AACrD,SAASC,qBAAqB,EAAEC,iBAAiB,QAAQ,gBAAa;AACtE,SAASC,eAAe,EAAEC,uBAAuB,QAAQ,6BAA0B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { assertSlots } from "@fluentui/react-utilities";
|
|
1
|
+
import { jsx as _jsx } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
3
3
|
import { BackgroundAppearanceProvider } from "@fluentui/react-shared-contexts";
|
|
4
4
|
/**
|
|
5
5
|
* Render the final JSX of Toast
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Toast/renderToast.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { BackgroundAppearanceProvider } from '@fluentui/react-shared-contexts';\nimport type { ToastState, ToastSlots, ToastContextValues } from './Toast.types';\n\n/**\n * Render the final JSX of Toast\n */\nexport const renderToast_unstable = (state: ToastState, contextValues: ToastContextValues): JSXElement => {\n assertSlots<ToastSlots>(state);\n\n return (\n <BackgroundAppearanceProvider value={contextValues.backgroundAppearance}>\n <state.root />\n </BackgroundAppearanceProvider>\n );\n};\n"],"names":["assertSlots","BackgroundAppearanceProvider","renderToast_unstable","state","contextValues","value","backgroundAppearance","root"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GACjD,SAASA,WAAW,QAAQ,4BAA4B;AAExD,SAASC,4BAA4B,QAAQ,kCAAkC;AAG/E;;CAEC,GACD,OAAO,MAAMC,uBAAuB,CAACC,OAAmBC;IACtDJ,YAAwBG;IAExB,qBACE,KAACF;QAA6BI,OAAOD,cAAcE,oBAAoB;kBACrE,cAAA,KAACH,MAAMI,IAAI;;AAGjB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Toast/useToast.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { ToastBaseProps, ToastBaseState, ToastProps, ToastState } from './Toast.types';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\n\n/**\n * Create the base state required to render Toast, without design-only props.\n *\n * @param props - props from this instance of Toast (without appearance)\n * @param ref - reference to root HTMLElement of Toast\n */\nexport const useToastBase_unstable = (props: ToastBaseProps, ref: React.Ref<HTMLElement>): ToastBaseState => {\n const { intent } = useToastContainerContext();\n\n return {\n components: {\n root: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n ...props,\n }),\n { elementType: 'div' },\n ),\n intent,\n };\n};\n\n/**\n * Create the state required to render Toast.\n *\n * The returned state can be modified with hooks such as useToastStyles_unstable,\n * before being passed to renderToast_unstable.\n *\n * @param props - props from this instance of Toast\n * @param ref - reference to root HTMLElement of Toast\n */\nexport const useToast_unstable = (props: ToastProps, ref: React.Ref<HTMLElement>): ToastState => {\n const state = useToastBase_unstable(props, ref);\n return {\n ...state,\n backgroundAppearance: props.appearance,\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useToastContainerContext","useToastBase_unstable","props","ref","intent","components","root","always","elementType","useToast_unstable","state","backgroundAppearance","appearance"],"mappings":"AAAA;AAGA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,wBAAwB,QAAQ,0CAAuC;AAEhF;;;;;CAKC,GACD,OAAO,MAAMC,wBAAwB,CAACC,OAAuBC;IAC3D,MAAM,EAAEC,MAAM,EAAE,GAAGJ;IAEnB,OAAO;QACLK,YAAY;YACVC,MAAM;QACR;QACAA,MAAMP,KAAKQ,MAAM,CACfT,yBAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FK,KAAKA;YACL,GAAGD,KAAK;QACV,IACA;YAAEM,aAAa;QAAM;QAEvBJ;IACF;AACF,EAAE;AAEF;;;;;;;;CAQC,GACD,OAAO,MAAMK,oBAAoB,CAACP,OAAmBC;IACnD,MAAMO,QAAQT,sBAAsBC,OAAOC;IAC3C,OAAO;QACL,GAAGO,KAAK;QACRC,sBAAsBT,MAAMU,UAAU;IACxC;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Toast/useToastContextValues.ts"],"sourcesContent":["import type { ToastContextValues, ToastState } from './Toast.types';\n\nexport function useToastContextValues_unstable(state: ToastState): ToastContextValues {\n const { backgroundAppearance } = state;\n\n return {\n backgroundAppearance,\n };\n}\n"],"names":["useToastContextValues_unstable","state","backgroundAppearance"],"mappings":"AAEA,OAAO,SAASA,+BAA+BC,KAAiB;IAC9D,MAAM,EAAEC,oBAAoB,EAAE,GAAGD;IAEjC,OAAO;QACLC;IACF;AACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import styles from "./Toast.module.css";
|
|
3
|
+
export const toastClassNames = {
|
|
4
|
+
root: 'fui-Toast'
|
|
5
|
+
};
|
|
6
|
+
export const useToastStyles_unstable = (state)=>{
|
|
7
|
+
state.root.className = clsx(toastClassNames.root, styles.root, state.backgroundAppearance === 'inverted' && styles.inverted, state.root.className);
|
|
8
|
+
return state;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Toast/useToastStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { ToastSlots, ToastState } from './Toast.types';\nimport styles from './Toast.module.css';\n\nexport const toastClassNames: SlotClassNames<ToastSlots> = {\n root: 'fui-Toast',\n};\n\nexport const useToastStyles_unstable = (state: ToastState): ToastState => {\n state.root.className = clsx(\n toastClassNames.root,\n styles.root,\n state.backgroundAppearance === 'inverted' && styles.inverted,\n state.root.className,\n );\n return state;\n};\n"],"names":["clsx","styles","toastClassNames","root","useToastStyles_unstable","state","className","backgroundAppearance","inverted"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,qBAAqB;AAExC,OAAO,MAAMC,kBAA8C;IACzDC,MAAM;AACR,EAAE;AAEF,OAAO,MAAMC,0BAA0B,CAACC;IACtCA,MAAMF,IAAI,CAACG,SAAS,GAAGN,KACrBE,gBAAgBC,IAAI,EACpBF,OAAOE,IAAI,EACXE,MAAME,oBAAoB,KAAK,cAAcN,OAAOO,QAAQ,EAC5DH,MAAMF,IAAI,CAACG,SAAS;IAEtB,OAAOD;AACT,EAAE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import styles from "./Toast.module.css";
|
|
3
|
+
export const toastClassNames = {
|
|
4
|
+
root: 'fui-Toast'
|
|
5
|
+
};
|
|
6
|
+
export const useToastStyles_unstable = (state)=>{
|
|
7
|
+
state.root.className = clsx(toastClassNames.root, styles.root, state.backgroundAppearance === 'inverted' && styles.inverted, state.root.className);
|
|
8
|
+
return state;
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Toast/useToastStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { ToastSlots, ToastState } from './Toast.types';\nimport styles from './Toast.module.css';\n\nexport const toastClassNames: SlotClassNames<ToastSlots> = {\n root: 'fui-Toast',\n};\n\nexport const useToastStyles_unstable = (state: ToastState): ToastState => {\n state.root.className = clsx(\n toastClassNames.root,\n styles.root,\n state.backgroundAppearance === 'inverted' && styles.inverted,\n state.root.className,\n );\n return state;\n};\n"],"names":["clsx","styles","toastClassNames","root","useToastStyles_unstable","state","className","backgroundAppearance","inverted"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,qBAAqB;AAExC,OAAO,MAAMC,kBAA8C;IACzDC,MAAM;AACR,EAAE;AAEF,OAAO,MAAMC,0BAA0B,CAACC;IACtCA,MAAMF,IAAI,CAACG,SAAS,GAAGN,KACrBE,gBAAgBC,IAAI,EACpBF,OAAOE,IAAI,EACXE,MAAME,oBAAoB,KAAK,cAAcN,OAAOO,QAAQ,EAC5DH,MAAMF,IAAI,CAACG,SAAS;IAEtB,OAAOD;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Toast/useToastStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { ToastSlots, ToastState } from './Toast.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const toastClassNames: SlotClassNames<ToastSlots> = {\n root: 'fui-Toast',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n display: 'grid',\n gridTemplateColumns: 'auto 1fr auto',\n padding: '12px',\n borderRadius: tokens.borderRadiusMedium,\n border: `1px solid ${tokens.colorTransparentStroke}`,\n boxShadow: tokens.shadow8,\n fontSize: tokens.fontSizeBase300,\n lineHeight: '20px',\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.colorNeutralForeground1,\n backgroundColor: tokens.colorNeutralBackground1,\n});\n\nconst useStyles = makeStyles({\n inverted: {\n color: tokens.colorNeutralForegroundInverted2,\n backgroundColor: tokens.colorNeutralBackgroundInverted,\n },\n});\n\n/**\n * Apply styling to the Toast slots based on the state\n */\nexport const useToastStyles_unstable = (state: ToastState): ToastState => {\n const rootBaseClassName = useRootBaseClassName();\n const styles = useStyles();\n // eslint-disable-next-line react-hooks/immutability\n state.root.className = mergeClasses(\n toastClassNames.root,\n rootBaseClassName,\n state.backgroundAppearance === 'inverted' && styles.inverted,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","tokens","toastClassNames","root","useRootBaseClassName","display","gridTemplateColumns","padding","borderRadius","borderRadiusMedium","border","colorTransparentStroke","boxShadow","shadow8","fontSize","fontSizeBase300","lineHeight","fontWeight","fontWeightSemibold","color","colorNeutralForeground1","backgroundColor","colorNeutralBackground1","useStyles","inverted","colorNeutralForegroundInverted2","colorNeutralBackgroundInverted","useToastStyles_unstable","state","rootBaseClassName","styles","className","backgroundAppearance"],"mappings":"AAAA;AAEA,SAASA,eAAe,EAAEC,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAC3E,SAASC,MAAM,QAAQ,wBAAwB;AAI/C,OAAO,MAAMC,kBAA8C;IACzDC,MAAM;AACR,EAAE;AAEF,MAAMC,uBAAuBN,gBAAgB;IAC3CO,SAAS;IACTC,qBAAqB;IACrBC,SAAS;IACTC,cAAcP,OAAOQ,kBAAkB;IACvCC,QAAQ,CAAC,UAAU,EAAET,OAAOU,sBAAsB,EAAE;IACpDC,WAAWX,OAAOY,OAAO;IACzBC,UAAUb,OAAOc,eAAe;IAChCC,YAAY;IACZC,YAAYhB,OAAOiB,kBAAkB;IACrCC,OAAOlB,OAAOmB,uBAAuB;IACrCC,iBAAiBpB,OAAOqB,uBAAuB;AACjD;AAEA,MAAMC,YAAYxB,WAAW;IAC3ByB,UAAU;QACRL,OAAOlB,OAAOwB,+BAA+B;QAC7CJ,iBAAiBpB,OAAOyB,8BAA8B;IACxD;AACF;AAEA;;CAEC,GACD,OAAO,MAAMC,0BAA0B,CAACC;IACtC,MAAMC,oBAAoBzB;IAC1B,MAAM0B,SAASP;IACf,oDAAoD;IACpDK,MAAMzB,IAAI,CAAC4B,SAAS,GAAG/B,aACrBE,gBAAgBC,IAAI,EACpB0B,mBACAD,MAAMI,oBAAoB,KAAK,cAAcF,OAAON,QAAQ,EAC5DI,MAAMzB,IAAI,CAAC4B,SAAS;IAGtB,OAAOH;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToastBody/ToastBody.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useToastBody_unstable } from './useToastBody';\nimport { renderToastBody_unstable } from './renderToastBody';\nimport { useToastBodyStyles_unstable } from './useToastBodyStyles.styles';\nimport type { ToastBodyProps } from './ToastBody.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ToastBody component\n */\nexport const ToastBody: ForwardRefComponent<ToastBodyProps> = React.forwardRef((props, ref) => {\n const state = useToastBody_unstable(props, ref);\n\n useToastBodyStyles_unstable(state);\n useCustomStyleHook_unstable('useToastBodyStyles_unstable')(state);\n\n return renderToastBody_unstable(state);\n});\n\nToastBody.displayName = 'ToastBody';\n"],"names":["React","useToastBody_unstable","renderToastBody_unstable","useToastBodyStyles_unstable","useCustomStyleHook_unstable","ToastBody","forwardRef","props","ref","state","displayName"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,QAAQ,oBAAiB;AACvD,SAASC,wBAAwB,QAAQ,uBAAoB;AAC7D,SAASC,2BAA2B,QAAQ,iCAA8B;AAG1E,SAASC,2BAA2B,QAAQ,kCAAkC;AAE9E;;CAEC,GACD,OAAO,MAAMC,0BAAiDL,MAAMM,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQR,sBAAsBM,OAAOC;IAE3CL,4BAA4BM;IAC5BL,4BAA4B,+BAA+BK;IAE3D,OAAOP,yBAAyBO;AAClC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@layer fluentui {
|
|
2
|
+
.root {
|
|
3
|
+
grid-column: 2 / 3;
|
|
4
|
+
padding-top: var(--spacingVerticalSNudge);
|
|
5
|
+
font-size: var(--fontSizeBase300);
|
|
6
|
+
line-height: var(--lineHeightBase300);
|
|
7
|
+
font-weight: var(--fontWeightRegular);
|
|
8
|
+
color: var(--colorNeutralForeground1);
|
|
9
|
+
word-break: break-word;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.subtitle {
|
|
13
|
+
padding-top: var(--spacingVerticalXS);
|
|
14
|
+
grid-column: 2 / 3;
|
|
15
|
+
font-size: var(--fontSizeBase200);
|
|
16
|
+
line-height: var(--fontSizeBase200);
|
|
17
|
+
font-weight: var(--fontWeightRegular);
|
|
18
|
+
color: var(--colorNeutralForeground2);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.inverted {
|
|
22
|
+
color: var(--colorNeutralForegroundInverted2);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToastBody/ToastBody.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { BackgroundAppearanceContextValue } from '@fluentui/react-shared-contexts';\n\nexport type ToastBodySlots = {\n root: Slot<'div'>;\n subtitle?: Slot<'div'>;\n};\n\n/**\n * ToastBody Props\n */\nexport type ToastBodyProps = ComponentProps<ToastBodySlots> & {};\n\n/**\n * ToastBody Props without design-only props.\n */\nexport type ToastBodyBaseProps = ToastBodyProps;\n\n/**\n * State used in rendering ToastBody\n */\nexport type ToastBodyState = ComponentState<ToastBodySlots> & {\n backgroundAppearance: BackgroundAppearanceContextValue;\n};\n\n/**\n * State used in rendering ToastBody, without design-only state.\n */\nexport type ToastBodyBaseState = Omit<ToastBodyState, 'backgroundAppearance'>;\n"],"names":[],"mappings":"AAyBA;;CAEC,GACD,WAA8E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToastBody/index.ts"],"sourcesContent":["export { ToastBody } from './ToastBody';\nexport type {\n ToastBodyBaseProps,\n ToastBodyBaseState,\n ToastBodyProps,\n ToastBodySlots,\n ToastBodyState,\n} from './ToastBody.types';\nexport { renderToastBody_unstable } from './renderToastBody';\nexport { useToastBodyBase_unstable, useToastBody_unstable } from './useToastBody';\nexport { toastBodyClassNames, useToastBodyStyles_unstable } from './useToastBodyStyles.styles';\n"],"names":["ToastBody","renderToastBody_unstable","useToastBodyBase_unstable","useToastBody_unstable","toastBodyClassNames","useToastBodyStyles_unstable"],"mappings":"AAAA,SAASA,SAAS,QAAQ,iBAAc;AAQxC,SAASC,wBAAwB,QAAQ,uBAAoB;AAC7D,SAASC,yBAAyB,EAAEC,qBAAqB,QAAQ,oBAAiB;AAClF,SAASC,mBAAmB,EAAEC,2BAA2B,QAAQ,iCAA8B"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { assertSlots } from "@fluentui/react-utilities";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@fluentui/react-jsx-runtime/jsx-runtime";
|
|
2
|
+
import { assertSlots } from "@fluentui/react-utilities";
|
|
3
3
|
/**
|
|
4
4
|
* Render the final JSX of ToastBody
|
|
5
5
|
*/ export const renderToastBody_unstable = (state)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToastBody/renderToastBody.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { ToastBodyState, ToastBodySlots } from './ToastBody.types';\n\n/**\n * Render the final JSX of ToastBody\n */\nexport const renderToastBody_unstable = (state: ToastBodyState): JSXElement => {\n assertSlots<ToastBodySlots>(state);\n\n return (\n <>\n <state.root />\n {state.subtitle ? <state.subtitle /> : null}\n </>\n );\n};\n"],"names":["assertSlots","renderToastBody_unstable","state","root","subtitle"],"mappings":";AAAA,0BAA0B,GAC1B,iDAAiD,GAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAIxD;;CAEC,GACD,OAAO,MAAMC,2BAA2B,CAACC;IACvCF,YAA4BE;IAE5B,qBACE;;0BACE,KAACA,MAAMC,IAAI;YACVD,MAAME,QAAQ,iBAAG,KAACF,MAAME,QAAQ,QAAM;;;AAG7C,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToastBody/useToastBody.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { ToastBodyBaseProps, ToastBodyBaseState, ToastBodyProps, ToastBodyState } from './ToastBody.types';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\nimport { useBackgroundAppearance } from '@fluentui/react-shared-contexts';\n\n/**\n * Create the base state required to render ToastBody, without design-only props.\n *\n * @param props - props from this instance of ToastBody\n * @param ref - reference to root HTMLElement of ToastBody\n */\nexport const useToastBodyBase_unstable = (\n props: ToastBodyBaseProps,\n ref: React.Ref<HTMLElement>,\n): ToastBodyBaseState => {\n const { bodyId } = useToastContainerContext();\n return {\n components: {\n root: 'div',\n subtitle: 'div',\n },\n subtitle: slot.optional(props.subtitle, { elementType: 'div' }),\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: ref as React.Ref<HTMLDivElement>,\n id: bodyId,\n ...props,\n }),\n { elementType: 'div' },\n ),\n };\n};\n\n/**\n * Create the state required to render ToastBody.\n *\n * The returned state can be modified with hooks such as useToastBodyStyles_unstable,\n * before being passed to renderToastBody_unstable.\n *\n * @param props - props from this instance of ToastBody\n * @param ref - reference to root HTMLElement of ToastBody\n */\nexport const useToastBody_unstable = (props: ToastBodyProps, ref: React.Ref<HTMLElement>): ToastBodyState => {\n const backgroundAppearance = useBackgroundAppearance();\n return {\n ...useToastBodyBase_unstable(props, ref),\n backgroundAppearance,\n };\n};\n"],"names":["getIntrinsicElementProps","slot","useToastContainerContext","useBackgroundAppearance","useToastBodyBase_unstable","props","ref","bodyId","components","root","subtitle","optional","elementType","always","id","useToastBody_unstable","backgroundAppearance"],"mappings":"AAAA;AAGA,SAASA,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAE3E,SAASC,wBAAwB,QAAQ,0CAAuC;AAChF,SAASC,uBAAuB,QAAQ,kCAAkC;AAE1E;;;;;CAKC,GACD,OAAO,MAAMC,4BAA4B,CACvCC,OACAC;IAEA,MAAM,EAAEC,MAAM,EAAE,GAAGL;IACnB,OAAO;QACLM,YAAY;YACVC,MAAM;YACNC,UAAU;QACZ;QACAA,UAAUT,KAAKU,QAAQ,CAACN,MAAMK,QAAQ,EAAE;YAAEE,aAAa;QAAM;QAC7DH,MAAMR,KAAKY,MAAM,CACfb,yBAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FM,KAAKA;YACLQ,IAAIP;YACJ,GAAGF,KAAK;QACV,IACA;YAAEO,aAAa;QAAM;IAEzB;AACF,EAAE;AAEF;;;;;;;;CAQC,GACD,OAAO,MAAMG,wBAAwB,CAACV,OAAuBC;IAC3D,MAAMU,uBAAuBb;IAC7B,OAAO;QACL,GAAGC,0BAA0BC,OAAOC,IAAI;QACxCU;IACF;AACF,EAAE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import styles from "./ToastBody.module.css";
|
|
3
|
+
export const toastBodyClassNames = {
|
|
4
|
+
root: 'fui-ToastBody',
|
|
5
|
+
subtitle: 'fui-ToastBody__subtitle'
|
|
6
|
+
};
|
|
7
|
+
export const useToastBodyStyles_unstable = (state)=>{
|
|
8
|
+
state.root.className = clsx(toastBodyClassNames.root, styles.root, state.backgroundAppearance === 'inverted' && styles.inverted, state.root.className);
|
|
9
|
+
if (state.subtitle) {
|
|
10
|
+
state.subtitle.className = clsx(toastBodyClassNames.subtitle, styles.subtitle, state.backgroundAppearance === 'inverted' && styles.inverted, state.subtitle.className);
|
|
11
|
+
}
|
|
12
|
+
return state;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToastBody/useToastBodyStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { ToastBodySlots, ToastBodyState } from './ToastBody.types';\nimport styles from './ToastBody.module.css';\n\nexport const toastBodyClassNames: SlotClassNames<ToastBodySlots> = {\n root: 'fui-ToastBody',\n subtitle: 'fui-ToastBody__subtitle',\n};\n\nexport const useToastBodyStyles_unstable = (state: ToastBodyState): ToastBodyState => {\n state.root.className = clsx(\n toastBodyClassNames.root,\n styles.root,\n state.backgroundAppearance === 'inverted' && styles.inverted,\n state.root.className,\n );\n if (state.subtitle) {\n state.subtitle.className = clsx(\n toastBodyClassNames.subtitle,\n styles.subtitle,\n state.backgroundAppearance === 'inverted' && styles.inverted,\n state.subtitle.className,\n );\n }\n return state;\n};\n"],"names":["clsx","styles","toastBodyClassNames","root","subtitle","useToastBodyStyles_unstable","state","className","backgroundAppearance","inverted"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,yBAAyB;AAE5C,OAAO,MAAMC,sBAAsD;IACjEC,MAAM;IACNC,UAAU;AACZ,EAAE;AAEF,OAAO,MAAMC,8BAA8B,CAACC;IAC1CA,MAAMH,IAAI,CAACI,SAAS,GAAGP,KACrBE,oBAAoBC,IAAI,EACxBF,OAAOE,IAAI,EACXG,MAAME,oBAAoB,KAAK,cAAcP,OAAOQ,QAAQ,EAC5DH,MAAMH,IAAI,CAACI,SAAS;IAEtB,IAAID,MAAMF,QAAQ,EAAE;QAClBE,MAAMF,QAAQ,CAACG,SAAS,GAAGP,KACzBE,oBAAoBE,QAAQ,EAC5BH,OAAOG,QAAQ,EACfE,MAAME,oBAAoB,KAAK,cAAcP,OAAOQ,QAAQ,EAC5DH,MAAMF,QAAQ,CAACG,SAAS;IAE5B;IACA,OAAOD;AACT,EAAE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import styles from "./ToastBody.module.css";
|
|
3
|
+
export const toastBodyClassNames = {
|
|
4
|
+
root: 'fui-ToastBody',
|
|
5
|
+
subtitle: 'fui-ToastBody__subtitle'
|
|
6
|
+
};
|
|
7
|
+
export const useToastBodyStyles_unstable = (state)=>{
|
|
8
|
+
state.root.className = clsx(toastBodyClassNames.root, styles.root, state.backgroundAppearance === 'inverted' && styles.inverted, state.root.className);
|
|
9
|
+
if (state.subtitle) {
|
|
10
|
+
state.subtitle.className = clsx(toastBodyClassNames.subtitle, styles.subtitle, state.backgroundAppearance === 'inverted' && styles.inverted, state.subtitle.className);
|
|
11
|
+
}
|
|
12
|
+
return state;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/ToastBody/useToastBodyStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { ToastBodySlots, ToastBodyState } from './ToastBody.types';\nimport styles from './ToastBody.module.css';\n\nexport const toastBodyClassNames: SlotClassNames<ToastBodySlots> = {\n root: 'fui-ToastBody',\n subtitle: 'fui-ToastBody__subtitle',\n};\n\nexport const useToastBodyStyles_unstable = (state: ToastBodyState): ToastBodyState => {\n state.root.className = clsx(\n toastBodyClassNames.root,\n styles.root,\n state.backgroundAppearance === 'inverted' && styles.inverted,\n state.root.className,\n );\n if (state.subtitle) {\n state.subtitle.className = clsx(\n toastBodyClassNames.subtitle,\n styles.subtitle,\n state.backgroundAppearance === 'inverted' && styles.inverted,\n state.subtitle.className,\n );\n }\n return state;\n};\n"],"names":["clsx","styles","toastBodyClassNames","root","subtitle","useToastBodyStyles_unstable","state","className","backgroundAppearance","inverted"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAG5B,OAAOC,YAAY,yBAAyB;AAE5C,OAAO,MAAMC,sBAAsD;IACjEC,MAAM;IACNC,UAAU;AACZ,EAAE;AAEF,OAAO,MAAMC,8BAA8B,CAACC;IAC1CA,MAAMH,IAAI,CAACI,SAAS,GAAGP,KACrBE,oBAAoBC,IAAI,EACxBF,OAAOE,IAAI,EACXG,MAAME,oBAAoB,KAAK,cAAcP,OAAOQ,QAAQ,EAC5DH,MAAMH,IAAI,CAACI,SAAS;IAEtB,IAAID,MAAMF,QAAQ,EAAE;QAClBE,MAAMF,QAAQ,CAACG,SAAS,GAAGP,KACzBE,oBAAoBE,QAAQ,EAC5BH,OAAOG,QAAQ,EACfE,MAAME,oBAAoB,KAAK,cAAcP,OAAOQ,QAAQ,EAC5DH,MAAMF,QAAQ,CAACG,SAAS;IAE5B;IACA,OAAOD;AACT,EAAE"}
|