UNPKG

tdesign-react

Version:
60 lines (54 loc) 2.22 kB
/** * tdesign v1.16.2 * (c) 2025 tdesign * @license MIT */ 'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var React = require('react'); var hooks_useConfig = require('./useConfig.js'); var configProvider_ConfigContext = require('../config-provider/ConfigContext.js'); require('../_chunks/dep-0fe55884.js'); require('../_chunks/dep-b325182b.js'); require('../_chunks/dep-17dea53e.js'); require('../_chunks/dep-a0cbf081.js'); require('dayjs'); require('../_chunks/dep-481a1ecc.js'); require('../_chunks/dep-474eb386.js'); require('../_chunks/dep-3b256bc0.js'); require('../_chunks/dep-4ce0670e.js'); require('../_chunks/dep-3448f35f.js'); require('../_chunks/dep-b6a3ada9.js'); require('../_chunks/dep-967e785f.js'); require('../_chunks/dep-5c8525ea.js'); require('../_chunks/dep-735cd5b9.js'); require('../_chunks/dep-bdafd287.js'); require('../_chunks/dep-4d300b8f.js'); require('../_chunks/dep-3332ad6f.js'); require('../_chunks/dep-98783318.js'); require('../_chunks/dep-fc884a8e.js'); require('../_chunks/dep-008b21d4.js'); require('../_chunks/dep-9193eded.js'); require('../_chunks/dep-afe817f9.js'); require('../_chunks/dep-0b70c7ec.js'); require('../_chunks/dep-a1e3e59b.js'); require('../_chunks/dep-24ab8f68.js'); require('../_chunks/dep-753b7d52.js'); function useAnimation() { var _useConfig = hooks_useConfig["default"](), animation = _useConfig.animation; var expand = configProvider_ConfigContext.EAnimationType.expand, ripple = configProvider_ConfigContext.EAnimationType.ripple, fade = configProvider_ConfigContext.EAnimationType.fade; var keepAnimation = React.useCallback(function (type) { var _animation$exclude, _animation$include; return animation && !((_animation$exclude = animation.exclude) !== null && _animation$exclude !== void 0 && _animation$exclude.includes(type)) && ((_animation$include = animation.include) === null || _animation$include === void 0 ? void 0 : _animation$include.includes(type)); }, [animation]); return { keepExpand: keepAnimation(expand), keepRipple: keepAnimation(ripple), keepFade: keepAnimation(fade) }; } exports["default"] = useAnimation; //# sourceMappingURL=useAnimation.js.map