@fluentui/react-motion-components-preview 0.2.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/CHANGELOG.md +18 -2
  2. package/dist/index.d.ts +53 -5
  3. package/lib/components/Collapse/Collapse.js +54 -70
  4. package/lib/components/Collapse/Collapse.js.map +1 -1
  5. package/lib/components/Collapse/collapse-atoms.js +123 -0
  6. package/lib/components/Collapse/collapse-atoms.js.map +1 -0
  7. package/lib/components/Collapse/collapse-types.js +1 -0
  8. package/lib/components/Collapse/collapse-types.js.map +1 -0
  9. package/lib/components/Collapse/index.js.map +1 -1
  10. package/lib/components/Fade/Fade.js +34 -40
  11. package/lib/components/Fade/Fade.js.map +1 -1
  12. package/lib/components/Fade/index.js.map +1 -1
  13. package/lib/components/Scale/Scale.js +1 -1
  14. package/lib/components/Scale/Scale.js.map +1 -1
  15. package/lib/components/Scale/index.js.map +1 -1
  16. package/lib/index.js +3 -3
  17. package/lib/index.js.map +1 -1
  18. package/lib/types.js.map +1 -1
  19. package/lib-commonjs/components/Collapse/Collapse.js +62 -71
  20. package/lib-commonjs/components/Collapse/Collapse.js.map +1 -1
  21. package/lib-commonjs/components/Collapse/collapse-atoms.js +149 -0
  22. package/lib-commonjs/components/Collapse/collapse-atoms.js.map +1 -0
  23. package/lib-commonjs/components/Collapse/collapse-types.js +4 -0
  24. package/lib-commonjs/components/Collapse/collapse-types.js.map +1 -0
  25. package/lib-commonjs/components/Collapse/index.js.map +1 -1
  26. package/lib-commonjs/components/Fade/Fade.js +38 -41
  27. package/lib-commonjs/components/Fade/Fade.js.map +1 -1
  28. package/lib-commonjs/components/Fade/index.js.map +1 -1
  29. package/lib-commonjs/components/Scale/Scale.js +3 -3
  30. package/lib-commonjs/components/Scale/Scale.js.map +1 -1
  31. package/lib-commonjs/components/Scale/index.js.map +1 -1
  32. package/lib-commonjs/index.js +15 -6
  33. package/lib-commonjs/index.js.map +1 -1
  34. package/lib-commonjs/types.js +0 -10
  35. package/lib-commonjs/types.js.map +1 -1
  36. package/package.json +2 -13
package/CHANGELOG.md CHANGED
@@ -1,12 +1,28 @@
1
1
  # Change Log - @fluentui/react-motion-components-preview
2
2
 
3
- This log was last generated on Tue, 15 Oct 2024 17:13:29 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 11 Nov 2024 10:00:46 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [0.3.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-motion-components-preview_v0.3.0)
8
+
9
+ Mon, 11 Nov 2024 10:00:46 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-motion-components-preview_v0.2.0..@fluentui/react-motion-components-preview_v0.3.0)
11
+
12
+ ### Minor changes
13
+
14
+ - feat: add CollapseDelayed motion component variant ([PR #33069](https://github.com/microsoft/fluentui/pull/33069) by robertpenner@microsoft.com)
15
+ - Rename motion component variants ...Exaggerated to ...Relaxed ([PR #33182](https://github.com/microsoft/fluentui/pull/33182) by olkatruk@microsoft.com)
16
+
17
+ ### Patches
18
+
19
+ - refactor: migrate Fade motion component to new variant structure ([PR #33080](https://github.com/microsoft/fluentui/pull/33080) by robertpenner@microsoft.com)
20
+ - fix: handle content padding in Collapse ([PR #33063](https://github.com/microsoft/fluentui/pull/33063) by robertpenner@microsoft.com)
21
+ - chore: replace npm-scripts and just-scrtips with nx inferred tasks ([PR #33074](https://github.com/microsoft/fluentui/pull/33074) by martinhochel@microsoft.com)
22
+
7
23
  ## [0.2.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-motion-components-preview_v0.2.0)
8
24
 
9
- Tue, 15 Oct 2024 17:13:29 GMT
25
+ Tue, 15 Oct 2024 17:17:49 GMT
10
26
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-motion-components-preview_v0.1.1..@fluentui/react-motion-components-preview_v0.2.0)
11
27
 
12
28
  ### Minor changes
package/dist/index.d.ts CHANGED
@@ -1,15 +1,37 @@
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';
3
4
  import type { PresenceMotionFn } from '@fluentui/react-motion';
4
5
 
5
6
  /** A React component that applies collapse/expand transitions to its children. */
6
7
  export declare const Collapse: PresenceComponent<CollapseRuntimeParams>;
7
8
 
8
- export declare const CollapseExaggerated: PresenceComponent<CollapseRuntimeParams>;
9
+ export declare const CollapseDelayed: PresenceComponent<CollapseRuntimeParams>;
10
+
11
+ declare type CollapseDelayedVariantParams = {
12
+ /** Time (ms) for the size expand. Defaults to the durationNormal value (200 ms). */
13
+ enterSizeDuration?: number;
14
+ /** Time (ms) for the fade-in. Defaults to the enterSizeDuration param, to sync fade-in with expand. */
15
+ enterOpacityDuration?: number;
16
+ /** Time (ms) for the size collapse. Defaults to the enterSizeDuration param, for temporal symmetry.. */
17
+ exitSizeDuration?: number;
18
+ /** Defaults to the exitSizeDuration param, to sync the fade-out with the collapse. */
19
+ exitOpacityDuration?: number;
20
+ /** Time (ms) between the size expand start and the fade-in start. Defaults to `0`. */
21
+ enterDelay?: number;
22
+ /** Time (ms) between the fade-out start and the size collapse start. Defaults to `0`. */
23
+ exitDelay?: number;
24
+ /** Easing curve for the enter transition, shared by size and opacity. Defaults to the easeEaseMax value. */
25
+ enterEasing?: string;
26
+ /** Easing curve for the exit transition, shared by size and opacity. Defaults to the enterEasing param. */
27
+ exitEasing?: string;
28
+ };
9
29
 
10
30
  declare type CollapseOrientation = 'horizontal' | 'vertical';
11
31
 
12
- declare type CollapseRuntimeParams = {
32
+ export declare const CollapseRelaxed: PresenceComponent<CollapseRuntimeParams>;
33
+
34
+ export declare type CollapseRuntimeParams = {
13
35
  /** Whether to animate the opacity. Defaults to `true`. */
14
36
  animateOpacity?: boolean;
15
37
  /** The orientation of the size animation. Defaults to `'vertical'` to expand/collapse the height. */
@@ -29,16 +51,42 @@ declare type CollapseVariantParams = {
29
51
  exitEasing?: string;
30
52
  };
31
53
 
32
- /** Define a presence motion for collapse/expand */
54
+ /** Define a presence motion for collapse/expand that can stagger the size and opacity motions by a given delay. */
55
+ export declare const createCollapseDelayedPresence: PresenceMotionFnCreator<CollapseDelayedVariantParams, CollapseRuntimeParams>;
56
+
57
+ /** Defines a presence motion for collapse/expand. */
33
58
  export declare const createCollapsePresence: PresenceMotionFnCreator<CollapseVariantParams, CollapseRuntimeParams>;
34
59
 
60
+ /** Define a presence motion for fade in/out */
61
+ export declare const createFadePresence: PresenceMotionCreator<FadeVariantParams>;
62
+
35
63
  /** A React component that applies fade in/out transitions to its children. */
36
64
  export declare const Fade: PresenceComponent< {}>;
37
65
 
38
- export declare const FadeExaggerated: PresenceComponent< {}>;
66
+ export declare const FadeRelaxed: PresenceComponent< {}>;
39
67
 
40
68
  export declare const FadeSnappy: PresenceComponent< {}>;
41
69
 
70
+ declare type FadeVariantParams = {
71
+ /** Time (ms) for the enter transition (fade-in). Defaults to the `durationNormal` value (200 ms). */
72
+ enterDuration?: number;
73
+ /** Easing curve for the enter transition (fade-in). Defaults to the `easeEase` value. */
74
+ enterEasing?: string;
75
+ /** Time (ms) for the exit transition (fade-out). Defaults to the `enterDuration` param for symmetry. */
76
+ exitDuration?: number;
77
+ /** Easing curve for the exit transition (fade-out). Defaults to the `enterEasing` param for symmetry. */
78
+ exitEasing?: string;
79
+ };
80
+
81
+ /**
82
+ * This is a factory function that generates a motion object from variant params, e.g. duration, easing, etc.
83
+ * The generated object defines a presence motion with `enter` and `exit` transitions.
84
+ * This motion object is declarative, i.e. data without side effects,
85
+ * and it is framework-independent, i.e. non-React.
86
+ * It can be turned into a React component using `createPresenceComponent`.
87
+ */
88
+ declare type PresenceMotionCreator<MotionVariantParams extends Record<string, MotionParam> = {}> = (variantParams?: MotionVariantParams) => PresenceMotion;
89
+
42
90
  /**
43
91
  * This is a factory function that generates a motion function, which has variant params bound into it.
44
92
  * The generated motion function accepts other runtime params that aren't locked into the variant, but supplied at runtime.
@@ -56,7 +104,7 @@ export declare const Scale: PresenceComponent< {
56
104
  animateOpacity?: boolean | undefined;
57
105
  }>;
58
106
 
59
- export declare const ScaleExaggerated: PresenceComponent< {
107
+ export declare const ScaleRelaxed: PresenceComponent< {
60
108
  animateOpacity?: boolean | undefined;
61
109
  }>;
62
110
 
@@ -1,94 +1,78 @@
1
1
  import { motionTokens, createPresenceComponent } from '@fluentui/react-motion';
2
- /** Define a presence motion for collapse/expand */ export const createCollapsePresence = ({ enterDuration = motionTokens.durationNormal, enterEasing = motionTokens.curveEasyEaseMax, exitDuration = enterDuration, exitEasing = enterEasing } = {})=>({ element, animateOpacity = true, orientation = 'vertical' })=>{
3
- const fromOpacity = 0;
4
- const toOpacity = 1;
5
- const fromSize = '0'; // Could be a custom param in the future to start with partially expanded width or height
6
- const measuredSize = orientation === 'horizontal' ? element.scrollWidth : element.scrollHeight;
7
- const toSize = `${measuredSize}px`;
8
- // use generic names for size and overflow, handling vertical or horizontal orientation
9
- const sizeName = orientation === 'horizontal' ? 'maxWidth' : 'maxHeight';
10
- const overflowName = orientation === 'horizontal' ? 'overflowX' : 'overflowY';
11
- // The enter transition is an array of up to 2 motion atoms: size and opacity.
2
+ import { sizeEnterAtom, whitespaceEnterAtom, opacityEnterAtom, opacityExitAtom, sizeExitAtom, whitespaceExitAtom } from './collapse-atoms';
3
+ /** Define a presence motion for collapse/expand that can stagger the size and opacity motions by a given delay. */ export const createCollapseDelayedPresence = ({ // enter
4
+ enterSizeDuration = motionTokens.durationNormal, enterOpacityDuration = enterSizeDuration, enterEasing = motionTokens.curveEasyEaseMax, enterDelay = 0, // exit: durations and easing default to enter values for symmetry
5
+ exitSizeDuration = enterSizeDuration, exitOpacityDuration = enterOpacityDuration, exitEasing = enterEasing, exitDelay = 0 } = {})=>({ element, animateOpacity = true, orientation = 'vertical' })=>{
6
+ // ----- ENTER -----
7
+ // The enter transition is an array of up to 3 motion atoms: size, whitespace and opacity.
12
8
  const enterAtoms = [
13
- // Expand size (height or width)
14
- {
15
- keyframes: [
16
- {
17
- [sizeName]: fromSize,
18
- [overflowName]: 'hidden'
19
- },
20
- {
21
- [sizeName]: toSize,
22
- offset: 0.9999,
23
- [overflowName]: 'hidden'
24
- },
25
- {
26
- [sizeName]: 'unset',
27
- [overflowName]: 'unset'
28
- }
29
- ],
30
- duration: enterDuration,
9
+ sizeEnterAtom({
10
+ orientation,
11
+ duration: enterSizeDuration,
12
+ easing: enterEasing,
13
+ element
14
+ }),
15
+ whitespaceEnterAtom({
16
+ orientation,
17
+ duration: enterSizeDuration,
31
18
  easing: enterEasing
32
- }
19
+ })
33
20
  ];
34
21
  // Fade in only if animateOpacity is true. Otherwise, leave opacity unaffected.
35
22
  if (animateOpacity) {
36
- enterAtoms.push({
37
- keyframes: [
38
- {
39
- opacity: fromOpacity
40
- },
41
- {
42
- opacity: toOpacity
43
- }
44
- ],
45
- duration: enterDuration,
23
+ enterAtoms.push(opacityEnterAtom({
24
+ duration: enterOpacityDuration,
46
25
  easing: enterEasing,
47
- fill: 'both'
48
- });
26
+ delay: enterDelay
27
+ }));
49
28
  }
50
- // The exit transition is an array of up to 2 motion atoms: opacity and size.
29
+ // ----- EXIT -----
30
+ // The exit transition is an array of up to 3 motion atoms: opacity, size and whitespace.
51
31
  const exitAtoms = [];
52
- // Fade out only if animateOpacity is false. Otherwise, leave opacity unaffected.
32
+ // Fade out only if animateOpacity is true. Otherwise, leave opacity unaffected.
53
33
  if (animateOpacity) {
54
- exitAtoms.push({
55
- keyframes: [
56
- {
57
- opacity: toOpacity
58
- },
59
- {
60
- opacity: fromOpacity
61
- }
62
- ],
63
- duration: exitDuration,
34
+ exitAtoms.push(opacityExitAtom({
35
+ duration: exitOpacityDuration,
64
36
  easing: exitEasing
65
- });
37
+ }));
66
38
  }
67
- exitAtoms.push(// Collapse size (height or width)
68
- {
69
- keyframes: [
70
- {
71
- [sizeName]: toSize,
72
- [overflowName]: 'hidden'
73
- },
74
- {
75
- [sizeName]: fromSize,
76
- [overflowName]: 'hidden'
77
- }
78
- ],
79
- duration: exitDuration,
39
+ exitAtoms.push(sizeExitAtom({
40
+ orientation,
41
+ duration: exitSizeDuration,
42
+ easing: exitEasing,
43
+ element,
44
+ delay: exitDelay
45
+ }));
46
+ exitAtoms.push(whitespaceExitAtom({
47
+ orientation,
48
+ duration: exitSizeDuration,
80
49
  easing: exitEasing,
81
- fill: 'both'
82
- });
50
+ delay: exitDelay
51
+ }));
83
52
  return {
84
53
  enter: enterAtoms,
85
54
  exit: exitAtoms
86
55
  };
87
56
  };
57
+ /** Defines a presence motion for collapse/expand. */ export const createCollapsePresence = ({ enterDuration = motionTokens.durationNormal, enterEasing = motionTokens.curveEasyEaseMax, exitDuration = enterDuration, exitEasing = enterEasing } = {})=>// Implement a regular collapse as a special case of the delayed collapse,
58
+ // where the delays are zero, and the size and opacity durations are equal.
59
+ createCollapseDelayedPresence({
60
+ enterSizeDuration: enterDuration,
61
+ enterEasing,
62
+ exitSizeDuration: exitDuration,
63
+ exitEasing
64
+ });
88
65
  /** A React component that applies collapse/expand transitions to its children. */ export const Collapse = createPresenceComponent(createCollapsePresence());
89
66
  export const CollapseSnappy = createPresenceComponent(createCollapsePresence({
90
67
  enterDuration: motionTokens.durationFast
91
68
  }));
92
- export const CollapseExaggerated = createPresenceComponent(createCollapsePresence({
69
+ export const CollapseRelaxed = createPresenceComponent(createCollapsePresence({
93
70
  enterDuration: motionTokens.durationSlower
94
71
  }));
72
+ export const CollapseDelayed = createPresenceComponent(createCollapseDelayedPresence({
73
+ enterSizeDuration: motionTokens.durationNormal,
74
+ enterOpacityDuration: motionTokens.durationSlower,
75
+ enterDelay: motionTokens.durationNormal,
76
+ exitDelay: motionTokens.durationSlower,
77
+ enterEasing: motionTokens.curveEasyEase
78
+ }));
@@ -1 +1 @@
1
- {"version":3,"sources":["Collapse.ts"],"sourcesContent":["import { motionTokens, createPresenceComponent, AtomMotion } from '@fluentui/react-motion';\nimport type { PresenceMotionFnCreator } from '../../types';\n\ntype CollapseOrientation = 'horizontal' | 'vertical';\n\ntype CollapseVariantParams = {\n /** Time (ms) for the enter transition (expand). Defaults to the `durationNormal` value (200 ms). */\n enterDuration?: number;\n\n /** Easing curve for the enter transition (expand). Defaults to the `easeEaseMax` value. */\n enterEasing?: string;\n\n /** Time (ms) for the exit transition (collapse). Defaults to the `enterDuration` param for symmetry. */\n exitDuration?: number;\n\n /** Easing curve for the exit transition (collapse). Defaults to the `enterEasing` param for symmetry. */\n exitEasing?: string;\n};\n\ntype CollapseRuntimeParams = {\n /** Whether to animate the opacity. Defaults to `true`. */\n animateOpacity?: boolean;\n\n /** The orientation of the size animation. Defaults to `'vertical'` to expand/collapse the height. */\n orientation?: CollapseOrientation;\n};\n\n/** Define a presence motion for collapse/expand */\nexport const createCollapsePresence: PresenceMotionFnCreator<CollapseVariantParams, CollapseRuntimeParams> =\n ({\n enterDuration = motionTokens.durationNormal,\n enterEasing = motionTokens.curveEasyEaseMax,\n exitDuration = enterDuration,\n exitEasing = enterEasing,\n } = {}) =>\n ({ element, animateOpacity = true, orientation = 'vertical' }) => {\n const fromOpacity = 0;\n const toOpacity = 1;\n const fromSize = '0'; // Could be a custom param in the future to start with partially expanded width or height\n const measuredSize = orientation === 'horizontal' ? element.scrollWidth : element.scrollHeight;\n const toSize = `${measuredSize}px`;\n // use generic names for size and overflow, handling vertical or horizontal orientation\n const sizeName = orientation === 'horizontal' ? 'maxWidth' : 'maxHeight';\n const overflowName = orientation === 'horizontal' ? 'overflowX' : 'overflowY';\n\n // The enter transition is an array of up to 2 motion atoms: size and opacity.\n const enterAtoms: AtomMotion[] = [\n // Expand size (height or width)\n {\n keyframes: [\n {\n [sizeName]: fromSize,\n [overflowName]: 'hidden',\n },\n { [sizeName]: toSize, offset: 0.9999, [overflowName]: 'hidden' },\n { [sizeName]: 'unset', [overflowName]: 'unset' },\n ],\n duration: enterDuration,\n easing: enterEasing,\n },\n ];\n // Fade in only if animateOpacity is true. Otherwise, leave opacity unaffected.\n if (animateOpacity) {\n enterAtoms.push({\n keyframes: [{ opacity: fromOpacity }, { opacity: toOpacity }],\n duration: enterDuration,\n easing: enterEasing,\n fill: 'both',\n });\n }\n\n // The exit transition is an array of up to 2 motion atoms: opacity and size.\n const exitAtoms: AtomMotion[] = [];\n // Fade out only if animateOpacity is false. Otherwise, leave opacity unaffected.\n if (animateOpacity) {\n exitAtoms.push({\n keyframes: [{ opacity: toOpacity }, { opacity: fromOpacity }],\n duration: exitDuration,\n easing: exitEasing,\n });\n }\n exitAtoms.push(\n // Collapse size (height or width)\n {\n keyframes: [\n { [sizeName]: toSize, [overflowName]: 'hidden' },\n { [sizeName]: fromSize, [overflowName]: 'hidden' },\n ],\n duration: exitDuration,\n easing: exitEasing,\n fill: 'both',\n },\n );\n\n return {\n enter: enterAtoms,\n exit: exitAtoms,\n };\n };\n\n/** A React component that applies collapse/expand transitions to its children. */\nexport const Collapse = createPresenceComponent(createCollapsePresence());\n\nexport const CollapseSnappy = createPresenceComponent(\n createCollapsePresence({ enterDuration: motionTokens.durationFast }),\n);\n\nexport const CollapseExaggerated = createPresenceComponent(\n createCollapsePresence({ enterDuration: motionTokens.durationSlower }),\n);\n"],"names":["motionTokens","createPresenceComponent","createCollapsePresence","enterDuration","durationNormal","enterEasing","curveEasyEaseMax","exitDuration","exitEasing","element","animateOpacity","orientation","fromOpacity","toOpacity","fromSize","measuredSize","scrollWidth","scrollHeight","toSize","sizeName","overflowName","enterAtoms","keyframes","offset","duration","easing","push","opacity","fill","exitAtoms","enter","exit","Collapse","CollapseSnappy","durationFast","CollapseExaggerated","durationSlower"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,YAAY,EAAEC,uBAAuB,QAAoB,yBAAyB;AA2B3F,iDAAiD,GACjD,OAAO,MAAMC,yBACX,CAAC,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gBACVkB,QAAQjB;YACV;QACF;QACAqB,UAAUH,IAAI,CACZ,kCAAkC;QAClC;YACEJ,WAAW;gBACT;oBAAE,CAACH,SAAS,EAAED;oBAAQ,CAACE,aAAa,EAAE;gBAAS;gBAC/C;oBAAE,CAACD,SAAS,EAAEL;oBAAU,CAACM,aAAa,EAAE;gBAAS;aAClD;YACDI,UAAUjB;YACVkB,QAAQjB;YACRoB,MAAM;QACR;QAGF,OAAO;YACLE,OAAOT;YACPU,MAAMF;QACR;IACF,EAAE;AAEJ,gFAAgF,GAChF,OAAO,MAAMG,WAAW/B,wBAAwBC,0BAA0B;AAE1E,OAAO,MAAM+B,iBAAiBhC,wBAC5BC,uBAAuB;IAAEC,eAAeH,aAAakC,YAAY;AAAC,IAClE;AAEF,OAAO,MAAMC,sBAAsBlC,wBACjCC,uBAAuB;IAAEC,eAAeH,aAAaoC,cAAc;AAAC,IACpE"}
1
+ {"version":3,"sources":["../src/components/Collapse/Collapse.ts"],"sourcesContent":["import { motionTokens, createPresenceComponent, AtomMotion } from '@fluentui/react-motion';\nimport type { PresenceMotionFnCreator } from '../../types';\nimport type { CollapseDelayedVariantParams, CollapseRuntimeParams, CollapseVariantParams } from './collapse-types';\nimport {\n sizeEnterAtom,\n whitespaceEnterAtom,\n opacityEnterAtom,\n opacityExitAtom,\n sizeExitAtom,\n whitespaceExitAtom,\n} from './collapse-atoms';\n\n/** Define a presence motion for collapse/expand that can stagger the size and opacity motions by a given delay. */\nexport const createCollapseDelayedPresence: PresenceMotionFnCreator<\n CollapseDelayedVariantParams,\n CollapseRuntimeParams\n> =\n ({\n // enter\n enterSizeDuration = motionTokens.durationNormal,\n enterOpacityDuration = enterSizeDuration, // in sync with size duration by default\n enterEasing = motionTokens.curveEasyEaseMax,\n enterDelay = 0,\n\n // exit: durations and easing default to enter values for symmetry\n exitSizeDuration = enterSizeDuration,\n exitOpacityDuration = enterOpacityDuration,\n exitEasing = enterEasing,\n exitDelay = 0,\n } = {}) =>\n ({ element, animateOpacity = true, orientation = 'vertical' }) => {\n // ----- ENTER -----\n // The enter transition is an array of up to 3 motion atoms: size, whitespace and opacity.\n const enterAtoms: AtomMotion[] = [\n sizeEnterAtom({\n orientation,\n duration: enterSizeDuration,\n easing: enterEasing,\n element,\n }),\n whitespaceEnterAtom({\n orientation,\n duration: enterSizeDuration,\n easing: enterEasing,\n }),\n ];\n // Fade in only if animateOpacity is true. Otherwise, leave opacity unaffected.\n if (animateOpacity) {\n enterAtoms.push(\n opacityEnterAtom({\n duration: enterOpacityDuration,\n easing: enterEasing,\n delay: enterDelay,\n }),\n );\n }\n\n // ----- EXIT -----\n // The exit transition is an array of up to 3 motion atoms: opacity, size and whitespace.\n const exitAtoms: AtomMotion[] = [];\n // Fade out only if animateOpacity is true. Otherwise, leave opacity unaffected.\n if (animateOpacity) {\n exitAtoms.push(\n opacityExitAtom({\n duration: exitOpacityDuration,\n easing: exitEasing,\n }),\n );\n }\n exitAtoms.push(\n sizeExitAtom({\n orientation,\n duration: exitSizeDuration,\n easing: exitEasing,\n element,\n delay: exitDelay,\n }),\n );\n exitAtoms.push(\n whitespaceExitAtom({\n orientation,\n duration: exitSizeDuration,\n easing: exitEasing,\n delay: exitDelay,\n }),\n );\n\n return {\n enter: enterAtoms,\n exit: exitAtoms,\n };\n };\n\n/** Defines a presence motion for collapse/expand. */\nexport const createCollapsePresence: PresenceMotionFnCreator<CollapseVariantParams, CollapseRuntimeParams> = ({\n enterDuration = motionTokens.durationNormal,\n enterEasing = motionTokens.curveEasyEaseMax,\n exitDuration = enterDuration,\n exitEasing = enterEasing,\n} = {}) =>\n // Implement a regular collapse as a special case of the delayed collapse,\n // where the delays are zero, and the size and opacity durations are equal.\n createCollapseDelayedPresence({\n enterSizeDuration: enterDuration,\n enterEasing,\n exitSizeDuration: exitDuration,\n exitEasing,\n });\n\n/** A React component that applies collapse/expand transitions to its children. */\nexport const Collapse = createPresenceComponent(createCollapsePresence());\n\nexport const CollapseSnappy = createPresenceComponent(\n createCollapsePresence({ enterDuration: motionTokens.durationFast }),\n);\n\nexport const CollapseRelaxed = createPresenceComponent(\n createCollapsePresence({ enterDuration: motionTokens.durationSlower }),\n);\n\nexport const CollapseDelayed = createPresenceComponent(\n createCollapseDelayedPresence({\n enterSizeDuration: motionTokens.durationNormal,\n enterOpacityDuration: motionTokens.durationSlower,\n enterDelay: motionTokens.durationNormal,\n exitDelay: motionTokens.durationSlower,\n enterEasing: motionTokens.curveEasyEase,\n }),\n);\n"],"names":["motionTokens","createPresenceComponent","sizeEnterAtom","whitespaceEnterAtom","opacityEnterAtom","opacityExitAtom","sizeExitAtom","whitespaceExitAtom","createCollapseDelayedPresence","enterSizeDuration","durationNormal","enterOpacityDuration","enterEasing","curveEasyEaseMax","enterDelay","exitSizeDuration","exitOpacityDuration","exitEasing","exitDelay","element","animateOpacity","orientation","enterAtoms","duration","easing","push","delay","exitAtoms","enter","exit","createCollapsePresence","enterDuration","exitDuration","Collapse","CollapseSnappy","durationFast","CollapseRelaxed","durationSlower","CollapseDelayed","curveEasyEase"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,YAAY,EAAEC,uBAAuB,QAAoB,yBAAyB;AAG3F,SACEC,aAAa,EACbC,mBAAmB,EACnBC,gBAAgB,EAChBC,eAAe,EACfC,YAAY,EACZC,kBAAkB,QACb,mBAAmB;AAE1B,iHAAiH,GACjH,OAAO,MAAMC,gCAIX,CAAC,EACC,QAAQ;AACRC,oBAAoBT,aAAaU,cAAc,EAC/CC,uBAAuBF,iBAAiB,EACxCG,cAAcZ,aAAaa,gBAAgB,EAC3CC,aAAa,CAAC,EAEd,kEAAkE;AAClEC,mBAAmBN,iBAAiB,EACpCO,sBAAsBL,oBAAoB,EAC1CM,aAAaL,WAAW,EACxBM,YAAY,CAAC,EACd,GAAG,CAAC,CAAC,GACN,CAAC,EAAEC,OAAO,EAAE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kBnC,wBAC7B6B,uBAAuB;IAAEC,eAAe/B,aAAaqC,cAAc;AAAC,IACpE;AAEF,OAAO,MAAMC,kBAAkBrC,wBAC7BO,8BAA8B;IAC5BC,mBAAmBT,aAAaU,cAAc;IAC9CC,sBAAsBX,aAAaqC,cAAc;IACjDvB,YAAYd,aAAaU,cAAc;IACvCQ,WAAWlB,aAAaqC,cAAc;IACtCzB,aAAaZ,aAAauC,aAAa;AACzC,IACA"}
@@ -0,0 +1,123 @@
1
+ // ----- SIZE -----
2
+ const sizeValuesForOrientation = (orientation, element)=>{
3
+ const sizeName = orientation === 'horizontal' ? 'maxWidth' : 'maxHeight';
4
+ const overflowName = orientation === 'horizontal' ? 'overflowX' : 'overflowY';
5
+ const measuredSize = orientation === 'horizontal' ? element.scrollWidth : element.scrollHeight;
6
+ const toSize = `${measuredSize}px`;
7
+ return {
8
+ sizeName,
9
+ overflowName,
10
+ toSize
11
+ };
12
+ };
13
+ export const sizeEnterAtom = ({ orientation, duration, easing, element, fromSize = '0' })=>{
14
+ const { sizeName, overflowName, toSize } = sizeValuesForOrientation(orientation, element);
15
+ return {
16
+ keyframes: [
17
+ {
18
+ [sizeName]: fromSize,
19
+ [overflowName]: 'hidden'
20
+ },
21
+ {
22
+ [sizeName]: toSize,
23
+ offset: 0.9999,
24
+ [overflowName]: 'hidden'
25
+ },
26
+ {
27
+ [sizeName]: 'unset',
28
+ [overflowName]: 'unset'
29
+ }
30
+ ],
31
+ duration,
32
+ easing
33
+ };
34
+ };
35
+ export const sizeExitAtom = ({ orientation, duration, easing, element, delay = 0, fromSize = '0' })=>{
36
+ const { sizeName, overflowName, toSize } = sizeValuesForOrientation(orientation, element);
37
+ return {
38
+ keyframes: [
39
+ {
40
+ [sizeName]: toSize,
41
+ [overflowName]: 'hidden'
42
+ },
43
+ {
44
+ [sizeName]: fromSize,
45
+ [overflowName]: 'hidden'
46
+ }
47
+ ],
48
+ duration,
49
+ easing,
50
+ fill: 'both',
51
+ delay
52
+ };
53
+ };
54
+ // ----- WHITESPACE -----
55
+ // Whitespace animation currently includes padding, but could be extended to handle margin.
56
+ const whitespaceValuesForOrientation = (orientation)=>{
57
+ const paddingStart = orientation === 'horizontal' ? 'paddingLeft' : 'paddingTop';
58
+ const paddingEnd = orientation === 'horizontal' ? 'paddingRight' : 'paddingBottom';
59
+ return {
60
+ paddingStart,
61
+ paddingEnd
62
+ };
63
+ };
64
+ // Because a height of zero does not eliminate padding,
65
+ // we will create keyframes to animate it to zero.
66
+ // TODO: consider collapsing margin, perhaps as an option.
67
+ export const whitespaceEnterAtom = ({ orientation, duration, easing })=>{
68
+ const { paddingStart, paddingEnd } = whitespaceValuesForOrientation(orientation);
69
+ return {
70
+ keyframes: [
71
+ {
72
+ [paddingStart]: '0',
73
+ [paddingEnd]: '0',
74
+ offset: 0
75
+ }
76
+ ],
77
+ duration,
78
+ easing
79
+ };
80
+ };
81
+ export const whitespaceExitAtom = ({ orientation, duration, easing, delay = 0 })=>{
82
+ const { paddingStart, paddingEnd } = whitespaceValuesForOrientation(orientation);
83
+ return {
84
+ keyframes: [
85
+ {
86
+ [paddingStart]: '0',
87
+ [paddingEnd]: '0',
88
+ offset: 1
89
+ }
90
+ ],
91
+ duration,
92
+ easing,
93
+ fill: 'forwards',
94
+ delay
95
+ };
96
+ };
97
+ // ----- OPACITY -----
98
+ export const opacityEnterAtom = ({ duration, easing, delay = 0, fromOpacity = 0, toOpacity = 1 })=>({
99
+ keyframes: [
100
+ {
101
+ opacity: fromOpacity
102
+ },
103
+ {
104
+ opacity: toOpacity
105
+ }
106
+ ],
107
+ duration,
108
+ easing,
109
+ delay,
110
+ fill: 'both'
111
+ });
112
+ export const opacityExitAtom = ({ duration, easing, fromOpacity = 0, toOpacity = 1 })=>({
113
+ keyframes: [
114
+ {
115
+ opacity: toOpacity
116
+ },
117
+ {
118
+ opacity: fromOpacity
119
+ }
120
+ ],
121
+ duration,
122
+ easing
123
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Collapse/collapse-atoms.ts"],"sourcesContent":["import { AtomMotion } from '@fluentui/react-motion/src/types';\nimport type { CollapseOrientation } from './collapse-types';\n\n// ----- SIZE -----\n\nconst sizeValuesForOrientation = (orientation: CollapseOrientation, element: Element) => {\n const sizeName = orientation === 'horizontal' ? 'maxWidth' : 'maxHeight';\n const overflowName = orientation === 'horizontal' ? 'overflowX' : 'overflowY';\n const measuredSize = orientation === 'horizontal' ? element.scrollWidth : element.scrollHeight;\n const toSize = `${measuredSize}px`;\n return { sizeName, overflowName, toSize };\n};\n\nexport const sizeEnterAtom = ({\n orientation,\n duration,\n easing,\n element,\n fromSize = '0',\n}: {\n orientation: CollapseOrientation;\n duration: number;\n easing: string;\n element: HTMLElement;\n fromSize?: string;\n}): AtomMotion => {\n const { sizeName, overflowName, toSize } = sizeValuesForOrientation(orientation, element);\n\n return {\n keyframes: [\n { [sizeName]: fromSize, [overflowName]: 'hidden' },\n { [sizeName]: toSize, offset: 0.9999, [overflowName]: 'hidden' },\n { [sizeName]: 'unset', [overflowName]: 'unset' },\n ],\n duration,\n easing,\n };\n};\n\nexport const sizeExitAtom = ({\n orientation,\n duration,\n easing,\n element,\n delay = 0,\n fromSize = '0',\n}: {\n orientation: CollapseOrientation;\n duration: number;\n easing: string;\n element: HTMLElement;\n delay?: number;\n fromSize?: string;\n}): AtomMotion => {\n const { sizeName, overflowName, toSize } = sizeValuesForOrientation(orientation, element);\n\n return {\n keyframes: [\n { [sizeName]: toSize, [overflowName]: 'hidden' },\n { [sizeName]: fromSize, [overflowName]: 'hidden' },\n ],\n duration,\n easing,\n fill: 'both',\n delay,\n };\n};\n\n// ----- WHITESPACE -----\n\n// Whitespace animation currently includes padding, but could be extended to handle margin.\nconst whitespaceValuesForOrientation = (orientation: CollapseOrientation) => {\n const paddingStart = orientation === 'horizontal' ? 'paddingLeft' : 'paddingTop';\n const paddingEnd = orientation === 'horizontal' ? 'paddingRight' : 'paddingBottom';\n return { paddingStart, paddingEnd };\n};\n\n// Because a height of zero does not eliminate padding,\n// we will create keyframes to animate it to zero.\n// TODO: consider collapsing margin, perhaps as an option.\nexport const whitespaceEnterAtom = ({\n orientation,\n duration,\n easing,\n}: {\n orientation: CollapseOrientation;\n duration: number;\n easing: string;\n}): AtomMotion => {\n const { paddingStart, paddingEnd } = whitespaceValuesForOrientation(orientation);\n return {\n keyframes: [{ [paddingStart]: '0', [paddingEnd]: '0', offset: 0 }],\n duration,\n easing,\n };\n};\n\nexport const whitespaceExitAtom = ({\n orientation,\n duration,\n easing,\n delay = 0,\n}: {\n orientation: CollapseOrientation;\n duration: number;\n easing: string;\n delay?: number;\n}): AtomMotion => {\n const { paddingStart, paddingEnd } = whitespaceValuesForOrientation(orientation);\n return {\n keyframes: [{ [paddingStart]: '0', [paddingEnd]: '0', offset: 1 }],\n duration,\n easing,\n fill: 'forwards',\n delay,\n };\n};\n\n// ----- OPACITY -----\n\nexport const opacityEnterAtom = ({\n duration,\n easing,\n delay = 0,\n fromOpacity = 0,\n toOpacity = 1,\n}: {\n duration: number;\n easing: string;\n delay?: number;\n fromOpacity?: number;\n toOpacity?: number;\n}): AtomMotion => ({\n keyframes: [{ opacity: fromOpacity }, { opacity: toOpacity }],\n duration,\n easing,\n delay,\n fill: 'both',\n});\n\nexport const opacityExitAtom = ({\n duration,\n easing,\n fromOpacity = 0,\n toOpacity = 1,\n}: {\n duration: number;\n easing: string;\n fromOpacity?: number;\n toOpacity?: number;\n}): AtomMotion => ({\n keyframes: [{ opacity: toOpacity }, { opacity: fromOpacity }],\n duration,\n easing,\n});\n"],"names":["sizeValuesForOrientation","orientation","element","sizeName","overflowName","measuredSize","scrollWidth","scrollHeight","toSize","sizeEnterAtom","duration","easing","fromSize","keyframes","offset","sizeExitAtom","delay","fill","whitespaceValuesForOrientation","paddingStart","paddingEnd","whitespaceEnterAtom","whitespaceExitAtom","opacityEnterAtom","fromOpacity","toOpacity","opacity","opacityExitAtom"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;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M,EACNa,cAAc,CAAC,EACfC,YAAY,CAAC,EAMd,GAAkB,CAAA;QACjBZ,WAAW;YAAC;gBAAEa,SAASD;YAAU;YAAG;gBAAEC,SAASF;YAAY;SAAE;QAC7Dd;QACAC;IACF,CAAA,EAAG"}
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Collapse/collapse-types.ts"],"sourcesContent":["export type CollapseOrientation = 'horizontal' | 'vertical';\n\n// TODO: reduce duplication between CollapseDelayedVariantParams and CollapseVariantParams\nexport type CollapseDelayedVariantParams = {\n /** Time (ms) for the size expand. Defaults to the durationNormal value (200 ms). */\n enterSizeDuration?: number;\n\n /** Time (ms) for the fade-in. Defaults to the enterSizeDuration param, to sync fade-in with expand. */\n enterOpacityDuration?: number;\n\n /** Time (ms) for the size collapse. Defaults to the enterSizeDuration param, for temporal symmetry.. */\n exitSizeDuration?: number;\n\n /** Defaults to the exitSizeDuration param, to sync the fade-out with the collapse. */\n exitOpacityDuration?: number;\n\n /** Time (ms) between the size expand start and the fade-in start. Defaults to `0`. */\n enterDelay?: number;\n\n /** Time (ms) between the fade-out start and the size collapse start. Defaults to `0`. */\n exitDelay?: number;\n\n /** Easing curve for the enter transition, shared by size and opacity. Defaults to the easeEaseMax value. */\n enterEasing?: string;\n\n /** Easing curve for the exit transition, shared by size and opacity. Defaults to the enterEasing param. */\n exitEasing?: string;\n};\n\nexport type CollapseRuntimeParams = {\n /** Whether to animate the opacity. Defaults to `true`. */\n animateOpacity?: boolean;\n\n /** The orientation of the size animation. Defaults to `'vertical'` to expand/collapse the height. */\n orientation?: CollapseOrientation;\n};\n\nexport type CollapseVariantParams = {\n /** Time (ms) for the enter transition (expand). Defaults to the `durationNormal` value (200 ms). */\n enterDuration?: number;\n\n /** Easing curve for the enter transition (expand). Defaults to the `easeEaseMax` value. */\n enterEasing?: string;\n\n /** Time (ms) for the exit transition (collapse). Defaults to the `enterDuration` param for symmetry. */\n exitDuration?: number;\n\n /** Easing curve for the exit transition (collapse). Defaults to the `enterEasing` param for symmetry. */\n exitEasing?: string;\n};\n"],"names":[],"rangeMappings":"","mappings":"AAqCA,WAYE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Collapse';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,aAAa"}
1
+ {"version":3,"sources":["../src/components/Collapse/index.ts"],"sourcesContent":["export * from './Collapse';\nexport type { CollapseRuntimeParams } from './collapse-types';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,aAAa"}
@@ -1,40 +1,34 @@
1
- import { motionTokens, createPresenceComponent, createPresenceComponentVariant } from '@fluentui/react-motion';
2
- const duration = motionTokens.durationNormal;
3
- const easing = motionTokens.curveEasyEase;
4
- /** Define a presence motion for fade in/out */ const fadeMotion = {
5
- enter: {
6
- duration,
7
- easing,
8
- keyframes: [
9
- {
10
- opacity: 0
11
- },
12
- {
13
- opacity: 1
14
- }
15
- ]
16
- },
17
- exit: {
18
- duration,
19
- easing,
20
- keyframes: [
21
- {
22
- opacity: 1
23
- },
24
- {
25
- opacity: 0
26
- }
27
- ]
28
- }
29
- };
30
- /** A React component that applies fade in/out transitions to its children. */ export const Fade = createPresenceComponent(fadeMotion);
31
- export const FadeSnappy = createPresenceComponentVariant(Fade, {
32
- all: {
33
- duration: motionTokens.durationFast
34
- }
35
- });
36
- export const FadeExaggerated = createPresenceComponentVariant(Fade, {
37
- all: {
38
- duration: motionTokens.durationGentle
39
- }
40
- });
1
+ import { motionTokens, createPresenceComponent } from '@fluentui/react-motion';
2
+ /** Define a presence motion for fade in/out */ export const createFadePresence = ({ enterDuration = motionTokens.durationNormal, enterEasing = motionTokens.curveEasyEase, exitDuration = enterDuration, exitEasing = enterEasing } = {})=>({
3
+ enter: {
4
+ duration: enterDuration,
5
+ easing: enterEasing,
6
+ keyframes: [
7
+ {
8
+ opacity: 0
9
+ },
10
+ {
11
+ opacity: 1
12
+ }
13
+ ]
14
+ },
15
+ exit: {
16
+ duration: exitDuration,
17
+ easing: exitEasing,
18
+ keyframes: [
19
+ {
20
+ opacity: 1
21
+ },
22
+ {
23
+ opacity: 0
24
+ }
25
+ ]
26
+ }
27
+ });
28
+ /** A React component that applies fade in/out transitions to its children. */ export const Fade = createPresenceComponent(createFadePresence());
29
+ export const FadeSnappy = createPresenceComponent(createFadePresence({
30
+ enterDuration: motionTokens.durationFast
31
+ }));
32
+ export const FadeRelaxed = createPresenceComponent(createFadePresence({
33
+ enterDuration: motionTokens.durationGentle
34
+ }));
@@ -1 +1 @@
1
- {"version":3,"sources":["Fade.ts"],"sourcesContent":["import {\n motionTokens,\n PresenceMotion,\n createPresenceComponent,\n createPresenceComponentVariant,\n} from '@fluentui/react-motion';\n\nconst duration = motionTokens.durationNormal;\nconst easing = motionTokens.curveEasyEase;\n\n/** Define a presence motion for fade in/out */\nconst fadeMotion: PresenceMotion = {\n enter: { duration, easing, keyframes: [{ opacity: 0 }, { opacity: 1 }] },\n exit: { duration, easing, keyframes: [{ opacity: 1 }, { opacity: 0 }] },\n};\n\n/** A React component that applies fade in/out transitions to its children. */\nexport const Fade = createPresenceComponent(fadeMotion);\n\nexport const FadeSnappy = createPresenceComponentVariant(Fade, { all: { duration: motionTokens.durationFast } });\n\nexport const FadeExaggerated = createPresenceComponentVariant(Fade, { all: { duration: motionTokens.durationGentle } });\n"],"names":["motionTokens","createPresenceComponent","createPresenceComponentVariant","duration","durationNormal","easing","curveEasyEase","fadeMotion","enter","keyframes","opacity","exit","Fade","FadeSnappy","all","durationFast","FadeExaggerated","durationGentle"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,YAAY,EAEZC,uBAAuB,EACvBC,8BAA8B,QACzB,yBAAyB;AAEhC,MAAMC,WAAWH,aAAaI,cAAc;AAC5C,MAAMC,SAASL,aAAaM,aAAa;AAEzC,8CAA8C,GAC9C,MAAMC,aAA6B;IACjCC,OAAO;QAAEL;QAAUE;QAAQI,WAAW;YAAC;gBAAEC,SAAS;YAAE;YAAG;gBAAEA,SAAS;YAAE;SAAE;IAAC;IACvEC,MAAM;QAAER;QAAUE;QAAQI,WAAW;YAAC;gBAAEC,SAAS;YAAE;YAAG;gBAAEA,SAAS;YAAE;SAAE;IAAC;AACxE;AAEA,4EAA4E,GAC5E,OAAO,MAAME,OAAOX,wBAAwBM,YAAY;AAExD,OAAO,MAAMM,aAAaX,+BAA+BU,MAAM;IAAEE,KAAK;QAAEX,UAAUH,aAAae,YAAY;IAAC;AAAE,GAAG;AAEjH,OAAO,MAAMC,kBAAkBd,+BAA+BU,MAAM;IAAEE,KAAK;QAAEX,UAAUH,aAAaiB,cAAc;IAAC;AAAE,GAAG"}
1
+ {"version":3,"sources":["../src/components/Fade/Fade.ts"],"sourcesContent":["import { motionTokens, createPresenceComponent } from '@fluentui/react-motion';\nimport type { PresenceMotionCreator } from '../../types';\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: { duration: enterDuration, easing: enterEasing, keyframes: [{ opacity: 0 }, { opacity: 1 }] },\n exit: { duration: exitDuration, easing: exitEasing, keyframes: [{ opacity: 1 }, { opacity: 0 }] },\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","createFadePresence","enterDuration","durationNormal","enterEasing","curveEasyEase","exitDuration","exitEasing","enter","duration","easing","keyframes","opacity","exit","Fade","FadeSnappy","durationFast","FadeRelaxed","durationGentle"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,YAAY,EAAEC,uBAAuB,QAAQ,yBAAyB;AAiB/E,8CAA8C,GAC9C,OAAO,MAAMC,qBAA+D,CAAC,EAC3EC,gBAAgBH,aAAaI,cAAc,EAC3CC,cAAcL,aAAaM,aAAa,EACxCC,eAAeJ,aAAa,EAC5BK,aAAaH,WAAW,EACzB,GAAG,CAAC,CAAC,GAAM,CAAA;QACVI,OAAO;YAAEC,UAAUP;YAAeQ,QAAQN;YAAaO,WAAW;gBAAC;oBAAEC,SAAS;gBAAE;gBAAG;oBAAEA,SAAS;gBAAE;aAAE;QAAC;QACnGC,MAAM;YAAEJ,UAAUH;YAAcI,QAAQH;YAAYI,WAAW;gBAAC;oBAAEC,SAAS;gBAAE;gBAAG;oBAAEA,SAAS;gBAAE;aAAE;QAAC;IAClG,CAAA,EAAG;AAEH,4EAA4E,GAC5E,OAAO,MAAME,OAAOd,wBAAwBC,sBAAsB;AAElE,OAAO,MAAMc,aAAaf,wBAAwBC,mBAAmB;IAAEC,eAAeH,aAAaiB,YAAY;AAAC,IAAI;AAEpH,OAAO,MAAMC,cAAcjB,wBAAwBC,mBAAmB;IAAEC,eAAeH,aAAamB,cAAc;AAAC,IAAI"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Fade';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,SAAS"}
1
+ {"version":3,"sources":["../src/components/Fade/index.ts"],"sourcesContent":["export * from './Fade';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,SAAS"}
@@ -50,7 +50,7 @@ export const ScaleSnappy = createPresenceComponentVariant(Scale, {
50
50
  easing: motionTokens.curveAccelerateMax
51
51
  }
52
52
  });
53
- export const ScaleExaggerated = createPresenceComponentVariant(Scale, {
53
+ export const ScaleRelaxed = createPresenceComponentVariant(Scale, {
54
54
  enter: {
55
55
  duration: motionTokens.durationSlow,
56
56
  easing: motionTokens.curveDecelerateMax
@@ -1 +1 @@
1
- {"version":3,"sources":["Scale.ts"],"sourcesContent":["import {\n motionTokens,\n PresenceMotionFn,\n createPresenceComponent,\n createPresenceComponentVariant,\n} from '@fluentui/react-motion';\n\n/** Define a presence motion for scale in/out */\nconst scaleMotion: PresenceMotionFn<{ animateOpacity?: boolean }> = ({ 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\n return {\n enter: {\n duration: motionTokens.durationGentle,\n easing: motionTokens.curveDecelerateMax,\n keyframes: enterKeyframes,\n },\n exit: { duration: motionTokens.durationNormal, easing: motionTokens.curveAccelerateMax, keyframes: exitKeyframes },\n };\n};\n\n/** A React component that applies scale in/out transitions to its children. */\nexport const Scale = createPresenceComponent(scaleMotion);\n\nexport const ScaleSnappy = createPresenceComponentVariant(Scale, {\n enter: { duration: motionTokens.durationNormal, easing: motionTokens.curveDecelerateMax },\n exit: { duration: motionTokens.durationFast, easing: motionTokens.curveAccelerateMax },\n});\n\nexport const ScaleExaggerated = createPresenceComponentVariant(Scale, {\n enter: { duration: motionTokens.durationSlow, easing: motionTokens.curveDecelerateMax },\n exit: { duration: motionTokens.durationGentle, easing: motionTokens.curveAccelerateMax },\n});\n"],"names":["motionTokens","createPresenceComponent","createPresenceComponentVariant","scaleMotion","animateOpacity","fromOpacity","toOpacity","fromScale","toScale","enterKeyframes","opacity","transform","visibility","exitKeyframes","enter","duration","durationGentle","easing","curveDecelerateMax","keyframes","exit","durationNormal","curveAccelerateMax","Scale","ScaleSnappy","durationFast","ScaleExaggerated","durationSlow"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,YAAY,EAEZC,uBAAuB,EACvBC,8BAA8B,QACzB,yBAAyB;AAEhC,8CAA8C,GAC9C,MAAMC,cAA8D,CAAC,EAAEC,iBAAiB,IAAI,EAAE;IAC5F,MAAMC,cAAcD,iBAAiB,IAAI;IACzC,MAAME,YAAY;IAClB,MAAMC,YAAY,KAAK,wCAAwC;IAC/D,MAAMC,UAAU;IAEhB,MAAMC,iBAAiB;QACrB;YAAEC,SAASL;YAAaM,WAAW,CAAC,QAAQ,EAAEJ,UAAU,EAAE,EAAEA,UAAU,IAAI,CAAC;YAAEK,YAAY;QAAU;QACnG;YAAEF,SAASJ;YAAWK,WAAW,CAAC,QAAQ,EAAEH,QAAQ,EAAE,EAAEA,QAAQ,IAAI,CAAC;QAAC;KACvE;IAED,MAAMK,gBAAgB;QACpB;YAAEH,SAASJ;YAAWK,WAAW,CAAC,QAAQ,EAAEH,QAAQ,EAAE,EAAEA,QAAQ,IAAI,CAAC;QAAC;QACtE;YAAEE,SAASL;YAAaM,WAAW,CAAC,QAAQ,EAAEJ,UAAU,EAAE,EAAEA,UAAU,IAAI,CAAC;YAAEK,YAAY;QAAS;KACnG;IAED,OAAO;QACLE,OAAO;YACLC,UAAUf,aAAagB,cAAc;YACrCC,QAAQjB,aAAakB,kBAAkB;YACvCC,WAAWV;QACb;QACAW,MAAM;YAAEL,UAAUf,aAAaqB,cAAc;YAAEJ,QAAQjB,aAAasB,kBAAkB;YAAEH,WAAWN;QAAc;IACnH;AACF;AAEA,6EAA6E,GAC7E,OAAO,MAAMU,QAAQtB,wBAAwBE,aAAa;AAE1D,OAAO,MAAMqB,cAActB,+BAA+BqB,OAAO;IAC/DT,OAAO;QAAEC,UAAUf,aAAaqB,cAAc;QAAEJ,QAAQjB,aAAakB,kBAAkB;IAAC;IACxFE,MAAM;QAAEL,UAAUf,aAAayB,YAAY;QAAER,QAAQjB,aAAasB,kBAAkB;IAAC;AACvF,GAAG;AAEH,OAAO,MAAMI,mBAAmBxB,+BAA+BqB,OAAO;IACpET,OAAO;QAAEC,UAAUf,aAAa2B,YAAY;QAAEV,QAAQjB,aAAakB,kBAAkB;IAAC;IACtFE,MAAM;QAAEL,UAAUf,aAAagB,cAAc;QAAEC,QAAQjB,aAAasB,kBAAkB;IAAC;AACzF,GAAG"}
1
+ {"version":3,"sources":["../src/components/Scale/Scale.ts"],"sourcesContent":["import {\n motionTokens,\n PresenceMotionFn,\n createPresenceComponent,\n createPresenceComponentVariant,\n} from '@fluentui/react-motion';\n\n/** Define a presence motion for scale in/out */\nconst scaleMotion: PresenceMotionFn<{ animateOpacity?: boolean }> = ({ 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\n return {\n enter: {\n duration: motionTokens.durationGentle,\n easing: motionTokens.curveDecelerateMax,\n keyframes: enterKeyframes,\n },\n exit: { duration: motionTokens.durationNormal, easing: motionTokens.curveAccelerateMax, keyframes: exitKeyframes },\n };\n};\n\n/** A React component that applies scale in/out transitions to its children. */\nexport const Scale = createPresenceComponent(scaleMotion);\n\nexport const ScaleSnappy = createPresenceComponentVariant(Scale, {\n enter: { duration: motionTokens.durationNormal, easing: motionTokens.curveDecelerateMax },\n exit: { duration: motionTokens.durationFast, easing: motionTokens.curveAccelerateMax },\n});\n\nexport const ScaleRelaxed = createPresenceComponentVariant(Scale, {\n enter: { duration: motionTokens.durationSlow, easing: motionTokens.curveDecelerateMax },\n exit: { duration: motionTokens.durationGentle, easing: motionTokens.curveAccelerateMax },\n});\n"],"names":["motionTokens","createPresenceComponent","createPresenceComponentVariant","scaleMotion","animateOpacity","fromOpacity","toOpacity","fromScale","toScale","enterKeyframes","opacity","transform","visibility","exitKeyframes","enter","duration","durationGentle","easing","curveDecelerateMax","keyframes","exit","durationNormal","curveAccelerateMax","Scale","ScaleSnappy","durationFast","ScaleRelaxed","durationSlow"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SACEA,YAAY,EAEZC,uBAAuB,EACvBC,8BAA8B,QACzB,yBAAyB;AAEhC,8CAA8C,GAC9C,MAAMC,cAA8D,CAAC,EAAEC,iBAAiB,IAAI,EAAE;IAC5F,MAAMC,cAAcD,iBAAiB,IAAI;IACzC,MAAME,YAAY;IAClB,MAAMC,YAAY,KAAK,wCAAwC;IAC/D,MAAMC,UAAU;IAEhB,MAAMC,iBAAiB;QACrB;YAAEC,SAASL;YAAaM,WAAW,CAAC,QAAQ,EAAEJ,UAAU,EAAE,EAAEA,UAAU,IAAI,CAAC;YAAEK,YAAY;QAAU;QACnG;YAAEF,SAASJ;YAAWK,WAAW,CAAC,QAAQ,EAAEH,QAAQ,EAAE,EAAEA,QAAQ,IAAI,CAAC;QAAC;KACvE;IAED,MAAMK,gBAAgB;QACpB;YAAEH,SAASJ;YAAWK,WAAW,CAAC,QAAQ,EAAEH,QAAQ,EAAE,EAAEA,QAAQ,IAAI,CAAC;QAAC;QACtE;YAAEE,SAASL;YAAaM,WAAW,CAAC,QAAQ,EAAEJ,UAAU,EAAE,EAAEA,UAAU,IAAI,CAAC;YAAEK,YAAY;QAAS;KACnG;IAED,OAAO;QACLE,OAAO;YACLC,UAAUf,aAAagB,cAAc;YACrCC,QAAQjB,aAAakB,kBAAkB;YACvCC,WAAWV;QACb;QACAW,MAAM;YAAEL,UAAUf,aAAaqB,cAAc;YAAEJ,QAAQjB,aAAasB,kBAAkB;YAAEH,WAAWN;QAAc;IACnH;AACF;AAEA,6EAA6E,GAC7E,OAAO,MAAMU,QAAQtB,wBAAwBE,aAAa;AAE1D,OAAO,MAAMqB,cAActB,+BAA+BqB,OAAO;IAC/DT,OAAO;QAAEC,UAAUf,aAAaqB,cAAc;QAAEJ,QAAQjB,aAAakB,kBAAkB;IAAC;IACxFE,MAAM;QAAEL,UAAUf,aAAayB,YAAY;QAAER,QAAQjB,aAAasB,kBAAkB;IAAC;AACvF,GAAG;AAEH,OAAO,MAAMI,eAAexB,+BAA+BqB,OAAO;IAChET,OAAO;QAAEC,UAAUf,aAAa2B,YAAY;QAAEV,QAAQjB,aAAakB,kBAAkB;IAAC;IACtFE,MAAM;QAAEL,UAAUf,aAAagB,cAAc;QAAEC,QAAQjB,aAAasB,kBAAkB;IAAC;AACzF,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Scale';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,UAAU"}
1
+ {"version":3,"sources":["../src/components/Scale/index.ts"],"sourcesContent":["export * from './Scale';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,UAAU"}
package/lib/index.js CHANGED
@@ -1,3 +1,3 @@
1
- export { Collapse, CollapseSnappy, CollapseExaggerated, createCollapsePresence } from './components/Collapse';
2
- export { Fade, FadeSnappy, FadeExaggerated } from './components/Fade';
3
- export { Scale, ScaleSnappy, ScaleExaggerated } from './components/Scale';
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 } from './components/Scale';