@alfalab/core-components-bottom-sheet 4.2.0 → 4.3.2
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 +35 -0
- package/dist/{component-a69ef39f.d.ts → component-01854e98.d.ts} +13 -1
- package/dist/{component-a69ef39f.js → component-01854e98.js} +34 -30
- package/dist/component.js +2 -2
- package/dist/components/backer/Component.js +2 -2
- package/dist/components/backer/index.css +3 -3
- package/dist/components/closer/Component.js +2 -2
- package/dist/components/closer/index.css +3 -3
- package/dist/components/footer/Component.js +1 -1
- package/dist/components/footer/index.css +4 -4
- package/dist/components/header/Component.js +2 -2
- package/dist/components/header/index.css +19 -17
- package/dist/components/swipeable-backdrop/Component.js +1 -1
- package/dist/{esm/component-273ce79d.d.ts → cssm/component-1a32e10b.d.ts} +13 -1
- package/dist/cssm/{component-42c27971.js → component-1a32e10b.js} +31 -27
- package/dist/cssm/component.js +1 -1
- package/dist/cssm/components/header/Component.js +1 -1
- package/dist/cssm/components/header/index.module.css +4 -2
- package/dist/cssm/index.d.ts +1 -1
- package/dist/cssm/index.js +1 -1
- package/dist/{cssm/component-42c27971.d.ts → esm/component-3c2b5fd7.d.ts} +13 -1
- package/dist/esm/{component-273ce79d.js → component-3c2b5fd7.js} +34 -30
- package/dist/esm/component.js +2 -2
- package/dist/esm/components/backer/Component.js +2 -2
- package/dist/esm/components/backer/index.css +3 -3
- package/dist/esm/components/closer/Component.js +2 -2
- package/dist/esm/components/closer/index.css +3 -3
- package/dist/esm/components/footer/Component.js +1 -1
- package/dist/esm/components/footer/index.css +4 -4
- package/dist/esm/components/header/Component.js +2 -2
- package/dist/esm/components/header/index.css +19 -17
- package/dist/esm/components/swipeable-backdrop/Component.js +1 -1
- package/dist/esm/index.css +16 -16
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/{tslib.es6-702aaccc.d.ts → tslib.es6-5568f64c.d.ts} +0 -0
- package/dist/esm/{tslib.es6-702aaccc.js → tslib.es6-5568f64c.js} +0 -0
- package/dist/index.css +16 -16
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/modern/{component-17606fb9.d.ts → component-0e021541.d.ts} +13 -1
- package/dist/modern/{component-17606fb9.js → component-0e021541.js} +31 -27
- package/dist/modern/component.js +1 -1
- package/dist/modern/components/backer/Component.js +1 -1
- package/dist/modern/components/backer/index.css +3 -3
- package/dist/modern/components/closer/Component.js +1 -1
- package/dist/modern/components/closer/index.css +3 -3
- package/dist/modern/components/footer/Component.js +1 -1
- package/dist/modern/components/footer/index.css +4 -4
- package/dist/modern/components/header/Component.js +1 -1
- package/dist/modern/components/header/index.css +19 -17
- package/dist/modern/index.css +16 -16
- package/dist/modern/index.d.ts +1 -1
- package/dist/modern/index.js +1 -1
- package/dist/{tslib.es6-cbd7f1a3.d.ts → tslib.es6-071a0cac.d.ts} +0 -0
- package/dist/{tslib.es6-cbd7f1a3.js → tslib.es6-071a0cac.js} +0 -0
- package/package.json +3 -3
package/dist/cssm/component.js
CHANGED
|
@@ -17,7 +17,7 @@ require('@alfalab/icons-glyph/ArrowBackMIcon');
|
|
|
17
17
|
require('./components/backer/index.module.css');
|
|
18
18
|
require('./components/backer/Component.js');
|
|
19
19
|
require('./components/header/index.module.css');
|
|
20
|
-
var components_header_Component = require('./component-
|
|
20
|
+
var components_header_Component = require('./component-1a32e10b.js');
|
|
21
21
|
require('./components/footer/index.module.css');
|
|
22
22
|
require('./components/footer/Component.js');
|
|
23
23
|
require('@alfalab/core-components-backdrop/dist/cssm');
|
|
@@ -17,7 +17,7 @@ require('@alfalab/icons-glyph/ArrowBackMIcon');
|
|
|
17
17
|
require('../backer/index.module.css');
|
|
18
18
|
require('../backer/Component.js');
|
|
19
19
|
require('./index.module.css');
|
|
20
|
-
var components_header_Component = require('../../component-
|
|
20
|
+
var components_header_Component = require('../../component-1a32e10b.js');
|
|
21
21
|
require('../footer/index.module.css');
|
|
22
22
|
require('../footer/Component.js');
|
|
23
23
|
require('@alfalab/core-components-backdrop/dist/cssm');
|
|
@@ -29,8 +29,7 @@
|
|
|
29
29
|
--bottom-sheet-title-font-family: var(--font-family-system);
|
|
30
30
|
--bottom-sheet-title-margin-vertical: var(--gap-2xs);
|
|
31
31
|
}
|
|
32
|
-
.
|
|
33
|
-
display: flex;
|
|
32
|
+
.headerWrapper {
|
|
34
33
|
padding: var(--gap-xs);
|
|
35
34
|
padding-bottom: 0;
|
|
36
35
|
background-color: var(--color-light-bg-primary);
|
|
@@ -38,6 +37,9 @@
|
|
|
38
37
|
border-top-left-radius: var(--border-radius-xl);
|
|
39
38
|
z-index: 1;
|
|
40
39
|
}
|
|
40
|
+
.header {
|
|
41
|
+
display: flex;
|
|
42
|
+
}
|
|
41
43
|
.sticky {
|
|
42
44
|
position: sticky;
|
|
43
45
|
top: 0;
|
package/dist/cssm/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./component-
|
|
1
|
+
export * from "./component-1a32e10b";
|
package/dist/cssm/index.js
CHANGED
|
@@ -17,7 +17,7 @@ require('@alfalab/icons-glyph/ArrowBackMIcon');
|
|
|
17
17
|
require('./components/backer/index.module.css');
|
|
18
18
|
require('./components/backer/Component.js');
|
|
19
19
|
require('./components/header/index.module.css');
|
|
20
|
-
var components_header_Component = require('./component-
|
|
20
|
+
var components_header_Component = require('./component-1a32e10b.js');
|
|
21
21
|
require('./components/footer/index.module.css');
|
|
22
22
|
require('./components/footer/Component.js');
|
|
23
23
|
require('@alfalab/core-components-backdrop/dist/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 } from "react";
|
|
4
|
+
import { FC, ReactNode, HTMLAttributes } from "react";
|
|
5
5
|
import { BottomSheetTitleAlign } from "./index";
|
|
6
6
|
import { TransitionProps } from 'react-transition-group/Transition';
|
|
7
7
|
type HeaderProps = {
|
|
@@ -33,6 +33,10 @@ type HeaderProps = {
|
|
|
33
33
|
* Слот справа
|
|
34
34
|
*/
|
|
35
35
|
rightAddons?: ReactNode;
|
|
36
|
+
/**
|
|
37
|
+
* Слот снизу
|
|
38
|
+
*/
|
|
39
|
+
bottomAddons?: ReactNode;
|
|
36
40
|
/**
|
|
37
41
|
* Наличие компонента крестика
|
|
38
42
|
*/
|
|
@@ -85,6 +89,10 @@ type BottomSheetProps = {
|
|
|
85
89
|
* Дополнительный класс
|
|
86
90
|
*/
|
|
87
91
|
contentClassName?: string;
|
|
92
|
+
/**
|
|
93
|
+
* Дополнительные пропсы на контейнер.
|
|
94
|
+
*/
|
|
95
|
+
containerProps?: HTMLAttributes<HTMLDivElement>;
|
|
88
96
|
/**
|
|
89
97
|
* Дополнительный класс
|
|
90
98
|
*/
|
|
@@ -134,6 +142,10 @@ type BottomSheetProps = {
|
|
|
134
142
|
* Слот справа
|
|
135
143
|
*/
|
|
136
144
|
rightAddons?: ReactNode;
|
|
145
|
+
/**
|
|
146
|
+
* Слот снизу
|
|
147
|
+
*/
|
|
148
|
+
bottomAddons?: ReactNode;
|
|
137
149
|
/**
|
|
138
150
|
* Наличие компонента крестика
|
|
139
151
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __assign } from './tslib.es6-
|
|
1
|
+
import { _ as __assign } from './tslib.es6-5568f64c.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';
|
|
@@ -10,13 +10,13 @@ import { Backer } from './components/backer/Component.js';
|
|
|
10
10
|
import { Footer } from './components/footer/Component.js';
|
|
11
11
|
import { SwipeableBackdrop } from './components/swipeable-backdrop/Component.js';
|
|
12
12
|
|
|
13
|
-
var styles = {"header":"bottom-
|
|
13
|
+
var styles = {"headerWrapper":"bottom-sheet__headerWrapper_ghjc3","header":"bottom-sheet__header_ghjc3","sticky":"bottom-sheet__sticky_ghjc3","highlighted":"bottom-sheet__highlighted_ghjc3","justifyEnd":"bottom-sheet__justifyEnd_ghjc3","addon":"bottom-sheet__addon_ghjc3","addonFixed":"bottom-sheet__addonFixed_ghjc3","addonLeft":"bottom-sheet__addonLeft_ghjc3","addonRight":"bottom-sheet__addonRight_ghjc3","title":"bottom-sheet__title_ghjc3","titleCenter":"bottom-sheet__titleCenter_ghjc3","titleLeft":"bottom-sheet__titleLeft_ghjc3","trimTitle":"bottom-sheet__trimTitle_ghjc3","titleBigIndentHorizontal":"bottom-sheet__titleBigIndentHorizontal_ghjc3","titleIndentRight":"bottom-sheet__titleIndentRight_ghjc3","titleIndentLeft":"bottom-sheet__titleIndentLeft_ghjc3"};
|
|
14
14
|
require('./components/header/index.css')
|
|
15
15
|
|
|
16
16
|
var Header = function (_a) {
|
|
17
|
-
var _b, _c, _d, _e;
|
|
18
|
-
var title = _a.title, headerClassName = _a.headerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, titleAlign = _a.titleAlign, trimTitle = _a.trimTitle, sticky = _a.sticky, onBack = _a.onBack;
|
|
19
|
-
var
|
|
17
|
+
var _b, _c, _d, _e, _f;
|
|
18
|
+
var title = _a.title, headerClassName = _a.headerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, bottomAddons = _a.bottomAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, titleAlign = _a.titleAlign, trimTitle = _a.trimTitle, sticky = _a.sticky, onBack = _a.onBack;
|
|
19
|
+
var _g = useContext(BaseModalContext), headerHighlighted = _g.headerHighlighted, setHasHeader = _g.setHasHeader, setHeaderOffset = _g.setHeaderOffset;
|
|
20
20
|
var hasLeftPart = hasBacker || leftAddons || titleAlign === 'center';
|
|
21
21
|
var hasRightPart = hasCloser || rightAddons || titleAlign === 'center';
|
|
22
22
|
var hasHeaderContent = title || hasBacker || hasCloser;
|
|
@@ -37,27 +37,30 @@ var Header = function (_a) {
|
|
|
37
37
|
_a[styles.titleIndentRight] = !sticky && !titleAlignedCenter && hasRightPart,
|
|
38
38
|
_a));
|
|
39
39
|
};
|
|
40
|
-
return (React.createElement("div", { className: cn(styles.
|
|
41
|
-
_b[styles.justifyEnd] = !title,
|
|
40
|
+
return (React.createElement("div", { className: cn(styles.headerWrapper, headerClassName, (_b = {},
|
|
42
41
|
_b[styles.highlighted] = headerHighlighted && sticky,
|
|
43
42
|
_b[styles.sticky] = sticky,
|
|
44
43
|
_b)) },
|
|
45
|
-
|
|
46
|
-
_c[styles.
|
|
47
|
-
_c
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
44
|
+
React.createElement("div", { className: cn(styles.header, headerClassName, (_c = {},
|
|
45
|
+
_c[styles.justifyEnd] = !title,
|
|
46
|
+
_c)) },
|
|
47
|
+
hasLeftPart && (React.createElement("div", { className: cn(styles.addon, addonClassName, (_d = {},
|
|
48
|
+
_d[styles.addonFixed] = !sticky,
|
|
49
|
+
_d[styles.addonLeft] = !sticky,
|
|
50
|
+
_d)) }, hasBacker ? (React.createElement(Backer, { className: backerClassName, onClick: onBack })) : (leftAddons))),
|
|
51
|
+
hasHeaderContent && (React.createElement(Typography.Text, { view: 'primary-large', weight: 'bold', className: cn(styles.title, getTitleIndent(), (_e = {},
|
|
52
|
+
_e[styles.titleCenter] = titleAlign === 'center',
|
|
53
|
+
_e[styles.titleLeft] = titleAlign === 'left',
|
|
54
|
+
_e[styles.trimTitle] = trimTitle,
|
|
55
|
+
_e)), color: 'primary' }, title)),
|
|
56
|
+
hasRightPart && (React.createElement("div", { className: cn(styles.addon, addonClassName, (_f = {},
|
|
57
|
+
_f[styles.addonFixed] = !sticky,
|
|
58
|
+
_f[styles.addonRight] = !sticky,
|
|
59
|
+
_f)) }, hasCloser ? React.createElement(Closer, { className: closerClassName }) : rightAddons))),
|
|
60
|
+
bottomAddons));
|
|
58
61
|
};
|
|
59
62
|
|
|
60
|
-
var styles$1 = {"modal":"bottom-
|
|
63
|
+
var styles$1 = {"modal":"bottom-sheet__modal_x2u51","component":"bottom-sheet__component_x2u51","withTransition":"bottom-sheet__withTransition_x2u51","withZeroTransition":"bottom-sheet__withZeroTransition_x2u51","scrollableContainer":"bottom-sheet__scrollableContainer_x2u51","marker":"bottom-sheet__marker_x2u51","content":"bottom-sheet__content_x2u51","noHeader":"bottom-sheet__noHeader_x2u51","noFooter":"bottom-sheet__noFooter_x2u51","scrollLocked":"bottom-sheet__scrollLocked_x2u51","appear":"bottom-sheet__appear_x2u51","enter":"bottom-sheet__enter_x2u51","appearActive":"bottom-sheet__appearActive_x2u51","enterActive":"bottom-sheet__enterActive_x2u51","enterDone":"bottom-sheet__enterDone_x2u51","appearDone":"bottom-sheet__appearDone_x2u51","exit":"bottom-sheet__exit_x2u51","exitActive":"bottom-sheet__exitActive_x2u51"};
|
|
61
64
|
require('./index.css')
|
|
62
65
|
|
|
63
66
|
var TIMEOUT = 300;
|
|
@@ -70,7 +73,7 @@ var HEADER_OFFSET = 24;
|
|
|
70
73
|
var CLOSE_OFFSET = 0.2;
|
|
71
74
|
var BottomSheet = forwardRef(function (_a, ref) {
|
|
72
75
|
var _b, _c, _d;
|
|
73
|
-
var open = _a.open, title = _a.title, actionButton = _a.actionButton, contentClassName = _a.contentClassName, containerClassName = _a.containerClassName, headerClassName = _a.headerClassName, footerClassName = _a.footerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, className = _a.className, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, 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, 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, _k = _a.ignoreScreenChange, ignoreScreenChange = _k === void 0 ? false : _k, onClose = _a.onClose, onBack = _a.onBack;
|
|
76
|
+
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, 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, 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, _k = _a.ignoreScreenChange, ignoreScreenChange = _k === void 0 ? false : _k, onClose = _a.onClose, onBack = _a.onBack;
|
|
74
77
|
var _l = useState(0), sheetOffset = _l[0], setSheetOffset = _l[1];
|
|
75
78
|
var _m = useState(1), backdropOpacity = _m[0], setBackdropOpacity = _m[1];
|
|
76
79
|
var _o = useState(false), scrollLocked = _o[0], setScrollLocked = _o[1];
|
|
@@ -90,6 +93,7 @@ var BottomSheet = forwardRef(function (_a, ref) {
|
|
|
90
93
|
backerClassName: backerClassName,
|
|
91
94
|
leftAddons: leftAddons,
|
|
92
95
|
rightAddons: rightAddons,
|
|
96
|
+
bottomAddons: bottomAddons,
|
|
93
97
|
hasCloser: hasCloser,
|
|
94
98
|
hasBacker: hasBacker,
|
|
95
99
|
titleAlign: titleAlign,
|
|
@@ -158,12 +162,6 @@ var BottomSheet = forwardRef(function (_a, ref) {
|
|
|
158
162
|
};
|
|
159
163
|
var handleSheetSwiping = function (_a) {
|
|
160
164
|
var deltaY = _a.deltaY, initial = _a.initial;
|
|
161
|
-
/**
|
|
162
|
-
* Вернуть плавную анимацию шторке при свайпе
|
|
163
|
-
*/
|
|
164
|
-
if (transitionClassName === styles$1.withZeroTransition) {
|
|
165
|
-
setTransitionClassName(styles$1.withTransition);
|
|
166
|
-
}
|
|
167
165
|
var offsetY = initial[1];
|
|
168
166
|
if (shouldSkipSwiping(offsetY)) {
|
|
169
167
|
return;
|
|
@@ -177,6 +175,12 @@ var BottomSheet = forwardRef(function (_a, ref) {
|
|
|
177
175
|
*/
|
|
178
176
|
if (offset > 0) {
|
|
179
177
|
setScrollLocked(true);
|
|
178
|
+
/**
|
|
179
|
+
* Вернуть плавную анимацию шторке при свайпе
|
|
180
|
+
*/
|
|
181
|
+
if (transitionClassName === styles$1.withZeroTransition) {
|
|
182
|
+
setTransitionClassName(styles$1.withTransition);
|
|
183
|
+
}
|
|
180
184
|
}
|
|
181
185
|
};
|
|
182
186
|
var backdropSwipeablehandlers = useSwipeable({
|
|
@@ -230,9 +234,9 @@ var BottomSheet = forwardRef(function (_a, ref) {
|
|
|
230
234
|
React.createElement("div", __assign({ className: cn(styles$1.component, className, (_b = {},
|
|
231
235
|
_b[transitionClassName] = !sheetOffset,
|
|
232
236
|
_b)), style: __assign(__assign({}, getSwipeStyles()), getHeightStyles()) }, sheetSwipeablehandlers),
|
|
233
|
-
React.createElement("div", { className: cn(styles$1.scrollableContainer, containerClassName, (_c = {},
|
|
237
|
+
React.createElement("div", __assign({}, containerProps, { className: cn(styles$1.scrollableContainer, containerProps === null || containerProps === void 0 ? void 0 : containerProps.className, containerClassName, (_c = {},
|
|
234
238
|
_c[styles$1.scrollLocked] = scrollLocked,
|
|
235
|
-
_c)), ref: scrollableContainer },
|
|
239
|
+
_c)), ref: scrollableContainer }),
|
|
236
240
|
swipeable && React.createElement("div", { className: cn(styles$1.marker) }),
|
|
237
241
|
!hideHeader && !emptyHeader && React.createElement(Header, __assign({}, headerProps)),
|
|
238
242
|
React.createElement("div", { className: cn(styles$1.content, contentClassName, (_d = {},
|
package/dist/esm/component.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './tslib.es6-
|
|
1
|
+
import './tslib.es6-5568f64c.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-3c2b5fd7.js';
|
|
14
14
|
import './components/footer/Component.js';
|
|
15
15
|
import '@alfalab/core-components-backdrop/dist/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-5568f64c.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
import { IconButton } from '@alfalab/core-components-icon-button/dist/esm';
|
|
5
5
|
import { ArrowBackMIcon } from '@alfalab/icons-glyph/ArrowBackMIcon';
|
|
6
6
|
|
|
7
|
-
var styles = {"backer":"bottom-
|
|
7
|
+
var styles = {"backer":"bottom-sheet__backer_17yfr","button":"bottom-sheet__button_17yfr"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
var Backer = function (_a) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: v6wpa */
|
|
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_17yfr {
|
|
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_17yfr {
|
|
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-5568f64c.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/dist/esm';
|
|
5
5
|
import { IconButton } from '@alfalab/core-components-icon-button/dist/esm';
|
|
6
6
|
import { CrossMIcon } from '@alfalab/icons-glyph/CrossMIcon';
|
|
7
7
|
|
|
8
|
-
var styles = {"closer":"bottom-
|
|
8
|
+
var styles = {"closer":"bottom-sheet__closer_yne74","button":"bottom-sheet__button_yne74"};
|
|
9
9
|
require('./index.css')
|
|
10
10
|
|
|
11
11
|
var Closer = function (_a) {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1g6km */
|
|
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_yne74 {
|
|
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_yne74 {
|
|
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/dist/esm';
|
|
4
4
|
|
|
5
|
-
var styles = {"footer":"bottom-
|
|
5
|
+
var styles = {"footer":"bottom-sheet__footer_1poao","sticky":"bottom-sheet__sticky_1poao","highlighted":"bottom-sheet__highlighted_1poao"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
var Footer = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1w1xm */
|
|
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_1poao {
|
|
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_1poao {
|
|
26
26
|
position: sticky;
|
|
27
27
|
bottom: 0;
|
|
28
28
|
}
|
|
29
|
-
.bottom-
|
|
29
|
+
.bottom-sheet__highlighted_1poao {
|
|
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-5568f64c.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-3c2b5fd7.js';
|
|
14
14
|
import '../footer/Component.js';
|
|
15
15
|
import '@alfalab/core-components-backdrop/dist/esm';
|
|
16
16
|
import '../swipeable-backdrop/Component.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: d9ojq */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
}
|
|
@@ -30,8 +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-
|
|
34
|
-
display: flex;
|
|
33
|
+
.bottom-sheet__headerWrapper_ghjc3 {
|
|
35
34
|
padding: var(--gap-xs);
|
|
36
35
|
padding-bottom: 0;
|
|
37
36
|
background-color: var(--color-light-bg-primary);
|
|
@@ -39,35 +38,38 @@
|
|
|
39
38
|
border-top-left-radius: var(--border-radius-xl);
|
|
40
39
|
z-index: 1;
|
|
41
40
|
}
|
|
42
|
-
.bottom-
|
|
41
|
+
.bottom-sheet__header_ghjc3 {
|
|
42
|
+
display: flex;
|
|
43
|
+
}
|
|
44
|
+
.bottom-sheet__sticky_ghjc3 {
|
|
43
45
|
position: sticky;
|
|
44
46
|
top: 0;
|
|
45
47
|
}
|
|
46
|
-
.bottom-
|
|
48
|
+
.bottom-sheet__highlighted_ghjc3 {
|
|
47
49
|
border-bottom: var(--bottom-sheet-header-border-bottom);
|
|
48
50
|
}
|
|
49
|
-
.bottom-
|
|
51
|
+
.bottom-sheet__justifyEnd_ghjc3 {
|
|
50
52
|
justify-content: flex-end;
|
|
51
53
|
}
|
|
52
|
-
.bottom-
|
|
54
|
+
.bottom-sheet__addon_ghjc3 {
|
|
53
55
|
display: flex;
|
|
54
56
|
justify-content: center;
|
|
55
57
|
align-items: center;
|
|
56
58
|
min-width: 48px;
|
|
57
59
|
height: 48px;
|
|
58
60
|
}
|
|
59
|
-
.bottom-
|
|
61
|
+
.bottom-sheet__addonFixed_ghjc3 {
|
|
60
62
|
position: fixed;
|
|
61
63
|
}
|
|
62
|
-
.bottom-
|
|
64
|
+
.bottom-sheet__addonLeft_ghjc3 {
|
|
63
65
|
left: 0;
|
|
64
66
|
margin-left: var(--gap-xs);
|
|
65
67
|
}
|
|
66
|
-
.bottom-
|
|
68
|
+
.bottom-sheet__addonRight_ghjc3 {
|
|
67
69
|
right: 0;
|
|
68
70
|
margin-right: var(--gap-xs);
|
|
69
71
|
}
|
|
70
|
-
.bottom-
|
|
72
|
+
.bottom-sheet__title_ghjc3 {
|
|
71
73
|
padding: var(--gap-xs) var(--gap-xs);
|
|
72
74
|
margin: var(--bottom-sheet-title-margin-vertical) 0;
|
|
73
75
|
width: 100%;
|
|
@@ -76,23 +78,23 @@
|
|
|
76
78
|
line-height: var(--bottom-sheet-title-line-height);
|
|
77
79
|
font-family: var(--bottom-sheet-title-font-family);
|
|
78
80
|
}
|
|
79
|
-
.bottom-
|
|
81
|
+
.bottom-sheet__titleCenter_ghjc3 {
|
|
80
82
|
text-align: center;
|
|
81
83
|
}
|
|
82
|
-
.bottom-
|
|
84
|
+
.bottom-sheet__titleLeft_ghjc3 {
|
|
83
85
|
text-align: left;
|
|
84
86
|
}
|
|
85
|
-
.bottom-
|
|
87
|
+
.bottom-sheet__trimTitle_ghjc3 {
|
|
86
88
|
white-space: nowrap;
|
|
87
89
|
overflow: hidden;
|
|
88
90
|
text-overflow: ellipsis;
|
|
89
91
|
}
|
|
90
|
-
.bottom-
|
|
92
|
+
.bottom-sheet__titleBigIndentHorizontal_ghjc3 {
|
|
91
93
|
margin: var(--bottom-sheet-title-margin-vertical) var(--gap-4xl);
|
|
92
94
|
}
|
|
93
|
-
.bottom-
|
|
95
|
+
.bottom-sheet__titleIndentRight_ghjc3 {
|
|
94
96
|
margin-right: var(--gap-4xl);
|
|
95
97
|
}
|
|
96
|
-
.bottom-
|
|
98
|
+
.bottom-sheet__titleIndentLeft_ghjc3 {
|
|
97
99
|
margin-left: var(--gap-4xl);
|
|
98
100
|
}
|
package/dist/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: lu1p5 */
|
|
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_x2u51 {
|
|
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_x2u51 {
|
|
35
35
|
overflow: hidden;
|
|
36
36
|
position: relative;
|
|
37
37
|
display: flex;
|
|
@@ -41,20 +41,20 @@
|
|
|
41
41
|
background: var(--color-light-bg-primary);
|
|
42
42
|
transform: translateY(100%);
|
|
43
43
|
}
|
|
44
|
-
.bottom-
|
|
44
|
+
.bottom-sheet__withTransition_x2u51 {
|
|
45
45
|
transition: var(--bottom-sheet-out-transition);
|
|
46
46
|
}
|
|
47
|
-
.bottom-
|
|
47
|
+
.bottom-sheet__withZeroTransition_x2u51 {
|
|
48
48
|
transition: 0s linear;
|
|
49
49
|
}
|
|
50
|
-
.bottom-
|
|
50
|
+
.bottom-sheet__scrollableContainer_x2u51 {
|
|
51
51
|
overflow: auto;
|
|
52
52
|
display: flex;
|
|
53
53
|
flex-direction: column;
|
|
54
54
|
position: relative;
|
|
55
55
|
height: 100%;
|
|
56
56
|
}
|
|
57
|
-
.bottom-
|
|
57
|
+
.bottom-sheet__marker_x2u51 {
|
|
58
58
|
position: fixed;
|
|
59
59
|
top: var(--gap-2xs);
|
|
60
60
|
left: 50%;
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
background-color: var(--color-light-graphic-quaternary);
|
|
66
66
|
z-index: 1000;
|
|
67
67
|
}
|
|
68
|
-
.bottom-
|
|
68
|
+
.bottom-sheet__content_x2u51 {
|
|
69
69
|
display: flex;
|
|
70
70
|
flex-direction: column;
|
|
71
71
|
flex: 1;
|
|
@@ -73,29 +73,29 @@
|
|
|
73
73
|
color: var(--color-light-text-primary);
|
|
74
74
|
background-color: var(--color-light-bg-primary);
|
|
75
75
|
}
|
|
76
|
-
.bottom-
|
|
76
|
+
.bottom-sheet__noHeader_x2u51 {
|
|
77
77
|
padding-top: var(--gap-xl);
|
|
78
78
|
}
|
|
79
|
-
.bottom-
|
|
79
|
+
.bottom-sheet__noFooter_x2u51 {
|
|
80
80
|
padding-bottom: var(--gap-m);
|
|
81
81
|
}
|
|
82
|
-
.bottom-
|
|
82
|
+
.bottom-sheet__scrollLocked_x2u51 {
|
|
83
83
|
overflow: hidden;
|
|
84
84
|
}
|
|
85
|
-
.bottom-
|
|
85
|
+
.bottom-sheet__appear_x2u51 .bottom-sheet__component_x2u51, .bottom-sheet__enter_x2u51 .bottom-sheet__component_x2u51 {
|
|
86
86
|
transition: none;
|
|
87
87
|
}
|
|
88
|
-
.bottom-
|
|
88
|
+
.bottom-sheet__appearActive_x2u51 .bottom-sheet__component_x2u51, .bottom-sheet__enterActive_x2u51 .bottom-sheet__component_x2u51 {
|
|
89
89
|
transition: var(--bottom-sheet-in-transition);
|
|
90
90
|
transform: translateY(0);
|
|
91
91
|
}
|
|
92
|
-
.bottom-
|
|
92
|
+
.bottom-sheet__enterDone_x2u51 .bottom-sheet__component_x2u51, .bottom-sheet__appearDone_x2u51 .bottom-sheet__component_x2u51 {
|
|
93
93
|
transform: translateY(0);
|
|
94
94
|
}
|
|
95
|
-
.bottom-
|
|
95
|
+
.bottom-sheet__exit_x2u51 .bottom-sheet__component_x2u51 {
|
|
96
96
|
transform: translateY(0);
|
|
97
97
|
}
|
|
98
|
-
.bottom-
|
|
98
|
+
.bottom-sheet__exitActive_x2u51 .bottom-sheet__component_x2u51 {
|
|
99
99
|
transition: var(--bottom-sheet-out-transition);
|
|
100
100
|
transform: translateY(100%);
|
|
101
101
|
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./component-
|
|
1
|
+
export * from "./component-3c2b5fd7";
|
package/dist/esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './tslib.es6-
|
|
1
|
+
import './tslib.es6-5568f64c.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-3c2b5fd7.js';
|
|
14
14
|
import './components/footer/Component.js';
|
|
15
15
|
import '@alfalab/core-components-backdrop/dist/esm';
|
|
16
16
|
import './components/swipeable-backdrop/Component.js';
|
|
File without changes
|
|
File without changes
|