@fluentui/react-motion-components-preview 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,12 +1,21 @@
1
1
  # Change Log - @fluentui/react-motion-components-preview
2
2
 
3
- This log was last generated on Fri, 31 Oct 2025 16:17:37 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 06 Nov 2025 14:56:59 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.13.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-motion-components-preview_v0.13.0)
8
+
9
+ Thu, 06 Nov 2025 14:56:59 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-motion-components-preview_v0.12.0..@fluentui/react-motion-components-preview_v0.13.0)
11
+
12
+ ### Minor changes
13
+
14
+ - feat(motion): export standard motion atoms ([PR #35421](https://github.com/microsoft/fluentui/pull/35421) by robertpenner@microsoft.com)
15
+
7
16
  ## [0.12.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-motion-components-preview_v0.12.0)
8
17
 
9
- Fri, 31 Oct 2025 16:17:37 GMT
18
+ Fri, 31 Oct 2025 16:22:05 GMT
10
19
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-motion-components-preview_v0.11.0..@fluentui/react-motion-components-preview_v0.12.0)
11
20
 
12
21
  ### Minor changes
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
+ import { AtomMotion } from '@fluentui/react-motion';
1
2
  import { PresenceComponent } from '@fluentui/react-motion';
3
+ import type { PresenceDirection } from '@fluentui/react-motion';
2
4
 
3
5
  /**
4
6
  * Common opacity animation parameter for motion components.
@@ -10,6 +12,22 @@ declare type AnimateOpacity = {
10
12
 
11
13
  declare type Axis3D = 'x' | 'y' | 'z';
12
14
 
15
+ declare type Axis3D_2 = NonNullable<RotateParams['axis']>;
16
+
17
+ /**
18
+ * Common parameters shared by all atom functions.
19
+ */
20
+ declare type BaseAtomParams = {
21
+ /** The functional direction of the motion: 'enter' or 'exit'. */
22
+ direction: PresenceDirection;
23
+ /** The duration of the motion in milliseconds. */
24
+ duration: number;
25
+ /** The easing curve for the motion. */
26
+ easing?: EffectTiming['easing'];
27
+ /** Time (ms) to delay the animation. */
28
+ delay?: EffectTiming['delay'];
29
+ };
30
+
13
31
  /**
14
32
  * Base presence parameters combining duration, easing, and delay for motion components.
15
33
  */
@@ -18,6 +36,23 @@ declare type BasePresenceParams = PresenceDuration & PresenceEasing & PresenceDe
18
36
  /** A React component that applies blur in/out transitions to its children. */
19
37
  export declare const Blur: PresenceComponent<BlurParams>;
20
38
 
39
+ /**
40
+ * Generates a motion atom object for a blur-in or blur-out.
41
+ * @param direction - The functional direction of the motion: 'enter' or 'exit'.
42
+ * @param duration - The duration of the motion in milliseconds.
43
+ * @param easing - The easing curve for the motion. Defaults to `motionTokens.curveLinear`.
44
+ * @param fromRadius - The blur radius value with units (e.g., '20px', '1rem'). Defaults to '10px'.
45
+ * @param toRadius - The ending blur radius value with units (e.g., '0px', '5px'). Defaults to '0px'.
46
+ * @param delay - Time (ms) to delay the animation. Defaults to 0.
47
+ * @returns A motion atom object with filter blur keyframes and the supplied duration and easing.
48
+ */
49
+ export declare const blurAtom: ({ direction, duration, easing, delay, fromRadius, toRadius, }: BlurAtomParams) => AtomMotion;
50
+
51
+ declare interface BlurAtomParams extends BaseAtomParams {
52
+ fromRadius?: string;
53
+ toRadius?: string;
54
+ }
55
+
21
56
  export declare type BlurParams = BasePresenceParams & AnimateOpacity & {
22
57
  /** The blur radius with units to animate from. Defaults to '10px'. */
23
58
  fromRadius?: string;
@@ -71,6 +106,27 @@ export declare const CollapseSnappy: PresenceComponent<CollapseParams>;
71
106
  /** A React component that applies fade in/out transitions to its children. */
72
107
  export declare const Fade: PresenceComponent<FadeParams>;
73
108
 
109
+ /**
110
+ * Generates a motion atom object for a fade-in or fade-out.
111
+ * @param direction - The functional direction of the motion: 'enter' or 'exit'.
112
+ * @param duration - The duration of the motion in milliseconds.
113
+ * @param easing - The easing curve for the motion. Defaults to `motionTokens.curveLinear`.
114
+ * @param delay - The delay before the motion starts. Defaults to 0.
115
+ * @param fromOpacity - The starting opacity value. Defaults to 0.
116
+ * @param toOpacity - The ending opacity value. Defaults to 1.
117
+ * @returns A motion atom object with opacity keyframes and the supplied duration and easing.
118
+ */
119
+ export declare const fadeAtom: ({ direction, duration, easing, delay, fromOpacity, toOpacity, }: FadeAtomParams) => AtomMotion;
120
+
121
+ declare interface FadeAtomParams extends BaseAtomParams {
122
+ /** Defines how values are applied before and after execution. Defaults to 'both'. */
123
+ fill?: FillMode;
124
+ /** The starting opacity value. Defaults to 0. */
125
+ fromOpacity?: number;
126
+ /** The ending opacity value. Defaults to 1. */
127
+ toOpacity?: number;
128
+ }
129
+
74
130
  export declare type FadeParams = BasePresenceParams & {
75
131
  /** The starting opacity value. Defaults to 0. */
76
132
  fromOpacity?: number;
@@ -114,6 +170,25 @@ declare type PresenceEasing = {
114
170
 
115
171
  export declare const Rotate: PresenceComponent<RotateParams>;
116
172
 
173
+ /**
174
+ * Generates a motion atom object for a rotation around a single axis.
175
+ * @param direction - The functional direction of the motion: 'enter' or 'exit'.
176
+ * @param duration - The duration of the motion in milliseconds.
177
+ * @param easing - The easing curve for the motion. Defaults to `motionTokens.curveLinear`.
178
+ * @param axis - The axis of rotation: 'x', 'y', or 'z'. Defaults to 'y'.
179
+ * @param fromAngle - The starting rotation angle in degrees. Defaults to -90.
180
+ * @param toAngle - The ending rotation angle in degrees. Defaults to 0.
181
+ * @param delay - Time (ms) to delay the animation. Defaults to 0.
182
+ * @returns A motion atom object with rotate keyframes and the supplied duration and easing.
183
+ */
184
+ export declare const rotateAtom: ({ direction, duration, easing, delay, axis, fromAngle, toAngle, }: RotateAtomParams) => AtomMotion;
185
+
186
+ declare interface RotateAtomParams extends BaseAtomParams {
187
+ axis?: Axis3D_2;
188
+ fromAngle?: number;
189
+ toAngle?: number;
190
+ }
191
+
117
192
  export declare type RotateParams = BasePresenceParams & AnimateOpacity & {
118
193
  /**
119
194
  * The axis of rotation: 'x', 'y', or 'z'.
@@ -135,6 +210,23 @@ export declare type RotateParams = BasePresenceParams & AnimateOpacity & {
135
210
  /** A React component that applies scale in/out transitions to its children. */
136
211
  export declare const Scale: PresenceComponent<ScaleParams>;
137
212
 
213
+ /**
214
+ * Generates a motion atom object for a scale in or scale out.
215
+ * @param direction - The functional direction of the motion: 'enter' or 'exit'.
216
+ * @param duration - The duration of the motion in milliseconds.
217
+ * @param easing - The easing curve for the motion. Defaults to `motionTokens.curveLinear`.
218
+ * @param fromScale - The starting scale value. Defaults to 0.9.
219
+ * @param toScale - The ending scale value. Defaults to 1.
220
+ * @param delay - Time (ms) to delay the animation. Defaults to 0.
221
+ * @returns A motion atom object with scale keyframes and the supplied duration and easing.
222
+ */
223
+ export declare const scaleAtom: ({ direction, duration, easing, delay, fromScale, toScale, }: ScaleAtomParams) => AtomMotion;
224
+
225
+ declare interface ScaleAtomParams extends BaseAtomParams {
226
+ fromScale?: number;
227
+ toScale?: number;
228
+ }
229
+
138
230
  export declare type ScaleParams = BasePresenceParams & AnimateOpacity & {
139
231
  /** The scale value to animate from. Defaults to `0.9`. */
140
232
  fromScale?: number;
@@ -149,6 +241,27 @@ export declare const ScaleSnappy: PresenceComponent<ScaleParams>;
149
241
  /** A React component that applies slide in/out transitions to its children. */
150
242
  export declare const Slide: PresenceComponent<SlideParams>;
151
243
 
244
+ /**
245
+ * Generates a motion atom object for a slide-in or slide-out.
246
+ * @param direction - The functional direction of the motion: 'enter' or 'exit'.
247
+ * @param duration - The duration of the motion in milliseconds.
248
+ * @param easing - The easing curve for the motion. Defaults to `motionTokens.curveLinear`.
249
+ * @param fromX - The starting X translate value with units (e.g., '50px', '100%'). Defaults to '0px'.
250
+ * @param fromY - The starting Y translate value with units (e.g., '50px', '100%'). Defaults to '0px'.
251
+ * @param toX - The ending X translate value with units (e.g.'5px', '10%'). Defaults to '0px'.
252
+ * @param toY - The ending Y translate value with units (e.g., '5px', '10%'). Defaults to '0px'.
253
+ * @param delay - Time (ms) to delay the animation. Defaults to 0.
254
+ * @returns A motion atom object with translate keyframes and the supplied duration and easing.
255
+ */
256
+ export declare const slideAtom: ({ direction, duration, easing, delay, fromX, fromY, toX, toY, }: SlideAtomParams) => AtomMotion;
257
+
258
+ declare interface SlideAtomParams extends BaseAtomParams {
259
+ fromX?: string;
260
+ fromY?: string;
261
+ toX?: string;
262
+ toY?: string;
263
+ }
264
+
152
265
  export declare type SlideParams = BasePresenceParams & AnimateOpacity & {
153
266
  /** The X translate value with units to animate from. Defaults to `'0px'`. */
154
267
  fromX?: string;
package/lib/index.js CHANGED
@@ -4,3 +4,9 @@ export { Scale, ScaleSnappy, ScaleRelaxed } from './components/Scale';
4
4
  export { Slide, SlideSnappy, SlideRelaxed } from './components/Slide';
5
5
  export { Blur } from './components/Blur';
6
6
  export { Rotate } from './components/Rotate';
7
+ // Motion Atoms
8
+ export { blurAtom } from './atoms/blur-atom';
9
+ export { fadeAtom } from './atoms/fade-atom';
10
+ export { rotateAtom } from './atoms/rotate-atom';
11
+ export { scaleAtom } from './atoms/scale-atom';
12
+ export { slideAtom } from './atoms/slide-atom'; // TODO: consider whether to export some or all collapse atoms
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n Collapse,\n CollapseSnappy,\n CollapseRelaxed,\n CollapseDelayed,\n type CollapseParams,\n type CollapseDurations,\n} from './components/Collapse';\nexport { Fade, FadeSnappy, FadeRelaxed, type FadeParams } from './components/Fade';\nexport { Scale, ScaleSnappy, ScaleRelaxed, type ScaleParams } from './components/Scale';\nexport { Slide, SlideSnappy, SlideRelaxed, type SlideParams } from './components/Slide';\nexport { Blur, type BlurParams } from './components/Blur';\nexport { Rotate, type RotateParams } from './components/Rotate';\n"],"names":["Collapse","CollapseSnappy","CollapseRelaxed","CollapseDelayed","Fade","FadeSnappy","FadeRelaxed","Scale","ScaleSnappy","ScaleRelaxed","Slide","SlideSnappy","SlideRelaxed","Blur","Rotate"],"mappings":"AAAA,SACEA,QAAQ,EACRC,cAAc,EACdC,eAAe,EACfC,eAAe,QAGV,wBAAwB;AAC/B,SAASC,IAAI,EAAEC,UAAU,EAAEC,WAAW,QAAyB,oBAAoB;AACnF,SAASC,KAAK,EAAEC,WAAW,EAAEC,YAAY,QAA0B,qBAAqB;AACxF,SAASC,KAAK,EAAEC,WAAW,EAAEC,YAAY,QAA0B,qBAAqB;AACxF,SAASC,IAAI,QAAyB,oBAAoB;AAC1D,SAASC,MAAM,QAA2B,sBAAsB"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n Collapse,\n CollapseSnappy,\n CollapseRelaxed,\n CollapseDelayed,\n type CollapseParams,\n type CollapseDurations,\n} from './components/Collapse';\nexport { Fade, FadeSnappy, FadeRelaxed, type FadeParams } from './components/Fade';\nexport { Scale, ScaleSnappy, ScaleRelaxed, type ScaleParams } from './components/Scale';\nexport { Slide, SlideSnappy, SlideRelaxed, type SlideParams } from './components/Slide';\nexport { Blur, type BlurParams } from './components/Blur';\nexport { Rotate, type RotateParams } from './components/Rotate';\n\n// Motion Atoms\nexport { blurAtom } from './atoms/blur-atom';\nexport { fadeAtom } from './atoms/fade-atom';\nexport { rotateAtom } from './atoms/rotate-atom';\nexport { scaleAtom } from './atoms/scale-atom';\nexport { slideAtom } from './atoms/slide-atom';\n// TODO: consider whether to export some or all collapse atoms\n"],"names":["Collapse","CollapseSnappy","CollapseRelaxed","CollapseDelayed","Fade","FadeSnappy","FadeRelaxed","Scale","ScaleSnappy","ScaleRelaxed","Slide","SlideSnappy","SlideRelaxed","Blur","Rotate","blurAtom","fadeAtom","rotateAtom","scaleAtom","slideAtom"],"mappings":"AAAA,SACEA,QAAQ,EACRC,cAAc,EACdC,eAAe,EACfC,eAAe,QAGV,wBAAwB;AAC/B,SAASC,IAAI,EAAEC,UAAU,EAAEC,WAAW,QAAyB,oBAAoB;AACnF,SAASC,KAAK,EAAEC,WAAW,EAAEC,YAAY,QAA0B,qBAAqB;AACxF,SAASC,KAAK,EAAEC,WAAW,EAAEC,YAAY,QAA0B,qBAAqB;AACxF,SAASC,IAAI,QAAyB,oBAAoB;AAC1D,SAASC,MAAM,QAA2B,sBAAsB;AAEhE,eAAe;AACf,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,UAAU,QAAQ,sBAAsB;AACjD,SAASC,SAAS,QAAQ,qBAAqB;AAC/C,SAASC,SAAS,QAAQ,qBAAqB,CAC/C,8DAA8D"}
@@ -53,6 +53,21 @@ _export(exports, {
53
53
  },
54
54
  SlideSnappy: function() {
55
55
  return _Slide.SlideSnappy;
56
+ },
57
+ blurAtom: function() {
58
+ return _bluratom.blurAtom;
59
+ },
60
+ fadeAtom: function() {
61
+ return _fadeatom.fadeAtom;
62
+ },
63
+ rotateAtom: function() {
64
+ return _rotateatom.rotateAtom;
65
+ },
66
+ scaleAtom: function() {
67
+ return _scaleatom.scaleAtom;
68
+ },
69
+ slideAtom: function() {
70
+ return _slideatom.slideAtom;
56
71
  }
57
72
  });
58
73
  const _Collapse = require("./components/Collapse");
@@ -61,3 +76,9 @@ const _Scale = require("./components/Scale");
61
76
  const _Slide = require("./components/Slide");
62
77
  const _Blur = require("./components/Blur");
63
78
  const _Rotate = require("./components/Rotate");
79
+ const _bluratom = require("./atoms/blur-atom");
80
+ const _fadeatom = require("./atoms/fade-atom");
81
+ const _rotateatom = require("./atoms/rotate-atom");
82
+ const _scaleatom = require("./atoms/scale-atom");
83
+ const _slideatom = require("./atoms/slide-atom");
84
+ // TODO: consider whether to export some or all collapse atoms
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n Collapse,\n CollapseSnappy,\n CollapseRelaxed,\n CollapseDelayed,\n type CollapseParams,\n type CollapseDurations,\n} from './components/Collapse';\nexport { Fade, FadeSnappy, FadeRelaxed, type FadeParams } from './components/Fade';\nexport { Scale, ScaleSnappy, ScaleRelaxed, type ScaleParams } from './components/Scale';\nexport { Slide, SlideSnappy, SlideRelaxed, type SlideParams } from './components/Slide';\nexport { Blur, type BlurParams } from './components/Blur';\nexport { Rotate, type RotateParams } from './components/Rotate';\n"],"names":["Blur","Collapse","CollapseDelayed","CollapseRelaxed","CollapseSnappy","Fade","FadeRelaxed","FadeSnappy","Rotate","Scale","ScaleRelaxed","ScaleSnappy","Slide","SlideRelaxed","SlideSnappy"],"mappings":";;;;;;;;;;;IAWSA,IAAI;eAAJA,UAAI;;IAVXC,QAAQ;eAARA,kBAAQ;;IAGRC,eAAe;eAAfA,yBAAe;;IADfC,eAAe;eAAfA,yBAAe;;IADfC,cAAc;eAAdA,wBAAc;;IAMPC,IAAI;eAAJA,UAAI;;IAAcC,WAAW;eAAXA,iBAAW;;IAAvBC,UAAU;eAAVA,gBAAU;;IAIhBC,MAAM;eAANA,cAAM;;IAHNC,KAAK;eAALA,YAAK;;IAAeC,YAAY;eAAZA,mBAAY;;IAAzBC,WAAW;eAAXA,kBAAW;;IAClBC,KAAK;eAALA,YAAK;;IAAeC,YAAY;eAAZA,mBAAY;;IAAzBC,WAAW;eAAXA,kBAAW;;;0BAHpB;sBACwD;uBACI;uBACA;sBAC7B;wBACI"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n Collapse,\n CollapseSnappy,\n CollapseRelaxed,\n CollapseDelayed,\n type CollapseParams,\n type CollapseDurations,\n} from './components/Collapse';\nexport { Fade, FadeSnappy, FadeRelaxed, type FadeParams } from './components/Fade';\nexport { Scale, ScaleSnappy, ScaleRelaxed, type ScaleParams } from './components/Scale';\nexport { Slide, SlideSnappy, SlideRelaxed, type SlideParams } from './components/Slide';\nexport { Blur, type BlurParams } from './components/Blur';\nexport { Rotate, type RotateParams } from './components/Rotate';\n\n// Motion Atoms\nexport { blurAtom } from './atoms/blur-atom';\nexport { fadeAtom } from './atoms/fade-atom';\nexport { rotateAtom } from './atoms/rotate-atom';\nexport { scaleAtom } from './atoms/scale-atom';\nexport { slideAtom } from './atoms/slide-atom';\n// TODO: consider whether to export some or all collapse atoms\n"],"names":["Blur","Collapse","CollapseDelayed","CollapseRelaxed","CollapseSnappy","Fade","FadeRelaxed","FadeSnappy","Rotate","Scale","ScaleRelaxed","ScaleSnappy","Slide","SlideRelaxed","SlideSnappy","blurAtom","fadeAtom","rotateAtom","scaleAtom","slideAtom"],"mappings":";;;;;;;;;;;IAWSA,IAAI;eAAJA,UAAI;;IAVXC,QAAQ;eAARA,kBAAQ;;IAGRC,eAAe;eAAfA,yBAAe;;IADfC,eAAe;eAAfA,yBAAe;;IADfC,cAAc;eAAdA,wBAAc;;IAMPC,IAAI;eAAJA,UAAI;;IAAcC,WAAW;eAAXA,iBAAW;;IAAvBC,UAAU;eAAVA,gBAAU;;IAIhBC,MAAM;eAANA,cAAM;;IAHNC,KAAK;eAALA,YAAK;;IAAeC,YAAY;eAAZA,mBAAY;;IAAzBC,WAAW;eAAXA,kBAAW;;IAClBC,KAAK;eAALA,YAAK;;IAAeC,YAAY;eAAZA,mBAAY;;IAAzBC,WAAW;eAAXA,kBAAW;;IAKlBC,QAAQ;eAARA,kBAAQ;;IACRC,QAAQ;eAARA,kBAAQ;;IACRC,UAAU;eAAVA,sBAAU;;IACVC,SAAS;eAATA,oBAAS;;IACTC,SAAS;eAATA,oBAAS;;;0BAZX;sBACwD;uBACI;uBACA;sBAC7B;wBACI;0BAGjB;0BACA;4BACE;2BACD;2BACA;CAC1B,8DAA8D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-motion-components-preview",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "description": "A preview package for Fluent UI motion components, providing a collection of components",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",