first commit

This commit is contained in:
Stefan Hacker
2026-04-03 09:38:48 +02:00
commit 37ad745546
47450 changed files with 3120798 additions and 0 deletions
+10
View File
@@ -0,0 +1,10 @@
import type { IAnimationStyles, IAnimationVariables } from '../types/IAnimationStyles';
/**
* Exporting raw duraction values and easing functions to be used in custom animations
*/
export declare const AnimationVariables: IAnimationVariables;
/**
* All Fabric standard animations, exposed as json objects referencing predefined
* keyframes. These objects can be mixed in with other class definitions.
*/
export declare const AnimationStyles: IAnimationStyles;
+156
View File
@@ -0,0 +1,156 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AnimationStyles = exports.AnimationVariables = void 0;
var merge_styles_1 = require("@fluentui/merge-styles");
/* Register the keyframes */
var EASING_FUNCTION_1 = 'cubic-bezier(.1,.9,.2,1)';
var EASING_FUNCTION_2 = 'cubic-bezier(.1,.25,.75,.9)';
var DURATION_1 = '0.167s';
var DURATION_2 = '0.267s';
var DURATION_3 = '0.367s';
var DURATION_4 = '0.467s';
var FADE_IN = (0, merge_styles_1.keyframes)({
from: { opacity: 0 },
to: { opacity: 1 },
});
var FADE_OUT = (0, merge_styles_1.keyframes)({
from: { opacity: 1 },
to: { opacity: 0, visibility: 'hidden' },
});
var SLIDE_RIGHT_IN10 = _createSlideInX(-10);
var SLIDE_RIGHT_IN20 = _createSlideInX(-20);
var SLIDE_RIGHT_IN40 = _createSlideInX(-40);
var SLIDE_RIGHT_IN400 = _createSlideInX(-400);
var SLIDE_LEFT_IN10 = _createSlideInX(10);
var SLIDE_LEFT_IN20 = _createSlideInX(20);
var SLIDE_LEFT_IN40 = _createSlideInX(40);
var SLIDE_LEFT_IN400 = _createSlideInX(400);
var SLIDE_UP_IN10 = _createSlideInY(10);
var SLIDE_UP_IN20 = _createSlideInY(20);
var SLIDE_DOWN_IN10 = _createSlideInY(-10);
var SLIDE_DOWN_IN20 = _createSlideInY(-20);
var SLIDE_RIGHT_OUT10 = _createSlideOutX(10);
var SLIDE_RIGHT_OUT20 = _createSlideOutX(20);
var SLIDE_RIGHT_OUT40 = _createSlideOutX(40);
var SLIDE_RIGHT_OUT400 = _createSlideOutX(400);
var SLIDE_LEFT_OUT10 = _createSlideOutX(-10);
var SLIDE_LEFT_OUT20 = _createSlideOutX(-20);
var SLIDE_LEFT_OUT40 = _createSlideOutX(-40);
var SLIDE_LEFT_OUT400 = _createSlideOutX(-400);
var SLIDE_UP_OUT10 = _createSlideOutY(-10);
var SLIDE_UP_OUT20 = _createSlideOutY(-20);
var SLIDE_DOWN_OUT10 = _createSlideOutY(10);
var SLIDE_DOWN_OUT20 = _createSlideOutY(20);
var SCALE_UP100 = (0, merge_styles_1.keyframes)({
from: { transform: 'scale3d(.98,.98,1)' },
to: { transform: 'scale3d(1,1,1)' },
});
var SCALE_DOWN98 = (0, merge_styles_1.keyframes)({
from: { transform: 'scale3d(1,1,1)' },
to: { transform: 'scale3d(.98,.98,1)' },
});
var SCALE_DOWN100 = (0, merge_styles_1.keyframes)({
from: { transform: 'scale3d(1.03,1.03,1)' },
to: { transform: 'scale3d(1,1,1)' },
});
var SCALE_UP103 = (0, merge_styles_1.keyframes)({
from: { transform: 'scale3d(1,1,1)' },
to: { transform: 'scale3d(1.03,1.03,1)' },
});
var ROTATE90 = (0, merge_styles_1.keyframes)({
from: { transform: 'rotateZ(0deg)' },
to: { transform: 'rotateZ(90deg)' },
});
var ROTATE_N90 = (0, merge_styles_1.keyframes)({
from: { transform: 'rotateZ(0deg)' },
to: { transform: 'rotateZ(-90deg)' },
});
/**
* Exporting raw duraction values and easing functions to be used in custom animations
*/
exports.AnimationVariables = {
easeFunction1: EASING_FUNCTION_1,
easeFunction2: EASING_FUNCTION_2,
durationValue1: DURATION_1,
durationValue2: DURATION_2,
durationValue3: DURATION_3,
durationValue4: DURATION_4,
};
/**
* All Fabric standard animations, exposed as json objects referencing predefined
* keyframes. These objects can be mixed in with other class definitions.
*/
exports.AnimationStyles = {
slideRightIn10: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_RIGHT_IN10), DURATION_3, EASING_FUNCTION_1),
slideRightIn20: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_RIGHT_IN20), DURATION_3, EASING_FUNCTION_1),
slideRightIn40: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_RIGHT_IN40), DURATION_3, EASING_FUNCTION_1),
slideRightIn400: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_RIGHT_IN400), DURATION_3, EASING_FUNCTION_1),
slideLeftIn10: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_LEFT_IN10), DURATION_3, EASING_FUNCTION_1),
slideLeftIn20: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_LEFT_IN20), DURATION_3, EASING_FUNCTION_1),
slideLeftIn40: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_LEFT_IN40), DURATION_3, EASING_FUNCTION_1),
slideLeftIn400: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_LEFT_IN400), DURATION_3, EASING_FUNCTION_1),
slideUpIn10: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_UP_IN10), DURATION_3, EASING_FUNCTION_1),
slideUpIn20: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_UP_IN20), DURATION_3, EASING_FUNCTION_1),
slideDownIn10: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_DOWN_IN10), DURATION_3, EASING_FUNCTION_1),
slideDownIn20: _createAnimation("".concat(FADE_IN, ",").concat(SLIDE_DOWN_IN20), DURATION_3, EASING_FUNCTION_1),
slideRightOut10: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_RIGHT_OUT10), DURATION_3, EASING_FUNCTION_1),
slideRightOut20: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_RIGHT_OUT20), DURATION_3, EASING_FUNCTION_1),
slideRightOut40: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_RIGHT_OUT40), DURATION_3, EASING_FUNCTION_1),
slideRightOut400: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_RIGHT_OUT400), DURATION_3, EASING_FUNCTION_1),
slideLeftOut10: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_LEFT_OUT10), DURATION_3, EASING_FUNCTION_1),
slideLeftOut20: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_LEFT_OUT20), DURATION_3, EASING_FUNCTION_1),
slideLeftOut40: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_LEFT_OUT40), DURATION_3, EASING_FUNCTION_1),
slideLeftOut400: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_LEFT_OUT400), DURATION_3, EASING_FUNCTION_1),
slideUpOut10: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_UP_OUT10), DURATION_3, EASING_FUNCTION_1),
slideUpOut20: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_UP_OUT20), DURATION_3, EASING_FUNCTION_1),
slideDownOut10: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_DOWN_OUT10), DURATION_3, EASING_FUNCTION_1),
slideDownOut20: _createAnimation("".concat(FADE_OUT, ",").concat(SLIDE_DOWN_OUT20), DURATION_3, EASING_FUNCTION_1),
scaleUpIn100: _createAnimation("".concat(FADE_IN, ",").concat(SCALE_UP100), DURATION_3, EASING_FUNCTION_1),
scaleDownIn100: _createAnimation("".concat(FADE_IN, ",").concat(SCALE_DOWN100), DURATION_3, EASING_FUNCTION_1),
scaleUpOut103: _createAnimation("".concat(FADE_OUT, ",").concat(SCALE_UP103), DURATION_1, EASING_FUNCTION_2),
scaleDownOut98: _createAnimation("".concat(FADE_OUT, ",").concat(SCALE_DOWN98), DURATION_1, EASING_FUNCTION_2),
fadeIn100: _createAnimation(FADE_IN, DURATION_1, EASING_FUNCTION_2),
fadeIn200: _createAnimation(FADE_IN, DURATION_2, EASING_FUNCTION_2),
fadeIn400: _createAnimation(FADE_IN, DURATION_3, EASING_FUNCTION_2),
fadeIn500: _createAnimation(FADE_IN, DURATION_4, EASING_FUNCTION_2),
fadeOut100: _createAnimation(FADE_OUT, DURATION_1, EASING_FUNCTION_2),
fadeOut200: _createAnimation(FADE_OUT, DURATION_2, EASING_FUNCTION_2),
fadeOut400: _createAnimation(FADE_OUT, DURATION_3, EASING_FUNCTION_2),
fadeOut500: _createAnimation(FADE_OUT, DURATION_4, EASING_FUNCTION_2),
rotate90deg: _createAnimation(ROTATE90, '0.1s', EASING_FUNCTION_2),
rotateN90deg: _createAnimation(ROTATE_N90, '0.1s', EASING_FUNCTION_2),
// expandCollapse 100/200/400, delay 100/200
};
function _createAnimation(animationName, animationDuration, animationTimingFunction) {
return {
animationName: animationName,
animationDuration: animationDuration,
animationTimingFunction: animationTimingFunction,
animationFillMode: 'both',
};
}
function _createSlideInX(fromX) {
return (0, merge_styles_1.keyframes)({
from: { transform: "translate3d(".concat(fromX, "px,0,0)"), pointerEvents: 'none' },
to: { transform: "translate3d(0,0,0)", pointerEvents: 'auto' },
});
}
function _createSlideInY(fromY) {
return (0, merge_styles_1.keyframes)({
from: { transform: "translate3d(0,".concat(fromY, "px,0)"), pointerEvents: 'none' },
to: { transform: "translate3d(0,0,0)", pointerEvents: 'auto' },
});
}
function _createSlideOutX(toX) {
return (0, merge_styles_1.keyframes)({
from: { transform: "translate3d(0,0,0)" },
to: { transform: "translate3d(".concat(toX, "px,0,0)") },
});
}
function _createSlideOutY(toY) {
return (0, merge_styles_1.keyframes)({
from: { transform: "translate3d(0,0,0)" },
to: { transform: "translate3d(0,".concat(toY, "px,0)") },
});
}
//# sourceMappingURL=AnimationStyles.js.map
File diff suppressed because one or more lines are too long
+26
View File
@@ -0,0 +1,26 @@
export declare namespace MotionDurations {
const duration1 = "100ms";
const duration2 = "200ms";
const duration3 = "300ms";
const duration4 = "400ms";
}
export declare namespace MotionTimings {
const accelerate = "cubic-bezier(0.9, 0.1, 1, 0.2)";
const decelerate = "cubic-bezier(0.1, 0.9, 0.2, 1)";
const linear = "cubic-bezier(0, 0, 1, 1)";
const standard = "cubic-bezier(0.8, 0, 0.2, 1)";
}
export declare namespace MotionAnimations {
const fadeIn: string;
const fadeOut: string;
const scaleDownIn: string;
const scaleDownOut: string;
const slideLeftOut: string;
const slideRightOut: string;
const slideLeftIn: string;
const slideRightIn: string;
const slideUpOut: string;
const slideDownOut: string;
const slideUpIn: string;
const slideDownIn: string;
}
+85
View File
@@ -0,0 +1,85 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MotionAnimations = exports.MotionTimings = exports.MotionDurations = void 0;
var merge_styles_1 = require("@fluentui/merge-styles");
var fadeInAnimationName = (0, merge_styles_1.keyframes)({
from: { opacity: 0 },
to: { opacity: 1 },
});
var fadeOutAnimationName = (0, merge_styles_1.keyframes)({
from: { opacity: 1 },
to: { opacity: 0 },
});
var scaleDownInAnimationName = (0, merge_styles_1.keyframes)({
from: { transform: 'scale3d(1.15, 1.15, 1)' },
to: { transform: 'scale3d(1, 1, 1)' },
});
var scaleDownOutAnimationName = (0, merge_styles_1.keyframes)({
from: { transform: 'scale3d(1, 1, 1)' },
to: { transform: 'scale3d(0.9, 0.9, 1)' },
});
var slideLeftOutAnimationName = (0, merge_styles_1.keyframes)({
from: { transform: 'translate3d(0, 0, 0)' },
to: { transform: 'translate3d(-48px, 0, 0)' },
});
var slideRightOutAnimationName = (0, merge_styles_1.keyframes)({
from: { transform: 'translate3d(0, 0, 0)' },
to: { transform: 'translate3d(48px, 0, 0)' },
});
var slideLeftInAnimationName = (0, merge_styles_1.keyframes)({
from: { transform: 'translate3d(48px, 0, 0)' },
to: { transform: 'translate3d(0, 0, 0)' },
});
var slideRightInAnimationName = (0, merge_styles_1.keyframes)({
from: { transform: 'translate3d(-48px, 0, 0)' },
to: { transform: 'translate3d(0, 0, 0)' },
});
var slideUpOutAnimationName = (0, merge_styles_1.keyframes)({
from: { transform: 'translate3d(0, 0, 0)' },
to: { transform: 'translate3d(0, -48px, 0)' },
});
var slideDownOutAnimationName = (0, merge_styles_1.keyframes)({
from: { transform: 'translate3d(0, 0, 0)' },
to: { transform: 'translate3d(0, 48px, 0)' },
});
var slideUpInAnimationName = (0, merge_styles_1.keyframes)({
from: { transform: 'translate3d(0, 48px, 0)' },
to: { transform: 'translate3d(0, 0, 0)' },
});
var slideDownInAnimationName = (0, merge_styles_1.keyframes)({
from: { transform: 'translate3d(0, -48px, 0)' },
to: { transform: 'translate3d(0, 0, 0)' },
});
var MotionDurations;
(function (MotionDurations) {
MotionDurations.duration1 = '100ms';
MotionDurations.duration2 = '200ms';
MotionDurations.duration3 = '300ms';
MotionDurations.duration4 = '400ms';
})(MotionDurations || (exports.MotionDurations = MotionDurations = {}));
var MotionTimings;
(function (MotionTimings) {
MotionTimings.accelerate = 'cubic-bezier(0.9, 0.1, 1, 0.2)';
MotionTimings.decelerate = 'cubic-bezier(0.1, 0.9, 0.2, 1)';
MotionTimings.linear = 'cubic-bezier(0, 0, 1, 1)';
MotionTimings.standard = 'cubic-bezier(0.8, 0, 0.2, 1)';
})(MotionTimings || (exports.MotionTimings = MotionTimings = {}));
function _createAnimation(animationName, animationDuration, animationTimingFunction) {
return "".concat(animationName, " ").concat(animationDuration, " ").concat(animationTimingFunction);
}
var MotionAnimations;
(function (MotionAnimations) {
MotionAnimations.fadeIn = _createAnimation(fadeInAnimationName, MotionDurations.duration1, MotionTimings.linear);
MotionAnimations.fadeOut = _createAnimation(fadeOutAnimationName, MotionDurations.duration1, MotionTimings.linear);
MotionAnimations.scaleDownIn = _createAnimation(scaleDownInAnimationName, MotionDurations.duration3, MotionTimings.decelerate);
MotionAnimations.scaleDownOut = _createAnimation(scaleDownOutAnimationName, MotionDurations.duration3, MotionTimings.decelerate);
MotionAnimations.slideLeftOut = _createAnimation(slideLeftOutAnimationName, MotionDurations.duration1, MotionTimings.accelerate);
MotionAnimations.slideRightOut = _createAnimation(slideRightOutAnimationName, MotionDurations.duration1, MotionTimings.accelerate);
MotionAnimations.slideLeftIn = _createAnimation(slideLeftInAnimationName, MotionDurations.duration1, MotionTimings.decelerate);
MotionAnimations.slideRightIn = _createAnimation(slideRightInAnimationName, MotionDurations.duration1, MotionTimings.decelerate);
MotionAnimations.slideUpOut = _createAnimation(slideUpOutAnimationName, MotionDurations.duration1, MotionTimings.accelerate);
MotionAnimations.slideDownOut = _createAnimation(slideDownOutAnimationName, MotionDurations.duration1, MotionTimings.accelerate);
MotionAnimations.slideUpIn = _createAnimation(slideUpInAnimationName, MotionDurations.duration1, MotionTimings.decelerate);
MotionAnimations.slideDownIn = _createAnimation(slideDownInAnimationName, MotionDurations.duration1, MotionTimings.decelerate);
})(MotionAnimations || (exports.MotionAnimations = MotionAnimations = {}));
//# sourceMappingURL=FluentMotion.js.map
File diff suppressed because one or more lines are too long
+2
View File
@@ -0,0 +1,2 @@
export { MotionAnimations, MotionDurations, MotionTimings } from './FluentMotion';
export { AnimationStyles, AnimationVariables } from './AnimationStyles';
+11
View File
@@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AnimationVariables = exports.AnimationStyles = exports.MotionTimings = exports.MotionDurations = exports.MotionAnimations = void 0;
var FluentMotion_1 = require("./FluentMotion");
Object.defineProperty(exports, "MotionAnimations", { enumerable: true, get: function () { return FluentMotion_1.MotionAnimations; } });
Object.defineProperty(exports, "MotionDurations", { enumerable: true, get: function () { return FluentMotion_1.MotionDurations; } });
Object.defineProperty(exports, "MotionTimings", { enumerable: true, get: function () { return FluentMotion_1.MotionTimings; } });
var AnimationStyles_1 = require("./AnimationStyles");
Object.defineProperty(exports, "AnimationStyles", { enumerable: true, get: function () { return AnimationStyles_1.AnimationStyles; } });
Object.defineProperty(exports, "AnimationVariables", { enumerable: true, get: function () { return AnimationStyles_1.AnimationVariables; } });
//# sourceMappingURL=index.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["motion/index.ts"],"names":[],"mappings":";;;AAAA,+CAAkF;AAAzE,gHAAA,gBAAgB,OAAA;AAAE,+GAAA,eAAe,OAAA;AAAE,6GAAA,aAAa,OAAA;AACzD,qDAAwE;AAA/D,kHAAA,eAAe,OAAA;AAAE,qHAAA,kBAAkB,OAAA","sourcesContent":["export { MotionAnimations, MotionDurations, MotionTimings } from './FluentMotion';\nexport { AnimationStyles, AnimationVariables } from './AnimationStyles';\n"]}