@fluentui/react-message-bar 9.6.17 → 9.6.19
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 +29 -2
- package/lib/components/MessageBar/useMessageBar.js +1 -1
- package/lib/components/MessageBar/useMessageBar.js.map +1 -1
- package/lib/components/MessageBarGroup/renderMessageBarGroup.js +1 -1
- package/lib/components/MessageBarGroup/renderMessageBarGroup.js.map +1 -1
- package/lib-commonjs/components/MessageBar/useMessageBar.js +2 -2
- package/lib-commonjs/components/MessageBar/useMessageBar.js.map +1 -1
- package/lib-commonjs/components/MessageBarGroup/renderMessageBarGroup.js +1 -2
- package/lib-commonjs/components/MessageBarGroup/renderMessageBarGroup.js.map +1 -1
- package/package.json +8 -8
- package/lib/components/MotionRefForwarder.js +0 -17
- package/lib/components/MotionRefForwarder.js.map +0 -1
- package/lib-commonjs/components/MotionRefForwarder.js +0 -30
- package/lib-commonjs/components/MotionRefForwarder.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,39 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-message-bar
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 25 Feb 2026 13:28:17 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.6.19](https://github.com/microsoft/fluentui/tree/@fluentui/react-message-bar_v9.6.19)
|
|
8
|
+
|
|
9
|
+
Wed, 25 Feb 2026 13:28:17 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-message-bar_v9.6.18..@fluentui/react-message-bar_v9.6.19)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- refactor: use shared MotionRefForwarder from react-motion ([PR #35774](https://github.com/microsoft/fluentui/pull/35774) by robertpenner@microsoft.com)
|
|
15
|
+
- Bump @fluentui/react-button to v9.8.2 ([PR #35782](https://github.com/microsoft/fluentui/pull/35782) by beachball)
|
|
16
|
+
- Bump @fluentui/react-jsx-runtime to v9.4.1 ([PR #35782](https://github.com/microsoft/fluentui/pull/35782) by beachball)
|
|
17
|
+
- Bump @fluentui/react-motion to v9.12.0 ([PR #35782](https://github.com/microsoft/fluentui/pull/35782) by beachball)
|
|
18
|
+
- Bump @fluentui/react-motion-components-preview to v0.15.1 ([PR #35782](https://github.com/microsoft/fluentui/pull/35782) by beachball)
|
|
19
|
+
- Bump @fluentui/react-shared-contexts to v9.26.2 ([PR #35782](https://github.com/microsoft/fluentui/pull/35782) by beachball)
|
|
20
|
+
- Bump @fluentui/react-link to v9.7.4 ([PR #35782](https://github.com/microsoft/fluentui/pull/35782) by beachball)
|
|
21
|
+
- Bump @fluentui/react-utilities to v9.26.2 ([PR #35782](https://github.com/microsoft/fluentui/pull/35782) by beachball)
|
|
22
|
+
|
|
23
|
+
## [9.6.18](https://github.com/microsoft/fluentui/tree/@fluentui/react-message-bar_v9.6.18)
|
|
24
|
+
|
|
25
|
+
Thu, 12 Feb 2026 10:46:15 GMT
|
|
26
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-message-bar_v9.6.17..@fluentui/react-message-bar_v9.6.18)
|
|
27
|
+
|
|
28
|
+
### Patches
|
|
29
|
+
|
|
30
|
+
- Bump @fluentui/react-button to v9.8.1 ([PR #35743](https://github.com/microsoft/fluentui/pull/35743) by beachball)
|
|
31
|
+
- Bump @fluentui/react-jsx-runtime to v9.4.0 ([PR #35743](https://github.com/microsoft/fluentui/pull/35743) by beachball)
|
|
32
|
+
- Bump @fluentui/react-link to v9.7.3 ([PR #35743](https://github.com/microsoft/fluentui/pull/35743) by beachball)
|
|
33
|
+
|
|
7
34
|
## [9.6.17](https://github.com/microsoft/fluentui/tree/@fluentui/react-message-bar_v9.6.17)
|
|
8
35
|
|
|
9
|
-
Thu, 22 Jan 2026 17:
|
|
36
|
+
Thu, 22 Jan 2026 17:06:59 GMT
|
|
10
37
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-message-bar_v9.6.16..@fluentui/react-message-bar_v9.6.17)
|
|
11
38
|
|
|
12
39
|
### Patches
|
|
@@ -5,7 +5,7 @@ import { useAnnounce } from '@fluentui/react-shared-contexts';
|
|
|
5
5
|
import { getIntentIcon } from './getIntentIcon';
|
|
6
6
|
import { useMessageBarReflow } from './useMessageBarReflow';
|
|
7
7
|
import { useMessageBarTransitionContext } from '../../contexts/messageBarTransitionContext';
|
|
8
|
-
import { useMotionForwardedRef } from '
|
|
8
|
+
import { useMotionForwardedRef } from '@fluentui/react-motion';
|
|
9
9
|
/**
|
|
10
10
|
* Create the state required to render MessageBar.
|
|
11
11
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MessageBar/useMessageBar.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot, useId, useMergedRefs } from '@fluentui/react-utilities';\nimport { useAnnounce } from '@fluentui/react-shared-contexts';\nimport type { MessageBarProps, MessageBarState } from './MessageBar.types';\nimport { getIntentIcon } from './getIntentIcon';\nimport { useMessageBarReflow } from './useMessageBarReflow';\nimport { useMessageBarTransitionContext } from '../../contexts/messageBarTransitionContext';\nimport { useMotionForwardedRef } from '
|
|
1
|
+
{"version":3,"sources":["../src/components/MessageBar/useMessageBar.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot, useId, useMergedRefs } from '@fluentui/react-utilities';\nimport { useAnnounce } from '@fluentui/react-shared-contexts';\nimport type { MessageBarProps, MessageBarState } from './MessageBar.types';\nimport { getIntentIcon } from './getIntentIcon';\nimport { useMessageBarReflow } from './useMessageBarReflow';\nimport { useMessageBarTransitionContext } from '../../contexts/messageBarTransitionContext';\nimport { useMotionForwardedRef } from '@fluentui/react-motion';\n\n/**\n * Create the state required to render MessageBar.\n *\n * The returned state can be modified with hooks such as useMessageBarStyles_unstable,\n * before being passed to renderMessageBar_unstable.\n *\n * @param props - props from this instance of MessageBar\n * @param ref - reference to root HTMLElement of MessageBar\n */\nexport const useMessageBar_unstable = (props: MessageBarProps, ref: React.Ref<HTMLDivElement>): MessageBarState => {\n const { layout = 'auto', intent = 'info', politeness, shape = 'rounded' } = props;\n const computedPoliteness = politeness ?? intent === 'info' ? 'polite' : 'assertive';\n const autoReflow = layout === 'auto';\n const { ref: reflowRef, reflowing } = useMessageBarReflow(autoReflow);\n const computedLayout = autoReflow ? (reflowing ? 'multiline' : 'singleline') : layout;\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const { className: transitionClassName, nodeRef } = useMessageBarTransitionContext();\n const motionRef = useMotionForwardedRef();\n\n const actionsRef = React.useRef<HTMLDivElement | null>(null);\n const bodyRef = React.useRef<HTMLDivElement | null>(null);\n const { announce } = useAnnounce();\n const titleId = useId();\n\n React.useEffect(() => {\n const bodyMessage = bodyRef.current?.textContent;\n const actionsMessage = actionsRef.current?.textContent;\n\n const message = [bodyMessage, actionsMessage].filter(Boolean).join(',');\n announce(message, { polite: computedPoliteness === 'polite', alert: computedPoliteness === 'assertive' });\n }, [bodyRef, actionsRef, announce, computedPoliteness]);\n\n return {\n components: {\n root: 'div',\n icon: 'div',\n bottomReflowSpacer: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, reflowRef, nodeRef, motionRef),\n role: 'group',\n 'aria-labelledby': titleId,\n ...props,\n }),\n { elementType: 'div' },\n ),\n\n icon: slot.optional(props.icon, {\n renderByDefault: true,\n elementType: 'div',\n defaultProps: { children: getIntentIcon(intent) },\n }),\n bottomReflowSpacer: slot.optional(props.bottomReflowSpacer, {\n renderByDefault: computedLayout === 'multiline',\n elementType: 'div',\n }),\n layout: computedLayout,\n intent,\n transitionClassName,\n actionsRef,\n bodyRef,\n titleId,\n shape,\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useId","useMergedRefs","useAnnounce","getIntentIcon","useMessageBarReflow","useMessageBarTransitionContext","useMotionForwardedRef","useMessageBar_unstable","props","ref","layout","intent","politeness","shape","computedPoliteness","autoReflow","reflowRef","reflowing","computedLayout","className","transitionClassName","nodeRef","motionRef","actionsRef","useRef","bodyRef","announce","titleId","useEffect","bodyMessage","current","textContent","actionsMessage","message","filter","Boolean","join","polite","alert","components","root","icon","bottomReflowSpacer","always","role","elementType","optional","renderByDefault","defaultProps","children"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,IAAI,EAAEC,KAAK,EAAEC,aAAa,QAAQ,4BAA4B;AACjG,SAASC,WAAW,QAAQ,kCAAkC;AAE9D,SAASC,aAAa,QAAQ,kBAAkB;AAChD,SAASC,mBAAmB,QAAQ,wBAAwB;AAC5D,SAASC,8BAA8B,QAAQ,6CAA6C;AAC5F,SAASC,qBAAqB,QAAQ,yBAAyB;AAE/D;;;;;;;;CAQC,GACD,OAAO,MAAMC,yBAAyB,CAACC,OAAwBC;IAC7D,MAAM,EAAEC,SAAS,MAAM,EAAEC,SAAS,MAAM,EAAEC,UAAU,EAAEC,QAAQ,SAAS,EAAE,GAAGL;IAC5E,MAAMM,qBAAqBF,CAAAA,uBAAAA,wBAAAA,aAAcD,WAAW,MAAK,IAAI,WAAW;IACxE,MAAMI,aAAaL,WAAW;IAC9B,MAAM,EAAED,KAAKO,SAAS,EAAEC,SAAS,EAAE,GAAGb,oBAAoBW;IAC1D,MAAMG,iBAAiBH,aAAcE,YAAY,cAAc,eAAgBP;IAE/E,4DAA4D;IAC5D,MAAM,EAAES,WAAWC,mBAAmB,EAAEC,OAAO,EAAE,GAAGhB;IACpD,MAAMiB,YAAYhB;IAElB,MAAMiB,aAAa1B,MAAM2B,MAAM,CAAwB;IACvD,MAAMC,UAAU5B,MAAM2B,MAAM,CAAwB;IACpD,MAAM,EAAEE,QAAQ,EAAE,GAAGxB;IACrB,MAAMyB,UAAU3B;IAEhBH,MAAM+B,SAAS,CAAC;YACMH,kBACGF;QADvB,MAAMM,eAAcJ,mBAAAA,QAAQK,OAAO,cAAfL,uCAAAA,iBAAiBM,WAAW;QAChD,MAAMC,kBAAiBT,sBAAAA,WAAWO,OAAO,cAAlBP,0CAAAA,oBAAoBQ,WAAW;QAEtD,MAAME,UAAU;YAACJ;YAAaG;SAAe,CAACE,MAAM,CAACC,SAASC,IAAI,CAAC;QACnEV,SAASO,SAAS;YAAEI,QAAQvB,uBAAuB;YAAUwB,OAAOxB,uBAAuB;QAAY;IACzG,GAAG;QAACW;QAASF;QAAYG;QAAUZ;KAAmB;IAEtD,OAAO;QACLyB,YAAY;YACVC,MAAM;YACNC,MAAM;YACNC,oBAAoB;QACtB;QACAF,MAAMzC,KAAK4C,MAAM,CACf7C,yBAAyB,OAAO;YAC9BW,KAAKR,cAAcQ,KAAKO,WAAWK,SAASC;YAC5CsB,MAAM;YACN,mBAAmBjB;YACnB,GAAGnB,KAAK;QACV,IACA;YAAEqC,aAAa;QAAM;QAGvBJ,MAAM1C,KAAK+C,QAAQ,CAACtC,MAAMiC,IAAI,EAAE;YAC9BM,iBAAiB;YACjBF,aAAa;YACbG,cAAc;gBAAEC,UAAU9C,cAAcQ;YAAQ;QAClD;QACA+B,oBAAoB3C,KAAK+C,QAAQ,CAACtC,MAAMkC,kBAAkB,EAAE;YAC1DK,iBAAiB7B,mBAAmB;YACpC2B,aAAa;QACf;QACAnC,QAAQQ;QACRP;QACAS;QACAG;QACAE;QACAE;QACAd;IACF;AACF,EAAE"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { assertSlots } from '@fluentui/react-utilities';
|
|
3
3
|
import { PresenceGroup } from '@fluentui/react-motion';
|
|
4
4
|
import { MessageBarMotion } from './MessageBarGroup.motions';
|
|
5
|
-
import { MotionRefForwarder } from '
|
|
5
|
+
import { MotionRefForwarder } from '@fluentui/react-motion';
|
|
6
6
|
/**
|
|
7
7
|
* Render the final JSX of MessageBarGroup
|
|
8
8
|
*/ export const renderMessageBarGroup_unstable = (state)=>{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MessageBarGroup/renderMessageBarGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MessageBarGroupState, MessageBarGroupSlots } from './MessageBarGroup.types';\nimport { PresenceGroup } from '@fluentui/react-motion';\nimport { MessageBarMotion } from './MessageBarGroup.motions';\nimport { MotionRefForwarder } from '
|
|
1
|
+
{"version":3,"sources":["../src/components/MessageBarGroup/renderMessageBarGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MessageBarGroupState, MessageBarGroupSlots } from './MessageBarGroup.types';\nimport { PresenceGroup } from '@fluentui/react-motion';\nimport { MessageBarMotion } from './MessageBarGroup.motions';\nimport { MotionRefForwarder } from '@fluentui/react-motion';\n\n/**\n * Render the final JSX of MessageBarGroup\n */\nexport const renderMessageBarGroup_unstable = (state: MessageBarGroupState): JSXElement => {\n assertSlots<MessageBarGroupSlots>(state);\n\n return (\n <state.root>\n <PresenceGroup>\n {state.children.map(child => (\n <MessageBarMotion key={child.key} animate={state.animate} unmountOnExit>\n <MotionRefForwarder>{child}</MotionRefForwarder>\n </MessageBarMotion>\n ))}\n </PresenceGroup>\n </state.root>\n );\n};\n"],"names":["assertSlots","PresenceGroup","MessageBarMotion","MotionRefForwarder","renderMessageBarGroup_unstable","state","root","children","map","child","animate","unmountOnExit","key"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD,SAASC,aAAa,QAAQ,yBAAyB;AACvD,SAASC,gBAAgB,QAAQ,4BAA4B;AAC7D,SAASC,kBAAkB,QAAQ,yBAAyB;AAE5D;;CAEC,GACD,OAAO,MAAMC,iCAAiC,CAACC;IAC7CL,YAAkCK;IAElC,qBACE,KAACA,MAAMC,IAAI;kBACT,cAAA,KAACL;sBACEI,MAAME,QAAQ,CAACC,GAAG,CAACC,CAAAA,sBAClB,KAACP;oBAAiCQ,SAASL,MAAMK,OAAO;oBAAEC,aAAa;8BACrE,cAAA,KAACR;kCAAoBM;;mBADAA,MAAMG,GAAG;;;AAO1C,EAAE"}
|
|
@@ -16,7 +16,7 @@ const _reactsharedcontexts = require("@fluentui/react-shared-contexts");
|
|
|
16
16
|
const _getIntentIcon = require("./getIntentIcon");
|
|
17
17
|
const _useMessageBarReflow = require("./useMessageBarReflow");
|
|
18
18
|
const _messageBarTransitionContext = require("../../contexts/messageBarTransitionContext");
|
|
19
|
-
const
|
|
19
|
+
const _reactmotion = require("@fluentui/react-motion");
|
|
20
20
|
const useMessageBar_unstable = (props, ref)=>{
|
|
21
21
|
const { layout = 'auto', intent = 'info', politeness, shape = 'rounded' } = props;
|
|
22
22
|
const computedPoliteness = (politeness !== null && politeness !== void 0 ? politeness : intent === 'info') ? 'polite' : 'assertive';
|
|
@@ -25,7 +25,7 @@ const useMessageBar_unstable = (props, ref)=>{
|
|
|
25
25
|
const computedLayout = autoReflow ? reflowing ? 'multiline' : 'singleline' : layout;
|
|
26
26
|
// eslint-disable-next-line @typescript-eslint/no-deprecated
|
|
27
27
|
const { className: transitionClassName, nodeRef } = (0, _messageBarTransitionContext.useMessageBarTransitionContext)();
|
|
28
|
-
const motionRef = (0,
|
|
28
|
+
const motionRef = (0, _reactmotion.useMotionForwardedRef)();
|
|
29
29
|
const actionsRef = _react.useRef(null);
|
|
30
30
|
const bodyRef = _react.useRef(null);
|
|
31
31
|
const { announce } = (0, _reactsharedcontexts.useAnnounce)();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MessageBar/useMessageBar.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot, useId, useMergedRefs } from '@fluentui/react-utilities';\nimport { useAnnounce } from '@fluentui/react-shared-contexts';\nimport type { MessageBarProps, MessageBarState } from './MessageBar.types';\nimport { getIntentIcon } from './getIntentIcon';\nimport { useMessageBarReflow } from './useMessageBarReflow';\nimport { useMessageBarTransitionContext } from '../../contexts/messageBarTransitionContext';\nimport { useMotionForwardedRef } from '
|
|
1
|
+
{"version":3,"sources":["../src/components/MessageBar/useMessageBar.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { getIntrinsicElementProps, slot, useId, useMergedRefs } from '@fluentui/react-utilities';\nimport { useAnnounce } from '@fluentui/react-shared-contexts';\nimport type { MessageBarProps, MessageBarState } from './MessageBar.types';\nimport { getIntentIcon } from './getIntentIcon';\nimport { useMessageBarReflow } from './useMessageBarReflow';\nimport { useMessageBarTransitionContext } from '../../contexts/messageBarTransitionContext';\nimport { useMotionForwardedRef } from '@fluentui/react-motion';\n\n/**\n * Create the state required to render MessageBar.\n *\n * The returned state can be modified with hooks such as useMessageBarStyles_unstable,\n * before being passed to renderMessageBar_unstable.\n *\n * @param props - props from this instance of MessageBar\n * @param ref - reference to root HTMLElement of MessageBar\n */\nexport const useMessageBar_unstable = (props: MessageBarProps, ref: React.Ref<HTMLDivElement>): MessageBarState => {\n const { layout = 'auto', intent = 'info', politeness, shape = 'rounded' } = props;\n const computedPoliteness = politeness ?? intent === 'info' ? 'polite' : 'assertive';\n const autoReflow = layout === 'auto';\n const { ref: reflowRef, reflowing } = useMessageBarReflow(autoReflow);\n const computedLayout = autoReflow ? (reflowing ? 'multiline' : 'singleline') : layout;\n\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n const { className: transitionClassName, nodeRef } = useMessageBarTransitionContext();\n const motionRef = useMotionForwardedRef();\n\n const actionsRef = React.useRef<HTMLDivElement | null>(null);\n const bodyRef = React.useRef<HTMLDivElement | null>(null);\n const { announce } = useAnnounce();\n const titleId = useId();\n\n React.useEffect(() => {\n const bodyMessage = bodyRef.current?.textContent;\n const actionsMessage = actionsRef.current?.textContent;\n\n const message = [bodyMessage, actionsMessage].filter(Boolean).join(',');\n announce(message, { polite: computedPoliteness === 'polite', alert: computedPoliteness === 'assertive' });\n }, [bodyRef, actionsRef, announce, computedPoliteness]);\n\n return {\n components: {\n root: 'div',\n icon: 'div',\n bottomReflowSpacer: 'div',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref: useMergedRefs(ref, reflowRef, nodeRef, motionRef),\n role: 'group',\n 'aria-labelledby': titleId,\n ...props,\n }),\n { elementType: 'div' },\n ),\n\n icon: slot.optional(props.icon, {\n renderByDefault: true,\n elementType: 'div',\n defaultProps: { children: getIntentIcon(intent) },\n }),\n bottomReflowSpacer: slot.optional(props.bottomReflowSpacer, {\n renderByDefault: computedLayout === 'multiline',\n elementType: 'div',\n }),\n layout: computedLayout,\n intent,\n transitionClassName,\n actionsRef,\n bodyRef,\n titleId,\n shape,\n };\n};\n"],"names":["React","getIntrinsicElementProps","slot","useId","useMergedRefs","useAnnounce","getIntentIcon","useMessageBarReflow","useMessageBarTransitionContext","useMotionForwardedRef","useMessageBar_unstable","props","ref","layout","intent","politeness","shape","computedPoliteness","autoReflow","reflowRef","reflowing","computedLayout","className","transitionClassName","nodeRef","motionRef","actionsRef","useRef","bodyRef","announce","titleId","useEffect","bodyMessage","current","textContent","actionsMessage","message","filter","Boolean","join","polite","alert","components","root","icon","bottomReflowSpacer","always","role","elementType","optional","renderByDefault","defaultProps","children"],"mappings":"AAAA;;;;;+BAoBaU;;;;;;;iEAlBU,QAAQ;gCACsC,4BAA4B;qCACrE,kCAAkC;+BAEhC,kBAAkB;qCACZ,wBAAwB;6CACb,6CAA6C;6BACtD,yBAAyB;AAWxD,+BAA+B,CAACC,OAAwBC;IAC7D,MAAM,EAAEC,SAAS,MAAM,EAAEC,SAAS,MAAM,EAAEC,UAAU,EAAEC,QAAQ,SAAS,EAAE,GAAGL;IAC5E,MAAMM,qBAAqBF,CAAAA,eAAAA,QAAAA,eAAAA,KAAAA,IAAAA,aAAcD,WAAW,MAAA,CAAK,GAAI,WAAW;IACxE,MAAMI,aAAaL,WAAW;IAC9B,MAAM,EAAED,KAAKO,SAAS,EAAEC,SAAS,EAAE,OAAGb,wCAAAA,EAAoBW;IAC1D,MAAMG,iBAAiBH,aAAcE,YAAY,cAAc,eAAgBP;IAE/E,4DAA4D;IAC5D,MAAM,EAAES,WAAWC,mBAAmB,EAAEC,OAAO,EAAE,OAAGhB,2DAAAA;IACpD,MAAMiB,YAAYhB,sCAAAA;IAElB,MAAMiB,aAAa1B,OAAM2B,MAAM,CAAwB;IACvD,MAAMC,UAAU5B,OAAM2B,MAAM,CAAwB;IACpD,MAAM,EAAEE,QAAQ,EAAE,OAAGxB,gCAAAA;IACrB,MAAMyB,cAAU3B,qBAAAA;IAEhBH,OAAM+B,SAAS,CAAC;YACMH,kBACGF;QADvB,MAAMM,cAAAA,CAAcJ,mBAAAA,QAAQK,OAAAA,AAAO,MAAA,QAAfL,qBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,iBAAiBM,WAAW;QAChD,MAAMC,iBAAAA,CAAiBT,sBAAAA,WAAWO,OAAAA,AAAO,MAAA,QAAlBP,wBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,oBAAoBQ,WAAW;QAEtD,MAAME,UAAU;YAACJ;YAAaG;SAAe,CAACE,MAAM,CAACC,SAASC,IAAI,CAAC;QACnEV,SAASO,SAAS;YAAEI,QAAQvB,uBAAuB;YAAUwB,OAAOxB,uBAAuB;QAAY;IACzG,GAAG;QAACW;QAASF;QAAYG;QAAUZ;KAAmB;IAEtD,OAAO;QACLyB,YAAY;YACVC,MAAM;YACNC,MAAM;YACNC,oBAAoB;QACtB;QACAF,MAAMzC,oBAAAA,CAAK4C,MAAM,KACf7C,wCAAAA,EAAyB,OAAO;YAC9BW,SAAKR,6BAAAA,EAAcQ,KAAKO,WAAWK,SAASC;YAC5CsB,MAAM;YACN,mBAAmBjB;YACnB,GAAGnB,KAAK;QACV,IACA;YAAEqC,aAAa;QAAM;QAGvBJ,MAAM1C,oBAAAA,CAAK+C,QAAQ,CAACtC,MAAMiC,IAAI,EAAE;YAC9BM,iBAAiB;YACjBF,aAAa;YACbG,cAAc;gBAAEC,cAAU9C,4BAAAA,EAAcQ;YAAQ;QAClD;QACA+B,oBAAoB3C,oBAAAA,CAAK+C,QAAQ,CAACtC,MAAMkC,kBAAkB,EAAE;YAC1DK,iBAAiB7B,mBAAmB;YACpC2B,aAAa;QACf;QACAnC,QAAQQ;QACRP;QACAS;QACAG;QACAE;QACAE;QACAd;IACF;AACF,EAAE"}
|
|
@@ -12,7 +12,6 @@ const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
|
|
|
12
12
|
const _reactutilities = require("@fluentui/react-utilities");
|
|
13
13
|
const _reactmotion = require("@fluentui/react-motion");
|
|
14
14
|
const _MessageBarGroupmotions = require("./MessageBarGroup.motions");
|
|
15
|
-
const _MotionRefForwarder = require("../MotionRefForwarder");
|
|
16
15
|
const renderMessageBarGroup_unstable = (state)=>{
|
|
17
16
|
(0, _reactutilities.assertSlots)(state);
|
|
18
17
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(state.root, {
|
|
@@ -20,7 +19,7 @@ const renderMessageBarGroup_unstable = (state)=>{
|
|
|
20
19
|
children: state.children.map((child)=>/*#__PURE__*/ (0, _jsxruntime.jsx)(_MessageBarGroupmotions.MessageBarMotion, {
|
|
21
20
|
animate: state.animate,
|
|
22
21
|
unmountOnExit: true,
|
|
23
|
-
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(
|
|
22
|
+
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_reactmotion.MotionRefForwarder, {
|
|
24
23
|
children: child
|
|
25
24
|
})
|
|
26
25
|
}, child.key))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MessageBarGroup/renderMessageBarGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MessageBarGroupState, MessageBarGroupSlots } from './MessageBarGroup.types';\nimport { PresenceGroup } from '@fluentui/react-motion';\nimport { MessageBarMotion } from './MessageBarGroup.motions';\nimport { MotionRefForwarder } from '
|
|
1
|
+
{"version":3,"sources":["../src/components/MessageBarGroup/renderMessageBarGroup.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { MessageBarGroupState, MessageBarGroupSlots } from './MessageBarGroup.types';\nimport { PresenceGroup } from '@fluentui/react-motion';\nimport { MessageBarMotion } from './MessageBarGroup.motions';\nimport { MotionRefForwarder } from '@fluentui/react-motion';\n\n/**\n * Render the final JSX of MessageBarGroup\n */\nexport const renderMessageBarGroup_unstable = (state: MessageBarGroupState): JSXElement => {\n assertSlots<MessageBarGroupSlots>(state);\n\n return (\n <state.root>\n <PresenceGroup>\n {state.children.map(child => (\n <MessageBarMotion key={child.key} animate={state.animate} unmountOnExit>\n <MotionRefForwarder>{child}</MotionRefForwarder>\n </MessageBarMotion>\n ))}\n </PresenceGroup>\n </state.root>\n );\n};\n"],"names":["assertSlots","PresenceGroup","MessageBarMotion","MotionRefForwarder","renderMessageBarGroup_unstable","state","root","children","map","child","animate","unmountOnExit","key"],"mappings":";;;;+BAaaI;;;;;;4BAZb,gDAAiD;gCAErB,4BAA4B;6BAG1B,yBAAyB;wCACtB,4BAA4B;AAMtD,uCAAuC,CAACC;QAC7CL,2BAAAA,EAAkCK;IAElC,OAAA,WAAA,OACE,eAAA,EAACA,MAAMC,IAAI,EAAA;kBACT,WAAA,OAAA,eAAA,EAACL,0BAAAA,EAAAA;sBACEI,MAAME,QAAQ,CAACC,GAAG,CAACC,CAAAA,QAAAA,WAAAA,OAClB,eAAA,EAACP,wCAAAA,EAAAA;oBAAiCQ,SAASL,MAAMK,OAAO;oBAAEC,aAAa,EAAA;8BACrE,WAAA,OAAA,eAAA,EAACR,+BAAAA,EAAAA;kCAAoBM;;mBADAA,MAAMG,GAAG;;;AAO1C,EAAE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-message-bar",
|
|
3
|
-
"version": "9.6.
|
|
3
|
+
"version": "9.6.19",
|
|
4
4
|
"description": "Fluent UI MessageBar component",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@fluentui/react-button": "^9.8.
|
|
15
|
+
"@fluentui/react-button": "^9.8.2",
|
|
16
16
|
"@fluentui/react-icons": "^2.0.245",
|
|
17
|
-
"@fluentui/react-jsx-runtime": "^9.
|
|
18
|
-
"@fluentui/react-motion": "^9.
|
|
19
|
-
"@fluentui/react-motion-components-preview": "^0.15.
|
|
20
|
-
"@fluentui/react-shared-contexts": "^9.26.
|
|
21
|
-
"@fluentui/react-link": "^9.7.
|
|
17
|
+
"@fluentui/react-jsx-runtime": "^9.4.1",
|
|
18
|
+
"@fluentui/react-motion": "^9.12.0",
|
|
19
|
+
"@fluentui/react-motion-components-preview": "^0.15.1",
|
|
20
|
+
"@fluentui/react-shared-contexts": "^9.26.2",
|
|
21
|
+
"@fluentui/react-link": "^9.7.4",
|
|
22
22
|
"@fluentui/react-theme": "^9.2.1",
|
|
23
|
-
"@fluentui/react-utilities": "^9.26.
|
|
23
|
+
"@fluentui/react-utilities": "^9.26.2",
|
|
24
24
|
"@griffel/react": "^1.5.32",
|
|
25
25
|
"@swc/helpers": "^0.5.1"
|
|
26
26
|
},
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
const MotionRefForwarderContext = /*#__PURE__*/ React.createContext(undefined);
|
|
4
|
-
/**
|
|
5
|
-
* @internal
|
|
6
|
-
*/ export function useMotionForwardedRef() {
|
|
7
|
-
return React.useContext(MotionRefForwarderContext);
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* A component that forwards a ref to its children via a React context.
|
|
11
|
-
*
|
|
12
|
-
* @internal
|
|
13
|
-
*/ export const MotionRefForwarder = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
14
|
-
return /*#__PURE__*/ React.createElement(MotionRefForwarderContext.Provider, {
|
|
15
|
-
value: ref
|
|
16
|
-
}, props.children);
|
|
17
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MotionRefForwarder.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nconst MotionRefForwarderContext = React.createContext<React.Ref<HTMLElement> | undefined>(undefined);\n\n/**\n * @internal\n */\nexport function useMotionForwardedRef(): React.Ref<HTMLElement> | undefined {\n return React.useContext(MotionRefForwarderContext);\n}\n\n/**\n * A component that forwards a ref to its children via a React context.\n *\n * @internal\n */\nexport const MotionRefForwarder = React.forwardRef<HTMLElement, { children: React.ReactElement }>((props, ref) => {\n return <MotionRefForwarderContext.Provider value={ref}>{props.children}</MotionRefForwarderContext.Provider>;\n});\n"],"names":["React","MotionRefForwarderContext","createContext","undefined","useMotionForwardedRef","useContext","MotionRefForwarder","forwardRef","props","ref","Provider","value","children"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAE/B,MAAMC,0CAA4BD,MAAME,aAAa,CAAqCC;AAE1F;;CAEC,GACD,OAAO,SAASC;IACd,OAAOJ,MAAMK,UAAU,CAACJ;AAC1B;AAEA;;;;CAIC,GACD,OAAO,MAAMK,mCAAqBN,MAAMO,UAAU,CAAgD,CAACC,OAAOC;IACxG,qBAAO,oBAACR,0BAA0BS,QAAQ;QAACC,OAAOF;OAAMD,MAAMI,QAAQ;AACxE,GAAG"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
"use strict";
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
function _export(target, all) {
|
|
7
|
-
for(var name in all)Object.defineProperty(target, name, {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: all[name]
|
|
10
|
-
});
|
|
11
|
-
}
|
|
12
|
-
_export(exports, {
|
|
13
|
-
MotionRefForwarder: function() {
|
|
14
|
-
return MotionRefForwarder;
|
|
15
|
-
},
|
|
16
|
-
useMotionForwardedRef: function() {
|
|
17
|
-
return useMotionForwardedRef;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
21
|
-
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
22
|
-
const MotionRefForwarderContext = /*#__PURE__*/ _react.createContext(undefined);
|
|
23
|
-
function useMotionForwardedRef() {
|
|
24
|
-
return _react.useContext(MotionRefForwarderContext);
|
|
25
|
-
}
|
|
26
|
-
const MotionRefForwarder = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
27
|
-
return /*#__PURE__*/ _react.createElement(MotionRefForwarderContext.Provider, {
|
|
28
|
-
value: ref
|
|
29
|
-
}, props.children);
|
|
30
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/MotionRefForwarder.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nconst MotionRefForwarderContext = React.createContext<React.Ref<HTMLElement> | undefined>(undefined);\n\n/**\n * @internal\n */\nexport function useMotionForwardedRef(): React.Ref<HTMLElement> | undefined {\n return React.useContext(MotionRefForwarderContext);\n}\n\n/**\n * A component that forwards a ref to its children via a React context.\n *\n * @internal\n */\nexport const MotionRefForwarder = React.forwardRef<HTMLElement, { children: React.ReactElement }>((props, ref) => {\n return <MotionRefForwarderContext.Provider value={ref}>{props.children}</MotionRefForwarderContext.Provider>;\n});\n"],"names":["React","MotionRefForwarderContext","createContext","undefined","useMotionForwardedRef","useContext","MotionRefForwarder","forwardRef","props","ref","Provider","value","children"],"mappings":"AAAA;;;;;;;;;;;;sBAkBaM;;;yBATGF;;;;;iEAPO,QAAQ;AAE/B,MAAMH,4BAAAA,WAAAA,GAA4BD,OAAME,aAAa,CAAqCC;AAKnF,SAASC;IACd,OAAOJ,OAAMK,UAAU,CAACJ;AAC1B;AAOO,MAAMK,qBAAAA,WAAAA,GAAqBN,OAAMO,UAAU,CAAgD,CAACC,OAAOC;IACxG,OAAA,WAAA,GAAO,OAAA,aAAA,CAACR,0BAA0BS,QAAQ,EAAA;QAACC,OAAOF;OAAMD,MAAMI,QAAQ;AACxE,GAAG"}
|