@fluentui/react-message-bar 9.6.11 → 9.6.13

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,12 +1,37 @@
1
1
  # Change Log - @fluentui/react-message-bar
2
2
 
3
- This log was last generated on Fri, 31 Oct 2025 16:17:38 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 06 Nov 2025 17:23:24 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.6.13](https://github.com/microsoft/fluentui/tree/@fluentui/react-message-bar_v9.6.13)
8
+
9
+ Thu, 06 Nov 2025 17:23:24 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-message-bar_v9.6.12..@fluentui/react-message-bar_v9.6.13)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-motion-components-preview to v0.14.0 ([PR #34705](https://github.com/microsoft/fluentui/pull/34705) by beachball)
15
+
16
+ ## [9.6.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-message-bar_v9.6.12)
17
+
18
+ Thu, 06 Nov 2025 15:01:21 GMT
19
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-message-bar_v9.6.11..@fluentui/react-message-bar_v9.6.12)
20
+
21
+ ### Patches
22
+
23
+ - chore: migrate source to react 19 ([PR #35434](https://github.com/microsoft/fluentui/pull/35434) by martinhochel@microsoft.com)
24
+ - refactor(react-message-bar): use standard motion atoms for slide and fade ([PR #35421](https://github.com/microsoft/fluentui/pull/35421) by robertpenner@microsoft.com)
25
+ - Bump @fluentui/react-button to v9.6.11 ([PR #35466](https://github.com/microsoft/fluentui/pull/35466) by beachball)
26
+ - Bump @fluentui/react-jsx-runtime to v9.3.2 ([PR #35466](https://github.com/microsoft/fluentui/pull/35466) by beachball)
27
+ - Bump @fluentui/react-motion to v9.11.3 ([PR #35466](https://github.com/microsoft/fluentui/pull/35466) by beachball)
28
+ - Bump @fluentui/react-motion-components-preview to v0.13.0 ([PR #35466](https://github.com/microsoft/fluentui/pull/35466) by beachball)
29
+ - Bump @fluentui/react-link to v9.6.10 ([PR #35466](https://github.com/microsoft/fluentui/pull/35466) by beachball)
30
+ - Bump @fluentui/react-utilities to v9.25.3 ([PR #35466](https://github.com/microsoft/fluentui/pull/35466) by beachball)
31
+
7
32
  ## [9.6.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-message-bar_v9.6.11)
8
33
 
9
- Fri, 31 Oct 2025 16:17:38 GMT
34
+ Fri, 31 Oct 2025 16:22:06 GMT
10
35
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-message-bar_v9.6.10..@fluentui/react-message-bar_v9.6.11)
11
36
 
12
37
  ### Patches
@@ -1,61 +1,5 @@
1
1
  import { motionTokens, createPresenceComponent } from '@fluentui/react-motion';
2
- /**
3
- * Generates a motion atom object for a fade-in or fade-out.
4
- * @param direction - The functional direction of the motion: 'enter' or 'exit'.
5
- * @param duration - The duration of the motion in milliseconds.
6
- * @param easing - The easing curve for the motion. Defaults to `motionTokens.curveLinear`.
7
- * @param delay - The delay before the motion starts. Defaults to 0.
8
- * @param fromOpacity - The starting opacity value. Defaults to 0.
9
- * @returns A motion atom object with opacity keyframes and the supplied duration and easing.
10
- */ export const fadeAtom = ({ direction, duration, easing = motionTokens.curveLinear, delay = 0, fromOpacity = 0 })=>{
11
- const keyframes = [
12
- {
13
- opacity: fromOpacity
14
- },
15
- {
16
- opacity: 1
17
- }
18
- ];
19
- if (direction === 'exit') {
20
- keyframes.reverse();
21
- }
22
- return {
23
- keyframes,
24
- duration,
25
- easing,
26
- delay,
27
- // Applying opacity backwards and forwards in time is important
28
- // to avoid a bug where a delayed animation is not hidden when it should be.
29
- fill: 'both'
30
- };
31
- };
32
- /**
33
- * Generates a motion atom object for a slide-in or slide-out.
34
- * @param direction - The functional direction of the motion: 'enter' or 'exit'.
35
- * @param duration - The duration of the motion in milliseconds.
36
- * @param easing - The easing curve for the motion. Defaults to `motionTokens.curveLinear`.
37
- * @param fromX - The starting X translate value with units (e.g., '0px', '100%'). Defaults to '0px'.
38
- * @param fromY - The starting Y translate value with units (e.g., '-20px', '100%'). Defaults to '0px'.
39
- * @returns A motion atom object with translate keyframes and the supplied duration and easing.
40
- */ export const slideAtom = ({ direction, duration, easing = motionTokens.curveLinear, delay = 0, fromX = '0px', fromY = '20px' })=>{
41
- const keyframes = [
42
- {
43
- translate: `${fromX} ${fromY}`
44
- },
45
- {
46
- translate: '0px 0px'
47
- }
48
- ];
49
- if (direction === 'exit') {
50
- keyframes.reverse();
51
- }
52
- return {
53
- keyframes,
54
- duration,
55
- easing,
56
- delay
57
- };
58
- };
2
+ import { fadeAtom, slideAtom } from '@fluentui/react-motion-components-preview';
59
3
  /**
60
4
  * A presence component for a MessageBar to enter and exit from a MessageBarGroup.
61
5
  * It has an optional enter transition of a slide-in and fade-in,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MessageBarGroup/MessageBarGroup.motions.tsx"],"sourcesContent":["import { motionTokens, createPresenceComponent, PresenceDirection, AtomMotion } from '@fluentui/react-motion';\nimport { MessageBarGroupProps } from './MessageBarGroup.types';\n\n// TODO: import these atoms from react-motion-components-preview once they're available there\n\ntype BaseAtomParams = {\n /** The functional direction of the motion: 'enter' or 'exit'. */\n direction: PresenceDirection;\n\n /** The duration of the motion in milliseconds. */\n duration: number;\n\n /** The easing curve for the motion. */\n easing?: EffectTiming['easing'];\n\n /** Time (ms) to delay the animation. */\n delay?: EffectTiming['delay'];\n};\n\ninterface FadeAtomParams extends BaseAtomParams {\n /** Defines how values are applied before and after execution. Defaults to 'both'. */\n fill?: FillMode;\n\n /** The starting opacity value. Defaults to 0. */\n fromOpacity?: number;\n}\n\n/**\n * Generates a motion atom object for a fade-in or fade-out.\n * @param direction - The functional direction of the motion: 'enter' or 'exit'.\n * @param duration - The duration of the motion in milliseconds.\n * @param easing - The easing curve for the motion. Defaults to `motionTokens.curveLinear`.\n * @param delay - The delay before the motion starts. Defaults to 0.\n * @param fromOpacity - The starting opacity value. Defaults to 0.\n * @returns A motion atom object with opacity keyframes and the supplied duration and easing.\n */\nexport const fadeAtom = ({\n direction,\n duration,\n easing = motionTokens.curveLinear,\n delay = 0,\n fromOpacity = 0,\n}: FadeAtomParams): AtomMotion => {\n const keyframes = [{ opacity: fromOpacity }, { opacity: 1 }];\n if (direction === 'exit') {\n keyframes.reverse();\n }\n return {\n keyframes,\n duration,\n easing,\n delay,\n // Applying opacity backwards and forwards in time is important\n // to avoid a bug where a delayed animation is not hidden when it should be.\n fill: 'both',\n };\n};\n\ninterface SlideAtomParams extends BaseAtomParams {\n fromX?: string;\n fromY?: string;\n}\n\n/**\n * Generates a motion atom object for a slide-in or slide-out.\n * @param direction - The functional direction of the motion: 'enter' or 'exit'.\n * @param duration - The duration of the motion in milliseconds.\n * @param easing - The easing curve for the motion. Defaults to `motionTokens.curveLinear`.\n * @param fromX - The starting X translate value with units (e.g., '0px', '100%'). Defaults to '0px'.\n * @param fromY - The starting Y translate value with units (e.g., '-20px', '100%'). Defaults to '0px'.\n * @returns A motion atom object with translate keyframes and the supplied duration and easing.\n */\nexport const slideAtom = ({\n direction,\n duration,\n easing = motionTokens.curveLinear,\n delay = 0,\n fromX = '0px',\n fromY = '20px',\n}: SlideAtomParams): AtomMotion => {\n const keyframes = [{ translate: `${fromX} ${fromY}` }, { translate: '0px 0px' }];\n if (direction === 'exit') {\n keyframes.reverse();\n }\n return {\n keyframes,\n duration,\n easing,\n delay,\n };\n};\n\n/**\n * A presence component for a MessageBar to enter and exit from a MessageBarGroup.\n * It has an optional enter transition of a slide-in and fade-in,\n * when the `animate` prop is set to `'both'`.\n * It always has an exit transition of a fade-out.\n */\nexport const MessageBarMotion = createPresenceComponent<{ animate?: MessageBarGroupProps['animate'] }>(\n ({ animate }) => {\n const duration = motionTokens.durationGentle;\n\n return {\n enter:\n animate === 'both'\n ? // enter with slide and fade\n [fadeAtom({ direction: 'enter', duration }), slideAtom({ direction: 'enter', fromY: '-100%', duration })]\n : [], // no enter motion\n\n // Always exit with a fade\n exit: fadeAtom({ direction: 'exit', duration }),\n };\n },\n);\n"],"names":["motionTokens","createPresenceComponent","fadeAtom","direction","duration","easing","curveLinear","delay","fromOpacity","keyframes","opacity","reverse","fill","slideAtom","fromX","fromY","translate","MessageBarMotion","animate","durationGentle","enter","exit"],"mappings":"AAAA,SAASA,YAAY,EAAEC,uBAAuB,QAAuC,yBAAyB;AA2B9G;;;;;;;;CAQC,GACD,OAAO,MAAMC,WAAW,CAAC,EACvBC,SAAS,EACTC,QAAQ,EACRC,SAASL,aAAaM,WAAW,EACjCC,QAAQ,CAAC,EACTC,cAAc,CAAC,EACA;IACf,MAAMC,YAAY;QAAC;YAAEC,SAASF;QAAY;QAAG;YAAEE,SAAS;QAAE;KAAE;IAC5D,IAAIP,cAAc,QAAQ;QACxBM,UAAUE,OAAO;IACnB;IACA,OAAO;QACLF;QACAL;QACAC;QACAE;QACA,+DAA+D;QAC/D,4EAA4E;QAC5EK,MAAM;IACR;AACF,EAAE;AAOF;;;;;;;;CAQC,GACD,OAAO,MAAMC,YAAY,CAAC,EACxBV,SAAS,EACTC,QAAQ,EACRC,SAASL,aAAaM,WAAW,EACjCC,QAAQ,CAAC,EACTO,QAAQ,KAAK,EACbC,QAAQ,MAAM,EACE;IAChB,MAAMN,YAAY;QAAC;YAAEO,WAAW,GAAGF,MAAM,CAAC,EAAEC,OAAO;QAAC;QAAG;YAAEC,WAAW;QAAU;KAAE;IAChF,IAAIb,cAAc,QAAQ;QACxBM,UAAUE,OAAO;IACnB;IACA,OAAO;QACLF;QACAL;QACAC;QACAE;IACF;AACF,EAAE;AAEF;;;;;CAKC,GACD,OAAO,MAAMU,mBAAmBhB,wBAC9B,CAAC,EAAEiB,OAAO,EAAE;IACV,MAAMd,WAAWJ,aAAamB,cAAc;IAE5C,OAAO;QACLC,OACEF,YAAY,SAER;YAAChB,SAAS;gBAAEC,WAAW;gBAASC;YAAS;YAAIS,UAAU;gBAAEV,WAAW;gBAASY,OAAO;gBAASX;YAAS;SAAG,GACzG,EAAE;QAER,0BAA0B;QAC1BiB,MAAMnB,SAAS;YAAEC,WAAW;YAAQC;QAAS;IAC/C;AACF,GACA"}
1
+ {"version":3,"sources":["../src/components/MessageBarGroup/MessageBarGroup.motions.tsx"],"sourcesContent":["import { motionTokens, createPresenceComponent } from '@fluentui/react-motion';\nimport { fadeAtom, slideAtom } from '@fluentui/react-motion-components-preview';\nimport { MessageBarGroupProps } from './MessageBarGroup.types';\n\n/**\n * A presence component for a MessageBar to enter and exit from a MessageBarGroup.\n * It has an optional enter transition of a slide-in and fade-in,\n * when the `animate` prop is set to `'both'`.\n * It always has an exit transition of a fade-out.\n */\nexport const MessageBarMotion = createPresenceComponent<{ animate?: MessageBarGroupProps['animate'] }>(\n ({ animate }) => {\n const duration = motionTokens.durationGentle;\n\n return {\n enter:\n animate === 'both'\n ? // enter with slide and fade\n [fadeAtom({ direction: 'enter', duration }), slideAtom({ direction: 'enter', fromY: '-100%', duration })]\n : [], // no enter motion\n\n // Always exit with a fade\n exit: fadeAtom({ direction: 'exit', duration }),\n };\n },\n);\n"],"names":["motionTokens","createPresenceComponent","fadeAtom","slideAtom","MessageBarMotion","animate","duration","durationGentle","enter","direction","fromY","exit"],"mappings":"AAAA,SAASA,YAAY,EAAEC,uBAAuB,QAAQ,yBAAyB;AAC/E,SAASC,QAAQ,EAAEC,SAAS,QAAQ,4CAA4C;AAGhF;;;;;CAKC,GACD,OAAO,MAAMC,mBAAmBH,wBAC9B,CAAC,EAAEI,OAAO,EAAE;IACV,MAAMC,WAAWN,aAAaO,cAAc;IAE5C,OAAO;QACLC,OACEH,YAAY,SAER;YAACH,SAAS;gBAAEO,WAAW;gBAASH;YAAS;YAAIH,UAAU;gBAAEM,WAAW;gBAASC,OAAO;gBAASJ;YAAS;SAAG,GACzG,EAAE;QAER,0BAA0B;QAC1BK,MAAMT,SAAS;YAAEO,WAAW;YAAQH;QAAS;IAC/C;AACF,GACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contexts/messageBarContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nexport type MessageBarContextValue = {\n layout: 'multiline' | 'singleline' | 'auto';\n actionsRef: React.MutableRefObject<HTMLDivElement | null>;\n bodyRef: React.MutableRefObject<HTMLDivElement | null>;\n titleId: string;\n};\nconst messageBarContext = React.createContext<MessageBarContextValue | undefined>(undefined);\n\nexport const messageBarContextDefaultValue: MessageBarContextValue = {\n titleId: '',\n layout: 'singleline',\n actionsRef: React.createRef(),\n bodyRef: React.createRef(),\n};\n\nexport const MessageBarContextProvider = messageBarContext.Provider;\nexport const useMessageBarContext = (): MessageBarContextValue =>\n React.useContext(messageBarContext) ?? messageBarContextDefaultValue;\n"],"names":["React","messageBarContext","createContext","undefined","messageBarContextDefaultValue","titleId","layout","actionsRef","createRef","bodyRef","MessageBarContextProvider","Provider","useMessageBarContext","useContext"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAQ/B,MAAMC,oBAAoBD,MAAME,aAAa,CAAqCC;AAElF,OAAO,MAAMC,gCAAwD;IACnEC,SAAS;IACTC,QAAQ;IACRC,YAAYP,MAAMQ,SAAS;IAC3BC,SAAST,MAAMQ,SAAS;AAC1B,EAAE;AAEF,OAAO,MAAME,4BAA4BT,kBAAkBU,QAAQ,CAAC;AACpE,OAAO,MAAMC,uBAAuB;QAClCZ;WAAAA,CAAAA,oBAAAA,MAAMa,UAAU,CAACZ,gCAAjBD,+BAAAA,oBAAuCI;EAA8B"}
1
+ {"version":3,"sources":["../src/contexts/messageBarContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nexport type MessageBarContextValue = {\n layout: 'multiline' | 'singleline' | 'auto';\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n actionsRef: React.MutableRefObject<HTMLDivElement | null>;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n bodyRef: React.MutableRefObject<HTMLDivElement | null>;\n titleId: string;\n};\nconst messageBarContext = React.createContext<MessageBarContextValue | undefined>(undefined);\n\nexport const messageBarContextDefaultValue: MessageBarContextValue = {\n titleId: '',\n layout: 'singleline',\n actionsRef: React.createRef(),\n bodyRef: React.createRef(),\n};\n\nexport const MessageBarContextProvider = messageBarContext.Provider;\nexport const useMessageBarContext = (): MessageBarContextValue =>\n React.useContext(messageBarContext) ?? messageBarContextDefaultValue;\n"],"names":["React","messageBarContext","createContext","undefined","messageBarContextDefaultValue","titleId","layout","actionsRef","createRef","bodyRef","MessageBarContextProvider","Provider","useMessageBarContext","useContext"],"mappings":"AAAA;AAEA,YAAYA,WAAW,QAAQ;AAU/B,MAAMC,oBAAoBD,MAAME,aAAa,CAAqCC;AAElF,OAAO,MAAMC,gCAAwD;IACnEC,SAAS;IACTC,QAAQ;IACRC,YAAYP,MAAMQ,SAAS;IAC3BC,SAAST,MAAMQ,SAAS;AAC1B,EAAE;AAEF,OAAO,MAAME,4BAA4BT,kBAAkBU,QAAQ,CAAC;AACpE,OAAO,MAAMC,uBAAuB;QAClCZ;WAAAA,CAAAA,oBAAAA,MAAMa,UAAU,CAACZ,gCAAjBD,+BAAAA,oBAAuCI;EAA8B"}
@@ -2,81 +2,30 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- function _export(target, all) {
6
- for(var name in all)Object.defineProperty(target, name, {
7
- enumerable: true,
8
- get: all[name]
9
- });
10
- }
11
- _export(exports, {
12
- MessageBarMotion: function() {
5
+ Object.defineProperty(exports, "MessageBarMotion", {
6
+ enumerable: true,
7
+ get: function() {
13
8
  return MessageBarMotion;
14
- },
15
- fadeAtom: function() {
16
- return fadeAtom;
17
- },
18
- slideAtom: function() {
19
- return slideAtom;
20
9
  }
21
10
  });
22
11
  const _reactmotion = require("@fluentui/react-motion");
23
- const fadeAtom = ({ direction, duration, easing = _reactmotion.motionTokens.curveLinear, delay = 0, fromOpacity = 0 })=>{
24
- const keyframes = [
25
- {
26
- opacity: fromOpacity
27
- },
28
- {
29
- opacity: 1
30
- }
31
- ];
32
- if (direction === 'exit') {
33
- keyframes.reverse();
34
- }
35
- return {
36
- keyframes,
37
- duration,
38
- easing,
39
- delay,
40
- // Applying opacity backwards and forwards in time is important
41
- // to avoid a bug where a delayed animation is not hidden when it should be.
42
- fill: 'both'
43
- };
44
- };
45
- const slideAtom = ({ direction, duration, easing = _reactmotion.motionTokens.curveLinear, delay = 0, fromX = '0px', fromY = '20px' })=>{
46
- const keyframes = [
47
- {
48
- translate: `${fromX} ${fromY}`
49
- },
50
- {
51
- translate: '0px 0px'
52
- }
53
- ];
54
- if (direction === 'exit') {
55
- keyframes.reverse();
56
- }
57
- return {
58
- keyframes,
59
- duration,
60
- easing,
61
- delay
62
- };
63
- };
12
+ const _reactmotioncomponentspreview = require("@fluentui/react-motion-components-preview");
64
13
  const MessageBarMotion = (0, _reactmotion.createPresenceComponent)(({ animate })=>{
65
14
  const duration = _reactmotion.motionTokens.durationGentle;
66
15
  return {
67
16
  enter: animate === 'both' ? [
68
- fadeAtom({
17
+ (0, _reactmotioncomponentspreview.fadeAtom)({
69
18
  direction: 'enter',
70
19
  duration
71
20
  }),
72
- slideAtom({
21
+ (0, _reactmotioncomponentspreview.slideAtom)({
73
22
  direction: 'enter',
74
23
  fromY: '-100%',
75
24
  duration
76
25
  })
77
26
  ] : [],
78
27
  // Always exit with a fade
79
- exit: fadeAtom({
28
+ exit: (0, _reactmotioncomponentspreview.fadeAtom)({
80
29
  direction: 'exit',
81
30
  duration
82
31
  })
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/MessageBarGroup/MessageBarGroup.motions.tsx"],"sourcesContent":["import { motionTokens, createPresenceComponent, PresenceDirection, AtomMotion } from '@fluentui/react-motion';\nimport { MessageBarGroupProps } from './MessageBarGroup.types';\n\n// TODO: import these atoms from react-motion-components-preview once they're available there\n\ntype BaseAtomParams = {\n /** The functional direction of the motion: 'enter' or 'exit'. */\n direction: PresenceDirection;\n\n /** The duration of the motion in milliseconds. */\n duration: number;\n\n /** The easing curve for the motion. */\n easing?: EffectTiming['easing'];\n\n /** Time (ms) to delay the animation. */\n delay?: EffectTiming['delay'];\n};\n\ninterface FadeAtomParams extends BaseAtomParams {\n /** Defines how values are applied before and after execution. Defaults to 'both'. */\n fill?: FillMode;\n\n /** The starting opacity value. Defaults to 0. */\n fromOpacity?: number;\n}\n\n/**\n * Generates a motion atom object for a fade-in or fade-out.\n * @param direction - The functional direction of the motion: 'enter' or 'exit'.\n * @param duration - The duration of the motion in milliseconds.\n * @param easing - The easing curve for the motion. Defaults to `motionTokens.curveLinear`.\n * @param delay - The delay before the motion starts. Defaults to 0.\n * @param fromOpacity - The starting opacity value. Defaults to 0.\n * @returns A motion atom object with opacity keyframes and the supplied duration and easing.\n */\nexport const fadeAtom = ({\n direction,\n duration,\n easing = motionTokens.curveLinear,\n delay = 0,\n fromOpacity = 0,\n}: FadeAtomParams): AtomMotion => {\n const keyframes = [{ opacity: fromOpacity }, { opacity: 1 }];\n if (direction === 'exit') {\n keyframes.reverse();\n }\n return {\n keyframes,\n duration,\n easing,\n delay,\n // Applying opacity backwards and forwards in time is important\n // to avoid a bug where a delayed animation is not hidden when it should be.\n fill: 'both',\n };\n};\n\ninterface SlideAtomParams extends BaseAtomParams {\n fromX?: string;\n fromY?: string;\n}\n\n/**\n * Generates a motion atom object for a slide-in or slide-out.\n * @param direction - The functional direction of the motion: 'enter' or 'exit'.\n * @param duration - The duration of the motion in milliseconds.\n * @param easing - The easing curve for the motion. Defaults to `motionTokens.curveLinear`.\n * @param fromX - The starting X translate value with units (e.g., '0px', '100%'). Defaults to '0px'.\n * @param fromY - The starting Y translate value with units (e.g., '-20px', '100%'). Defaults to '0px'.\n * @returns A motion atom object with translate keyframes and the supplied duration and easing.\n */\nexport const slideAtom = ({\n direction,\n duration,\n easing = motionTokens.curveLinear,\n delay = 0,\n fromX = '0px',\n fromY = '20px',\n}: SlideAtomParams): AtomMotion => {\n const keyframes = [{ translate: `${fromX} ${fromY}` }, { translate: '0px 0px' }];\n if (direction === 'exit') {\n keyframes.reverse();\n }\n return {\n keyframes,\n duration,\n easing,\n delay,\n };\n};\n\n/**\n * A presence component for a MessageBar to enter and exit from a MessageBarGroup.\n * It has an optional enter transition of a slide-in and fade-in,\n * when the `animate` prop is set to `'both'`.\n * It always has an exit transition of a fade-out.\n */\nexport const MessageBarMotion = createPresenceComponent<{ animate?: MessageBarGroupProps['animate'] }>(\n ({ animate }) => {\n const duration = motionTokens.durationGentle;\n\n return {\n enter:\n animate === 'both'\n ? // enter with slide and fade\n [fadeAtom({ direction: 'enter', duration }), slideAtom({ direction: 'enter', fromY: '-100%', duration })]\n : [], // no enter motion\n\n // Always exit with a fade\n exit: fadeAtom({ direction: 'exit', duration }),\n };\n },\n);\n"],"names":["motionTokens","createPresenceComponent","fadeAtom","direction","duration","easing","curveLinear","delay","fromOpacity","keyframes","opacity","reverse","fill","slideAtom","fromX","fromY","translate","MessageBarMotion","animate","durationGentle","enter","exit"],"mappings":";;;;;;;;;;;oBAkGaiB;;;IA9DAf,QAAAA;;;aAoCAW;;;;6BAxEwE,yBAAyB;AAoCvG,iBAAiB,CAAC,EACvBV,SAAS,EACTC,QAAQ,EACRC,SAASL,yBAAAA,CAAaM,WAAW,EACjCC,QAAQ,CAAC,EACTC,cAAc,CAAC,EACA;IACf,MAAMC,YAAY;QAAC;YAAEC,SAASF;QAAY;QAAG;YAAEE,SAAS;QAAE;KAAE;IAC5D,IAAIP,cAAc,QAAQ;QACxBM,UAAUE,OAAO;IACnB;IACA,OAAO;QACLF;QACAL;QACAC;QACAE;QACA,+DAA+D;QAC/D,4EAA4E;QAC5EK,MAAM;IACR;AACF,EAAE;AAgBK,MAAMC,YAAY,CAAC,EACxBV,SAAS,EACTC,QAAQ,EACRC,SAASL,yBAAAA,CAAaM,WAAW,EACjCC,QAAQ,CAAC,EACTO,QAAQ,KAAK,EACbC,QAAQ,MAAM,EACE;IAChB,MAAMN,YAAY;QAAC;YAAEO,WAAW,GAAGF,MAAM,CAAC,EAAEC,OAAO;QAAC;QAAG;YAAEC,WAAW;QAAU;KAAE;IAChF,IAAIb,cAAc,QAAQ;QACxBM,UAAUE,OAAO;IACnB;IACA,OAAO;QACLF;QACAL;QACAC;QACAE;IACF;AACF,EAAE;AAQK,MAAMU,uBAAmBhB,oCAAAA,EAC9B,CAAC,EAAEiB,OAAO,EAAE;IACV,MAAMd,WAAWJ,yBAAAA,CAAamB,cAAc;IAE5C,OAAO;QACLC,OACEF,YAAY,SAER;YAAChB,SAAS;gBAAEC,WAAW;gBAASC;YAAS;YAAIS,UAAU;gBAAEV,WAAW;gBAASY,OAAO;gBAASX;YAAS;SAAG,GACzG,EAAE;QAER,0BAA0B;QAC1BiB,MAAMnB,SAAS;YAAEC,WAAW;YAAQC;QAAS;IAC/C;AACF,GACA"}
1
+ {"version":3,"sources":["../src/components/MessageBarGroup/MessageBarGroup.motions.tsx"],"sourcesContent":["import { motionTokens, createPresenceComponent } from '@fluentui/react-motion';\nimport { fadeAtom, slideAtom } from '@fluentui/react-motion-components-preview';\nimport { MessageBarGroupProps } from './MessageBarGroup.types';\n\n/**\n * A presence component for a MessageBar to enter and exit from a MessageBarGroup.\n * It has an optional enter transition of a slide-in and fade-in,\n * when the `animate` prop is set to `'both'`.\n * It always has an exit transition of a fade-out.\n */\nexport const MessageBarMotion = createPresenceComponent<{ animate?: MessageBarGroupProps['animate'] }>(\n ({ animate }) => {\n const duration = motionTokens.durationGentle;\n\n return {\n enter:\n animate === 'both'\n ? // enter with slide and fade\n [fadeAtom({ direction: 'enter', duration }), slideAtom({ direction: 'enter', fromY: '-100%', duration })]\n : [], // no enter motion\n\n // Always exit with a fade\n exit: fadeAtom({ direction: 'exit', duration }),\n };\n },\n);\n"],"names":["motionTokens","createPresenceComponent","fadeAtom","slideAtom","MessageBarMotion","animate","duration","durationGentle","enter","direction","fromY","exit"],"mappings":";;;;+BAUaI;;;;;;6BAVyC,yBAAyB;8CAC3C,4CAA4C;AASzE,6BAAyBH,oCAAAA,EAC9B,CAAC,EAAEI,OAAO,EAAE;IACV,MAAMC,WAAWN,yBAAAA,CAAaO,cAAc;IAE5C,OAAO;QACLC,OACEH,YAAY,SAER;gBAACH,sCAAAA,EAAS;gBAAEO,WAAW;gBAASH;YAAS;gBAAIH,uCAAAA,EAAU;gBAAEM,WAAW;gBAASC,OAAO;gBAASJ;YAAS;SAAG,GACzG,EAAE;QAER,0BAA0B;QAC1BK,UAAMT,sCAAAA,EAAS;YAAEO,WAAW;YAAQH;QAAS;IAC/C;AACF,GACA"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/contexts/messageBarContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nexport type MessageBarContextValue = {\n layout: 'multiline' | 'singleline' | 'auto';\n actionsRef: React.MutableRefObject<HTMLDivElement | null>;\n bodyRef: React.MutableRefObject<HTMLDivElement | null>;\n titleId: string;\n};\nconst messageBarContext = React.createContext<MessageBarContextValue | undefined>(undefined);\n\nexport const messageBarContextDefaultValue: MessageBarContextValue = {\n titleId: '',\n layout: 'singleline',\n actionsRef: React.createRef(),\n bodyRef: React.createRef(),\n};\n\nexport const MessageBarContextProvider = messageBarContext.Provider;\nexport const useMessageBarContext = (): MessageBarContextValue =>\n React.useContext(messageBarContext) ?? messageBarContextDefaultValue;\n"],"names":["React","messageBarContext","createContext","undefined","messageBarContextDefaultValue","titleId","layout","actionsRef","createRef","bodyRef","MessageBarContextProvider","Provider","useMessageBarContext","useContext"],"mappings":"AAAA;;;;;;;;;;;;6BAmBaU;;;iCAPAN;;;IAQAQ,oBAAAA;;;;;iEAlBU,QAAQ;AAQ/B,MAAMX,kCAAoBD,OAAME,aAAa,CAAqCC;AAE3E,MAAMC,gCAAwD;IACnEC,SAAS;IACTC,QAAQ;IACRC,0BAAYP,OAAMQ,SAAS;IAC3BC,uBAAST,OAAMQ,SAAS;AAC1B,EAAE;AAEK,MAAME,4BAA4BT,kBAAkBU,QAAQ,CAAC;AAC7D,6BAA6B;QAClCX;WAAAA,CAAAA,oBAAAA,OAAMa,UAAU,CAACZ,kBAAAA,MAAAA,QAAjBD,sBAAAA,KAAAA,IAAAA,oBAAuCI;EAA8B"}
1
+ {"version":3,"sources":["../src/contexts/messageBarContext.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nexport type MessageBarContextValue = {\n layout: 'multiline' | 'singleline' | 'auto';\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n actionsRef: React.MutableRefObject<HTMLDivElement | null>;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n bodyRef: React.MutableRefObject<HTMLDivElement | null>;\n titleId: string;\n};\nconst messageBarContext = React.createContext<MessageBarContextValue | undefined>(undefined);\n\nexport const messageBarContextDefaultValue: MessageBarContextValue = {\n titleId: '',\n layout: 'singleline',\n actionsRef: React.createRef(),\n bodyRef: React.createRef(),\n};\n\nexport const MessageBarContextProvider = messageBarContext.Provider;\nexport const useMessageBarContext = (): MessageBarContextValue =>\n React.useContext(messageBarContext) ?? messageBarContextDefaultValue;\n"],"names":["React","messageBarContext","createContext","undefined","messageBarContextDefaultValue","titleId","layout","actionsRef","createRef","bodyRef","MessageBarContextProvider","Provider","useMessageBarContext","useContext"],"mappings":"AAAA;;;;;;;;;;;;6BAqBaU;;;iCAPAN;;;IAQAQ,oBAAAA;;;;;iEApBU,QAAQ;AAU/B,MAAMX,kCAAoBD,OAAME,aAAa,CAAqCC;AAE3E,MAAMC,gCAAwD;IACnEC,SAAS;IACTC,QAAQ;IACRC,0BAAYP,OAAMQ,SAAS;IAC3BC,uBAAST,OAAMQ,SAAS;AAC1B,EAAE;AAEK,MAAME,4BAA4BT,kBAAkBU,QAAQ,CAAC;AAC7D,6BAA6B;QAClCX;WAAAA,CAAAA,oBAAAA,OAAMa,UAAU,CAACZ,kBAAAA,MAAAA,QAAjBD,sBAAAA,KAAAA,IAAAA,oBAAuCI;EAA8B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-message-bar",
3
- "version": "9.6.11",
3
+ "version": "9.6.13",
4
4
  "description": "Fluent UI MessageBar component",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -19,15 +19,15 @@
19
19
  "@fluentui/scripts-cypress": "*"
20
20
  },
21
21
  "dependencies": {
22
- "@fluentui/react-button": "^9.6.10",
22
+ "@fluentui/react-button": "^9.6.11",
23
23
  "@fluentui/react-icons": "^2.0.245",
24
- "@fluentui/react-jsx-runtime": "^9.3.1",
25
- "@fluentui/react-motion": "^9.11.2",
26
- "@fluentui/react-motion-components-preview": "^0.12.0",
24
+ "@fluentui/react-jsx-runtime": "^9.3.2",
25
+ "@fluentui/react-motion": "^9.11.3",
26
+ "@fluentui/react-motion-components-preview": "^0.14.0",
27
27
  "@fluentui/react-shared-contexts": "^9.25.2",
28
- "@fluentui/react-link": "^9.6.9",
28
+ "@fluentui/react-link": "^9.6.10",
29
29
  "@fluentui/react-theme": "^9.2.0",
30
- "@fluentui/react-utilities": "^9.25.2",
30
+ "@fluentui/react-utilities": "^9.25.3",
31
31
  "@griffel/react": "^1.5.22",
32
32
  "@swc/helpers": "^0.5.1"
33
33
  },