@alfalab/core-components-bottom-sheet 5.1.16 → 5.2.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-11af3f33.d.ts → component-f85861da.d.ts} +6 -0
- package/{component-11af3f33.js → component-f85861da.js} +5 -5
- package/component.js +2 -2
- package/components/backer/Component.js +2 -2
- package/components/backer/index.css +12 -9
- package/components/closer/Component.js +2 -2
- package/components/closer/index.css +12 -9
- package/components/footer/Component.js +1 -1
- package/components/footer/index.css +13 -13
- package/components/header/Component.js +2 -2
- package/components/header/index.css +27 -44
- package/components/swipeable-backdrop/Component.js +1 -1
- package/{esm/component-cbc6d0d3.d.ts → cssm/component-082df5fd.d.ts} +6 -0
- package/cssm/{component-5384d179.js → component-082df5fd.js} +2 -2
- package/cssm/component.js +1 -1
- package/cssm/components/backer/index.module.css +11 -8
- package/cssm/components/closer/index.module.css +11 -8
- package/cssm/components/footer/index.module.css +12 -12
- package/cssm/components/header/Component.js +1 -1
- package/cssm/components/header/index.module.css +26 -43
- package/cssm/index.d.ts +1 -1
- package/cssm/index.js +1 -1
- package/cssm/index.module.css +25 -38
- package/{cssm/component-5384d179.d.ts → esm/component-62847823.d.ts} +6 -0
- package/esm/{component-cbc6d0d3.js → component-62847823.js} +5 -5
- package/esm/component.js +2 -2
- package/esm/components/backer/Component.js +2 -2
- package/esm/components/backer/index.css +12 -9
- package/esm/components/closer/Component.js +2 -2
- package/esm/components/closer/index.css +12 -9
- package/esm/components/footer/Component.js +1 -1
- package/esm/components/footer/index.css +13 -13
- package/esm/components/header/Component.js +2 -2
- package/esm/components/header/index.css +27 -44
- package/esm/components/swipeable-backdrop/Component.js +1 -1
- package/esm/index.css +26 -39
- package/esm/index.d.ts +1 -1
- package/esm/index.js +2 -2
- package/esm/{tslib.es6-f81724a5.d.ts → tslib.es6-54cc9a3d.d.ts} +0 -0
- package/esm/{tslib.es6-f81724a5.js → tslib.es6-54cc9a3d.js} +0 -0
- package/index.css +26 -39
- package/index.d.ts +1 -1
- package/index.js +2 -2
- package/modern/{component-412962f0.d.ts → component-d0103215.d.ts} +6 -0
- package/modern/{component-412962f0.js → component-d0103215.js} +4 -4
- package/modern/component.js +1 -1
- package/modern/components/backer/Component.js +1 -1
- package/modern/components/backer/index.css +12 -9
- package/modern/components/closer/Component.js +1 -1
- package/modern/components/closer/index.css +12 -9
- package/modern/components/footer/Component.js +1 -1
- package/modern/components/footer/index.css +13 -13
- package/modern/components/header/Component.js +1 -1
- package/modern/components/header/index.css +27 -44
- package/modern/index.css +26 -39
- package/modern/index.d.ts +1 -1
- package/modern/index.js +1 -1
- package/package.json +4 -4
- /package/{tslib.es6-0683282e.d.ts → tslib.es6-63fb5369.d.ts} +0 -0
- /package/{tslib.es6-0683282e.js → tslib.es6-63fb5369.js} +0 -0
|
@@ -1,74 +1,63 @@
|
|
|
1
1
|
:root {
|
|
2
|
+
} /* deprecated */ :root {
|
|
2
3
|
--color-light-bg-primary: #fff;
|
|
3
|
-
}
|
|
4
|
-
:root {
|
|
4
|
+
} :root {
|
|
5
|
+
} :root {
|
|
6
|
+
} :root {
|
|
5
7
|
|
|
6
8
|
/* Hard */
|
|
7
9
|
|
|
8
10
|
/* Up */
|
|
9
11
|
|
|
10
12
|
/* Hard up */
|
|
11
|
-
}
|
|
12
|
-
:
|
|
13
|
+
} :root {
|
|
14
|
+
--border-radius-xl: 16px;
|
|
15
|
+
} :root {
|
|
13
16
|
--gap-2xs: 4px;
|
|
14
17
|
--gap-xs: 8px;
|
|
15
18
|
--gap-4xl: 48px;
|
|
16
|
-
}
|
|
17
|
-
:root {
|
|
19
|
+
} :root {
|
|
18
20
|
--font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
|
|
19
21
|
sans-serif;
|
|
20
|
-
}
|
|
21
|
-
:root {
|
|
22
|
-
--border-radius-xl: 16px;
|
|
23
|
-
}
|
|
24
|
-
:root {
|
|
22
|
+
} :root {
|
|
23
|
+
} :root {
|
|
25
24
|
--bottom-sheet-header-border-bottom: none;
|
|
26
25
|
--bottom-sheet-title-font-size: 18px;
|
|
27
26
|
--bottom-sheet-title-font-weight: 700;
|
|
28
27
|
--bottom-sheet-title-line-height: 24px;
|
|
29
28
|
--bottom-sheet-title-font-family: var(--font-family-system);
|
|
30
29
|
--bottom-sheet-title-margin-vertical: var(--gap-2xs);
|
|
31
|
-
}
|
|
32
|
-
.headerWrapper {
|
|
30
|
+
} .headerWrapper {
|
|
33
31
|
padding: var(--gap-xs);
|
|
34
32
|
padding-bottom: 0;
|
|
35
33
|
background-color: var(--color-light-bg-primary);
|
|
36
34
|
border-top-right-radius: var(--border-radius-xl);
|
|
37
35
|
border-top-left-radius: var(--border-radius-xl);
|
|
38
36
|
z-index: 1;
|
|
39
|
-
}
|
|
40
|
-
.header {
|
|
37
|
+
} .header {
|
|
41
38
|
display: flex;
|
|
42
|
-
}
|
|
43
|
-
.sticky {
|
|
39
|
+
} .sticky {
|
|
44
40
|
position: sticky;
|
|
45
41
|
top: 0;
|
|
46
|
-
}
|
|
47
|
-
.highlighted {
|
|
42
|
+
} .highlighted {
|
|
48
43
|
border-bottom: var(--bottom-sheet-header-border-bottom);
|
|
49
|
-
}
|
|
50
|
-
.justifyEnd {
|
|
44
|
+
} .justifyEnd {
|
|
51
45
|
justify-content: flex-end;
|
|
52
|
-
}
|
|
53
|
-
.addon {
|
|
46
|
+
} .addon {
|
|
54
47
|
display: flex;
|
|
55
48
|
justify-content: center;
|
|
56
49
|
align-items: center;
|
|
57
50
|
min-width: 48px;
|
|
58
51
|
height: 48px;
|
|
59
|
-
}
|
|
60
|
-
.addonFixed {
|
|
52
|
+
} .addonFixed {
|
|
61
53
|
position: fixed;
|
|
62
|
-
}
|
|
63
|
-
.addonLeft {
|
|
54
|
+
} .addonLeft {
|
|
64
55
|
left: 0;
|
|
65
56
|
margin-left: var(--gap-xs);
|
|
66
|
-
}
|
|
67
|
-
.addonRight {
|
|
57
|
+
} .addonRight {
|
|
68
58
|
right: 0;
|
|
69
59
|
margin-right: var(--gap-xs);
|
|
70
|
-
}
|
|
71
|
-
.title {
|
|
60
|
+
} .title {
|
|
72
61
|
padding: var(--gap-xs) var(--gap-xs);
|
|
73
62
|
margin: var(--bottom-sheet-title-margin-vertical) 0;
|
|
74
63
|
width: 100%;
|
|
@@ -76,24 +65,18 @@
|
|
|
76
65
|
font-weight: var(--bottom-sheet-title-font-weight);
|
|
77
66
|
line-height: var(--bottom-sheet-title-line-height);
|
|
78
67
|
font-family: var(--bottom-sheet-title-font-family);
|
|
79
|
-
}
|
|
80
|
-
.titleCenter {
|
|
68
|
+
} .titleCenter {
|
|
81
69
|
text-align: center;
|
|
82
|
-
}
|
|
83
|
-
.titleLeft {
|
|
70
|
+
} .titleLeft {
|
|
84
71
|
text-align: left;
|
|
85
|
-
}
|
|
86
|
-
.trimTitle {
|
|
72
|
+
} .trimTitle {
|
|
87
73
|
white-space: nowrap;
|
|
88
74
|
overflow: hidden;
|
|
89
75
|
text-overflow: ellipsis;
|
|
90
|
-
}
|
|
91
|
-
.titleBigIndentHorizontal {
|
|
76
|
+
} .titleBigIndentHorizontal {
|
|
92
77
|
margin: var(--bottom-sheet-title-margin-vertical) var(--gap-4xl);
|
|
93
|
-
}
|
|
94
|
-
.titleIndentRight {
|
|
78
|
+
} .titleIndentRight {
|
|
95
79
|
margin-right: var(--gap-4xl);
|
|
96
|
-
}
|
|
97
|
-
.titleIndentLeft {
|
|
80
|
+
} .titleIndentLeft {
|
|
98
81
|
margin-left: var(--gap-4xl);
|
|
99
82
|
}
|
package/cssm/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./component-
|
|
1
|
+
export * from "./component-082df5fd";
|
package/cssm/index.js
CHANGED
package/cssm/index.module.css
CHANGED
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
:root {
|
|
2
|
+
} /* deprecated */ :root {
|
|
2
3
|
--color-light-bg-primary: #fff;
|
|
3
4
|
--color-light-graphic-quaternary: #dbdee1;
|
|
4
5
|
--color-light-text-primary: #0b1f35;
|
|
5
|
-
}
|
|
6
|
-
:root {
|
|
6
|
+
} :root {
|
|
7
|
+
} :root {
|
|
8
|
+
} :root {
|
|
7
9
|
|
|
8
10
|
/* Hard */
|
|
9
11
|
|
|
10
12
|
/* Up */
|
|
11
13
|
|
|
12
14
|
/* Hard up */
|
|
13
|
-
}
|
|
14
|
-
:
|
|
15
|
+
} :root {
|
|
16
|
+
--border-radius-xxl: 20px;
|
|
17
|
+
--border-radius-3xl: 24px;
|
|
18
|
+
} :root {
|
|
15
19
|
--gap-2xs: 4px;
|
|
16
20
|
--gap-m: 16px;
|
|
17
21
|
--gap-xl: 24px;
|
|
18
|
-
}
|
|
19
|
-
:root {
|
|
20
|
-
|
|
21
|
-
--border-radius-3xl: 24px;
|
|
22
|
-
}
|
|
23
|
-
:root {
|
|
22
|
+
} :root {
|
|
23
|
+
} :root {
|
|
24
|
+
} :root {
|
|
24
25
|
--bottom-sheet-in-transition: 0.5s cubic-bezier(0.09, 0.91, 0.18, 0.99);
|
|
25
26
|
--bottom-sheet-out-transition: 0.3s ease;
|
|
26
|
-
}
|
|
27
|
-
.modal {
|
|
27
|
+
} .modal {
|
|
28
28
|
background-color: transparent;
|
|
29
29
|
position: fixed;
|
|
30
30
|
bottom: 0;
|
|
31
31
|
width: 100%;
|
|
32
32
|
max-width: 600px;
|
|
33
|
-
}
|
|
34
|
-
.component {
|
|
33
|
+
} .component {
|
|
35
34
|
overflow: hidden;
|
|
36
35
|
position: relative;
|
|
37
36
|
display: flex;
|
|
@@ -40,18 +39,15 @@
|
|
|
40
39
|
border-top-left-radius: var(--border-radius-3xl);
|
|
41
40
|
background: var(--color-light-bg-primary);
|
|
42
41
|
transform: translateY(100%);
|
|
43
|
-
}
|
|
44
|
-
.withTransition {
|
|
42
|
+
} .withTransition {
|
|
45
43
|
transition: var(--bottom-sheet-out-transition);
|
|
46
|
-
}
|
|
47
|
-
.scrollableContainer {
|
|
44
|
+
} .scrollableContainer {
|
|
48
45
|
overflow: auto;
|
|
49
46
|
display: flex;
|
|
50
47
|
flex-direction: column;
|
|
51
48
|
position: relative;
|
|
52
49
|
height: 100%;
|
|
53
|
-
}
|
|
54
|
-
.marker {
|
|
50
|
+
} .marker {
|
|
55
51
|
position: fixed;
|
|
56
52
|
top: var(--gap-2xs);
|
|
57
53
|
left: 50%;
|
|
@@ -61,38 +57,29 @@
|
|
|
61
57
|
transform: translateX(-50%);
|
|
62
58
|
background-color: var(--color-light-graphic-quaternary);
|
|
63
59
|
z-index: 1000;
|
|
64
|
-
}
|
|
65
|
-
.content {
|
|
60
|
+
} .content {
|
|
66
61
|
display: flex;
|
|
67
62
|
flex-direction: column;
|
|
68
63
|
flex: 1;
|
|
69
64
|
padding: 0 var(--gap-m);
|
|
70
65
|
color: var(--color-light-text-primary);
|
|
71
66
|
background-color: var(--color-light-bg-primary);
|
|
72
|
-
}
|
|
73
|
-
.noHeader {
|
|
67
|
+
} .noHeader {
|
|
74
68
|
padding-top: var(--gap-xl);
|
|
75
|
-
}
|
|
76
|
-
.noFooter {
|
|
69
|
+
} .noFooter {
|
|
77
70
|
padding-bottom: var(--gap-m);
|
|
78
|
-
}
|
|
79
|
-
.scrollLocked {
|
|
71
|
+
} .scrollLocked {
|
|
80
72
|
overflow: hidden;
|
|
81
|
-
}
|
|
82
|
-
.appear .component, .enter .component {
|
|
73
|
+
} .appear .component, .enter .component {
|
|
83
74
|
transition: none;
|
|
84
|
-
}
|
|
85
|
-
.appearActive .component, .enterActive .component {
|
|
75
|
+
} .appearActive .component, .enterActive .component {
|
|
86
76
|
transition: var(--bottom-sheet-in-transition);
|
|
87
77
|
transform: translateY(0);
|
|
88
|
-
}
|
|
89
|
-
.enterDone .component, .appearDone .component {
|
|
78
|
+
} .enterDone .component, .appearDone .component {
|
|
90
79
|
transform: translateY(0);
|
|
91
|
-
}
|
|
92
|
-
.exit .component {
|
|
80
|
+
} .exit .component {
|
|
93
81
|
transform: translateY(0);
|
|
94
|
-
}
|
|
95
|
-
.exitActive .component {
|
|
82
|
+
} .exitActive .component {
|
|
96
83
|
transition: var(--bottom-sheet-out-transition);
|
|
97
84
|
transform: translateY(100%);
|
|
98
85
|
}
|
|
@@ -88,6 +88,12 @@ type BottomSheetProps = {
|
|
|
88
88
|
* Кнопка действия (обычно, это кнопка закрытия)
|
|
89
89
|
*/
|
|
90
90
|
actionButton?: ReactNode;
|
|
91
|
+
/**
|
|
92
|
+
* Нода, компонент или функция возвращающая их
|
|
93
|
+
*
|
|
94
|
+
* Контейнер к которому будут добавляться порталы
|
|
95
|
+
*/
|
|
96
|
+
container?: BaseModalProps['container'];
|
|
91
97
|
/**
|
|
92
98
|
* Дополнительный класс
|
|
93
99
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as __assign } from './tslib.es6-
|
|
1
|
+
import { _ as __assign } from './tslib.es6-54cc9a3d.js';
|
|
2
2
|
import React, { useContext, useEffect, forwardRef, useState, useRef, useCallback } from 'react';
|
|
3
3
|
import { use100vh } from 'react-div-100vh';
|
|
4
4
|
import { useSwipeable } from 'react-swipeable';
|
|
@@ -15,7 +15,7 @@ var getDataTestId = function (dataTestId, element) {
|
|
|
15
15
|
return dataTestId ? "".concat(dataTestId).concat(elementPart) : undefined;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
var styles$1 = {"headerWrapper":"bottom-
|
|
18
|
+
var styles$1 = {"headerWrapper":"bottom-sheet__headerWrapper_kcjgq","header":"bottom-sheet__header_kcjgq","sticky":"bottom-sheet__sticky_kcjgq","highlighted":"bottom-sheet__highlighted_kcjgq","justifyEnd":"bottom-sheet__justifyEnd_kcjgq","addon":"bottom-sheet__addon_kcjgq","addonFixed":"bottom-sheet__addonFixed_kcjgq","addonLeft":"bottom-sheet__addonLeft_kcjgq","addonRight":"bottom-sheet__addonRight_kcjgq","title":"bottom-sheet__title_kcjgq","titleCenter":"bottom-sheet__titleCenter_kcjgq","titleLeft":"bottom-sheet__titleLeft_kcjgq","trimTitle":"bottom-sheet__trimTitle_kcjgq","titleBigIndentHorizontal":"bottom-sheet__titleBigIndentHorizontal_kcjgq","titleIndentRight":"bottom-sheet__titleIndentRight_kcjgq","titleIndentLeft":"bottom-sheet__titleIndentLeft_kcjgq"};
|
|
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 = {"modal":"bottom-
|
|
68
|
+
var styles = {"modal":"bottom-sheet__modal_ex71y","component":"bottom-sheet__component_ex71y","withTransition":"bottom-sheet__withTransition_ex71y","scrollableContainer":"bottom-sheet__scrollableContainer_ex71y","marker":"bottom-sheet__marker_ex71y","content":"bottom-sheet__content_ex71y","noHeader":"bottom-sheet__noHeader_ex71y","noFooter":"bottom-sheet__noFooter_ex71y","scrollLocked":"bottom-sheet__scrollLocked_ex71y","appear":"bottom-sheet__appear_ex71y","enter":"bottom-sheet__enter_ex71y","appearActive":"bottom-sheet__appearActive_ex71y","enterActive":"bottom-sheet__enterActive_ex71y","enterDone":"bottom-sheet__enterDone_ex71y","appearDone":"bottom-sheet__appearDone_ex71y","exit":"bottom-sheet__exit_ex71y","exitActive":"bottom-sheet__exitActive_ex71y"};
|
|
69
69
|
require('./index.css')
|
|
70
70
|
|
|
71
71
|
var TIMEOUT = 300;
|
|
@@ -78,7 +78,7 @@ 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, backdropProps = _a.backdropProps, onClose = _a.onClose, onBack = _a.onBack;
|
|
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
82
|
var _k = useState(0), sheetOffset = _k[0], setSheetOffset = _k[1];
|
|
83
83
|
var _l = useState(1), backdropOpacity = _l[0], setBackdropOpacity = _l[1];
|
|
84
84
|
var _m = useState(false), scrollLocked = _m[0], setScrollLocked = _m[1];
|
|
@@ -215,7 +215,7 @@ var BottomSheet = forwardRef(function (_a, ref) {
|
|
|
215
215
|
height: initialHeight === 'full' ? targetHeight : 'unset',
|
|
216
216
|
maxHeight: targetHeight,
|
|
217
217
|
}); };
|
|
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.modal, modalClassName), wrapperClassName: modalWrapperClassName, disableBlockingScroll: disableBlockingScroll, transitionProps: __assign(__assign({ appear: true, timeout: TIMEOUT, classNames: styles }, transitionProps), { onExited: handleExited, onEntered: handleEntered }) },
|
|
218
|
+
return (React.createElement(BaseModal, { open: open, ref: ref, container: container, 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.modal, modalClassName), wrapperClassName: modalWrapperClassName, disableBlockingScroll: disableBlockingScroll, transitionProps: __assign(__assign({ appear: true, timeout: TIMEOUT, classNames: styles }, transitionProps), { onExited: handleExited, onEntered: handleEntered }) },
|
|
219
219
|
React.createElement("div", { style: __assign({}, getHeightStyles()) },
|
|
220
220
|
React.createElement("div", __assign({ className: cn(styles.component, className, (_b = {},
|
|
221
221
|
_b[styles.withTransition] = !sheetOffset,
|
package/esm/component.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import './tslib.es6-
|
|
1
|
+
import './tslib.es6-54cc9a3d.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react-div-100vh';
|
|
4
4
|
import 'react-swipeable';
|
|
5
5
|
import 'classnames';
|
|
6
6
|
import '@alfalab/core-components-base-modal/esm';
|
|
7
|
-
export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-
|
|
7
|
+
export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-62847823.js';
|
|
8
8
|
import './components/footer/Component.js';
|
|
9
9
|
import './components/swipeable-backdrop/Component.js';
|
|
10
10
|
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-54cc9a3d.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_1nbdj","button":"bottom-sheet__button_1nbdj"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
var Backer = function (_a) {
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: eg7zl */
|
|
2
2
|
:root {
|
|
3
|
+
} /* deprecated */ :root {
|
|
3
4
|
--color-light-graphic-primary: #0b1f35;
|
|
4
5
|
--color-light-bg-primary-inverted-alpha-3: rgba(11, 31, 53, 0.03);
|
|
5
|
-
}
|
|
6
|
-
:root {
|
|
6
|
+
} :root {
|
|
7
|
+
} :root {
|
|
8
|
+
} :root {
|
|
7
9
|
|
|
8
10
|
/* Hard */
|
|
9
11
|
|
|
10
12
|
/* Up */
|
|
11
13
|
|
|
12
14
|
/* Hard up */
|
|
13
|
-
}
|
|
14
|
-
:root {
|
|
15
|
+
} :root {
|
|
16
|
+
} :root {
|
|
17
|
+
} :root {
|
|
18
|
+
} :root {
|
|
19
|
+
} :root {
|
|
15
20
|
--bottom-sheet-backer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
|
|
16
|
-
}
|
|
17
|
-
.bottom-sheet__backer_1k990 {
|
|
21
|
+
} .bottom-sheet__backer_1nbdj {
|
|
18
22
|
width: 32px;
|
|
19
23
|
height: 32px;
|
|
20
24
|
display: flex;
|
|
@@ -22,8 +26,7 @@
|
|
|
22
26
|
align-items: center;
|
|
23
27
|
cursor: pointer;
|
|
24
28
|
color: var(--color-light-graphic-primary);
|
|
25
|
-
}
|
|
26
|
-
.bottom-sheet__button_1k990 {
|
|
29
|
+
} .bottom-sheet__button_1nbdj {
|
|
27
30
|
background: var(--bottom-sheet-backer-bg-color);
|
|
28
31
|
-webkit-backdrop-filter: blur(10px);
|
|
29
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-54cc9a3d.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_g3uz3","button":"bottom-sheet__button_g3uz3"};
|
|
9
9
|
require('./index.css')
|
|
10
10
|
|
|
11
11
|
var Closer = function (_a) {
|
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: ia0kw */
|
|
2
2
|
:root {
|
|
3
|
+
} /* deprecated */ :root {
|
|
3
4
|
--color-light-graphic-primary: #0b1f35;
|
|
4
5
|
--color-light-bg-primary-inverted-alpha-3: rgba(11, 31, 53, 0.03);
|
|
5
|
-
}
|
|
6
|
-
:root {
|
|
6
|
+
} :root {
|
|
7
|
+
} :root {
|
|
8
|
+
} :root {
|
|
7
9
|
|
|
8
10
|
/* Hard */
|
|
9
11
|
|
|
10
12
|
/* Up */
|
|
11
13
|
|
|
12
14
|
/* Hard up */
|
|
13
|
-
}
|
|
14
|
-
:root {
|
|
15
|
+
} :root {
|
|
16
|
+
} :root {
|
|
17
|
+
} :root {
|
|
18
|
+
} :root {
|
|
19
|
+
} :root {
|
|
15
20
|
--bottom-sheet-closer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
|
|
16
|
-
}
|
|
17
|
-
.bottom-sheet__closer_1iz26 {
|
|
21
|
+
} .bottom-sheet__closer_g3uz3 {
|
|
18
22
|
width: 32px;
|
|
19
23
|
height: 32px;
|
|
20
24
|
display: flex;
|
|
@@ -22,8 +26,7 @@
|
|
|
22
26
|
align-items: center;
|
|
23
27
|
cursor: pointer;
|
|
24
28
|
color: var(--color-light-graphic-primary);
|
|
25
|
-
}
|
|
26
|
-
.bottom-sheet__button_1iz26 {
|
|
29
|
+
} .bottom-sheet__button_g3uz3 {
|
|
27
30
|
background: var(--bottom-sheet-closer-bg-color);
|
|
28
31
|
-webkit-backdrop-filter: blur(10px);
|
|
29
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_1ykmx","sticky":"bottom-sheet__sticky_1ykmx","highlighted":"bottom-sheet__highlighted_1ykmx"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
var Footer = function (_a) {
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1c3qz */
|
|
2
2
|
:root {
|
|
3
|
+
} /* deprecated */ :root {
|
|
3
4
|
--color-light-bg-primary: #fff;
|
|
4
5
|
--color-light-border-primary: #dbdee1;
|
|
5
|
-
}
|
|
6
|
-
:root {
|
|
6
|
+
} :root {
|
|
7
|
+
} :root {
|
|
8
|
+
} :root {
|
|
7
9
|
|
|
8
10
|
/* Hard */
|
|
9
11
|
|
|
10
12
|
/* Up */
|
|
11
13
|
|
|
12
14
|
/* Hard up */
|
|
13
|
-
}
|
|
14
|
-
:root {
|
|
15
|
+
} :root {
|
|
16
|
+
} :root {
|
|
15
17
|
--gap-m: 16px;
|
|
16
|
-
}
|
|
17
|
-
:root {
|
|
18
|
+
} :root {
|
|
19
|
+
} :root {
|
|
20
|
+
} :root {
|
|
18
21
|
--bottom-sheet-footer-border-top: 1px solid var(--color-light-border-primary);
|
|
19
22
|
--bottom-sheet-footer-background-color: var(--color-light-bg-primary);
|
|
20
|
-
}
|
|
21
|
-
.bottom-sheet__footer_1mk8h {
|
|
23
|
+
} .bottom-sheet__footer_1ykmx {
|
|
22
24
|
padding: var(--gap-m) var(--gap-m);
|
|
23
25
|
background-color: var(--color-light-bg-primary);
|
|
24
|
-
}
|
|
25
|
-
.bottom-sheet__sticky_1mk8h {
|
|
26
|
+
} .bottom-sheet__sticky_1ykmx {
|
|
26
27
|
position: sticky;
|
|
27
28
|
bottom: 0;
|
|
28
|
-
}
|
|
29
|
-
.bottom-sheet__highlighted_1mk8h {
|
|
29
|
+
} .bottom-sheet__highlighted_1ykmx {
|
|
30
30
|
border-top: var(--bottom-sheet-footer-border-top);
|
|
31
31
|
background-color: var(--bottom-sheet-footer-background-color);
|
|
32
32
|
}
|
|
@@ -2,10 +2,10 @@ import 'react';
|
|
|
2
2
|
import 'classnames';
|
|
3
3
|
import '@alfalab/core-components-base-modal/esm';
|
|
4
4
|
import '@alfalab/core-components-typography/esm';
|
|
5
|
-
export { a as Header } from '../../component-
|
|
5
|
+
export { a as Header } from '../../component-62847823.js';
|
|
6
6
|
import '../backer/Component.js';
|
|
7
7
|
import '../closer/Component.js';
|
|
8
|
-
import '../../tslib.es6-
|
|
8
|
+
import '../../tslib.es6-54cc9a3d.js';
|
|
9
9
|
import 'react-div-100vh';
|
|
10
10
|
import 'react-swipeable';
|
|
11
11
|
import '../footer/Component.js';
|
|
@@ -1,75 +1,64 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1yot3 */
|
|
2
2
|
:root {
|
|
3
|
+
} /* deprecated */ :root {
|
|
3
4
|
--color-light-bg-primary: #fff;
|
|
4
|
-
}
|
|
5
|
-
:root {
|
|
5
|
+
} :root {
|
|
6
|
+
} :root {
|
|
7
|
+
} :root {
|
|
6
8
|
|
|
7
9
|
/* Hard */
|
|
8
10
|
|
|
9
11
|
/* Up */
|
|
10
12
|
|
|
11
13
|
/* Hard up */
|
|
12
|
-
}
|
|
13
|
-
:
|
|
14
|
+
} :root {
|
|
15
|
+
--border-radius-xl: 16px;
|
|
16
|
+
} :root {
|
|
14
17
|
--gap-2xs: 4px;
|
|
15
18
|
--gap-xs: 8px;
|
|
16
19
|
--gap-4xl: 48px;
|
|
17
|
-
}
|
|
18
|
-
:root {
|
|
20
|
+
} :root {
|
|
19
21
|
--font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
|
|
20
22
|
sans-serif;
|
|
21
|
-
}
|
|
22
|
-
:root {
|
|
23
|
-
--border-radius-xl: 16px;
|
|
24
|
-
}
|
|
25
|
-
:root {
|
|
23
|
+
} :root {
|
|
24
|
+
} :root {
|
|
26
25
|
--bottom-sheet-header-border-bottom: none;
|
|
27
26
|
--bottom-sheet-title-font-size: 18px;
|
|
28
27
|
--bottom-sheet-title-font-weight: 700;
|
|
29
28
|
--bottom-sheet-title-line-height: 24px;
|
|
30
29
|
--bottom-sheet-title-font-family: var(--font-family-system);
|
|
31
30
|
--bottom-sheet-title-margin-vertical: var(--gap-2xs);
|
|
32
|
-
}
|
|
33
|
-
.bottom-sheet__headerWrapper_1rnrb {
|
|
31
|
+
} .bottom-sheet__headerWrapper_kcjgq {
|
|
34
32
|
padding: var(--gap-xs);
|
|
35
33
|
padding-bottom: 0;
|
|
36
34
|
background-color: var(--color-light-bg-primary);
|
|
37
35
|
border-top-right-radius: var(--border-radius-xl);
|
|
38
36
|
border-top-left-radius: var(--border-radius-xl);
|
|
39
37
|
z-index: 1;
|
|
40
|
-
}
|
|
41
|
-
.bottom-sheet__header_1rnrb {
|
|
38
|
+
} .bottom-sheet__header_kcjgq {
|
|
42
39
|
display: flex;
|
|
43
|
-
}
|
|
44
|
-
.bottom-sheet__sticky_1rnrb {
|
|
40
|
+
} .bottom-sheet__sticky_kcjgq {
|
|
45
41
|
position: sticky;
|
|
46
42
|
top: 0;
|
|
47
|
-
}
|
|
48
|
-
.bottom-sheet__highlighted_1rnrb {
|
|
43
|
+
} .bottom-sheet__highlighted_kcjgq {
|
|
49
44
|
border-bottom: var(--bottom-sheet-header-border-bottom);
|
|
50
|
-
}
|
|
51
|
-
.bottom-sheet__justifyEnd_1rnrb {
|
|
45
|
+
} .bottom-sheet__justifyEnd_kcjgq {
|
|
52
46
|
justify-content: flex-end;
|
|
53
|
-
}
|
|
54
|
-
.bottom-sheet__addon_1rnrb {
|
|
47
|
+
} .bottom-sheet__addon_kcjgq {
|
|
55
48
|
display: flex;
|
|
56
49
|
justify-content: center;
|
|
57
50
|
align-items: center;
|
|
58
51
|
min-width: 48px;
|
|
59
52
|
height: 48px;
|
|
60
|
-
}
|
|
61
|
-
.bottom-sheet__addonFixed_1rnrb {
|
|
53
|
+
} .bottom-sheet__addonFixed_kcjgq {
|
|
62
54
|
position: fixed;
|
|
63
|
-
}
|
|
64
|
-
.bottom-sheet__addonLeft_1rnrb {
|
|
55
|
+
} .bottom-sheet__addonLeft_kcjgq {
|
|
65
56
|
left: 0;
|
|
66
57
|
margin-left: var(--gap-xs);
|
|
67
|
-
}
|
|
68
|
-
.bottom-sheet__addonRight_1rnrb {
|
|
58
|
+
} .bottom-sheet__addonRight_kcjgq {
|
|
69
59
|
right: 0;
|
|
70
60
|
margin-right: var(--gap-xs);
|
|
71
|
-
}
|
|
72
|
-
.bottom-sheet__title_1rnrb {
|
|
61
|
+
} .bottom-sheet__title_kcjgq {
|
|
73
62
|
padding: var(--gap-xs) var(--gap-xs);
|
|
74
63
|
margin: var(--bottom-sheet-title-margin-vertical) 0;
|
|
75
64
|
width: 100%;
|
|
@@ -77,24 +66,18 @@
|
|
|
77
66
|
font-weight: var(--bottom-sheet-title-font-weight);
|
|
78
67
|
line-height: var(--bottom-sheet-title-line-height);
|
|
79
68
|
font-family: var(--bottom-sheet-title-font-family);
|
|
80
|
-
}
|
|
81
|
-
.bottom-sheet__titleCenter_1rnrb {
|
|
69
|
+
} .bottom-sheet__titleCenter_kcjgq {
|
|
82
70
|
text-align: center;
|
|
83
|
-
}
|
|
84
|
-
.bottom-sheet__titleLeft_1rnrb {
|
|
71
|
+
} .bottom-sheet__titleLeft_kcjgq {
|
|
85
72
|
text-align: left;
|
|
86
|
-
}
|
|
87
|
-
.bottom-sheet__trimTitle_1rnrb {
|
|
73
|
+
} .bottom-sheet__trimTitle_kcjgq {
|
|
88
74
|
white-space: nowrap;
|
|
89
75
|
overflow: hidden;
|
|
90
76
|
text-overflow: ellipsis;
|
|
91
|
-
}
|
|
92
|
-
.bottom-sheet__titleBigIndentHorizontal_1rnrb {
|
|
77
|
+
} .bottom-sheet__titleBigIndentHorizontal_kcjgq {
|
|
93
78
|
margin: var(--bottom-sheet-title-margin-vertical) var(--gap-4xl);
|
|
94
|
-
}
|
|
95
|
-
.bottom-sheet__titleIndentRight_1rnrb {
|
|
79
|
+
} .bottom-sheet__titleIndentRight_kcjgq {
|
|
96
80
|
margin-right: var(--gap-4xl);
|
|
97
|
-
}
|
|
98
|
-
.bottom-sheet__titleIndentLeft_1rnrb {
|
|
81
|
+
} .bottom-sheet__titleIndentLeft_kcjgq {
|
|
99
82
|
margin-left: var(--gap-4xl);
|
|
100
83
|
}
|