@cloud-ru/uikit-product-mobile-drawer 0.9.15 → 0.9.17
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/CHANGELOG.md +21 -0
- package/dist/cjs/components/MobileDrawer/MobileDrawer.d.ts +40 -0
- package/dist/cjs/components/MobileDrawer/MobileDrawer.js +29 -0
- package/dist/cjs/components/MobileDrawer/index.d.ts +1 -0
- package/dist/cjs/components/MobileDrawer/index.js +17 -0
- package/dist/cjs/components/MobileDrawer/styles.module.css +4 -0
- package/dist/cjs/components/MobileDrawerCustom/MobileDrawerCustom.d.ts +50 -0
- package/dist/cjs/components/MobileDrawerCustom/MobileDrawerCustom.js +72 -0
- package/dist/cjs/components/MobileDrawerCustom/constants.d.ts +10 -0
- package/dist/cjs/components/MobileDrawerCustom/constants.js +25 -0
- package/dist/cjs/components/MobileDrawerCustom/hooks.d.ts +22 -0
- package/dist/cjs/components/MobileDrawerCustom/hooks.js +164 -0
- package/dist/cjs/components/MobileDrawerCustom/index.d.ts +1 -0
- package/dist/cjs/components/MobileDrawerCustom/index.js +17 -0
- package/dist/cjs/components/MobileDrawerCustom/motion.css +117 -0
- package/dist/cjs/components/MobileDrawerCustom/styles.module.css +182 -0
- package/dist/cjs/components/index.d.ts +2 -0
- package/dist/cjs/components/index.js +18 -0
- package/dist/cjs/constants.d.ts +36 -0
- package/dist/cjs/constants.js +39 -0
- package/dist/cjs/helperComponents/Body/Body.d.ts +10 -0
- package/dist/cjs/helperComponents/Body/Body.js +27 -0
- package/dist/cjs/helperComponents/Body/index.d.ts +1 -0
- package/dist/cjs/helperComponents/Body/index.js +17 -0
- package/dist/cjs/helperComponents/Body/styles.module.css +9 -0
- package/dist/cjs/helperComponents/ButtonClose/ButtonClose.d.ts +5 -0
- package/dist/cjs/helperComponents/ButtonClose/ButtonClose.js +13 -0
- package/dist/cjs/helperComponents/ButtonClose/index.d.ts +1 -0
- package/dist/cjs/helperComponents/ButtonClose/index.js +17 -0
- package/dist/cjs/helperComponents/ButtonClose/styles.module.css +35 -0
- package/dist/cjs/helperComponents/Footer/Footer.d.ts +10 -0
- package/dist/cjs/helperComponents/Footer/Footer.js +27 -0
- package/dist/cjs/helperComponents/Footer/index.d.ts +1 -0
- package/dist/cjs/helperComponents/Footer/index.js +17 -0
- package/dist/cjs/helperComponents/Footer/styles.module.css +14 -0
- package/dist/cjs/helperComponents/Header/Header.d.ts +20 -0
- package/dist/cjs/helperComponents/Header/Header.js +29 -0
- package/dist/cjs/helperComponents/Header/index.d.ts +1 -0
- package/dist/cjs/helperComponents/Header/index.js +17 -0
- package/dist/cjs/helperComponents/Header/styles.module.css +32 -0
- package/dist/cjs/helperComponents/WithTooltip/WithTooltip.d.ts +8 -0
- package/dist/cjs/helperComponents/WithTooltip/WithTooltip.js +11 -0
- package/dist/cjs/helperComponents/WithTooltip/index.d.ts +1 -0
- package/dist/cjs/helperComponents/WithTooltip/index.js +17 -0
- package/dist/cjs/helperComponents/index.d.ts +4 -0
- package/dist/cjs/helperComponents/index.js +20 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +17 -0
- package/dist/cjs/types.d.ts +6 -0
- package/dist/cjs/types.js +2 -0
- package/dist/esm/components/MobileDrawer/MobileDrawer.d.ts +40 -0
- package/dist/esm/components/MobileDrawer/MobileDrawer.js +23 -0
- package/dist/esm/components/MobileDrawer/index.d.ts +1 -0
- package/dist/esm/components/MobileDrawer/index.js +1 -0
- package/dist/esm/components/MobileDrawer/styles.module.css +4 -0
- package/dist/esm/components/MobileDrawerCustom/MobileDrawerCustom.d.ts +50 -0
- package/dist/esm/components/MobileDrawerCustom/MobileDrawerCustom.js +66 -0
- package/dist/esm/components/MobileDrawerCustom/constants.d.ts +10 -0
- package/dist/esm/components/MobileDrawerCustom/constants.js +21 -0
- package/dist/esm/components/MobileDrawerCustom/hooks.d.ts +22 -0
- package/dist/esm/components/MobileDrawerCustom/hooks.js +158 -0
- package/dist/esm/components/MobileDrawerCustom/index.d.ts +1 -0
- package/dist/esm/components/MobileDrawerCustom/index.js +1 -0
- package/dist/esm/components/MobileDrawerCustom/motion.css +117 -0
- package/dist/esm/components/MobileDrawerCustom/styles.module.css +182 -0
- package/dist/esm/components/index.d.ts +2 -0
- package/dist/esm/components/index.js +2 -0
- package/dist/esm/constants.d.ts +36 -0
- package/dist/esm/constants.js +36 -0
- package/dist/esm/helperComponents/Body/Body.d.ts +10 -0
- package/dist/esm/helperComponents/Body/Body.js +21 -0
- package/dist/esm/helperComponents/Body/index.d.ts +1 -0
- package/dist/esm/helperComponents/Body/index.js +1 -0
- package/dist/esm/helperComponents/Body/styles.module.css +9 -0
- package/dist/esm/helperComponents/ButtonClose/ButtonClose.d.ts +5 -0
- package/dist/esm/helperComponents/ButtonClose/ButtonClose.js +7 -0
- package/dist/esm/helperComponents/ButtonClose/index.d.ts +1 -0
- package/dist/esm/helperComponents/ButtonClose/index.js +1 -0
- package/dist/esm/helperComponents/ButtonClose/styles.module.css +35 -0
- package/dist/esm/helperComponents/Footer/Footer.d.ts +10 -0
- package/dist/esm/helperComponents/Footer/Footer.js +21 -0
- package/dist/esm/helperComponents/Footer/index.d.ts +1 -0
- package/dist/esm/helperComponents/Footer/index.js +1 -0
- package/dist/esm/helperComponents/Footer/styles.module.css +14 -0
- package/dist/esm/helperComponents/Header/Header.d.ts +20 -0
- package/dist/esm/helperComponents/Header/Header.js +23 -0
- package/dist/esm/helperComponents/Header/index.d.ts +1 -0
- package/dist/esm/helperComponents/Header/index.js +1 -0
- package/dist/esm/helperComponents/Header/styles.module.css +32 -0
- package/dist/esm/helperComponents/WithTooltip/WithTooltip.d.ts +8 -0
- package/dist/esm/helperComponents/WithTooltip/WithTooltip.js +8 -0
- package/dist/esm/helperComponents/WithTooltip/index.d.ts +1 -0
- package/dist/esm/helperComponents/WithTooltip/index.js +1 -0
- package/dist/esm/helperComponents/index.d.ts +4 -0
- package/dist/esm/helperComponents/index.js +4 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/types.d.ts +6 -0
- package/dist/esm/types.js +1 -0
- package/package.json +5 -4
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,27 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 0.9.17 (2025-11-13)
|
|
7
|
+
|
|
8
|
+
### Only dependencies have been changed
|
|
9
|
+
* [@cloud-ru/uikit-product-icons@15.1.3](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/icons/CHANGELOG.md)
|
|
10
|
+
* [@cloud-ru/uikit-product-mobile-tooltip@0.4.67](https://gitverse.ru/cloud-ru-tech/uikit-product/-/blob/master/packages/mobile-tooltip/CHANGELOG.md)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
## 0.9.16 (2025-11-12)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Bug Fixes
|
|
20
|
+
|
|
21
|
+
* **PD-3377:** contributors update to publish all packages ([719fd3e](https://gitverse.ru/cloud-ru-tech/uikit-product/commits/719fd3e1249e247443b125c47ea408d92c8395c3))
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
6
27
|
## 0.9.15 (2025-11-12)
|
|
7
28
|
|
|
8
29
|
### Only dependencies have been changed
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { MobileTooltipProps } from '@sbercloud/uikit-product-mobile-tooltip';
|
|
3
|
+
import { ButtonFilledProps, ButtonOutlineProps, ButtonSimpleProps } from '@snack-uikit/button';
|
|
4
|
+
import { DrawerBodyProps, DrawerHeaderProps } from '../../helperComponents';
|
|
5
|
+
import { Size } from '../../types';
|
|
6
|
+
import { MobileDrawerCustomProps } from '../MobileDrawerCustom';
|
|
7
|
+
export type DrawerProps = Omit<MobileDrawerCustomProps, 'size' | 'children' | 'nestedDrawer' | 'push' | 'closeButtonEnabled' | 'swipeEnabled'> & Pick<DrawerHeaderProps, 'titleTooltip' | 'image'> & Pick<DrawerBodyProps, 'content'> & {
|
|
8
|
+
/** Заголовок */
|
|
9
|
+
title: string;
|
|
10
|
+
/** Подзаголовок */
|
|
11
|
+
subtitle?: string;
|
|
12
|
+
/** Размер */
|
|
13
|
+
size?: Size;
|
|
14
|
+
/** Основная кнопка */
|
|
15
|
+
approveButton?: Omit<ButtonFilledProps, 'size'> & {
|
|
16
|
+
tooltip?: MobileTooltipProps;
|
|
17
|
+
};
|
|
18
|
+
/** Кнопка отмены */
|
|
19
|
+
cancelButton?: Omit<ButtonOutlineProps, 'size'> & {
|
|
20
|
+
tooltip?: MobileTooltipProps;
|
|
21
|
+
};
|
|
22
|
+
/** Дополнительная кнопка */
|
|
23
|
+
additionalButton?: Omit<ButtonSimpleProps, 'size'> & {
|
|
24
|
+
tooltip?: MobileTooltipProps;
|
|
25
|
+
};
|
|
26
|
+
/** Вложенный Drawer */
|
|
27
|
+
nestedDrawer?: ReactElement<DrawerProps>;
|
|
28
|
+
/**
|
|
29
|
+
* Максимальное кол-во строк
|
|
30
|
+
* <br> - `title` - в заголовке
|
|
31
|
+
* <br> - `subtitle` - в подзаголовке
|
|
32
|
+
* @default '{ <br>title: 1; <br>subtitle: 2; }'
|
|
33
|
+
*/
|
|
34
|
+
truncate?: {
|
|
35
|
+
title?: number;
|
|
36
|
+
subtitle?: number;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
/** Готовый компонент Drawer */
|
|
40
|
+
export declare function MobileDrawer({ title, titleTooltip, subtitle, image, content, approveButton, cancelButton, additionalButton, ...rest }: DrawerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.MobileDrawer = MobileDrawer;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
const button_1 = require("@snack-uikit/button");
|
|
20
|
+
const constants_1 = require("../../constants");
|
|
21
|
+
const WithTooltip_1 = require("../../helperComponents/WithTooltip");
|
|
22
|
+
const MobileDrawerCustom_1 = require("../MobileDrawerCustom");
|
|
23
|
+
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
24
|
+
/** Готовый компонент Drawer */
|
|
25
|
+
function MobileDrawer(_a) {
|
|
26
|
+
var { title, titleTooltip, subtitle, image, content, approveButton, cancelButton, additionalButton } = _a, rest = __rest(_a, ["title", "titleTooltip", "subtitle", "image", "content", "approveButton", "cancelButton", "additionalButton"]);
|
|
27
|
+
const needFooter = Boolean(approveButton) || Boolean(cancelButton) || Boolean(additionalButton);
|
|
28
|
+
return ((0, jsx_runtime_1.jsxs)(MobileDrawerCustom_1.MobileDrawerCustom, Object.assign({}, rest, { closeButtonEnabled: true, swipeEnabled: false, children: [(0, jsx_runtime_1.jsx)(MobileDrawerCustom_1.MobileDrawerCustom.Header, { title: title, titleTooltip: titleTooltip, subtitle: subtitle, image: image, "data-test-id": constants_1.TEST_IDS.header }), (0, jsx_runtime_1.jsx)(MobileDrawerCustom_1.MobileDrawerCustom.Body, { content: content, "data-test-id": constants_1.TEST_IDS.content }), needFooter ? ((0, jsx_runtime_1.jsx)(MobileDrawerCustom_1.MobileDrawerCustom.Footer, { "data-test-id": constants_1.TEST_IDS.footer, actions: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [approveButton && ((0, jsx_runtime_1.jsx)(WithTooltip_1.WithTooltip, { tooltip: approveButton.tooltip, children: (0, jsx_runtime_1.jsx)(button_1.ButtonFilled, Object.assign({ appearance: 'primary', size: 'm', "data-test-id": constants_1.TEST_IDS.approveButton }, approveButton)) })), cancelButton && ((0, jsx_runtime_1.jsx)(WithTooltip_1.WithTooltip, { tooltip: cancelButton.tooltip, children: (0, jsx_runtime_1.jsx)(button_1.ButtonOutline, Object.assign({ appearance: 'neutral', size: 'm', "data-test-id": constants_1.TEST_IDS.cancelButton }, cancelButton)) })), additionalButton && ((0, jsx_runtime_1.jsx)(WithTooltip_1.WithTooltip, { tooltip: additionalButton.tooltip, children: (0, jsx_runtime_1.jsx)(button_1.ButtonSimple, Object.assign({ appearance: 'neutral', size: 'm', "data-test-id": constants_1.TEST_IDS.additionalButton }, additionalButton)) }))] }) })) : ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.footerPlug }))] })));
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MobileDrawer';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./MobileDrawer"), exports);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import 'rc-drawer/assets/index.css';
|
|
2
|
+
import { PropsWithChildren } from 'react';
|
|
3
|
+
import { WithSupportProps } from '@snack-uikit/utils';
|
|
4
|
+
import { DrawerBody, DrawerBodyProps, DrawerFooter, DrawerFooterProps, DrawerHeader, DrawerHeaderProps } from '../../helperComponents';
|
|
5
|
+
import { ModalMode, Mode, Position, Size } from '../../types';
|
|
6
|
+
export type MobileDrawerCustomProps = WithSupportProps<PropsWithChildren<{
|
|
7
|
+
/** Управление состоянием показан/не показан. */
|
|
8
|
+
open: boolean;
|
|
9
|
+
/** Колбэк закрытия */
|
|
10
|
+
onClose(): void;
|
|
11
|
+
/** Режим отображения */
|
|
12
|
+
mode?: Mode;
|
|
13
|
+
/**
|
|
14
|
+
* Режим отображения для модального окна:
|
|
15
|
+
* <br> - __`Regular`__ - есть закрытие по свайпу, клик на оверлей и нажатие кнопки `Esc` закрывают модалку
|
|
16
|
+
* <br> - __`Aggressive`__ - есть кнопка закрытия, но выключен клик на оверлей и не работает закрытие по клавише `Esc`
|
|
17
|
+
* <br> - __`Forced`__ - закрыть модальное окно можно только по нажатию на кнопку действия в нижней части
|
|
18
|
+
* @default Mode.Regular
|
|
19
|
+
*/
|
|
20
|
+
modalMode?: ModalMode;
|
|
21
|
+
/** Расположение открытого Drawer */
|
|
22
|
+
position?: Position;
|
|
23
|
+
/** CSS-класс для элемента с контентом */
|
|
24
|
+
className?: string;
|
|
25
|
+
/** CSS-класс для корневого элемента */
|
|
26
|
+
rootClassName?: string;
|
|
27
|
+
/** Размер */
|
|
28
|
+
size?: Size | string | number;
|
|
29
|
+
/** Контейнер в котором будет рендерится Drawer. По-умолчанию - body */
|
|
30
|
+
container?: string | HTMLElement;
|
|
31
|
+
/** Есть ли радиус у дровера */
|
|
32
|
+
hasBorderRadius?: boolean;
|
|
33
|
+
/** Есть ли бордер у дровера */
|
|
34
|
+
outline?: boolean;
|
|
35
|
+
/** Работает ли закрытие на свайп */
|
|
36
|
+
swipeEnabled?: boolean;
|
|
37
|
+
/** Показывать ли кнопку закрытия */
|
|
38
|
+
closeButtonEnabled?: boolean;
|
|
39
|
+
/** Закрывать при перемещении по истории браузера */
|
|
40
|
+
closeOnPopstate?: boolean;
|
|
41
|
+
}>>;
|
|
42
|
+
export declare function MobileDrawerCustom({ open: openProp, mode, position, onClose, rootClassName, className, size, container, children, hasBorderRadius, outline, swipeEnabled, modalMode, closeButtonEnabled, closeOnPopstate, ...rest }: MobileDrawerCustomProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
export declare namespace MobileDrawerCustom {
|
|
44
|
+
type HeaderProps = DrawerHeaderProps;
|
|
45
|
+
type BodyProps = DrawerBodyProps;
|
|
46
|
+
type FooterProps = DrawerFooterProps;
|
|
47
|
+
const Header: typeof DrawerHeader;
|
|
48
|
+
const Body: typeof DrawerBody;
|
|
49
|
+
const Footer: typeof DrawerFooter;
|
|
50
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.MobileDrawerCustom = MobileDrawerCustom;
|
|
18
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
19
|
+
require("rc-drawer/assets/index.css");
|
|
20
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
21
|
+
const rc_drawer_1 = __importDefault(require("rc-drawer"));
|
|
22
|
+
const react_1 = require("react");
|
|
23
|
+
const uncontrollable_1 = require("uncontrollable");
|
|
24
|
+
const utils_1 = require("@snack-uikit/utils");
|
|
25
|
+
const constants_1 = require("../../constants");
|
|
26
|
+
const helperComponents_1 = require("../../helperComponents");
|
|
27
|
+
const constants_2 = require("./constants");
|
|
28
|
+
const hooks_1 = require("./hooks");
|
|
29
|
+
const styles_module_scss_1 = __importDefault(require('./styles.module.css'));
|
|
30
|
+
function MobileDrawerCustom(_a) {
|
|
31
|
+
var { open: openProp, mode = constants_1.MODE.Regular, position = constants_1.POSITION.Left, onClose, rootClassName, className, size = constants_1.SIZE.S, container, children, hasBorderRadius = false, outline = false, swipeEnabled = true, modalMode = constants_1.MODAL_MODE.Regular, closeButtonEnabled = true, closeOnPopstate } = _a, rest = __rest(_a, ["open", "mode", "position", "onClose", "rootClassName", "className", "size", "container", "children", "hasBorderRadius", "outline", "swipeEnabled", "modalMode", "closeButtonEnabled", "closeOnPopstate"]);
|
|
32
|
+
const isRegular = mode === constants_1.MODE.Regular;
|
|
33
|
+
const isPredefinedSize = typeof size === 'string' && constants_1.SIZE_AS_VALUES.includes(size);
|
|
34
|
+
const [open, setOpen] = (0, uncontrollable_1.useUncontrolledProp)(openProp, false);
|
|
35
|
+
const hasBlur = [constants_1.MODAL_MODE.Forced, constants_1.MODAL_MODE.Aggressive].includes(modalMode);
|
|
36
|
+
const hasSwipe = [constants_1.MODAL_MODE.Regular, constants_1.MODAL_MODE.Aggressive].includes(modalMode);
|
|
37
|
+
const handleClose = () => {
|
|
38
|
+
setOpen(false);
|
|
39
|
+
onClose();
|
|
40
|
+
};
|
|
41
|
+
(0, utils_1.useModalOpenState)(open, () => hasSwipe && handleClose(), {
|
|
42
|
+
closeOnPopstate,
|
|
43
|
+
});
|
|
44
|
+
const { swipeRef, drawerStyles, maskStyles, drawerMotionProps, swipeProps, showPointer } = (0, hooks_1.useSwipeProps)({
|
|
45
|
+
position,
|
|
46
|
+
onSwiped: handleClose,
|
|
47
|
+
enabled: hasSwipe && swipeEnabled,
|
|
48
|
+
});
|
|
49
|
+
// Fix to prevent refresh when swiping on ios
|
|
50
|
+
(0, react_1.useEffect)(() => {
|
|
51
|
+
const hasOtherDrawers = () => Boolean(document.querySelector('[data-content-wrapper]'));
|
|
52
|
+
const disableRefresh = () => (document.documentElement.style.overscrollBehaviorY = 'none');
|
|
53
|
+
const enableRefresh = () => (document.documentElement.style.overscrollBehaviorY = '');
|
|
54
|
+
if (open && !document.documentElement.style.overscrollBehaviorY) {
|
|
55
|
+
disableRefresh();
|
|
56
|
+
return () => {
|
|
57
|
+
setTimeout(() => !hasOtherDrawers() && enableRefresh(), constants_2.DRAWER_CLOSING_TIMEOUT + 50);
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
}, [open]);
|
|
61
|
+
return ((0, jsx_runtime_1.jsx)(rc_drawer_1.default, Object.assign({ mask: isRegular, maskClosable: isRegular, keyboard: isRegular, maskClassName: (0, classnames_1.default)(styles_module_scss_1.default.mask, {
|
|
62
|
+
[styles_module_scss_1.default.maskBlur]: hasBlur,
|
|
63
|
+
}), width: !isPredefinedSize && (position === constants_1.POSITION.Right || position === constants_1.POSITION.Left) ? size : 'null',
|
|
64
|
+
height: !isPredefinedSize && (position === constants_1.POSITION.Top || position === constants_1.POSITION.Bottom) ? size : 'null', open: open, placement: position, destroyOnClose: true, push: false, afterOpenChange: setOpen, onClose: modalMode === constants_1.MODAL_MODE.Regular ? handleClose : undefined, getContainer: container, className: styles_module_scss_1.default.drawer, rootClassName: (0, classnames_1.default)(styles_module_scss_1.default.drawerRoot, rootClassName, {
|
|
65
|
+
[styles_module_scss_1.default.drawerBlur]: hasBlur,
|
|
66
|
+
}) }, (0, utils_1.extractSupportProps)(rest), { "data-content-wrapper": true, "data-blur": hasBlur || undefined, "data-border-radius": hasBorderRadius || undefined, "data-outline": outline || undefined, "data-size": isPredefinedSize ? size : undefined, "data-mode": mode, "data-position": position, contentWrapperStyle: drawerStyles, maskStyle: maskStyles, motion: Object.assign(Object.assign({}, (typeof constants_2.motionProps.motion === 'function' ? constants_2.motionProps.motion(position) : constants_2.motionProps.motion)), drawerMotionProps), maskMotion: constants_2.motionProps.maskMotion, children: (0, jsx_runtime_1.jsxs)("div", Object.assign({ className: (0, classnames_1.default)(className, styles_module_scss_1.default.content) }, (swipeEnabled && hasSwipe ? swipeProps : undefined), { ref: swipeRef, "data-swipe": swipeEnabled || undefined, "data-pointers": showPointer || undefined, children: [swipeEnabled && (0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.swiper, "data-position": position }), children, closeButtonEnabled && ((0, jsx_runtime_1.jsx)("div", { className: styles_module_scss_1.default.headerElements, children: (0, jsx_runtime_1.jsx)(helperComponents_1.ButtonClose, { onClick: onClose }) }))] })) })));
|
|
67
|
+
}
|
|
68
|
+
(function (MobileDrawerCustom) {
|
|
69
|
+
MobileDrawerCustom.Header = helperComponents_1.DrawerHeader;
|
|
70
|
+
MobileDrawerCustom.Body = helperComponents_1.DrawerBody;
|
|
71
|
+
MobileDrawerCustom.Footer = helperComponents_1.DrawerFooter;
|
|
72
|
+
})(MobileDrawerCustom || (exports.MobileDrawerCustom = MobileDrawerCustom = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import './motion.css';
|
|
2
|
+
import type { DrawerProps } from 'rc-drawer';
|
|
3
|
+
import type { SwipeDirections } from '@snack-uikit/utils';
|
|
4
|
+
import { Position } from '../../types';
|
|
5
|
+
export declare const maskMotion: DrawerProps['maskMotion'];
|
|
6
|
+
export declare const motion: DrawerProps['motion'];
|
|
7
|
+
export declare const motionProps: Partial<DrawerProps>;
|
|
8
|
+
export declare const SWIPE_DIRECTION_TO_POSITION_MAP: Record<SwipeDirections, Position>;
|
|
9
|
+
export declare const POSITION_TO_SWIPE_DIRECTION_MAP: Record<Position, SwipeDirections>;
|
|
10
|
+
export declare const DRAWER_CLOSING_TIMEOUT = 300;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DRAWER_CLOSING_TIMEOUT = exports.POSITION_TO_SWIPE_DIRECTION_MAP = exports.SWIPE_DIRECTION_TO_POSITION_MAP = exports.motionProps = exports.motion = exports.maskMotion = void 0;
|
|
4
|
+
require("./motion.css");
|
|
5
|
+
exports.maskMotion = {
|
|
6
|
+
motionAppear: true,
|
|
7
|
+
motionName: 'maskMotionMobile',
|
|
8
|
+
};
|
|
9
|
+
const motion = placement => ({
|
|
10
|
+
motionAppear: true,
|
|
11
|
+
motionName: `panelMotionMobile-${placement}`,
|
|
12
|
+
});
|
|
13
|
+
exports.motion = motion;
|
|
14
|
+
exports.motionProps = {
|
|
15
|
+
maskMotion: exports.maskMotion,
|
|
16
|
+
motion: exports.motion,
|
|
17
|
+
};
|
|
18
|
+
exports.SWIPE_DIRECTION_TO_POSITION_MAP = {
|
|
19
|
+
Right: 'right',
|
|
20
|
+
Left: 'left',
|
|
21
|
+
Up: 'top',
|
|
22
|
+
Down: 'bottom',
|
|
23
|
+
};
|
|
24
|
+
exports.POSITION_TO_SWIPE_DIRECTION_MAP = Object.fromEntries(Object.entries(exports.SWIPE_DIRECTION_TO_POSITION_MAP).map(([key, value]) => [value, key]));
|
|
25
|
+
exports.DRAWER_CLOSING_TIMEOUT = 300;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { Position } from '../../types';
|
|
3
|
+
type UseSwipePropsProps = {
|
|
4
|
+
onSwiped(): void;
|
|
5
|
+
position: Position;
|
|
6
|
+
enabled: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare function useSwipeProps({ onSwiped, position, enabled }: UseSwipePropsProps): {
|
|
9
|
+
swipeRef: import("react").Ref<HTMLDivElement>;
|
|
10
|
+
drawerStyles: CSSProperties | undefined;
|
|
11
|
+
maskStyles: CSSProperties | undefined;
|
|
12
|
+
showPointer: boolean;
|
|
13
|
+
swipeProps: {
|
|
14
|
+
onMouseDown?(event: import("react").MouseEvent): void;
|
|
15
|
+
"data-swipe-directions"?: string;
|
|
16
|
+
};
|
|
17
|
+
drawerMotionProps: {
|
|
18
|
+
onLeaveActive: () => void;
|
|
19
|
+
onLeaveEnd: () => void;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
3
|
+
var t = {};
|
|
4
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
5
|
+
t[p] = s[p];
|
|
6
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
7
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
8
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
9
|
+
t[p[i]] = s[p[i]];
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
};
|
|
13
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.useSwipeProps = useSwipeProps;
|
|
18
|
+
const merge_refs_1 = __importDefault(require("merge-refs"));
|
|
19
|
+
const react_1 = require("react");
|
|
20
|
+
const utils_1 = require("@snack-uikit/utils");
|
|
21
|
+
const constants_1 = require("./constants");
|
|
22
|
+
const TRANSFORM = 0;
|
|
23
|
+
const SWIPE_DURATION = 500;
|
|
24
|
+
function useSwipeProps({ onSwiped, position, enabled }) {
|
|
25
|
+
var _a, _b, _c;
|
|
26
|
+
const swipeRef = (0, react_1.useRef)(null);
|
|
27
|
+
const canCloseDrawer = (0, react_1.useRef)(true);
|
|
28
|
+
const itemSize = (_c = (position === 'bottom' || position === 'top' ? (_a = swipeRef.current) === null || _a === void 0 ? void 0 : _a.offsetHeight : (_b = swipeRef.current) === null || _b === void 0 ? void 0 : _b.offsetWidth)) !== null && _c !== void 0 ? _c : 0;
|
|
29
|
+
const swipeStart = (0, react_1.useRef)(0);
|
|
30
|
+
const getInitialDrag = () => ({
|
|
31
|
+
initial: TRANSFORM,
|
|
32
|
+
start: 0,
|
|
33
|
+
isDown: false,
|
|
34
|
+
drag: 0,
|
|
35
|
+
finished: true,
|
|
36
|
+
pointers: true,
|
|
37
|
+
});
|
|
38
|
+
const [drag, setDrag] = (0, react_1.useState)(getInitialDrag);
|
|
39
|
+
const [styles, setStyles] = (0, react_1.useState)();
|
|
40
|
+
const getDrawerTransform = (value) => {
|
|
41
|
+
switch (position) {
|
|
42
|
+
case 'bottom':
|
|
43
|
+
case 'top':
|
|
44
|
+
return `translateY(${TRANSFORM - value}px)`;
|
|
45
|
+
case 'right':
|
|
46
|
+
case 'left':
|
|
47
|
+
default:
|
|
48
|
+
return `translateX(${TRANSFORM - value}px)`;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const getMaskOpacity = (value) => 1 + value / itemSize;
|
|
52
|
+
const resetStyles = () => {
|
|
53
|
+
setStyles(undefined);
|
|
54
|
+
setDrag(getInitialDrag());
|
|
55
|
+
};
|
|
56
|
+
const isContainedInArea = ({ element, condition, }) => {
|
|
57
|
+
if (!element) {
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
if (element === swipeRef.current) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
if (!element.parentElement) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
return condition(element) || isContainedInArea({ element: element.parentElement, condition });
|
|
67
|
+
};
|
|
68
|
+
const isSwipeEnabled = (eventData) => {
|
|
69
|
+
const element = eventData.event.target;
|
|
70
|
+
const equalDirectionsCondition = (el) => {
|
|
71
|
+
var _a, _b;
|
|
72
|
+
const directions = (_b = (_a = el.getAttribute(utils_1.DATA_SWIPE_DIRECTIONS_ATTRIBUTE)) === null || _a === void 0 ? void 0 : _a.split(' ')) !== null && _b !== void 0 ? _b : [];
|
|
73
|
+
return directions.some(direction => direction === eventData.dir);
|
|
74
|
+
};
|
|
75
|
+
if (isContainedInArea({ element, condition: equalDirectionsCondition })) {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
return position === constants_1.SWIPE_DIRECTION_TO_POSITION_MAP[eventData.dir];
|
|
79
|
+
};
|
|
80
|
+
const handleSwipeStart = () => {
|
|
81
|
+
swipeStart.current = Date.now();
|
|
82
|
+
};
|
|
83
|
+
const handleSwiping = eventData => {
|
|
84
|
+
if (!isSwipeEnabled(eventData)) {
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
if (!canCloseDrawer.current) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
let adjustedDrag = 0;
|
|
91
|
+
const element = eventData.event.target;
|
|
92
|
+
switch (position) {
|
|
93
|
+
case 'left':
|
|
94
|
+
if (isContainedInArea({ element, condition: el => el.scrollWidth - el.offsetWidth > el.scrollLeft })) {
|
|
95
|
+
canCloseDrawer.current = false;
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
adjustedDrag = Math.max(0, -eventData.deltaX);
|
|
99
|
+
break;
|
|
100
|
+
case 'right':
|
|
101
|
+
if (isContainedInArea({ element, condition: el => el.scrollLeft > 0 })) {
|
|
102
|
+
canCloseDrawer.current = false;
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
adjustedDrag = Math.min(0, -eventData.deltaX);
|
|
106
|
+
break;
|
|
107
|
+
case 'top':
|
|
108
|
+
if (isContainedInArea({ element, condition: el => el.scrollHeight - el.offsetHeight > el.scrollTop })) {
|
|
109
|
+
canCloseDrawer.current = false;
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
adjustedDrag = Math.max(0, -eventData.deltaY);
|
|
113
|
+
break;
|
|
114
|
+
case 'bottom':
|
|
115
|
+
if (isContainedInArea({ element, condition: el => el.scrollTop > 0 })) {
|
|
116
|
+
canCloseDrawer.current = false;
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
adjustedDrag = Math.min(0, -eventData.deltaY);
|
|
120
|
+
break;
|
|
121
|
+
default:
|
|
122
|
+
break;
|
|
123
|
+
}
|
|
124
|
+
setDrag(prevDrag => (Object.assign(Object.assign({}, prevDrag), { drag: adjustedDrag, pointers: eventData.absX < Number.MIN_SAFE_INTEGER })));
|
|
125
|
+
setStyles({
|
|
126
|
+
drawer: { transform: getDrawerTransform(adjustedDrag), transition: 'none' },
|
|
127
|
+
mask: { opacity: getMaskOpacity(adjustedDrag), transition: 'none' },
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
const handleSwiped = eventData => {
|
|
131
|
+
if (!isSwipeEnabled(eventData)) {
|
|
132
|
+
return resetStyles();
|
|
133
|
+
}
|
|
134
|
+
if (Date.now() - swipeStart.current > SWIPE_DURATION) {
|
|
135
|
+
return resetStyles();
|
|
136
|
+
}
|
|
137
|
+
if (!canCloseDrawer.current) {
|
|
138
|
+
canCloseDrawer.current = true;
|
|
139
|
+
return resetStyles();
|
|
140
|
+
}
|
|
141
|
+
onSwiped();
|
|
142
|
+
setStyles({ drawer: { transform: getDrawerTransform(drag.drag) }, mask: { opacity: getMaskOpacity(drag.drag) } });
|
|
143
|
+
setDrag(prevDrag => (Object.assign(Object.assign({}, prevDrag), { drag: 0, isDown: false, finished: true, pointers: true })));
|
|
144
|
+
};
|
|
145
|
+
const _d = (0, utils_1.useSwipeable)({
|
|
146
|
+
onSwipeStart: handleSwipeStart,
|
|
147
|
+
onSwiping: handleSwiping,
|
|
148
|
+
onSwiped: handleSwiped,
|
|
149
|
+
enabled,
|
|
150
|
+
availableDirections: [constants_1.POSITION_TO_SWIPE_DIRECTION_MAP[position]],
|
|
151
|
+
trackMouse: true,
|
|
152
|
+
}), { ref } = _d, swipeProps = __rest(_d, ["ref"]);
|
|
153
|
+
return {
|
|
154
|
+
swipeRef: (0, merge_refs_1.default)(ref, swipeRef),
|
|
155
|
+
drawerStyles: styles === null || styles === void 0 ? void 0 : styles.drawer,
|
|
156
|
+
maskStyles: styles === null || styles === void 0 ? void 0 : styles.mask,
|
|
157
|
+
showPointer: !drag.pointers,
|
|
158
|
+
swipeProps,
|
|
159
|
+
drawerMotionProps: {
|
|
160
|
+
onLeaveActive: () => setStyles(undefined),
|
|
161
|
+
onLeaveEnd: () => setStyles(undefined),
|
|
162
|
+
},
|
|
163
|
+
};
|
|
164
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './MobileDrawerCustom';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./MobileDrawerCustom"), exports);
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
.maskMotionMobile {
|
|
2
|
+
opacity: unset;
|
|
3
|
+
}
|
|
4
|
+
.maskMotionMobile-enter, .maskMotionMobile-appear {
|
|
5
|
+
opacity: 0;
|
|
6
|
+
}
|
|
7
|
+
.maskMotionMobile-enter-active, .maskMotionMobile-appear-active {
|
|
8
|
+
opacity: 1;
|
|
9
|
+
transition: opacity 0.2s;
|
|
10
|
+
}
|
|
11
|
+
.maskMotionMobile-leave {
|
|
12
|
+
opacity: 1;
|
|
13
|
+
}
|
|
14
|
+
.maskMotionMobile-leave-active {
|
|
15
|
+
opacity: 0;
|
|
16
|
+
transition: opacity 0.1s;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.panelMotionMobile {
|
|
20
|
+
transform: unset;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** LEFT */
|
|
24
|
+
.panelMotionMobile-left-enter-start, .panelMotionMobile-left-appear-start, .panelMotionMobile-left-leave-start {
|
|
25
|
+
transition: none !important;
|
|
26
|
+
}
|
|
27
|
+
.panelMotionMobile-left-enter-active, .panelMotionMobile-left-appear-active {
|
|
28
|
+
transition: transform 0.2s ease-in-out;
|
|
29
|
+
}
|
|
30
|
+
.panelMotionMobile-left-leave-active {
|
|
31
|
+
transition: transform 0.1s ease-out;
|
|
32
|
+
}
|
|
33
|
+
.panelMotionMobile-left-enter, .panelMotionMobile-left-appear {
|
|
34
|
+
transform: translateX(-100%);
|
|
35
|
+
}
|
|
36
|
+
.panelMotionMobile-left-enter-active, .panelMotionMobile-left-appear-active {
|
|
37
|
+
transform: translateX(0);
|
|
38
|
+
}
|
|
39
|
+
.panelMotionMobile-left-leave {
|
|
40
|
+
transform: translateX(0);
|
|
41
|
+
}
|
|
42
|
+
.panelMotionMobile-left-leave-active {
|
|
43
|
+
transform: translateX(-100%) !important;
|
|
44
|
+
}
|
|
45
|
+
/*********/
|
|
46
|
+
|
|
47
|
+
/** RIGHT */
|
|
48
|
+
.panelMotionMobile-right-enter-start, .panelMotionMobile-right-appear-start, .panelMotionMobile-right-leave-start {
|
|
49
|
+
transition: none !important;
|
|
50
|
+
}
|
|
51
|
+
.panelMotionMobile-right-enter-active, .panelMotionMobile-right-appear-active {
|
|
52
|
+
transition: transform 0.2s ease-in-out;
|
|
53
|
+
}
|
|
54
|
+
.panelMotionMobile-right-leave-active {
|
|
55
|
+
transition: transform 0.1s ease-out;
|
|
56
|
+
}
|
|
57
|
+
.panelMotionMobile-right-enter, .panelMotionMobile-right-appear {
|
|
58
|
+
transform: translateX(100%);
|
|
59
|
+
}
|
|
60
|
+
.panelMotionMobile-right-enter-active, .panelMotionMobile-right-appear-active {
|
|
61
|
+
transform: translateX(0);
|
|
62
|
+
}
|
|
63
|
+
.panelMotionMobile-right-leave {
|
|
64
|
+
transform: translateX(0);
|
|
65
|
+
}
|
|
66
|
+
.panelMotionMobile-right-leave-active {
|
|
67
|
+
transform: translateX(100%) !important;
|
|
68
|
+
}
|
|
69
|
+
/**********/
|
|
70
|
+
|
|
71
|
+
/** BOTTOM */
|
|
72
|
+
.panelMotionMobile-bottom-enter-start, .panelMotionMobile-bottom-appear-start, .panelMotionMobile-bottom-leave-start {
|
|
73
|
+
transition: none !important;
|
|
74
|
+
}
|
|
75
|
+
.panelMotionMobile-bottom-enter-active, .panelMotionMobile-bottom-appear-active {
|
|
76
|
+
transition: transform 0.2s ease-in-out;
|
|
77
|
+
}
|
|
78
|
+
.panelMotionMobile-bottom-leave-active {
|
|
79
|
+
transition: transform 0.1s ease-out;
|
|
80
|
+
}
|
|
81
|
+
.panelMotionMobile-bottom-enter, .panelMotionMobile-bottom-appear {
|
|
82
|
+
transform: translateY(100%);
|
|
83
|
+
}
|
|
84
|
+
.panelMotionMobile-bottom-enter-active, .panelMotionMobile-bottom-appear-active {
|
|
85
|
+
transform: translateY(0);
|
|
86
|
+
}
|
|
87
|
+
.panelMotionMobile-bottom-leave {
|
|
88
|
+
transform: translateY(0);
|
|
89
|
+
}
|
|
90
|
+
.panelMotionMobile-bottom-leave-active {
|
|
91
|
+
transform: translateY(100%) !important;
|
|
92
|
+
}
|
|
93
|
+
/***********/
|
|
94
|
+
|
|
95
|
+
/** TOP */
|
|
96
|
+
.panelMotionMobile-top-enter-start, .panelMotionMobile-top-appear-start, .panelMotionMobile-top-leave-start {
|
|
97
|
+
transition: none !important;
|
|
98
|
+
}
|
|
99
|
+
.panelMotionMobile-top-enter-active, .panelMotionMobile-top-appear-active {
|
|
100
|
+
transition: transform 0.2s ease-in-out;
|
|
101
|
+
}
|
|
102
|
+
.panelMotionMobile-top-leave-active {
|
|
103
|
+
transition: transform 0.1s ease-out;
|
|
104
|
+
}
|
|
105
|
+
.panelMotionMobile-top-enter, .panelMotionMobile-top-appear {
|
|
106
|
+
transform: translateY(-100%);
|
|
107
|
+
}
|
|
108
|
+
.panelMotionMobile-top-enter-active, .panelMotionMobile-top-appear-active {
|
|
109
|
+
transform: translateY(0);
|
|
110
|
+
}
|
|
111
|
+
.panelMotionMobile-top-leave {
|
|
112
|
+
transform: translateY(0);
|
|
113
|
+
}
|
|
114
|
+
.panelMotionMobile-top-leave-active {
|
|
115
|
+
transform: translateY(-100%) !important;
|
|
116
|
+
}
|
|
117
|
+
/********/
|