@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/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export { Collapse, CollapseSnappy, CollapseExaggerated, createCollapsePresence } from './components/Collapse';\nexport { Fade, FadeSnappy, FadeExaggerated } from './components/Fade';\nexport { Scale, ScaleSnappy, ScaleExaggerated } from './components/Scale';\n"],"names":["Collapse","CollapseSnappy","CollapseExaggerated","createCollapsePresence","Fade","FadeSnappy","FadeExaggerated","Scale","ScaleSnappy","ScaleExaggerated"],"rangeMappings":";;","mappings":"AAAA,SAASA,QAAQ,EAAEC,cAAc,EAAEC,mBAAmB,EAAEC,sBAAsB,QAAQ,wBAAwB;AAC9G,SAASC,IAAI,EAAEC,UAAU,EAAEC,eAAe,QAAQ,oBAAoB;AACtE,SAASC,KAAK,EAAEC,WAAW,EAAEC,gBAAgB,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, createFadePresence } from './components/Fade';\nexport { Scale, ScaleSnappy, ScaleRelaxed } from './components/Scale';\n"],"names":["Collapse","CollapseSnappy","CollapseRelaxed","CollapseDelayed","createCollapsePresence","createCollapseDelayedPresence","Fade","FadeSnappy","FadeRelaxed","createFadePresence","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,EAAEC,kBAAkB,QAAQ,oBAAoB;AACtF,SAASC,KAAK,EAAEC,WAAW,EAAEC,YAAY,QAAQ,qBAAqB"}
package/lib/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["types.ts"],"sourcesContent":["import type { MotionParam, PresenceMotionFn } from '@fluentui/react-motion';\n\n/**\n * This is a factory function that generates a motion function, which has variant params bound into it.\n * The generated motion function accepts other runtime params that aren't locked into the variant, but supplied at runtime.\n * This separation allows the variant to be defined once and reused with different runtime params which may be orthogonal to the variant params.\n * For example, a variant may define the duration and easing of a transition, which are fixed for all instances of the variant,\n * while the runtime params may give access to the target element, which is different for each instance.\n *\n * The generated motion function is also framework-independent, i.e. non-React.\n * It can be turned into a React component using `createPresenceComponent`.\n */\n// TODO: move to @fluentui/react-motion when stable\nexport type PresenceMotionFnCreator<\n MotionVariantParams extends Record<string, MotionParam> = {},\n MotionRuntimeParams extends Record<string, MotionParam> = {},\n> = (variantParams?: MotionVariantParams) => PresenceMotionFn<MotionRuntimeParams>;\n"],"names":[],"rangeMappings":";;;;;;;;;;","mappings":"AAEA;;;;;;;;;CASC,GACD,mDAAmD;AACnD,WAGmF"}
1
+ {"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { MotionParam, PresenceMotion, PresenceMotionFn } from '@fluentui/react-motion';\n\n/**\n * This is a factory function that generates a motion object from variant params, e.g. duration, easing, etc.\n * The generated object defines a presence motion with `enter` and `exit` transitions.\n * This motion object is declarative, i.e. data without side effects,\n * and it is framework-independent, i.e. non-React.\n * It can be turned into a React component using `createPresenceComponent`.\n */\n// TODO: move to @fluentui/react-motion when stable\nexport type PresenceMotionCreator<MotionVariantParams extends Record<string, MotionParam> = {}> = (\n variantParams?: MotionVariantParams,\n) => PresenceMotion;\n\n/**\n * This is a factory function that generates a motion function, which has variant params bound into it.\n * The generated motion function accepts other runtime params that aren't locked into the variant, but supplied at runtime.\n * This separation allows the variant to be defined once and reused with different runtime params which may be orthogonal to the variant params.\n * For example, a variant may define the duration and easing of a transition, which are fixed for all instances of the variant,\n * while the runtime params may give access to the target element, which is different for each instance.\n *\n * The generated motion function is also framework-independent, i.e. non-React.\n * It can be turned into a React component using `createPresenceComponent`.\n */\n// TODO: move to @fluentui/react-motion when stable\nexport type PresenceMotionFnCreator<\n MotionVariantParams extends Record<string, MotionParam> = {},\n MotionRuntimeParams extends Record<string, MotionParam> = {},\n> = (variantParams?: MotionVariantParams) => PresenceMotionFn<MotionRuntimeParams>;\n"],"names":[],"rangeMappings":";;;;;;;;;;","mappings":"AAcA;;;;;;;;;CASC,GACD,mDAAmD;AACnD,WAGmF"}
@@ -12,106 +12,97 @@ _export(exports, {
12
12
  Collapse: function() {
13
13
  return Collapse;
14
14
  },
15
- CollapseExaggerated: function() {
16
- return CollapseExaggerated;
15
+ CollapseDelayed: function() {
16
+ return CollapseDelayed;
17
+ },
18
+ CollapseRelaxed: function() {
19
+ return CollapseRelaxed;
17
20
  },
18
21
  CollapseSnappy: function() {
19
22
  return CollapseSnappy;
20
23
  },
24
+ createCollapseDelayedPresence: function() {
25
+ return createCollapseDelayedPresence;
26
+ },
21
27
  createCollapsePresence: function() {
22
28
  return createCollapsePresence;
23
29
  }
24
30
  });
25
31
  const _reactmotion = require("@fluentui/react-motion");
26
- const createCollapsePresence = ({ enterDuration = _reactmotion.motionTokens.durationNormal, enterEasing = _reactmotion.motionTokens.curveEasyEaseMax, exitDuration = enterDuration, exitEasing = enterEasing } = {})=>({ element, animateOpacity = true, orientation = 'vertical' })=>{
27
- const fromOpacity = 0;
28
- const toOpacity = 1;
29
- const fromSize = '0'; // Could be a custom param in the future to start with partially expanded width or height
30
- const measuredSize = orientation === 'horizontal' ? element.scrollWidth : element.scrollHeight;
31
- const toSize = `${measuredSize}px`;
32
- // use generic names for size and overflow, handling vertical or horizontal orientation
33
- const sizeName = orientation === 'horizontal' ? 'maxWidth' : 'maxHeight';
34
- const overflowName = orientation === 'horizontal' ? 'overflowX' : 'overflowY';
35
- // The enter transition is an array of up to 2 motion atoms: size and opacity.
32
+ const _collapseatoms = require("./collapse-atoms");
33
+ const createCollapseDelayedPresence = ({ // enter
34
+ enterSizeDuration = _reactmotion.motionTokens.durationNormal, enterOpacityDuration = enterSizeDuration, enterEasing = _reactmotion.motionTokens.curveEasyEaseMax, enterDelay = 0, // exit: durations and easing default to enter values for symmetry
35
+ exitSizeDuration = enterSizeDuration, exitOpacityDuration = enterOpacityDuration, exitEasing = enterEasing, exitDelay = 0 } = {})=>({ element, animateOpacity = true, orientation = 'vertical' })=>{
36
+ // ----- ENTER -----
37
+ // The enter transition is an array of up to 3 motion atoms: size, whitespace and opacity.
36
38
  const enterAtoms = [
37
- // Expand size (height or width)
38
- {
39
- keyframes: [
40
- {
41
- [sizeName]: fromSize,
42
- [overflowName]: 'hidden'
43
- },
44
- {
45
- [sizeName]: toSize,
46
- offset: 0.9999,
47
- [overflowName]: 'hidden'
48
- },
49
- {
50
- [sizeName]: 'unset',
51
- [overflowName]: 'unset'
52
- }
53
- ],
54
- duration: enterDuration,
39
+ (0, _collapseatoms.sizeEnterAtom)({
40
+ orientation,
41
+ duration: enterSizeDuration,
42
+ easing: enterEasing,
43
+ element
44
+ }),
45
+ (0, _collapseatoms.whitespaceEnterAtom)({
46
+ orientation,
47
+ duration: enterSizeDuration,
55
48
  easing: enterEasing
56
- }
49
+ })
57
50
  ];
58
51
  // Fade in only if animateOpacity is true. Otherwise, leave opacity unaffected.
59
52
  if (animateOpacity) {
60
- enterAtoms.push({
61
- keyframes: [
62
- {
63
- opacity: fromOpacity
64
- },
65
- {
66
- opacity: toOpacity
67
- }
68
- ],
69
- duration: enterDuration,
53
+ enterAtoms.push((0, _collapseatoms.opacityEnterAtom)({
54
+ duration: enterOpacityDuration,
70
55
  easing: enterEasing,
71
- fill: 'both'
72
- });
56
+ delay: enterDelay
57
+ }));
73
58
  }
74
- // The exit transition is an array of up to 2 motion atoms: opacity and size.
59
+ // ----- EXIT -----
60
+ // The exit transition is an array of up to 3 motion atoms: opacity, size and whitespace.
75
61
  const exitAtoms = [];
76
- // Fade out only if animateOpacity is false. Otherwise, leave opacity unaffected.
62
+ // Fade out only if animateOpacity is true. Otherwise, leave opacity unaffected.
77
63
  if (animateOpacity) {
78
- exitAtoms.push({
79
- keyframes: [
80
- {
81
- opacity: toOpacity
82
- },
83
- {
84
- opacity: fromOpacity
85
- }
86
- ],
87
- duration: exitDuration,
64
+ exitAtoms.push((0, _collapseatoms.opacityExitAtom)({
65
+ duration: exitOpacityDuration,
88
66
  easing: exitEasing
89
- });
67
+ }));
90
68
  }
91
- exitAtoms.push({
92
- keyframes: [
93
- {
94
- [sizeName]: toSize,
95
- [overflowName]: 'hidden'
96
- },
97
- {
98
- [sizeName]: fromSize,
99
- [overflowName]: 'hidden'
100
- }
101
- ],
102
- duration: exitDuration,
69
+ exitAtoms.push((0, _collapseatoms.sizeExitAtom)({
70
+ orientation,
71
+ duration: exitSizeDuration,
103
72
  easing: exitEasing,
104
- fill: 'both'
105
- });
73
+ element,
74
+ delay: exitDelay
75
+ }));
76
+ exitAtoms.push((0, _collapseatoms.whitespaceExitAtom)({
77
+ orientation,
78
+ duration: exitSizeDuration,
79
+ easing: exitEasing,
80
+ delay: exitDelay
81
+ }));
106
82
  return {
107
83
  enter: enterAtoms,
108
84
  exit: exitAtoms
109
85
  };
110
86
  };
87
+ const createCollapsePresence = ({ enterDuration = _reactmotion.motionTokens.durationNormal, enterEasing = _reactmotion.motionTokens.curveEasyEaseMax, exitDuration = enterDuration, exitEasing = enterEasing } = {})=>// Implement a regular collapse as a special case of the delayed collapse,
88
+ // where the delays are zero, and the size and opacity durations are equal.
89
+ createCollapseDelayedPresence({
90
+ enterSizeDuration: enterDuration,
91
+ enterEasing,
92
+ exitSizeDuration: exitDuration,
93
+ exitEasing
94
+ });
111
95
  const Collapse = (0, _reactmotion.createPresenceComponent)(createCollapsePresence());
112
96
  const CollapseSnappy = (0, _reactmotion.createPresenceComponent)(createCollapsePresence({
113
97
  enterDuration: _reactmotion.motionTokens.durationFast
114
98
  }));
115
- const CollapseExaggerated = (0, _reactmotion.createPresenceComponent)(createCollapsePresence({
99
+ const CollapseRelaxed = (0, _reactmotion.createPresenceComponent)(createCollapsePresence({
116
100
  enterDuration: _reactmotion.motionTokens.durationSlower
117
101
  }));
102
+ const CollapseDelayed = (0, _reactmotion.createPresenceComponent)(createCollapseDelayedPresence({
103
+ enterSizeDuration: _reactmotion.motionTokens.durationNormal,
104
+ enterOpacityDuration: _reactmotion.motionTokens.durationSlower,
105
+ enterDelay: _reactmotion.motionTokens.durationNormal,
106
+ exitDelay: _reactmotion.motionTokens.durationSlower,
107
+ enterEasing: _reactmotion.motionTokens.curveEasyEase
108
+ }));
@@ -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":["Collapse","CollapseExaggerated","CollapseSnappy","createCollapsePresence","enterDuration","motionTokens","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","createPresenceComponent","durationFast","durationSlower"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAqGaA,QAAAA;eAAAA;;IAMAC,mBAAAA;eAAAA;;IAJAC,cAAAA;eAAAA;;IA3EAC,sBAAAA;eAAAA;;;6BA5BqD;AA4B3D,MAAMA,yBACX,CAAC,EACCC,gBAAgBC,yBAAAA,CAAaC,cAAc,EAC3CC,cAAcF,yBAAAA,CAAaG,gBAAgB,EAC3CC,eAAeL,aAAa,EAC5BM,aAAaH,WAAW,EACzB,GAAG,CAAC,CAAC,GACN,CAAC,EAAEI,OAAO,EAAEC,iBAAiB,IAAI,EAAEC,cAAc,UAAU,EAAE;QAC3D,MAAMC,cAAc;QACpB,MAAMC,YAAY;QAClB,MAAMC,WAAW,KAAK,yFAAyF;QAC/G,MAAMC,eAAeJ,gBAAgB,eAAeF,QAAQO,WAAW,GAAGP,QAAQQ,YAAY;QAC9F,MAAMC,SAAS,CAAC,EAAEH,aAAa,EAAE,CAAC;QAClC,uFAAuF;QACvF,MAAMI,WAAWR,gBAAgB,eAAe,aAAa;QAC7D,MAAMS,eAAeT,gBAAgB,eAAe,cAAc;QAElE,8EAA8E;QAC9E,MAAMU,aAA2B;YAC/B,gCAAgC;YAChC;gBACEC,WAAW;oBACT;wBACE,CAACH,SAAS,EAAEL;wBACZ,CAACM,aAAa,EAAE;oBAClB;oBACA;wBAAE,CAACD,SAAS,EAAED;wBAAQK,QAAQ;wBAAQ,CAACH,aAAa,EAAE;oBAAS;oBAC/D;wBAAE,CAACD,SAAS,EAAE;wBAAS,CAACC,aAAa,EAAE;oBAAQ;iBAChD;gBACDI,UAAUtB;gBACVuB,QAAQpB;YACV;SACD;QACD,+EAA+E;QAC/E,IAAIK,gBAAgB;YAClBW,WAAWK,IAAI,CAAC;gBACdJ,WAAW;oBAAC;wBAAEK,SAASf;oBAAY;oBAAG;wBAAEe,SAASd;oBAAU;iBAAE;gBAC7DW,UAAUtB;gBACVuB,QAAQpB;gBACRuB,MAAM;YACR;QACF;QAEA,6EAA6E;QAC7E,MAAMC,YAA0B,EAAE;QAClC,iFAAiF;QACjF,IAAInB,gBAAgB;YAClBmB,UAAUH,IAAI,CAAC;gBACbJ,WAAW;oBAAC;wBAAEK,SAASd;oBAAU;oBAAG;wBAAEc,SAASf;oBAAY;iBAAE;gBAC7DY,UAAUjB;gBACVkB,QAAQjB;YACV;QACF;QACAqB,UAAUH,IAAI,CAEZ;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;AAGK,MAAM/B,WAAWkC,IAAAA,oCAAAA,EAAwB/B;AAEzC,MAAMD,iBAAiBgC,IAAAA,oCAAAA,EAC5B/B,uBAAuB;IAAEC,eAAeC,yBAAAA,CAAa8B,YAAY;AAAC;AAG7D,MAAMlC,sBAAsBiC,IAAAA,oCAAAA,EACjC/B,uBAAuB;IAAEC,eAAeC,yBAAAA,CAAa+B,cAAc;AAAC"}
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":["Collapse","CollapseDelayed","CollapseRelaxed","CollapseSnappy","createCollapseDelayedPresence","createCollapsePresence","enterSizeDuration","motionTokens","durationNormal","enterOpacityDuration","enterEasing","curveEasyEaseMax","enterDelay","exitSizeDuration","exitOpacityDuration","exitEasing","exitDelay","element","animateOpacity","orientation","enterAtoms","sizeEnterAtom","duration","easing","whitespaceEnterAtom","push","opacityEnterAtom","delay","exitAtoms","opacityExitAtom","sizeExitAtom","whitespaceExitAtom","enter","exit","enterDuration","exitDuration","createPresenceComponent","durationFast","durationSlower","curveEasyEase"],"rangeMappings":";;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EAAC;YACXX;YACAG,UAAUT;YACVU,QAAQR;YACRE;YACAU,OAAOX;QACT;QAEFY,UAAUH,IAAI,CACZM,IAAAA,iCAAkB,EAAC;YACjBZ;YACAG,UAAUT;YACVU,QAAQR;YACRY,OAAOX;QACT;QAGF,OAAO;YACLgB,OAAOZ;YACPa,MAAML;QACR;IACF;AAGK,MAAMvB,yBAAgG,CAAC,EAC5G6B,gBAAgB3B,yBAAY,CAACC,cAAc,EAC3CE,cAAcH,yBAAY,CAACI,gBAAgB,EAC3CwB,eAAeD,aAAa,EAC5BnB,aAAaL,WAAW,EACzB,GAAG,CAAC,CAAC,GACJ,0EAA0E;IAC1E,2EAA2E;IAC3EN,8BAA8B;QAC5BE,mBAAmB4B;QACnBxB;QACAG,kBAAkBsB;QAClBpB;IACF;AAGK,MAAMf,WAAWoC,IAAAA,oCAAuB,EAAC/B;AAEzC,MAAMF,iBAAiBiC,IAAAA,oCAAuB,EACnD/B,uBAAuB;IAAE6B,eAAe3B,yBAAY,CAAC8B,YAAY;AAAC;AAG7D,MAAMnC,kBAAkBkC,IAAAA,oCAAuB,EACpD/B,uBAAuB;IAAE6B,eAAe3B,yBAAY,CAAC+B,cAAc;AAAC;AAG/D,MAAMrC,kBAAkBmC,IAAAA,oCAAuB,EACpDhC,8BAA8B;IAC5BE,mBAAmBC,yBAAY,CAACC,cAAc;IAC9CC,sBAAsBF,yBAAY,CAAC+B,cAAc;IACjD1B,YAAYL,yBAAY,CAACC,cAAc;IACvCQ,WAAWT,yBAAY,CAAC+B,cAAc;IACtC5B,aAAaH,yBAAY,CAACgC,aAAa;AACzC"}
@@ -0,0 +1,149 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ opacityEnterAtom: function() {
13
+ return opacityEnterAtom;
14
+ },
15
+ opacityExitAtom: function() {
16
+ return opacityExitAtom;
17
+ },
18
+ sizeEnterAtom: function() {
19
+ return sizeEnterAtom;
20
+ },
21
+ sizeExitAtom: function() {
22
+ return sizeExitAtom;
23
+ },
24
+ whitespaceEnterAtom: function() {
25
+ return whitespaceEnterAtom;
26
+ },
27
+ whitespaceExitAtom: function() {
28
+ return whitespaceExitAtom;
29
+ }
30
+ });
31
+ // ----- SIZE -----
32
+ const sizeValuesForOrientation = (orientation, element)=>{
33
+ const sizeName = orientation === 'horizontal' ? 'maxWidth' : 'maxHeight';
34
+ const overflowName = orientation === 'horizontal' ? 'overflowX' : 'overflowY';
35
+ const measuredSize = orientation === 'horizontal' ? element.scrollWidth : element.scrollHeight;
36
+ const toSize = `${measuredSize}px`;
37
+ return {
38
+ sizeName,
39
+ overflowName,
40
+ toSize
41
+ };
42
+ };
43
+ const sizeEnterAtom = ({ orientation, duration, easing, element, fromSize = '0' })=>{
44
+ const { sizeName, overflowName, toSize } = sizeValuesForOrientation(orientation, element);
45
+ return {
46
+ keyframes: [
47
+ {
48
+ [sizeName]: fromSize,
49
+ [overflowName]: 'hidden'
50
+ },
51
+ {
52
+ [sizeName]: toSize,
53
+ offset: 0.9999,
54
+ [overflowName]: 'hidden'
55
+ },
56
+ {
57
+ [sizeName]: 'unset',
58
+ [overflowName]: 'unset'
59
+ }
60
+ ],
61
+ duration,
62
+ easing
63
+ };
64
+ };
65
+ const sizeExitAtom = ({ orientation, duration, easing, element, delay = 0, fromSize = '0' })=>{
66
+ const { sizeName, overflowName, toSize } = sizeValuesForOrientation(orientation, element);
67
+ return {
68
+ keyframes: [
69
+ {
70
+ [sizeName]: toSize,
71
+ [overflowName]: 'hidden'
72
+ },
73
+ {
74
+ [sizeName]: fromSize,
75
+ [overflowName]: 'hidden'
76
+ }
77
+ ],
78
+ duration,
79
+ easing,
80
+ fill: 'both',
81
+ delay
82
+ };
83
+ };
84
+ // ----- WHITESPACE -----
85
+ // Whitespace animation currently includes padding, but could be extended to handle margin.
86
+ const whitespaceValuesForOrientation = (orientation)=>{
87
+ const paddingStart = orientation === 'horizontal' ? 'paddingLeft' : 'paddingTop';
88
+ const paddingEnd = orientation === 'horizontal' ? 'paddingRight' : 'paddingBottom';
89
+ return {
90
+ paddingStart,
91
+ paddingEnd
92
+ };
93
+ };
94
+ const whitespaceEnterAtom = ({ orientation, duration, easing })=>{
95
+ const { paddingStart, paddingEnd } = whitespaceValuesForOrientation(orientation);
96
+ return {
97
+ keyframes: [
98
+ {
99
+ [paddingStart]: '0',
100
+ [paddingEnd]: '0',
101
+ offset: 0
102
+ }
103
+ ],
104
+ duration,
105
+ easing
106
+ };
107
+ };
108
+ const whitespaceExitAtom = ({ orientation, duration, easing, delay = 0 })=>{
109
+ const { paddingStart, paddingEnd } = whitespaceValuesForOrientation(orientation);
110
+ return {
111
+ keyframes: [
112
+ {
113
+ [paddingStart]: '0',
114
+ [paddingEnd]: '0',
115
+ offset: 1
116
+ }
117
+ ],
118
+ duration,
119
+ easing,
120
+ fill: 'forwards',
121
+ delay
122
+ };
123
+ };
124
+ const opacityEnterAtom = ({ duration, easing, delay = 0, fromOpacity = 0, toOpacity = 1 })=>({
125
+ keyframes: [
126
+ {
127
+ opacity: fromOpacity
128
+ },
129
+ {
130
+ opacity: toOpacity
131
+ }
132
+ ],
133
+ duration,
134
+ easing,
135
+ delay,
136
+ fill: 'both'
137
+ });
138
+ const opacityExitAtom = ({ duration, easing, fromOpacity = 0, toOpacity = 1 })=>({
139
+ keyframes: [
140
+ {
141
+ opacity: toOpacity
142
+ },
143
+ {
144
+ opacity: fromOpacity
145
+ }
146
+ ],
147
+ duration,
148
+ easing
149
+ });
@@ -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":["opacityEnterAtom","opacityExitAtom","sizeEnterAtom","sizeExitAtom","whitespaceEnterAtom","whitespaceExitAtom","sizeValuesForOrientation","orientation","element","sizeName","overflowName","measuredSize","scrollWidth","scrollHeight","toSize","duration","easing","fromSize","keyframes","offset","delay","fill","whitespaceValuesForOrientation","paddingStart","paddingEnd","fromOpacity","toOpacity","opacity"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;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YAAG;gBAAEC,SAASF;YAAY;SAAE;QAC7DV;QACAC;IACF,CAAA"}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"rangeMappings":"","mappings":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Collapse';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
1
+ {"version":3,"sources":["../src/components/Collapse/index.ts"],"sourcesContent":["export * from './Collapse';\nexport type { CollapseRuntimeParams } from './collapse-types';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
@@ -12,50 +12,47 @@ _export(exports, {
12
12
  Fade: function() {
13
13
  return Fade;
14
14
  },
15
- FadeExaggerated: function() {
16
- return FadeExaggerated;
15
+ FadeRelaxed: function() {
16
+ return FadeRelaxed;
17
17
  },
18
18
  FadeSnappy: function() {
19
19
  return FadeSnappy;
20
- }
21
- });
22
- const _reactmotion = require("@fluentui/react-motion");
23
- const duration = _reactmotion.motionTokens.durationNormal;
24
- const easing = _reactmotion.motionTokens.curveEasyEase;
25
- /** Define a presence motion for fade in/out */ const fadeMotion = {
26
- enter: {
27
- duration,
28
- easing,
29
- keyframes: [
30
- {
31
- opacity: 0
32
- },
33
- {
34
- opacity: 1
35
- }
36
- ]
37
20
  },
38
- exit: {
39
- duration,
40
- easing,
41
- keyframes: [
42
- {
43
- opacity: 1
44
- },
45
- {
46
- opacity: 0
47
- }
48
- ]
49
- }
50
- };
51
- const Fade = (0, _reactmotion.createPresenceComponent)(fadeMotion);
52
- const FadeSnappy = (0, _reactmotion.createPresenceComponentVariant)(Fade, {
53
- all: {
54
- duration: _reactmotion.motionTokens.durationFast
55
- }
56
- });
57
- const FadeExaggerated = (0, _reactmotion.createPresenceComponentVariant)(Fade, {
58
- all: {
59
- duration: _reactmotion.motionTokens.durationGentle
21
+ createFadePresence: function() {
22
+ return createFadePresence;
60
23
  }
61
24
  });
25
+ const _reactmotion = require("@fluentui/react-motion");
26
+ const createFadePresence = ({ enterDuration = _reactmotion.motionTokens.durationNormal, enterEasing = _reactmotion.motionTokens.curveEasyEase, exitDuration = enterDuration, exitEasing = enterEasing } = {})=>({
27
+ enter: {
28
+ duration: enterDuration,
29
+ easing: enterEasing,
30
+ keyframes: [
31
+ {
32
+ opacity: 0
33
+ },
34
+ {
35
+ opacity: 1
36
+ }
37
+ ]
38
+ },
39
+ exit: {
40
+ duration: exitDuration,
41
+ easing: exitEasing,
42
+ keyframes: [
43
+ {
44
+ opacity: 1
45
+ },
46
+ {
47
+ opacity: 0
48
+ }
49
+ ]
50
+ }
51
+ });
52
+ const Fade = (0, _reactmotion.createPresenceComponent)(createFadePresence());
53
+ const FadeSnappy = (0, _reactmotion.createPresenceComponent)(createFadePresence({
54
+ enterDuration: _reactmotion.motionTokens.durationFast
55
+ }));
56
+ const FadeRelaxed = (0, _reactmotion.createPresenceComponent)(createFadePresence({
57
+ enterDuration: _reactmotion.motionTokens.durationGentle
58
+ }));
@@ -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":["Fade","FadeExaggerated","FadeSnappy","duration","motionTokens","durationNormal","easing","curveEasyEase","fadeMotion","enter","keyframes","opacity","exit","createPresenceComponent","createPresenceComponentVariant","all","durationFast","durationGentle"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAiBaA,IAAAA;eAAAA;;IAIAC,eAAAA;eAAAA;;IAFAC,UAAAA;eAAAA;;;6BAdN;AAEP,MAAMC,WAAWC,yBAAAA,CAAaC,cAAc;AAC5C,MAAMC,SAASF,yBAAAA,CAAaG,aAAa;AAEzC,8CAA8C,GAC9C,MAAMC,aAA6B;IACjCC,OAAO;QAAEN;QAAUG;QAAQI,WAAW;YAAC;gBAAEC,SAAS;YAAE;YAAG;gBAAEA,SAAS;YAAE;SAAE;IAAC;IACvEC,MAAM;QAAET;QAAUG;QAAQI,WAAW;YAAC;gBAAEC,SAAS;YAAE;YAAG;gBAAEA,SAAS;YAAE;SAAE;IAAC;AACxE;AAGO,MAAMX,OAAOa,IAAAA,oCAAAA,EAAwBL;AAErC,MAAMN,aAAaY,IAAAA,2CAAAA,EAA+Bd,MAAM;IAAEe,KAAK;QAAEZ,UAAUC,yBAAAA,CAAaY,YAAY;IAAC;AAAE;AAEvG,MAAMf,kBAAkBa,IAAAA,2CAAAA,EAA+Bd,MAAM;IAAEe,KAAK;QAAEZ,UAAUC,yBAAAA,CAAaa,cAAc;IAAC;AAAE"}
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":["Fade","FadeRelaxed","FadeSnappy","createFadePresence","enterDuration","motionTokens","durationNormal","enterEasing","curveEasyEase","exitDuration","exitEasing","enter","duration","easing","keyframes","opacity","exit","createPresenceComponent","durationFast","durationGentle"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IA6BaA,IAAI;eAAJA;;IAIAC,WAAW;eAAXA;;IAFAC,UAAU;eAAVA;;IAbAC,kBAAkB;eAAlBA;;;6BAlByC;AAkB/C,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,OAAO;YAAEC,UAAUR;YAAeS,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;AAGO,MAAMf,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 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Fade';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
1
+ {"version":3,"sources":["../src/components/Fade/index.ts"],"sourcesContent":["export * from './Fade';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
@@ -12,8 +12,8 @@ _export(exports, {
12
12
  Scale: function() {
13
13
  return Scale;
14
14
  },
15
- ScaleExaggerated: function() {
16
- return ScaleExaggerated;
15
+ ScaleRelaxed: function() {
16
+ return ScaleRelaxed;
17
17
  },
18
18
  ScaleSnappy: function() {
19
19
  return ScaleSnappy;
@@ -71,7 +71,7 @@ const ScaleSnappy = (0, _reactmotion.createPresenceComponentVariant)(Scale, {
71
71
  easing: _reactmotion.motionTokens.curveAccelerateMax
72
72
  }
73
73
  });
74
- const ScaleExaggerated = (0, _reactmotion.createPresenceComponentVariant)(Scale, {
74
+ const ScaleRelaxed = (0, _reactmotion.createPresenceComponentVariant)(Scale, {
75
75
  enter: {
76
76
  duration: _reactmotion.motionTokens.durationSlow,
77
77
  easing: _reactmotion.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":["Scale","ScaleExaggerated","ScaleSnappy","scaleMotion","animateOpacity","fromOpacity","toOpacity","fromScale","toScale","enterKeyframes","opacity","transform","visibility","exitKeyframes","enter","duration","motionTokens","durationGentle","easing","curveDecelerateMax","keyframes","exit","durationNormal","curveAccelerateMax","createPresenceComponent","createPresenceComponentVariant","durationFast","durationSlow"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAmCaA,KAAAA;eAAAA;;IAOAC,gBAA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EO,MAAMtB,mBAAmBwB,IAAAA,2CAAAA,EAA+BzB,OAAO;IACpEc,OAAO;QAAEC,UAAUC,yBAAAA,CAAaW,YAAY;QAAET,QAAQF,yBAAAA,CAAaG,kBAAkB;IAAC;IACtFE,MAAM;QAAEN,UAAUC,yBAAAA,CAAaC,cAAc;QAAEC,QAAQF,yBAAAA,CAAaO,kBAAkB;IAAC;AACzF"}
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":["Scale","ScaleRelaxed","ScaleSnappy","scaleMotion","animateOpacity","fromOpacity","toOpacity","fromScale","toScale","enterKeyframes","opacity","transform","visibility","exitKeyframes","enter","duration","motionTokens","durationGentle","easing","curveDecelerateMax","keyframes","exit","durationNormal","curveAccelerateMax","createPresenceComponent","createPresenceComponentVariant","durationFast","durationSlow"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAmCaA,KAAK;eAALA;;IAOAC,YAAY;eAAZA;;IALAC,WAAW;eAAXA;;;6BAhCN;AAEP,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,UAAUC,yBAAY,CAACC,cAAc;YACrCC,QAAQF,yBAAY,CAACG,kBAAkB;YACvCC,WAAWX;QACb;QACAY,MAAM;YAAEN,UAAUC,yBAAY,CAACM,cAAc;YAAEJ,QAAQF,yBAAY,CAACO,kBAAkB;YAAEH,WAAWP;QAAc;IACnH;AACF;AAGO,MAAMb,QAAQwB,IAAAA,oCAAuB,EAACrB;AAEtC,MAAMD,cAAcuB,IAAAA,2CAA8B,EAACzB,OAAO;IAC/Dc,OAAO;QAAEC,UAAUC,yBAAY,CAACM,cAAc;QAAEJ,QAAQF,yBAAY,CAACG,kBAAkB;IAAC;IACxFE,MAAM;QAAEN,UAAUC,yBAAY,CAACU,YAAY;QAAER,QAAQF,yBAAY,CAACO,kBAAkB;IAAC;AACvF;AAEO,MAAMtB,eAAewB,IAAAA,2CAA8B,EAACzB,OAAO;IAChEc,OAAO;QAAEC,UAAUC,yBAAY,CAACW,YAAY;QAAET,QAAQF,yBAAY,CAACG,kBAAkB;IAAC;IACtFE,MAAM;QAAEN,UAAUC,yBAAY,CAACC,cAAc;QAAEC,QAAQF,yBAAY,CAACO,kBAAkB;IAAC;AACzF"}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Scale';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
1
+ {"version":3,"sources":["../src/components/Scale/index.ts"],"sourcesContent":["export * from './Scale';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
@@ -12,8 +12,11 @@ _export(exports, {
12
12
  Collapse: function() {
13
13
  return _Collapse.Collapse;
14
14
  },
15
- CollapseExaggerated: function() {
16
- return _Collapse.CollapseExaggerated;
15
+ CollapseDelayed: function() {
16
+ return _Collapse.CollapseDelayed;
17
+ },
18
+ CollapseRelaxed: function() {
19
+ return _Collapse.CollapseRelaxed;
17
20
  },
18
21
  CollapseSnappy: function() {
19
22
  return _Collapse.CollapseSnappy;
@@ -21,8 +24,8 @@ _export(exports, {
21
24
  Fade: function() {
22
25
  return _Fade.Fade;
23
26
  },
24
- FadeExaggerated: function() {
25
- return _Fade.FadeExaggerated;
27
+ FadeRelaxed: function() {
28
+ return _Fade.FadeRelaxed;
26
29
  },
27
30
  FadeSnappy: function() {
28
31
  return _Fade.FadeSnappy;
@@ -30,14 +33,20 @@ _export(exports, {
30
33
  Scale: function() {
31
34
  return _Scale.Scale;
32
35
  },
33
- ScaleExaggerated: function() {
34
- return _Scale.ScaleExaggerated;
36
+ ScaleRelaxed: function() {
37
+ return _Scale.ScaleRelaxed;
35
38
  },
36
39
  ScaleSnappy: function() {
37
40
  return _Scale.ScaleSnappy;
38
41
  },
42
+ createCollapseDelayedPresence: function() {
43
+ return _Collapse.createCollapseDelayedPresence;
44
+ },
39
45
  createCollapsePresence: function() {
40
46
  return _Collapse.createCollapsePresence;
47
+ },
48
+ createFadePresence: function() {
49
+ return _Fade.createFadePresence;
41
50
  }
42
51
  });
43
52
  const _Collapse = require("./components/Collapse");
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"sourcesContent":["export { Collapse, CollapseSnappy, CollapseExaggerated, createCollapsePresence } from './components/Collapse';\nexport { Fade, FadeSnappy, FadeExaggerated } from './components/Fade';\nexport { Scale, ScaleSnappy, ScaleExaggerated } from './components/Scale';\n"],"names":["Collapse","CollapseExaggerated","CollapseSnappy","Fade","FadeExaggerated","FadeSnappy","Scale","ScaleExaggerated","ScaleSnappy","createCollapsePresence"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,QAAQ;eAARA,kBAAQ;;IAAkBC,mBAAmB;eAAnBA,6BAAmB;;IAAnCC,cAAc;eAAdA,wBAAc;;IACxBC,IAAI;eAAJA,UAAI;;IAAcC,eAAe;eAAfA,qBAAe;;IAA3BC,UAAU;eAAVA,gBAAU;;IAChBC,KAAK;eAALA,YAAK;;IAAeC,gBAAgB;eAAhBA,uBAAgB;;IAA7BC,WAAW;eAAXA,kBAAW;;IAF6BC,sBAAsB;eAAtBA,gCAAsB;;;0BAAQ;sBACpC;uBACG"}
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 } from './components/Scale';\n"],"names":["Collapse","CollapseDelayed","CollapseRelaxed","CollapseSnappy","Fade","FadeRelaxed","FadeSnappy","Scale","ScaleRelaxed","ScaleSnappy","createCollapseDelayedPresence","createCollapsePresence","createFadePresence"],"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;;;0BAFnD;sBAE2D;uBACjB"}