@sandlada/mdk
Version:
A JavaScript library based on Material Design 3, providing data such as color, shape, shadow level, etc.
70 lines (69 loc) • 6.65 kB
TypeScript
import type { ICSSDeclaration } from '../interfaces/css-declaration.interface';
type EasingDeclaration<K extends string, T extends Readonly<[number, number, number, number]>> = `${K}: cubic-bezier(${T[0]}, ${T[1]}, ${T[2]}, ${T[3]})${';' | ''}`;
type EasingVariable<K extends string, T extends Readonly<[number, number, number, number]>> = `var(${K}, cubic-bezier(${T[0]}, ${T[1]}, ${T[2]}, ${T[3]}))`;
export declare class Easing<K extends string, T extends Readonly<[number, number, number, number]>> implements ICSSDeclaration<K, T, EasingDeclaration<K, T>, EasingVariable<K, T>> {
readonly Key: K;
readonly Value: T;
toJSON(): {
Key: K;
Value: T;
};
ToCSSDeclaration(): `${K}: cubic-bezier(${T[0]}, ${T[1]}, ${T[2]}, ${T[3]})`;
ToCSSDeclaration(options: {
Semicolon: true;
}): `${K}: cubic-bezier(${T[0]}, ${T[1]}, ${T[2]}, ${T[3]});`;
ToCSSDeclaration(options?: {
Semicolon?: boolean;
}): `${K}: cubic-bezier(${T[0]}, ${T[1]}, ${T[2]}, ${T[3]})${';' | ''}`;
ToCSSVariable(): `var(${K}, cubic-bezier(${T[0]}, ${T[1]}, ${T[2]}, ${T[3]}))`;
ToCSSValue(): string;
toString(): `${K}: cubic-bezier(${T[0]}, ${T[1]}, ${T[2]}, ${T[3]})`;
private constructor();
static readonly Standard: Easing<"--md-sys-motion-easing-standard", readonly [0.2, 0, 0, 1]>;
static readonly StandardAccelerate: Easing<"--md-sys-motion-easing-standard-accelerate", readonly [0.3, 0, 1, 1]>;
static readonly StandardDecelerate: Easing<"--md-sys-motion-easing-standard-decelerate", readonly [0, 0, 0, 1]>;
static readonly Emphasized: Easing<"--md-sys-motion-easing-emphasized", readonly [0.2, 0, 0, 1]>;
static readonly EmphasizedAccelerate: Easing<"--md-sys-motion-easing-emphasized-accelerate", readonly [0.3, 0, 0.8, 0.15]>;
static readonly EmphasizedDecelerate: Easing<"--md-sys-motion-easing-emphasized-decelerate", readonly [0.05, 0.7, 0.1, 1]>;
static readonly Legacy: Easing<"--md-sys-motion-easing-legacy", readonly [0.4, 0, 0.2, 1]>;
static readonly LegacyAccelerate: Easing<"--md-sys-motion-easing-legacy-accelerate", readonly [0.4, 0, 1, 1]>;
static readonly LegacyDecelerate: Easing<"--md-sys-motion-easing-legacy-decelerate", readonly [0, 0, 0.2, 1]>;
static readonly Linear: Easing<"--md-sys-motion-easing-linear", readonly [0, 0, 1, 1]>;
static readonly ExpressiveFastSpatial: Easing<"--md-sys-motion-easing-expressive-fast-spatial", readonly [0.42, 1.67, 0.21, 0.9]>;
static readonly ExpressiveDefaultSpatial: Easing<"--md-sys-motion-easing-expressive-default-spatial", readonly [0.38, 1.21, 0.22, 1]>;
static readonly ExpressiveSlowSpatial: Easing<"--md-sys-motion-easing-expressive-slow-spatial", readonly [0.39, 1.29, 0.35, 0.98]>;
static readonly ExpressiveFastEffects: Easing<"--md-sys-motion-easing-expressive-fast-effects", readonly [0.31, 0.94, 0.34, 1]>;
static readonly ExpressiveDefaultEffects: Easing<"--md-sys-motion-easing-expressive-default-effects", readonly [0.34, 0.8, 0.34, 1]>;
static readonly ExpressiveSlowEffects: Easing<"--md-sys-motion-easing-expressive-slow-effects", readonly [0.34, 0.88, 0.34, 1]>;
static readonly StandardFastSpatial: Easing<"--md-sys-motion-easing-standard-fast-spatial", readonly [0.27, 1.06, 0.18, 1]>;
static readonly StandardDefaultSpatial: Easing<"--md-sys-motion-easing-standard-default-spatial", readonly [0.27, 1.06, 0.18, 1]>;
static readonly StandardSlowSpatial: Easing<"--md-sys-motion-easing-standard-slow-spatial", readonly [0.27, 1.06, 0.18, 1]>;
static readonly StandardFastEffects: Easing<"--md-sys-motion-easing-standard-fast-effects", readonly [0.31, 0.94, 0.34, 1]>;
static readonly StandardDefaultEffects: Easing<"--md-sys-motion-easing-standard-default-effects", readonly [0.34, 0.8, 0.34, 1]>;
static readonly StandardSlowEffects: Easing<"--md-sys-motion-easing-standard-slow-effects", readonly [0.34, 0.88, 0.34, 1]>;
static readonly AllEnums: {
readonly Standard: Easing<"--md-sys-motion-easing-standard", readonly [0.2, 0, 0, 1]>;
readonly StandardAccelerate: Easing<"--md-sys-motion-easing-standard-accelerate", readonly [0.3, 0, 1, 1]>;
readonly StandardDecelerate: Easing<"--md-sys-motion-easing-standard-decelerate", readonly [0, 0, 0, 1]>;
readonly Emphasized: Easing<"--md-sys-motion-easing-emphasized", readonly [0.2, 0, 0, 1]>;
readonly EmphasizedAccelerate: Easing<"--md-sys-motion-easing-emphasized-accelerate", readonly [0.3, 0, 0.8, 0.15]>;
readonly EmphasizedDecelerate: Easing<"--md-sys-motion-easing-emphasized-decelerate", readonly [0.05, 0.7, 0.1, 1]>;
readonly Legacy: Easing<"--md-sys-motion-easing-legacy", readonly [0.4, 0, 0.2, 1]>;
readonly LegacyAccelerate: Easing<"--md-sys-motion-easing-legacy-accelerate", readonly [0.4, 0, 1, 1]>;
readonly LegacyDecelerate: Easing<"--md-sys-motion-easing-legacy-decelerate", readonly [0, 0, 0.2, 1]>;
readonly Linear: Easing<"--md-sys-motion-easing-linear", readonly [0, 0, 1, 1]>;
readonly ExpressiveFastSpatial: Easing<"--md-sys-motion-easing-expressive-fast-spatial", readonly [0.42, 1.67, 0.21, 0.9]>;
readonly ExpressiveDefaultSpatial: Easing<"--md-sys-motion-easing-expressive-default-spatial", readonly [0.38, 1.21, 0.22, 1]>;
readonly ExpressiveSlowSpatial: Easing<"--md-sys-motion-easing-expressive-slow-spatial", readonly [0.39, 1.29, 0.35, 0.98]>;
readonly ExpressiveFastEffects: Easing<"--md-sys-motion-easing-expressive-fast-effects", readonly [0.31, 0.94, 0.34, 1]>;
readonly ExpressiveDefaultEffects: Easing<"--md-sys-motion-easing-expressive-default-effects", readonly [0.34, 0.8, 0.34, 1]>;
readonly ExpressiveSlowEffects: Easing<"--md-sys-motion-easing-expressive-slow-effects", readonly [0.34, 0.88, 0.34, 1]>;
readonly StandardFastSpatial: Easing<"--md-sys-motion-easing-standard-fast-spatial", readonly [0.27, 1.06, 0.18, 1]>;
readonly StandardDefaultSpatial: Easing<"--md-sys-motion-easing-standard-default-spatial", readonly [0.27, 1.06, 0.18, 1]>;
readonly StandardSlowSpatial: Easing<"--md-sys-motion-easing-standard-slow-spatial", readonly [0.27, 1.06, 0.18, 1]>;
readonly StandardFastEffects: Easing<"--md-sys-motion-easing-standard-fast-effects", readonly [0.31, 0.94, 0.34, 1]>;
readonly StandardDefaultEffects: Easing<"--md-sys-motion-easing-standard-default-effects", readonly [0.34, 0.8, 0.34, 1]>;
readonly StandardSlowEffects: Easing<"--md-sys-motion-easing-standard-slow-effects", readonly [0.34, 0.88, 0.34, 1]>;
};
}
export {};