@alfalab/core-components-bottom-sheet 6.2.2 → 6.2.4
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.js +26 -17
- package/components/footer/Component.js +1 -1
- package/components/footer/index.css +26 -26
- package/components/header/Component.js +1 -1
- package/components/header/index.css +13 -13
- package/cssm/component.js +25 -16
- package/cssm/types.d.ts +4 -0
- package/esm/component.js +26 -17
- package/esm/components/footer/Component.js +1 -1
- package/esm/components/footer/index.css +26 -26
- package/esm/components/header/Component.js +1 -1
- package/esm/components/header/index.css +13 -13
- package/esm/index.css +41 -41
- package/esm/types.d.ts +4 -0
- package/index.css +41 -41
- package/modern/component.js +24 -17
- package/modern/components/footer/Component.js +1 -1
- package/modern/components/footer/index.css +26 -26
- package/modern/components/header/Component.js +1 -1
- package/modern/components/header/index.css +13 -13
- package/modern/index.css +41 -41
- package/modern/types.d.ts +4 -0
- package/package.json +2 -4
- package/types.d.ts +4 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1wk86 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-accent: #ef3124;
|
|
@@ -41,58 +41,58 @@
|
|
|
41
41
|
} :root {
|
|
42
42
|
--bottom-sheet-footer-border-top: 1px solid var(--color-light-border-secondary);
|
|
43
43
|
--bottom-sheet-footer-background-color: var(--color-light-bg-primary);
|
|
44
|
-
} .bottom-
|
|
44
|
+
} .bottom-sheet__footer_ykuo8 {
|
|
45
45
|
padding: var(--gap-m) var(--gap-m);
|
|
46
46
|
background-color: var(--color-light-bg-primary);
|
|
47
|
-
} .bottom-
|
|
47
|
+
} .bottom-sheet__sticky_ykuo8 {
|
|
48
48
|
position: sticky;
|
|
49
49
|
bottom: 0;
|
|
50
50
|
z-index: 1;
|
|
51
|
-
} .bottom-
|
|
51
|
+
} .bottom-sheet__highlighted_ykuo8 {
|
|
52
52
|
border-top: var(--bottom-sheet-footer-border-top);
|
|
53
53
|
background-color: var(--bottom-sheet-footer-background-color);
|
|
54
|
-
} .bottom-sheet__background-
|
|
54
|
+
} .bottom-sheet__background-accent_ykuo8 {
|
|
55
55
|
background-color: var(--color-light-bg-accent);
|
|
56
|
-
} .bottom-sheet__background-
|
|
56
|
+
} .bottom-sheet__background-info_ykuo8 {
|
|
57
57
|
background-color: var(--color-light-bg-info);
|
|
58
|
-
} .bottom-sheet__background-attention-
|
|
58
|
+
} .bottom-sheet__background-attention-muted_ykuo8 {
|
|
59
59
|
background-color: var(--color-light-bg-attention-muted);
|
|
60
|
-
} .bottom-sheet__background-positive-
|
|
60
|
+
} .bottom-sheet__background-positive-muted_ykuo8 {
|
|
61
61
|
background-color: var(--color-light-bg-positive-muted);
|
|
62
|
-
} .bottom-sheet__background-negative-
|
|
62
|
+
} .bottom-sheet__background-negative-muted_ykuo8 {
|
|
63
63
|
background-color: var(--color-light-bg-negative-muted);
|
|
64
|
-
} .bottom-sheet__background-
|
|
64
|
+
} .bottom-sheet__background-primary_ykuo8 {
|
|
65
65
|
background-color: var(--color-light-bg-primary);
|
|
66
|
-
} .bottom-sheet__background-primary-
|
|
66
|
+
} .bottom-sheet__background-primary-inverted_ykuo8 {
|
|
67
67
|
background-color: var(--color-light-bg-primary-inverted);
|
|
68
|
-
} .bottom-sheet__background-
|
|
68
|
+
} .bottom-sheet__background-secondary_ykuo8 {
|
|
69
69
|
background-color: var(--color-light-bg-secondary);
|
|
70
|
-
} .bottom-sheet__background-secondary-
|
|
70
|
+
} .bottom-sheet__background-secondary-inverted_ykuo8 {
|
|
71
71
|
background-color: var(--color-light-bg-secondary-inverted);
|
|
72
|
-
} .bottom-sheet__background-
|
|
72
|
+
} .bottom-sheet__background-tertiary_ykuo8 {
|
|
73
73
|
background-color: var(--color-light-bg-tertiary);
|
|
74
|
-
} .bottom-sheet__background-tertiary-
|
|
74
|
+
} .bottom-sheet__background-tertiary-inverted_ykuo8 {
|
|
75
75
|
background-color: var(--color-light-bg-tertiary-inverted);
|
|
76
|
-
} .bottom-sheet__background-
|
|
76
|
+
} .bottom-sheet__background-quaternary_ykuo8 {
|
|
77
77
|
background-color: var(--color-light-bg-quaternary);
|
|
78
|
-
} .bottom-sheet__background-quaternary-
|
|
78
|
+
} .bottom-sheet__background-quaternary-inverted_ykuo8 {
|
|
79
79
|
background-color: var(--color-light-bg-quaternary-inverted);
|
|
80
|
-
} .bottom-sheet__background-specialbg-
|
|
80
|
+
} .bottom-sheet__background-specialbg-component_ykuo8 {
|
|
81
81
|
background-color: var(--color-light-specialbg-component);
|
|
82
|
-
} .bottom-sheet__background-specialbg-component-
|
|
82
|
+
} .bottom-sheet__background-specialbg-component-inverted_ykuo8 {
|
|
83
83
|
background-color: var(--color-light-specialbg-component-inverted);
|
|
84
|
-
} .bottom-sheet__background-specialbg-primary-
|
|
84
|
+
} .bottom-sheet__background-specialbg-primary-grouped_ykuo8 {
|
|
85
85
|
background-color: var(--color-light-specialbg-primary-grouped);
|
|
86
|
-
} .bottom-sheet__background-specialbg-secondary-
|
|
86
|
+
} .bottom-sheet__background-specialbg-secondary-grouped_ykuo8 {
|
|
87
87
|
background-color: var(--color-light-specialbg-secondary-grouped);
|
|
88
|
-
} .bottom-sheet__background-specialbg-tertiary-
|
|
88
|
+
} .bottom-sheet__background-specialbg-tertiary-grouped_ykuo8 {
|
|
89
89
|
background-color: var(--color-light-specialbg-tertiary-grouped);
|
|
90
|
-
} .bottom-sheet__background-specialbg-secondary-
|
|
90
|
+
} .bottom-sheet__background-specialbg-secondary-transparent_ykuo8 {
|
|
91
91
|
background-color: var(--color-light-specialbg-secondary-transparent);
|
|
92
|
-
} .bottom-sheet__background-specialbg-secondary-transparent-
|
|
92
|
+
} .bottom-sheet__background-specialbg-secondary-transparent-inverted_ykuo8 {
|
|
93
93
|
background-color: var(--color-light-specialbg-secondary-transparent-inverted);
|
|
94
|
-
} .bottom-sheet__background-specialbg-tertiary-
|
|
94
|
+
} .bottom-sheet__background-specialbg-tertiary-transparent_ykuo8 {
|
|
95
95
|
background-color: var(--color-light-specialbg-tertiary-transparent);
|
|
96
|
-
} .bottom-sheet__background-specialbg-tertiary-transparent-
|
|
96
|
+
} .bottom-sheet__background-specialbg-tertiary-transparent-inverted_ykuo8 {
|
|
97
97
|
background-color: var(--color-light-specialbg-tertiary-transparent-inverted);
|
|
98
98
|
}
|
|
@@ -5,7 +5,7 @@ import { BaseModalContext } from '@alfalab/core-components-base-modal/esm';
|
|
|
5
5
|
import { NavigationBar } from '@alfalab/core-components-navigation-bar/esm';
|
|
6
6
|
import { HEADER_OFFSET } from '../../utils.js';
|
|
7
7
|
|
|
8
|
-
var styles = {"headerWrapper":"bottom-
|
|
8
|
+
var styles = {"headerWrapper":"bottom-sheet__headerWrapper_1r713","hasContent":"bottom-sheet__hasContent_1r713","header":"bottom-sheet__header_1r713","sticky":"bottom-sheet__sticky_1r713","highlighted":"bottom-sheet__highlighted_1r713","justifyEnd":"bottom-sheet__justifyEnd_1r713","addon":"bottom-sheet__addon_1r713","addonFixed":"bottom-sheet__addonFixed_1r713","title":"bottom-sheet__title_1r713","titleCenter":"bottom-sheet__titleCenter_1r713","titleLeft":"bottom-sheet__titleLeft_1r713","trimTitle":"bottom-sheet__trimTitle_1r713"};
|
|
9
9
|
require('./index.css')
|
|
10
10
|
|
|
11
11
|
var Header = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: gqfc1 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-secondary: #e9e9eb; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -27,42 +27,42 @@
|
|
|
27
27
|
--bottom-sheet-title-font-weight: 700;
|
|
28
28
|
--bottom-sheet-title-line-height: 24px;
|
|
29
29
|
--bottom-sheet-title-font-family: var(--font-family-system);
|
|
30
|
-
} .bottom-
|
|
30
|
+
} .bottom-sheet__headerWrapper_1r713 {
|
|
31
31
|
padding: var(--gap-s) var(--gap-xs) var(--gap-2xs);
|
|
32
32
|
border-top-right-radius: var(--border-radius-xl);
|
|
33
33
|
border-top-left-radius: var(--border-radius-xl);
|
|
34
34
|
z-index: 1;
|
|
35
|
-
} .bottom-
|
|
35
|
+
} .bottom-sheet__hasContent_1r713 {
|
|
36
36
|
background-color: inherit;
|
|
37
|
-
} .bottom-
|
|
37
|
+
} .bottom-sheet__header_1r713 {
|
|
38
38
|
display: flex;
|
|
39
|
-
} .bottom-
|
|
39
|
+
} .bottom-sheet__sticky_1r713 {
|
|
40
40
|
position: sticky;
|
|
41
41
|
top: 0;
|
|
42
|
-
} .bottom-
|
|
42
|
+
} .bottom-sheet__highlighted_1r713 {
|
|
43
43
|
border-bottom: var(--bottom-sheet-header-border-bottom);
|
|
44
|
-
} .bottom-
|
|
44
|
+
} .bottom-sheet__justifyEnd_1r713 {
|
|
45
45
|
justify-content: flex-end;
|
|
46
|
-
} .bottom-
|
|
46
|
+
} .bottom-sheet__addon_1r713 {
|
|
47
47
|
display: flex;
|
|
48
48
|
justify-content: center;
|
|
49
49
|
align-items: center;
|
|
50
50
|
min-width: 48px;
|
|
51
51
|
height: 48px;
|
|
52
|
-
} .bottom-
|
|
52
|
+
} .bottom-sheet__addonFixed_1r713 {
|
|
53
53
|
position: fixed;
|
|
54
|
-
} .bottom-
|
|
54
|
+
} .bottom-sheet__title_1r713 {
|
|
55
55
|
padding: var(--gap-s) var(--gap-xs);
|
|
56
56
|
width: 100%;
|
|
57
57
|
font-size: var(--bottom-sheet-title-font-size);
|
|
58
58
|
font-weight: var(--bottom-sheet-title-font-weight);
|
|
59
59
|
line-height: var(--bottom-sheet-title-line-height);
|
|
60
60
|
font-family: var(--bottom-sheet-title-font-family);
|
|
61
|
-
} .bottom-
|
|
61
|
+
} .bottom-sheet__titleCenter_1r713 {
|
|
62
62
|
text-align: center;
|
|
63
|
-
} .bottom-
|
|
63
|
+
} .bottom-sheet__titleLeft_1r713 {
|
|
64
64
|
text-align: left;
|
|
65
|
-
} .bottom-
|
|
65
|
+
} .bottom-sheet__trimTitle_1r713 {
|
|
66
66
|
white-space: nowrap;
|
|
67
67
|
overflow: hidden;
|
|
68
68
|
text-overflow: ellipsis;
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 101y0 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-accent: #ef3124;
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
} :root {
|
|
46
46
|
--bottom-sheet-in-transition: transform 0.5s cubic-bezier(0.09, 0.91, 0.18, 0.99);
|
|
47
47
|
--bottom-sheet-out-transition: transform 0.3s ease;
|
|
48
|
-
} .bottom-
|
|
48
|
+
} .bottom-sheet__modal_1gfwj {
|
|
49
49
|
background-color: transparent;
|
|
50
50
|
position: fixed;
|
|
51
51
|
bottom: 0;
|
|
52
52
|
width: 100%;
|
|
53
53
|
max-width: 600px;
|
|
54
54
|
pointer-events: none;
|
|
55
|
-
} .bottom-
|
|
55
|
+
} .bottom-sheet__wrapper_1gfwj {
|
|
56
56
|
transform: translateY(100%);
|
|
57
57
|
overflow: hidden;
|
|
58
58
|
pointer-events: none;
|
|
59
59
|
border-top-right-radius: var(--border-radius-xl);
|
|
60
60
|
border-top-left-radius: var(--border-radius-xl);
|
|
61
|
-
} .bottom-
|
|
61
|
+
} .bottom-sheet__component_1gfwj {
|
|
62
62
|
overflow: hidden;
|
|
63
63
|
position: relative;
|
|
64
64
|
display: flex;
|
|
@@ -66,16 +66,16 @@
|
|
|
66
66
|
border-radius: inherit;
|
|
67
67
|
background-color: var(--color-light-bg-primary);
|
|
68
68
|
pointer-events: all;
|
|
69
|
-
} .bottom-
|
|
69
|
+
} .bottom-sheet__withTransition_1gfwj {
|
|
70
70
|
transition: var(--bottom-sheet-out-transition);
|
|
71
|
-
} .bottom-
|
|
71
|
+
} .bottom-sheet__scrollableContainer_1gfwj {
|
|
72
72
|
overflow: auto;
|
|
73
73
|
display: flex;
|
|
74
74
|
flex-direction: column;
|
|
75
75
|
position: relative;
|
|
76
76
|
height: 100%;
|
|
77
77
|
background-color: inherit;
|
|
78
|
-
} .bottom-
|
|
78
|
+
} .bottom-sheet__marker_1gfwj {
|
|
79
79
|
position: fixed;
|
|
80
80
|
top: var(--gap-2xs);
|
|
81
81
|
left: 50%;
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
transform: translateX(-50%);
|
|
86
86
|
background-color: var(--color-light-graphic-quaternary);
|
|
87
87
|
z-index: 1000;
|
|
88
|
-
} .bottom-
|
|
88
|
+
} .bottom-sheet__content_1gfwj {
|
|
89
89
|
position: relative;
|
|
90
90
|
z-index: 0;
|
|
91
91
|
display: flex;
|
|
@@ -94,73 +94,73 @@
|
|
|
94
94
|
padding: 0 var(--gap-m);
|
|
95
95
|
color: var(--color-light-text-primary);
|
|
96
96
|
background-color: inherit;
|
|
97
|
-
} .bottom-
|
|
97
|
+
} .bottom-sheet__noHeader_1gfwj {
|
|
98
98
|
padding-top: var(--gap-m);
|
|
99
|
-
} .bottom-
|
|
99
|
+
} .bottom-sheet__noFooter_1gfwj {
|
|
100
100
|
padding-bottom: var(--gap-m);
|
|
101
|
-
} .bottom-
|
|
101
|
+
} .bottom-sheet__scrollLocked_1gfwj {
|
|
102
102
|
overflow: hidden;
|
|
103
|
-
} .bottom-
|
|
103
|
+
} .bottom-sheet__hiddenScrollbar_1gfwj {
|
|
104
104
|
scrollbar-width: none
|
|
105
|
-
} .bottom-
|
|
105
|
+
} .bottom-sheet__hiddenScrollbar_1gfwj::-webkit-scrollbar {
|
|
106
106
|
width: 0;
|
|
107
107
|
height: 0;
|
|
108
|
-
} .bottom-
|
|
108
|
+
} .bottom-sheet__disabledPointerEvents_1gfwj {
|
|
109
109
|
pointer-events: none;
|
|
110
|
-
} .bottom-
|
|
110
|
+
} .bottom-sheet__appear_1gfwj .bottom-sheet__wrapper_1gfwj, .bottom-sheet__enter_1gfwj .bottom-sheet__wrapper_1gfwj {
|
|
111
111
|
transition: none;
|
|
112
|
-
} .bottom-
|
|
112
|
+
} .bottom-sheet__appearActive_1gfwj .bottom-sheet__wrapper_1gfwj, .bottom-sheet__enterActive_1gfwj .bottom-sheet__wrapper_1gfwj {
|
|
113
113
|
transition: var(--bottom-sheet-in-transition);
|
|
114
114
|
transform: translateY(0);
|
|
115
|
-
} .bottom-
|
|
115
|
+
} .bottom-sheet__enterDone_1gfwj .bottom-sheet__wrapper_1gfwj, .bottom-sheet__appearDone_1gfwj .bottom-sheet__wrapper_1gfwj {
|
|
116
116
|
transform: translateY(0);
|
|
117
|
-
} .bottom-
|
|
117
|
+
} .bottom-sheet__exit_1gfwj .bottom-sheet__wrapper_1gfwj {
|
|
118
118
|
transform: translateY(0);
|
|
119
|
-
} .bottom-
|
|
119
|
+
} .bottom-sheet__exitActive_1gfwj .bottom-sheet__wrapper_1gfwj {
|
|
120
120
|
transition: var(--bottom-sheet-out-transition);
|
|
121
121
|
transform: translateY(100%);
|
|
122
|
-
} .bottom-sheet__background-
|
|
122
|
+
} .bottom-sheet__background-accent_1gfwj {
|
|
123
123
|
background-color: var(--color-light-bg-accent);
|
|
124
|
-
} .bottom-sheet__background-
|
|
124
|
+
} .bottom-sheet__background-info_1gfwj {
|
|
125
125
|
background-color: var(--color-light-bg-info);
|
|
126
|
-
} .bottom-sheet__background-attention-
|
|
126
|
+
} .bottom-sheet__background-attention-muted_1gfwj {
|
|
127
127
|
background-color: var(--color-light-bg-attention-muted);
|
|
128
|
-
} .bottom-sheet__background-positive-
|
|
128
|
+
} .bottom-sheet__background-positive-muted_1gfwj {
|
|
129
129
|
background-color: var(--color-light-bg-positive-muted);
|
|
130
|
-
} .bottom-sheet__background-negative-
|
|
130
|
+
} .bottom-sheet__background-negative-muted_1gfwj {
|
|
131
131
|
background-color: var(--color-light-bg-negative-muted);
|
|
132
|
-
} .bottom-sheet__background-
|
|
132
|
+
} .bottom-sheet__background-primary_1gfwj {
|
|
133
133
|
background-color: var(--color-light-bg-primary);
|
|
134
|
-
} .bottom-sheet__background-primary-
|
|
134
|
+
} .bottom-sheet__background-primary-inverted_1gfwj {
|
|
135
135
|
background-color: var(--color-light-bg-primary-inverted);
|
|
136
|
-
} .bottom-sheet__background-
|
|
136
|
+
} .bottom-sheet__background-secondary_1gfwj {
|
|
137
137
|
background-color: var(--color-light-bg-secondary);
|
|
138
|
-
} .bottom-sheet__background-secondary-
|
|
138
|
+
} .bottom-sheet__background-secondary-inverted_1gfwj {
|
|
139
139
|
background-color: var(--color-light-bg-secondary-inverted);
|
|
140
|
-
} .bottom-sheet__background-
|
|
140
|
+
} .bottom-sheet__background-tertiary_1gfwj {
|
|
141
141
|
background-color: var(--color-light-bg-tertiary);
|
|
142
|
-
} .bottom-sheet__background-tertiary-
|
|
142
|
+
} .bottom-sheet__background-tertiary-inverted_1gfwj {
|
|
143
143
|
background-color: var(--color-light-bg-tertiary-inverted);
|
|
144
|
-
} .bottom-sheet__background-
|
|
144
|
+
} .bottom-sheet__background-quaternary_1gfwj {
|
|
145
145
|
background-color: var(--color-light-bg-quaternary);
|
|
146
|
-
} .bottom-sheet__background-quaternary-
|
|
146
|
+
} .bottom-sheet__background-quaternary-inverted_1gfwj {
|
|
147
147
|
background-color: var(--color-light-bg-quaternary-inverted);
|
|
148
|
-
} .bottom-sheet__background-specialbg-
|
|
148
|
+
} .bottom-sheet__background-specialbg-component_1gfwj {
|
|
149
149
|
background-color: var(--color-light-specialbg-component);
|
|
150
|
-
} .bottom-sheet__background-specialbg-component-
|
|
150
|
+
} .bottom-sheet__background-specialbg-component-inverted_1gfwj {
|
|
151
151
|
background-color: var(--color-light-specialbg-component-inverted);
|
|
152
|
-
} .bottom-sheet__background-specialbg-primary-
|
|
152
|
+
} .bottom-sheet__background-specialbg-primary-grouped_1gfwj {
|
|
153
153
|
background-color: var(--color-light-specialbg-primary-grouped);
|
|
154
|
-
} .bottom-sheet__background-specialbg-secondary-
|
|
154
|
+
} .bottom-sheet__background-specialbg-secondary-grouped_1gfwj {
|
|
155
155
|
background-color: var(--color-light-specialbg-secondary-grouped);
|
|
156
|
-
} .bottom-sheet__background-specialbg-tertiary-
|
|
156
|
+
} .bottom-sheet__background-specialbg-tertiary-grouped_1gfwj {
|
|
157
157
|
background-color: var(--color-light-specialbg-tertiary-grouped);
|
|
158
|
-
} .bottom-sheet__background-specialbg-secondary-
|
|
158
|
+
} .bottom-sheet__background-specialbg-secondary-transparent_1gfwj {
|
|
159
159
|
background-color: var(--color-light-specialbg-secondary-transparent);
|
|
160
|
-
} .bottom-sheet__background-specialbg-secondary-transparent-
|
|
160
|
+
} .bottom-sheet__background-specialbg-secondary-transparent-inverted_1gfwj {
|
|
161
161
|
background-color: var(--color-light-specialbg-secondary-transparent-inverted);
|
|
162
|
-
} .bottom-sheet__background-specialbg-tertiary-
|
|
162
|
+
} .bottom-sheet__background-specialbg-tertiary-transparent_1gfwj {
|
|
163
163
|
background-color: var(--color-light-specialbg-tertiary-transparent);
|
|
164
|
-
} .bottom-sheet__background-specialbg-tertiary-transparent-
|
|
164
|
+
} .bottom-sheet__background-specialbg-tertiary-transparent-inverted_1gfwj {
|
|
165
165
|
background-color: var(--color-light-specialbg-tertiary-transparent-inverted);
|
|
166
166
|
}
|
package/esm/types.d.ts
CHANGED
|
@@ -36,6 +36,10 @@ type BottomSheetProps = {
|
|
|
36
36
|
* Контейнер к которому будут добавляться порталы
|
|
37
37
|
*/
|
|
38
38
|
container?: BaseModalProps['container'];
|
|
39
|
+
/**
|
|
40
|
+
* Рендерить ли в контейнер через портал.
|
|
41
|
+
*/
|
|
42
|
+
usePortal?: BaseModalProps['usePortal'];
|
|
39
43
|
/**
|
|
40
44
|
* Дополнительный класс
|
|
41
45
|
*/
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 101y0 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-accent: #ef3124;
|
|
@@ -45,20 +45,20 @@
|
|
|
45
45
|
} :root {
|
|
46
46
|
--bottom-sheet-in-transition: transform 0.5s cubic-bezier(0.09, 0.91, 0.18, 0.99);
|
|
47
47
|
--bottom-sheet-out-transition: transform 0.3s ease;
|
|
48
|
-
} .bottom-
|
|
48
|
+
} .bottom-sheet__modal_1gfwj {
|
|
49
49
|
background-color: transparent;
|
|
50
50
|
position: fixed;
|
|
51
51
|
bottom: 0;
|
|
52
52
|
width: 100%;
|
|
53
53
|
max-width: 600px;
|
|
54
54
|
pointer-events: none;
|
|
55
|
-
} .bottom-
|
|
55
|
+
} .bottom-sheet__wrapper_1gfwj {
|
|
56
56
|
transform: translateY(100%);
|
|
57
57
|
overflow: hidden;
|
|
58
58
|
pointer-events: none;
|
|
59
59
|
border-top-right-radius: var(--border-radius-xl);
|
|
60
60
|
border-top-left-radius: var(--border-radius-xl);
|
|
61
|
-
} .bottom-
|
|
61
|
+
} .bottom-sheet__component_1gfwj {
|
|
62
62
|
overflow: hidden;
|
|
63
63
|
position: relative;
|
|
64
64
|
display: flex;
|
|
@@ -66,16 +66,16 @@
|
|
|
66
66
|
border-radius: inherit;
|
|
67
67
|
background-color: var(--color-light-bg-primary);
|
|
68
68
|
pointer-events: all;
|
|
69
|
-
} .bottom-
|
|
69
|
+
} .bottom-sheet__withTransition_1gfwj {
|
|
70
70
|
transition: var(--bottom-sheet-out-transition);
|
|
71
|
-
} .bottom-
|
|
71
|
+
} .bottom-sheet__scrollableContainer_1gfwj {
|
|
72
72
|
overflow: auto;
|
|
73
73
|
display: flex;
|
|
74
74
|
flex-direction: column;
|
|
75
75
|
position: relative;
|
|
76
76
|
height: 100%;
|
|
77
77
|
background-color: inherit;
|
|
78
|
-
} .bottom-
|
|
78
|
+
} .bottom-sheet__marker_1gfwj {
|
|
79
79
|
position: fixed;
|
|
80
80
|
top: var(--gap-2xs);
|
|
81
81
|
left: 50%;
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
transform: translateX(-50%);
|
|
86
86
|
background-color: var(--color-light-graphic-quaternary);
|
|
87
87
|
z-index: 1000;
|
|
88
|
-
} .bottom-
|
|
88
|
+
} .bottom-sheet__content_1gfwj {
|
|
89
89
|
position: relative;
|
|
90
90
|
z-index: 0;
|
|
91
91
|
display: flex;
|
|
@@ -94,73 +94,73 @@
|
|
|
94
94
|
padding: 0 var(--gap-m);
|
|
95
95
|
color: var(--color-light-text-primary);
|
|
96
96
|
background-color: inherit;
|
|
97
|
-
} .bottom-
|
|
97
|
+
} .bottom-sheet__noHeader_1gfwj {
|
|
98
98
|
padding-top: var(--gap-m);
|
|
99
|
-
} .bottom-
|
|
99
|
+
} .bottom-sheet__noFooter_1gfwj {
|
|
100
100
|
padding-bottom: var(--gap-m);
|
|
101
|
-
} .bottom-
|
|
101
|
+
} .bottom-sheet__scrollLocked_1gfwj {
|
|
102
102
|
overflow: hidden;
|
|
103
|
-
} .bottom-
|
|
103
|
+
} .bottom-sheet__hiddenScrollbar_1gfwj {
|
|
104
104
|
scrollbar-width: none
|
|
105
|
-
} .bottom-
|
|
105
|
+
} .bottom-sheet__hiddenScrollbar_1gfwj::-webkit-scrollbar {
|
|
106
106
|
width: 0;
|
|
107
107
|
height: 0;
|
|
108
|
-
} .bottom-
|
|
108
|
+
} .bottom-sheet__disabledPointerEvents_1gfwj {
|
|
109
109
|
pointer-events: none;
|
|
110
|
-
} .bottom-
|
|
110
|
+
} .bottom-sheet__appear_1gfwj .bottom-sheet__wrapper_1gfwj, .bottom-sheet__enter_1gfwj .bottom-sheet__wrapper_1gfwj {
|
|
111
111
|
transition: none;
|
|
112
|
-
} .bottom-
|
|
112
|
+
} .bottom-sheet__appearActive_1gfwj .bottom-sheet__wrapper_1gfwj, .bottom-sheet__enterActive_1gfwj .bottom-sheet__wrapper_1gfwj {
|
|
113
113
|
transition: var(--bottom-sheet-in-transition);
|
|
114
114
|
transform: translateY(0);
|
|
115
|
-
} .bottom-
|
|
115
|
+
} .bottom-sheet__enterDone_1gfwj .bottom-sheet__wrapper_1gfwj, .bottom-sheet__appearDone_1gfwj .bottom-sheet__wrapper_1gfwj {
|
|
116
116
|
transform: translateY(0);
|
|
117
|
-
} .bottom-
|
|
117
|
+
} .bottom-sheet__exit_1gfwj .bottom-sheet__wrapper_1gfwj {
|
|
118
118
|
transform: translateY(0);
|
|
119
|
-
} .bottom-
|
|
119
|
+
} .bottom-sheet__exitActive_1gfwj .bottom-sheet__wrapper_1gfwj {
|
|
120
120
|
transition: var(--bottom-sheet-out-transition);
|
|
121
121
|
transform: translateY(100%);
|
|
122
|
-
} .bottom-sheet__background-
|
|
122
|
+
} .bottom-sheet__background-accent_1gfwj {
|
|
123
123
|
background-color: var(--color-light-bg-accent);
|
|
124
|
-
} .bottom-sheet__background-
|
|
124
|
+
} .bottom-sheet__background-info_1gfwj {
|
|
125
125
|
background-color: var(--color-light-bg-info);
|
|
126
|
-
} .bottom-sheet__background-attention-
|
|
126
|
+
} .bottom-sheet__background-attention-muted_1gfwj {
|
|
127
127
|
background-color: var(--color-light-bg-attention-muted);
|
|
128
|
-
} .bottom-sheet__background-positive-
|
|
128
|
+
} .bottom-sheet__background-positive-muted_1gfwj {
|
|
129
129
|
background-color: var(--color-light-bg-positive-muted);
|
|
130
|
-
} .bottom-sheet__background-negative-
|
|
130
|
+
} .bottom-sheet__background-negative-muted_1gfwj {
|
|
131
131
|
background-color: var(--color-light-bg-negative-muted);
|
|
132
|
-
} .bottom-sheet__background-
|
|
132
|
+
} .bottom-sheet__background-primary_1gfwj {
|
|
133
133
|
background-color: var(--color-light-bg-primary);
|
|
134
|
-
} .bottom-sheet__background-primary-
|
|
134
|
+
} .bottom-sheet__background-primary-inverted_1gfwj {
|
|
135
135
|
background-color: var(--color-light-bg-primary-inverted);
|
|
136
|
-
} .bottom-sheet__background-
|
|
136
|
+
} .bottom-sheet__background-secondary_1gfwj {
|
|
137
137
|
background-color: var(--color-light-bg-secondary);
|
|
138
|
-
} .bottom-sheet__background-secondary-
|
|
138
|
+
} .bottom-sheet__background-secondary-inverted_1gfwj {
|
|
139
139
|
background-color: var(--color-light-bg-secondary-inverted);
|
|
140
|
-
} .bottom-sheet__background-
|
|
140
|
+
} .bottom-sheet__background-tertiary_1gfwj {
|
|
141
141
|
background-color: var(--color-light-bg-tertiary);
|
|
142
|
-
} .bottom-sheet__background-tertiary-
|
|
142
|
+
} .bottom-sheet__background-tertiary-inverted_1gfwj {
|
|
143
143
|
background-color: var(--color-light-bg-tertiary-inverted);
|
|
144
|
-
} .bottom-sheet__background-
|
|
144
|
+
} .bottom-sheet__background-quaternary_1gfwj {
|
|
145
145
|
background-color: var(--color-light-bg-quaternary);
|
|
146
|
-
} .bottom-sheet__background-quaternary-
|
|
146
|
+
} .bottom-sheet__background-quaternary-inverted_1gfwj {
|
|
147
147
|
background-color: var(--color-light-bg-quaternary-inverted);
|
|
148
|
-
} .bottom-sheet__background-specialbg-
|
|
148
|
+
} .bottom-sheet__background-specialbg-component_1gfwj {
|
|
149
149
|
background-color: var(--color-light-specialbg-component);
|
|
150
|
-
} .bottom-sheet__background-specialbg-component-
|
|
150
|
+
} .bottom-sheet__background-specialbg-component-inverted_1gfwj {
|
|
151
151
|
background-color: var(--color-light-specialbg-component-inverted);
|
|
152
|
-
} .bottom-sheet__background-specialbg-primary-
|
|
152
|
+
} .bottom-sheet__background-specialbg-primary-grouped_1gfwj {
|
|
153
153
|
background-color: var(--color-light-specialbg-primary-grouped);
|
|
154
|
-
} .bottom-sheet__background-specialbg-secondary-
|
|
154
|
+
} .bottom-sheet__background-specialbg-secondary-grouped_1gfwj {
|
|
155
155
|
background-color: var(--color-light-specialbg-secondary-grouped);
|
|
156
|
-
} .bottom-sheet__background-specialbg-tertiary-
|
|
156
|
+
} .bottom-sheet__background-specialbg-tertiary-grouped_1gfwj {
|
|
157
157
|
background-color: var(--color-light-specialbg-tertiary-grouped);
|
|
158
|
-
} .bottom-sheet__background-specialbg-secondary-
|
|
158
|
+
} .bottom-sheet__background-specialbg-secondary-transparent_1gfwj {
|
|
159
159
|
background-color: var(--color-light-specialbg-secondary-transparent);
|
|
160
|
-
} .bottom-sheet__background-specialbg-secondary-transparent-
|
|
160
|
+
} .bottom-sheet__background-specialbg-secondary-transparent-inverted_1gfwj {
|
|
161
161
|
background-color: var(--color-light-specialbg-secondary-transparent-inverted);
|
|
162
|
-
} .bottom-sheet__background-specialbg-tertiary-
|
|
162
|
+
} .bottom-sheet__background-specialbg-tertiary-transparent_1gfwj {
|
|
163
163
|
background-color: var(--color-light-specialbg-tertiary-transparent);
|
|
164
|
-
} .bottom-sheet__background-specialbg-tertiary-transparent-
|
|
164
|
+
} .bottom-sheet__background-specialbg-tertiary-transparent-inverted_1gfwj {
|
|
165
165
|
background-color: var(--color-light-specialbg-tertiary-transparent-inverted);
|
|
166
166
|
}
|
package/modern/component.js
CHANGED
|
@@ -16,14 +16,14 @@ const getDataTestId = (dataTestId, element) => {
|
|
|
16
16
|
return dataTestId ? `${dataTestId}${elementPart}` : undefined;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
const styles = {"modal":"bottom-sheet__modal_8udi2","wrapper":"bottom-sheet__wrapper_8udi2","component":"bottom-sheet__component_8udi2","withTransition":"bottom-sheet__withTransition_8udi2","scrollableContainer":"bottom-sheet__scrollableContainer_8udi2","marker":"bottom-sheet__marker_8udi2","content":"bottom-sheet__content_8udi2","noHeader":"bottom-sheet__noHeader_8udi2","noFooter":"bottom-sheet__noFooter_8udi2","scrollLocked":"bottom-sheet__scrollLocked_8udi2","hiddenScrollbar":"bottom-sheet__hiddenScrollbar_8udi2","disabledPointerEvents":"bottom-sheet__disabledPointerEvents_8udi2","appear":"bottom-sheet__appear_8udi2","enter":"bottom-sheet__enter_8udi2","appearActive":"bottom-sheet__appearActive_8udi2","enterActive":"bottom-sheet__enterActive_8udi2","enterDone":"bottom-sheet__enterDone_8udi2","appearDone":"bottom-sheet__appearDone_8udi2","exit":"bottom-sheet__exit_8udi2","exitActive":"bottom-sheet__exitActive_8udi2","background-accent":"bottom-sheet__background-accent_8udi2","background-info":"bottom-sheet__background-info_8udi2","background-attention-muted":"bottom-sheet__background-attention-muted_8udi2","background-positive-muted":"bottom-sheet__background-positive-muted_8udi2","background-negative-muted":"bottom-sheet__background-negative-muted_8udi2","background-primary":"bottom-sheet__background-primary_8udi2","background-primary-inverted":"bottom-sheet__background-primary-inverted_8udi2","background-secondary":"bottom-sheet__background-secondary_8udi2","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_8udi2","background-tertiary":"bottom-sheet__background-tertiary_8udi2","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_8udi2","background-quaternary":"bottom-sheet__background-quaternary_8udi2","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_8udi2","background-specialbg-component":"bottom-sheet__background-specialbg-component_8udi2","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_8udi2","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_8udi2","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_8udi2","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_8udi2","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_8udi2","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_8udi2","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_8udi2","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_8udi2"};
|
|
19
|
+
const styles = {"modal":"bottom-sheet__modal_1gfwj","wrapper":"bottom-sheet__wrapper_1gfwj","component":"bottom-sheet__component_1gfwj","withTransition":"bottom-sheet__withTransition_1gfwj","scrollableContainer":"bottom-sheet__scrollableContainer_1gfwj","marker":"bottom-sheet__marker_1gfwj","content":"bottom-sheet__content_1gfwj","noHeader":"bottom-sheet__noHeader_1gfwj","noFooter":"bottom-sheet__noFooter_1gfwj","scrollLocked":"bottom-sheet__scrollLocked_1gfwj","hiddenScrollbar":"bottom-sheet__hiddenScrollbar_1gfwj","disabledPointerEvents":"bottom-sheet__disabledPointerEvents_1gfwj","appear":"bottom-sheet__appear_1gfwj","enter":"bottom-sheet__enter_1gfwj","appearActive":"bottom-sheet__appearActive_1gfwj","enterActive":"bottom-sheet__enterActive_1gfwj","enterDone":"bottom-sheet__enterDone_1gfwj","appearDone":"bottom-sheet__appearDone_1gfwj","exit":"bottom-sheet__exit_1gfwj","exitActive":"bottom-sheet__exitActive_1gfwj","background-accent":"bottom-sheet__background-accent_1gfwj","background-info":"bottom-sheet__background-info_1gfwj","background-attention-muted":"bottom-sheet__background-attention-muted_1gfwj","background-positive-muted":"bottom-sheet__background-positive-muted_1gfwj","background-negative-muted":"bottom-sheet__background-negative-muted_1gfwj","background-primary":"bottom-sheet__background-primary_1gfwj","background-primary-inverted":"bottom-sheet__background-primary-inverted_1gfwj","background-secondary":"bottom-sheet__background-secondary_1gfwj","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_1gfwj","background-tertiary":"bottom-sheet__background-tertiary_1gfwj","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_1gfwj","background-quaternary":"bottom-sheet__background-quaternary_1gfwj","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_1gfwj","background-specialbg-component":"bottom-sheet__background-specialbg-component_1gfwj","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_1gfwj","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_1gfwj","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_1gfwj","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_1gfwj","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_1gfwj","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_1gfwj","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_1gfwj","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_1gfwj"};
|
|
22
20
|
require('./index.css')
|
|
23
21
|
|
|
24
|
-
const BottomSheet = forwardRef(({ open, title, container, backgroundColor, titleSize = 'default', subtitle, actionButton, contentClassName, containerClassName, containerProps, headerClassName, footerClassName, addonClassName, closerClassName, backerClassName, modalClassName, modalWrapperClassName, className, leftAddons, rightAddons, bottomAddons, hasCloser, hasBacker, titleAlign = 'left', trimTitle, stickyHeader, stickyFooter = true, initialHeight = 'default', hideOverlay, hideScrollbar, hideHeader, disableOverlayClick, disableBlockingScroll, children, zIndex, transitionProps = {}, magneticAreas: magneticAreasProp, initialActiveAreaIndex, dataTestId, swipeable = true, scrollLocked: scrollLockedProp, backdropProps, scrollableContainerRef = () => null, bottomSheetInstanceRef, sheetContainerRef = () => null, onClose, onBack, onMagnetize, }, ref) => {
|
|
22
|
+
const BottomSheet = forwardRef(({ open, title, container, usePortal, backgroundColor, titleSize = 'default', subtitle, actionButton, contentClassName, containerClassName, containerProps, headerClassName, footerClassName, addonClassName, closerClassName, backerClassName, modalClassName, modalWrapperClassName, className, leftAddons, rightAddons, bottomAddons, hasCloser, hasBacker, titleAlign = 'left', trimTitle, stickyHeader, stickyFooter = true, initialHeight = 'default', hideOverlay, hideScrollbar, hideHeader, disableOverlayClick, disableBlockingScroll, children, zIndex, transitionProps = {}, magneticAreas: magneticAreasProp, initialActiveAreaIndex, dataTestId, swipeable = true, scrollLocked: scrollLockedProp, backdropProps, scrollableContainerRef = () => null, bottomSheetInstanceRef, sheetContainerRef = () => null, onClose, onBack, onMagnetize, }, ref) => {
|
|
25
23
|
const hasInitialIdx = initialActiveAreaIndex !== undefined;
|
|
26
|
-
const fullHeight = use100vh() ||
|
|
24
|
+
const fullHeight = use100vh() || 0;
|
|
25
|
+
// Хук use100vh рассчитывает высоту вьюпорта в useEffect, поэтому на первый рендер всегда возвращает null.
|
|
26
|
+
const isFirstRender = fullHeight === 0;
|
|
27
27
|
const magneticAreas = useMemo(() => {
|
|
28
28
|
if (magneticAreasProp) {
|
|
29
29
|
return magneticAreasProp.map((area) => convertPercentToNumber(area, fullHeight));
|
|
@@ -31,12 +31,10 @@ const BottomSheet = forwardRef(({ open, title, container, backgroundColor, title
|
|
|
31
31
|
return [0, fullHeight - HEADER_OFFSET];
|
|
32
32
|
}, [fullHeight, magneticAreasProp]);
|
|
33
33
|
const lastMagneticArea = magneticAreas[magneticAreas.length - 1];
|
|
34
|
-
const [sheetOffset, setSheetOffset] = useState(
|
|
35
|
-
? lastMagneticArea - magneticAreas[initialActiveAreaIndex]
|
|
36
|
-
: magneticAreas[0]);
|
|
34
|
+
const [sheetOffset, setSheetOffset] = useState(0);
|
|
37
35
|
const [backdropOpacity, setBackdropOpacity] = useState(1);
|
|
38
|
-
const [activeArea, setActiveArea] = useState(
|
|
39
|
-
const swipingInProgress = useRef(
|
|
36
|
+
const [activeArea, setActiveArea] = useState(0);
|
|
37
|
+
const swipingInProgress = useRef(null);
|
|
40
38
|
const headerRef = useRef(null);
|
|
41
39
|
const sheetHeight = useRef(0);
|
|
42
40
|
const sheetRef = useRef(null);
|
|
@@ -92,6 +90,7 @@ const BottomSheet = forwardRef(({ open, title, container, backgroundColor, title
|
|
|
92
90
|
}
|
|
93
91
|
};
|
|
94
92
|
const scrollToArea = (idx) => {
|
|
93
|
+
swipingInProgress.current = false;
|
|
95
94
|
const nextArea = magneticAreas[idx];
|
|
96
95
|
if (nextArea === 0) {
|
|
97
96
|
onClose();
|
|
@@ -228,10 +227,20 @@ const BottomSheet = forwardRef(({ open, title, container, backgroundColor, title
|
|
|
228
227
|
const handleEntered = (node, isAppearing) => {
|
|
229
228
|
setBackdropOpacity(1);
|
|
230
229
|
setSheetHeight();
|
|
230
|
+
// Ready for swiping
|
|
231
|
+
swipingInProgress.current = false;
|
|
231
232
|
if (transitionProps.onEntered) {
|
|
232
233
|
transitionProps.onEntered(node, isAppearing);
|
|
233
234
|
}
|
|
234
235
|
};
|
|
236
|
+
useEffect(() => {
|
|
237
|
+
// Инициализируем стейт только после того, как была рассчитана высота вьюпорта.
|
|
238
|
+
if (!isFirstRender) {
|
|
239
|
+
setSheetOffset(hasInitialIdx ? lastMagneticArea - magneticAreas[initialActiveAreaIndex] : 0);
|
|
240
|
+
setActiveArea(hasInitialIdx ? magneticAreas[initialActiveAreaIndex] : lastMagneticArea);
|
|
241
|
+
}
|
|
242
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
243
|
+
}, [isFirstRender]);
|
|
235
244
|
useEffect(() => {
|
|
236
245
|
onMagnetize?.(open ? getActiveAreaIndex(activeArea) : 0);
|
|
237
246
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -239,15 +248,13 @@ const BottomSheet = forwardRef(({ open, title, container, backgroundColor, title
|
|
|
239
248
|
useImperativeHandle(bottomSheetInstanceRef, () => ({
|
|
240
249
|
scrollToArea,
|
|
241
250
|
}));
|
|
242
|
-
const getSwipeStyles = () => ({
|
|
243
|
-
transform: sheetOffset ? `translateY(${sheetOffset}px)` : '',
|
|
244
|
-
});
|
|
251
|
+
const getSwipeStyles = () => sheetOffset ? { transform: `translateY(${sheetOffset}px)` } : {};
|
|
245
252
|
const getHeightStyles = () => ({
|
|
246
|
-
height: initialHeight === 'full' ? `${lastMagneticArea}px` : 'unset',
|
|
247
|
-
maxHeight: `${lastMagneticArea}px`,
|
|
253
|
+
height: !isFirstRender && initialHeight === 'full' ? `${lastMagneticArea}px` : 'unset',
|
|
254
|
+
maxHeight: isFirstRender ? 0 : `${lastMagneticArea}px`,
|
|
248
255
|
});
|
|
249
256
|
const bgClassName = backgroundColor && styles[`background-${backgroundColor}`];
|
|
250
|
-
return (React.createElement(BaseModal, { open: open, ref: ref, container: container, dataTestId: dataTestId, zIndex: zIndex, onClose: onClose, scrollHandler: scrollableContainer, Backdrop: SwipeableBackdrop, backdropProps: {
|
|
257
|
+
return (React.createElement(BaseModal, { open: open, ref: ref, container: container, dataTestId: dataTestId, zIndex: zIndex, onClose: onClose, usePortal: usePortal, scrollHandler: scrollableContainer, Backdrop: SwipeableBackdrop, backdropProps: {
|
|
251
258
|
...backdropProps,
|
|
252
259
|
className: styles.disabledPointerEvents,
|
|
253
260
|
opacity: backdropOpacity,
|
|
@@ -265,7 +272,7 @@ const BottomSheet = forwardRef(({ open, title, container, backgroundColor, title
|
|
|
265
272
|
} },
|
|
266
273
|
React.createElement("div", { style: { ...getHeightStyles() }, className: styles.wrapper, onTransitionEnd: setSheetHeight },
|
|
267
274
|
React.createElement("div", { className: cn(styles.component, bgClassName, className, {
|
|
268
|
-
[styles.withTransition]:
|
|
275
|
+
[styles.withTransition]: swipingInProgress.current === false,
|
|
269
276
|
}), style: {
|
|
270
277
|
...getSwipeStyles(),
|
|
271
278
|
...getHeightStyles(),
|
|
@@ -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/modern';
|
|
4
4
|
|
|
5
|
-
const styles = {"footer":"bottom-
|
|
5
|
+
const styles = {"footer":"bottom-sheet__footer_ykuo8","sticky":"bottom-sheet__sticky_ykuo8","highlighted":"bottom-sheet__highlighted_ykuo8","background-accent":"bottom-sheet__background-accent_ykuo8","background-info":"bottom-sheet__background-info_ykuo8","background-attention-muted":"bottom-sheet__background-attention-muted_ykuo8","background-positive-muted":"bottom-sheet__background-positive-muted_ykuo8","background-negative-muted":"bottom-sheet__background-negative-muted_ykuo8","background-primary":"bottom-sheet__background-primary_ykuo8","background-primary-inverted":"bottom-sheet__background-primary-inverted_ykuo8","background-secondary":"bottom-sheet__background-secondary_ykuo8","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_ykuo8","background-tertiary":"bottom-sheet__background-tertiary_ykuo8","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_ykuo8","background-quaternary":"bottom-sheet__background-quaternary_ykuo8","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_ykuo8","background-specialbg-component":"bottom-sheet__background-specialbg-component_ykuo8","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_ykuo8","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_ykuo8","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_ykuo8","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_ykuo8","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_ykuo8","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_ykuo8","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_ykuo8","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_ykuo8"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const Footer = ({ children, className, sticky }) => {
|