indicator-ui 0.0.45 → 0.0.46
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.
package/dist/index.js
CHANGED
|
@@ -10119,6 +10119,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
10119
10119
|
*
|
|
10120
10120
|
* ```'exit-up'``` - производит анимацию скрытия сверху.
|
|
10121
10121
|
*
|
|
10122
|
+
* ```'hide'``` - изначально скрывает элемент.
|
|
10123
|
+
*
|
|
10124
|
+
* ```'show'``` - изначально показывает элемент.
|
|
10125
|
+
*
|
|
10122
10126
|
* ---
|
|
10123
10127
|
* Учтите, что анимации **"снизу"** сужают компонент, поэтому он будет деформироваться.
|
|
10124
10128
|
* При высокой (автор проводил тесты на 300ms) скорости анимации это незаметно (если вы не Флеш).
|
|
@@ -10129,6 +10133,12 @@ function SlideTransition({ children, animation, additionStyles, animationOptions
|
|
|
10129
10133
|
const lastClientHeight = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(undefined);
|
|
10130
10134
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {
|
|
10131
10135
|
lastClientHeight.current = mainRef.current.clientHeight;
|
|
10136
|
+
if (animation === 'hide') {
|
|
10137
|
+
animateDropWrapperRef.current.style.display = 'none';
|
|
10138
|
+
}
|
|
10139
|
+
else if (animation === 'show') {
|
|
10140
|
+
animateDropWrapperRef.current.style.display = 'block';
|
|
10141
|
+
}
|
|
10132
10142
|
}, []);
|
|
10133
10143
|
const getConfig = (type) => {
|
|
10134
10144
|
if (type in animationOptions) {
|
|
@@ -10138,6 +10148,7 @@ function SlideTransition({ children, animation, additionStyles, animationOptions
|
|
|
10138
10148
|
};
|
|
10139
10149
|
const animateExitDown = () => {
|
|
10140
10150
|
const animateConfig = getConfig('exit-down');
|
|
10151
|
+
animateDropWrapperRef.current.style.display = 'block';
|
|
10141
10152
|
const animateDropWrapper = animateDropWrapperRef.current.animate([
|
|
10142
10153
|
{ transform: 'scaleY(1)', transformOrigin: 'bottom' },
|
|
10143
10154
|
{ transform: 'scaleY(0)', transformOrigin: 'bottom' },
|
|
@@ -10152,6 +10163,7 @@ function SlideTransition({ children, animation, additionStyles, animationOptions
|
|
|
10152
10163
|
};
|
|
10153
10164
|
const animateExitUp = () => {
|
|
10154
10165
|
const mainHeight = mainRef.current.clientHeight;
|
|
10166
|
+
animateDropWrapperRef.current.style.display = 'block';
|
|
10155
10167
|
lastClientHeight.current = mainHeight;
|
|
10156
10168
|
const animateConfig = getConfig('exit-up');
|
|
10157
10169
|
const animateDropWrapper = animateDropWrapperRef.current.animate([
|