@alfalab/core-components-bottom-sheet 6.15.2 → 6.15.3
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 +5 -2
- 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 +4 -1
- package/esm/component.js +6 -3
- 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 +45 -45
- package/index.css +45 -45
- package/modern/component.js +6 -3
- 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 +45 -45
- package/package.json +3 -3
- package/src/component.tsx +7 -2
package/component.js
CHANGED
|
@@ -22,7 +22,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
22
22
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
23
23
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
24
24
|
|
|
25
|
-
var styles = {"modal":"bottom-
|
|
25
|
+
var styles = {"modal":"bottom-sheet__modal_fs0bn","wrapper":"bottom-sheet__wrapper_fs0bn","fullscreen":"bottom-sheet__fullscreen_fs0bn","component":"bottom-sheet__component_fs0bn","withTransition":"bottom-sheet__withTransition_fs0bn","scrollableContainer":"bottom-sheet__scrollableContainer_fs0bn","marker":"bottom-sheet__marker_fs0bn","defaultMarker":"bottom-sheet__defaultMarker_fs0bn","content":"bottom-sheet__content_fs0bn","noHeader":"bottom-sheet__noHeader_fs0bn","noFooter":"bottom-sheet__noFooter_fs0bn","scrollLocked":"bottom-sheet__scrollLocked_fs0bn","hiddenScrollbar":"bottom-sheet__hiddenScrollbar_fs0bn","disabledPointerEvents":"bottom-sheet__disabledPointerEvents_fs0bn","appear":"bottom-sheet__appear_fs0bn","enter":"bottom-sheet__enter_fs0bn","appearActive":"bottom-sheet__appearActive_fs0bn","enterActive":"bottom-sheet__enterActive_fs0bn","enterDone":"bottom-sheet__enterDone_fs0bn","appearDone":"bottom-sheet__appearDone_fs0bn","exit":"bottom-sheet__exit_fs0bn","exitActive":"bottom-sheet__exitActive_fs0bn","safeAreaBottom":"bottom-sheet__safeAreaBottom_fs0bn","background-accent":"bottom-sheet__background-accent_fs0bn","background-info":"bottom-sheet__background-info_fs0bn","background-attention-muted":"bottom-sheet__background-attention-muted_fs0bn","background-positive-muted":"bottom-sheet__background-positive-muted_fs0bn","background-negative-muted":"bottom-sheet__background-negative-muted_fs0bn","background-primary":"bottom-sheet__background-primary_fs0bn","background-primary-inverted":"bottom-sheet__background-primary-inverted_fs0bn","background-secondary":"bottom-sheet__background-secondary_fs0bn","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_fs0bn","background-tertiary":"bottom-sheet__background-tertiary_fs0bn","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_fs0bn","background-quaternary":"bottom-sheet__background-quaternary_fs0bn","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_fs0bn","background-specialbg-component":"bottom-sheet__background-specialbg-component_fs0bn","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_fs0bn","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_fs0bn","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_fs0bn","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_fs0bn","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_fs0bn","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_fs0bn","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_fs0bn","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_fs0bn"};
|
|
26
26
|
require('./index.css')
|
|
27
27
|
|
|
28
28
|
var isNil = coreComponentsShared.fnUtils.isNil;
|
|
@@ -40,7 +40,9 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
|
40
40
|
return utils.convertPercentToNumber(area, fullHeight, headerOffset);
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
|
-
var iOSViewHeight = (
|
|
43
|
+
var iOSViewHeight = coreComponentsShared.isClient()
|
|
44
|
+
? ((_a = document === null || document === void 0 ? void 0 : document.documentElement) === null || _a === void 0 ? void 0 : _a.clientHeight) || (window === null || window === void 0 ? void 0 : window.innerHeight)
|
|
45
|
+
: 0;
|
|
44
46
|
var viewHeight = coreComponentsShared.os.isIOS() ? iOSViewHeight : fullHeight;
|
|
45
47
|
return [0, viewHeight - headerOffset];
|
|
46
48
|
}, [fullHeight, headerOffset, magneticAreasProp]);
|
|
@@ -372,5 +374,6 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
|
372
374
|
_f)), "data-test-id": coreComponentsShared.getDataTestId(dataTestId, 'content') }, children),
|
|
373
375
|
actionButton && (React__default.default.createElement(components_footer_Component.Footer, { sticky: stickyFooter, className: cn__default.default(bgClassName, footerClassName), dataTestId: coreComponentsShared.getDataTestId(dataTestId, 'footer') }, actionButton)))))));
|
|
374
376
|
});
|
|
377
|
+
BottomSheet.displayName = 'BottomSheet';
|
|
375
378
|
|
|
376
379
|
exports.BottomSheet = BottomSheet;
|
|
@@ -11,7 +11,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
12
12
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
13
13
|
|
|
14
|
-
var styles = {"footer":"bottom-
|
|
14
|
+
var styles = {"footer":"bottom-sheet__footer_olkl1","sticky":"bottom-sheet__sticky_olkl1","highlighted":"bottom-sheet__highlighted_olkl1","background-accent":"bottom-sheet__background-accent_olkl1","background-info":"bottom-sheet__background-info_olkl1","background-attention-muted":"bottom-sheet__background-attention-muted_olkl1","background-positive-muted":"bottom-sheet__background-positive-muted_olkl1","background-negative-muted":"bottom-sheet__background-negative-muted_olkl1","background-primary":"bottom-sheet__background-primary_olkl1","background-primary-inverted":"bottom-sheet__background-primary-inverted_olkl1","background-secondary":"bottom-sheet__background-secondary_olkl1","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_olkl1","background-tertiary":"bottom-sheet__background-tertiary_olkl1","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_olkl1","background-quaternary":"bottom-sheet__background-quaternary_olkl1","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_olkl1","background-specialbg-component":"bottom-sheet__background-specialbg-component_olkl1","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_olkl1","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_olkl1","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_olkl1","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_olkl1","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_olkl1","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_olkl1","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_olkl1","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_olkl1"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
var Footer = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: dmoqy */
|
|
2
2
|
:root { /* 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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-accent: #ef3124;
|
|
@@ -46,58 +46,58 @@
|
|
|
46
46
|
/* footer */
|
|
47
47
|
--bottom-sheet-footer-border-top: 1px solid var(--color-light-neutral-300);
|
|
48
48
|
--bottom-sheet-footer-background-color: var(--color-light-modal-bg-primary);
|
|
49
|
-
} .bottom-
|
|
49
|
+
} .bottom-sheet__footer_olkl1 {
|
|
50
50
|
padding: var(--gap-m) var(--gap-m);
|
|
51
51
|
background-color: var(--color-light-modal-bg-primary);
|
|
52
|
-
} .bottom-
|
|
52
|
+
} .bottom-sheet__sticky_olkl1 {
|
|
53
53
|
position: sticky;
|
|
54
54
|
bottom: 0;
|
|
55
55
|
z-index: 1;
|
|
56
|
-
} .bottom-
|
|
56
|
+
} .bottom-sheet__highlighted_olkl1 {
|
|
57
57
|
border-top: var(--bottom-sheet-footer-border-top);
|
|
58
58
|
background-color: var(--bottom-sheet-footer-background-color);
|
|
59
|
-
} .bottom-sheet__background-
|
|
59
|
+
} .bottom-sheet__background-accent_olkl1 {
|
|
60
60
|
background-color: var(--color-light-bg-accent);
|
|
61
|
-
} .bottom-sheet__background-
|
|
61
|
+
} .bottom-sheet__background-info_olkl1 {
|
|
62
62
|
background-color: var(--color-light-bg-info);
|
|
63
|
-
} .bottom-sheet__background-attention-
|
|
63
|
+
} .bottom-sheet__background-attention-muted_olkl1 {
|
|
64
64
|
background-color: var(--color-light-bg-attention-muted);
|
|
65
|
-
} .bottom-sheet__background-positive-
|
|
65
|
+
} .bottom-sheet__background-positive-muted_olkl1 {
|
|
66
66
|
background-color: var(--color-light-bg-positive-muted);
|
|
67
|
-
} .bottom-sheet__background-negative-
|
|
67
|
+
} .bottom-sheet__background-negative-muted_olkl1 {
|
|
68
68
|
background-color: var(--color-light-bg-negative-muted);
|
|
69
|
-
} .bottom-sheet__background-
|
|
69
|
+
} .bottom-sheet__background-primary_olkl1 {
|
|
70
70
|
background-color: var(--color-light-bg-primary);
|
|
71
|
-
} .bottom-sheet__background-primary-
|
|
71
|
+
} .bottom-sheet__background-primary-inverted_olkl1 {
|
|
72
72
|
background-color: var(--color-light-bg-primary-inverted);
|
|
73
|
-
} .bottom-sheet__background-
|
|
73
|
+
} .bottom-sheet__background-secondary_olkl1 {
|
|
74
74
|
background-color: var(--color-light-bg-secondary);
|
|
75
|
-
} .bottom-sheet__background-secondary-
|
|
75
|
+
} .bottom-sheet__background-secondary-inverted_olkl1 {
|
|
76
76
|
background-color: var(--color-light-bg-secondary-inverted);
|
|
77
|
-
} .bottom-sheet__background-
|
|
77
|
+
} .bottom-sheet__background-tertiary_olkl1 {
|
|
78
78
|
background-color: var(--color-light-bg-tertiary);
|
|
79
|
-
} .bottom-sheet__background-tertiary-
|
|
79
|
+
} .bottom-sheet__background-tertiary-inverted_olkl1 {
|
|
80
80
|
background-color: var(--color-light-bg-tertiary-inverted);
|
|
81
|
-
} .bottom-sheet__background-
|
|
81
|
+
} .bottom-sheet__background-quaternary_olkl1 {
|
|
82
82
|
background-color: var(--color-light-bg-quaternary);
|
|
83
|
-
} .bottom-sheet__background-quaternary-
|
|
83
|
+
} .bottom-sheet__background-quaternary-inverted_olkl1 {
|
|
84
84
|
background-color: var(--color-light-bg-quaternary-inverted);
|
|
85
|
-
} .bottom-sheet__background-specialbg-
|
|
85
|
+
} .bottom-sheet__background-specialbg-component_olkl1 {
|
|
86
86
|
background-color: var(--color-light-specialbg-component);
|
|
87
|
-
} .bottom-sheet__background-specialbg-component-
|
|
87
|
+
} .bottom-sheet__background-specialbg-component-inverted_olkl1 {
|
|
88
88
|
background-color: var(--color-light-specialbg-component-inverted);
|
|
89
|
-
} .bottom-sheet__background-specialbg-primary-
|
|
89
|
+
} .bottom-sheet__background-specialbg-primary-grouped_olkl1 {
|
|
90
90
|
background-color: var(--color-light-specialbg-primary-grouped);
|
|
91
|
-
} .bottom-sheet__background-specialbg-secondary-
|
|
91
|
+
} .bottom-sheet__background-specialbg-secondary-grouped_olkl1 {
|
|
92
92
|
background-color: var(--color-light-specialbg-secondary-grouped);
|
|
93
|
-
} .bottom-sheet__background-specialbg-tertiary-
|
|
93
|
+
} .bottom-sheet__background-specialbg-tertiary-grouped_olkl1 {
|
|
94
94
|
background-color: var(--color-light-specialbg-tertiary-grouped);
|
|
95
|
-
} .bottom-sheet__background-specialbg-secondary-
|
|
95
|
+
} .bottom-sheet__background-specialbg-secondary-transparent_olkl1 {
|
|
96
96
|
background-color: var(--color-light-specialbg-secondary-transparent);
|
|
97
|
-
} .bottom-sheet__background-specialbg-secondary-transparent-
|
|
97
|
+
} .bottom-sheet__background-specialbg-secondary-transparent-inverted_olkl1 {
|
|
98
98
|
background-color: var(--color-light-specialbg-secondary-transparent-inverted);
|
|
99
|
-
} .bottom-sheet__background-specialbg-tertiary-
|
|
99
|
+
} .bottom-sheet__background-specialbg-tertiary-transparent_olkl1 {
|
|
100
100
|
background-color: var(--color-light-specialbg-tertiary-transparent);
|
|
101
|
-
} .bottom-sheet__background-specialbg-tertiary-transparent-
|
|
101
|
+
} .bottom-sheet__background-specialbg-tertiary-transparent-inverted_olkl1 {
|
|
102
102
|
background-color: var(--color-light-specialbg-tertiary-transparent-inverted);
|
|
103
103
|
}
|
|
@@ -13,7 +13,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
14
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
15
15
|
|
|
16
|
-
var styles = {"headerWrapper":"bottom-
|
|
16
|
+
var styles = {"headerWrapper":"bottom-sheet__headerWrapper_kll8d","hasContent":"bottom-sheet__hasContent_kll8d","header":"bottom-sheet__header_kll8d","sticky":"bottom-sheet__sticky_kll8d","highlighted":"bottom-sheet__highlighted_kll8d","justifyEnd":"bottom-sheet__justifyEnd_kll8d","addon":"bottom-sheet__addon_kll8d","addonFixed":"bottom-sheet__addonFixed_kll8d","title":"bottom-sheet__title_kll8d","titleCenter":"bottom-sheet__titleCenter_kll8d","titleLeft":"bottom-sheet__titleLeft_kll8d","trimTitle":"bottom-sheet__trimTitle_kll8d"};
|
|
17
17
|
require('./index.css')
|
|
18
18
|
|
|
19
19
|
var Header = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 9cs46 */
|
|
2
2
|
:root { /* 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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-300: #e7e8eb; /* 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 */
|
|
@@ -30,42 +30,42 @@
|
|
|
30
30
|
--bottom-sheet-title-font-family: var(--font-family-system);
|
|
31
31
|
|
|
32
32
|
/* footer */
|
|
33
|
-
} .bottom-
|
|
33
|
+
} .bottom-sheet__headerWrapper_kll8d {
|
|
34
34
|
padding: var(--gap-s) var(--gap-xs) var(--gap-2xs);
|
|
35
35
|
border-top-left-radius: inherit;
|
|
36
36
|
border-top-right-radius: inherit;
|
|
37
37
|
z-index: 1;
|
|
38
|
-
} .bottom-
|
|
38
|
+
} .bottom-sheet__hasContent_kll8d {
|
|
39
39
|
background-color: inherit;
|
|
40
|
-
} .bottom-
|
|
40
|
+
} .bottom-sheet__header_kll8d {
|
|
41
41
|
display: flex;
|
|
42
|
-
} .bottom-
|
|
42
|
+
} .bottom-sheet__sticky_kll8d {
|
|
43
43
|
position: sticky;
|
|
44
44
|
top: 0;
|
|
45
|
-
} .bottom-
|
|
45
|
+
} .bottom-sheet__highlighted_kll8d {
|
|
46
46
|
border-bottom: var(--bottom-sheet-header-border-bottom);
|
|
47
|
-
} .bottom-
|
|
47
|
+
} .bottom-sheet__justifyEnd_kll8d {
|
|
48
48
|
justify-content: flex-end;
|
|
49
|
-
} .bottom-
|
|
49
|
+
} .bottom-sheet__addon_kll8d {
|
|
50
50
|
display: flex;
|
|
51
51
|
justify-content: center;
|
|
52
52
|
align-items: center;
|
|
53
53
|
min-width: 48px;
|
|
54
54
|
height: 48px;
|
|
55
|
-
} .bottom-
|
|
55
|
+
} .bottom-sheet__addonFixed_kll8d {
|
|
56
56
|
position: fixed;
|
|
57
|
-
} .bottom-
|
|
57
|
+
} .bottom-sheet__title_kll8d {
|
|
58
58
|
padding: var(--gap-s) var(--gap-xs);
|
|
59
59
|
width: 100%;
|
|
60
60
|
font-size: var(--bottom-sheet-title-font-size);
|
|
61
61
|
font-weight: var(--bottom-sheet-title-font-weight);
|
|
62
62
|
line-height: var(--bottom-sheet-title-line-height);
|
|
63
63
|
font-family: var(--bottom-sheet-title-font-family);
|
|
64
|
-
} .bottom-
|
|
64
|
+
} .bottom-sheet__titleCenter_kll8d {
|
|
65
65
|
text-align: center;
|
|
66
|
-
} .bottom-
|
|
66
|
+
} .bottom-sheet__titleLeft_kll8d {
|
|
67
67
|
text-align: left;
|
|
68
|
-
} .bottom-
|
|
68
|
+
} .bottom-sheet__trimTitle_kll8d {
|
|
69
69
|
white-space: nowrap;
|
|
70
70
|
overflow: hidden;
|
|
71
71
|
text-overflow: ellipsis;
|
package/cssm/component.js
CHANGED
|
@@ -39,7 +39,9 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
|
39
39
|
return utils.convertPercentToNumber(area, fullHeight, headerOffset);
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
var iOSViewHeight = (
|
|
42
|
+
var iOSViewHeight = coreComponentsShared.isClient()
|
|
43
|
+
? ((_a = document === null || document === void 0 ? void 0 : document.documentElement) === null || _a === void 0 ? void 0 : _a.clientHeight) || (window === null || window === void 0 ? void 0 : window.innerHeight)
|
|
44
|
+
: 0;
|
|
43
45
|
var viewHeight = coreComponentsShared.os.isIOS() ? iOSViewHeight : fullHeight;
|
|
44
46
|
return [0, viewHeight - headerOffset];
|
|
45
47
|
}, [fullHeight, headerOffset, magneticAreasProp]);
|
|
@@ -371,5 +373,6 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
|
371
373
|
_f)), "data-test-id": coreComponentsShared.getDataTestId(dataTestId, 'content') }, children),
|
|
372
374
|
actionButton && (React__default.default.createElement(components_footer_Component.Footer, { sticky: stickyFooter, className: cn__default.default(bgClassName, footerClassName), dataTestId: coreComponentsShared.getDataTestId(dataTestId, 'footer') }, actionButton)))))));
|
|
373
375
|
});
|
|
376
|
+
BottomSheet.displayName = 'BottomSheet';
|
|
374
377
|
|
|
375
378
|
exports.BottomSheet = BottomSheet;
|
package/esm/component.js
CHANGED
|
@@ -5,14 +5,14 @@ import mergeRefs from 'react-merge-refs';
|
|
|
5
5
|
import { useSwipeable } from 'react-swipeable';
|
|
6
6
|
import cn from 'classnames';
|
|
7
7
|
import { BaseModal } from '@alfalab/core-components-base-modal/esm';
|
|
8
|
-
import { fnUtils, os, getDataTestId } from '@alfalab/core-components-shared/esm';
|
|
8
|
+
import { fnUtils, isClient, os, getDataTestId } from '@alfalab/core-components-shared/esm';
|
|
9
9
|
import { Footer } from './components/footer/Component.js';
|
|
10
10
|
import { Header } from './components/header/Component.js';
|
|
11
11
|
import { SwipeableBackdrop } from './components/swipeable-backdrop/Component.js';
|
|
12
12
|
import { horizontalDirections } from './consts/swipeConsts.js';
|
|
13
13
|
import { convertPercentToNumber, TIMEOUT, MARKER_HEIGHT, SCROLL_OFFSET, SWIPE_VELOCITY, CLOSE_OFFSET } from './utils.js';
|
|
14
14
|
|
|
15
|
-
var styles = {"modal":"bottom-
|
|
15
|
+
var styles = {"modal":"bottom-sheet__modal_fs0bn","wrapper":"bottom-sheet__wrapper_fs0bn","fullscreen":"bottom-sheet__fullscreen_fs0bn","component":"bottom-sheet__component_fs0bn","withTransition":"bottom-sheet__withTransition_fs0bn","scrollableContainer":"bottom-sheet__scrollableContainer_fs0bn","marker":"bottom-sheet__marker_fs0bn","defaultMarker":"bottom-sheet__defaultMarker_fs0bn","content":"bottom-sheet__content_fs0bn","noHeader":"bottom-sheet__noHeader_fs0bn","noFooter":"bottom-sheet__noFooter_fs0bn","scrollLocked":"bottom-sheet__scrollLocked_fs0bn","hiddenScrollbar":"bottom-sheet__hiddenScrollbar_fs0bn","disabledPointerEvents":"bottom-sheet__disabledPointerEvents_fs0bn","appear":"bottom-sheet__appear_fs0bn","enter":"bottom-sheet__enter_fs0bn","appearActive":"bottom-sheet__appearActive_fs0bn","enterActive":"bottom-sheet__enterActive_fs0bn","enterDone":"bottom-sheet__enterDone_fs0bn","appearDone":"bottom-sheet__appearDone_fs0bn","exit":"bottom-sheet__exit_fs0bn","exitActive":"bottom-sheet__exitActive_fs0bn","safeAreaBottom":"bottom-sheet__safeAreaBottom_fs0bn","background-accent":"bottom-sheet__background-accent_fs0bn","background-info":"bottom-sheet__background-info_fs0bn","background-attention-muted":"bottom-sheet__background-attention-muted_fs0bn","background-positive-muted":"bottom-sheet__background-positive-muted_fs0bn","background-negative-muted":"bottom-sheet__background-negative-muted_fs0bn","background-primary":"bottom-sheet__background-primary_fs0bn","background-primary-inverted":"bottom-sheet__background-primary-inverted_fs0bn","background-secondary":"bottom-sheet__background-secondary_fs0bn","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_fs0bn","background-tertiary":"bottom-sheet__background-tertiary_fs0bn","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_fs0bn","background-quaternary":"bottom-sheet__background-quaternary_fs0bn","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_fs0bn","background-specialbg-component":"bottom-sheet__background-specialbg-component_fs0bn","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_fs0bn","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_fs0bn","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_fs0bn","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_fs0bn","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_fs0bn","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_fs0bn","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_fs0bn","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_fs0bn"};
|
|
16
16
|
require('./index.css')
|
|
17
17
|
|
|
18
18
|
var isNil = fnUtils.isNil;
|
|
@@ -30,7 +30,9 @@ var BottomSheet = forwardRef(function (_a, ref) {
|
|
|
30
30
|
return convertPercentToNumber(area, fullHeight, headerOffset);
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
var iOSViewHeight = (
|
|
33
|
+
var iOSViewHeight = isClient()
|
|
34
|
+
? ((_a = document === null || document === void 0 ? void 0 : document.documentElement) === null || _a === void 0 ? void 0 : _a.clientHeight) || (window === null || window === void 0 ? void 0 : window.innerHeight)
|
|
35
|
+
: 0;
|
|
34
36
|
var viewHeight = os.isIOS() ? iOSViewHeight : fullHeight;
|
|
35
37
|
return [0, viewHeight - headerOffset];
|
|
36
38
|
}, [fullHeight, headerOffset, magneticAreasProp]);
|
|
@@ -362,5 +364,6 @@ var BottomSheet = forwardRef(function (_a, ref) {
|
|
|
362
364
|
_f)), "data-test-id": getDataTestId(dataTestId, 'content') }, children),
|
|
363
365
|
actionButton && (React.createElement(Footer, { sticky: stickyFooter, className: cn(bgClassName, footerClassName), dataTestId: getDataTestId(dataTestId, 'footer') }, actionButton)))))));
|
|
364
366
|
});
|
|
367
|
+
BottomSheet.displayName = 'BottomSheet';
|
|
365
368
|
|
|
366
369
|
export { BottomSheet };
|
|
@@ -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_olkl1","sticky":"bottom-sheet__sticky_olkl1","highlighted":"bottom-sheet__highlighted_olkl1","background-accent":"bottom-sheet__background-accent_olkl1","background-info":"bottom-sheet__background-info_olkl1","background-attention-muted":"bottom-sheet__background-attention-muted_olkl1","background-positive-muted":"bottom-sheet__background-positive-muted_olkl1","background-negative-muted":"bottom-sheet__background-negative-muted_olkl1","background-primary":"bottom-sheet__background-primary_olkl1","background-primary-inverted":"bottom-sheet__background-primary-inverted_olkl1","background-secondary":"bottom-sheet__background-secondary_olkl1","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_olkl1","background-tertiary":"bottom-sheet__background-tertiary_olkl1","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_olkl1","background-quaternary":"bottom-sheet__background-quaternary_olkl1","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_olkl1","background-specialbg-component":"bottom-sheet__background-specialbg-component_olkl1","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_olkl1","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_olkl1","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_olkl1","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_olkl1","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_olkl1","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_olkl1","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_olkl1","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_olkl1"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
var Footer = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: dmoqy */
|
|
2
2
|
:root { /* 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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-accent: #ef3124;
|
|
@@ -46,58 +46,58 @@
|
|
|
46
46
|
/* footer */
|
|
47
47
|
--bottom-sheet-footer-border-top: 1px solid var(--color-light-neutral-300);
|
|
48
48
|
--bottom-sheet-footer-background-color: var(--color-light-modal-bg-primary);
|
|
49
|
-
} .bottom-
|
|
49
|
+
} .bottom-sheet__footer_olkl1 {
|
|
50
50
|
padding: var(--gap-m) var(--gap-m);
|
|
51
51
|
background-color: var(--color-light-modal-bg-primary);
|
|
52
|
-
} .bottom-
|
|
52
|
+
} .bottom-sheet__sticky_olkl1 {
|
|
53
53
|
position: sticky;
|
|
54
54
|
bottom: 0;
|
|
55
55
|
z-index: 1;
|
|
56
|
-
} .bottom-
|
|
56
|
+
} .bottom-sheet__highlighted_olkl1 {
|
|
57
57
|
border-top: var(--bottom-sheet-footer-border-top);
|
|
58
58
|
background-color: var(--bottom-sheet-footer-background-color);
|
|
59
|
-
} .bottom-sheet__background-
|
|
59
|
+
} .bottom-sheet__background-accent_olkl1 {
|
|
60
60
|
background-color: var(--color-light-bg-accent);
|
|
61
|
-
} .bottom-sheet__background-
|
|
61
|
+
} .bottom-sheet__background-info_olkl1 {
|
|
62
62
|
background-color: var(--color-light-bg-info);
|
|
63
|
-
} .bottom-sheet__background-attention-
|
|
63
|
+
} .bottom-sheet__background-attention-muted_olkl1 {
|
|
64
64
|
background-color: var(--color-light-bg-attention-muted);
|
|
65
|
-
} .bottom-sheet__background-positive-
|
|
65
|
+
} .bottom-sheet__background-positive-muted_olkl1 {
|
|
66
66
|
background-color: var(--color-light-bg-positive-muted);
|
|
67
|
-
} .bottom-sheet__background-negative-
|
|
67
|
+
} .bottom-sheet__background-negative-muted_olkl1 {
|
|
68
68
|
background-color: var(--color-light-bg-negative-muted);
|
|
69
|
-
} .bottom-sheet__background-
|
|
69
|
+
} .bottom-sheet__background-primary_olkl1 {
|
|
70
70
|
background-color: var(--color-light-bg-primary);
|
|
71
|
-
} .bottom-sheet__background-primary-
|
|
71
|
+
} .bottom-sheet__background-primary-inverted_olkl1 {
|
|
72
72
|
background-color: var(--color-light-bg-primary-inverted);
|
|
73
|
-
} .bottom-sheet__background-
|
|
73
|
+
} .bottom-sheet__background-secondary_olkl1 {
|
|
74
74
|
background-color: var(--color-light-bg-secondary);
|
|
75
|
-
} .bottom-sheet__background-secondary-
|
|
75
|
+
} .bottom-sheet__background-secondary-inverted_olkl1 {
|
|
76
76
|
background-color: var(--color-light-bg-secondary-inverted);
|
|
77
|
-
} .bottom-sheet__background-
|
|
77
|
+
} .bottom-sheet__background-tertiary_olkl1 {
|
|
78
78
|
background-color: var(--color-light-bg-tertiary);
|
|
79
|
-
} .bottom-sheet__background-tertiary-
|
|
79
|
+
} .bottom-sheet__background-tertiary-inverted_olkl1 {
|
|
80
80
|
background-color: var(--color-light-bg-tertiary-inverted);
|
|
81
|
-
} .bottom-sheet__background-
|
|
81
|
+
} .bottom-sheet__background-quaternary_olkl1 {
|
|
82
82
|
background-color: var(--color-light-bg-quaternary);
|
|
83
|
-
} .bottom-sheet__background-quaternary-
|
|
83
|
+
} .bottom-sheet__background-quaternary-inverted_olkl1 {
|
|
84
84
|
background-color: var(--color-light-bg-quaternary-inverted);
|
|
85
|
-
} .bottom-sheet__background-specialbg-
|
|
85
|
+
} .bottom-sheet__background-specialbg-component_olkl1 {
|
|
86
86
|
background-color: var(--color-light-specialbg-component);
|
|
87
|
-
} .bottom-sheet__background-specialbg-component-
|
|
87
|
+
} .bottom-sheet__background-specialbg-component-inverted_olkl1 {
|
|
88
88
|
background-color: var(--color-light-specialbg-component-inverted);
|
|
89
|
-
} .bottom-sheet__background-specialbg-primary-
|
|
89
|
+
} .bottom-sheet__background-specialbg-primary-grouped_olkl1 {
|
|
90
90
|
background-color: var(--color-light-specialbg-primary-grouped);
|
|
91
|
-
} .bottom-sheet__background-specialbg-secondary-
|
|
91
|
+
} .bottom-sheet__background-specialbg-secondary-grouped_olkl1 {
|
|
92
92
|
background-color: var(--color-light-specialbg-secondary-grouped);
|
|
93
|
-
} .bottom-sheet__background-specialbg-tertiary-
|
|
93
|
+
} .bottom-sheet__background-specialbg-tertiary-grouped_olkl1 {
|
|
94
94
|
background-color: var(--color-light-specialbg-tertiary-grouped);
|
|
95
|
-
} .bottom-sheet__background-specialbg-secondary-
|
|
95
|
+
} .bottom-sheet__background-specialbg-secondary-transparent_olkl1 {
|
|
96
96
|
background-color: var(--color-light-specialbg-secondary-transparent);
|
|
97
|
-
} .bottom-sheet__background-specialbg-secondary-transparent-
|
|
97
|
+
} .bottom-sheet__background-specialbg-secondary-transparent-inverted_olkl1 {
|
|
98
98
|
background-color: var(--color-light-specialbg-secondary-transparent-inverted);
|
|
99
|
-
} .bottom-sheet__background-specialbg-tertiary-
|
|
99
|
+
} .bottom-sheet__background-specialbg-tertiary-transparent_olkl1 {
|
|
100
100
|
background-color: var(--color-light-specialbg-tertiary-transparent);
|
|
101
|
-
} .bottom-sheet__background-specialbg-tertiary-transparent-
|
|
101
|
+
} .bottom-sheet__background-specialbg-tertiary-transparent-inverted_olkl1 {
|
|
102
102
|
background-color: var(--color-light-specialbg-tertiary-transparent-inverted);
|
|
103
103
|
}
|
|
@@ -4,7 +4,7 @@ import cn from 'classnames';
|
|
|
4
4
|
import { BaseModalContext } from '@alfalab/core-components-base-modal/esm';
|
|
5
5
|
import { NavigationBarPrivate } from '@alfalab/core-components-navigation-bar-private/esm';
|
|
6
6
|
|
|
7
|
-
var styles = {"headerWrapper":"bottom-
|
|
7
|
+
var styles = {"headerWrapper":"bottom-sheet__headerWrapper_kll8d","hasContent":"bottom-sheet__hasContent_kll8d","header":"bottom-sheet__header_kll8d","sticky":"bottom-sheet__sticky_kll8d","highlighted":"bottom-sheet__highlighted_kll8d","justifyEnd":"bottom-sheet__justifyEnd_kll8d","addon":"bottom-sheet__addon_kll8d","addonFixed":"bottom-sheet__addonFixed_kll8d","title":"bottom-sheet__title_kll8d","titleCenter":"bottom-sheet__titleCenter_kll8d","titleLeft":"bottom-sheet__titleLeft_kll8d","trimTitle":"bottom-sheet__trimTitle_kll8d"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
var Header = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 9cs46 */
|
|
2
2
|
:root { /* 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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-300: #e7e8eb; /* 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 */
|
|
@@ -30,42 +30,42 @@
|
|
|
30
30
|
--bottom-sheet-title-font-family: var(--font-family-system);
|
|
31
31
|
|
|
32
32
|
/* footer */
|
|
33
|
-
} .bottom-
|
|
33
|
+
} .bottom-sheet__headerWrapper_kll8d {
|
|
34
34
|
padding: var(--gap-s) var(--gap-xs) var(--gap-2xs);
|
|
35
35
|
border-top-left-radius: inherit;
|
|
36
36
|
border-top-right-radius: inherit;
|
|
37
37
|
z-index: 1;
|
|
38
|
-
} .bottom-
|
|
38
|
+
} .bottom-sheet__hasContent_kll8d {
|
|
39
39
|
background-color: inherit;
|
|
40
|
-
} .bottom-
|
|
40
|
+
} .bottom-sheet__header_kll8d {
|
|
41
41
|
display: flex;
|
|
42
|
-
} .bottom-
|
|
42
|
+
} .bottom-sheet__sticky_kll8d {
|
|
43
43
|
position: sticky;
|
|
44
44
|
top: 0;
|
|
45
|
-
} .bottom-
|
|
45
|
+
} .bottom-sheet__highlighted_kll8d {
|
|
46
46
|
border-bottom: var(--bottom-sheet-header-border-bottom);
|
|
47
|
-
} .bottom-
|
|
47
|
+
} .bottom-sheet__justifyEnd_kll8d {
|
|
48
48
|
justify-content: flex-end;
|
|
49
|
-
} .bottom-
|
|
49
|
+
} .bottom-sheet__addon_kll8d {
|
|
50
50
|
display: flex;
|
|
51
51
|
justify-content: center;
|
|
52
52
|
align-items: center;
|
|
53
53
|
min-width: 48px;
|
|
54
54
|
height: 48px;
|
|
55
|
-
} .bottom-
|
|
55
|
+
} .bottom-sheet__addonFixed_kll8d {
|
|
56
56
|
position: fixed;
|
|
57
|
-
} .bottom-
|
|
57
|
+
} .bottom-sheet__title_kll8d {
|
|
58
58
|
padding: var(--gap-s) var(--gap-xs);
|
|
59
59
|
width: 100%;
|
|
60
60
|
font-size: var(--bottom-sheet-title-font-size);
|
|
61
61
|
font-weight: var(--bottom-sheet-title-font-weight);
|
|
62
62
|
line-height: var(--bottom-sheet-title-line-height);
|
|
63
63
|
font-family: var(--bottom-sheet-title-font-family);
|
|
64
|
-
} .bottom-
|
|
64
|
+
} .bottom-sheet__titleCenter_kll8d {
|
|
65
65
|
text-align: center;
|
|
66
|
-
} .bottom-
|
|
66
|
+
} .bottom-sheet__titleLeft_kll8d {
|
|
67
67
|
text-align: left;
|
|
68
|
-
} .bottom-
|
|
68
|
+
} .bottom-sheet__trimTitle_kll8d {
|
|
69
69
|
white-space: nowrap;
|
|
70
70
|
overflow: hidden;
|
|
71
71
|
text-overflow: ellipsis;
|