UNPKG

@kopexa/sight

Version:

Kopexa Sight Design System — React component library for GRC applications

133 lines (129 loc) 3.06 kB
"use client"; "use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/components/dialog/transition.ts var transition_exports = {}; __export(transition_exports, { scaleInOut: () => scaleInOut }); module.exports = __toCommonJS(transition_exports); // ../../utilities/motion-utils/src/transition-utils.ts var TRANSITION_EASINGS = { ease: [0.36, 0.66, 0.4, 1], easeIn: [0.4, 0, 1, 1], easeOut: [0, 0, 0.2, 1], easeInOut: [0.4, 0, 0.2, 1], spring: [0.155, 1.105, 0.295, 1.12], springOut: [0.57, -0.15, 0.62, 0.07], softSpring: [0.16, 1.11, 0.3, 1.02] }; var TRANSITION_DEFAULTS = { enter: { duration: 0.2, ease: TRANSITION_EASINGS.easeOut }, exit: { duration: 0.1, ease: TRANSITION_EASINGS.easeIn } }; var TRANSITION_VARIANTS = { fade: { enter: { opacity: 1, transition: { duration: 0.4, ease: TRANSITION_EASINGS.ease } }, exit: { opacity: 0, transition: { duration: 0.3, ease: TRANSITION_EASINGS.ease } } }, scaleSpringOpacity: { initial: { opacity: 0, transform: "scale(0.8)" }, enter: { opacity: 1, transform: "scale(1)", transition: { type: "spring", bounce: 0, duration: 0.3 } }, exit: { opacity: 0, transform: "scale(0.96)", transition: { ease: TRANSITION_EASINGS.easeOut, bounce: 0, duration: 0.15 } } }, scale: { enter: { scale: 1 }, exit: { scale: 0.95 } } }; // src/components/dialog/transition.ts var scaleInOut = { enter: { scale: "var(--scale-enter)", y: "var(--slide-enter)", opacity: 1, willChange: "auto", transition: { scale: { duration: 0.4, ease: TRANSITION_EASINGS.ease }, opacity: { duration: 0.4, ease: TRANSITION_EASINGS.ease }, y: { type: "spring", bounce: 0, duration: 0.6 } } }, exit: { scale: "var(--scale-exit)", y: "var(--slide-exit)", opacity: 0, willChange: "transform", transition: { duration: 0.3, ease: TRANSITION_EASINGS.ease } } }; // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { scaleInOut });