@fluentui/react-motion-components-preview 0.4.9 → 0.5.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,9 +1,18 @@
1
1
  # Change Log - @fluentui/react-motion-components-preview
2
2
 
3
- This log was last generated on Wed, 22 Jan 2025 14:00:19 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 14 May 2025 18:45:46 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.5.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-motion-components-preview_v0.5.0)
8
+
9
+ Wed, 14 May 2025 18:45:46 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-motion-components-preview_v0.4.3..@fluentui/react-motion-components-preview_v0.5.0)
11
+
12
+ ### Minor changes
13
+
14
+ - refactor(motion): simplify Fade & Scale variant creation with createPresenceComponentVariant ([PR #34042](https://github.com/microsoft/fluentui/pull/34042) by robertpenner@microsoft.com)
15
+
7
16
  ## [0.4.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-motion-components-preview_v0.4.3)
8
17
 
9
18
  Wed, 22 Jan 2025 14:00:19 GMT
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import type { MotionParam } from '@fluentui/react-motion';
2
2
  import { PresenceComponent } from '@fluentui/react-motion';
3
- import type { PresenceMotion } from '@fluentui/react-motion';
4
3
  import type { PresenceMotionFn } from '@fluentui/react-motion';
5
4
 
6
5
  /** A React component that applies collapse/expand transitions to its children. */
@@ -57,39 +56,24 @@ export declare const createCollapseDelayedPresence: PresenceMotionFnCreator<Coll
57
56
  /** Defines a presence motion for collapse/expand. */
58
57
  export declare const createCollapsePresence: PresenceMotionFnCreator<CollapseVariantParams, CollapseRuntimeParams>;
59
58
 
60
- /** Define a presence motion for fade in/out */
61
- export declare const createFadePresence: PresenceMotionCreator<FadeVariantParams>;
62
-
63
- /** Define a presence motion for scale in/out */
64
- export declare const createScalePresence: PresenceMotionFnCreator<ScaleVariantParams_unstable, ScaleRuntimeParams_unstable>;
65
-
66
59
  /** A React component that applies fade in/out transitions to its children. */
67
- export declare const Fade: PresenceComponent< {}>;
60
+ export declare const Fade: PresenceComponent<FadeVariantParams>;
68
61
 
69
- export declare const FadeRelaxed: PresenceComponent< {}>;
62
+ export declare const FadeRelaxed: PresenceComponent<FadeVariantParams>;
70
63
 
71
- export declare const FadeSnappy: PresenceComponent< {}>;
64
+ export declare const FadeSnappy: PresenceComponent<FadeVariantParams>;
72
65
 
73
66
  declare type FadeVariantParams = {
74
67
  /** Time (ms) for the enter transition (fade-in). Defaults to the `durationNormal` value (200 ms). */
75
- enterDuration?: number;
76
- /** Easing curve for the enter transition (fade-in). Defaults to the `easeEase` value. */
77
- enterEasing?: string;
78
- /** Time (ms) for the exit transition (fade-out). Defaults to the `enterDuration` param for symmetry. */
68
+ duration?: number;
69
+ /** Easing curve for the enter transition (fade-in). Defaults to the `curveEasyEase` value. */
70
+ easing?: string;
71
+ /** Time (ms) for the exit transition (fade-out). Defaults to the `duration` param for symmetry. */
79
72
  exitDuration?: number;
80
- /** Easing curve for the exit transition (fade-out). Defaults to the `enterEasing` param for symmetry. */
73
+ /** Easing curve for the exit transition (fade-out). Defaults to the `easing` param for symmetry. */
81
74
  exitEasing?: string;
82
75
  };
83
76
 
84
- /**
85
- * This is a factory function that generates a motion object from variant params, e.g. duration, easing, etc.
86
- * The generated object defines a presence motion with `enter` and `exit` transitions.
87
- * This motion object is declarative, i.e. data without side effects,
88
- * and it is framework-independent, i.e. non-React.
89
- * It can be turned into a React component using `createPresenceComponent`.
90
- */
91
- declare type PresenceMotionCreator<MotionVariantParams extends Record<string, MotionParam> = {}> = (variantParams?: MotionVariantParams) => PresenceMotion;
92
-
93
77
  /**
94
78
  * This is a factory function that generates a motion function, which has variant params bound into it.
95
79
  * The generated motion function accepts other runtime params that aren't locked into the variant, but supplied at runtime.
@@ -103,26 +87,25 @@ declare type PresenceMotionCreator<MotionVariantParams extends Record<string, Mo
103
87
  declare type PresenceMotionFnCreator<MotionVariantParams extends Record<string, MotionParam> = {}, MotionRuntimeParams extends Record<string, MotionParam> = {}> = (variantParams?: MotionVariantParams) => PresenceMotionFn<MotionRuntimeParams>;
104
88
 
105
89
  /** A React component that applies scale in/out transitions to its children. */
106
- export declare const Scale: PresenceComponent<ScaleRuntimeParams_unstable>;
90
+ export declare const Scale: PresenceComponent<ScaleVariantParams>;
107
91
 
108
- export declare const ScaleRelaxed: PresenceComponent<ScaleRuntimeParams_unstable>;
92
+ export declare const ScaleRelaxed: PresenceComponent<ScaleVariantParams>;
109
93
 
110
- declare type ScaleRuntimeParams_unstable = {
111
- /** Whether to animate the opacity. Defaults to `true`. */
112
- animateOpacity?: boolean;
113
- };
114
-
115
- export declare const ScaleSnappy: PresenceComponent<ScaleRuntimeParams_unstable>;
94
+ export declare const ScaleSnappy: PresenceComponent<ScaleVariantParams>;
116
95
 
117
- declare type ScaleVariantParams_unstable = {
118
- /** Time (ms) for the enter transition. Defaults to the `durationNormal` value (200 ms). */
119
- enterDuration?: number;
120
- /** Easing curve for the enter transition. Defaults to the `easeEaseMax` value. */
121
- enterEasing?: string;
122
- /** Time (ms) for the exit transition. Defaults to the `enterDuration` param for symmetry. */
96
+ declare type ScaleVariantParams = {
97
+ /** Time (ms) for the enter transition (scale-in). Defaults to the `durationNormal` value (200 ms). */
98
+ duration?: number;
99
+ /** Easing curve for the enter transition (scale-in). Defaults to the `curveDecelerateMid` value. */
100
+ easing?: string;
101
+ /** Time (ms) for the exit transition (scale-out). Defaults to the `duration` param for symmetry. */
123
102
  exitDuration?: number;
124
- /** Easing curve for the exit transition. Defaults to the `enterEasing` param for symmetry. */
103
+ /** Easing curve for the exit transition (scale-out). Defaults to the `curveAccelerateMid` value. */
125
104
  exitEasing?: string;
105
+ /** The scale value to animate from. Defaults to `0.9`. */
106
+ fromScale?: number;
107
+ /** Whether to animate the opacity. Defaults to `true`. */
108
+ animateOpacity?: boolean;
126
109
  };
127
110
 
128
111
  export { }
@@ -1,21 +1,23 @@
1
- import { motionTokens, createPresenceComponent } from '@fluentui/react-motion';
1
+ import { motionTokens, createPresenceComponent, createPresenceComponentVariant } from '@fluentui/react-motion';
2
2
  import { fadeAtom } from '../../atoms/fade-atom';
3
- /** Define a presence motion for fade in/out */ export const createFadePresence = ({ enterDuration = motionTokens.durationNormal, enterEasing = motionTokens.curveEasyEase, exitDuration = enterDuration, exitEasing = enterEasing } = {})=>({
3
+ /** Define a presence motion for fade in/out */ export const fadePresenceFn = ({ duration = motionTokens.durationNormal, easing = motionTokens.curveEasyEase, exitDuration = duration, exitEasing = easing })=>{
4
+ return {
4
5
  enter: fadeAtom({
5
6
  direction: 'enter',
6
- duration: enterDuration,
7
- easing: enterEasing
7
+ duration,
8
+ easing
8
9
  }),
9
10
  exit: fadeAtom({
10
11
  direction: 'exit',
11
12
  duration: exitDuration,
12
13
  easing: exitEasing
13
14
  })
14
- });
15
- /** A React component that applies fade in/out transitions to its children. */ export const Fade = createPresenceComponent(createFadePresence());
16
- export const FadeSnappy = createPresenceComponent(createFadePresence({
17
- enterDuration: motionTokens.durationFast
18
- }));
19
- export const FadeRelaxed = createPresenceComponent(createFadePresence({
20
- enterDuration: motionTokens.durationGentle
21
- }));
15
+ };
16
+ };
17
+ /** A React component that applies fade in/out transitions to its children. */ export const Fade = createPresenceComponent(fadePresenceFn);
18
+ export const FadeSnappy = createPresenceComponentVariant(Fade, {
19
+ duration: motionTokens.durationFast
20
+ });
21
+ export const FadeRelaxed = createPresenceComponentVariant(Fade, {
22
+ duration: motionTokens.durationGentle
23
+ });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Fade/Fade.ts"],"sourcesContent":["import { motionTokens, createPresenceComponent } from '@fluentui/react-motion';\nimport type { PresenceMotionCreator } from '../../types';\nimport { fadeAtom } from '../../atoms/fade-atom';\n\ntype FadeVariantParams = {\n /** Time (ms) for the enter transition (fade-in). Defaults to the `durationNormal` value (200 ms). */\n enterDuration?: number;\n\n /** Easing curve for the enter transition (fade-in). Defaults to the `easeEase` value. */\n enterEasing?: string;\n\n /** Time (ms) for the exit transition (fade-out). Defaults to the `enterDuration` param for symmetry. */\n exitDuration?: number;\n\n /** Easing curve for the exit transition (fade-out). Defaults to the `enterEasing` param for symmetry. */\n exitEasing?: string;\n};\n\n/** Define a presence motion for fade in/out */\nexport const createFadePresence: PresenceMotionCreator<FadeVariantParams> = ({\n enterDuration = motionTokens.durationNormal,\n enterEasing = motionTokens.curveEasyEase,\n exitDuration = enterDuration,\n exitEasing = enterEasing,\n} = {}) => ({\n enter: fadeAtom({ direction: 'enter', duration: enterDuration, easing: enterEasing }),\n exit: fadeAtom({ direction: 'exit', duration: exitDuration, easing: exitEasing }),\n});\n\n/** A React component that applies fade in/out transitions to its children. */\nexport const Fade = createPresenceComponent(createFadePresence());\n\nexport const FadeSnappy = createPresenceComponent(createFadePresence({ enterDuration: motionTokens.durationFast }));\n\nexport const FadeRelaxed = createPresenceComponent(createFadePresence({ enterDuration: motionTokens.durationGentle }));\n"],"names":["motionTokens","createPresenceComponent","fadeAtom","createFadePresence","enterDuration","durationNormal","enterEasing","curveEasyEase","exitDuration","exitEasing","enter","direction","duration","easing","exit","Fade","FadeSnappy","durationFast","FadeRelaxed","durationGentle"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,YAAY,EAAEC,uBAAuB,QAAQ,yBAAyB;AAE/E,SAASC,QAAQ,QAAQ,wBAAwB;AAgBjD,8CAA8C,GAC9C,OAAO,MAAMC,qBAA+D,CAAC,EAC3EC,gBAAgBJ,aAAaK,cAAc,EAC3CC,cAAcN,aAAaO,aAAa,EACxCC,eAAeJ,aAAa,EAC5BK,aAAaH,WAAW,EACzB,GAAG,CAAC,CAAC,GAAM,CAAA;QACVI,OAAOR,SAAS;YAAES,WAAW;YAASC,UAAUR;YAAeS,QAAQP;QAAY;QACnFQ,MAAMZ,SAAS;YAAES,WAAW;YAAQC,UAAUJ;YAAcK,QAAQJ;QAAW;IACjF,CAAA,EAAG;AAEH,4EAA4E,GAC5E,OAAO,MAAMM,OAAOd,wBAAwBE,sBAAsB;AAElE,OAAO,MAAMa,aAAaf,wBAAwBE,mBAAmB;IAAEC,eAAeJ,aAAaiB,YAAY;AAAC,IAAI;AAEpH,OAAO,MAAMC,cAAcjB,wBAAwBE,mBAAmB;IAAEC,eAAeJ,aAAamB,cAAc;AAAC,IAAI"}
1
+ {"version":3,"sources":["../src/components/Fade/Fade.ts"],"sourcesContent":["import {\n motionTokens,\n createPresenceComponent,\n PresenceMotionFn,\n createPresenceComponentVariant,\n} from '@fluentui/react-motion';\nimport { fadeAtom } from '../../atoms/fade-atom';\n\ntype FadeVariantParams = {\n /** Time (ms) for the enter transition (fade-in). Defaults to the `durationNormal` value (200 ms). */\n duration?: number;\n\n /** Easing curve for the enter transition (fade-in). Defaults to the `curveEasyEase` value. */\n easing?: string;\n\n /** Time (ms) for the exit transition (fade-out). Defaults to the `duration` param for symmetry. */\n exitDuration?: number;\n\n /** Easing curve for the exit transition (fade-out). Defaults to the `easing` param for symmetry. */\n exitEasing?: string;\n};\n\n/** Define a presence motion for fade in/out */\nexport const fadePresenceFn: PresenceMotionFn<FadeVariantParams> = ({\n duration = motionTokens.durationNormal,\n easing = motionTokens.curveEasyEase,\n exitDuration = duration,\n exitEasing = easing,\n}) => {\n return {\n enter: fadeAtom({ direction: 'enter', duration, easing }),\n exit: fadeAtom({ direction: 'exit', duration: exitDuration, easing: exitEasing }),\n };\n};\n\n/** A React component that applies fade in/out transitions to its children. */\nexport const Fade = createPresenceComponent(fadePresenceFn);\n\nexport const FadeSnappy = createPresenceComponentVariant(Fade, { duration: motionTokens.durationFast });\n\nexport const FadeRelaxed = createPresenceComponentVariant(Fade, { duration: motionTokens.durationGentle });\n"],"names":["motionTokens","createPresenceComponent","createPresenceComponentVariant","fadeAtom","fadePresenceFn","duration","durationNormal","easing","curveEasyEase","exitDuration","exitEasing","enter","direction","exit","Fade","FadeSnappy","durationFast","FadeRelaxed","durationGentle"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,YAAY,EACZC,uBAAuB,EAEvBC,8BAA8B,QACzB,yBAAyB;AAChC,SAASC,QAAQ,QAAQ,wBAAwB;AAgBjD,8CAA8C,GAC9C,OAAO,MAAMC,iBAAsD,CAAC,EAClEC,WAAWL,aAAaM,cAAc,EACtCC,SAASP,aAAaQ,aAAa,EACnCC,eAAeJ,QAAQ,EACvBK,aAAaH,MAAM,EACpB;IACC,OAAO;QACLI,OAAOR,SAAS;YAAES,WAAW;YAASP;YAAUE;QAAO;QACvDM,MAAMV,SAAS;YAAES,WAAW;YAAQP,UAAUI;YAAcF,QAAQG;QAAW;IACjF;AACF,EAAE;AAEF,4EAA4E,GAC5E,OAAO,MAAMI,OAAOb,wBAAwBG,gBAAgB;AAE5D,OAAO,MAAMW,aAAab,+BAA+BY,MAAM;IAAET,UAAUL,aAAagB,YAAY;AAAC,GAAG;AAExG,OAAO,MAAMC,cAAcf,+BAA+BY,MAAM;IAAET,UAAUL,aAAakB,cAAc;AAAC,GAAG"}
@@ -1 +1 @@
1
- export { Fade, FadeRelaxed, FadeSnappy, createFadePresence } from './Fade';
1
+ export { Fade, FadeRelaxed, FadeSnappy } from './Fade';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Fade/index.ts"],"sourcesContent":["export { Fade, FadeRelaxed, FadeSnappy, createFadePresence } from './Fade';\n"],"names":["Fade","FadeRelaxed","FadeSnappy","createFadePresence"],"rangeMappings":"","mappings":"AAAA,SAASA,IAAI,EAAEC,WAAW,EAAEC,UAAU,EAAEC,kBAAkB,QAAQ,SAAS"}
1
+ {"version":3,"sources":["../src/components/Fade/index.ts"],"sourcesContent":["export { Fade, FadeRelaxed, FadeSnappy } from './Fade';\n"],"names":["Fade","FadeRelaxed","FadeSnappy"],"rangeMappings":"","mappings":"AAAA,SAASA,IAAI,EAAEC,WAAW,EAAEC,UAAU,QAAQ,SAAS"}
@@ -1,54 +1,53 @@
1
- import { motionTokens, createPresenceComponent } from '@fluentui/react-motion';
2
- /** Define a presence motion for scale in/out */ export const createScalePresence = ({ enterDuration = motionTokens.durationGentle, enterEasing = motionTokens.curveDecelerateMax, exitDuration = motionTokens.durationNormal, exitEasing = motionTokens.curveAccelerateMax } = {})=>({ animateOpacity = true })=>{
3
- const fromOpacity = animateOpacity ? 0 : 1;
4
- const toOpacity = 1;
5
- const fromScale = 0.9; // Could be a custom param in the future
6
- const toScale = 1;
7
- const enterKeyframes = [
8
- {
9
- opacity: fromOpacity,
10
- transform: `scale3d(${fromScale}, ${fromScale}, 1)`,
11
- visibility: 'visible'
12
- },
13
- {
14
- opacity: toOpacity,
15
- transform: `scale3d(${toScale}, ${toScale}, 1)`
16
- }
17
- ];
18
- const exitKeyframes = [
19
- {
20
- opacity: toOpacity,
21
- transform: `scale3d(${toScale}, ${toScale}, 1)`
22
- },
23
- {
24
- opacity: fromOpacity,
25
- transform: `scale3d(${fromScale}, ${fromScale}, 1)`,
26
- visibility: 'hidden'
27
- }
28
- ];
29
- return {
30
- enter: {
31
- duration: enterDuration,
32
- easing: enterEasing,
33
- keyframes: enterKeyframes
34
- },
35
- exit: {
36
- duration: exitDuration,
37
- easing: exitEasing,
38
- keyframes: exitKeyframes
39
- }
40
- };
1
+ import { motionTokens, createPresenceComponent, createPresenceComponentVariant } from '@fluentui/react-motion';
2
+ /** Define a presence motion for scale in/out */ const scalePresenceFn = ({ duration = motionTokens.durationNormal, easing = motionTokens.curveDecelerateMid, exitDuration = duration, exitEasing = motionTokens.curveAccelerateMid, fromScale = 0.9, animateOpacity = true })=>{
3
+ const fromOpacity = animateOpacity ? 0 : 1;
4
+ const toOpacity = 1;
5
+ const toScale = 1;
6
+ // TODO: use fadeAtom
7
+ // TODO: make scaleAtom
8
+ const enterKeyframes = [
9
+ {
10
+ opacity: fromOpacity,
11
+ transform: `scale3d(${fromScale}, ${fromScale}, 1)`,
12
+ visibility: 'visible'
13
+ },
14
+ {
15
+ opacity: toOpacity,
16
+ transform: `scale3d(${toScale}, ${toScale}, 1)`
17
+ }
18
+ ];
19
+ const exitKeyframes = [
20
+ {
21
+ opacity: toOpacity,
22
+ transform: `scale3d(${toScale}, ${toScale}, 1)`
23
+ },
24
+ {
25
+ opacity: fromOpacity,
26
+ transform: `scale3d(${fromScale}, ${fromScale}, 1)`,
27
+ visibility: 'hidden'
28
+ }
29
+ ];
30
+ return {
31
+ enter: {
32
+ duration,
33
+ easing,
34
+ keyframes: enterKeyframes
35
+ },
36
+ exit: {
37
+ duration: exitDuration,
38
+ easing: exitEasing,
39
+ keyframes: exitKeyframes
40
+ }
41
41
  };
42
- /** A React component that applies scale in/out transitions to its children. */ export const Scale = createPresenceComponent(createScalePresence());
43
- export const ScaleSnappy = createPresenceComponent(createScalePresence({
44
- enterDuration: motionTokens.durationNormal,
45
- enterEasing: motionTokens.curveDecelerateMax,
46
- exitDuration: motionTokens.durationFast,
42
+ };
43
+ /** A React component that applies scale in/out transitions to its children. */ export const Scale = createPresenceComponent(scalePresenceFn);
44
+ export const ScaleSnappy = createPresenceComponentVariant(Scale, {
45
+ duration: motionTokens.durationFast,
46
+ easing: motionTokens.curveDecelerateMax,
47
47
  exitEasing: motionTokens.curveAccelerateMax
48
- }));
49
- export const ScaleRelaxed = createPresenceComponent(createScalePresence({
50
- enterDuration: motionTokens.durationSlow,
51
- enterEasing: motionTokens.curveDecelerateMax,
52
- exitDuration: motionTokens.durationGentle,
53
- exitEasing: motionTokens.curveAccelerateMax
54
- }));
48
+ });
49
+ export const ScaleRelaxed = createPresenceComponentVariant(Scale, {
50
+ duration: motionTokens.durationGentle,
51
+ easing: motionTokens.curveDecelerateMid,
52
+ exitEasing: motionTokens.curveAccelerateMid
53
+ });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Scale/Scale.ts"],"sourcesContent":["import { motionTokens, createPresenceComponent } from '@fluentui/react-motion';\nimport { PresenceMotionFnCreator } from '../../types';\nimport { ScaleRuntimeParams_unstable, ScaleVariantParams_unstable } from './Scale.types';\n\n/** Define a presence motion for scale in/out */\nexport const createScalePresence: PresenceMotionFnCreator<ScaleVariantParams_unstable, ScaleRuntimeParams_unstable> =\n ({\n enterDuration = motionTokens.durationGentle,\n enterEasing = motionTokens.curveDecelerateMax,\n exitDuration = motionTokens.durationNormal,\n exitEasing = motionTokens.curveAccelerateMax,\n } = {}) =>\n ({ animateOpacity = true }) => {\n const fromOpacity = animateOpacity ? 0 : 1;\n const toOpacity = 1;\n const fromScale = 0.9; // Could be a custom param in the future\n const toScale = 1;\n\n const enterKeyframes = [\n { opacity: fromOpacity, transform: `scale3d(${fromScale}, ${fromScale}, 1)`, visibility: 'visible' },\n { opacity: toOpacity, transform: `scale3d(${toScale}, ${toScale}, 1)` },\n ];\n\n const exitKeyframes = [\n { opacity: toOpacity, transform: `scale3d(${toScale}, ${toScale}, 1)` },\n { opacity: fromOpacity, transform: `scale3d(${fromScale}, ${fromScale}, 1)`, visibility: 'hidden' },\n ];\n return {\n enter: {\n duration: enterDuration,\n easing: enterEasing,\n keyframes: enterKeyframes,\n },\n exit: { duration: exitDuration, easing: exitEasing, keyframes: exitKeyframes },\n };\n };\n\n/** A React component that applies scale in/out transitions to its children. */\nexport const Scale = createPresenceComponent(createScalePresence());\n\nexport const ScaleSnappy = createPresenceComponent(\n createScalePresence({\n enterDuration: motionTokens.durationNormal,\n enterEasing: motionTokens.curveDecelerateMax,\n exitDuration: motionTokens.durationFast,\n exitEasing: motionTokens.curveAccelerateMax,\n }),\n);\n\nexport const ScaleRelaxed = createPresenceComponent(\n createScalePresence({\n enterDuration: motionTokens.durationSlow,\n enterEasing: motionTokens.curveDecelerateMax,\n exitDuration: motionTokens.durationGentle,\n exitEasing: motionTokens.curveAccelerateMax,\n }),\n);\n"],"names":["motionTokens","createPresenceComponent","createScalePresence","enterDuration","durationGentle","enterEasing","curveDecelerateMax","exitDuration","durationNormal","exitEasing","curveAccelerateMax","animateOpacity","fromOpacity","toOpacity","fromScale","toScale","enterKeyframes","opacity","transform","visibility","exitKeyframes","enter","duration","easing","keyframes","exit","Scale","ScaleSnappy","durationFast","ScaleRelaxed","durationSlow"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,YAAY,EAAEC,uBAAuB,QAAQ,yBAAyB;AAI/E,8CAA8C,GAC9C,OAAO,MAAMC,sBACX,CAAC,EACCC,gBAAgBH,aAAaI,cAAc,EAC3CC,cAAcL,aAAaM,kBAAkB,EAC7CC,eAAeP,aAAaQ,cAAc,EAC1CC,aAAaT,aAAaU,kBAAkB,EAC7C,GAAG,CAAC,CAAC,GACN,CAAC,EAAEC,iBAAiB,IAAI,EAAE;QACxB,MAAMC,cAAcD,iBAAiB,IAAI;QACzC,MAAME,YAAY;QAClB,MAAMC,YAAY,KAAK,wCAAwC;QAC/D,MAAMC,UAAU;QAEhB,MAAMC,iBAAiB;YACrB;gBAAEC,SAASL;gBAAaM,WAAW,CAAC,QAAQ,EAAEJ,UAAU,EAAE,EAAEA,UAAU,IAAI,CAAC;gBAAEK,YAAY;YAAU;YACnG;gBAAEF,SAASJ;gBAAWK,WAAW,CAAC,QAAQ,EAAEH,QAAQ,EAAE,EAAEA,QAAQ,IAAI,CAAC;YAAC;SACvE;QAED,MAAMK,gBAAgB;YACpB;gBAAEH,SAASJ;gBAAWK,WAAW,CAAC,QAAQ,EAAEH,QAAQ,EAAE,EAAEA,QAAQ,IAAI,CAAC;YAAC;YACtE;gBAAEE,SAASL;gBAAaM,WAAW,CAAC,QAAQ,EAAEJ,UAAU,EAAE,EAAEA,UAAU,IAAI,CAAC;gBAAEK,YAAY;YAAS;SACnG;QACD,OAAO;YACLE,OAAO;gBACLC,UAAUnB;gBACVoB,QAAQlB;gBACRmB,WAAWR;YACb;YACAS,MAAM;gBAAEH,UAAUf;gBAAcgB,QAAQd;gBAAYe,WAAWJ;YAAc;QAC/E;IACF,EAAE;AAEJ,6EAA6E,GAC7E,OAAO,MAAMM,QAAQzB,wBAAwBC,uBAAuB;AAEpE,OAAO,MAAMyB,cAAc1B,wBACzBC,oBAAoB;IAClBC,eAAeH,aAAaQ,cAAc;IAC1CH,aAAaL,aAAaM,kBAAkB;IAC5CC,cAAcP,aAAa4B,YAAY;IACvCnB,YAAYT,aAAaU,kBAAkB;AAC7C,IACA;AAEF,OAAO,MAAMmB,eAAe5B,wBAC1BC,oBAAoB;IAClBC,eAAeH,aAAa8B,YAAY;IACxCzB,aAAaL,aAAaM,kBAAkB;IAC5CC,cAAcP,aAAaI,cAAc;IACzCK,YAAYT,aAAaU,kBAAkB;AAC7C,IACA"}
1
+ {"version":3,"sources":["../src/components/Scale/Scale.ts"],"sourcesContent":["import {\n motionTokens,\n createPresenceComponent,\n PresenceMotionFn,\n createPresenceComponentVariant,\n} from '@fluentui/react-motion';\n\ntype ScaleVariantParams = {\n /** Time (ms) for the enter transition (scale-in). Defaults to the `durationNormal` value (200 ms). */\n duration?: number;\n\n /** Easing curve for the enter transition (scale-in). Defaults to the `curveDecelerateMid` value. */\n easing?: string;\n\n /** Time (ms) for the exit transition (scale-out). Defaults to the `duration` param for symmetry. */\n exitDuration?: number;\n\n /** Easing curve for the exit transition (scale-out). Defaults to the `curveAccelerateMid` value. */\n exitEasing?: string;\n\n /** The scale value to animate from. Defaults to `0.9`. */\n fromScale?: number;\n\n /** Whether to animate the opacity. Defaults to `true`. */\n animateOpacity?: boolean;\n};\n\n/** Define a presence motion for scale in/out */\nconst scalePresenceFn: PresenceMotionFn<ScaleVariantParams> = ({\n duration = motionTokens.durationNormal,\n easing = motionTokens.curveDecelerateMid,\n exitDuration = duration,\n exitEasing = motionTokens.curveAccelerateMid,\n fromScale = 0.9,\n animateOpacity = true,\n}) => {\n const fromOpacity = animateOpacity ? 0 : 1;\n const toOpacity = 1;\n const toScale = 1;\n\n // TODO: use fadeAtom\n // TODO: make scaleAtom\n const enterKeyframes = [\n { opacity: fromOpacity, transform: `scale3d(${fromScale}, ${fromScale}, 1)`, visibility: 'visible' },\n { opacity: toOpacity, transform: `scale3d(${toScale}, ${toScale}, 1)` },\n ];\n\n const exitKeyframes = [\n { opacity: toOpacity, transform: `scale3d(${toScale}, ${toScale}, 1)` },\n { opacity: fromOpacity, transform: `scale3d(${fromScale}, ${fromScale}, 1)`, visibility: 'hidden' },\n ];\n\n return {\n enter: {\n duration,\n easing,\n keyframes: enterKeyframes,\n },\n exit: { duration: exitDuration, easing: exitEasing, keyframes: exitKeyframes },\n };\n};\n\n/** A React component that applies scale in/out transitions to its children. */\nexport const Scale = createPresenceComponent(scalePresenceFn);\n\nexport const ScaleSnappy = createPresenceComponentVariant(Scale, {\n duration: motionTokens.durationFast,\n easing: motionTokens.curveDecelerateMax,\n exitEasing: motionTokens.curveAccelerateMax,\n});\n\nexport const ScaleRelaxed = createPresenceComponentVariant(Scale, {\n duration: motionTokens.durationGentle,\n easing: motionTokens.curveDecelerateMid,\n exitEasing: motionTokens.curveAccelerateMid,\n});\n"],"names":["motionTokens","createPresenceComponent","createPresenceComponentVariant","scalePresenceFn","duration","durationNormal","easing","curveDecelerateMid","exitDuration","exitEasing","curveAccelerateMid","fromScale","animateOpacity","fromOpacity","toOpacity","toScale","enterKeyframes","opacity","transform","visibility","exitKeyframes","enter","keyframes","exit","Scale","ScaleSnappy","durationFast","curveDecelerateMax","curveAccelerateMax","ScaleRelaxed","durationGentle"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,YAAY,EACZC,uBAAuB,EAEvBC,8BAA8B,QACzB,yBAAyB;AAsBhC,8CAA8C,GAC9C,MAAMC,kBAAwD,CAAC,EAC7DC,WAAWJ,aAAaK,cAAc,EACtCC,SAASN,aAAaO,kBAAkB,EACxCC,eAAeJ,QAAQ,EACvBK,aAAaT,aAAaU,kBAAkB,EAC5CC,YAAY,GAAG,EACfC,iBAAiB,IAAI,EACtB;IACC,MAAMC,cAAcD,iBAAiB,IAAI;IACzC,MAAME,YAAY;IAClB,MAAMC,UAAU;IAEhB,qBAAqB;IACrB,uBAAuB;IACvB,MAAMC,iBAAiB;QACrB;YAAEC,SAASJ;YAAaK,WAAW,CAAC,QAAQ,EAAEP,UAAU,EAAE,EAAEA,UAAU,IAAI,CAAC;YAAEQ,YAAY;QAAU;QACnG;YAAEF,SAASH;YAAWI,WAAW,CAAC,QAAQ,EAAEH,QAAQ,EAAE,EAAEA,QAAQ,IAAI,CAAC;QAAC;KACvE;IAED,MAAMK,gBAAgB;QACpB;YAAEH,SAASH;YAAWI,WAAW,CAAC,QAAQ,EAAEH,QAAQ,EAAE,EAAEA,QAAQ,IAAI,CAAC;QAAC;QACtE;YAAEE,SAASJ;YAAaK,WAAW,CAAC,QAAQ,EAAEP,UAAU,EAAE,EAAEA,UAAU,IAAI,CAAC;YAAEQ,YAAY;QAAS;KACnG;IAED,OAAO;QACLE,OAAO;YACLjB;YACAE;YACAgB,WAAWN;QACb;QACAO,MAAM;YAAEnB,UAAUI;YAAcF,QAAQG;YAAYa,WAAWF;QAAc;IAC/E;AACF;AAEA,6EAA6E,GAC7E,OAAO,MAAMI,QAAQvB,wBAAwBE,iBAAiB;AAE9D,OAAO,MAAMsB,cAAcvB,+BAA+BsB,OAAO;IAC/DpB,UAAUJ,aAAa0B,YAAY;IACnCpB,QAAQN,aAAa2B,kBAAkB;IACvClB,YAAYT,aAAa4B,kBAAkB;AAC7C,GAAG;AAEH,OAAO,MAAMC,eAAe3B,+BAA+BsB,OAAO;IAChEpB,UAAUJ,aAAa8B,cAAc;IACrCxB,QAAQN,aAAaO,kBAAkB;IACvCE,YAAYT,aAAaU,kBAAkB;AAC7C,GAAG"}
@@ -1 +1 @@
1
- export { Scale, ScaleRelaxed, ScaleSnappy, createScalePresence } from './Scale';
1
+ export { Scale, ScaleRelaxed, ScaleSnappy } from './Scale';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Scale/index.ts"],"sourcesContent":["export { Scale, ScaleRelaxed, ScaleSnappy, createScalePresence } from './Scale';\n"],"names":["Scale","ScaleRelaxed","ScaleSnappy","createScalePresence"],"rangeMappings":"","mappings":"AAAA,SAASA,KAAK,EAAEC,YAAY,EAAEC,WAAW,EAAEC,mBAAmB,QAAQ,UAAU"}
1
+ {"version":3,"sources":["../src/components/Scale/index.ts"],"sourcesContent":["export { Scale, ScaleRelaxed, ScaleSnappy } from './Scale';\n"],"names":["Scale","ScaleRelaxed","ScaleSnappy"],"rangeMappings":"","mappings":"AAAA,SAASA,KAAK,EAAEC,YAAY,EAAEC,WAAW,QAAQ,UAAU"}
package/lib/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export { Collapse, CollapseSnappy, CollapseRelaxed, CollapseDelayed, createCollapsePresence, createCollapseDelayedPresence } from './components/Collapse';
2
- export { Fade, FadeSnappy, FadeRelaxed, createFadePresence } from './components/Fade';
3
- export { Scale, ScaleSnappy, ScaleRelaxed, createScalePresence } from './components/Scale';
2
+ export { Fade, FadeSnappy, FadeRelaxed } from './components/Fade';
3
+ export { Scale, ScaleSnappy, ScaleRelaxed } from './components/Scale';
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 createCollapsePresence,\n createCollapseDelayedPresence,\n} from './components/Collapse';\nexport type { CollapseRuntimeParams } from './components/Collapse';\nexport { Fade, FadeSnappy, FadeRelaxed, createFadePresence } from './components/Fade';\nexport { Scale, ScaleSnappy, ScaleRelaxed, createScalePresence } from './components/Scale';\n"],"names":["Collapse","CollapseSnappy","CollapseRelaxed","CollapseDelayed","createCollapsePresence","createCollapseDelayedPresence","Fade","FadeSnappy","FadeRelaxed","createFadePresence","Scale","ScaleSnappy","ScaleRelaxed","createScalePresence"],"rangeMappings":";;","mappings":"AAAA,SACEA,QAAQ,EACRC,cAAc,EACdC,eAAe,EACfC,eAAe,EACfC,sBAAsB,EACtBC,6BAA6B,QACxB,wBAAwB;AAE/B,SAASC,IAAI,EAAEC,UAAU,EAAEC,WAAW,EAAEC,kBAAkB,QAAQ,oBAAoB;AACtF,SAASC,KAAK,EAAEC,WAAW,EAAEC,YAAY,EAAEC,mBAAmB,QAAQ,qBAAqB"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n Collapse,\n CollapseSnappy,\n CollapseRelaxed,\n CollapseDelayed,\n createCollapsePresence,\n createCollapseDelayedPresence,\n} from './components/Collapse';\nexport type { CollapseRuntimeParams } from './components/Collapse';\nexport { Fade, FadeSnappy, FadeRelaxed } from './components/Fade';\nexport { Scale, ScaleSnappy, ScaleRelaxed } from './components/Scale';\n"],"names":["Collapse","CollapseSnappy","CollapseRelaxed","CollapseDelayed","createCollapsePresence","createCollapseDelayedPresence","Fade","FadeSnappy","FadeRelaxed","Scale","ScaleSnappy","ScaleRelaxed"],"rangeMappings":";;","mappings":"AAAA,SACEA,QAAQ,EACRC,cAAc,EACdC,eAAe,EACfC,eAAe,EACfC,sBAAsB,EACtBC,6BAA6B,QACxB,wBAAwB;AAE/B,SAASC,IAAI,EAAEC,UAAU,EAAEC,WAAW,QAAQ,oBAAoB;AAClE,SAASC,KAAK,EAAEC,WAAW,EAAEC,YAAY,QAAQ,qBAAqB"}
@@ -18,28 +18,30 @@ _export(exports, {
18
18
  FadeSnappy: function() {
19
19
  return FadeSnappy;
20
20
  },
21
- createFadePresence: function() {
22
- return createFadePresence;
21
+ fadePresenceFn: function() {
22
+ return fadePresenceFn;
23
23
  }
24
24
  });
25
25
  const _reactmotion = require("@fluentui/react-motion");
26
26
  const _fadeatom = require("../../atoms/fade-atom");
27
- const createFadePresence = ({ enterDuration = _reactmotion.motionTokens.durationNormal, enterEasing = _reactmotion.motionTokens.curveEasyEase, exitDuration = enterDuration, exitEasing = enterEasing } = {})=>({
27
+ const fadePresenceFn = ({ duration = _reactmotion.motionTokens.durationNormal, easing = _reactmotion.motionTokens.curveEasyEase, exitDuration = duration, exitEasing = easing })=>{
28
+ return {
28
29
  enter: (0, _fadeatom.fadeAtom)({
29
30
  direction: 'enter',
30
- duration: enterDuration,
31
- easing: enterEasing
31
+ duration,
32
+ easing
32
33
  }),
33
34
  exit: (0, _fadeatom.fadeAtom)({
34
35
  direction: 'exit',
35
36
  duration: exitDuration,
36
37
  easing: exitEasing
37
38
  })
38
- });
39
- const Fade = (0, _reactmotion.createPresenceComponent)(createFadePresence());
40
- const FadeSnappy = (0, _reactmotion.createPresenceComponent)(createFadePresence({
41
- enterDuration: _reactmotion.motionTokens.durationFast
42
- }));
43
- const FadeRelaxed = (0, _reactmotion.createPresenceComponent)(createFadePresence({
44
- enterDuration: _reactmotion.motionTokens.durationGentle
45
- }));
39
+ };
40
+ };
41
+ const Fade = (0, _reactmotion.createPresenceComponent)(fadePresenceFn);
42
+ const FadeSnappy = (0, _reactmotion.createPresenceComponentVariant)(Fade, {
43
+ duration: _reactmotion.motionTokens.durationFast
44
+ });
45
+ const FadeRelaxed = (0, _reactmotion.createPresenceComponentVariant)(Fade, {
46
+ duration: _reactmotion.motionTokens.durationGentle
47
+ });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Fade/Fade.ts"],"sourcesContent":["import { motionTokens, createPresenceComponent } from '@fluentui/react-motion';\nimport type { PresenceMotionCreator } from '../../types';\nimport { fadeAtom } from '../../atoms/fade-atom';\n\ntype FadeVariantParams = {\n /** Time (ms) for the enter transition (fade-in). Defaults to the `durationNormal` value (200 ms). */\n enterDuration?: number;\n\n /** Easing curve for the enter transition (fade-in). Defaults to the `easeEase` value. */\n enterEasing?: string;\n\n /** Time (ms) for the exit transition (fade-out). Defaults to the `enterDuration` param for symmetry. */\n exitDuration?: number;\n\n /** Easing curve for the exit transition (fade-out). Defaults to the `enterEasing` param for symmetry. */\n exitEasing?: string;\n};\n\n/** Define a presence motion for fade in/out */\nexport const createFadePresence: PresenceMotionCreator<FadeVariantParams> = ({\n enterDuration = motionTokens.durationNormal,\n enterEasing = motionTokens.curveEasyEase,\n exitDuration = enterDuration,\n exitEasing = enterEasing,\n} = {}) => ({\n enter: fadeAtom({ direction: 'enter', duration: enterDuration, easing: enterEasing }),\n exit: fadeAtom({ direction: 'exit', duration: exitDuration, easing: exitEasing }),\n});\n\n/** A React component that applies fade in/out transitions to its children. */\nexport const Fade = createPresenceComponent(createFadePresence());\n\nexport const FadeSnappy = createPresenceComponent(createFadePresence({ enterDuration: motionTokens.durationFast }));\n\nexport const FadeRelaxed = createPresenceComponent(createFadePresence({ enterDuration: motionTokens.durationGentle }));\n"],"names":["Fade","FadeRelaxed","FadeSnappy","createFadePresence","enterDuration","motionTokens","durationNormal","enterEasing","curveEasyEase","exitDuration","exitEasing","enter","fadeAtom","direction","duration","easing","exit","createPresenceComponent","durationFast","durationGentle"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IA8BaA,IAAI;eAAJA;;IAIAC,WAAW;eAAXA;;IAFAC,UAAU;eAAVA;;IAbAC,kBAAkB;eAAlBA;;;6BAnByC;0BAE7B;AAiBlB,MAAMA,qBAA+D,CAAC,EAC3EC,gBAAgBC,yBAAY,CAACC,cAAc,EAC3CC,cAAcF,yBAAY,CAACG,aAAa,EACxCC,eAAeL,aAAa,EAC5BM,aAAaH,WAAW,EACzB,GAAG,CAAC,CAAC,GAAM,CAAA;QACVI,OAAOC,IAAAA,kBAAQ,EAAC;YAAEC,WAAW;YAASC,UAAUV;YAAeW,QAAQR;QAAY;QACnFS,MAAMJ,IAAAA,kBAAQ,EAAC;YAAEC,WAAW;YAAQC,UAAUL;YAAcM,QAAQL;QAAW;IACjF,CAAA;AAGO,MAAMV,OAAOiB,IAAAA,oCAAuB,EAACd;AAErC,MAAMD,aAAae,IAAAA,oCAAuB,EAACd,mBAAmB;IAAEC,eAAeC,yBAAY,CAACa,YAAY;AAAC;AAEzG,MAAMjB,cAAcgB,IAAAA,oCAAuB,EAACd,mBAAmB;IAAEC,eAAeC,yBAAY,CAACc,cAAc;AAAC"}
1
+ {"version":3,"sources":["../src/components/Fade/Fade.ts"],"sourcesContent":["import {\n motionTokens,\n createPresenceComponent,\n PresenceMotionFn,\n createPresenceComponentVariant,\n} from '@fluentui/react-motion';\nimport { fadeAtom } from '../../atoms/fade-atom';\n\ntype FadeVariantParams = {\n /** Time (ms) for the enter transition (fade-in). Defaults to the `durationNormal` value (200 ms). */\n duration?: number;\n\n /** Easing curve for the enter transition (fade-in). Defaults to the `curveEasyEase` value. */\n easing?: string;\n\n /** Time (ms) for the exit transition (fade-out). Defaults to the `duration` param for symmetry. */\n exitDuration?: number;\n\n /** Easing curve for the exit transition (fade-out). Defaults to the `easing` param for symmetry. */\n exitEasing?: string;\n};\n\n/** Define a presence motion for fade in/out */\nexport const fadePresenceFn: PresenceMotionFn<FadeVariantParams> = ({\n duration = motionTokens.durationNormal,\n easing = motionTokens.curveEasyEase,\n exitDuration = duration,\n exitEasing = easing,\n}) => {\n return {\n enter: fadeAtom({ direction: 'enter', duration, easing }),\n exit: fadeAtom({ direction: 'exit', duration: exitDuration, easing: exitEasing }),\n };\n};\n\n/** A React component that applies fade in/out transitions to its children. */\nexport const Fade = createPresenceComponent(fadePresenceFn);\n\nexport const FadeSnappy = createPresenceComponentVariant(Fade, { duration: motionTokens.durationFast });\n\nexport const FadeRelaxed = createPresenceComponentVariant(Fade, { duration: motionTokens.durationGentle });\n"],"names":["Fade","FadeRelaxed","FadeSnappy","fadePresenceFn","duration","motionTokens","durationNormal","easing","curveEasyEase","exitDuration","exitEasing","enter","fadeAtom","direction","exit","createPresenceComponent","createPresenceComponentVariant","durationFast","durationGentle"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAoCaA,IAAI;eAAJA;;IAIAC,WAAW;eAAXA;;IAFAC,UAAU;eAAVA;;IAfAC,cAAc;eAAdA;;;6BAlBN;0BACkB;AAiBlB,MAAMA,iBAAsD,CAAC,EAClEC,WAAWC,yBAAY,CAACC,cAAc,EACtCC,SAASF,yBAAY,CAACG,aAAa,EACnCC,eAAeL,QAAQ,EACvBM,aAAaH,MAAM,EACpB;IACC,OAAO;QACLI,OAAOC,IAAAA,kBAAQ,EAAC;YAAEC,WAAW;YAAST;YAAUG;QAAO;QACvDO,MAAMF,IAAAA,kBAAQ,EAAC;YAAEC,WAAW;YAAQT,UAAUK;YAAcF,QAAQG;QAAW;IACjF;AACF;AAGO,MAAMV,OAAOe,IAAAA,oCAAuB,EAACZ;AAErC,MAAMD,aAAac,IAAAA,2CAA8B,EAAChB,MAAM;IAAEI,UAAUC,yBAAY,CAACY,YAAY;AAAC;AAE9F,MAAMhB,cAAce,IAAAA,2CAA8B,EAAChB,MAAM;IAAEI,UAAUC,yBAAY,CAACa,cAAc;AAAC"}
@@ -17,9 +17,6 @@ _export(exports, {
17
17
  },
18
18
  FadeSnappy: function() {
19
19
  return _Fade.FadeSnappy;
20
- },
21
- createFadePresence: function() {
22
- return _Fade.createFadePresence;
23
20
  }
24
21
  });
25
22
  const _Fade = require("./Fade");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Fade/index.ts"],"sourcesContent":["export { Fade, FadeRelaxed, FadeSnappy, createFadePresence } from './Fade';\n"],"names":["Fade","FadeRelaxed","FadeSnappy","createFadePresence"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,IAAI;eAAJA,UAAI;;IAAEC,WAAW;eAAXA,iBAAW;;IAAEC,UAAU;eAAVA,gBAAU;;IAAEC,kBAAkB;eAAlBA,wBAAkB;;;sBAAQ"}
1
+ {"version":3,"sources":["../src/components/Fade/index.ts"],"sourcesContent":["export { Fade, FadeRelaxed, FadeSnappy } from './Fade';\n"],"names":["Fade","FadeRelaxed","FadeSnappy"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,IAAI;eAAJA,UAAI;;IAAEC,WAAW;eAAXA,iBAAW;;IAAEC,UAAU;eAAVA,gBAAU;;;sBAAQ"}
@@ -17,62 +17,58 @@ _export(exports, {
17
17
  },
18
18
  ScaleSnappy: function() {
19
19
  return ScaleSnappy;
20
- },
21
- createScalePresence: function() {
22
- return createScalePresence;
23
20
  }
24
21
  });
25
22
  const _reactmotion = require("@fluentui/react-motion");
26
- const createScalePresence = ({ enterDuration = _reactmotion.motionTokens.durationGentle, enterEasing = _reactmotion.motionTokens.curveDecelerateMax, exitDuration = _reactmotion.motionTokens.durationNormal, exitEasing = _reactmotion.motionTokens.curveAccelerateMax } = {})=>({ animateOpacity = true })=>{
27
- const fromOpacity = animateOpacity ? 0 : 1;
28
- const toOpacity = 1;
29
- const fromScale = 0.9; // Could be a custom param in the future
30
- const toScale = 1;
31
- const enterKeyframes = [
32
- {
33
- opacity: fromOpacity,
34
- transform: `scale3d(${fromScale}, ${fromScale}, 1)`,
35
- visibility: 'visible'
36
- },
37
- {
38
- opacity: toOpacity,
39
- transform: `scale3d(${toScale}, ${toScale}, 1)`
40
- }
41
- ];
42
- const exitKeyframes = [
43
- {
44
- opacity: toOpacity,
45
- transform: `scale3d(${toScale}, ${toScale}, 1)`
46
- },
47
- {
48
- opacity: fromOpacity,
49
- transform: `scale3d(${fromScale}, ${fromScale}, 1)`,
50
- visibility: 'hidden'
51
- }
52
- ];
53
- return {
54
- enter: {
55
- duration: enterDuration,
56
- easing: enterEasing,
57
- keyframes: enterKeyframes
58
- },
59
- exit: {
60
- duration: exitDuration,
61
- easing: exitEasing,
62
- keyframes: exitKeyframes
63
- }
64
- };
23
+ /** Define a presence motion for scale in/out */ const scalePresenceFn = ({ duration = _reactmotion.motionTokens.durationNormal, easing = _reactmotion.motionTokens.curveDecelerateMid, exitDuration = duration, exitEasing = _reactmotion.motionTokens.curveAccelerateMid, fromScale = 0.9, animateOpacity = true })=>{
24
+ const fromOpacity = animateOpacity ? 0 : 1;
25
+ const toOpacity = 1;
26
+ const toScale = 1;
27
+ // TODO: use fadeAtom
28
+ // TODO: make scaleAtom
29
+ const enterKeyframes = [
30
+ {
31
+ opacity: fromOpacity,
32
+ transform: `scale3d(${fromScale}, ${fromScale}, 1)`,
33
+ visibility: 'visible'
34
+ },
35
+ {
36
+ opacity: toOpacity,
37
+ transform: `scale3d(${toScale}, ${toScale}, 1)`
38
+ }
39
+ ];
40
+ const exitKeyframes = [
41
+ {
42
+ opacity: toOpacity,
43
+ transform: `scale3d(${toScale}, ${toScale}, 1)`
44
+ },
45
+ {
46
+ opacity: fromOpacity,
47
+ transform: `scale3d(${fromScale}, ${fromScale}, 1)`,
48
+ visibility: 'hidden'
49
+ }
50
+ ];
51
+ return {
52
+ enter: {
53
+ duration,
54
+ easing,
55
+ keyframes: enterKeyframes
56
+ },
57
+ exit: {
58
+ duration: exitDuration,
59
+ easing: exitEasing,
60
+ keyframes: exitKeyframes
61
+ }
65
62
  };
66
- const Scale = (0, _reactmotion.createPresenceComponent)(createScalePresence());
67
- const ScaleSnappy = (0, _reactmotion.createPresenceComponent)(createScalePresence({
68
- enterDuration: _reactmotion.motionTokens.durationNormal,
69
- enterEasing: _reactmotion.motionTokens.curveDecelerateMax,
70
- exitDuration: _reactmotion.motionTokens.durationFast,
71
- exitEasing: _reactmotion.motionTokens.curveAccelerateMax
72
- }));
73
- const ScaleRelaxed = (0, _reactmotion.createPresenceComponent)(createScalePresence({
74
- enterDuration: _reactmotion.motionTokens.durationSlow,
75
- enterEasing: _reactmotion.motionTokens.curveDecelerateMax,
76
- exitDuration: _reactmotion.motionTokens.durationGentle,
63
+ };
64
+ const Scale = (0, _reactmotion.createPresenceComponent)(scalePresenceFn);
65
+ const ScaleSnappy = (0, _reactmotion.createPresenceComponentVariant)(Scale, {
66
+ duration: _reactmotion.motionTokens.durationFast,
67
+ easing: _reactmotion.motionTokens.curveDecelerateMax,
77
68
  exitEasing: _reactmotion.motionTokens.curveAccelerateMax
78
- }));
69
+ });
70
+ const ScaleRelaxed = (0, _reactmotion.createPresenceComponentVariant)(Scale, {
71
+ duration: _reactmotion.motionTokens.durationGentle,
72
+ easing: _reactmotion.motionTokens.curveDecelerateMid,
73
+ exitEasing: _reactmotion.motionTokens.curveAccelerateMid
74
+ });
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Scale/Scale.ts"],"sourcesContent":["import { motionTokens, createPresenceComponent } from '@fluentui/react-motion';\nimport { PresenceMotionFnCreator } from '../../types';\nimport { ScaleRuntimeParams_unstable, ScaleVariantParams_unstable } from './Scale.types';\n\n/** Define a presence motion for scale in/out */\nexport const createScalePresence: PresenceMotionFnCreator<ScaleVariantParams_unstable, ScaleRuntimeParams_unstable> =\n ({\n enterDuration = motionTokens.durationGentle,\n enterEasing = motionTokens.curveDecelerateMax,\n exitDuration = motionTokens.durationNormal,\n exitEasing = motionTokens.curveAccelerateMax,\n } = {}) =>\n ({ animateOpacity = true }) => {\n const fromOpacity = animateOpacity ? 0 : 1;\n const toOpacity = 1;\n const fromScale = 0.9; // Could be a custom param in the future\n const toScale = 1;\n\n const enterKeyframes = [\n { opacity: fromOpacity, transform: `scale3d(${fromScale}, ${fromScale}, 1)`, visibility: 'visible' },\n { opacity: toOpacity, transform: `scale3d(${toScale}, ${toScale}, 1)` },\n ];\n\n const exitKeyframes = [\n { opacity: toOpacity, transform: `scale3d(${toScale}, ${toScale}, 1)` },\n { opacity: fromOpacity, transform: `scale3d(${fromScale}, ${fromScale}, 1)`, visibility: 'hidden' },\n ];\n return {\n enter: {\n duration: enterDuration,\n easing: enterEasing,\n keyframes: enterKeyframes,\n },\n exit: { duration: exitDuration, easing: exitEasing, keyframes: exitKeyframes },\n };\n };\n\n/** A React component that applies scale in/out transitions to its children. */\nexport const Scale = createPresenceComponent(createScalePresence());\n\nexport const ScaleSnappy = createPresenceComponent(\n createScalePresence({\n enterDuration: motionTokens.durationNormal,\n enterEasing: motionTokens.curveDecelerateMax,\n exitDuration: motionTokens.durationFast,\n exitEasing: motionTokens.curveAccelerateMax,\n }),\n);\n\nexport const ScaleRelaxed = createPresenceComponent(\n createScalePresence({\n enterDuration: motionTokens.durationSlow,\n enterEasing: motionTokens.curveDecelerateMax,\n exitDuration: motionTokens.durationGentle,\n exitEasing: motionTokens.curveAccelerateMax,\n }),\n);\n"],"names":["Scale","ScaleRelaxed","ScaleSnappy","createScalePresence","enterDuration","motionTokens","durationGentle","enterEasing","curveDecelerateMax","exitDuration","durationNormal","exitEasing","curveAccelerateMax","animateOpacity","fromOpacity","toOpacity","fromScale","toScale","enterKeyframes","opacity","transform","visibility","exitKeyframes","enter","duration","easing","keyframes","exit","createPresenceComponent","durationFast","durationSlow"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAsCaA,KAAK;eAALA;;IAWAC,YAAY;eAAZA;;IATAC,WAAW;eAAXA;;IAnCAC,mBAAmB;eAAnBA;;;6BALyC;AAK/C,MAAMA,sBACX,CAAC,EACCC,gBAAgBC,yBAAY,CAACC,cAAc,EAC3CC,cAAcF,yBAAY,CAACG,kBAAkB,EAC7CC,eAAeJ,yBAAY,CAACK,cAAc,EAC1CC,aAAaN,yBAAY,CAACO,kBAAkB,EAC7C,GAAG,CAAC,CAAC,GACN,CAAC,EAAEC,iBAAiB,IAAI,EAAE;QACxB,MAAMC,cAAcD,iBAAiB,IAAI;QACzC,MAAME,YAAY;QAClB,MAAMC,YAAY,KAAK,wCAAwC;QAC/D,MAAMC,UAAU;QAEhB,MAAMC,iBAAiB;YACrB;gBAAEC,SAASL;gBAAaM,WAAW,CAAC,QAAQ,EAAEJ,UAAU,EAAE,EAAEA,UAAU,IAAI,CAAC;gBAAEK,YAAY;YAAU;YACnG;gBAAEF,SAASJ;gBAAWK,WAAW,CAAC,QAAQ,EAAEH,QAAQ,EAAE,EAAEA,QAAQ,IAAI,CAAC;YAAC;SACvE;QAED,MAAMK,gBAAgB;YACpB;gBAAEH,SAASJ;gBAAWK,WAAW,CAAC,QAAQ,EAAEH,QAAQ,EAAE,EAAEA,QAAQ,IAAI,CAAC;YAAC;YACtE;gBAAEE,SAASL;gBAAaM,WAAW,CAAC,QAAQ,EAAEJ,UAAU,EAAE,EAAEA,UAAU,IAAI,CAAC;gBAAEK,YAAY;YAAS;SACnG;QACD,OAAO;YACLE,OAAO;gBACLC,UAAUpB;gBACVqB,QAAQlB;gBACRmB,WAAWR;YACb;YACAS,MAAM;gBAAEH,UAAUf;gBAAcgB,QAAQd;gBAAYe,WAAWJ;YAAc;QAC/E;IACF;AAGK,MAAMtB,QAAQ4B,IAAAA,oCAAuB,EAACzB;AAEtC,MAAMD,cAAc0B,IAAAA,oCAAuB,EAChDzB,oBAAoB;IAClBC,eAAeC,yBAAY,CAACK,cAAc;IAC1CH,aAAaF,yBAAY,CAACG,kBAAkB;IAC5CC,cAAcJ,yBAAY,CAACwB,YAAY;IACvClB,YAAYN,yBAAY,CAACO,kBAAkB;AAC7C;AAGK,MAAMX,eAAe2B,IAAAA,oCAAuB,EACjDzB,oBAAoB;IAClBC,eAAeC,yBAAY,CAACyB,YAAY;IACxCvB,aAAaF,yBAAY,CAACG,kBAAkB;IAC5CC,cAAcJ,yBAAY,CAACC,cAAc;IACzCK,YAAYN,yBAAY,CAACO,kBAAkB;AAC7C"}
1
+ {"version":3,"sources":["../src/components/Scale/Scale.ts"],"sourcesContent":["import {\n motionTokens,\n createPresenceComponent,\n PresenceMotionFn,\n createPresenceComponentVariant,\n} from '@fluentui/react-motion';\n\ntype ScaleVariantParams = {\n /** Time (ms) for the enter transition (scale-in). Defaults to the `durationNormal` value (200 ms). */\n duration?: number;\n\n /** Easing curve for the enter transition (scale-in). Defaults to the `curveDecelerateMid` value. */\n easing?: string;\n\n /** Time (ms) for the exit transition (scale-out). Defaults to the `duration` param for symmetry. */\n exitDuration?: number;\n\n /** Easing curve for the exit transition (scale-out). Defaults to the `curveAccelerateMid` value. */\n exitEasing?: string;\n\n /** The scale value to animate from. Defaults to `0.9`. */\n fromScale?: number;\n\n /** Whether to animate the opacity. Defaults to `true`. */\n animateOpacity?: boolean;\n};\n\n/** Define a presence motion for scale in/out */\nconst scalePresenceFn: PresenceMotionFn<ScaleVariantParams> = ({\n duration = motionTokens.durationNormal,\n easing = motionTokens.curveDecelerateMid,\n exitDuration = duration,\n exitEasing = motionTokens.curveAccelerateMid,\n fromScale = 0.9,\n animateOpacity = true,\n}) => {\n const fromOpacity = animateOpacity ? 0 : 1;\n const toOpacity = 1;\n const toScale = 1;\n\n // TODO: use fadeAtom\n // TODO: make scaleAtom\n const enterKeyframes = [\n { opacity: fromOpacity, transform: `scale3d(${fromScale}, ${fromScale}, 1)`, visibility: 'visible' },\n { opacity: toOpacity, transform: `scale3d(${toScale}, ${toScale}, 1)` },\n ];\n\n const exitKeyframes = [\n { opacity: toOpacity, transform: `scale3d(${toScale}, ${toScale}, 1)` },\n { opacity: fromOpacity, transform: `scale3d(${fromScale}, ${fromScale}, 1)`, visibility: 'hidden' },\n ];\n\n return {\n enter: {\n duration,\n easing,\n keyframes: enterKeyframes,\n },\n exit: { duration: exitDuration, easing: exitEasing, keyframes: exitKeyframes },\n };\n};\n\n/** A React component that applies scale in/out transitions to its children. */\nexport const Scale = createPresenceComponent(scalePresenceFn);\n\nexport const ScaleSnappy = createPresenceComponentVariant(Scale, {\n duration: motionTokens.durationFast,\n easing: motionTokens.curveDecelerateMax,\n exitEasing: motionTokens.curveAccelerateMax,\n});\n\nexport const ScaleRelaxed = createPresenceComponentVariant(Scale, {\n duration: motionTokens.durationGentle,\n easing: motionTokens.curveDecelerateMid,\n exitEasing: motionTokens.curveAccelerateMid,\n});\n"],"names":["Scale","ScaleRelaxed","ScaleSnappy","scalePresenceFn","duration","motionTokens","durationNormal","easing","curveDecelerateMid","exitDuration","exitEasing","curveAccelerateMid","fromScale","animateOpacity","fromOpacity","toOpacity","toScale","enterKeyframes","opacity","transform","visibility","exitKeyframes","enter","keyframes","exit","createPresenceComponent","createPresenceComponentVariant","durationFast","curveDecelerateMax","curveAccelerateMax","durationGentle"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IA+DaA,KAAK;eAALA;;IAQAC,YAAY;eAAZA;;IANAC,WAAW;eAAXA;;;6BA5DN;AAsBP,8CAA8C,GAC9C,MAAMC,kBAAwD,CAAC,EAC7DC,WAAWC,yBAAY,CAACC,cAAc,EACtCC,SAASF,yBAAY,CAACG,kBAAkB,EACxCC,eAAeL,QAAQ,EACvBM,aAAaL,yBAAY,CAACM,kBAAkB,EAC5CC,YAAY,GAAG,EACfC,iBAAiB,IAAI,EACtB;IACC,MAAMC,cAAcD,iBAAiB,IAAI;IACzC,MAAME,YAAY;IAClB,MAAMC,UAAU;IAEhB,qBAAqB;IACrB,uBAAuB;IACvB,MAAMC,iBAAiB;QACrB;YAAEC,SAASJ;YAAaK,WAAW,CAAC,QAAQ,EAAEP,UAAU,EAAE,EAAEA,UAAU,IAAI,CAAC;YAAEQ,YAAY;QAAU;QACnG;YAAEF,SAASH;YAAWI,WAAW,CAAC,QAAQ,EAAEH,QAAQ,EAAE,EAAEA,QAAQ,IAAI,CAAC;QAAC;KACvE;IAED,MAAMK,gBAAgB;QACpB;YAAEH,SAASH;YAAWI,WAAW,CAAC,QAAQ,EAAEH,QAAQ,EAAE,EAAEA,QAAQ,IAAI,CAAC;QAAC;QACtE;YAAEE,SAASJ;YAAaK,WAAW,CAAC,QAAQ,EAAEP,UAAU,EAAE,EAAEA,UAAU,IAAI,CAAC;YAAEQ,YAAY;QAAS;KACnG;IAED,OAAO;QACLE,OAAO;YACLlB;YACAG;YACAgB,WAAWN;QACb;QACAO,MAAM;YAAEpB,UAAUK;YAAcF,QAAQG;YAAYa,WAAWF;QAAc;IAC/E;AACF;AAGO,MAAMrB,QAAQyB,IAAAA,oCAAuB,EAACtB;AAEtC,MAAMD,cAAcwB,IAAAA,2CAA8B,EAAC1B,OAAO;IAC/DI,UAAUC,yBAAY,CAACsB,YAAY;IACnCpB,QAAQF,yBAAY,CAACuB,kBAAkB;IACvClB,YAAYL,yBAAY,CAACwB,kBAAkB;AAC7C;AAEO,MAAM5B,eAAeyB,IAAAA,2CAA8B,EAAC1B,OAAO;IAChEI,UAAUC,yBAAY,CAACyB,cAAc;IACrCvB,QAAQF,yBAAY,CAACG,kBAAkB;IACvCE,YAAYL,yBAAY,CAACM,kBAAkB;AAC7C"}
@@ -17,9 +17,6 @@ _export(exports, {
17
17
  },
18
18
  ScaleSnappy: function() {
19
19
  return _Scale.ScaleSnappy;
20
- },
21
- createScalePresence: function() {
22
- return _Scale.createScalePresence;
23
20
  }
24
21
  });
25
22
  const _Scale = require("./Scale");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Scale/index.ts"],"sourcesContent":["export { Scale, ScaleRelaxed, ScaleSnappy, createScalePresence } from './Scale';\n"],"names":["Scale","ScaleRelaxed","ScaleSnappy","createScalePresence"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,KAAK;eAALA,YAAK;;IAAEC,YAAY;eAAZA,mBAAY;;IAAEC,WAAW;eAAXA,kBAAW;;IAAEC,mBAAmB;eAAnBA,0BAAmB;;;uBAAQ"}
1
+ {"version":3,"sources":["../src/components/Scale/index.ts"],"sourcesContent":["export { Scale, ScaleRelaxed, ScaleSnappy } from './Scale';\n"],"names":["Scale","ScaleRelaxed","ScaleSnappy"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,KAAK;eAALA,YAAK;;IAAEC,YAAY;eAAZA,mBAAY;;IAAEC,WAAW;eAAXA,kBAAW;;;uBAAQ"}
@@ -44,12 +44,6 @@ _export(exports, {
44
44
  },
45
45
  createCollapsePresence: function() {
46
46
  return _Collapse.createCollapsePresence;
47
- },
48
- createFadePresence: function() {
49
- return _Fade.createFadePresence;
50
- },
51
- createScalePresence: function() {
52
- return _Scale.createScalePresence;
53
47
  }
54
48
  });
55
49
  const _Collapse = require("./components/Collapse");
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n Collapse,\n CollapseSnappy,\n CollapseRelaxed,\n CollapseDelayed,\n createCollapsePresence,\n createCollapseDelayedPresence,\n} from './components/Collapse';\nexport type { CollapseRuntimeParams } from './components/Collapse';\nexport { Fade, FadeSnappy, FadeRelaxed, createFadePresence } from './components/Fade';\nexport { Scale, ScaleSnappy, ScaleRelaxed, createScalePresence } from './components/Scale';\n"],"names":["Collapse","CollapseDelayed","CollapseRelaxed","CollapseSnappy","Fade","FadeRelaxed","FadeSnappy","Scale","ScaleRelaxed","ScaleSnappy","createCollapseDelayedPresence","createCollapsePresence","createFadePresence","createScalePresence"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACEA,QAAQ;eAARA,kBAAQ;;IAGRC,eAAe;eAAfA,yBAAe;;IADfC,eAAe;eAAfA,yBAAe;;IADfC,cAAc;eAAdA,wBAAc;;IAOPC,IAAI;eAAJA,UAAI;;IAAcC,WAAW;eAAXA,iBAAW;;IAAvBC,UAAU;eAAVA,gBAAU;;IAChBC,KAAK;eAALA,YAAK;;IAAeC,YAAY;eAAZA,mBAAY;;IAAzBC,WAAW;eAAXA,kBAAW;;IAJzBC,6BAA6B;eAA7BA,uCAA6B;;IAD7BC,sBAAsB;eAAtBA,gCAAsB;;IAIgBC,kBAAkB;eAAlBA,wBAAkB;;IACfC,mBAAmB;eAAnBA,0BAAmB;;;0BAHvD;sBAE2D;uBACI"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export {\n Collapse,\n CollapseSnappy,\n CollapseRelaxed,\n CollapseDelayed,\n createCollapsePresence,\n createCollapseDelayedPresence,\n} from './components/Collapse';\nexport type { CollapseRuntimeParams } from './components/Collapse';\nexport { Fade, FadeSnappy, FadeRelaxed } from './components/Fade';\nexport { Scale, ScaleSnappy, ScaleRelaxed } from './components/Scale';\n"],"names":["Collapse","CollapseDelayed","CollapseRelaxed","CollapseSnappy","Fade","FadeRelaxed","FadeSnappy","Scale","ScaleRelaxed","ScaleSnappy","createCollapseDelayedPresence","createCollapsePresence"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IACEA,QAAQ;eAARA,kBAAQ;;IAGRC,eAAe;eAAfA,yBAAe;;IADfC,eAAe;eAAfA,yBAAe;;IADfC,cAAc;eAAdA,wBAAc;;IAOPC,IAAI;eAAJA,UAAI;;IAAcC,WAAW;eAAXA,iBAAW;;IAAvBC,UAAU;eAAVA,gBAAU;;IAChBC,KAAK;eAALA,YAAK;;IAAeC,YAAY;eAAZA,mBAAY;;IAAzBC,WAAW;eAAXA,kBAAW;;IAJzBC,6BAA6B;eAA7BA,uCAA6B;;IAD7BC,sBAAsB;eAAtBA,gCAAsB;;;0BAEjB;sBAEuC;uBACG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-motion-components-preview",
3
- "version": "0.4.9",
3
+ "version": "0.5.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",
@@ -1,3 +0,0 @@
1
- // eslint-disable-next-line @typescript-eslint/naming-convention
2
- // eslint-disable-next-line @typescript-eslint/naming-convention
3
- export { };
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/Scale/Scale.types.ts"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/naming-convention\nexport type ScaleVariantParams_unstable = {\n /** Time (ms) for the enter transition. Defaults to the `durationNormal` value (200 ms). */\n enterDuration?: number;\n\n /** Easing curve for the enter transition. Defaults to the `easeEaseMax` value. */\n enterEasing?: string;\n\n /** Time (ms) for the exit transition. Defaults to the `enterDuration` param for symmetry. */\n exitDuration?: number;\n\n /** Easing curve for the exit transition. Defaults to the `enterEasing` param for symmetry. */\n exitEasing?: string;\n};\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport type ScaleRuntimeParams_unstable = {\n /** Whether to animate the opacity. Defaults to `true`. */\n animateOpacity?: boolean;\n};\n"],"names":[],"rangeMappings":";;","mappings":"AAAA,gEAAgE;AAehE,gEAAgE;AAChE,WAGE"}
@@ -1,5 +0,0 @@
1
- // eslint-disable-next-line @typescript-eslint/naming-convention
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/Scale/Scale.types.ts"],"sourcesContent":["// eslint-disable-next-line @typescript-eslint/naming-convention\nexport type ScaleVariantParams_unstable = {\n /** Time (ms) for the enter transition. Defaults to the `durationNormal` value (200 ms). */\n enterDuration?: number;\n\n /** Easing curve for the enter transition. Defaults to the `easeEaseMax` value. */\n enterEasing?: string;\n\n /** Time (ms) for the exit transition. Defaults to the `enterDuration` param for symmetry. */\n exitDuration?: number;\n\n /** Easing curve for the exit transition. Defaults to the `enterEasing` param for symmetry. */\n exitEasing?: string;\n};\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport type ScaleRuntimeParams_unstable = {\n /** Whether to animate the opacity. Defaults to `true`. */\n animateOpacity?: boolean;\n};\n"],"names":[],"rangeMappings":"","mappings":"AAAA,gEAAgE"}