@fluentui/react-toast 9.6.0 → 9.6.1
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 +17 -2
- package/lib/AriaLive.js.map +1 -1
- package/lib/Toast.js.map +1 -1
- package/lib/ToastBody.js.map +1 -1
- package/lib/ToastContainer.js.map +1 -1
- package/lib/ToastFooter.js.map +1 -1
- package/lib/ToastTitle.js.map +1 -1
- package/lib/ToastTrigger.js.map +1 -1
- package/lib/Toaster.js.map +1 -1
- package/lib/components/AriaLive/AriaLive.js.map +1 -1
- 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.map +1 -1
- package/lib/components/AriaLive/useAriaLive.js.map +1 -1
- package/lib/components/AriaLive/useAriaLiveStyles.styles.raw.js.map +1 -1
- package/lib/components/Timer/Timer.js.map +1 -1
- package/lib/components/Timer/index.js.map +1 -1
- 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.types.js.map +1 -1
- package/lib/components/Toast/index.js.map +1 -1
- 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.raw.js.map +1 -1
- package/lib/components/ToastBody/ToastBody.js.map +1 -1
- 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.map +1 -1
- package/lib/components/ToastBody/useToastBody.js.map +1 -1
- 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.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.map +1 -1
- package/lib/components/ToastContainer/useToastContainerContextValues.js.map +1 -1
- 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.types.js.map +1 -1
- package/lib/components/ToastFooter/index.js.map +1 -1
- package/lib/components/ToastFooter/renderToastFooter.js.map +1 -1
- package/lib/components/ToastFooter/useToastFooter.js.map +1 -1
- 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.types.js.map +1 -1
- package/lib/components/ToastTitle/index.js.map +1 -1
- package/lib/components/ToastTitle/renderToastTitle.js.map +1 -1
- package/lib/components/ToastTitle/useToastTitle.js.map +1 -1
- 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.types.js.map +1 -1
- package/lib/components/Toaster/index.js.map +1 -1
- 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.raw.js.map +1 -1
- package/lib/contexts/toastContainerContext.js.map +1 -1
- package/lib/index.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.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.js.map +1 -1
- package/lib-commonjs/Toast.js.map +1 -1
- package/lib-commonjs/ToastBody.js.map +1 -1
- package/lib-commonjs/ToastContainer.js.map +1 -1
- package/lib-commonjs/ToastFooter.js.map +1 -1
- package/lib-commonjs/ToastTitle.js.map +1 -1
- package/lib-commonjs/ToastTrigger.js.map +1 -1
- package/lib-commonjs/Toaster.js.map +1 -1
- package/lib-commonjs/components/AriaLive/AriaLive.js.map +1 -1
- package/lib-commonjs/components/AriaLive/AriaLive.types.js.map +1 -1
- package/lib-commonjs/components/AriaLive/index.js.map +1 -1
- package/lib-commonjs/components/AriaLive/renderAriaLive.js.map +1 -1
- package/lib-commonjs/components/AriaLive/useAriaLive.js.map +1 -1
- package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.js.map +1 -1
- package/lib-commonjs/components/AriaLive/useAriaLiveStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/Timer/Timer.js.map +1 -1
- package/lib-commonjs/components/Timer/index.js.map +1 -1
- package/lib-commonjs/components/Timer/useTimerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Timer/useTimerStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/Toast/Toast.js.map +1 -1
- package/lib-commonjs/components/Toast/Toast.types.js.map +1 -1
- package/lib-commonjs/components/Toast/index.js.map +1 -1
- package/lib-commonjs/components/Toast/renderToast.js.map +1 -1
- package/lib-commonjs/components/Toast/useToast.js.map +1 -1
- package/lib-commonjs/components/Toast/useToastContextValues.js.map +1 -1
- package/lib-commonjs/components/Toast/useToastStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Toast/useToastStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ToastBody/ToastBody.js.map +1 -1
- package/lib-commonjs/components/ToastBody/ToastBody.types.js.map +1 -1
- package/lib-commonjs/components/ToastBody/index.js.map +1 -1
- package/lib-commonjs/components/ToastBody/renderToastBody.js.map +1 -1
- package/lib-commonjs/components/ToastBody/useToastBody.js.map +1 -1
- package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ToastBody/useToastBodyStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ToastContainer/ToastContainer.js.map +1 -1
- package/lib-commonjs/components/ToastContainer/ToastContainer.types.js.map +1 -1
- package/lib-commonjs/components/ToastContainer/index.js.map +1 -1
- package/lib-commonjs/components/ToastContainer/renderToastContainer.js.map +1 -1
- package/lib-commonjs/components/ToastContainer/useToastContainer.js.map +1 -1
- package/lib-commonjs/components/ToastContainer/useToastContainerContextValues.js.map +1 -1
- package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ToastContainer/useToastContainerStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ToastFooter/ToastFooter.js.map +1 -1
- package/lib-commonjs/components/ToastFooter/ToastFooter.types.js.map +1 -1
- package/lib-commonjs/components/ToastFooter/index.js.map +1 -1
- package/lib-commonjs/components/ToastFooter/renderToastFooter.js.map +1 -1
- package/lib-commonjs/components/ToastFooter/useToastFooter.js.map +1 -1
- package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ToastFooter/useToastFooterStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ToastTitle/ToastTitle.js.map +1 -1
- package/lib-commonjs/components/ToastTitle/ToastTitle.types.js.map +1 -1
- package/lib-commonjs/components/ToastTitle/index.js.map +1 -1
- package/lib-commonjs/components/ToastTitle/renderToastTitle.js.map +1 -1
- package/lib-commonjs/components/ToastTitle/useToastTitle.js.map +1 -1
- package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ToastTitle/useToastTitleStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/ToastTrigger/ToastTrigger.js.map +1 -1
- package/lib-commonjs/components/ToastTrigger/ToastTrigger.types.js.map +1 -1
- package/lib-commonjs/components/ToastTrigger/index.js.map +1 -1
- package/lib-commonjs/components/ToastTrigger/renderToastTrigger.js.map +1 -1
- package/lib-commonjs/components/ToastTrigger/useToastTrigger.js.map +1 -1
- package/lib-commonjs/components/Toaster/Toaster.js.map +1 -1
- package/lib-commonjs/components/Toaster/Toaster.types.js.map +1 -1
- package/lib-commonjs/components/Toaster/index.js.map +1 -1
- package/lib-commonjs/components/Toaster/renderToaster.js.map +1 -1
- package/lib-commonjs/components/Toaster/useToastAnnounce.js.map +1 -1
- package/lib-commonjs/components/Toaster/useToaster.js.map +1 -1
- package/lib-commonjs/components/Toaster/useToasterFocusManagement.js.map +1 -1
- package/lib-commonjs/components/Toaster/useToasterStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Toaster/useToasterStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/contexts/toastContainerContext.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/state/constants.js.map +1 -1
- package/lib-commonjs/state/index.js.map +1 -1
- package/lib-commonjs/state/types.js.map +1 -1
- package/lib-commonjs/state/useToastController.js.map +1 -1
- package/lib-commonjs/state/useToaster.js.map +1 -1
- package/lib-commonjs/state/vanilla/createToaster.js.map +1 -1
- package/lib-commonjs/state/vanilla/dismissAllToasts.js.map +1 -1
- package/lib-commonjs/state/vanilla/dismissToast.js.map +1 -1
- package/lib-commonjs/state/vanilla/dispatchToast.js.map +1 -1
- package/lib-commonjs/state/vanilla/getPositionStyles.js.map +1 -1
- package/lib-commonjs/state/vanilla/index.js.map +1 -1
- package/lib-commonjs/state/vanilla/pauseToast.js.map +1 -1
- package/lib-commonjs/state/vanilla/playToast.js.map +1 -1
- package/lib-commonjs/state/vanilla/updateToast.js.map +1 -1
- package/package.json +8 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/state/vanilla/getPositionStyles.ts"],"sourcesContent":["import { ToastOffsetObject, ToastOffset, ToastPosition } from '../types';\n\ninterface PositionStyles {\n top?: number;\n left?: number;\n right?: number;\n bottom?: number;\n}\n\nexport const getPositionStyles = (position: ToastPosition, dir: 'rtl' | 'ltr', offset?: ToastOffset) => {\n const positionStyles: PositionStyles = {};\n\n const offsetStyles: ToastOffsetObject = offset ? (isShorthandOffset(offset) ? offset : offset[position] ?? {}) : {};\n\n const centered = position === 'top' || position === 'bottom';\n\n const { horizontal = centered ? 0 : 20, vertical = 16 } = offsetStyles;\n const start = dir === 'ltr' ? 'left' : 'right';\n const end = dir === 'ltr' ? 'right' : 'left';\n\n switch (position) {\n case 'top':\n Object.assign(positionStyles, {\n top: vertical,\n left: `calc(50% + ${horizontal}px)`,\n transform: 'translateX(-50%)',\n });\n break;\n\n case 'bottom':\n Object.assign(positionStyles, {\n bottom: vertical,\n left: `calc(50% + ${horizontal}px)`,\n transform: 'translateX(-50%)',\n });\n break;\n\n case 'top-start':\n Object.assign(positionStyles, {\n top: vertical,\n [start]: horizontal,\n });\n break;\n case 'top-end':\n Object.assign(positionStyles, {\n top: vertical,\n [end]: horizontal,\n });\n break;\n case 'bottom-start':\n Object.assign(positionStyles, {\n bottom: vertical,\n [start]: horizontal,\n });\n break;\n case 'bottom-end':\n Object.assign(positionStyles, {\n bottom: vertical,\n [end]: horizontal,\n });\n break;\n }\n\n return positionStyles;\n};\n\nfunction isShorthandOffset(offset: ToastOffset): offset is ToastOffsetObject {\n return 'horizontal' in offset || 'vertical' in offset;\n}\n"],"names":["getPositionStyles","position","dir","offset","positionStyles","offsetStyles","isShorthandOffset","centered","horizontal","vertical","start","end","Object","assign","top","left","transform","bottom"],"
|
|
1
|
+
{"version":3,"sources":["../src/state/vanilla/getPositionStyles.ts"],"sourcesContent":["import { ToastOffsetObject, ToastOffset, ToastPosition } from '../types';\n\ninterface PositionStyles {\n top?: number;\n left?: number;\n right?: number;\n bottom?: number;\n}\n\nexport const getPositionStyles = (position: ToastPosition, dir: 'rtl' | 'ltr', offset?: ToastOffset) => {\n const positionStyles: PositionStyles = {};\n\n const offsetStyles: ToastOffsetObject = offset ? (isShorthandOffset(offset) ? offset : offset[position] ?? {}) : {};\n\n const centered = position === 'top' || position === 'bottom';\n\n const { horizontal = centered ? 0 : 20, vertical = 16 } = offsetStyles;\n const start = dir === 'ltr' ? 'left' : 'right';\n const end = dir === 'ltr' ? 'right' : 'left';\n\n switch (position) {\n case 'top':\n Object.assign(positionStyles, {\n top: vertical,\n left: `calc(50% + ${horizontal}px)`,\n transform: 'translateX(-50%)',\n });\n break;\n\n case 'bottom':\n Object.assign(positionStyles, {\n bottom: vertical,\n left: `calc(50% + ${horizontal}px)`,\n transform: 'translateX(-50%)',\n });\n break;\n\n case 'top-start':\n Object.assign(positionStyles, {\n top: vertical,\n [start]: horizontal,\n });\n break;\n case 'top-end':\n Object.assign(positionStyles, {\n top: vertical,\n [end]: horizontal,\n });\n break;\n case 'bottom-start':\n Object.assign(positionStyles, {\n bottom: vertical,\n [start]: horizontal,\n });\n break;\n case 'bottom-end':\n Object.assign(positionStyles, {\n bottom: vertical,\n [end]: horizontal,\n });\n break;\n }\n\n return positionStyles;\n};\n\nfunction isShorthandOffset(offset: ToastOffset): offset is ToastOffsetObject {\n return 'horizontal' in offset || 'vertical' in offset;\n}\n"],"names":["getPositionStyles","position","dir","offset","positionStyles","offsetStyles","isShorthandOffset","centered","horizontal","vertical","start","end","Object","assign","top","left","transform","bottom"],"mappings":"AASA,OAAO,MAAMA,oBAAoB,CAACC,UAAyBC,KAAoBC;IAC7E,MAAMC,iBAAiC,CAAC;QAE+CD;IAAvF,MAAME,eAAkCF,SAAUG,kBAAkBH,UAAUA,SAASA,CAAAA,mBAAAA,MAAM,CAACF,SAAS,cAAhBE,8BAAAA,mBAAoB,CAAC,IAAK,CAAC;IAElH,MAAMI,WAAWN,aAAa,SAASA,aAAa;IAEpD,MAAM,EAAEO,aAAaD,WAAW,IAAI,EAAE,EAAEE,WAAW,EAAE,EAAE,GAAGJ;IAC1D,MAAMK,QAAQR,QAAQ,QAAQ,SAAS;IACvC,MAAMS,MAAMT,QAAQ,QAAQ,UAAU;IAEtC,OAAQD;QACN,KAAK;YACHW,OAAOC,MAAM,CAACT,gBAAgB;gBAC5BU,KAAKL;gBACLM,MAAM,CAAC,WAAW,EAAEP,WAAW,GAAG,CAAC;gBACnCQ,WAAW;YACb;YACA;QAEF,KAAK;YACHJ,OAAOC,MAAM,CAACT,gBAAgB;gBAC5Ba,QAAQR;gBACRM,MAAM,CAAC,WAAW,EAAEP,WAAW,GAAG,CAAC;gBACnCQ,WAAW;YACb;YACA;QAEF,KAAK;YACHJ,OAAOC,MAAM,CAACT,gBAAgB;gBAC5BU,KAAKL;gBACL,CAACC,MAAM,EAAEF;YACX;YACA;QACF,KAAK;YACHI,OAAOC,MAAM,CAACT,gBAAgB;gBAC5BU,KAAKL;gBACL,CAACE,IAAI,EAAEH;YACT;YACA;QACF,KAAK;YACHI,OAAOC,MAAM,CAACT,gBAAgB;gBAC5Ba,QAAQR;gBACR,CAACC,MAAM,EAAEF;YACX;YACA;QACF,KAAK;YACHI,OAAOC,MAAM,CAACT,gBAAgB;gBAC5Ba,QAAQR;gBACR,CAACE,IAAI,EAAEH;YACT;YACA;IACJ;IAEA,OAAOJ;AACT,EAAE;AAEF,SAASE,kBAAkBH,MAAmB;IAC5C,OAAO,gBAAgBA,UAAU,cAAcA;AACjD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/state/vanilla/index.ts"],"sourcesContent":["export { dispatchToast } from './dispatchToast';\nexport { dismissToast } from './dismissToast';\nexport { dismissAllToasts } from './dismissAllToasts';\nexport { updateToast } from './updateToast';\nexport { pauseToast } from './pauseToast';\nexport { playToast } from './playToast';\nexport { createToaster } from './createToaster';\nexport { getPositionStyles } from './getPositionStyles';\n"],"names":["dispatchToast","dismissToast","dismissAllToasts","updateToast","pauseToast","playToast","createToaster","getPositionStyles"],"
|
|
1
|
+
{"version":3,"sources":["../src/state/vanilla/index.ts"],"sourcesContent":["export { dispatchToast } from './dispatchToast';\nexport { dismissToast } from './dismissToast';\nexport { dismissAllToasts } from './dismissAllToasts';\nexport { updateToast } from './updateToast';\nexport { pauseToast } from './pauseToast';\nexport { playToast } from './playToast';\nexport { createToaster } from './createToaster';\nexport { getPositionStyles } from './getPositionStyles';\n"],"names":["dispatchToast","dismissToast","dismissAllToasts","updateToast","pauseToast","playToast","createToaster","getPositionStyles"],"mappings":"AAAA,SAASA,aAAa,QAAQ,kBAAkB;AAChD,SAASC,YAAY,QAAQ,iBAAiB;AAC9C,SAASC,gBAAgB,QAAQ,qBAAqB;AACtD,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,SAAS,QAAQ,cAAc;AACxC,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,iBAAiB,QAAQ,sBAAsB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/state/vanilla/pauseToast.ts"],"sourcesContent":["import { EVENTS } from '../constants';\nimport { PauseToastEventDetail, ToastId, ToasterId } from '../types';\n\nexport function pauseToast(toastId: ToastId, toasterId: ToasterId | undefined = undefined, targetDocument: Document) {\n const event = new CustomEvent<PauseToastEventDetail>(EVENTS.pause, {\n bubbles: false,\n cancelable: false,\n detail: { toastId, toasterId },\n });\n targetDocument.dispatchEvent(event);\n}\n"],"names":["EVENTS","pauseToast","toastId","toasterId","undefined","targetDocument","event","CustomEvent","pause","bubbles","cancelable","detail","dispatchEvent"],"
|
|
1
|
+
{"version":3,"sources":["../src/state/vanilla/pauseToast.ts"],"sourcesContent":["import { EVENTS } from '../constants';\nimport { PauseToastEventDetail, ToastId, ToasterId } from '../types';\n\nexport function pauseToast(toastId: ToastId, toasterId: ToasterId | undefined = undefined, targetDocument: Document) {\n const event = new CustomEvent<PauseToastEventDetail>(EVENTS.pause, {\n bubbles: false,\n cancelable: false,\n detail: { toastId, toasterId },\n });\n targetDocument.dispatchEvent(event);\n}\n"],"names":["EVENTS","pauseToast","toastId","toasterId","undefined","targetDocument","event","CustomEvent","pause","bubbles","cancelable","detail","dispatchEvent"],"mappings":"AAAA,SAASA,MAAM,QAAQ,eAAe;AAGtC,OAAO,SAASC,WAAWC,OAAgB,EAAEC,YAAmCC,SAAS,EAAEC,cAAwB;IACjH,MAAMC,QAAQ,IAAIC,YAAmCP,OAAOQ,KAAK,EAAE;QACjEC,SAAS;QACTC,YAAY;QACZC,QAAQ;YAAET;YAASC;QAAU;IAC/B;IACAE,eAAeO,aAAa,CAACN;AAC/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/state/vanilla/playToast.ts"],"sourcesContent":["import { EVENTS } from '../constants';\nimport { PlayToastEventDetail, ToastId, ToasterId } from '../types';\n\nexport function playToast(toastId: ToastId, toasterId: ToasterId | undefined = undefined, targetDocument: Document) {\n const event = new CustomEvent<PlayToastEventDetail>(EVENTS.play, {\n bubbles: false,\n cancelable: false,\n detail: { toastId, toasterId },\n });\n targetDocument.dispatchEvent(event);\n}\n"],"names":["EVENTS","playToast","toastId","toasterId","undefined","targetDocument","event","CustomEvent","play","bubbles","cancelable","detail","dispatchEvent"],"
|
|
1
|
+
{"version":3,"sources":["../src/state/vanilla/playToast.ts"],"sourcesContent":["import { EVENTS } from '../constants';\nimport { PlayToastEventDetail, ToastId, ToasterId } from '../types';\n\nexport function playToast(toastId: ToastId, toasterId: ToasterId | undefined = undefined, targetDocument: Document) {\n const event = new CustomEvent<PlayToastEventDetail>(EVENTS.play, {\n bubbles: false,\n cancelable: false,\n detail: { toastId, toasterId },\n });\n targetDocument.dispatchEvent(event);\n}\n"],"names":["EVENTS","playToast","toastId","toasterId","undefined","targetDocument","event","CustomEvent","play","bubbles","cancelable","detail","dispatchEvent"],"mappings":"AAAA,SAASA,MAAM,QAAQ,eAAe;AAGtC,OAAO,SAASC,UAAUC,OAAgB,EAAEC,YAAmCC,SAAS,EAAEC,cAAwB;IAChH,MAAMC,QAAQ,IAAIC,YAAkCP,OAAOQ,IAAI,EAAE;QAC/DC,SAAS;QACTC,YAAY;QACZC,QAAQ;YAAET;YAASC;QAAU;IAC/B;IACAE,eAAeO,aAAa,CAACN;AAC/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/state/vanilla/updateToast.ts"],"sourcesContent":["import { UpdateToastEventDetail } from '../types';\nimport { EVENTS } from '../constants';\n\nexport function updateToast(options: UpdateToastEventDetail, targetDocument: Document) {\n const event = new CustomEvent<UpdateToastEventDetail>(EVENTS.update, {\n bubbles: false,\n cancelable: false,\n detail: options,\n });\n\n targetDocument.dispatchEvent(event);\n}\n"],"names":["EVENTS","updateToast","options","targetDocument","event","CustomEvent","update","bubbles","cancelable","detail","dispatchEvent"],"
|
|
1
|
+
{"version":3,"sources":["../src/state/vanilla/updateToast.ts"],"sourcesContent":["import { UpdateToastEventDetail } from '../types';\nimport { EVENTS } from '../constants';\n\nexport function updateToast(options: UpdateToastEventDetail, targetDocument: Document) {\n const event = new CustomEvent<UpdateToastEventDetail>(EVENTS.update, {\n bubbles: false,\n cancelable: false,\n detail: options,\n });\n\n targetDocument.dispatchEvent(event);\n}\n"],"names":["EVENTS","updateToast","options","targetDocument","event","CustomEvent","update","bubbles","cancelable","detail","dispatchEvent"],"mappings":"AACA,SAASA,MAAM,QAAQ,eAAe;AAEtC,OAAO,SAASC,YAAYC,OAA+B,EAAEC,cAAwB;IACnF,MAAMC,QAAQ,IAAIC,YAAoCL,OAAOM,MAAM,EAAE;QACnEC,SAAS;QACTC,YAAY;QACZC,QAAQP;IACV;IAEAC,eAAeO,aAAa,CAACN;AAC/B"}
|
|
@@ -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"],"
|
|
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":";;;;;;;;;;;;eAUEA,eAAQ;;;eACRC,yBAAkB;;;eAClBC,8BAAuB;;;eACvBC,iCAA0B;;;eAC1BC,2BAAoB;;;uBACf,8BAA8B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Toast.ts"],"sourcesContent":["export type { ToastContextValues, ToastProps, ToastSlots, ToastState } from './components/Toast/index';\nexport {\n Toast,\n renderToast_unstable,\n toastClassNames,\n useToastStyles_unstable,\n useToast_unstable,\n} from './components/Toast/index';\n"],"names":["Toast","renderToast_unstable","toastClassNames","useToastStyles_unstable","useToast_unstable"],"
|
|
1
|
+
{"version":3,"sources":["../src/Toast.ts"],"sourcesContent":["export type { ToastContextValues, ToastProps, ToastSlots, ToastState } from './components/Toast/index';\nexport {\n Toast,\n renderToast_unstable,\n toastClassNames,\n useToastStyles_unstable,\n useToast_unstable,\n} from './components/Toast/index';\n"],"names":["Toast","renderToast_unstable","toastClassNames","useToastStyles_unstable","useToast_unstable"],"mappings":";;;;;;;;;;;;eAEEA,YAAK;;;eACLC,2BAAoB;;;eACpBC,sBAAe;;;eACfC,8BAAuB;;;eACvBC,wBAAiB;;;uBACZ,2BAA2B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ToastBody.ts"],"sourcesContent":["export type { ToastBodyProps, ToastBodySlots, ToastBodyState } from './components/ToastBody/index';\nexport {\n ToastBody,\n renderToastBody_unstable,\n toastBodyClassNames,\n useToastBodyStyles_unstable,\n useToastBody_unstable,\n} from './components/ToastBody/index';\n"],"names":["ToastBody","renderToastBody_unstable","toastBodyClassNames","useToastBodyStyles_unstable","useToastBody_unstable"],"
|
|
1
|
+
{"version":3,"sources":["../src/ToastBody.ts"],"sourcesContent":["export type { ToastBodyProps, ToastBodySlots, ToastBodyState } from './components/ToastBody/index';\nexport {\n ToastBody,\n renderToastBody_unstable,\n toastBodyClassNames,\n useToastBodyStyles_unstable,\n useToastBody_unstable,\n} from './components/ToastBody/index';\n"],"names":["ToastBody","renderToastBody_unstable","toastBodyClassNames","useToastBodyStyles_unstable","useToastBody_unstable"],"mappings":";;;;;;;;;;;;eAEEA,gBAAS;;;eACTC,+BAAwB;;;eACxBC,0BAAmB;;;eACnBC,kCAA2B;;;eAC3BC,4BAAqB;;;uBAChB,+BAA+B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ToastContainer.ts"],"sourcesContent":["export type {\n ToastContainerContextValues,\n ToastContainerProps,\n ToastContainerSlots,\n ToastContainerState,\n} from './components/ToastContainer/index';\nexport {\n ToastContainer,\n renderToastContainer_unstable,\n toastContainerClassNames,\n useToastContainerContextValues_unstable,\n useToastContainerStyles_unstable,\n useToastContainer_unstable,\n} from './components/ToastContainer/index';\n"],"names":["ToastContainer","renderToastContainer_unstable","toastContainerClassNames","useToastContainerContextValues_unstable","useToastContainerStyles_unstable","useToastContainer_unstable"],"
|
|
1
|
+
{"version":3,"sources":["../src/ToastContainer.ts"],"sourcesContent":["export type {\n ToastContainerContextValues,\n ToastContainerProps,\n ToastContainerSlots,\n ToastContainerState,\n} from './components/ToastContainer/index';\nexport {\n ToastContainer,\n renderToastContainer_unstable,\n toastContainerClassNames,\n useToastContainerContextValues_unstable,\n useToastContainerStyles_unstable,\n useToastContainer_unstable,\n} from './components/ToastContainer/index';\n"],"names":["ToastContainer","renderToastContainer_unstable","toastContainerClassNames","useToastContainerContextValues_unstable","useToastContainerStyles_unstable","useToastContainer_unstable"],"mappings":";;;;;;;;;;;;eAOEA,qBAAc;;;eACdC,oCAA6B;;;eAC7BC,+BAAwB;;;eACxBC,8CAAuC;;;eACvCC,uCAAgC;;;eAChCC,iCAA0B;;;uBACrB,oCAAoC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ToastFooter.ts"],"sourcesContent":["export type { ToastFooterProps, ToastFooterSlots, ToastFooterState } from './components/ToastFooter/index';\nexport {\n ToastFooter,\n renderToastFooter_unstable,\n toastFooterClassNames,\n useToastFooterStyles_unstable,\n useToastFooter_unstable,\n} from './components/ToastFooter/index';\n"],"names":["ToastFooter","renderToastFooter_unstable","toastFooterClassNames","useToastFooterStyles_unstable","useToastFooter_unstable"],"
|
|
1
|
+
{"version":3,"sources":["../src/ToastFooter.ts"],"sourcesContent":["export type { ToastFooterProps, ToastFooterSlots, ToastFooterState } from './components/ToastFooter/index';\nexport {\n ToastFooter,\n renderToastFooter_unstable,\n toastFooterClassNames,\n useToastFooterStyles_unstable,\n useToastFooter_unstable,\n} from './components/ToastFooter/index';\n"],"names":["ToastFooter","renderToastFooter_unstable","toastFooterClassNames","useToastFooterStyles_unstable","useToastFooter_unstable"],"mappings":";;;;;;;;;;;;eAEEA,kBAAW;;;eACXC,iCAA0B;;;eAC1BC,4BAAqB;;;eACrBC,oCAA6B;;;eAC7BC,8BAAuB;;;uBAClB,iCAAiC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ToastTitle.ts"],"sourcesContent":["export type { ToastTitleProps, ToastTitleSlots, ToastTitleState } from './components/ToastTitle/index';\nexport {\n ToastTitle,\n renderToastTitle_unstable,\n toastTitleClassNames,\n useToastTitleStyles_unstable,\n useToastTitle_unstable,\n} from './components/ToastTitle/index';\n"],"names":["ToastTitle","renderToastTitle_unstable","toastTitleClassNames","useToastTitleStyles_unstable","useToastTitle_unstable"],"
|
|
1
|
+
{"version":3,"sources":["../src/ToastTitle.ts"],"sourcesContent":["export type { ToastTitleProps, ToastTitleSlots, ToastTitleState } from './components/ToastTitle/index';\nexport {\n ToastTitle,\n renderToastTitle_unstable,\n toastTitleClassNames,\n useToastTitleStyles_unstable,\n useToastTitle_unstable,\n} from './components/ToastTitle/index';\n"],"names":["ToastTitle","renderToastTitle_unstable","toastTitleClassNames","useToastTitleStyles_unstable","useToastTitle_unstable"],"mappings":";;;;;;;;;;;;eAEEA,iBAAU;;;eACVC,gCAAyB;;;eACzBC,2BAAoB;;;eACpBC,mCAA4B;;;eAC5BC,6BAAsB;;;uBACjB,gCAAgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/ToastTrigger.ts"],"sourcesContent":["export type { ToastTriggerChildProps, ToastTriggerProps, ToastTriggerState } from './components/ToastTrigger/index';\nexport { ToastTrigger, renderToastTrigger_unstable, useToastTrigger_unstable } from './components/ToastTrigger/index';\n"],"names":["ToastTrigger","renderToastTrigger_unstable","useToastTrigger_unstable"],"
|
|
1
|
+
{"version":3,"sources":["../src/ToastTrigger.ts"],"sourcesContent":["export type { ToastTriggerChildProps, ToastTriggerProps, ToastTriggerState } from './components/ToastTrigger/index';\nexport { ToastTrigger, renderToastTrigger_unstable, useToastTrigger_unstable } from './components/ToastTrigger/index';\n"],"names":["ToastTrigger","renderToastTrigger_unstable","useToastTrigger_unstable"],"mappings":";;;;;;;;;;;;eACSA,mBAAY;;;eAAEC,kCAA2B;;;eAAEC,+BAAwB;;;uBAAQ,kCAAkC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Toaster.ts"],"sourcesContent":["export type { ToasterProps, ToasterSlots, ToasterSlotsInternal, ToasterState } from './components/Toaster/index';\nexport {\n Toaster,\n renderToaster_unstable,\n toasterClassNames,\n useToasterStyles_unstable,\n useToaster_unstable,\n} from './components/Toaster/index';\n"],"names":["Toaster","renderToaster_unstable","toasterClassNames","useToasterStyles_unstable","useToaster_unstable"],"
|
|
1
|
+
{"version":3,"sources":["../src/Toaster.ts"],"sourcesContent":["export type { ToasterProps, ToasterSlots, ToasterSlotsInternal, ToasterState } from './components/Toaster/index';\nexport {\n Toaster,\n renderToaster_unstable,\n toasterClassNames,\n useToasterStyles_unstable,\n useToaster_unstable,\n} from './components/Toaster/index';\n"],"names":["Toaster","renderToaster_unstable","toasterClassNames","useToasterStyles_unstable","useToaster_unstable"],"mappings":";;;;;;;;;;;;eAEEA,cAAO;;;eACPC,6BAAsB;;;eACtBC,wBAAiB;;;eACjBC,gCAAyB;;;eACzBC,0BAAmB;;;uBACd,6BAA6B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/AriaLive/AriaLive.tsx"],"sourcesContent":["import * 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":["
|
|
1
|
+
{"version":3,"sources":["../src/components/AriaLive/AriaLive.tsx"],"sourcesContent":["import * 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":["React","useAriaLive_unstable","renderAriaLive_unstable","useAriaLiveStyles_unstable","AriaLive","props","state","displayName"],"mappings":";;;;;;;;;;;iEAAuB,QAAQ;6BACM,gBAAgB;gCACb,mBAAmB;yCAChB,6BAA6B;AAMjE,MAAMI,WAAoCC,CAAAA;IAC/C,MAAMC,YAAQL,iCAAAA,EAAqBI;QAEnCF,mDAAAA,EAA2BG;IAC3B,WAAOJ,uCAAAA,EAAwBI;AACjC,EAAE;AAEFF,SAASG,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/AriaLive/AriaLive.types.ts"],"sourcesContent":["import * 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":[
|
|
1
|
+
{"version":3,"sources":["../src/components/AriaLive/AriaLive.types.ts"],"sourcesContent":["import * 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":["React"],"mappings":";;;;;iEAAuB,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/AriaLive/index.ts"],"sourcesContent":["export { AriaLive } from './AriaLive';\nexport type {\n Announce,\n AnnounceOptions,\n AriaLivePoliteness,\n AriaLiveProps,\n AriaLiveSlots,\n AriaLiveState,\n LiveMessage,\n} from './AriaLive.types';\nexport { renderAriaLive_unstable } from './renderAriaLive';\nexport { useAriaLive_unstable } from './useAriaLive';\nexport { ariaLiveClassNames, useAriaLiveStyles_unstable } from './useAriaLiveStyles.styles';\n"],"names":["AriaLive","
|
|
1
|
+
{"version":3,"sources":["../src/components/AriaLive/index.ts"],"sourcesContent":["export { AriaLive } from './AriaLive';\nexport type {\n Announce,\n AnnounceOptions,\n AriaLivePoliteness,\n AriaLiveProps,\n AriaLiveSlots,\n AriaLiveState,\n LiveMessage,\n} from './AriaLive.types';\nexport { renderAriaLive_unstable } from './renderAriaLive';\nexport { useAriaLive_unstable } from './useAriaLive';\nexport { ariaLiveClassNames, useAriaLiveStyles_unstable } from './useAriaLiveStyles.styles';\n"],"names":["AriaLive","renderAriaLive_unstable","useAriaLive_unstable","ariaLiveClassNames","useAriaLiveStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,kBAAQ;;;eAYRG,2CAAkB;;;eAFlBF,uCAAuB;;;eAEHG,mDAA0B;;;eAD9CF,iCAAoB;;;0BAXJ,aAAa;gCAUE,mBAAmB;6BACtB,gBAAgB;yCACU,6BAA6B"}
|
|
@@ -1 +1 @@
|
|
|
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 { AriaLiveState, AriaLiveSlots } from './AriaLive.types';\n\n/**\n * Render the final JSX of AriaLive\n */\nexport const renderAriaLive_unstable = (state: AriaLiveState) => {\n assertSlots<AriaLiveSlots>(state);\n\n return (\n <>\n <state.assertive />\n <state.polite />\n </>\n );\n};\n"],"names":["
|
|
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 { AriaLiveState, AriaLiveSlots } from './AriaLive.types';\n\n/**\n * Render the final JSX of AriaLive\n */\nexport const renderAriaLive_unstable = (state: AriaLiveState) => {\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":";;;;+BASaC;;;;;;4BARb,UAAiD;gCAErB,4BAA4B;AAMjD,gCAAgC,CAACC;QACtCF,2BAAAA,EAA2BE;IAE3B,OAAA,WAAA,OACE,gBAAA,EAAA,oBAAA,EAAA;;8BACE,eAAA,EAACA,MAAMC,SAAS,EAAA,CAAA;8BAChB,eAAA,EAACD,MAAME,MAAM,EAAA,CAAA;;;AAGnB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/AriaLive/useAriaLive.ts"],"sourcesContent":["import * 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":["
|
|
1
|
+
{"version":3,"sources":["../src/components/AriaLive/useAriaLive.ts"],"sourcesContent":["import * 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":";;;;+BAeaM;;;;;;;iEAfU,QAAQ;gCACyC,4BAA4B;AAGpG,gHAAgH,GAChH,MAAMD,mBAAmB;AAUlB,6BAA6B,CAACE;IACnC,MAAM,CAACC,gBAAgBC,kBAAkB,GAAGT,OAAMU,QAAQ,CAA0BC;IACpF,mFAAmF;IACnF,MAAMC,QAAQZ,OAAMa,MAAM,CAAC;IAC3B,MAAM,CAACC,aAAa,GAAGd,OAAMU,QAAQ,CAAC,QACpCT,mCAAAA,EAAiC,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,eAAWjB,gCAAAA,EAAiB,CAACkB,SAAiBC;QAClD,MAAM,EAAEJ,UAAU,EAAE,GAAGI;QACvB,IAAID,aAAYZ,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAgBY,OAAAA,AAAO,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,OAAGtB,0BAAAA;IAEjDJ,OAAM2B,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,OAAM8B,mBAAmB,CAACvB,MAAMwB,WAAW,EAAE,IAAMZ;IAEnD,MAAMa,gBAAgBxB,oBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAgBS,UAAAA,AAAU,MAAK,WAAWT,eAAeY,OAAO,GAAGT;IACzF,MAAMsB,mBAAmBzB,CAAAA,mBAAAA,QAAAA,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAgBS,UAAAA,AAAU,MAAK,cAAcT,eAAeY,OAAO,GAAGT;IAE/F,OAAO;QACLuB,YAAY;YACVC,WAAW;YACXC,QAAQ;QACV;QAEAD,WAAWhC,oBAAAA,CAAKkC,MAAM,CAAC9B,MAAM4B,SAAS,EAAE;YACtCG,cAAc;gBAAE,aAAa;gBAAaC,UAAUN;YAAiB;YACrEO,aAAa;QACf;QACAJ,QAAQjC,oBAAAA,CAAKkC,MAAM,CAAC9B,MAAM6B,MAAM,EAAE;YAChCE,cAAc;gBAAE,aAAa;gBAAUC,UAAUP;YAAc;YAC/DQ,aAAa;QACf;IACF;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useAriaLiveStyles.styles.js"],"sourcesContent":["import { mergeClasses, makeResetStyles } from '@griffel/react';\nexport const ariaLiveClassNames = {\n assertive: 'fui-AriaLive__assertive',\n polite: 'fui-AriaLive__polite'\n};\n/**\n * Styles for the root slot\n */ const useResetStyles = makeResetStyles({\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0px',\n width: '1px',\n position: 'absolute'\n});\n/**\n * Apply styling to the AriaLive slots based on the state\n */ export const useAriaLiveStyles_unstable = (state)=>{\n 'use no memo';\n const visuallyHidden = useResetStyles();\n state.assertive.className = mergeClasses(visuallyHidden, ariaLiveClassNames.assertive, state.assertive.className);\n state.polite.className = mergeClasses(visuallyHidden, ariaLiveClassNames.polite, state.polite.className);\n return state;\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["useAriaLiveStyles.styles.js"],"sourcesContent":["import { mergeClasses, makeResetStyles } from '@griffel/react';\nexport const ariaLiveClassNames = {\n assertive: 'fui-AriaLive__assertive',\n polite: 'fui-AriaLive__polite'\n};\n/**\n * Styles for the root slot\n */ const useResetStyles = makeResetStyles({\n clip: 'rect(0px, 0px, 0px, 0px)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: '0px',\n width: '1px',\n position: 'absolute'\n});\n/**\n * Apply styling to the AriaLive slots based on the state\n */ export const useAriaLiveStyles_unstable = (state)=>{\n 'use no memo';\n const visuallyHidden = useResetStyles();\n state.assertive.className = mergeClasses(visuallyHidden, ariaLiveClassNames.assertive, state.assertive.className);\n state.polite.className = mergeClasses(visuallyHidden, ariaLiveClassNames.polite, state.polite.className);\n return state;\n};\n"],"names":["mergeClasses","__resetStyles","ariaLiveClassNames","assertive","polite","useResetStyles","useAriaLiveStyles_unstable","state","visuallyHidden","className"],"mappings":";;;;;;;;;;;IACaE,kBAAkB;;;8BAiBY;;;;uBAlBG,gBAAgB;AACvD,2BAA2B;IAC9BC,SAAS,EAAE,yBAAyB;IACpCC,MAAM,EAAE;AACZ,CAAC;AACD;;CAEA,GAAI,MAAMC,cAAc,GAAA,WAAA,OAAGJ,oBAAA,EAAA,WAAA,MAAA;IAAA;CAQ1B,CAAC;AAGS,MAAMK,8BAA8BC,KAAK,IAAG;IACnD,aAAa;IACb,MAAMC,cAAc,GAAGH,cAAc,CAAC,CAAC;IACvCE,KAAK,CAACJ,SAAS,CAACM,SAAS,OAAGT,mBAAY,EAACQ,cAAc,EAAEN,kBAAkB,CAACC,SAAS,EAAEI,KAAK,CAACJ,SAAS,CAACM,SAAS,CAAC;IACjHF,KAAK,CAACH,MAAM,CAACK,SAAS,OAAGT,mBAAY,EAACQ,cAAc,EAAEN,kBAAkB,CAACE,MAAM,EAAEG,KAAK,CAACH,MAAM,CAACK,SAAS,CAAC;IACxG,OAAOF,KAAK;AAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/AriaLive/useAriaLiveStyles.styles.ts"],"sourcesContent":["import { 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 'use no memo';\n\n const visuallyHidden = useResetStyles();\n state.assertive.className = mergeClasses(visuallyHidden, ariaLiveClassNames.assertive, state.assertive.className);\n state.polite.className = mergeClasses(visuallyHidden, ariaLiveClassNames.polite, state.polite.className);\n\n return state;\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["../src/components/AriaLive/useAriaLiveStyles.styles.ts"],"sourcesContent":["import { 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 'use no memo';\n\n const visuallyHidden = useResetStyles();\n state.assertive.className = mergeClasses(visuallyHidden, ariaLiveClassNames.assertive, state.assertive.className);\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":";;;;;;;;;;;IAIaE,kBAAAA;;;8BAqBAW;;;;uBAzBiC,iBAAiB;AAIxD,2BAA0D;IAC/DV,WAAW;IACXC,QAAQ;AACV,EAAE;AAEF;;CAEC,GACD,MAAMC,qBAAiBJ,sBAAAA,EAAgB;IACrCK,MAAM;IACNC,QAAQ;IACRC,QAAQ;IACRC,UAAU;IACVC,SAAS;IACTC,OAAO;IACPC,UAAU;AACZ;AAKO,MAAMC,6BAA6B,CAACC;IACzC;IAEA,MAAMC,iBAAiBV;IACvBS,MAAMX,SAAS,CAACa,SAAS,OAAGhB,mBAAAA,EAAae,gBAAgBb,mBAAmBC,SAAS,EAAEW,MAAMX,SAAS,CAACa,SAAS;IAChHF,MAAMV,MAAM,CAACY,SAAS,OAAGhB,mBAAAA,EAAae,gBAAgBb,mBAAmBE,MAAM,EAAEU,MAAMV,MAAM,CAACY,SAAS;IAEvG,OAAOF;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Timer/Timer.tsx"],"sourcesContent":["import * 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":["
|
|
1
|
+
{"version":3,"sources":["../src/components/Timer/Timer.tsx"],"sourcesContent":["import * 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":";;;;+BAWaE;;;;;;;iEAXU,QAAQ;sCACQ,0BAA0B;AAU1D,cAAMA,WAAAA,GAAQF,OAAMG,UAAU,CAA6B,CAACC,OAAOC;IACxE,MAAMC,0BAAsBL,4CAAAA;IAC5B,MAAM,EAAEM,OAAO,EAAEC,OAAO,EAAEC,SAAS,EAAE,GAAGL;IAExC,MAAMM,QAA6B;QACjCC,mBAAmB,GAAGH,QAAQ,EAAE,CAAC;QACjCI,oBAAoBL,UAAU,YAAY;IAC5C;IAEA,IAAIC,UAAU,GAAG;QACf,OAAO;IACT;IAEA,OAAA,WAAA,GACE,OAAA,aAAA,CAACK,QAAAA;QACCC,gBAAgBL;QAChBM,qBAAmBL,MAAME,kBAAkB;QAC3CP,KAAKA;QACLK,OAAOA;QACPM,WAAWV;;AAGjB,GAAG;AAEHJ,MAAMe,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Timer/index.ts"],"sourcesContent":["export type { TimerProps } from './Timer';\nexport { Timer } from './Timer';\n"],"names":["Timer"],"
|
|
1
|
+
{"version":3,"sources":["../src/components/Timer/index.ts"],"sourcesContent":["export type { TimerProps } from './Timer';\nexport { Timer } from './Timer';\n"],"names":["Timer"],"mappings":";;;;;;;eACSA,YAAK;;;uBAAQ,UAAU"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useTimerStyles.styles.js"],"sourcesContent":["import { makeResetStyles } from '@griffel/react';\nexport const useBaseAnimationStyles = makeResetStyles({\n animationName: {\n from: {\n opacity: 0\n },\n to: {\n opacity: 0\n }\n }\n});\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["useTimerStyles.styles.js"],"sourcesContent":["import { makeResetStyles } from '@griffel/react';\nexport const useBaseAnimationStyles = makeResetStyles({\n animationName: {\n from: {\n opacity: 0\n },\n to: {\n opacity: 0\n }\n }\n});\n"],"names":["__resetStyles","useBaseAnimationStyles"],"mappings":";;;;;;;;;;uBAAgC,gBAAgB;AACzC,MAAMC,sBAAsB,GAAA,WAAA,OAAGD,oBAAA,EAAA,YAAA,WAAA;IAAA;IAAA;IAAA;CASrC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Timer/useTimerStyles.styles.ts"],"sourcesContent":["import { 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":["
|
|
1
|
+
{"version":3,"sources":["../src/components/Timer/useTimerStyles.styles.ts"],"sourcesContent":["import { 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":";;;;;;;;;;uBAAgC,iBAAiB;AAE1C,MAAMC,6BAAyBD,sBAAAA,EAAgB;IACpDE,eAAe;QACbC,MAAM;YACJC,SAAS;QACX;QACAC,IAAI;YACFD,SAAS;QACX;IACF;AACF,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Toast/Toast.tsx"],"sourcesContent":["import * 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":["
|
|
1
|
+
{"version":3,"sources":["../src/components/Toast/Toast.tsx"],"sourcesContent":["import * 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":";;;;+BAYaM;;;;;;;iEAZU,QAAQ;0BACG,aAAa;6BACV,gBAAgB;sCACb,0BAA0B;uCAGnB,0BAA0B;qCAC7B,kCAAkC;AAKvE,cAAMA,WAAAA,GAAyCN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IAC7E,MAAMC,YAAQT,2BAAAA,EAAkBO,OAAOC;QAEvCN,6CAAAA,EAAwBO;QACxBL,gDAAAA,EAA4B,2BAA2BK;IAEvD,WAAOR,iCAAAA,EAAqBQ,WAAON,qDAAAA,EAA+BM;AACpE,GAAG;AAEHJ,MAAMK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Toast/Toast.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { 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 * State used in rendering Toast\n */\nexport type ToastState = ComponentState<ToastSlots> & {\n backgroundAppearance: BackgroundAppearanceContextValue;\n intent?: ToastIntent | undefined;\n};\n"],"names":[],"
|
|
1
|
+
{"version":3,"sources":["../src/components/Toast/Toast.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { 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 * State used in rendering Toast\n */\nexport type ToastState = ComponentState<ToastSlots> & {\n backgroundAppearance: BackgroundAppearanceContextValue;\n intent?: ToastIntent | undefined;\n};\n"],"names":[],"mappings":"AAmBA;;CAEC,GACD,WAGE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Toast/index.ts"],"sourcesContent":["export { Toast } from './Toast';\nexport type { ToastContextValues, ToastProps, ToastSlots, ToastState } from './Toast.types';\nexport { renderToast_unstable } from './renderToast';\nexport { useToast_unstable } from './useToast';\nexport { toastClassNames, useToastStyles_unstable } from './useToastStyles.styles';\n"],"names":["Toast","renderToast_unstable","
|
|
1
|
+
{"version":3,"sources":["../src/components/Toast/index.ts"],"sourcesContent":["export { Toast } from './Toast';\nexport type { ToastContextValues, ToastProps, ToastSlots, ToastState } from './Toast.types';\nexport { renderToast_unstable } from './renderToast';\nexport { useToast_unstable } from './useToast';\nexport { toastClassNames, useToastStyles_unstable } from './useToastStyles.styles';\n"],"names":["Toast","renderToast_unstable","useToast_unstable","toastClassNames","useToastStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,YAAK;;;eAELC,iCAAoB;;;eAEpBE,qCAAe;;;eAAEC,6CAAuB;;;eADxCF,2BAAiB;;;uBAHJ,UAAU;6BAEK,gBAAgB;0BACnB,aAAa;sCACU,0BAA0B"}
|
|
@@ -1 +1 @@
|
|
|
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 { 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) => {\n assertSlots<ToastSlots>(state);\n\n return (\n <BackgroundAppearanceProvider value={contextValues.backgroundAppearance}>\n <state.root />\n </BackgroundAppearanceProvider>\n );\n};\n"],"names":["
|
|
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 { 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) => {\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":";;;;+BASaE;;;;;;4BARb,gDAAiD;gCACrB,4BAA4B;qCACX,kCAAkC;AAMxE,6BAA6B,CAACC,OAAmBC;QACtDJ,2BAAAA,EAAwBG;IAExB,OAAA,WAAA,OACE,eAAA,EAACF,iDAAAA,EAAAA;QAA6BI,OAAOD,cAAcE,oBAAoB;kBACrE,WAAA,OAAA,eAAA,EAACH,MAAMI,IAAI,EAAA,CAAA;;AAGjB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Toast/useToast.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { ToastProps, ToastState } from './Toast.types';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\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 { 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 backgroundAppearance: props.appearance,\n intent,\n };\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["../src/components/Toast/useToast.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { ToastProps, ToastState } from './Toast.types';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\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 { 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 backgroundAppearance: props.appearance,\n intent,\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useToastContainerContext","useToast_unstable","props","ref","intent","components","root","always","elementType","backgroundAppearance","appearance"],"mappings":";;;;+BAcaI;;;;;;;iEAdU,QAAQ;gCACgB,4BAA4B;uCAElC,uCAAuC;AAWzE,0BAA0B,CAACC,OAAmBC;IACnD,MAAM,EAAEC,MAAM,EAAE,OAAGJ,+CAAAA;IAEnB,OAAO;QACLK,YAAY;YACVC,MAAM;QACR;QACAA,MAAMP,oBAAAA,CAAKQ,MAAM,KACfT,wCAAAA,EAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FK,KAAKA;YACL,GAAGD,KAAK;QACV,IACA;YAAEM,aAAa;QAAM;QAEvBC,sBAAsBP,MAAMQ,UAAU;QACtCN;IACF;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Toast/useToastContextValues.ts"],"sourcesContent":["import { 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"],"
|
|
1
|
+
{"version":3,"sources":["../src/components/Toast/useToastContextValues.ts"],"sourcesContent":["import { 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":";;;;;;;;;;AAEO,SAASA,+BAA+BC,KAAiB;IAC9D,MAAM,EAAEC,oBAAoB,EAAE,GAAGD;IAEjC,OAAO;QACLC;IACF;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useToastStyles.styles.js"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const toastClassNames = {\n root: 'fui-Toast'\n};\nconst useRootBaseClassName = makeResetStyles({\n display: 'grid',\n gridTemplateColumns: 'auto 1fr auto',\n padding: '12px',\n borderRadius: tokens.borderRadiusMedium,\n border: `1px solid ${tokens.colorTransparentStroke}`,\n boxShadow: tokens.shadow8,\n fontSize: tokens.fontSizeBase300,\n lineHeight: '20px',\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.colorNeutralForeground1,\n backgroundColor: tokens.colorNeutralBackground1\n});\nconst useStyles = makeStyles({\n inverted: {\n color: tokens.colorNeutralForegroundInverted2,\n backgroundColor: tokens.colorNeutralBackgroundInverted\n }\n});\n/**\n * Apply styling to the Toast slots based on the state\n */ export const useToastStyles_unstable = (state)=>{\n 'use no memo';\n const rootBaseClassName = useRootBaseClassName();\n const styles = useStyles();\n state.root.className = mergeClasses(toastClassNames.root, rootBaseClassName, state.backgroundAppearance === 'inverted' && styles.inverted, state.root.className);\n return state;\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["useToastStyles.styles.js"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const toastClassNames = {\n root: 'fui-Toast'\n};\nconst useRootBaseClassName = makeResetStyles({\n display: 'grid',\n gridTemplateColumns: 'auto 1fr auto',\n padding: '12px',\n borderRadius: tokens.borderRadiusMedium,\n border: `1px solid ${tokens.colorTransparentStroke}`,\n boxShadow: tokens.shadow8,\n fontSize: tokens.fontSizeBase300,\n lineHeight: '20px',\n fontWeight: tokens.fontWeightSemibold,\n color: tokens.colorNeutralForeground1,\n backgroundColor: tokens.colorNeutralBackground1\n});\nconst useStyles = makeStyles({\n inverted: {\n color: tokens.colorNeutralForegroundInverted2,\n backgroundColor: tokens.colorNeutralBackgroundInverted\n }\n});\n/**\n * Apply styling to the Toast slots based on the state\n */ export const useToastStyles_unstable = (state)=>{\n 'use no memo';\n const rootBaseClassName = useRootBaseClassName();\n const styles = useStyles();\n state.root.className = mergeClasses(toastClassNames.root, rootBaseClassName, state.backgroundAppearance === 'inverted' && styles.inverted, state.root.className);\n return state;\n};\n"],"names":["__resetStyles","__styles","mergeClasses","tokens","toastClassNames","root","useRootBaseClassName","useStyles","inverted","sj55zd","De3pzq","d","useToastStyles_unstable","state","rootBaseClassName","styles","className","backgroundAppearance"],"mappings":";;;;;;;;;;;IAEaI,eAAe;;;IAwBXQ,uBAAuB;;;;uBA1BkB,gBAAgB;AAEnE,wBAAwB;IAC3BP,IAAI,EAAE;AACV,CAAC;AACD,MAAMC,oBAAoB,GAAA,WAAA,OAAGN,oBAAA,EAAA,WAAA,MAAA;IAAA;CAY5B,CAAC;AACF,MAAMO,SAAS,GAAA,WAAA,OAAGN,eAAA,EAAA;IAAAO,QAAA,EAAA;QAAAC,MAAA,EAAA;QAAAC,MAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;QAAA;KAAA;AAAA,CAKjB,CAAC;AAGS,iCAAiCE,KAAK,IAAG;IAChD,aAAa;IACb,MAAMC,iBAAiB,GAAGR,oBAAoB,CAAC,CAAC;IAChD,MAAMS,MAAM,GAAGR,SAAS,CAAC,CAAC;IAC1BM,KAAK,CAACR,IAAI,CAACW,SAAS,OAAGd,mBAAY,EAACE,eAAe,CAACC,IAAI,EAAES,iBAAiB,EAAED,KAAK,CAACI,oBAAoB,KAAK,UAAU,IAAIF,MAAM,CAACP,QAAQ,EAAEK,KAAK,CAACR,IAAI,CAACW,SAAS,CAAC;IAChK,OAAOH,KAAK;AAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Toast/useToastStyles.styles.ts"],"sourcesContent":["import { 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 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const styles = useStyles();\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":["
|
|
1
|
+
{"version":3,"sources":["../src/components/Toast/useToastStyles.styles.ts"],"sourcesContent":["import { 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 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const styles = useStyles();\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":";;;;;;;;;;;IAKaI,eAAAA;;;2BA4BAyB;eAAAA;;;uBAjC6C,iBAAiB;4BACpD,wBAAwB;AAIxC,wBAAoD;IACzDxB,MAAM;AACR,EAAE;AAEF,MAAMC,2BAAuBN,sBAAAA,EAAgB;IAC3CO,SAAS;IACTC,qBAAqB;IACrBC,SAAS;IACTC,cAAcP,kBAAAA,CAAOQ,kBAAkB;IACvCC,QAAQ,CAAC,UAAU,EAAET,kBAAAA,CAAOU,sBAAsB,EAAE;IACpDC,WAAWX,kBAAAA,CAAOY,OAAO;IACzBC,UAAUb,kBAAAA,CAAOc,eAAe;IAChCC,YAAY;IACZC,YAAYhB,kBAAAA,CAAOiB,kBAAkB;IACrCC,OAAOlB,kBAAAA,CAAOmB,uBAAuB;IACrCC,iBAAiBpB,kBAAAA,CAAOqB,uBAAuB;AACjD;AAEA,MAAMC,gBAAYxB,iBAAAA,EAAW;IAC3ByB,UAAU;QACRL,OAAOlB,kBAAAA,CAAOwB,+BAA+B;QAC7CJ,iBAAiBpB,kBAAAA,CAAOyB,8BAA8B;IACxD;AACF;AAKO,gCAAgC,CAACE;IACtC;IAEA,MAAMC,oBAAoBzB;IAC1B,MAAM0B,SAASP;IACfK,MAAMzB,IAAI,CAAC4B,SAAS,OAAG/B,mBAAAA,EACrBE,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":["../src/components/ToastBody/ToastBody.tsx"],"sourcesContent":["import * 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":["
|
|
1
|
+
{"version":3,"sources":["../src/components/ToastBody/ToastBody.tsx"],"sourcesContent":["import * 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":";;;;+BAWaK;;;;;;;iEAXU,QAAQ;8BACO,iBAAiB;iCACd,oBAAoB;0CACjB,8BAA8B;qCAG9B,kCAAkC;AAKvE,kBAAMA,WAAAA,GAAiDL,OAAMM,UAAU,CAAC,CAACC,OAAOC;IACrF,MAAMC,QAAQR,uCAAAA,EAAsBM,OAAOC;QAE3CL,qDAAAA,EAA4BM;QAC5BL,gDAAAA,EAA4B,+BAA+BK;IAE3D,WAAOP,yCAAAA,EAAyBO;AAClC,GAAG;AAEHJ,UAAUK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ToastBody/ToastBody.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { 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 * State used in rendering ToastBody\n */\nexport type ToastBodyState = ComponentState<ToastBodySlots> & {\n backgroundAppearance: BackgroundAppearanceContextValue;\n};\n"],"names":[],"
|
|
1
|
+
{"version":3,"sources":["../src/components/ToastBody/ToastBody.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { 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 * State used in rendering ToastBody\n */\nexport type ToastBodyState = ComponentState<ToastBodySlots> & {\n backgroundAppearance: BackgroundAppearanceContextValue;\n};\n"],"names":[],"mappings":"AAaA;;CAEC,GACD,WAEE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ToastBody/index.ts"],"sourcesContent":["export { ToastBody } from './ToastBody';\nexport type { ToastBodyProps, ToastBodySlots, ToastBodyState } from './ToastBody.types';\nexport { renderToastBody_unstable } from './renderToastBody';\nexport { useToastBody_unstable } from './useToastBody';\nexport { toastBodyClassNames, useToastBodyStyles_unstable } from './useToastBodyStyles.styles';\n"],"names":["ToastBody","renderToastBody_unstable","
|
|
1
|
+
{"version":3,"sources":["../src/components/ToastBody/index.ts"],"sourcesContent":["export { ToastBody } from './ToastBody';\nexport type { ToastBodyProps, ToastBodySlots, ToastBodyState } from './ToastBody.types';\nexport { renderToastBody_unstable } from './renderToastBody';\nexport { useToastBody_unstable } from './useToastBody';\nexport { toastBodyClassNames, useToastBodyStyles_unstable } from './useToastBodyStyles.styles';\n"],"names":["ToastBody","renderToastBody_unstable","useToastBody_unstable","toastBodyClassNames","useToastBodyStyles_unstable"],"mappings":";;;;;;;;;;;;eAASA,oBAAS;;;eAETC,yCAAwB;;;eAExBE,6CAAmB;;;eAAEC,qDAA2B;;;eADhDF,mCAAqB;;;2BAHJ,cAAc;iCAEC,oBAAoB;8BACvB,iBAAiB;0CACU,8BAA8B"}
|
|
@@ -1 +1 @@
|
|
|
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 { ToastBodyState, ToastBodySlots } from './ToastBody.types';\n\n/**\n * Render the final JSX of ToastBody\n */\nexport const renderToastBody_unstable = (state: ToastBodyState) => {\n assertSlots<ToastBodySlots>(state);\n\n return (\n <>\n <state.root />\n {state.subtitle ? <state.subtitle /> : null}\n </>\n );\n};\n"],"names":["
|
|
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 { ToastBodyState, ToastBodySlots } from './ToastBody.types';\n\n/**\n * Render the final JSX of ToastBody\n */\nexport const renderToastBody_unstable = (state: ToastBodyState) => {\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":";;;;+BASaC;;;;;;4BARb,UAAiD;gCAErB,4BAA4B;AAMjD,iCAAiC,CAACC;QACvCF,2BAAAA,EAA4BE;IAE5B,OAAA,WAAA,OACE,gBAAA,EAAA,oBAAA,EAAA;;8BACE,eAAA,EAACA,MAAMC,IAAI,EAAA,CAAA;YACVD,MAAME,QAAQ,GAAA,WAAA,OAAG,eAAA,EAACF,MAAME,QAAQ,EAAA,CAAA,KAAM;;;AAG7C,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ToastBody/useToastBody.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { ToastBodyProps, ToastBodyState } from './ToastBody.types';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\nimport { useBackgroundAppearance } from '@fluentui/react-shared-contexts';\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 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 backgroundAppearance,\n };\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["../src/components/ToastBody/useToastBody.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport type { ToastBodyProps, ToastBodyState } from './ToastBody.types';\nimport { useToastContainerContext } from '../../contexts/toastContainerContext';\nimport { useBackgroundAppearance } from '@fluentui/react-shared-contexts';\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 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 backgroundAppearance,\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useToastContainerContext","useBackgroundAppearance","useToastBody_unstable","props","ref","backgroundAppearance","bodyId","components","root","subtitle","optional","elementType","always","id"],"mappings":";;;;+BAeaK;;;;;;;iEAfU,QAAQ;gCACgB,4BAA4B;uCAElC,uCAAuC;qCACxC,kCAAkC;AAWnE,8BAA8B,CAACC,OAAuBC;IAC3D,MAAMC,2BAAuBJ,4CAAAA;IAC7B,MAAM,EAAEK,MAAM,EAAE,OAAGN,+CAAAA;IACnB,OAAO;QACLO,YAAY;YACVC,MAAM;YACNC,UAAU;QACZ;QACAA,UAAUV,oBAAAA,CAAKW,QAAQ,CAACP,MAAMM,QAAQ,EAAE;YAAEE,aAAa;QAAM;QAC7DH,MAAMT,oBAAAA,CAAKa,MAAM,KACfd,wCAAAA,EAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FM,KAAKA;YACLS,IAAIP;YACJ,GAAGH,KAAK;QACV,IACA;YAAEQ,aAAa;QAAM;QAEvBN;IACF;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useToastBodyStyles.styles.js"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const toastBodyClassNames = {\n root: 'fui-ToastBody',\n subtitle: 'fui-ToastBody__subtitle'\n};\nconst useRootBaseClassName = makeResetStyles({\n gridColumnStart: 2,\n gridColumnEnd: 3,\n paddingTop: '6px',\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightRegular,\n color: tokens.colorNeutralForeground1,\n wordBreak: 'break-word'\n});\nconst useSubtitleBaseClassName = makeResetStyles({\n paddingTop: '4px',\n gridColumnStart: 2,\n gridColumnEnd: 3,\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n color: tokens.colorNeutralForeground2\n});\nconst useInvertedStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForegroundInverted2\n },\n subtitle: {\n color: tokens.colorNeutralForegroundInverted2\n }\n});\n/**\n * Apply styling to the ToastBody slots based on the state\n */ export const useToastBodyStyles_unstable = (state)=>{\n 'use no memo';\n const rootBaseClassName = useRootBaseClassName();\n const subtitleBaseClassName = useSubtitleBaseClassName();\n const invertedStyles = useInvertedStyles();\n state.root.className = mergeClasses(toastBodyClassNames.root, rootBaseClassName, state.backgroundAppearance === 'inverted' && invertedStyles.root, state.root.className);\n if (state.subtitle) {\n state.subtitle.className = mergeClasses(toastBodyClassNames.subtitle, subtitleBaseClassName, state.backgroundAppearance === 'inverted' && invertedStyles.subtitle, state.subtitle.className);\n }\n return state;\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["useToastBodyStyles.styles.js"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const toastBodyClassNames = {\n root: 'fui-ToastBody',\n subtitle: 'fui-ToastBody__subtitle'\n};\nconst useRootBaseClassName = makeResetStyles({\n gridColumnStart: 2,\n gridColumnEnd: 3,\n paddingTop: '6px',\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightRegular,\n color: tokens.colorNeutralForeground1,\n wordBreak: 'break-word'\n});\nconst useSubtitleBaseClassName = makeResetStyles({\n paddingTop: '4px',\n gridColumnStart: 2,\n gridColumnEnd: 3,\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n color: tokens.colorNeutralForeground2\n});\nconst useInvertedStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForegroundInverted2\n },\n subtitle: {\n color: tokens.colorNeutralForegroundInverted2\n }\n});\n/**\n * Apply styling to the ToastBody slots based on the state\n */ export const useToastBodyStyles_unstable = (state)=>{\n 'use no memo';\n const rootBaseClassName = useRootBaseClassName();\n const subtitleBaseClassName = useSubtitleBaseClassName();\n const invertedStyles = useInvertedStyles();\n state.root.className = mergeClasses(toastBodyClassNames.root, rootBaseClassName, state.backgroundAppearance === 'inverted' && invertedStyles.root, state.root.className);\n if (state.subtitle) {\n state.subtitle.className = mergeClasses(toastBodyClassNames.subtitle, subtitleBaseClassName, state.backgroundAppearance === 'inverted' && invertedStyles.subtitle, state.subtitle.className);\n }\n return state;\n};\n"],"names":["__resetStyles","__styles","mergeClasses","tokens","toastBodyClassNames","root","subtitle","useRootBaseClassName","useSubtitleBaseClassName","useInvertedStyles","sj55zd","d","useToastBodyStyles_unstable","state","rootBaseClassName","subtitleBaseClassName","invertedStyles","className","backgroundAppearance"],"mappings":";;;;;;;;;;;IAEaI,mBAAmB;;;IAiCfQ,2BAA2B;;;;uBAnCc,gBAAgB;AAEnE,4BAA4B;IAC/BP,IAAI,EAAE,eAAe;IACrBC,QAAQ,EAAE;AACd,CAAC;AACD,MAAMC,oBAAoB,GAAA,WAAA,OAAGP,oBAAA,EAAA,WAAA,MAAA;IAAA;CAS5B,CAAC;AACF,MAAMQ,wBAAwB,GAAA,WAAA,OAAGR,oBAAA,EAAA,WAAA,MAAA;IAAA;CAQhC,CAAC;AACF,MAAMS,iBAAiB,GAAA,WAAA,OAAGR,eAAA,EAAA;IAAAI,IAAA,EAAA;QAAAK,MAAA,EAAA;IAAA;IAAAJ,QAAA,EAAA;QAAAI,MAAA,EAAA;IAAA;AAAA,GAAA;IAAAC,CAAA,EAAA;QAAA;KAAA;AAAA,CAOzB,CAAC;AAGS,oCAAqCE,KAAK,IAAG;IACpD,aAAa;IACb,MAAMC,iBAAiB,GAAGP,oBAAoB,CAAC,CAAC;IAChD,MAAMQ,qBAAqB,GAAGP,wBAAwB,CAAC,CAAC;IACxD,MAAMQ,cAAc,GAAGP,iBAAiB,CAAC,CAAC;IAC1CI,KAAK,CAACR,IAAI,CAACY,SAAS,OAAGf,mBAAY,EAACE,mBAAmB,CAACC,IAAI,EAAES,iBAAiB,EAAED,KAAK,CAACK,oBAAoB,KAAK,UAAU,IAAIF,cAAc,CAACX,IAAI,EAAEQ,KAAK,CAACR,IAAI,CAACY,SAAS,CAAC;IACxK,IAAIJ,KAAK,CAACP,QAAQ,EAAE;QAChBO,KAAK,CAACP,QAAQ,CAACW,SAAS,OAAGf,mBAAY,EAACE,mBAAmB,CAACE,QAAQ,EAAES,qBAAqB,EAAEF,KAAK,CAACK,oBAAoB,KAAK,UAAU,IAAIF,cAAc,CAACV,QAAQ,EAAEO,KAAK,CAACP,QAAQ,CAACW,SAAS,CAAC;IAChM;IACA,OAAOJ,KAAK;AAChB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ToastBody/useToastBodyStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { ToastBodySlots, ToastBodyState } from './ToastBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const toastBodyClassNames: SlotClassNames<ToastBodySlots> = {\n root: 'fui-ToastBody',\n subtitle: 'fui-ToastBody__subtitle',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n gridColumnStart: 2,\n gridColumnEnd: 3,\n paddingTop: '6px',\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightRegular,\n color: tokens.colorNeutralForeground1,\n wordBreak: 'break-word',\n});\n\nconst useSubtitleBaseClassName = makeResetStyles({\n paddingTop: '4px',\n gridColumnStart: 2,\n gridColumnEnd: 3,\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n color: tokens.colorNeutralForeground2,\n});\n\nconst useInvertedStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForegroundInverted2,\n },\n subtitle: {\n color: tokens.colorNeutralForegroundInverted2,\n },\n});\n\n/**\n * Apply styling to the ToastBody slots based on the state\n */\nexport const useToastBodyStyles_unstable = (state: ToastBodyState): ToastBodyState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const subtitleBaseClassName = useSubtitleBaseClassName();\n const invertedStyles = useInvertedStyles();\n state.root.className = mergeClasses(\n toastBodyClassNames.root,\n rootBaseClassName,\n state.backgroundAppearance === 'inverted' && invertedStyles.root,\n state.root.className,\n );\n\n if (state.subtitle) {\n state.subtitle.className = mergeClasses(\n toastBodyClassNames.subtitle,\n subtitleBaseClassName,\n state.backgroundAppearance === 'inverted' && invertedStyles.subtitle,\n state.subtitle.className,\n );\n }\n\n return state;\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["../src/components/ToastBody/useToastBodyStyles.styles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { ToastBodySlots, ToastBodyState } from './ToastBody.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const toastBodyClassNames: SlotClassNames<ToastBodySlots> = {\n root: 'fui-ToastBody',\n subtitle: 'fui-ToastBody__subtitle',\n};\n\nconst useRootBaseClassName = makeResetStyles({\n gridColumnStart: 2,\n gridColumnEnd: 3,\n paddingTop: '6px',\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightRegular,\n color: tokens.colorNeutralForeground1,\n wordBreak: 'break-word',\n});\n\nconst useSubtitleBaseClassName = makeResetStyles({\n paddingTop: '4px',\n gridColumnStart: 2,\n gridColumnEnd: 3,\n fontSize: tokens.fontSizeBase200,\n lineHeight: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n color: tokens.colorNeutralForeground2,\n});\n\nconst useInvertedStyles = makeStyles({\n root: {\n color: tokens.colorNeutralForegroundInverted2,\n },\n subtitle: {\n color: tokens.colorNeutralForegroundInverted2,\n },\n});\n\n/**\n * Apply styling to the ToastBody slots based on the state\n */\nexport const useToastBodyStyles_unstable = (state: ToastBodyState): ToastBodyState => {\n 'use no memo';\n\n const rootBaseClassName = useRootBaseClassName();\n const subtitleBaseClassName = useSubtitleBaseClassName();\n const invertedStyles = useInvertedStyles();\n state.root.className = mergeClasses(\n toastBodyClassNames.root,\n rootBaseClassName,\n state.backgroundAppearance === 'inverted' && invertedStyles.root,\n state.root.className,\n );\n\n if (state.subtitle) {\n state.subtitle.className = mergeClasses(\n toastBodyClassNames.subtitle,\n subtitleBaseClassName,\n state.backgroundAppearance === 'inverted' && invertedStyles.subtitle,\n state.subtitle.className,\n );\n }\n\n return state;\n};\n"],"names":["makeResetStyles","makeStyles","mergeClasses","tokens","toastBodyClassNames","root","subtitle","useRootBaseClassName","gridColumnStart","gridColumnEnd","paddingTop","fontSize","fontSizeBase300","lineHeight","fontWeight","fontWeightRegular","color","colorNeutralForeground1","wordBreak","useSubtitleBaseClassName","fontSizeBase200","colorNeutralForeground2","useInvertedStyles","colorNeutralForegroundInverted2","useToastBodyStyles_unstable","state","rootBaseClassName","subtitleBaseClassName","invertedStyles","className","backgroundAppearance"],"mappings":";;;;;;;;;;;IAKaI,mBAAAA;;;+BAsCAoB;eAAAA;;;uBA3C6C,iBAAiB;4BACpD,wBAAwB;AAIxC,4BAA4D;IACjEnB,MAAM;IACNC,UAAU;AACZ,EAAE;AAEF,MAAMC,2BAAuBP,sBAAAA,EAAgB;IAC3CQ,iBAAiB;IACjBC,eAAe;IACfC,YAAY;IACZC,UAAUR,kBAAAA,CAAOS,eAAe;IAChCC,YAAYV,kBAAAA,CAAOS,eAAe;IAClCE,YAAYX,kBAAAA,CAAOY,iBAAiB;IACpCC,OAAOb,kBAAAA,CAAOc,uBAAuB;IACrCC,WAAW;AACb;AAEA,MAAMC,2BAA2BnB,0BAAAA,EAAgB;IAC/CU,YAAY;IACZF,iBAAiB;IACjBC,eAAe;IACfE,UAAUR,kBAAAA,CAAOiB,eAAe;IAChCP,YAAYV,kBAAAA,CAAOiB,eAAe;IAClCN,YAAYX,kBAAAA,CAAOY,iBAAiB;IACpCC,OAAOb,kBAAAA,CAAOkB,uBAAuB;AACvC;AAEA,MAAMC,wBAAoBrB,iBAAAA,EAAW;IACnCI,MAAM;QACJW,OAAOb,kBAAAA,CAAOoB,+BAA+B;IAC/C;IACAjB,UAAU;QACRU,OAAOb,kBAAAA,CAAOoB,+BAA+B;IAC/C;AACF;AAKO,oCAAoC,CAACE;IAC1C;IAEA,MAAMC,oBAAoBnB;IAC1B,MAAMoB,wBAAwBR;IAC9B,MAAMS,iBAAiBN;IACvBG,MAAMpB,IAAI,CAACwB,SAAS,OAAG3B,mBAAAA,EACrBE,oBAAoBC,IAAI,EACxBqB,mBACAD,MAAMK,oBAAoB,KAAK,cAAcF,eAAevB,IAAI,EAChEoB,MAAMpB,IAAI,CAACwB,SAAS;IAGtB,IAAIJ,MAAMnB,QAAQ,EAAE;QAClBmB,MAAMnB,QAAQ,CAACuB,SAAS,OAAG3B,mBAAAA,EACzBE,oBAAoBE,QAAQ,EAC5BqB,uBACAF,MAAMK,oBAAoB,KAAK,cAAcF,eAAetB,QAAQ,EACpEmB,MAAMnB,QAAQ,CAACuB,SAAS;IAE5B;IAEA,OAAOJ;AACT,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ToastContainer/ToastContainer.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useToastContainer_unstable } from './useToastContainer';\nimport { renderToastContainer_unstable } from './renderToastContainer';\nimport { useToastContainerStyles_unstable } from './useToastContainerStyles.styles';\nimport type { ToastContainerProps } from './ToastContainer.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useToastContainerContextValues_unstable } from './useToastContainerContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ToastContainer component\n */\nexport const ToastContainer: ForwardRefComponent<ToastContainerProps> = React.forwardRef((props, ref) => {\n const state = useToastContainer_unstable(props, ref);\n\n useToastContainerStyles_unstable(state);\n useCustomStyleHook_unstable('useToastContainerStyles_unstable')(state);\n\n return renderToastContainer_unstable(state, useToastContainerContextValues_unstable(state));\n});\n\nToastContainer.displayName = 'ToastContainer';\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["../src/components/ToastContainer/ToastContainer.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useToastContainer_unstable } from './useToastContainer';\nimport { renderToastContainer_unstable } from './renderToastContainer';\nimport { useToastContainerStyles_unstable } from './useToastContainerStyles.styles';\nimport type { ToastContainerProps } from './ToastContainer.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useToastContainerContextValues_unstable } from './useToastContainerContextValues';\nimport { useCustomStyleHook_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * ToastContainer component\n */\nexport const ToastContainer: ForwardRefComponent<ToastContainerProps> = React.forwardRef((props, ref) => {\n const state = useToastContainer_unstable(props, ref);\n\n useToastContainerStyles_unstable(state);\n useCustomStyleHook_unstable('useToastContainerStyles_unstable')(state);\n\n return renderToastContainer_unstable(state, useToastContainerContextValues_unstable(state));\n});\n\nToastContainer.displayName = 'ToastContainer';\n"],"names":["React","useToastContainer_unstable","renderToastContainer_unstable","useToastContainerStyles_unstable","useToastContainerContextValues_unstable","useCustomStyleHook_unstable","ToastContainer","forwardRef","props","ref","state","displayName"],"mappings":";;;;+BAYaM;;;;;;;iEAZU,QAAQ;mCACY,sBAAsB;sCACnB,yBAAyB;+CACtB,mCAAmC;gDAG5B,mCAAmC;qCAC/C,kCAAkC;AAKvE,uBAAMA,WAAAA,GAA2DN,OAAMO,UAAU,CAAC,CAACC,OAAOC;IAC/F,MAAMC,YAAQT,6CAAAA,EAA2BO,OAAOC;QAEhDN,+DAAAA,EAAiCO;QACjCL,gDAAAA,EAA4B,oCAAoCK;IAEhE,WAAOR,mDAAAA,EAA8BQ,WAAON,uEAAAA,EAAwCM;AACtF,GAAG;AAEHJ,eAAeK,WAAW,GAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ToastContainer/ToastContainer.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { Announce } from '../AriaLive/AriaLive.types';\nimport { Toast, ToastIntent } from '../../state';\nimport { ToastContainerContextValue } from '../../contexts/toastContainerContext';\nimport { TimerProps } from '../Timer/Timer';\n\nexport type ToastContainerContextValues = {\n toast: ToastContainerContextValue;\n};\n\nexport type ToastContainerSlots = {\n root: NonNullable<Slot<'div'>>;\n timer: NonNullable<Slot<TimerProps>>;\n};\n\n/**\n * ToastContainer Props\n */\nexport type ToastContainerProps = Omit<ComponentProps<Partial<ToastContainerSlots>>, 'content'> &\n Toast & {\n visible: boolean;\n announce: Announce;\n intent: ToastIntent | undefined;\n tryRestoreFocus: () => void;\n };\n\n/**\n * State used in rendering ToastContainer\n */\nexport type ToastContainerState = ComponentState<ToastContainerSlots> &\n Pick<ToastContainerProps, 'remove' | 'close' | 'updateId' | 'visible' | 'intent'> &\n Pick<ToastContainerContextValue, 'titleId' | 'bodyId'> & {\n /**\n * @deprecated Will be always \"0\".\n */\n transitionTimeout: number;\n timerTimeout: number;\n running: boolean;\n /**\n * @deprecated Will be always no-op.\n */\n onTransitionEntering: () => void;\n /**\n * @deprecated\n */\n nodeRef: React.Ref<HTMLDivElement>;\n\n onMotionFinish?: (event: null, data: { direction: 'enter' | 'exit' }) => void;\n };\n"],"names":[
|
|
1
|
+
{"version":3,"sources":["../src/components/ToastContainer/ToastContainer.types.ts"],"sourcesContent":["import * as React from 'react';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport { Announce } from '../AriaLive/AriaLive.types';\nimport { Toast, ToastIntent } from '../../state';\nimport { ToastContainerContextValue } from '../../contexts/toastContainerContext';\nimport { TimerProps } from '../Timer/Timer';\n\nexport type ToastContainerContextValues = {\n toast: ToastContainerContextValue;\n};\n\nexport type ToastContainerSlots = {\n root: NonNullable<Slot<'div'>>;\n timer: NonNullable<Slot<TimerProps>>;\n};\n\n/**\n * ToastContainer Props\n */\nexport type ToastContainerProps = Omit<ComponentProps<Partial<ToastContainerSlots>>, 'content'> &\n Toast & {\n visible: boolean;\n announce: Announce;\n intent: ToastIntent | undefined;\n tryRestoreFocus: () => void;\n };\n\n/**\n * State used in rendering ToastContainer\n */\nexport type ToastContainerState = ComponentState<ToastContainerSlots> &\n Pick<ToastContainerProps, 'remove' | 'close' | 'updateId' | 'visible' | 'intent'> &\n Pick<ToastContainerContextValue, 'titleId' | 'bodyId'> & {\n /**\n * @deprecated Will be always \"0\".\n */\n transitionTimeout: number;\n timerTimeout: number;\n running: boolean;\n /**\n * @deprecated Will be always no-op.\n */\n onTransitionEntering: () => void;\n /**\n * @deprecated\n */\n nodeRef: React.Ref<HTMLDivElement>;\n\n onMotionFinish?: (event: null, data: { direction: 'enter' | 'exit' }) => void;\n };\n"],"names":["React"],"mappings":";;;;;iEAAuB,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ToastContainer/index.ts"],"sourcesContent":["export { ToastContainer } from './ToastContainer';\nexport type {\n ToastContainerContextValues,\n ToastContainerProps,\n ToastContainerSlots,\n ToastContainerState,\n} from './ToastContainer.types';\nexport { renderToastContainer_unstable } from './renderToastContainer';\nexport { useToastContainer_unstable } from './useToastContainer';\nexport { toastContainerClassNames, useToastContainerStyles_unstable } from './useToastContainerStyles.styles';\nexport { useToastContainerContextValues_unstable } from './useToastContainerContextValues';\n"],"names":["ToastContainer","renderToastContainer_unstable","
|
|
1
|
+
{"version":3,"sources":["../src/components/ToastContainer/index.ts"],"sourcesContent":["export { ToastContainer } from './ToastContainer';\nexport type {\n ToastContainerContextValues,\n ToastContainerProps,\n ToastContainerSlots,\n ToastContainerState,\n} from './ToastContainer.types';\nexport { renderToastContainer_unstable } from './renderToastContainer';\nexport { useToastContainer_unstable } from './useToastContainer';\nexport { toastContainerClassNames, useToastContainerStyles_unstable } from './useToastContainerStyles.styles';\nexport { useToastContainerContextValues_unstable } from './useToastContainerContextValues';\n"],"names":["ToastContainer","renderToastContainer_unstable","useToastContainer_unstable","toastContainerClassNames","useToastContainerStyles_unstable","useToastContainerContextValues_unstable"],"mappings":";;;;;;;;;;;;eAASA,8BAAc;;;eAOdC,mDAA6B;;;eAE7BE,uDAAwB;;;eACxBE,uEAAuC;;;eADbD,+DAAgC;;;eAD1DF,6CAA0B;;;gCARJ,mBAAmB;sCAOJ,yBAAyB;mCAC5B,sBAAsB;+CACU,mCAAmC;gDACtD,mCAAmC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/ToastContainer/renderToastContainer.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { ToastContainerState, ToastContainerSlots, ToastContainerContextValues } from './ToastContainer.types';\nimport { ToastContainerContextProvider } from '../../contexts/toastContainerContext';\nimport { CollapseDelayed } from '@fluentui/react-motion-components-preview';\n\n/**\n * Render the final JSX of ToastContainer\n */\nexport const renderToastContainer_unstable = (\n state: ToastContainerState,\n contextValues: ToastContainerContextValues,\n) => {\n const { onMotionFinish, visible, updateId } = state;\n assertSlots<ToastContainerSlots>(state);\n\n return (\n <ToastContainerContextProvider value={contextValues.toast}>\n <CollapseDelayed appear onMotionFinish={onMotionFinish} visible={visible} unmountOnExit>\n <state.root>\n {state.root.children}\n <state.timer key={updateId} />\n </state.root>\n </CollapseDelayed>\n </ToastContainerContextProvider>\n );\n};\n"],"names":["
|
|
1
|
+
{"version":3,"sources":["../src/components/ToastContainer/renderToastContainer.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { ToastContainerState, ToastContainerSlots, ToastContainerContextValues } from './ToastContainer.types';\nimport { ToastContainerContextProvider } from '../../contexts/toastContainerContext';\nimport { CollapseDelayed } from '@fluentui/react-motion-components-preview';\n\n/**\n * Render the final JSX of ToastContainer\n */\nexport const renderToastContainer_unstable = (\n state: ToastContainerState,\n contextValues: ToastContainerContextValues,\n) => {\n const { onMotionFinish, visible, updateId } = state;\n assertSlots<ToastContainerSlots>(state);\n\n return (\n <ToastContainerContextProvider value={contextValues.toast}>\n <CollapseDelayed appear onMotionFinish={onMotionFinish} visible={visible} unmountOnExit>\n <state.root>\n {state.root.children}\n <state.timer key={updateId} />\n </state.root>\n </CollapseDelayed>\n </ToastContainerContextProvider>\n );\n};\n"],"names":["assertSlots","ToastContainerContextProvider","CollapseDelayed","renderToastContainer_unstable","state","contextValues","onMotionFinish","visible","updateId","value","toast","appear","unmountOnExit","root","children","timer"],"mappings":";;;;+BAUaG;;;;;;4BATb,iCAAiD;gCACrB,4BAA4B;uCAEV,uCAAuC;8CACrD,4CAA4C;AAKrE,sCAAsC,CAC3CC,OACAC;IAEA,MAAM,EAAEC,cAAc,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGJ;QAC9CJ,2BAAAA,EAAiCI;IAEjC,OAAA,WAAA,OACE,eAAA,EAACH,oDAAAA,EAAAA;QAA8BQ,OAAOJ,cAAcK,KAAK;kBACvD,WAAA,OAAA,eAAA,EAACR,6CAAAA,EAAAA;YAAgBS,MAAM,EAAA;YAACL,gBAAgBA;YAAgBC,SAASA;YAASK,aAAa,EAAA;sBACrF,WAAA,OAAA,gBAAA,EAACR,MAAMS,IAAI,EAAA;;oBACRT,MAAMS,IAAI,CAACC,QAAQ;sCACpB,eAAA,EAACV,MAAMW,KAAK,EAAA,CAAA,GAAMP;;;;;AAK5B,EAAE"}
|