@fluentui/react-toast 0.0.0-nightly-20250522-1841.1 → 0.0.0-nightly-20250526-0407.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 CHANGED
@@ -1,30 +1,30 @@
1
1
  # Change Log - @fluentui/react-toast
2
2
 
3
- This log was last generated on Thu, 22 May 2025 18:57:35 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 26 May 2025 04:22:46 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20250522-1841.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-toast_v0.0.0-nightly-20250522-1841.1)
7
+ ## [0.0.0-nightly-20250526-0407.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-toast_v0.0.0-nightly-20250526-0407.1)
8
8
 
9
- Thu, 22 May 2025 18:57:35 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toast_v9.4.9..@fluentui/react-toast_v0.0.0-nightly-20250522-1841.1)
9
+ Mon, 26 May 2025 04:22:46 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-toast_v9.4.9..@fluentui/react-toast_v0.0.0-nightly-20250526-0407.1)
11
11
 
12
12
  ### Changes
13
13
 
14
14
  - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
15
- - Bump @fluentui/keyboard-keys to v0.0.0-nightly-20250522-1841.1 ([commit](https://github.com/microsoft/fluentui/commit/65e23f812dfc9891435733eb85581259559b4a38) by beachball)
16
- - Bump @fluentui/react-aria to v0.0.0-nightly-20250522-1841.1 ([commit](https://github.com/microsoft/fluentui/commit/65e23f812dfc9891435733eb85581259559b4a38) by beachball)
17
- - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20250522-1841.1 ([commit](https://github.com/microsoft/fluentui/commit/65e23f812dfc9891435733eb85581259559b4a38) by beachball)
18
- - Bump @fluentui/react-motion to v0.0.0-nightly-20250522-1841.1 ([commit](https://github.com/microsoft/fluentui/commit/65e23f812dfc9891435733eb85581259559b4a38) by beachball)
19
- - Bump @fluentui/react-motion-components-preview to v0.0.0-nightly-20250522-1841.1 ([commit](https://github.com/microsoft/fluentui/commit/65e23f812dfc9891435733eb85581259559b4a38) by beachball)
20
- - Bump @fluentui/react-portal to v0.0.0-nightly-20250522-1841.1 ([commit](https://github.com/microsoft/fluentui/commit/65e23f812dfc9891435733eb85581259559b4a38) by beachball)
21
- - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20250522-1841.1 ([commit](https://github.com/microsoft/fluentui/commit/65e23f812dfc9891435733eb85581259559b4a38) by beachball)
22
- - Bump @fluentui/react-tabster to v0.0.0-nightly-20250522-1841.1 ([commit](https://github.com/microsoft/fluentui/commit/65e23f812dfc9891435733eb85581259559b4a38) by beachball)
23
- - Bump @fluentui/react-theme to v0.0.0-nightly-20250522-1841.1 ([commit](https://github.com/microsoft/fluentui/commit/65e23f812dfc9891435733eb85581259559b4a38) by beachball)
24
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20250522-1841.1 ([commit](https://github.com/microsoft/fluentui/commit/65e23f812dfc9891435733eb85581259559b4a38) by beachball)
25
- - Bump @fluentui/react-provider to v0.0.0-nightly-20250522-1841.1 ([commit](https://github.com/microsoft/fluentui/commit/65e23f812dfc9891435733eb85581259559b4a38) by beachball)
26
- - Bump @fluentui/react-conformance to v0.0.0-nightly-20250522-1841.1 ([commit](https://github.com/microsoft/fluentui/commit/65e23f812dfc9891435733eb85581259559b4a38) by beachball)
27
- - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20250522-1841.1 ([commit](https://github.com/microsoft/fluentui/commit/65e23f812dfc9891435733eb85581259559b4a38) by beachball)
15
+ - Bump @fluentui/keyboard-keys to v0.0.0-nightly-20250526-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1bbfa924ac9a98d63dc9fe24b7a5139638a6e58d) by beachball)
16
+ - Bump @fluentui/react-aria to v0.0.0-nightly-20250526-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1bbfa924ac9a98d63dc9fe24b7a5139638a6e58d) by beachball)
17
+ - Bump @fluentui/react-jsx-runtime to v0.0.0-nightly-20250526-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1bbfa924ac9a98d63dc9fe24b7a5139638a6e58d) by beachball)
18
+ - Bump @fluentui/react-motion to v0.0.0-nightly-20250526-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1bbfa924ac9a98d63dc9fe24b7a5139638a6e58d) by beachball)
19
+ - Bump @fluentui/react-motion-components-preview to v0.0.0-nightly-20250526-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1bbfa924ac9a98d63dc9fe24b7a5139638a6e58d) by beachball)
20
+ - Bump @fluentui/react-portal to v0.0.0-nightly-20250526-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1bbfa924ac9a98d63dc9fe24b7a5139638a6e58d) by beachball)
21
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20250526-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1bbfa924ac9a98d63dc9fe24b7a5139638a6e58d) by beachball)
22
+ - Bump @fluentui/react-tabster to v0.0.0-nightly-20250526-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1bbfa924ac9a98d63dc9fe24b7a5139638a6e58d) by beachball)
23
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20250526-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1bbfa924ac9a98d63dc9fe24b7a5139638a6e58d) by beachball)
24
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20250526-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1bbfa924ac9a98d63dc9fe24b7a5139638a6e58d) by beachball)
25
+ - Bump @fluentui/react-provider to v0.0.0-nightly-20250526-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1bbfa924ac9a98d63dc9fe24b7a5139638a6e58d) by beachball)
26
+ - Bump @fluentui/react-conformance to v0.0.0-nightly-20250526-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1bbfa924ac9a98d63dc9fe24b7a5139638a6e58d) by beachball)
27
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20250526-0407.1 ([commit](https://github.com/microsoft/fluentui/commit/1bbfa924ac9a98d63dc9fe24b7a5139638a6e58d) by beachball)
28
28
 
29
29
  ## [9.4.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-toast_v9.4.9)
30
30
 
package/dist/index.d.ts CHANGED
@@ -27,7 +27,6 @@ declare type AriaLivePoliteness = 'polite' | 'assertive';
27
27
  */
28
28
  declare type AriaLiveProps = ComponentProps<Partial<AriaLiveSlots>> & {
29
29
  announceRef: React_2.Ref<Announce>;
30
- children?: React_2.ReactNode;
31
30
  };
32
31
 
33
32
  declare type AriaLiveSlots = {
@@ -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":["React"],"rangeMappings":"","mappings":"AAAA,YAAYA,WAAW,QAAQ"}
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};\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"],"rangeMappings":"","mappings":"AAAA,YAAYA,WAAW,QAAQ"}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { getIntrinsicElementProps, useMergedRefs, useEventCallback, useId, slot, omit } from '@fluentui/react-utilities';
2
+ import { getIntrinsicElementProps, useMergedRefs, useEventCallback, useId, slot } from '@fluentui/react-utilities';
3
3
  import { useFluent_unstable } from '@fluentui/react-shared-contexts';
4
4
  import { Delete, Tab } from '@fluentui/keyboard-keys';
5
5
  import { useFocusableGroup, useFocusFinders } from '@fluentui/react-tabster';
@@ -204,10 +204,7 @@ const intentPolitenessMap = {
204
204
  role: 'listitem',
205
205
  'aria-labelledby': titleId,
206
206
  'aria-describedby': bodyId,
207
- // The `content` type doesn't match the HTMLElement `content` attribute
208
- ...omit(rest, [
209
- 'content'
210
- ]),
207
+ ...rest,
211
208
  ...userRootSlot,
212
209
  ...focusableGroupAttribute,
213
210
  onMouseEnter,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ToastContainer/useToastContainer.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n useMergedRefs,\n ExtractSlotProps,\n Slot,\n useEventCallback,\n useId,\n slot,\n omit,\n} from '@fluentui/react-utilities';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { Delete, Tab } from '@fluentui/keyboard-keys';\nimport { useFocusableGroup, useFocusFinders } from '@fluentui/react-tabster';\nimport { ToastStatus } from '../../state';\nimport type { ToastContainerProps, ToastContainerState } from './ToastContainer.types';\nimport { Timer, TimerProps } from '../Timer/Timer';\n\nconst intentPolitenessMap = {\n success: 'assertive',\n warning: 'assertive',\n error: 'assertive',\n info: 'polite',\n} as const;\n\n/**\n * Create the state required to render ToastContainer.\n *\n * The returned state can be modified with hooks such as useToastContainerStyles_unstable,\n * before being passed to renderToastContainer_unstable.\n *\n * @param props - props from this instance of ToastContainer\n * @param ref - reference to root HTMLElement of ToastContainer\n */\nexport const useToastContainer_unstable = (\n props: ToastContainerProps,\n ref: React.Ref<HTMLElement>,\n): ToastContainerState => {\n const {\n visible,\n children,\n close: closeProp,\n remove,\n updateId,\n announce,\n data,\n timeout: timerTimeout,\n politeness: desiredPoliteness,\n intent = 'info',\n pauseOnHover,\n pauseOnWindowBlur,\n imperativeRef,\n tryRestoreFocus,\n ...rest\n } = props;\n const titleId = useId('toast-title');\n const bodyId = useId('toast-body');\n const toastRef = React.useRef<HTMLDivElement | null>(null);\n const { targetDocument } = useFluent_unstable();\n const [running, setRunning] = React.useState(false);\n const imperativePauseRef = React.useRef(false);\n const focusedToastBeforeClose = React.useRef(false);\n const focusableGroupAttribute = useFocusableGroup({\n tabBehavior: 'limited-trap-focus',\n // Users should only use Tab to focus into the toast\n // Escape is already reserved to dismiss all toasts\n ignoreDefaultKeydown: { Tab: true, Escape: true, Enter: true },\n });\n\n const close = useEventCallback(() => {\n const activeElement = targetDocument?.activeElement;\n if (activeElement && toastRef.current?.contains(activeElement)) {\n focusedToastBeforeClose.current = true;\n }\n\n closeProp();\n });\n const onStatusChange = useEventCallback((status: ToastStatus) => props.onStatusChange?.(null, { status, ...props }));\n const pause = useEventCallback(() => setRunning(false));\n const play = useEventCallback(() => {\n if (imperativePauseRef.current) {\n return;\n }\n const containsActive = !!toastRef.current?.contains(targetDocument?.activeElement ?? null);\n if (timerTimeout < 0) {\n setRunning(true);\n return;\n }\n\n if (!containsActive) {\n setRunning(true);\n }\n });\n\n React.useImperativeHandle(imperativeRef, () => ({\n focus: () => {\n if (!toastRef.current) {\n return;\n }\n\n toastRef.current.focus();\n },\n\n play: () => {\n imperativePauseRef.current = false;\n play();\n },\n pause: () => {\n imperativePauseRef.current = true;\n pause();\n },\n }));\n\n React.useEffect(() => {\n return () => onStatusChange('unmounted');\n }, [onStatusChange]);\n\n React.useEffect(() => {\n if (!targetDocument) {\n return;\n }\n\n if (pauseOnWindowBlur) {\n targetDocument.defaultView?.addEventListener('focus', play);\n targetDocument.defaultView?.addEventListener('blur', pause);\n return () => {\n targetDocument.defaultView?.removeEventListener('focus', play);\n targetDocument.defaultView?.removeEventListener('blur', pause);\n };\n }\n }, [targetDocument, pause, play, pauseOnWindowBlur]);\n\n // Users never actually use ToastContainer as a JSX but imperatively through useToastContainerController\n const userRootSlot = (data as { root?: ExtractSlotProps<Slot<'div'>> }).root;\n const onMotionFinish = React.useCallback(\n (_: null, { direction }: { direction: 'exit' | 'enter' }) => {\n if (direction === 'exit') {\n remove();\n }\n\n if (direction === 'enter') {\n // start toast once it's fully animated in\n play();\n onStatusChange('visible');\n }\n },\n [onStatusChange, play, remove],\n );\n\n const onMouseEnter = useEventCallback((e: React.MouseEvent<HTMLDivElement>) => {\n pause();\n userRootSlot?.onMouseEnter?.(e);\n });\n\n const onMouseLeave = useEventCallback((e: React.MouseEvent<HTMLDivElement>) => {\n play();\n userRootSlot?.onMouseEnter?.(e);\n });\n\n const { findFirstFocusable, findLastFocusable } = useFocusFinders();\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLDivElement>) => {\n if (e.key === Delete) {\n e.preventDefault();\n close();\n }\n\n if (e.key === Tab && e.currentTarget === e.target) {\n e.preventDefault();\n if (e.shiftKey) {\n findLastFocusable(e.currentTarget)?.focus();\n } else {\n findFirstFocusable(e.currentTarget)?.focus();\n }\n }\n\n userRootSlot?.onKeyDown?.(e);\n });\n\n React.useEffect(() => {\n if (!visible) {\n return;\n }\n\n const politeness = desiredPoliteness ?? intentPolitenessMap[intent];\n announce(toastRef.current?.textContent ?? '', { politeness });\n }, [announce, desiredPoliteness, toastRef, visible, updateId, intent]);\n\n React.useEffect(() => {\n return () => {\n if (focusedToastBeforeClose.current) {\n focusedToastBeforeClose.current = false;\n tryRestoreFocus();\n }\n };\n }, [tryRestoreFocus]);\n\n return {\n components: {\n timer: Timer,\n root: 'div',\n },\n timer: slot.always<TimerProps>({ onTimeout: close, running, timeout: timerTimeout ?? -1 }, { elementType: Timer }),\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, toastRef) as React.Ref<HTMLDivElement>,\n children,\n tabIndex: 0,\n role: 'listitem',\n 'aria-labelledby': titleId,\n 'aria-describedby': bodyId,\n // The `content` type doesn't match the HTMLElement `content` attribute\n ...omit(rest, ['content']),\n ...userRootSlot,\n ...focusableGroupAttribute,\n onMouseEnter,\n onMouseLeave,\n onKeyDown,\n }),\n { elementType: 'div' },\n ),\n timerTimeout,\n transitionTimeout: 0,\n running,\n visible,\n remove,\n close,\n onTransitionEntering: () => {\n /* no-op */\n },\n updateId,\n nodeRef: toastRef,\n intent,\n titleId,\n bodyId,\n onMotionFinish,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useMergedRefs","useEventCallback","useId","slot","omit","useFluent_unstable","Delete","Tab","useFocusableGroup","useFocusFinders","Timer","intentPolitenessMap","success","warning","error","info","useToastContainer_unstable","props","ref","visible","children","close","closeProp","remove","updateId","announce","data","timeout","timerTimeout","politeness","desiredPoliteness","intent","pauseOnHover","pauseOnWindowBlur","imperativeRef","tryRestoreFocus","rest","titleId","bodyId","toastRef","useRef","targetDocument","running","setRunning","useState","imperativePauseRef","focusedToastBeforeClose","focusableGroupAttribute","tabBehavior","ignoreDefaultKeydown","Escape","Enter","activeElement","current","contains","onStatusChange","status","pause","play","containsActive","useImperativeHandle","focus","useEffect","defaultView","addEventListener","removeEventListener","userRootSlot","root","onMotionFinish","useCallback","_","direction","onMouseEnter","e","onMouseLeave","findFirstFocusable","findLastFocusable","onKeyDown","key","preventDefault","currentTarget","target","shiftKey","textContent","components","timer","always","onTimeout","elementType","tabIndex","role","transitionTimeout","onTransitionEntering","nodeRef"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SACEC,wBAAwB,EACxBC,aAAa,EAGbC,gBAAgB,EAChBC,KAAK,EACLC,IAAI,EACJC,IAAI,QACC,4BAA4B;AACnC,SAASC,kBAAkB,QAAQ,kCAAkC;AACrE,SAASC,MAAM,EAAEC,GAAG,QAAQ,0BAA0B;AACtD,SAASC,iBAAiB,EAAEC,eAAe,QAAQ,0BAA0B;AAG7E,SAASC,KAAK,QAAoB,iBAAiB;AAEnD,MAAMC,sBAAsB;IAC1BC,SAAS;IACTC,SAAS;IACTC,OAAO;IACPC,MAAM;AACR;AAEA;;;;;;;;CAQC,GACD,OAAO,MAAMC,6BAA6B,CACxCC,OACAC;IAEA,MAAM,EACJC,OAAO,EACPC,QAAQ,EACRC,OAAOC,SAAS,EAChBC,MAAM,EACNC,QAAQ,EACRC,QAAQ,EACRC,IAAI,EACJC,SAASC,YAAY,EACrBC,YAAYC,iBAAiB,EAC7BC,SAAS,MAAM,EACfC,YAAY,EACZC,i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QACd,OAAO;YACL,IAAIhB,wBAAwBO,OAAO,EAAE;gBACnCP,wBAAwBO,OAAO,GAAG;gBAClClB;YACF;QACF;IACF,GAAG;QAACA;KAAgB;IAEpB,OAAO;QACLiD,YAAY;YACVC,OAAO3E;YACPyD,MAAM;QACR;QACAkB,OAAOlF,KAAKmF,MAAM,CAAa;YAAEC,WAAWlE;YAAOqB;YAASf,SAASC,yBAAAA,0BAAAA,eAAgB,CAAC;QAAE,GAAG;YAAE4D,aAAa9E;QAAM;QAChHyD,MAAMhE,KAAKmF,MAAM,CACfvF,yBAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FmB,KAAKlB,cAAckB,KAAKqB;YACxBnB;YACAqE,UAAU;YACVC,MAAM;YACN,mBAAmBrD;YACnB,oBAAoBC;YACpB,uEAAuE;YACvE,GAAGlC,KAAKgC,MAAM;gBAAC;aAAU,CAAC;YAC1B,GAAG8B,YAAY;YACf,GAAGnB,uBAAuB;YAC1ByB;YACAE;YACAG;QACF,IACA;YAAEW,aAAa;QAAM;QAEvB5D;QACA+D,mBAAmB;QACnBjD;QACAvB;QACAI;QACAF;QACAuE,sBAAsB;QACpB,SAAS,GACX;QACApE;QACAqE,SAAStD;QACTR;QACAM;QACAC;QACA8B;IACF;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/ToastContainer/useToastContainer.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n useMergedRefs,\n ExtractSlotProps,\n Slot,\n useEventCallback,\n useId,\n slot,\n} from '@fluentui/react-utilities';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { Delete, Tab } from '@fluentui/keyboard-keys';\nimport { useFocusableGroup, useFocusFinders } from '@fluentui/react-tabster';\nimport { ToastStatus } from '../../state';\nimport type { ToastContainerProps, ToastContainerState } from './ToastContainer.types';\nimport { Timer, TimerProps } from '../Timer/Timer';\n\nconst intentPolitenessMap = {\n success: 'assertive',\n warning: 'assertive',\n error: 'assertive',\n info: 'polite',\n} as const;\n\n/**\n * Create the state required to render ToastContainer.\n *\n * The returned state can be modified with hooks such as useToastContainerStyles_unstable,\n * before being passed to renderToastContainer_unstable.\n *\n * @param props - props from this instance of ToastContainer\n * @param ref - reference to root HTMLElement of ToastContainer\n */\nexport const useToastContainer_unstable = (\n props: ToastContainerProps,\n ref: React.Ref<HTMLElement>,\n): ToastContainerState => {\n const {\n visible,\n children,\n close: closeProp,\n remove,\n updateId,\n announce,\n data,\n timeout: timerTimeout,\n politeness: desiredPoliteness,\n intent = 'info',\n pauseOnHover,\n pauseOnWindowBlur,\n imperativeRef,\n tryRestoreFocus,\n ...rest\n } = props;\n const titleId = useId('toast-title');\n const bodyId = useId('toast-body');\n const toastRef = React.useRef<HTMLDivElement | null>(null);\n const { targetDocument } = useFluent_unstable();\n const [running, setRunning] = React.useState(false);\n const imperativePauseRef = React.useRef(false);\n const focusedToastBeforeClose = React.useRef(false);\n const focusableGroupAttribute = useFocusableGroup({\n tabBehavior: 'limited-trap-focus',\n // Users should only use Tab to focus into the toast\n // Escape is already reserved to dismiss all toasts\n ignoreDefaultKeydown: { Tab: true, Escape: true, Enter: true },\n });\n\n const close = useEventCallback(() => {\n const activeElement = targetDocument?.activeElement;\n if (activeElement && toastRef.current?.contains(activeElement)) {\n focusedToastBeforeClose.current = true;\n }\n\n closeProp();\n });\n const onStatusChange = useEventCallback((status: ToastStatus) => props.onStatusChange?.(null, { status, ...props }));\n const pause = useEventCallback(() => setRunning(false));\n const play = useEventCallback(() => {\n if (imperativePauseRef.current) {\n return;\n }\n const containsActive = !!toastRef.current?.contains(targetDocument?.activeElement ?? null);\n if (timerTimeout < 0) {\n setRunning(true);\n return;\n }\n\n if (!containsActive) {\n setRunning(true);\n }\n });\n\n React.useImperativeHandle(imperativeRef, () => ({\n focus: () => {\n if (!toastRef.current) {\n return;\n }\n\n toastRef.current.focus();\n },\n\n play: () => {\n imperativePauseRef.current = false;\n play();\n },\n pause: () => {\n imperativePauseRef.current = true;\n pause();\n },\n }));\n\n React.useEffect(() => {\n return () => onStatusChange('unmounted');\n }, [onStatusChange]);\n\n React.useEffect(() => {\n if (!targetDocument) {\n return;\n }\n\n if (pauseOnWindowBlur) {\n targetDocument.defaultView?.addEventListener('focus', play);\n targetDocument.defaultView?.addEventListener('blur', pause);\n return () => {\n targetDocument.defaultView?.removeEventListener('focus', play);\n targetDocument.defaultView?.removeEventListener('blur', pause);\n };\n }\n }, [targetDocument, pause, play, pauseOnWindowBlur]);\n\n // Users never actually use ToastContainer as a JSX but imperatively through useToastContainerController\n const userRootSlot = (data as { root?: ExtractSlotProps<Slot<'div'>> }).root;\n const onMotionFinish = React.useCallback(\n (_: null, { direction }: { direction: 'exit' | 'enter' }) => {\n if (direction === 'exit') {\n remove();\n }\n\n if (direction === 'enter') {\n // start toast once it's fully animated in\n play();\n onStatusChange('visible');\n }\n },\n [onStatusChange, play, remove],\n );\n\n const onMouseEnter = useEventCallback((e: React.MouseEvent<HTMLDivElement>) => {\n pause();\n userRootSlot?.onMouseEnter?.(e);\n });\n\n const onMouseLeave = useEventCallback((e: React.MouseEvent<HTMLDivElement>) => {\n play();\n userRootSlot?.onMouseEnter?.(e);\n });\n\n const { findFirstFocusable, findLastFocusable } = useFocusFinders();\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLDivElement>) => {\n if (e.key === Delete) {\n e.preventDefault();\n close();\n }\n\n if (e.key === Tab && e.currentTarget === e.target) {\n e.preventDefault();\n if (e.shiftKey) {\n findLastFocusable(e.currentTarget)?.focus();\n } else {\n findFirstFocusable(e.currentTarget)?.focus();\n }\n }\n\n userRootSlot?.onKeyDown?.(e);\n });\n\n React.useEffect(() => {\n if (!visible) {\n return;\n }\n\n const politeness = desiredPoliteness ?? intentPolitenessMap[intent];\n announce(toastRef.current?.textContent ?? '', { politeness });\n }, [announce, desiredPoliteness, toastRef, visible, updateId, intent]);\n\n React.useEffect(() => {\n return () => {\n if (focusedToastBeforeClose.current) {\n focusedToastBeforeClose.current = false;\n tryRestoreFocus();\n }\n };\n }, [tryRestoreFocus]);\n\n return {\n components: {\n timer: Timer,\n root: 'div',\n },\n timer: slot.always<TimerProps>({ onTimeout: close, running, timeout: timerTimeout ?? -1 }, { elementType: Timer }),\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, toastRef) as React.Ref<HTMLDivElement>,\n children,\n tabIndex: 0,\n role: 'listitem',\n 'aria-labelledby': titleId,\n 'aria-describedby': bodyId,\n ...rest,\n ...userRootSlot,\n ...focusableGroupAttribute,\n onMouseEnter,\n onMouseLeave,\n onKeyDown,\n }),\n { elementType: 'div' },\n ),\n timerTimeout,\n transitionTimeout: 0,\n running,\n visible,\n remove,\n close,\n onTransitionEntering: () => {\n /* no-op */\n },\n updateId,\n nodeRef: toastRef,\n intent,\n titleId,\n bodyId,\n onMotionFinish,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useMergedRefs","useEventCallback","useId","slot","useFluent_unstable","Delete","Tab","useFocusableGroup","useFocusFinders","Timer","intentPolitenessMap","success","warning","error","info","useToastContainer_unstable","props","ref","visible","children","close","closeProp","remove","updateId","announce","data","timeout","timerTimeout","politeness","desiredPoliteness","intent","pauseOnHover","pauseOnWindowBlur","imperativeRef","tryRestoreFocus","rest","titleId","bodyId","toastRef","useRef","targetDocument","running","setRunning","useState","imperativePauseRef","focusedToastBeforeClose","focusableGroupAttribute","tabBehavior","ignoreDefaultKeydown","Escape","Enter","activeElement","current","contains","onStatusChange","status","pause","play","containsActive","useImperativeHandle","focus","useEffect","defaultView","addEventListener","removeEventListener","userRootSlot","root","onMotionFinish","useCallback","_","direction","onMouseEnter","e","onMouseLeave","findFirstFocusable","findLastFocusable","onKeyDown","key","preventDefault","currentTarget","target","shiftKey","textContent","components","timer","always","onTimeout","elementType","tabIndex","role","transition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a9E;QAAM;QAChHyD,MAAM/D,KAAKkF,MAAM,CACftF,yBAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FkB,KAAKjB,cAAciB,KAAKqB;YACxBnB;YACAqE,UAAU;YACVC,MAAM;YACN,mBAAmBrD;YACnB,oBAAoBC;YACpB,GAAGF,IAAI;YACP,GAAG8B,YAAY;YACf,GAAGnB,uBAAuB;YAC1ByB;YACAE;YACAG;QACF,IACA;YAAEW,aAAa;QAAM;QAEvB5D;QACA+D,mBAAmB;QACnBjD;QACAvB;QACAI;QACAF;QACAuE,sBAAsB;QACpB,SAAS,GACX;QACApE;QACAqE,SAAStD;QACTR;QACAM;QACAC;QACA8B;IACF;AACF,EAAE"}
@@ -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":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
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};\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":[],"rangeMappings":";;;;;","mappings":";;;;;iEAAuB"}
@@ -207,10 +207,7 @@ const useToastContainer_unstable = (props, ref)=>{
207
207
  role: 'listitem',
208
208
  'aria-labelledby': titleId,
209
209
  'aria-describedby': bodyId,
210
- // The `content` type doesn't match the HTMLElement `content` attribute
211
- ...(0, _reactutilities.omit)(rest, [
212
- 'content'
213
- ]),
210
+ ...rest,
214
211
  ...userRootSlot,
215
212
  ...focusableGroupAttribute,
216
213
  onMouseEnter,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ToastContainer/useToastContainer.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n useMergedRefs,\n ExtractSlotProps,\n Slot,\n useEventCallback,\n useId,\n slot,\n omit,\n} from '@fluentui/react-utilities';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { Delete, Tab } from '@fluentui/keyboard-keys';\nimport { useFocusableGroup, useFocusFinders } from '@fluentui/react-tabster';\nimport { ToastStatus } from '../../state';\nimport type { ToastContainerProps, ToastContainerState } from './ToastContainer.types';\nimport { Timer, TimerProps } from '../Timer/Timer';\n\nconst intentPolitenessMap = {\n success: 'assertive',\n warning: 'assertive',\n error: 'assertive',\n info: 'polite',\n} as const;\n\n/**\n * Create the state required to render ToastContainer.\n *\n * The returned state can be modified with hooks such as useToastContainerStyles_unstable,\n * before being passed to renderToastContainer_unstable.\n *\n * @param props - props from this instance of ToastContainer\n * @param ref - reference to root HTMLElement of ToastContainer\n */\nexport const useToastContainer_unstable = (\n props: ToastContainerProps,\n ref: React.Ref<HTMLElement>,\n): ToastContainerState => {\n const {\n visible,\n children,\n close: closeProp,\n remove,\n updateId,\n announce,\n data,\n timeout: timerTimeout,\n politeness: desiredPoliteness,\n intent = 'info',\n pauseOnHover,\n pauseOnWindowBlur,\n imperativeRef,\n tryRestoreFocus,\n ...rest\n } = props;\n const titleId = useId('toast-title');\n const bodyId = useId('toast-body');\n const toastRef = React.useRef<HTMLDivElement | null>(null);\n const { targetDocument } = useFluent_unstable();\n const [running, setRunning] = React.useState(false);\n const imperativePauseRef = React.useRef(false);\n const focusedToastBeforeClose = React.useRef(false);\n const focusableGroupAttribute = useFocusableGroup({\n tabBehavior: 'limited-trap-focus',\n // Users should only use Tab to focus into the toast\n // Escape is already reserved to dismiss all toasts\n ignoreDefaultKeydown: { Tab: true, Escape: true, Enter: true },\n });\n\n const close = useEventCallback(() => {\n const activeElement = targetDocument?.activeElement;\n if (activeElement && toastRef.current?.contains(activeElement)) {\n focusedToastBeforeClose.current = true;\n }\n\n closeProp();\n });\n const onStatusChange = useEventCallback((status: ToastStatus) => props.onStatusChange?.(null, { status, ...props }));\n const pause = useEventCallback(() => setRunning(false));\n const play = useEventCallback(() => {\n if (imperativePauseRef.current) {\n return;\n }\n const containsActive = !!toastRef.current?.contains(targetDocument?.activeElement ?? null);\n if (timerTimeout < 0) {\n setRunning(true);\n return;\n }\n\n if (!containsActive) {\n setRunning(true);\n }\n });\n\n React.useImperativeHandle(imperativeRef, () => ({\n focus: () => {\n if (!toastRef.current) {\n return;\n }\n\n toastRef.current.focus();\n },\n\n play: () => {\n imperativePauseRef.current = false;\n play();\n },\n pause: () => {\n imperativePauseRef.current = true;\n pause();\n },\n }));\n\n React.useEffect(() => {\n return () => onStatusChange('unmounted');\n }, [onStatusChange]);\n\n React.useEffect(() => {\n if (!targetDocument) {\n return;\n }\n\n if (pauseOnWindowBlur) {\n targetDocument.defaultView?.addEventListener('focus', play);\n targetDocument.defaultView?.addEventListener('blur', pause);\n return () => {\n targetDocument.defaultView?.removeEventListener('focus', play);\n targetDocument.defaultView?.removeEventListener('blur', pause);\n };\n }\n }, [targetDocument, pause, play, pauseOnWindowBlur]);\n\n // Users never actually use ToastContainer as a JSX but imperatively through useToastContainerController\n const userRootSlot = (data as { root?: ExtractSlotProps<Slot<'div'>> }).root;\n const onMotionFinish = React.useCallback(\n (_: null, { direction }: { direction: 'exit' | 'enter' }) => {\n if (direction === 'exit') {\n remove();\n }\n\n if (direction === 'enter') {\n // start toast once it's fully animated in\n play();\n onStatusChange('visible');\n }\n },\n [onStatusChange, play, remove],\n );\n\n const onMouseEnter = useEventCallback((e: React.MouseEvent<HTMLDivElement>) => {\n pause();\n userRootSlot?.onMouseEnter?.(e);\n });\n\n const onMouseLeave = useEventCallback((e: React.MouseEvent<HTMLDivElement>) => {\n play();\n userRootSlot?.onMouseEnter?.(e);\n });\n\n const { findFirstFocusable, findLastFocusable } = useFocusFinders();\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLDivElement>) => {\n if (e.key === Delete) {\n e.preventDefault();\n close();\n }\n\n if (e.key === Tab && e.currentTarget === e.target) {\n e.preventDefault();\n if (e.shiftKey) {\n findLastFocusable(e.currentTarget)?.focus();\n } else {\n findFirstFocusable(e.currentTarget)?.focus();\n }\n }\n\n userRootSlot?.onKeyDown?.(e);\n });\n\n React.useEffect(() => {\n if (!visible) {\n return;\n }\n\n const politeness = desiredPoliteness ?? intentPolitenessMap[intent];\n announce(toastRef.current?.textContent ?? '', { politeness });\n }, [announce, desiredPoliteness, toastRef, visible, updateId, intent]);\n\n React.useEffect(() => {\n return () => {\n if (focusedToastBeforeClose.current) {\n focusedToastBeforeClose.current = false;\n tryRestoreFocus();\n }\n };\n }, [tryRestoreFocus]);\n\n return {\n components: {\n timer: Timer,\n root: 'div',\n },\n timer: slot.always<TimerProps>({ onTimeout: close, running, timeout: timerTimeout ?? -1 }, { elementType: Timer }),\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, toastRef) as React.Ref<HTMLDivElement>,\n children,\n tabIndex: 0,\n role: 'listitem',\n 'aria-labelledby': titleId,\n 'aria-describedby': bodyId,\n // The `content` type doesn't match the HTMLElement `content` attribute\n ...omit(rest, ['content']),\n ...userRootSlot,\n ...focusableGroupAttribute,\n onMouseEnter,\n onMouseLeave,\n onKeyDown,\n }),\n { elementType: 'div' },\n ),\n timerTimeout,\n transitionTimeout: 0,\n running,\n visible,\n remove,\n close,\n onTransitionEntering: () => {\n /* no-op */\n },\n updateId,\n nodeRef: toastRef,\n intent,\n titleId,\n bodyId,\n onMotionFinish,\n };\n};\n"],"names":["useToastContainer_unstable","intentPolitenessMap","success","warning","error","info","props","ref","visible","children","close","closeProp","remove","updateId","announce","data","timeout","timerTimeout","politeness","desiredPoliteness","intent","pauseOnHover","pauseOnWindowBlur","imperativeRef","tryRestoreFocus","rest","titleId","useId","bodyId","toastRef","React","useRef","targetDocument","useFluent_unstable","running","setRunning","useState","imperativePauseRef","focusedToastBeforeClose","focusableGroupAttribute","useFocusableGroup","tabBehavior","ignoreDefaultKeydown","Tab","Escape","Enter","useEventCallback","activeElement","current","contains","onStatusChange","status","pause","play","containsActive","useImperativeHandle","focus","useEffect","defaultView","addEventListener","removeEventListener","userRootSlot","root","onMotionFinish","useCallback","_","direction","onMouseEnter","e","onMouseLeave","findFirstFocusable","findLastFocusable","useFocusFinders","onKeyDown","key","Delete","preventDefault","currentTarget","target","shiftKey","textContent","components","timer","Timer","slot","always","onTimeout","elementType","getIntrinsicElementProps","useMergedRefs","tabIndex","role","omit","transitionTimeout","onTransitionEntering","nodeRef"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ACf,GAAGtB,uBAAuB;YAC1B4B;YACAE;YACAI;QACF,IACA;YAAEc,aAAa;QAAM;QAEvBtE;QACA4E,mBAAmB;QACnB3D;QACA1B;QACAI;QACAF;QACAoF,sBAAsB;QACpB,SAAS,GACX;QACAjF;QACAkF,SAASlE;QACTT;QACAM;QACAE;QACAmC;IACF;AACF"}
1
+ {"version":3,"sources":["../src/components/ToastContainer/useToastContainer.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n getIntrinsicElementProps,\n useMergedRefs,\n ExtractSlotProps,\n Slot,\n useEventCallback,\n useId,\n slot,\n} from '@fluentui/react-utilities';\nimport { useFluent_unstable } from '@fluentui/react-shared-contexts';\nimport { Delete, Tab } from '@fluentui/keyboard-keys';\nimport { useFocusableGroup, useFocusFinders } from '@fluentui/react-tabster';\nimport { ToastStatus } from '../../state';\nimport type { ToastContainerProps, ToastContainerState } from './ToastContainer.types';\nimport { Timer, TimerProps } from '../Timer/Timer';\n\nconst intentPolitenessMap = {\n success: 'assertive',\n warning: 'assertive',\n error: 'assertive',\n info: 'polite',\n} as const;\n\n/**\n * Create the state required to render ToastContainer.\n *\n * The returned state can be modified with hooks such as useToastContainerStyles_unstable,\n * before being passed to renderToastContainer_unstable.\n *\n * @param props - props from this instance of ToastContainer\n * @param ref - reference to root HTMLElement of ToastContainer\n */\nexport const useToastContainer_unstable = (\n props: ToastContainerProps,\n ref: React.Ref<HTMLElement>,\n): ToastContainerState => {\n const {\n visible,\n children,\n close: closeProp,\n remove,\n updateId,\n announce,\n data,\n timeout: timerTimeout,\n politeness: desiredPoliteness,\n intent = 'info',\n pauseOnHover,\n pauseOnWindowBlur,\n imperativeRef,\n tryRestoreFocus,\n ...rest\n } = props;\n const titleId = useId('toast-title');\n const bodyId = useId('toast-body');\n const toastRef = React.useRef<HTMLDivElement | null>(null);\n const { targetDocument } = useFluent_unstable();\n const [running, setRunning] = React.useState(false);\n const imperativePauseRef = React.useRef(false);\n const focusedToastBeforeClose = React.useRef(false);\n const focusableGroupAttribute = useFocusableGroup({\n tabBehavior: 'limited-trap-focus',\n // Users should only use Tab to focus into the toast\n // Escape is already reserved to dismiss all toasts\n ignoreDefaultKeydown: { Tab: true, Escape: true, Enter: true },\n });\n\n const close = useEventCallback(() => {\n const activeElement = targetDocument?.activeElement;\n if (activeElement && toastRef.current?.contains(activeElement)) {\n focusedToastBeforeClose.current = true;\n }\n\n closeProp();\n });\n const onStatusChange = useEventCallback((status: ToastStatus) => props.onStatusChange?.(null, { status, ...props }));\n const pause = useEventCallback(() => setRunning(false));\n const play = useEventCallback(() => {\n if (imperativePauseRef.current) {\n return;\n }\n const containsActive = !!toastRef.current?.contains(targetDocument?.activeElement ?? null);\n if (timerTimeout < 0) {\n setRunning(true);\n return;\n }\n\n if (!containsActive) {\n setRunning(true);\n }\n });\n\n React.useImperativeHandle(imperativeRef, () => ({\n focus: () => {\n if (!toastRef.current) {\n return;\n }\n\n toastRef.current.focus();\n },\n\n play: () => {\n imperativePauseRef.current = false;\n play();\n },\n pause: () => {\n imperativePauseRef.current = true;\n pause();\n },\n }));\n\n React.useEffect(() => {\n return () => onStatusChange('unmounted');\n }, [onStatusChange]);\n\n React.useEffect(() => {\n if (!targetDocument) {\n return;\n }\n\n if (pauseOnWindowBlur) {\n targetDocument.defaultView?.addEventListener('focus', play);\n targetDocument.defaultView?.addEventListener('blur', pause);\n return () => {\n targetDocument.defaultView?.removeEventListener('focus', play);\n targetDocument.defaultView?.removeEventListener('blur', pause);\n };\n }\n }, [targetDocument, pause, play, pauseOnWindowBlur]);\n\n // Users never actually use ToastContainer as a JSX but imperatively through useToastContainerController\n const userRootSlot = (data as { root?: ExtractSlotProps<Slot<'div'>> }).root;\n const onMotionFinish = React.useCallback(\n (_: null, { direction }: { direction: 'exit' | 'enter' }) => {\n if (direction === 'exit') {\n remove();\n }\n\n if (direction === 'enter') {\n // start toast once it's fully animated in\n play();\n onStatusChange('visible');\n }\n },\n [onStatusChange, play, remove],\n );\n\n const onMouseEnter = useEventCallback((e: React.MouseEvent<HTMLDivElement>) => {\n pause();\n userRootSlot?.onMouseEnter?.(e);\n });\n\n const onMouseLeave = useEventCallback((e: React.MouseEvent<HTMLDivElement>) => {\n play();\n userRootSlot?.onMouseEnter?.(e);\n });\n\n const { findFirstFocusable, findLastFocusable } = useFocusFinders();\n const onKeyDown = useEventCallback((e: React.KeyboardEvent<HTMLDivElement>) => {\n if (e.key === Delete) {\n e.preventDefault();\n close();\n }\n\n if (e.key === Tab && e.currentTarget === e.target) {\n e.preventDefault();\n if (e.shiftKey) {\n findLastFocusable(e.currentTarget)?.focus();\n } else {\n findFirstFocusable(e.currentTarget)?.focus();\n }\n }\n\n userRootSlot?.onKeyDown?.(e);\n });\n\n React.useEffect(() => {\n if (!visible) {\n return;\n }\n\n const politeness = desiredPoliteness ?? intentPolitenessMap[intent];\n announce(toastRef.current?.textContent ?? '', { politeness });\n }, [announce, desiredPoliteness, toastRef, visible, updateId, intent]);\n\n React.useEffect(() => {\n return () => {\n if (focusedToastBeforeClose.current) {\n focusedToastBeforeClose.current = false;\n tryRestoreFocus();\n }\n };\n }, [tryRestoreFocus]);\n\n return {\n components: {\n timer: Timer,\n root: 'div',\n },\n timer: slot.always<TimerProps>({ onTimeout: close, running, timeout: timerTimeout ?? -1 }, { elementType: Timer }),\n root: slot.always(\n getIntrinsicElementProps('div', {\n // FIXME:\n // `ref` is wrongly assigned to be `HTMLElement` instead of `HTMLDivElement`\n // but since it would be a breaking change to fix it, we are casting ref to it's proper type\n ref: useMergedRefs(ref, toastRef) as React.Ref<HTMLDivElement>,\n children,\n tabIndex: 0,\n role: 'listitem',\n 'aria-labelledby': titleId,\n 'aria-describedby': bodyId,\n ...rest,\n ...userRootSlot,\n ...focusableGroupAttribute,\n onMouseEnter,\n onMouseLeave,\n onKeyDown,\n }),\n { elementType: 'div' },\n ),\n timerTimeout,\n transitionTimeout: 0,\n running,\n visible,\n remove,\n close,\n onTransitionEntering: () => {\n /* no-op */\n },\n updateId,\n nodeRef: toastRef,\n intent,\n titleId,\n bodyId,\n onMotionFinish,\n };\n};\n"],"names":["useToastContainer_unstable","intentPolitenessMap","success","warning","error","info","props","ref","visible","children","close","closeProp","remove","updateId","announce","data","timeout","timerTimeout","politeness","desiredPoliteness","intent","pauseOnHover","pauseOnWindowBlur","imperativeRef","tryRestoreFocus","rest","titleId","useId","bodyId","toastRef","React","useRef","targetDocument","useFluent_unstable","running","setRunning","useState","imperativePauseRef","focusedToastBeforeClose","focusableGroupAttribute","useFocusableGroup","tabBehavior","ignoreDefaultKeydown","Tab","Escape","Enter","useEventCallback","activeElement","current","contains","onStatusChange","status","pause","play","containsActive","useImperativeHandle","focus","useEffect","defaultView","addEventListener","removeEventListener","userRootSlot","root","onMotionFinish","useCallback","_","direction","onMouseEnter","e","onMouseLeave","findFirstFocusable","findLastFocusable","useFocusFinders","onKeyDown","key","Delete","preventDefault","currentTarget","target","shiftKey","textContent","components","timer","Timer","slot","always","onTimeout","elementType","getIntrinsicElementProps","useMergedRefs","tabIndex","role","transitionTimeout","onTransitionEntering","nodeRef"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAiCaA;;;eAAAA;;;;iEAjCU;gCAShB;qCAC4B;8BACP;8BACuB;uBAGjB;AAElC,MAAMC,sBAAsB;IAC1BC,SAAS;IACTC,SAAS;IACTC,OAAO;IACPC,MAAM;AACR;AAWO,MAAML,6BAA6B,CACxCM,OACAC;IAEA,MAAM,EACJC,OAAO,EACPC,QAAQ,EACRC,OAAOC,SAAS,EAChBC,MAAM,EACNC,QAAQ,EACRC,QAA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IAErEU,OAAM2B,SAAS,CAAC;QACd,OAAO;YACL,IAAInB,wBAAwBU,OAAO,EAAE;gBACnCV,wBAAwBU,OAAO,GAAG;gBAClCxB;YACF;QACF;IACF,GAAG;QAACA;KAAgB;IAEpB,OAAO;QACLyD,YAAY;YACVC,OAAOC,YAAAA;YACPrB,MAAM;QACR;QACAoB,OAAOE,oBAAAA,CAAKC,MAAM,CAAa;YAAEC,WAAW5E;YAAOwB;YAASlB,SAASC,iBAAAA,QAAAA,iBAAAA,KAAAA,IAAAA,eAAgB,CAAC;QAAE,GAAG;YAAEsE,aAAaJ,YAAAA;QAAM;QAChHrB,MAAMsB,oBAAAA,CAAKC,MAAM,CACfG,IAAAA,wCAAAA,EAAyB,OAAO;YAC9B,SAAS;YACT,4EAA4E;YAC5E,4FAA4F;YAC5FjF,KAAKkF,IAAAA,6BAAAA,EAAclF,KAAKsB;YACxBpB;YACAiF,UAAU;YACVC,MAAM;YACN,mBAAmBjE;YACnB,oBAAoBE;YACpB,GAAGH,IAAI;YACP,GAAGoC,YAAY;YACf,GAAGtB,uBAAuB;YAC1B4B;YACAE;YACAI;QACF,IACA;YAAEc,aAAa;QAAM;QAEvBtE;QACA2E,mBAAmB;QACnB1D;QACA1B;QACAI;QACAF;QACAmF,sBAAsB;QACpB,SAAS,GACX;QACAhF;QACAiF,SAASjE;QACTT;QACAM;QACAE;QACAmC;IACF;AACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-toast",
3
- "version": "0.0.0-nightly-20250522-1841.1",
3
+ "version": "0.0.0-nightly-20250526-0407.1",
4
4
  "description": "Toast component for Fluent UI",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -12,25 +12,25 @@
12
12
  },
13
13
  "license": "MIT",
14
14
  "devDependencies": {
15
- "@fluentui/react-provider": "0.0.0-nightly-20250522-1841.1",
15
+ "@fluentui/react-provider": "0.0.0-nightly-20250526-0407.1",
16
16
  "@fluentui/eslint-plugin": "*",
17
- "@fluentui/react-conformance": "0.0.0-nightly-20250522-1841.1",
18
- "@fluentui/react-conformance-griffel": "0.0.0-nightly-20250522-1841.1",
17
+ "@fluentui/react-conformance": "0.0.0-nightly-20250526-0407.1",
18
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20250526-0407.1",
19
19
  "@fluentui/scripts-api-extractor": "*",
20
20
  "@fluentui/scripts-cypress": "*"
21
21
  },
22
22
  "dependencies": {
23
- "@fluentui/keyboard-keys": "0.0.0-nightly-20250522-1841.1",
24
- "@fluentui/react-aria": "0.0.0-nightly-20250522-1841.1",
23
+ "@fluentui/keyboard-keys": "0.0.0-nightly-20250526-0407.1",
24
+ "@fluentui/react-aria": "0.0.0-nightly-20250526-0407.1",
25
25
  "@fluentui/react-icons": "^2.0.245",
26
- "@fluentui/react-jsx-runtime": "0.0.0-nightly-20250522-1841.1",
27
- "@fluentui/react-motion": "0.0.0-nightly-20250522-1841.1",
28
- "@fluentui/react-motion-components-preview": "0.0.0-nightly-20250522-1841.1",
29
- "@fluentui/react-portal": "0.0.0-nightly-20250522-1841.1",
30
- "@fluentui/react-shared-contexts": "0.0.0-nightly-20250522-1841.1",
31
- "@fluentui/react-tabster": "0.0.0-nightly-20250522-1841.1",
32
- "@fluentui/react-theme": "0.0.0-nightly-20250522-1841.1",
33
- "@fluentui/react-utilities": "0.0.0-nightly-20250522-1841.1",
26
+ "@fluentui/react-jsx-runtime": "0.0.0-nightly-20250526-0407.1",
27
+ "@fluentui/react-motion": "0.0.0-nightly-20250526-0407.1",
28
+ "@fluentui/react-motion-components-preview": "0.0.0-nightly-20250526-0407.1",
29
+ "@fluentui/react-portal": "0.0.0-nightly-20250526-0407.1",
30
+ "@fluentui/react-shared-contexts": "0.0.0-nightly-20250526-0407.1",
31
+ "@fluentui/react-tabster": "0.0.0-nightly-20250526-0407.1",
32
+ "@fluentui/react-theme": "0.0.0-nightly-20250526-0407.1",
33
+ "@fluentui/react-utilities": "0.0.0-nightly-20250526-0407.1",
34
34
  "@griffel/react": "^1.5.22",
35
35
  "@swc/helpers": "^0.5.1"
36
36
  },