@alfalab/core-components-bottom-sheet 5.2.2 → 5.3.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-a31768c8.d.ts → component-d95f9ffe.d.ts} +5 -1
- package/{component-a31768c8.js → component-d95f9ffe.js} +10 -8
- package/component.js +3 -2
- package/components/backer/Component.js +2 -2
- package/components/backer/index.css +2 -2
- package/components/closer/Component.js +2 -2
- package/components/closer/index.css +2 -2
- package/components/footer/Component.js +1 -1
- package/components/footer/index.css +3 -3
- package/components/header/Component.js +3 -2
- package/components/header/index.css +16 -16
- package/components/swipeable-backdrop/Component.js +1 -1
- package/{esm/component-13675fe5.d.ts → cssm/component-5455358e.d.ts} +5 -1
- package/cssm/{component-082df5fd.js → component-5455358e.js} +7 -5
- package/cssm/component.js +2 -1
- package/cssm/components/header/Component.js +2 -1
- package/cssm/index.d.ts +1 -1
- package/cssm/index.js +2 -1
- package/{cssm/component-082df5fd.d.ts → esm/component-8d97503e.d.ts} +5 -1
- package/esm/{component-13675fe5.js → component-8d97503e.js} +9 -8
- package/esm/component.js +3 -2
- package/esm/components/backer/Component.js +2 -2
- package/esm/components/backer/index.css +2 -2
- package/esm/components/closer/Component.js +2 -2
- package/esm/components/closer/index.css +2 -2
- package/esm/components/footer/Component.js +1 -1
- package/esm/components/footer/index.css +3 -3
- package/esm/components/header/Component.js +3 -2
- package/esm/components/header/index.css +16 -16
- package/esm/components/swipeable-backdrop/Component.js +1 -1
- package/esm/index.css +14 -14
- package/esm/index.d.ts +1 -1
- package/esm/index.js +3 -2
- package/esm/{tslib.es6-c1a8448e.d.ts → tslib.es6-c005000e.d.ts} +0 -0
- package/esm/{tslib.es6-c1a8448e.js → tslib.es6-c005000e.js} +0 -0
- package/index.css +14 -14
- package/index.d.ts +1 -1
- package/index.js +3 -2
- package/modern/{component-dbd4ab19.d.ts → component-d6c1ca86.d.ts} +5 -1
- package/modern/{component-dbd4ab19.js → component-d6c1ca86.js} +5 -4
- package/modern/component.js +2 -1
- package/modern/components/backer/Component.js +1 -1
- package/modern/components/backer/index.css +2 -2
- package/modern/components/closer/Component.js +1 -1
- package/modern/components/closer/index.css +2 -2
- package/modern/components/footer/Component.js +1 -1
- package/modern/components/footer/index.css +3 -3
- package/modern/components/header/Component.js +2 -1
- package/modern/components/header/index.css +16 -16
- package/modern/index.css +14 -14
- package/modern/index.d.ts +1 -1
- package/modern/index.js +2 -1
- package/package.json +2 -1
- /package/{tslib.es6-f62bcae9.d.ts → tslib.es6-1027d96a.d.ts} +0 -0
- /package/{tslib.es6-f62bcae9.js → tslib.es6-1027d96a.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react-transition-group" />
|
|
2
2
|
/// <reference types="react" />
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { FC, ReactNode, HTMLAttributes } from "react";
|
|
4
|
+
import { FC, ReactNode, HTMLAttributes, RefObject } from "react";
|
|
5
5
|
import { BottomSheetTitleAlign } from "./index";
|
|
6
6
|
import { TransitionProps } from 'react-transition-group/Transition';
|
|
7
7
|
import { BaseModalProps } from "@alfalab/core-components-base-modal";
|
|
@@ -220,6 +220,10 @@ type BottomSheetProps = {
|
|
|
220
220
|
* Свойства для Бэкдропа
|
|
221
221
|
*/
|
|
222
222
|
backdropProps?: BaseModalProps['backdropProps'];
|
|
223
|
+
/**
|
|
224
|
+
* Реф на контейнер, в котором происходит скролл
|
|
225
|
+
*/
|
|
226
|
+
scrollableContainerRef?: RefObject<HTMLElement>;
|
|
223
227
|
/**
|
|
224
228
|
* Обработчик закрытия
|
|
225
229
|
*/
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require('./tslib.es6-
|
|
3
|
+
var tslib_es6 = require('./tslib.es6-1027d96a.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var reactDiv100vh = require('react-div-100vh');
|
|
6
|
+
var mergeRefs = require('react-merge-refs');
|
|
6
7
|
var reactSwipeable = require('react-swipeable');
|
|
7
8
|
var cn = require('classnames');
|
|
8
9
|
var coreComponentsBaseModal = require('@alfalab/core-components-base-modal');
|
|
@@ -15,6 +16,7 @@ var components_closer_Component = require('./components/closer/Component.js');
|
|
|
15
16
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
16
17
|
|
|
17
18
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
19
|
+
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
18
20
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
19
21
|
|
|
20
22
|
var getDataTestId = function (dataTestId, element) {
|
|
@@ -22,7 +24,7 @@ var getDataTestId = function (dataTestId, element) {
|
|
|
22
24
|
return dataTestId ? "".concat(dataTestId).concat(elementPart) : undefined;
|
|
23
25
|
};
|
|
24
26
|
|
|
25
|
-
var styles$1 = {"headerWrapper":"bottom-
|
|
27
|
+
var styles$1 = {"headerWrapper":"bottom-sheet__headerWrapper_b563d","header":"bottom-sheet__header_b563d","sticky":"bottom-sheet__sticky_b563d","highlighted":"bottom-sheet__highlighted_b563d","justifyEnd":"bottom-sheet__justifyEnd_b563d","addon":"bottom-sheet__addon_b563d","addonFixed":"bottom-sheet__addonFixed_b563d","addonLeft":"bottom-sheet__addonLeft_b563d","addonRight":"bottom-sheet__addonRight_b563d","title":"bottom-sheet__title_b563d","titleCenter":"bottom-sheet__titleCenter_b563d","titleLeft":"bottom-sheet__titleLeft_b563d","trimTitle":"bottom-sheet__trimTitle_b563d","titleBigIndentHorizontal":"bottom-sheet__titleBigIndentHorizontal_b563d","titleIndentRight":"bottom-sheet__titleIndentRight_b563d","titleIndentLeft":"bottom-sheet__titleIndentLeft_b563d"};
|
|
26
28
|
require('./components/header/index.css')
|
|
27
29
|
|
|
28
30
|
var Header = function (_a) {
|
|
@@ -72,7 +74,7 @@ var Header = function (_a) {
|
|
|
72
74
|
bottomAddons));
|
|
73
75
|
};
|
|
74
76
|
|
|
75
|
-
var styles = {"modal":"bottom-
|
|
77
|
+
var styles = {"modal":"bottom-sheet__modal_8liup","component":"bottom-sheet__component_8liup","withTransition":"bottom-sheet__withTransition_8liup","scrollableContainer":"bottom-sheet__scrollableContainer_8liup","marker":"bottom-sheet__marker_8liup","content":"bottom-sheet__content_8liup","noHeader":"bottom-sheet__noHeader_8liup","noFooter":"bottom-sheet__noFooter_8liup","scrollLocked":"bottom-sheet__scrollLocked_8liup","appear":"bottom-sheet__appear_8liup","enter":"bottom-sheet__enter_8liup","appearActive":"bottom-sheet__appearActive_8liup","enterActive":"bottom-sheet__enterActive_8liup","enterDone":"bottom-sheet__enterDone_8liup","appearDone":"bottom-sheet__appearDone_8liup","exit":"bottom-sheet__exit_8liup","exitActive":"bottom-sheet__exitActive_8liup"};
|
|
76
78
|
require('./index.css')
|
|
77
79
|
|
|
78
80
|
var TIMEOUT = 300;
|
|
@@ -85,10 +87,10 @@ var HEADER_OFFSET = 24;
|
|
|
85
87
|
var CLOSE_OFFSET = 0.2;
|
|
86
88
|
var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
87
89
|
var _b, _c, _d;
|
|
88
|
-
var open = _a.open, title = _a.title, container = _a.container, 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;
|
|
89
|
-
var
|
|
90
|
-
var
|
|
91
|
-
var
|
|
90
|
+
var open = _a.open, title = _a.title, container = _a.container, 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, _k = _a.scrollableContainerRef, scrollableContainerRef = _k === void 0 ? function () { return null; } : _k, onClose = _a.onClose, onBack = _a.onBack;
|
|
91
|
+
var _l = React.useState(0), sheetOffset = _l[0], setSheetOffset = _l[1];
|
|
92
|
+
var _m = React.useState(1), backdropOpacity = _m[0], setBackdropOpacity = _m[1];
|
|
93
|
+
var _o = React.useState(false), scrollLocked = _o[0], setScrollLocked = _o[1];
|
|
92
94
|
var sheetHeight = React.useRef(0);
|
|
93
95
|
var scrollableContainer = React.useRef(null);
|
|
94
96
|
var scrollableContainerScrollValue = React.useRef(0);
|
|
@@ -229,7 +231,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
|
229
231
|
_b)), style: tslib_es6.__assign(tslib_es6.__assign({}, getSwipeStyles()), getHeightStyles()) }, sheetSwipeablehandlers),
|
|
230
232
|
React__default.default.createElement("div", tslib_es6.__assign({}, containerProps, { className: cn__default.default(styles.scrollableContainer, containerProps === null || containerProps === void 0 ? void 0 : containerProps.className, containerClassName, (_c = {},
|
|
231
233
|
_c[styles.scrollLocked] = scrollLocked,
|
|
232
|
-
_c)), ref: scrollableContainer }),
|
|
234
|
+
_c)), ref: mergeRefs__default.default([scrollableContainer, scrollableContainerRef]) }),
|
|
233
235
|
swipeable && React__default.default.createElement("div", { className: cn__default.default(styles.marker) }),
|
|
234
236
|
!hideHeader && !emptyHeader && React__default.default.createElement(Header, tslib_es6.__assign({}, headerProps)),
|
|
235
237
|
React__default.default.createElement("div", { className: cn__default.default(styles.content, contentClassName, (_d = {},
|
package/component.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
require('./tslib.es6-
|
|
3
|
+
require('./tslib.es6-1027d96a.js');
|
|
4
4
|
require('react');
|
|
5
5
|
require('react-div-100vh');
|
|
6
|
+
require('react-merge-refs');
|
|
6
7
|
require('react-swipeable');
|
|
7
8
|
require('classnames');
|
|
8
9
|
require('@alfalab/core-components-base-modal');
|
|
9
|
-
var components_header_Component = require('./component-
|
|
10
|
+
var components_header_Component = require('./component-d95f9ffe.js');
|
|
10
11
|
require('./components/footer/Component.js');
|
|
11
12
|
require('./components/swipeable-backdrop/Component.js');
|
|
12
13
|
require('@alfalab/core-components-typography');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
3
|
+
var tslib_es6 = require('../../tslib.es6-1027d96a.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
var coreComponentsIconButton = require('@alfalab/core-components-icon-button');
|
|
@@ -11,7 +11,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
12
12
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
13
13
|
|
|
14
|
-
var styles = {"backer":"bottom-
|
|
14
|
+
var styles = {"backer":"bottom-sheet__backer_f3np1","button":"bottom-sheet__button_f3np1"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
var Backer = function (_a) {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
} :root {
|
|
19
19
|
} :root {
|
|
20
20
|
--bottom-sheet-backer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
|
|
21
|
-
} .bottom-
|
|
21
|
+
} .bottom-sheet__backer_f3np1 {
|
|
22
22
|
width: 32px;
|
|
23
23
|
height: 32px;
|
|
24
24
|
display: flex;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
align-items: center;
|
|
27
27
|
cursor: pointer;
|
|
28
28
|
color: var(--color-light-graphic-primary);
|
|
29
|
-
} .bottom-
|
|
29
|
+
} .bottom-sheet__button_f3np1 {
|
|
30
30
|
background: var(--bottom-sheet-backer-bg-color);
|
|
31
31
|
-webkit-backdrop-filter: blur(10px);
|
|
32
32
|
backdrop-filter: blur(10px);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
3
|
+
var tslib_es6 = require('../../tslib.es6-1027d96a.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
var coreComponentsBaseModal = require('@alfalab/core-components-base-modal');
|
|
@@ -12,7 +12,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
13
13
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
14
14
|
|
|
15
|
-
var styles = {"closer":"bottom-
|
|
15
|
+
var styles = {"closer":"bottom-sheet__closer_tnhi0","button":"bottom-sheet__button_tnhi0"};
|
|
16
16
|
require('./index.css')
|
|
17
17
|
|
|
18
18
|
var Closer = function (_a) {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
} :root {
|
|
19
19
|
} :root {
|
|
20
20
|
--bottom-sheet-closer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
|
|
21
|
-
} .bottom-
|
|
21
|
+
} .bottom-sheet__closer_tnhi0 {
|
|
22
22
|
width: 32px;
|
|
23
23
|
height: 32px;
|
|
24
24
|
display: flex;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
align-items: center;
|
|
27
27
|
cursor: pointer;
|
|
28
28
|
color: var(--color-light-graphic-primary);
|
|
29
|
-
} .bottom-
|
|
29
|
+
} .bottom-sheet__button_tnhi0 {
|
|
30
30
|
background: var(--bottom-sheet-closer-bg-color);
|
|
31
31
|
-webkit-backdrop-filter: blur(10px);
|
|
32
32
|
backdrop-filter: blur(10px);
|
|
@@ -9,7 +9,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
10
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
11
11
|
|
|
12
|
-
var styles = {"footer":"bottom-
|
|
12
|
+
var styles = {"footer":"bottom-sheet__footer_3abbw","sticky":"bottom-sheet__sticky_3abbw","highlighted":"bottom-sheet__highlighted_3abbw"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
var Footer = function (_a) {
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
} :root {
|
|
21
21
|
--bottom-sheet-footer-border-top: 1px solid var(--color-light-border-primary);
|
|
22
22
|
--bottom-sheet-footer-background-color: var(--color-light-bg-primary);
|
|
23
|
-
} .bottom-
|
|
23
|
+
} .bottom-sheet__footer_3abbw {
|
|
24
24
|
padding: var(--gap-m) var(--gap-m);
|
|
25
25
|
background-color: var(--color-light-bg-primary);
|
|
26
|
-
} .bottom-
|
|
26
|
+
} .bottom-sheet__sticky_3abbw {
|
|
27
27
|
position: sticky;
|
|
28
28
|
bottom: 0;
|
|
29
|
-
} .bottom-
|
|
29
|
+
} .bottom-sheet__highlighted_3abbw {
|
|
30
30
|
border-top: var(--bottom-sheet-footer-border-top);
|
|
31
31
|
background-color: var(--bottom-sheet-footer-background-color);
|
|
32
32
|
}
|
|
@@ -4,11 +4,12 @@ require('react');
|
|
|
4
4
|
require('classnames');
|
|
5
5
|
require('@alfalab/core-components-base-modal');
|
|
6
6
|
require('@alfalab/core-components-typography');
|
|
7
|
-
var components_header_Component = require('../../component-
|
|
7
|
+
var components_header_Component = require('../../component-d95f9ffe.js');
|
|
8
8
|
require('../backer/Component.js');
|
|
9
9
|
require('../closer/Component.js');
|
|
10
|
-
require('../../tslib.es6-
|
|
10
|
+
require('../../tslib.es6-1027d96a.js');
|
|
11
11
|
require('react-div-100vh');
|
|
12
|
+
require('react-merge-refs');
|
|
12
13
|
require('react-swipeable');
|
|
13
14
|
require('../footer/Component.js');
|
|
14
15
|
require('../swipeable-backdrop/Component.js');
|
|
@@ -28,37 +28,37 @@
|
|
|
28
28
|
--bottom-sheet-title-line-height: 24px;
|
|
29
29
|
--bottom-sheet-title-font-family: var(--font-family-system);
|
|
30
30
|
--bottom-sheet-title-margin-vertical: var(--gap-2xs);
|
|
31
|
-
} .bottom-
|
|
31
|
+
} .bottom-sheet__headerWrapper_b563d {
|
|
32
32
|
padding: var(--gap-xs);
|
|
33
33
|
padding-bottom: 0;
|
|
34
34
|
background-color: var(--color-light-bg-primary);
|
|
35
35
|
border-top-right-radius: var(--border-radius-xl);
|
|
36
36
|
border-top-left-radius: var(--border-radius-xl);
|
|
37
37
|
z-index: 1;
|
|
38
|
-
} .bottom-
|
|
38
|
+
} .bottom-sheet__header_b563d {
|
|
39
39
|
display: flex;
|
|
40
|
-
} .bottom-
|
|
40
|
+
} .bottom-sheet__sticky_b563d {
|
|
41
41
|
position: sticky;
|
|
42
42
|
top: 0;
|
|
43
|
-
} .bottom-
|
|
43
|
+
} .bottom-sheet__highlighted_b563d {
|
|
44
44
|
border-bottom: var(--bottom-sheet-header-border-bottom);
|
|
45
|
-
} .bottom-
|
|
45
|
+
} .bottom-sheet__justifyEnd_b563d {
|
|
46
46
|
justify-content: flex-end;
|
|
47
|
-
} .bottom-
|
|
47
|
+
} .bottom-sheet__addon_b563d {
|
|
48
48
|
display: flex;
|
|
49
49
|
justify-content: center;
|
|
50
50
|
align-items: center;
|
|
51
51
|
min-width: 48px;
|
|
52
52
|
height: 48px;
|
|
53
|
-
} .bottom-
|
|
53
|
+
} .bottom-sheet__addonFixed_b563d {
|
|
54
54
|
position: fixed;
|
|
55
|
-
} .bottom-
|
|
55
|
+
} .bottom-sheet__addonLeft_b563d {
|
|
56
56
|
left: 0;
|
|
57
57
|
margin-left: var(--gap-xs);
|
|
58
|
-
} .bottom-
|
|
58
|
+
} .bottom-sheet__addonRight_b563d {
|
|
59
59
|
right: 0;
|
|
60
60
|
margin-right: var(--gap-xs);
|
|
61
|
-
} .bottom-
|
|
61
|
+
} .bottom-sheet__title_b563d {
|
|
62
62
|
padding: var(--gap-xs) var(--gap-xs);
|
|
63
63
|
margin: var(--bottom-sheet-title-margin-vertical) 0;
|
|
64
64
|
width: 100%;
|
|
@@ -66,18 +66,18 @@
|
|
|
66
66
|
font-weight: var(--bottom-sheet-title-font-weight);
|
|
67
67
|
line-height: var(--bottom-sheet-title-line-height);
|
|
68
68
|
font-family: var(--bottom-sheet-title-font-family);
|
|
69
|
-
} .bottom-
|
|
69
|
+
} .bottom-sheet__titleCenter_b563d {
|
|
70
70
|
text-align: center;
|
|
71
|
-
} .bottom-
|
|
71
|
+
} .bottom-sheet__titleLeft_b563d {
|
|
72
72
|
text-align: left;
|
|
73
|
-
} .bottom-
|
|
73
|
+
} .bottom-sheet__trimTitle_b563d {
|
|
74
74
|
white-space: nowrap;
|
|
75
75
|
overflow: hidden;
|
|
76
76
|
text-overflow: ellipsis;
|
|
77
|
-
} .bottom-
|
|
77
|
+
} .bottom-sheet__titleBigIndentHorizontal_b563d {
|
|
78
78
|
margin: var(--bottom-sheet-title-margin-vertical) var(--gap-4xl);
|
|
79
|
-
} .bottom-
|
|
79
|
+
} .bottom-sheet__titleIndentRight_b563d {
|
|
80
80
|
margin-right: var(--gap-4xl);
|
|
81
|
-
} .bottom-
|
|
81
|
+
} .bottom-sheet__titleIndentLeft_b563d {
|
|
82
82
|
margin-left: var(--gap-4xl);
|
|
83
83
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react-transition-group" />
|
|
2
2
|
/// <reference types="react" />
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { FC, ReactNode, HTMLAttributes } from "react";
|
|
4
|
+
import { FC, ReactNode, HTMLAttributes, RefObject } from "react";
|
|
5
5
|
import { BottomSheetTitleAlign } from "./index";
|
|
6
6
|
import { TransitionProps } from 'react-transition-group/Transition';
|
|
7
7
|
import { BaseModalProps } from "@alfalab/core-components-base-modal";
|
|
@@ -220,6 +220,10 @@ type BottomSheetProps = {
|
|
|
220
220
|
* Свойства для Бэкдропа
|
|
221
221
|
*/
|
|
222
222
|
backdropProps?: BaseModalProps['backdropProps'];
|
|
223
|
+
/**
|
|
224
|
+
* Реф на контейнер, в котором происходит скролл
|
|
225
|
+
*/
|
|
226
|
+
scrollableContainerRef?: RefObject<HTMLElement>;
|
|
223
227
|
/**
|
|
224
228
|
* Обработчик закрытия
|
|
225
229
|
*/
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var tslib_es6 = require('./tslib.es6-bbd6cd2a.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var reactDiv100vh = require('react-div-100vh');
|
|
6
|
+
var mergeRefs = require('react-merge-refs');
|
|
6
7
|
var reactSwipeable = require('react-swipeable');
|
|
7
8
|
var cn = require('classnames');
|
|
8
9
|
var coreComponentsBaseModal = require('@alfalab/core-components-base-modal/cssm');
|
|
@@ -17,6 +18,7 @@ var styles = require('./components/header/index.module.css');
|
|
|
17
18
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
18
19
|
|
|
19
20
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
21
|
+
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
20
22
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
21
23
|
var styles__default$1 = /*#__PURE__*/_interopDefaultCompat(styles$1);
|
|
22
24
|
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
@@ -83,10 +85,10 @@ var HEADER_OFFSET = 24;
|
|
|
83
85
|
var CLOSE_OFFSET = 0.2;
|
|
84
86
|
var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
85
87
|
var _b, _c, _d;
|
|
86
|
-
var open = _a.open, title = _a.title, container = _a.container, 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;
|
|
87
|
-
var
|
|
88
|
-
var
|
|
89
|
-
var
|
|
88
|
+
var open = _a.open, title = _a.title, container = _a.container, 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, _k = _a.scrollableContainerRef, scrollableContainerRef = _k === void 0 ? function () { return null; } : _k, onClose = _a.onClose, onBack = _a.onBack;
|
|
89
|
+
var _l = React.useState(0), sheetOffset = _l[0], setSheetOffset = _l[1];
|
|
90
|
+
var _m = React.useState(1), backdropOpacity = _m[0], setBackdropOpacity = _m[1];
|
|
91
|
+
var _o = React.useState(false), scrollLocked = _o[0], setScrollLocked = _o[1];
|
|
90
92
|
var sheetHeight = React.useRef(0);
|
|
91
93
|
var scrollableContainer = React.useRef(null);
|
|
92
94
|
var scrollableContainerScrollValue = React.useRef(0);
|
|
@@ -227,7 +229,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
|
227
229
|
_b)), style: tslib_es6.__assign(tslib_es6.__assign({}, getSwipeStyles()), getHeightStyles()) }, sheetSwipeablehandlers),
|
|
228
230
|
React__default.default.createElement("div", tslib_es6.__assign({}, containerProps, { className: cn__default.default(styles__default$1.default.scrollableContainer, containerProps === null || containerProps === void 0 ? void 0 : containerProps.className, containerClassName, (_c = {},
|
|
229
231
|
_c[styles__default$1.default.scrollLocked] = scrollLocked,
|
|
230
|
-
_c)), ref: scrollableContainer }),
|
|
232
|
+
_c)), ref: mergeRefs__default.default([scrollableContainer, scrollableContainerRef]) }),
|
|
231
233
|
swipeable && React__default.default.createElement("div", { className: cn__default.default(styles__default$1.default.marker) }),
|
|
232
234
|
!hideHeader && !emptyHeader && React__default.default.createElement(Header, tslib_es6.__assign({}, headerProps)),
|
|
233
235
|
React__default.default.createElement("div", { className: cn__default.default(styles__default$1.default.content, contentClassName, (_d = {},
|
package/cssm/component.js
CHANGED
|
@@ -3,10 +3,11 @@
|
|
|
3
3
|
require('./tslib.es6-bbd6cd2a.js');
|
|
4
4
|
require('react');
|
|
5
5
|
require('react-div-100vh');
|
|
6
|
+
require('react-merge-refs');
|
|
6
7
|
require('react-swipeable');
|
|
7
8
|
require('classnames');
|
|
8
9
|
require('@alfalab/core-components-base-modal/cssm');
|
|
9
|
-
var components_header_Component = require('./component-
|
|
10
|
+
var components_header_Component = require('./component-5455358e.js');
|
|
10
11
|
require('./components/footer/Component.js');
|
|
11
12
|
require('./components/swipeable-backdrop/Component.js');
|
|
12
13
|
require('./index.module.css');
|
|
@@ -4,12 +4,13 @@ require('react');
|
|
|
4
4
|
require('classnames');
|
|
5
5
|
require('@alfalab/core-components-base-modal/cssm');
|
|
6
6
|
require('@alfalab/core-components-typography/cssm');
|
|
7
|
-
var components_header_Component = require('../../component-
|
|
7
|
+
var components_header_Component = require('../../component-5455358e.js');
|
|
8
8
|
require('../backer/Component.js');
|
|
9
9
|
require('../closer/Component.js');
|
|
10
10
|
require('./index.module.css');
|
|
11
11
|
require('../../tslib.es6-bbd6cd2a.js');
|
|
12
12
|
require('react-div-100vh');
|
|
13
|
+
require('react-merge-refs');
|
|
13
14
|
require('react-swipeable');
|
|
14
15
|
require('../footer/Component.js');
|
|
15
16
|
require('../footer/index.module.css');
|
package/cssm/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./component-
|
|
1
|
+
export * from "./component-5455358e";
|
package/cssm/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var components_header_Component = require('./component-
|
|
3
|
+
var components_header_Component = require('./component-5455358e.js');
|
|
4
4
|
require('./tslib.es6-bbd6cd2a.js');
|
|
5
5
|
require('react');
|
|
6
6
|
require('react-div-100vh');
|
|
7
|
+
require('react-merge-refs');
|
|
7
8
|
require('react-swipeable');
|
|
8
9
|
require('classnames');
|
|
9
10
|
require('@alfalab/core-components-base-modal/cssm');
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react-transition-group" />
|
|
2
2
|
/// <reference types="react" />
|
|
3
3
|
import React from "react";
|
|
4
|
-
import { FC, ReactNode, HTMLAttributes } from "react";
|
|
4
|
+
import { FC, ReactNode, HTMLAttributes, RefObject } from "react";
|
|
5
5
|
import { BottomSheetTitleAlign } from "./index";
|
|
6
6
|
import { TransitionProps } from 'react-transition-group/Transition';
|
|
7
7
|
import { BaseModalProps } from "@alfalab/core-components-base-modal";
|
|
@@ -220,6 +220,10 @@ type BottomSheetProps = {
|
|
|
220
220
|
* Свойства для Бэкдропа
|
|
221
221
|
*/
|
|
222
222
|
backdropProps?: BaseModalProps['backdropProps'];
|
|
223
|
+
/**
|
|
224
|
+
* Реф на контейнер, в котором происходит скролл
|
|
225
|
+
*/
|
|
226
|
+
scrollableContainerRef?: RefObject<HTMLElement>;
|
|
223
227
|
/**
|
|
224
228
|
* Обработчик закрытия
|
|
225
229
|
*/
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { _ as __assign } from './tslib.es6-
|
|
1
|
+
import { _ as __assign } from './tslib.es6-c005000e.js';
|
|
2
2
|
import React, { useContext, useEffect, forwardRef, useState, useRef, useCallback } from 'react';
|
|
3
3
|
import { use100vh } from 'react-div-100vh';
|
|
4
|
+
import mergeRefs from 'react-merge-refs';
|
|
4
5
|
import { useSwipeable } from 'react-swipeable';
|
|
5
6
|
import cn from 'classnames';
|
|
6
7
|
import { BaseModalContext, BaseModal } from '@alfalab/core-components-base-modal/esm';
|
|
@@ -15,7 +16,7 @@ var getDataTestId = function (dataTestId, element) {
|
|
|
15
16
|
return dataTestId ? "".concat(dataTestId).concat(elementPart) : undefined;
|
|
16
17
|
};
|
|
17
18
|
|
|
18
|
-
var styles$1 = {"headerWrapper":"bottom-
|
|
19
|
+
var styles$1 = {"headerWrapper":"bottom-sheet__headerWrapper_b563d","header":"bottom-sheet__header_b563d","sticky":"bottom-sheet__sticky_b563d","highlighted":"bottom-sheet__highlighted_b563d","justifyEnd":"bottom-sheet__justifyEnd_b563d","addon":"bottom-sheet__addon_b563d","addonFixed":"bottom-sheet__addonFixed_b563d","addonLeft":"bottom-sheet__addonLeft_b563d","addonRight":"bottom-sheet__addonRight_b563d","title":"bottom-sheet__title_b563d","titleCenter":"bottom-sheet__titleCenter_b563d","titleLeft":"bottom-sheet__titleLeft_b563d","trimTitle":"bottom-sheet__trimTitle_b563d","titleBigIndentHorizontal":"bottom-sheet__titleBigIndentHorizontal_b563d","titleIndentRight":"bottom-sheet__titleIndentRight_b563d","titleIndentLeft":"bottom-sheet__titleIndentLeft_b563d"};
|
|
19
20
|
require('./components/header/index.css')
|
|
20
21
|
|
|
21
22
|
var Header = function (_a) {
|
|
@@ -65,7 +66,7 @@ var Header = function (_a) {
|
|
|
65
66
|
bottomAddons));
|
|
66
67
|
};
|
|
67
68
|
|
|
68
|
-
var styles = {"modal":"bottom-
|
|
69
|
+
var styles = {"modal":"bottom-sheet__modal_8liup","component":"bottom-sheet__component_8liup","withTransition":"bottom-sheet__withTransition_8liup","scrollableContainer":"bottom-sheet__scrollableContainer_8liup","marker":"bottom-sheet__marker_8liup","content":"bottom-sheet__content_8liup","noHeader":"bottom-sheet__noHeader_8liup","noFooter":"bottom-sheet__noFooter_8liup","scrollLocked":"bottom-sheet__scrollLocked_8liup","appear":"bottom-sheet__appear_8liup","enter":"bottom-sheet__enter_8liup","appearActive":"bottom-sheet__appearActive_8liup","enterActive":"bottom-sheet__enterActive_8liup","enterDone":"bottom-sheet__enterDone_8liup","appearDone":"bottom-sheet__appearDone_8liup","exit":"bottom-sheet__exit_8liup","exitActive":"bottom-sheet__exitActive_8liup"};
|
|
69
70
|
require('./index.css')
|
|
70
71
|
|
|
71
72
|
var TIMEOUT = 300;
|
|
@@ -78,10 +79,10 @@ var HEADER_OFFSET = 24;
|
|
|
78
79
|
var CLOSE_OFFSET = 0.2;
|
|
79
80
|
var BottomSheet = forwardRef(function (_a, ref) {
|
|
80
81
|
var _b, _c, _d;
|
|
81
|
-
var open = _a.open, title = _a.title, container = _a.container, 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
|
|
83
|
-
var
|
|
84
|
-
var
|
|
82
|
+
var open = _a.open, title = _a.title, container = _a.container, 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, _k = _a.scrollableContainerRef, scrollableContainerRef = _k === void 0 ? function () { return null; } : _k, onClose = _a.onClose, onBack = _a.onBack;
|
|
83
|
+
var _l = useState(0), sheetOffset = _l[0], setSheetOffset = _l[1];
|
|
84
|
+
var _m = useState(1), backdropOpacity = _m[0], setBackdropOpacity = _m[1];
|
|
85
|
+
var _o = useState(false), scrollLocked = _o[0], setScrollLocked = _o[1];
|
|
85
86
|
var sheetHeight = useRef(0);
|
|
86
87
|
var scrollableContainer = useRef(null);
|
|
87
88
|
var scrollableContainerScrollValue = useRef(0);
|
|
@@ -222,7 +223,7 @@ var BottomSheet = forwardRef(function (_a, ref) {
|
|
|
222
223
|
_b)), style: __assign(__assign({}, getSwipeStyles()), getHeightStyles()) }, sheetSwipeablehandlers),
|
|
223
224
|
React.createElement("div", __assign({}, containerProps, { className: cn(styles.scrollableContainer, containerProps === null || containerProps === void 0 ? void 0 : containerProps.className, containerClassName, (_c = {},
|
|
224
225
|
_c[styles.scrollLocked] = scrollLocked,
|
|
225
|
-
_c)), ref: scrollableContainer }),
|
|
226
|
+
_c)), ref: mergeRefs([scrollableContainer, scrollableContainerRef]) }),
|
|
226
227
|
swipeable && React.createElement("div", { className: cn(styles.marker) }),
|
|
227
228
|
!hideHeader && !emptyHeader && React.createElement(Header, __assign({}, headerProps)),
|
|
228
229
|
React.createElement("div", { className: cn(styles.content, contentClassName, (_d = {},
|
package/esm/component.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import './tslib.es6-
|
|
1
|
+
import './tslib.es6-c005000e.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react-div-100vh';
|
|
4
|
+
import 'react-merge-refs';
|
|
4
5
|
import 'react-swipeable';
|
|
5
6
|
import 'classnames';
|
|
6
7
|
import '@alfalab/core-components-base-modal/esm';
|
|
7
|
-
export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-
|
|
8
|
+
export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-8d97503e.js';
|
|
8
9
|
import './components/footer/Component.js';
|
|
9
10
|
import './components/swipeable-backdrop/Component.js';
|
|
10
11
|
import '@alfalab/core-components-typography/esm';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { a as __rest, _ as __assign } from '../../tslib.es6-
|
|
1
|
+
import { a as __rest, _ as __assign } from '../../tslib.es6-c005000e.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_f3np1","button":"bottom-sheet__button_f3np1"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
var Backer = function (_a) {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
} :root {
|
|
19
19
|
} :root {
|
|
20
20
|
--bottom-sheet-backer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
|
|
21
|
-
} .bottom-
|
|
21
|
+
} .bottom-sheet__backer_f3np1 {
|
|
22
22
|
width: 32px;
|
|
23
23
|
height: 32px;
|
|
24
24
|
display: flex;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
align-items: center;
|
|
27
27
|
cursor: pointer;
|
|
28
28
|
color: var(--color-light-graphic-primary);
|
|
29
|
-
} .bottom-
|
|
29
|
+
} .bottom-sheet__button_f3np1 {
|
|
30
30
|
background: var(--bottom-sheet-backer-bg-color);
|
|
31
31
|
-webkit-backdrop-filter: blur(10px);
|
|
32
32
|
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-c005000e.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_tnhi0","button":"bottom-sheet__button_tnhi0"};
|
|
9
9
|
require('./index.css')
|
|
10
10
|
|
|
11
11
|
var Closer = function (_a) {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
} :root {
|
|
19
19
|
} :root {
|
|
20
20
|
--bottom-sheet-closer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
|
|
21
|
-
} .bottom-
|
|
21
|
+
} .bottom-sheet__closer_tnhi0 {
|
|
22
22
|
width: 32px;
|
|
23
23
|
height: 32px;
|
|
24
24
|
display: flex;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
align-items: center;
|
|
27
27
|
cursor: pointer;
|
|
28
28
|
color: var(--color-light-graphic-primary);
|
|
29
|
-
} .bottom-
|
|
29
|
+
} .bottom-sheet__button_tnhi0 {
|
|
30
30
|
background: var(--bottom-sheet-closer-bg-color);
|
|
31
31
|
-webkit-backdrop-filter: blur(10px);
|
|
32
32
|
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_3abbw","sticky":"bottom-sheet__sticky_3abbw","highlighted":"bottom-sheet__highlighted_3abbw"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
var Footer = function (_a) {
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
} :root {
|
|
21
21
|
--bottom-sheet-footer-border-top: 1px solid var(--color-light-border-primary);
|
|
22
22
|
--bottom-sheet-footer-background-color: var(--color-light-bg-primary);
|
|
23
|
-
} .bottom-
|
|
23
|
+
} .bottom-sheet__footer_3abbw {
|
|
24
24
|
padding: var(--gap-m) var(--gap-m);
|
|
25
25
|
background-color: var(--color-light-bg-primary);
|
|
26
|
-
} .bottom-
|
|
26
|
+
} .bottom-sheet__sticky_3abbw {
|
|
27
27
|
position: sticky;
|
|
28
28
|
bottom: 0;
|
|
29
|
-
} .bottom-
|
|
29
|
+
} .bottom-sheet__highlighted_3abbw {
|
|
30
30
|
border-top: var(--bottom-sheet-footer-border-top);
|
|
31
31
|
background-color: var(--bottom-sheet-footer-background-color);
|
|
32
32
|
}
|