@alfalab/core-components-bottom-sheet 4.8.1 → 5.0.0
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/{component-90672837.d.ts → component-081431eb.d.ts} +1 -0
- package/{component-90672837.js → component-081431eb.js} +22 -37
- package/component.js +2 -2
- package/components/backer/Component.js +2 -2
- package/components/backer/index.css +3 -3
- package/components/closer/Component.js +2 -2
- package/components/closer/index.css +3 -3
- package/components/footer/Component.js +1 -1
- package/components/footer/index.css +4 -4
- package/components/header/Component.js +2 -2
- package/components/header/index.css +17 -17
- package/components/swipeable-backdrop/Component.js +1 -1
- package/{esm/component-19d1d5d1.d.ts → cssm/component-486b5783.d.ts} +1 -0
- package/cssm/{component-c65ae511.js → component-486b5783.js} +19 -34
- package/cssm/component.js +1 -1
- package/cssm/components/header/Component.js +1 -1
- package/cssm/index.d.ts +1 -1
- package/cssm/index.js +1 -1
- package/cssm/index.module.css +0 -3
- package/{cssm/component-c65ae511.d.ts → esm/component-a6da8768.d.ts} +1 -0
- package/esm/{component-19d1d5d1.js → component-a6da8768.js} +22 -37
- package/esm/component.js +2 -2
- package/esm/components/backer/Component.js +2 -2
- package/esm/components/backer/index.css +3 -3
- package/esm/components/closer/Component.js +2 -2
- package/esm/components/closer/index.css +3 -3
- package/esm/components/footer/Component.js +1 -1
- package/esm/components/footer/index.css +4 -4
- package/esm/components/header/Component.js +2 -2
- package/esm/components/header/index.css +17 -17
- package/esm/components/swipeable-backdrop/Component.js +1 -1
- package/esm/index.css +15 -18
- package/esm/index.d.ts +1 -1
- package/esm/index.js +2 -2
- package/esm/{tslib.es6-5b0f031b.d.ts → tslib.es6-d5ff3006.d.ts} +0 -0
- package/esm/{tslib.es6-5b0f031b.js → tslib.es6-d5ff3006.js} +0 -0
- package/index.css +15 -18
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/modern/{component-5e4ff82e.d.ts → component-fed5de6d.d.ts} +1 -0
- package/modern/{component-5e4ff82e.js → component-fed5de6d.js} +21 -36
- package/modern/component.js +1 -1
- package/modern/components/backer/Component.js +1 -1
- package/modern/components/backer/index.css +3 -3
- package/modern/components/closer/Component.js +1 -1
- package/modern/components/closer/index.css +3 -3
- package/modern/components/footer/Component.js +1 -1
- package/modern/components/footer/index.css +4 -4
- package/modern/components/header/Component.js +1 -1
- package/modern/components/header/index.css +17 -17
- package/modern/index.css +15 -18
- package/modern/index.d.ts +1 -1
- package/modern/index.js +1 -1
- package/package.json +5 -5
- /package/{tslib.es6-c03fa1a2.d.ts → tslib.es6-2fdacaa4.d.ts} +0 -0
- /package/{tslib.es6-c03fa1a2.js → tslib.es6-2fdacaa4.js} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __assign } from './tslib.es6-
|
|
1
|
+
import { _ as __assign } from './tslib.es6-d5ff3006.js';
|
|
2
2
|
import React, { useContext, useEffect, forwardRef, useState, useRef, useCallback } from 'react';
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
import { use100vh } from 'react-div-100vh';
|
|
@@ -15,7 +15,7 @@ var getDataTestId = function (dataTestId, element) {
|
|
|
15
15
|
return dataTestId ? "" + dataTestId + elementPart : undefined;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
var styles = {"headerWrapper":"bottom-
|
|
18
|
+
var styles = {"headerWrapper":"bottom-sheet__headerWrapper_1j3ft","header":"bottom-sheet__header_1j3ft","sticky":"bottom-sheet__sticky_1j3ft","highlighted":"bottom-sheet__highlighted_1j3ft","justifyEnd":"bottom-sheet__justifyEnd_1j3ft","addon":"bottom-sheet__addon_1j3ft","addonFixed":"bottom-sheet__addonFixed_1j3ft","addonLeft":"bottom-sheet__addonLeft_1j3ft","addonRight":"bottom-sheet__addonRight_1j3ft","title":"bottom-sheet__title_1j3ft","titleCenter":"bottom-sheet__titleCenter_1j3ft","titleLeft":"bottom-sheet__titleLeft_1j3ft","trimTitle":"bottom-sheet__trimTitle_1j3ft","titleBigIndentHorizontal":"bottom-sheet__titleBigIndentHorizontal_1j3ft","titleIndentRight":"bottom-sheet__titleIndentRight_1j3ft","titleIndentLeft":"bottom-sheet__titleIndentLeft_1j3ft"};
|
|
19
19
|
require('./components/header/index.css')
|
|
20
20
|
|
|
21
21
|
var Header = function (_a) {
|
|
@@ -65,7 +65,7 @@ var Header = function (_a) {
|
|
|
65
65
|
bottomAddons));
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
var styles$1 = {"modal":"bottom-
|
|
68
|
+
var styles$1 = {"modal":"bottom-sheet__modal_1enkg","component":"bottom-sheet__component_1enkg","withTransition":"bottom-sheet__withTransition_1enkg","scrollableContainer":"bottom-sheet__scrollableContainer_1enkg","marker":"bottom-sheet__marker_1enkg","content":"bottom-sheet__content_1enkg","noHeader":"bottom-sheet__noHeader_1enkg","noFooter":"bottom-sheet__noFooter_1enkg","scrollLocked":"bottom-sheet__scrollLocked_1enkg","appear":"bottom-sheet__appear_1enkg","enter":"bottom-sheet__enter_1enkg","appearActive":"bottom-sheet__appearActive_1enkg","enterActive":"bottom-sheet__enterActive_1enkg","enterDone":"bottom-sheet__enterDone_1enkg","appearDone":"bottom-sheet__appearDone_1enkg","exit":"bottom-sheet__exit_1enkg","exitActive":"bottom-sheet__exitActive_1enkg"};
|
|
69
69
|
require('./index.css')
|
|
70
70
|
|
|
71
71
|
var TIMEOUT = 300;
|
|
@@ -78,15 +78,14 @@ var HEADER_OFFSET = 24;
|
|
|
78
78
|
var CLOSE_OFFSET = 0.2;
|
|
79
79
|
var BottomSheet = forwardRef(function (_a, ref) {
|
|
80
80
|
var _b, _c, _d;
|
|
81
|
-
var open = _a.open, title = _a.title, actionButton = _a.actionButton, contentClassName = _a.contentClassName, containerClassName = _a.containerClassName, containerProps = _a.containerProps, headerClassName = _a.headerClassName, footerClassName = _a.footerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, modalClassName = _a.modalClassName, modalWrapperClassName = _a.modalWrapperClassName, className = _a.className, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, bottomAddons = _a.bottomAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, _e = _a.titleAlign, titleAlign = _e === void 0 ? 'left' : _e, trimTitle = _a.trimTitle, stickyHeader = _a.stickyHeader, _f = _a.stickyFooter, stickyFooter = _f === void 0 ? true : _f, _g = _a.initialHeight, initialHeight = _g === void 0 ? 'default' : _g, hideOverlay = _a.hideOverlay, hideHeader = _a.hideHeader, disableOverlayClick = _a.disableOverlayClick, disableBlockingScroll = _a.disableBlockingScroll, children = _a.children, zIndex = _a.zIndex, _h = _a.transitionProps, transitionProps = _h === void 0 ? {} : _h, dataTestId = _a.dataTestId, _j = _a.swipeable, swipeable = _j === void 0 ? true : _j,
|
|
82
|
-
var
|
|
83
|
-
var
|
|
84
|
-
var
|
|
81
|
+
var open = _a.open, title = _a.title, actionButton = _a.actionButton, contentClassName = _a.contentClassName, containerClassName = _a.containerClassName, containerProps = _a.containerProps, headerClassName = _a.headerClassName, footerClassName = _a.footerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, modalClassName = _a.modalClassName, modalWrapperClassName = _a.modalWrapperClassName, className = _a.className, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, bottomAddons = _a.bottomAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, _e = _a.titleAlign, titleAlign = _e === void 0 ? 'left' : _e, trimTitle = _a.trimTitle, stickyHeader = _a.stickyHeader, _f = _a.stickyFooter, stickyFooter = _f === void 0 ? true : _f, _g = _a.initialHeight, initialHeight = _g === void 0 ? 'default' : _g, hideOverlay = _a.hideOverlay, hideHeader = _a.hideHeader, disableOverlayClick = _a.disableOverlayClick, disableBlockingScroll = _a.disableBlockingScroll, children = _a.children, zIndex = _a.zIndex, _h = _a.transitionProps, transitionProps = _h === void 0 ? {} : _h, dataTestId = _a.dataTestId, _j = _a.swipeable, swipeable = _j === void 0 ? true : _j, backdropProps = _a.backdropProps, onClose = _a.onClose, onBack = _a.onBack;
|
|
82
|
+
var _k = useState(0), sheetOffset = _k[0], setSheetOffset = _k[1];
|
|
83
|
+
var _l = useState(1), backdropOpacity = _l[0], setBackdropOpacity = _l[1];
|
|
84
|
+
var _m = useState(false), scrollLocked = _m[0], setScrollLocked = _m[1];
|
|
85
85
|
var sheetHeight = useRef(0);
|
|
86
86
|
var scrollableContainer = useRef(null);
|
|
87
87
|
var scrollableContainerScrollValue = useRef(0);
|
|
88
88
|
var emptyHeader = !hasCloser && !hasBacker && !leftAddons && !rightAddons && !title;
|
|
89
|
-
var _p = useState(styles$1.withTransition), transitionClassName = _p[0], setTransitionClassName = _p[1];
|
|
90
89
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
91
90
|
var fullHeight = use100vh();
|
|
92
91
|
var targetHeight = fullHeight - HEADER_OFFSET + "px";
|
|
@@ -152,12 +151,6 @@ var BottomSheet = forwardRef(function (_a, ref) {
|
|
|
152
151
|
onClose();
|
|
153
152
|
}
|
|
154
153
|
else {
|
|
155
|
-
/**
|
|
156
|
-
* Установить мгновенную анимацию шторке если она не закрыта при свайпе и установлен проп ignoreScreenChange
|
|
157
|
-
*/
|
|
158
|
-
if (ignoreScreenChange) {
|
|
159
|
-
setTransitionClassName(styles$1.withZeroTransition);
|
|
160
|
-
}
|
|
161
154
|
setSheetOffset(0);
|
|
162
155
|
setBackdropOpacity(1);
|
|
163
156
|
}
|
|
@@ -181,12 +174,6 @@ var BottomSheet = forwardRef(function (_a, ref) {
|
|
|
181
174
|
*/
|
|
182
175
|
if (offset > 0) {
|
|
183
176
|
setScrollLocked(true);
|
|
184
|
-
/**
|
|
185
|
-
* Вернуть плавную анимацию шторке при свайпе
|
|
186
|
-
*/
|
|
187
|
-
if (transitionClassName === styles$1.withZeroTransition) {
|
|
188
|
-
setTransitionClassName(styles$1.withTransition);
|
|
189
|
-
}
|
|
190
177
|
}
|
|
191
178
|
};
|
|
192
179
|
var backdropSwipeablehandlers = useSwipeable({
|
|
@@ -220,10 +207,7 @@ var BottomSheet = forwardRef(function (_a, ref) {
|
|
|
220
207
|
if (!open) {
|
|
221
208
|
setSheetOffset(0);
|
|
222
209
|
}
|
|
223
|
-
|
|
224
|
-
setTransitionClassName(styles$1.withZeroTransition);
|
|
225
|
-
}
|
|
226
|
-
}, [open, ignoreScreenChange]);
|
|
210
|
+
}, [open]);
|
|
227
211
|
var getSwipeStyles = function () { return ({
|
|
228
212
|
transform: sheetOffset ? "translateY(" + sheetOffset + "px)" : '',
|
|
229
213
|
}); };
|
|
@@ -232,19 +216,20 @@ var BottomSheet = forwardRef(function (_a, ref) {
|
|
|
232
216
|
maxHeight: targetHeight,
|
|
233
217
|
}); };
|
|
234
218
|
return (React.createElement(BaseModal, { open: open, ref: ref, dataTestId: dataTestId, zIndex: zIndex, onClose: onClose, scrollHandler: scrollableContainer, Backdrop: SwipeableBackdrop, backdropProps: __assign(__assign({}, backdropProps), { opacity: backdropOpacity, handlers: swipeable ? backdropSwipeablehandlers : false, opacityTimeout: TIMEOUT, invisible: initialHeight === 'full' ? false : hideOverlay }), disableBackdropClick: hideOverlay ? true : disableOverlayClick, className: cn(styles$1.modal, modalClassName), wrapperClassName: modalWrapperClassName, disableBlockingScroll: disableBlockingScroll, transitionProps: __assign(__assign({ appear: true, timeout: TIMEOUT, classNames: styles$1 }, transitionProps), { onExited: handleExited, onEntered: handleEntered }) },
|
|
235
|
-
React.createElement("div",
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
219
|
+
React.createElement("div", { style: __assign({}, getHeightStyles()) },
|
|
220
|
+
React.createElement("div", __assign({ className: cn(styles$1.component, className, (_b = {},
|
|
221
|
+
_b[styles$1.withTransition] = !sheetOffset,
|
|
222
|
+
_b)), style: __assign(__assign({}, getSwipeStyles()), getHeightStyles()) }, sheetSwipeablehandlers),
|
|
223
|
+
React.createElement("div", __assign({}, containerProps, { className: cn(styles$1.scrollableContainer, containerProps === null || containerProps === void 0 ? void 0 : containerProps.className, containerClassName, (_c = {},
|
|
224
|
+
_c[styles$1.scrollLocked] = scrollLocked,
|
|
225
|
+
_c)), ref: scrollableContainer }),
|
|
226
|
+
swipeable && React.createElement("div", { className: cn(styles$1.marker) }),
|
|
227
|
+
!hideHeader && !emptyHeader && React.createElement(Header, __assign({}, headerProps)),
|
|
228
|
+
React.createElement("div", { className: cn(styles$1.content, contentClassName, (_d = {},
|
|
229
|
+
_d[styles$1.noHeader] = hideHeader || emptyHeader,
|
|
230
|
+
_d[styles$1.noFooter] = !actionButton,
|
|
231
|
+
_d)) }, children),
|
|
232
|
+
actionButton && (React.createElement(Footer, { sticky: stickyFooter, className: footerClassName }, actionButton)))))));
|
|
248
233
|
});
|
|
249
234
|
|
|
250
235
|
export { BottomSheet as B, CLOSE_OFFSET as C, HEADER_OFFSET as H, Header as a };
|
package/esm/component.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './tslib.es6-
|
|
1
|
+
import './tslib.es6-d5ff3006.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'classnames';
|
|
4
4
|
import 'react-div-100vh';
|
|
@@ -10,7 +10,7 @@ import '@alfalab/icons-glyph/CrossMIcon';
|
|
|
10
10
|
import './components/closer/Component.js';
|
|
11
11
|
import '@alfalab/icons-glyph/ArrowBackMIcon';
|
|
12
12
|
import './components/backer/Component.js';
|
|
13
|
-
export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-
|
|
13
|
+
export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-a6da8768.js';
|
|
14
14
|
import './components/footer/Component.js';
|
|
15
15
|
import '@alfalab/core-components-backdrop/esm';
|
|
16
16
|
import './components/swipeable-backdrop/Component.js';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as __rest, _ as __assign } from '../../tslib.es6-
|
|
1
|
+
import { a as __rest, _ as __assign } from '../../tslib.es6-d5ff3006.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
import { IconButton } from '@alfalab/core-components-icon-button/esm';
|
|
5
5
|
import { ArrowBackMIcon } from '@alfalab/icons-glyph/ArrowBackMIcon';
|
|
6
6
|
|
|
7
|
-
var styles = {"backer":"bottom-
|
|
7
|
+
var styles = {"backer":"bottom-sheet__backer_168ue","button":"bottom-sheet__button_168ue"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
var Backer = function (_a) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 14oyo */
|
|
2
2
|
:root {
|
|
3
3
|
--bottom-sheet-backer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.bottom-
|
|
6
|
+
.bottom-sheet__backer_168ue {
|
|
7
7
|
width: 32px;
|
|
8
8
|
height: 32px;
|
|
9
9
|
display: flex;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
color: var(--color-light-graphic-primary);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.bottom-
|
|
16
|
+
.bottom-sheet__button_168ue {
|
|
17
17
|
background: var(--bottom-sheet-backer-bg-color);
|
|
18
18
|
-webkit-backdrop-filter: blur(10px);
|
|
19
19
|
backdrop-filter: blur(10px);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a as __rest, _ as __assign } from '../../tslib.es6-
|
|
1
|
+
import { a as __rest, _ as __assign } from '../../tslib.es6-d5ff3006.js';
|
|
2
2
|
import React, { useContext, useCallback } from 'react';
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
import { BaseModalContext } from '@alfalab/core-components-base-modal/esm';
|
|
5
5
|
import { IconButton } from '@alfalab/core-components-icon-button/esm';
|
|
6
6
|
import { CrossMIcon } from '@alfalab/icons-glyph/CrossMIcon';
|
|
7
7
|
|
|
8
|
-
var styles = {"closer":"bottom-
|
|
8
|
+
var styles = {"closer":"bottom-sheet__closer_of1dk","button":"bottom-sheet__button_of1dk"};
|
|
9
9
|
require('./index.css')
|
|
10
10
|
|
|
11
11
|
var Closer = function (_a) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1nl0f */
|
|
2
2
|
:root {
|
|
3
3
|
--bottom-sheet-closer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.bottom-
|
|
6
|
+
.bottom-sheet__closer_of1dk {
|
|
7
7
|
width: 32px;
|
|
8
8
|
height: 32px;
|
|
9
9
|
display: flex;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
color: var(--color-light-graphic-primary);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
.bottom-
|
|
16
|
+
.bottom-sheet__button_of1dk {
|
|
17
17
|
background: var(--bottom-sheet-closer-bg-color);
|
|
18
18
|
-webkit-backdrop-filter: blur(10px);
|
|
19
19
|
backdrop-filter: blur(10px);
|
|
@@ -2,7 +2,7 @@ import React, { useContext, useEffect } from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { BaseModalContext } from '@alfalab/core-components-base-modal/esm';
|
|
4
4
|
|
|
5
|
-
var styles = {"footer":"bottom-
|
|
5
|
+
var styles = {"footer":"bottom-sheet__footer_1gnta","sticky":"bottom-sheet__sticky_1gnta","highlighted":"bottom-sheet__highlighted_1gnta"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
var Footer = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: eopfq */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
--color-light-border-primary: #dbdee1;
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
--bottom-sheet-footer-border-top: 1px solid var(--color-light-border-primary);
|
|
19
19
|
--bottom-sheet-footer-background-color: var(--color-light-bg-primary);
|
|
20
20
|
}
|
|
21
|
-
.bottom-
|
|
21
|
+
.bottom-sheet__footer_1gnta {
|
|
22
22
|
padding: var(--gap-m) var(--gap-m);
|
|
23
23
|
background-color: var(--color-light-bg-primary);
|
|
24
24
|
}
|
|
25
|
-
.bottom-
|
|
25
|
+
.bottom-sheet__sticky_1gnta {
|
|
26
26
|
position: sticky;
|
|
27
27
|
bottom: 0;
|
|
28
28
|
}
|
|
29
|
-
.bottom-
|
|
29
|
+
.bottom-sheet__highlighted_1gnta {
|
|
30
30
|
border-top: var(--bottom-sheet-footer-border-top);
|
|
31
31
|
background-color: var(--bottom-sheet-footer-background-color);
|
|
32
32
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../../tslib.es6-
|
|
1
|
+
import '../../tslib.es6-d5ff3006.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'classnames';
|
|
4
4
|
import 'react-div-100vh';
|
|
@@ -10,7 +10,7 @@ import '@alfalab/icons-glyph/CrossMIcon';
|
|
|
10
10
|
import '../closer/Component.js';
|
|
11
11
|
import '@alfalab/icons-glyph/ArrowBackMIcon';
|
|
12
12
|
import '../backer/Component.js';
|
|
13
|
-
export { a as Header } from '../../component-
|
|
13
|
+
export { a as Header } from '../../component-a6da8768.js';
|
|
14
14
|
import '../footer/Component.js';
|
|
15
15
|
import '@alfalab/core-components-backdrop/esm';
|
|
16
16
|
import '../swipeable-backdrop/Component.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1umwq */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
}
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
--bottom-sheet-title-font-family: var(--font-family-system);
|
|
31
31
|
--bottom-sheet-title-margin-vertical: var(--gap-2xs);
|
|
32
32
|
}
|
|
33
|
-
.bottom-
|
|
33
|
+
.bottom-sheet__headerWrapper_1j3ft {
|
|
34
34
|
padding: var(--gap-xs);
|
|
35
35
|
padding-bottom: 0;
|
|
36
36
|
background-color: var(--color-light-bg-primary);
|
|
@@ -38,38 +38,38 @@
|
|
|
38
38
|
border-top-left-radius: var(--border-radius-xl);
|
|
39
39
|
z-index: 1;
|
|
40
40
|
}
|
|
41
|
-
.bottom-
|
|
41
|
+
.bottom-sheet__header_1j3ft {
|
|
42
42
|
display: flex;
|
|
43
43
|
}
|
|
44
|
-
.bottom-
|
|
44
|
+
.bottom-sheet__sticky_1j3ft {
|
|
45
45
|
position: sticky;
|
|
46
46
|
top: 0;
|
|
47
47
|
}
|
|
48
|
-
.bottom-
|
|
48
|
+
.bottom-sheet__highlighted_1j3ft {
|
|
49
49
|
border-bottom: var(--bottom-sheet-header-border-bottom);
|
|
50
50
|
}
|
|
51
|
-
.bottom-
|
|
51
|
+
.bottom-sheet__justifyEnd_1j3ft {
|
|
52
52
|
justify-content: flex-end;
|
|
53
53
|
}
|
|
54
|
-
.bottom-
|
|
54
|
+
.bottom-sheet__addon_1j3ft {
|
|
55
55
|
display: flex;
|
|
56
56
|
justify-content: center;
|
|
57
57
|
align-items: center;
|
|
58
58
|
min-width: 48px;
|
|
59
59
|
height: 48px;
|
|
60
60
|
}
|
|
61
|
-
.bottom-
|
|
61
|
+
.bottom-sheet__addonFixed_1j3ft {
|
|
62
62
|
position: fixed;
|
|
63
63
|
}
|
|
64
|
-
.bottom-
|
|
64
|
+
.bottom-sheet__addonLeft_1j3ft {
|
|
65
65
|
left: 0;
|
|
66
66
|
margin-left: var(--gap-xs);
|
|
67
67
|
}
|
|
68
|
-
.bottom-
|
|
68
|
+
.bottom-sheet__addonRight_1j3ft {
|
|
69
69
|
right: 0;
|
|
70
70
|
margin-right: var(--gap-xs);
|
|
71
71
|
}
|
|
72
|
-
.bottom-
|
|
72
|
+
.bottom-sheet__title_1j3ft {
|
|
73
73
|
padding: var(--gap-xs) var(--gap-xs);
|
|
74
74
|
margin: var(--bottom-sheet-title-margin-vertical) 0;
|
|
75
75
|
width: 100%;
|
|
@@ -78,23 +78,23 @@
|
|
|
78
78
|
line-height: var(--bottom-sheet-title-line-height);
|
|
79
79
|
font-family: var(--bottom-sheet-title-font-family);
|
|
80
80
|
}
|
|
81
|
-
.bottom-
|
|
81
|
+
.bottom-sheet__titleCenter_1j3ft {
|
|
82
82
|
text-align: center;
|
|
83
83
|
}
|
|
84
|
-
.bottom-
|
|
84
|
+
.bottom-sheet__titleLeft_1j3ft {
|
|
85
85
|
text-align: left;
|
|
86
86
|
}
|
|
87
|
-
.bottom-
|
|
87
|
+
.bottom-sheet__trimTitle_1j3ft {
|
|
88
88
|
white-space: nowrap;
|
|
89
89
|
overflow: hidden;
|
|
90
90
|
text-overflow: ellipsis;
|
|
91
91
|
}
|
|
92
|
-
.bottom-
|
|
92
|
+
.bottom-sheet__titleBigIndentHorizontal_1j3ft {
|
|
93
93
|
margin: var(--bottom-sheet-title-margin-vertical) var(--gap-4xl);
|
|
94
94
|
}
|
|
95
|
-
.bottom-
|
|
95
|
+
.bottom-sheet__titleIndentRight_1j3ft {
|
|
96
96
|
margin-right: var(--gap-4xl);
|
|
97
97
|
}
|
|
98
|
-
.bottom-
|
|
98
|
+
.bottom-sheet__titleIndentLeft_1j3ft {
|
|
99
99
|
margin-left: var(--gap-4xl);
|
|
100
100
|
}
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1yvk1 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
--color-light-graphic-quaternary: #dbdee1;
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
--bottom-sheet-in-transition: 0.5s cubic-bezier(0.09, 0.91, 0.18, 0.99);
|
|
25
25
|
--bottom-sheet-out-transition: 0.3s ease;
|
|
26
26
|
}
|
|
27
|
-
.bottom-
|
|
27
|
+
.bottom-sheet__modal_1enkg {
|
|
28
28
|
background-color: transparent;
|
|
29
29
|
position: fixed;
|
|
30
30
|
bottom: 0;
|
|
31
31
|
width: 100%;
|
|
32
32
|
max-width: 600px;
|
|
33
33
|
}
|
|
34
|
-
.bottom-
|
|
34
|
+
.bottom-sheet__component_1enkg {
|
|
35
35
|
overflow: hidden;
|
|
36
36
|
position: relative;
|
|
37
37
|
display: flex;
|
|
@@ -41,20 +41,17 @@
|
|
|
41
41
|
background: var(--color-light-bg-primary);
|
|
42
42
|
transform: translateY(100%);
|
|
43
43
|
}
|
|
44
|
-
.bottom-
|
|
44
|
+
.bottom-sheet__withTransition_1enkg {
|
|
45
45
|
transition: var(--bottom-sheet-out-transition);
|
|
46
46
|
}
|
|
47
|
-
.bottom-
|
|
48
|
-
transition: 0s linear;
|
|
49
|
-
}
|
|
50
|
-
.bottom-sheet__scrollableContainer_1gf4k {
|
|
47
|
+
.bottom-sheet__scrollableContainer_1enkg {
|
|
51
48
|
overflow: auto;
|
|
52
49
|
display: flex;
|
|
53
50
|
flex-direction: column;
|
|
54
51
|
position: relative;
|
|
55
52
|
height: 100%;
|
|
56
53
|
}
|
|
57
|
-
.bottom-
|
|
54
|
+
.bottom-sheet__marker_1enkg {
|
|
58
55
|
position: fixed;
|
|
59
56
|
top: var(--gap-2xs);
|
|
60
57
|
left: 50%;
|
|
@@ -65,7 +62,7 @@
|
|
|
65
62
|
background-color: var(--color-light-graphic-quaternary);
|
|
66
63
|
z-index: 1000;
|
|
67
64
|
}
|
|
68
|
-
.bottom-
|
|
65
|
+
.bottom-sheet__content_1enkg {
|
|
69
66
|
display: flex;
|
|
70
67
|
flex-direction: column;
|
|
71
68
|
flex: 1;
|
|
@@ -73,29 +70,29 @@
|
|
|
73
70
|
color: var(--color-light-text-primary);
|
|
74
71
|
background-color: var(--color-light-bg-primary);
|
|
75
72
|
}
|
|
76
|
-
.bottom-
|
|
73
|
+
.bottom-sheet__noHeader_1enkg {
|
|
77
74
|
padding-top: var(--gap-xl);
|
|
78
75
|
}
|
|
79
|
-
.bottom-
|
|
76
|
+
.bottom-sheet__noFooter_1enkg {
|
|
80
77
|
padding-bottom: var(--gap-m);
|
|
81
78
|
}
|
|
82
|
-
.bottom-
|
|
79
|
+
.bottom-sheet__scrollLocked_1enkg {
|
|
83
80
|
overflow: hidden;
|
|
84
81
|
}
|
|
85
|
-
.bottom-
|
|
82
|
+
.bottom-sheet__appear_1enkg .bottom-sheet__component_1enkg, .bottom-sheet__enter_1enkg .bottom-sheet__component_1enkg {
|
|
86
83
|
transition: none;
|
|
87
84
|
}
|
|
88
|
-
.bottom-
|
|
85
|
+
.bottom-sheet__appearActive_1enkg .bottom-sheet__component_1enkg, .bottom-sheet__enterActive_1enkg .bottom-sheet__component_1enkg {
|
|
89
86
|
transition: var(--bottom-sheet-in-transition);
|
|
90
87
|
transform: translateY(0);
|
|
91
88
|
}
|
|
92
|
-
.bottom-
|
|
89
|
+
.bottom-sheet__enterDone_1enkg .bottom-sheet__component_1enkg, .bottom-sheet__appearDone_1enkg .bottom-sheet__component_1enkg {
|
|
93
90
|
transform: translateY(0);
|
|
94
91
|
}
|
|
95
|
-
.bottom-
|
|
92
|
+
.bottom-sheet__exit_1enkg .bottom-sheet__component_1enkg {
|
|
96
93
|
transform: translateY(0);
|
|
97
94
|
}
|
|
98
|
-
.bottom-
|
|
95
|
+
.bottom-sheet__exitActive_1enkg .bottom-sheet__component_1enkg {
|
|
99
96
|
transition: var(--bottom-sheet-out-transition);
|
|
100
97
|
transform: translateY(100%);
|
|
101
98
|
}
|
package/esm/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./component-
|
|
1
|
+
export * from "./component-a6da8768";
|
package/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './tslib.es6-
|
|
1
|
+
import './tslib.es6-d5ff3006.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'classnames';
|
|
4
4
|
import 'react-div-100vh';
|
|
@@ -10,7 +10,7 @@ import '@alfalab/icons-glyph/CrossMIcon';
|
|
|
10
10
|
import './components/closer/Component.js';
|
|
11
11
|
import '@alfalab/icons-glyph/ArrowBackMIcon';
|
|
12
12
|
import './components/backer/Component.js';
|
|
13
|
-
export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-
|
|
13
|
+
export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-a6da8768.js';
|
|
14
14
|
import './components/footer/Component.js';
|
|
15
15
|
import '@alfalab/core-components-backdrop/esm';
|
|
16
16
|
import './components/swipeable-backdrop/Component.js';
|
|
File without changes
|
|
File without changes
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1yvk1 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
--color-light-graphic-quaternary: #dbdee1;
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
--bottom-sheet-in-transition: 0.5s cubic-bezier(0.09, 0.91, 0.18, 0.99);
|
|
25
25
|
--bottom-sheet-out-transition: 0.3s ease;
|
|
26
26
|
}
|
|
27
|
-
.bottom-
|
|
27
|
+
.bottom-sheet__modal_1enkg {
|
|
28
28
|
background-color: transparent;
|
|
29
29
|
position: fixed;
|
|
30
30
|
bottom: 0;
|
|
31
31
|
width: 100%;
|
|
32
32
|
max-width: 600px;
|
|
33
33
|
}
|
|
34
|
-
.bottom-
|
|
34
|
+
.bottom-sheet__component_1enkg {
|
|
35
35
|
overflow: hidden;
|
|
36
36
|
position: relative;
|
|
37
37
|
display: flex;
|
|
@@ -41,20 +41,17 @@
|
|
|
41
41
|
background: var(--color-light-bg-primary);
|
|
42
42
|
transform: translateY(100%);
|
|
43
43
|
}
|
|
44
|
-
.bottom-
|
|
44
|
+
.bottom-sheet__withTransition_1enkg {
|
|
45
45
|
transition: var(--bottom-sheet-out-transition);
|
|
46
46
|
}
|
|
47
|
-
.bottom-
|
|
48
|
-
transition: 0s linear;
|
|
49
|
-
}
|
|
50
|
-
.bottom-sheet__scrollableContainer_1gf4k {
|
|
47
|
+
.bottom-sheet__scrollableContainer_1enkg {
|
|
51
48
|
overflow: auto;
|
|
52
49
|
display: flex;
|
|
53
50
|
flex-direction: column;
|
|
54
51
|
position: relative;
|
|
55
52
|
height: 100%;
|
|
56
53
|
}
|
|
57
|
-
.bottom-
|
|
54
|
+
.bottom-sheet__marker_1enkg {
|
|
58
55
|
position: fixed;
|
|
59
56
|
top: var(--gap-2xs);
|
|
60
57
|
left: 50%;
|
|
@@ -65,7 +62,7 @@
|
|
|
65
62
|
background-color: var(--color-light-graphic-quaternary);
|
|
66
63
|
z-index: 1000;
|
|
67
64
|
}
|
|
68
|
-
.bottom-
|
|
65
|
+
.bottom-sheet__content_1enkg {
|
|
69
66
|
display: flex;
|
|
70
67
|
flex-direction: column;
|
|
71
68
|
flex: 1;
|
|
@@ -73,29 +70,29 @@
|
|
|
73
70
|
color: var(--color-light-text-primary);
|
|
74
71
|
background-color: var(--color-light-bg-primary);
|
|
75
72
|
}
|
|
76
|
-
.bottom-
|
|
73
|
+
.bottom-sheet__noHeader_1enkg {
|
|
77
74
|
padding-top: var(--gap-xl);
|
|
78
75
|
}
|
|
79
|
-
.bottom-
|
|
76
|
+
.bottom-sheet__noFooter_1enkg {
|
|
80
77
|
padding-bottom: var(--gap-m);
|
|
81
78
|
}
|
|
82
|
-
.bottom-
|
|
79
|
+
.bottom-sheet__scrollLocked_1enkg {
|
|
83
80
|
overflow: hidden;
|
|
84
81
|
}
|
|
85
|
-
.bottom-
|
|
82
|
+
.bottom-sheet__appear_1enkg .bottom-sheet__component_1enkg, .bottom-sheet__enter_1enkg .bottom-sheet__component_1enkg {
|
|
86
83
|
transition: none;
|
|
87
84
|
}
|
|
88
|
-
.bottom-
|
|
85
|
+
.bottom-sheet__appearActive_1enkg .bottom-sheet__component_1enkg, .bottom-sheet__enterActive_1enkg .bottom-sheet__component_1enkg {
|
|
89
86
|
transition: var(--bottom-sheet-in-transition);
|
|
90
87
|
transform: translateY(0);
|
|
91
88
|
}
|
|
92
|
-
.bottom-
|
|
89
|
+
.bottom-sheet__enterDone_1enkg .bottom-sheet__component_1enkg, .bottom-sheet__appearDone_1enkg .bottom-sheet__component_1enkg {
|
|
93
90
|
transform: translateY(0);
|
|
94
91
|
}
|
|
95
|
-
.bottom-
|
|
92
|
+
.bottom-sheet__exit_1enkg .bottom-sheet__component_1enkg {
|
|
96
93
|
transform: translateY(0);
|
|
97
94
|
}
|
|
98
|
-
.bottom-
|
|
95
|
+
.bottom-sheet__exitActive_1enkg .bottom-sheet__component_1enkg {
|
|
99
96
|
transition: var(--bottom-sheet-out-transition);
|
|
100
97
|
transform: translateY(100%);
|
|
101
98
|
}
|
package/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./component-
|
|
1
|
+
export * from "./component-081431eb";
|
package/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('./tslib.es6-
|
|
5
|
+
require('./tslib.es6-2fdacaa4.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('react-div-100vh');
|
|
@@ -14,7 +14,7 @@ require('@alfalab/icons-glyph/CrossMIcon');
|
|
|
14
14
|
require('./components/closer/Component.js');
|
|
15
15
|
require('@alfalab/icons-glyph/ArrowBackMIcon');
|
|
16
16
|
require('./components/backer/Component.js');
|
|
17
|
-
var components_header_Component = require('./component-
|
|
17
|
+
var components_header_Component = require('./component-081431eb.js');
|
|
18
18
|
require('./components/footer/Component.js');
|
|
19
19
|
require('@alfalab/core-components-backdrop');
|
|
20
20
|
require('./components/swipeable-backdrop/Component.js');
|
|
@@ -205,6 +205,7 @@ type BottomSheetProps = {
|
|
|
205
205
|
*/
|
|
206
206
|
disableBlockingScroll?: boolean;
|
|
207
207
|
/**
|
|
208
|
+
* @deprecated данный проп больше не используется, временно оставлен для обратной совместимости
|
|
208
209
|
* Не анимировать шторку при изменении размера вьюпорта
|
|
209
210
|
*/
|
|
210
211
|
ignoreScreenChange?: boolean;
|