@alfalab/core-components-bottom-sheet 6.19.1 → 6.20.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.js +3 -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 +15 -15
- package/cssm/component.js +2 -1
- package/cssm/types.d.ts +6 -0
- package/esm/component.js +3 -2
- 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 +15 -15
- package/esm/index.css +45 -45
- package/esm/types.d.ts +6 -0
- package/index.css +45 -45
- package/modern/component.js +3 -2
- 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 +15 -15
- package/modern/index.css +45 -45
- package/modern/types.d.ts +6 -0
- package/moderncssm/component.js +2 -1
- package/moderncssm/types.d.ts +6 -0
- package/package.json +2 -2
- package/src/component.tsx +2 -0
- package/src/types.ts +7 -0
- package/types.d.ts +6 -0
package/component.js
CHANGED
|
@@ -23,7 +23,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
23
23
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
24
24
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
25
25
|
|
|
26
|
-
var styles = {"modal":"bottom-
|
|
26
|
+
var styles = {"modal":"bottom-sheet__modal_u7i0l","wrapper":"bottom-sheet__wrapper_u7i0l","fullscreen":"bottom-sheet__fullscreen_u7i0l","component":"bottom-sheet__component_u7i0l","withTransition":"bottom-sheet__withTransition_u7i0l","scrollableContainer":"bottom-sheet__scrollableContainer_u7i0l","marker":"bottom-sheet__marker_u7i0l","defaultMarker":"bottom-sheet__defaultMarker_u7i0l","content":"bottom-sheet__content_u7i0l","noHeader":"bottom-sheet__noHeader_u7i0l","noFooter":"bottom-sheet__noFooter_u7i0l","scrollLocked":"bottom-sheet__scrollLocked_u7i0l","hiddenScrollbar":"bottom-sheet__hiddenScrollbar_u7i0l","disabledPointerEvents":"bottom-sheet__disabledPointerEvents_u7i0l","appear":"bottom-sheet__appear_u7i0l","enter":"bottom-sheet__enter_u7i0l","appearActive":"bottom-sheet__appearActive_u7i0l","enterActive":"bottom-sheet__enterActive_u7i0l","enterDone":"bottom-sheet__enterDone_u7i0l","appearDone":"bottom-sheet__appearDone_u7i0l","exit":"bottom-sheet__exit_u7i0l","exitActive":"bottom-sheet__exitActive_u7i0l","safeAreaBottom":"bottom-sheet__safeAreaBottom_u7i0l","background-accent":"bottom-sheet__background-accent_u7i0l","background-info":"bottom-sheet__background-info_u7i0l","background-attention-muted":"bottom-sheet__background-attention-muted_u7i0l","background-positive-muted":"bottom-sheet__background-positive-muted_u7i0l","background-negative-muted":"bottom-sheet__background-negative-muted_u7i0l","background-primary":"bottom-sheet__background-primary_u7i0l","background-primary-inverted":"bottom-sheet__background-primary-inverted_u7i0l","background-secondary":"bottom-sheet__background-secondary_u7i0l","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_u7i0l","background-tertiary":"bottom-sheet__background-tertiary_u7i0l","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_u7i0l","background-quaternary":"bottom-sheet__background-quaternary_u7i0l","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_u7i0l","background-specialbg-component":"bottom-sheet__background-specialbg-component_u7i0l","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_u7i0l","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_u7i0l","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_u7i0l","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_u7i0l","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_u7i0l","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_u7i0l","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_u7i0l","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_u7i0l"};
|
|
27
27
|
require('./index.css')
|
|
28
28
|
|
|
29
29
|
var isNil = coreComponentsShared.fnUtils.isNil;
|
|
@@ -33,7 +33,7 @@ var BottomSheet = React.forwardRef(
|
|
|
33
33
|
function (_a, ref) {
|
|
34
34
|
var _b, _c, _d, _e, _f;
|
|
35
35
|
var _g, _h;
|
|
36
|
-
var open = _a.open, title = _a.title, container = _a.container, usePortal = _a.usePortal, backgroundColor = _a.backgroundColor, _j = _a.titleSize, titleSize = _j === void 0 ? 'default' : _j, subtitle = _a.subtitle, 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, _k = _a.titleAlign, titleAlign = _k === void 0 ? 'left' : _k, trimTitle = _a.trimTitle, stickyHeader = _a.stickyHeader, _l = _a.stickyFooter, stickyFooter = _l === void 0 ? true : _l, _m = _a.initialHeight, initialHeight = _m === void 0 ? 'default' : _m, hideOverlay = _a.hideOverlay, hideScrollbar = _a.hideScrollbar, hideHeader = _a.hideHeader, disableOverlayClick = _a.disableOverlayClick, disableBlockingScroll = _a.disableBlockingScroll, disableFocusLock = _a.disableFocusLock, children = _a.children, zIndex = _a.zIndex, _o = _a.transitionProps, transitionProps = _o === void 0 ? {} : _o, magneticAreasProp = _a.magneticAreas, initialActiveAreaIndex = _a.initialActiveAreaIndex, dataTestId = _a.dataTestId, _p = _a.swipeable, swipeable = _p === void 0 ? true : _p, _q = _a.swipeableContent, swipeableContent = _q === void 0 ? true : _q, _r = _a.swipeThreshold, swipeThreshold = _r === void 0 ? 5 : _r, scrollLockedProp = _a.scrollLocked, backdropProps = _a.backdropProps, _s = _a.scrollableContainerRef, scrollableContainerRef = _s === void 0 ? function () { return null; } : _s, bottomSheetInstanceRef = _a.bottomSheetInstanceRef, _t = _a.sheetContainerRef, sheetContainerRef = _t === void 0 ? function () { return null; } : _t, _u = _a.headerOffset, headerOffset = _u === void 0 ? 24 : _u, _v = _a.adjustContainerHeight, adjustContainerHeight = _v === void 0 ? adjustContainerHeightDefault : _v, onClose = _a.onClose, onBack = _a.onBack, onMagnetize = _a.onMagnetize, onSwipeStart = _a.onSwipeStart, onSwipeEnd = _a.onSwipeEnd, disableRestoreFocus = _a.disableRestoreFocus, disableAutoFocus = _a.disableAutoFocus, disableEscapeKeyDown = _a.disableEscapeKeyDown, keepMounted = _a.keepMounted, onMagnetizeEnd = _a.onMagnetizeEnd, onOffsetChange = _a.onOffsetChange, _w = _a.showSwipeMarker, showSwipeMarker = _w === void 0 ? true : _w, swipeableMarker = _a.swipeableMarker, swipeableMarkerClassName = _a.swipeableMarkerClassName, backButtonProps = _a.backButtonProps, _x = _a.iOSLock, iOSLock = _x === void 0 ? false : _x, _y = _a.virtualKeyboard, virtualKeyboard = _y === void 0 ? false : _y;
|
|
36
|
+
var open = _a.open, title = _a.title, container = _a.container, usePortal = _a.usePortal, backgroundColor = _a.backgroundColor, _j = _a.titleSize, titleSize = _j === void 0 ? 'default' : _j, subtitle = _a.subtitle, 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, _k = _a.titleAlign, titleAlign = _k === void 0 ? 'left' : _k, trimTitle = _a.trimTitle, stickyHeader = _a.stickyHeader, _l = _a.stickyFooter, stickyFooter = _l === void 0 ? true : _l, _m = _a.initialHeight, initialHeight = _m === void 0 ? 'default' : _m, hideOverlay = _a.hideOverlay, hideScrollbar = _a.hideScrollbar, hideHeader = _a.hideHeader, disableOverlayClick = _a.disableOverlayClick, disableBlockingScroll = _a.disableBlockingScroll, disableFocusLock = _a.disableFocusLock, children = _a.children, zIndex = _a.zIndex, _o = _a.transitionProps, transitionProps = _o === void 0 ? {} : _o, magneticAreasProp = _a.magneticAreas, initialActiveAreaIndex = _a.initialActiveAreaIndex, dataTestId = _a.dataTestId, _p = _a.swipeable, swipeable = _p === void 0 ? true : _p, _q = _a.swipeableContent, swipeableContent = _q === void 0 ? true : _q, _r = _a.swipeThreshold, swipeThreshold = _r === void 0 ? 5 : _r, scrollLockedProp = _a.scrollLocked, backdropProps = _a.backdropProps, _s = _a.scrollableContainerRef, scrollableContainerRef = _s === void 0 ? function () { return null; } : _s, bottomSheetInstanceRef = _a.bottomSheetInstanceRef, _t = _a.sheetContainerRef, sheetContainerRef = _t === void 0 ? function () { return null; } : _t, _u = _a.headerOffset, headerOffset = _u === void 0 ? 24 : _u, _v = _a.adjustContainerHeight, adjustContainerHeight = _v === void 0 ? adjustContainerHeightDefault : _v, onClose = _a.onClose, onBack = _a.onBack, onMagnetize = _a.onMagnetize, onSwipeStart = _a.onSwipeStart, onSwipeEnd = _a.onSwipeEnd, disableRestoreFocus = _a.disableRestoreFocus, disableAutoFocus = _a.disableAutoFocus, disableEscapeKeyDown = _a.disableEscapeKeyDown, keepMounted = _a.keepMounted, onMagnetizeEnd = _a.onMagnetizeEnd, onOffsetChange = _a.onOffsetChange, _w = _a.showSwipeMarker, showSwipeMarker = _w === void 0 ? true : _w, swipeableMarker = _a.swipeableMarker, swipeableMarkerClassName = _a.swipeableMarkerClassName, backButtonProps = _a.backButtonProps, _x = _a.iOSLock, iOSLock = _x === void 0 ? false : _x, _y = _a.virtualKeyboard, virtualKeyboard = _y === void 0 ? false : _y, preventScrollOnSwipe = _a.preventScrollOnSwipe;
|
|
37
37
|
var windowHeight = (_g = reactDiv100vh.use100vh()) !== null && _g !== void 0 ? _g : 0;
|
|
38
38
|
var visualViewportSize = hooks_useVisualviewportSize.useVisualViewportSize();
|
|
39
39
|
var fullHeight = virtualKeyboard ? (_h = visualViewportSize === null || visualViewportSize === void 0 ? void 0 : visualViewportSize.height) !== null && _h !== void 0 ? _h : 0 : windowHeight;
|
|
@@ -300,6 +300,7 @@ function (_a, ref) {
|
|
|
300
300
|
trackMouse: swipeable,
|
|
301
301
|
trackTouch: swipeable,
|
|
302
302
|
delta: swipeThreshold,
|
|
303
|
+
preventScrollOnSwipe: preventScrollOnSwipe,
|
|
303
304
|
});
|
|
304
305
|
var handleExited = function (node) {
|
|
305
306
|
var idx = initialIndexRef.current;
|
|
@@ -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_p43wg","sticky":"bottom-sheet__sticky_p43wg","highlighted":"bottom-sheet__highlighted_p43wg","background-accent":"bottom-sheet__background-accent_p43wg","background-info":"bottom-sheet__background-info_p43wg","background-attention-muted":"bottom-sheet__background-attention-muted_p43wg","background-positive-muted":"bottom-sheet__background-positive-muted_p43wg","background-negative-muted":"bottom-sheet__background-negative-muted_p43wg","background-primary":"bottom-sheet__background-primary_p43wg","background-primary-inverted":"bottom-sheet__background-primary-inverted_p43wg","background-secondary":"bottom-sheet__background-secondary_p43wg","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_p43wg","background-tertiary":"bottom-sheet__background-tertiary_p43wg","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_p43wg","background-quaternary":"bottom-sheet__background-quaternary_p43wg","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_p43wg","background-specialbg-component":"bottom-sheet__background-specialbg-component_p43wg","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_p43wg","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_p43wg","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_p43wg","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_p43wg","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_p43wg","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_p43wg","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_p43wg","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_p43wg"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
var Footer = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: i91on */
|
|
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-modal-bg-primary: #fff;
|
|
@@ -55,58 +55,58 @@
|
|
|
55
55
|
/* footer */
|
|
56
56
|
--bottom-sheet-footer-border-top: 1px solid var(--color-light-neutral-300);
|
|
57
57
|
--bottom-sheet-footer-background-color: var(--color-light-modal-bg-primary);
|
|
58
|
-
} .bottom-
|
|
58
|
+
} .bottom-sheet__footer_p43wg {
|
|
59
59
|
padding: var(--gap-16) var(--gap-16);
|
|
60
60
|
background-color: var(--color-light-modal-bg-primary);
|
|
61
|
-
} .bottom-
|
|
61
|
+
} .bottom-sheet__sticky_p43wg {
|
|
62
62
|
position: sticky;
|
|
63
63
|
bottom: var(--gap-0);
|
|
64
64
|
z-index: 1;
|
|
65
|
-
} .bottom-
|
|
65
|
+
} .bottom-sheet__highlighted_p43wg {
|
|
66
66
|
border-top: var(--bottom-sheet-footer-border-top);
|
|
67
67
|
background-color: var(--bottom-sheet-footer-background-color);
|
|
68
|
-
} .bottom-sheet__background-
|
|
68
|
+
} .bottom-sheet__background-accent_p43wg {
|
|
69
69
|
background-color: var(--color-light-bg-accent);
|
|
70
|
-
} .bottom-sheet__background-
|
|
70
|
+
} .bottom-sheet__background-info_p43wg {
|
|
71
71
|
background-color: var(--color-light-bg-info);
|
|
72
|
-
} .bottom-sheet__background-attention-
|
|
72
|
+
} .bottom-sheet__background-attention-muted_p43wg {
|
|
73
73
|
background-color: var(--color-light-bg-attention-muted);
|
|
74
|
-
} .bottom-sheet__background-positive-
|
|
74
|
+
} .bottom-sheet__background-positive-muted_p43wg {
|
|
75
75
|
background-color: var(--color-light-bg-positive-muted);
|
|
76
|
-
} .bottom-sheet__background-negative-
|
|
76
|
+
} .bottom-sheet__background-negative-muted_p43wg {
|
|
77
77
|
background-color: var(--color-light-bg-negative-muted);
|
|
78
|
-
} .bottom-sheet__background-
|
|
78
|
+
} .bottom-sheet__background-primary_p43wg {
|
|
79
79
|
background-color: var(--color-light-bg-primary);
|
|
80
|
-
} .bottom-sheet__background-primary-
|
|
80
|
+
} .bottom-sheet__background-primary-inverted_p43wg {
|
|
81
81
|
background-color: var(--color-light-bg-primary-inverted);
|
|
82
|
-
} .bottom-sheet__background-
|
|
82
|
+
} .bottom-sheet__background-secondary_p43wg {
|
|
83
83
|
background-color: var(--color-light-bg-secondary);
|
|
84
|
-
} .bottom-sheet__background-secondary-
|
|
84
|
+
} .bottom-sheet__background-secondary-inverted_p43wg {
|
|
85
85
|
background-color: var(--color-light-bg-secondary-inverted);
|
|
86
|
-
} .bottom-sheet__background-
|
|
86
|
+
} .bottom-sheet__background-tertiary_p43wg {
|
|
87
87
|
background-color: var(--color-light-bg-tertiary);
|
|
88
|
-
} .bottom-sheet__background-tertiary-
|
|
88
|
+
} .bottom-sheet__background-tertiary-inverted_p43wg {
|
|
89
89
|
background-color: var(--color-light-bg-tertiary-inverted);
|
|
90
|
-
} .bottom-sheet__background-
|
|
90
|
+
} .bottom-sheet__background-quaternary_p43wg {
|
|
91
91
|
background-color: var(--color-light-bg-quaternary);
|
|
92
|
-
} .bottom-sheet__background-quaternary-
|
|
92
|
+
} .bottom-sheet__background-quaternary-inverted_p43wg {
|
|
93
93
|
background-color: var(--color-light-bg-quaternary-inverted);
|
|
94
|
-
} .bottom-sheet__background-specialbg-
|
|
94
|
+
} .bottom-sheet__background-specialbg-component_p43wg {
|
|
95
95
|
background-color: var(--color-light-specialbg-component);
|
|
96
|
-
} .bottom-sheet__background-specialbg-component-
|
|
96
|
+
} .bottom-sheet__background-specialbg-component-inverted_p43wg {
|
|
97
97
|
background-color: var(--color-light-specialbg-component-inverted);
|
|
98
|
-
} .bottom-sheet__background-specialbg-primary-
|
|
98
|
+
} .bottom-sheet__background-specialbg-primary-grouped_p43wg {
|
|
99
99
|
background-color: var(--color-light-specialbg-primary-grouped);
|
|
100
|
-
} .bottom-sheet__background-specialbg-secondary-
|
|
100
|
+
} .bottom-sheet__background-specialbg-secondary-grouped_p43wg {
|
|
101
101
|
background-color: var(--color-light-specialbg-secondary-grouped);
|
|
102
|
-
} .bottom-sheet__background-specialbg-tertiary-
|
|
102
|
+
} .bottom-sheet__background-specialbg-tertiary-grouped_p43wg {
|
|
103
103
|
background-color: var(--color-light-specialbg-tertiary-grouped);
|
|
104
|
-
} .bottom-sheet__background-specialbg-secondary-
|
|
104
|
+
} .bottom-sheet__background-specialbg-secondary-transparent_p43wg {
|
|
105
105
|
background-color: var(--color-light-specialbg-secondary-transparent);
|
|
106
|
-
} .bottom-sheet__background-specialbg-secondary-transparent-
|
|
106
|
+
} .bottom-sheet__background-specialbg-secondary-transparent-inverted_p43wg {
|
|
107
107
|
background-color: var(--color-light-specialbg-secondary-transparent-inverted);
|
|
108
|
-
} .bottom-sheet__background-specialbg-tertiary-
|
|
108
|
+
} .bottom-sheet__background-specialbg-tertiary-transparent_p43wg {
|
|
109
109
|
background-color: var(--color-light-specialbg-tertiary-transparent);
|
|
110
|
-
} .bottom-sheet__background-specialbg-tertiary-transparent-
|
|
110
|
+
} .bottom-sheet__background-specialbg-tertiary-transparent-inverted_p43wg {
|
|
111
111
|
background-color: var(--color-light-specialbg-tertiary-transparent-inverted);
|
|
112
112
|
}
|
|
@@ -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 = {"headerBase":"bottom-
|
|
16
|
+
var styles = {"headerBase":"bottom-sheet__headerBase_1rgak","headerWrapper":"bottom-sheet__headerWrapper_1rgak bottom-sheet__headerBase_1rgak","headerWrapperWithoutSwipeMarker":"bottom-sheet__headerWrapperWithoutSwipeMarker_1rgak bottom-sheet__headerBase_1rgak","hasContent":"bottom-sheet__hasContent_1rgak","header":"bottom-sheet__header_1rgak","sticky":"bottom-sheet__sticky_1rgak","highlighted":"bottom-sheet__highlighted_1rgak","justifyEnd":"bottom-sheet__justifyEnd_1rgak","addon":"bottom-sheet__addon_1rgak","addonFixed":"bottom-sheet__addonFixed_1rgak","title":"bottom-sheet__title_1rgak","titleCenter":"bottom-sheet__titleCenter_1rgak","titleLeft":"bottom-sheet__titleLeft_1rgak","trimTitle":"bottom-sheet__trimTitle_1rgak"};
|
|
17
17
|
require('./index.css')
|
|
18
18
|
|
|
19
19
|
var Header = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: inrw3 */
|
|
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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */
|
|
@@ -41,45 +41,45 @@
|
|
|
41
41
|
--bottom-sheet-title-font-family: var(--font-family-system);
|
|
42
42
|
|
|
43
43
|
/* footer */
|
|
44
|
-
} .bottom-
|
|
44
|
+
} .bottom-sheet__headerBase_1rgak {
|
|
45
45
|
border-top-left-radius: inherit;
|
|
46
46
|
border-top-right-radius: inherit;
|
|
47
47
|
z-index: 1;
|
|
48
|
-
} .bottom-
|
|
48
|
+
} .bottom-sheet__headerWrapper_1rgak {
|
|
49
49
|
padding: var(--gap-12) var(--gap-8) var(--gap-4);
|
|
50
|
-
} .bottom-
|
|
50
|
+
} .bottom-sheet__headerWrapperWithoutSwipeMarker_1rgak {
|
|
51
51
|
padding: var(--gap-8) var(--gap-8) var(--gap-4);
|
|
52
|
-
} .bottom-
|
|
52
|
+
} .bottom-sheet__hasContent_1rgak {
|
|
53
53
|
background-color: inherit;
|
|
54
|
-
} .bottom-
|
|
54
|
+
} .bottom-sheet__header_1rgak {
|
|
55
55
|
display: flex;
|
|
56
|
-
} .bottom-
|
|
56
|
+
} .bottom-sheet__sticky_1rgak {
|
|
57
57
|
position: sticky;
|
|
58
58
|
top: var(--gap-0);
|
|
59
|
-
} .bottom-
|
|
59
|
+
} .bottom-sheet__highlighted_1rgak {
|
|
60
60
|
border-bottom: var(--bottom-sheet-header-border-bottom);
|
|
61
|
-
} .bottom-
|
|
61
|
+
} .bottom-sheet__justifyEnd_1rgak {
|
|
62
62
|
justify-content: flex-end;
|
|
63
|
-
} .bottom-
|
|
63
|
+
} .bottom-sheet__addon_1rgak {
|
|
64
64
|
display: flex;
|
|
65
65
|
justify-content: center;
|
|
66
66
|
align-items: center;
|
|
67
67
|
min-width: 48px;
|
|
68
68
|
height: 48px;
|
|
69
|
-
} .bottom-
|
|
69
|
+
} .bottom-sheet__addonFixed_1rgak {
|
|
70
70
|
position: fixed;
|
|
71
|
-
} .bottom-
|
|
71
|
+
} .bottom-sheet__title_1rgak {
|
|
72
72
|
padding: 10px var(--gap-8);
|
|
73
73
|
width: 100%;
|
|
74
74
|
font-size: var(--bottom-sheet-title-font-size);
|
|
75
75
|
font-weight: var(--bottom-sheet-title-font-weight);
|
|
76
76
|
line-height: var(--bottom-sheet-title-line-height);
|
|
77
77
|
font-family: var(--bottom-sheet-title-font-family);
|
|
78
|
-
} .bottom-
|
|
78
|
+
} .bottom-sheet__titleCenter_1rgak {
|
|
79
79
|
text-align: center;
|
|
80
|
-
} .bottom-
|
|
80
|
+
} .bottom-sheet__titleLeft_1rgak {
|
|
81
81
|
text-align: left;
|
|
82
|
-
} .bottom-
|
|
82
|
+
} .bottom-sheet__trimTitle_1rgak {
|
|
83
83
|
white-space: nowrap;
|
|
84
84
|
overflow: hidden;
|
|
85
85
|
text-overflow: ellipsis;
|
package/cssm/component.js
CHANGED
|
@@ -32,7 +32,7 @@ var BottomSheet = React.forwardRef(
|
|
|
32
32
|
function (_a, ref) {
|
|
33
33
|
var _b, _c, _d, _e, _f;
|
|
34
34
|
var _g, _h;
|
|
35
|
-
var open = _a.open, title = _a.title, container = _a.container, usePortal = _a.usePortal, backgroundColor = _a.backgroundColor, _j = _a.titleSize, titleSize = _j === void 0 ? 'default' : _j, subtitle = _a.subtitle, 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, _k = _a.titleAlign, titleAlign = _k === void 0 ? 'left' : _k, trimTitle = _a.trimTitle, stickyHeader = _a.stickyHeader, _l = _a.stickyFooter, stickyFooter = _l === void 0 ? true : _l, _m = _a.initialHeight, initialHeight = _m === void 0 ? 'default' : _m, hideOverlay = _a.hideOverlay, hideScrollbar = _a.hideScrollbar, hideHeader = _a.hideHeader, disableOverlayClick = _a.disableOverlayClick, disableBlockingScroll = _a.disableBlockingScroll, disableFocusLock = _a.disableFocusLock, children = _a.children, zIndex = _a.zIndex, _o = _a.transitionProps, transitionProps = _o === void 0 ? {} : _o, magneticAreasProp = _a.magneticAreas, initialActiveAreaIndex = _a.initialActiveAreaIndex, dataTestId = _a.dataTestId, _p = _a.swipeable, swipeable = _p === void 0 ? true : _p, _q = _a.swipeableContent, swipeableContent = _q === void 0 ? true : _q, _r = _a.swipeThreshold, swipeThreshold = _r === void 0 ? 5 : _r, scrollLockedProp = _a.scrollLocked, backdropProps = _a.backdropProps, _s = _a.scrollableContainerRef, scrollableContainerRef = _s === void 0 ? function () { return null; } : _s, bottomSheetInstanceRef = _a.bottomSheetInstanceRef, _t = _a.sheetContainerRef, sheetContainerRef = _t === void 0 ? function () { return null; } : _t, _u = _a.headerOffset, headerOffset = _u === void 0 ? 24 : _u, _v = _a.adjustContainerHeight, adjustContainerHeight = _v === void 0 ? adjustContainerHeightDefault : _v, onClose = _a.onClose, onBack = _a.onBack, onMagnetize = _a.onMagnetize, onSwipeStart = _a.onSwipeStart, onSwipeEnd = _a.onSwipeEnd, disableRestoreFocus = _a.disableRestoreFocus, disableAutoFocus = _a.disableAutoFocus, disableEscapeKeyDown = _a.disableEscapeKeyDown, keepMounted = _a.keepMounted, onMagnetizeEnd = _a.onMagnetizeEnd, onOffsetChange = _a.onOffsetChange, _w = _a.showSwipeMarker, showSwipeMarker = _w === void 0 ? true : _w, swipeableMarker = _a.swipeableMarker, swipeableMarkerClassName = _a.swipeableMarkerClassName, backButtonProps = _a.backButtonProps, _x = _a.iOSLock, iOSLock = _x === void 0 ? false : _x, _y = _a.virtualKeyboard, virtualKeyboard = _y === void 0 ? false : _y;
|
|
35
|
+
var open = _a.open, title = _a.title, container = _a.container, usePortal = _a.usePortal, backgroundColor = _a.backgroundColor, _j = _a.titleSize, titleSize = _j === void 0 ? 'default' : _j, subtitle = _a.subtitle, 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, _k = _a.titleAlign, titleAlign = _k === void 0 ? 'left' : _k, trimTitle = _a.trimTitle, stickyHeader = _a.stickyHeader, _l = _a.stickyFooter, stickyFooter = _l === void 0 ? true : _l, _m = _a.initialHeight, initialHeight = _m === void 0 ? 'default' : _m, hideOverlay = _a.hideOverlay, hideScrollbar = _a.hideScrollbar, hideHeader = _a.hideHeader, disableOverlayClick = _a.disableOverlayClick, disableBlockingScroll = _a.disableBlockingScroll, disableFocusLock = _a.disableFocusLock, children = _a.children, zIndex = _a.zIndex, _o = _a.transitionProps, transitionProps = _o === void 0 ? {} : _o, magneticAreasProp = _a.magneticAreas, initialActiveAreaIndex = _a.initialActiveAreaIndex, dataTestId = _a.dataTestId, _p = _a.swipeable, swipeable = _p === void 0 ? true : _p, _q = _a.swipeableContent, swipeableContent = _q === void 0 ? true : _q, _r = _a.swipeThreshold, swipeThreshold = _r === void 0 ? 5 : _r, scrollLockedProp = _a.scrollLocked, backdropProps = _a.backdropProps, _s = _a.scrollableContainerRef, scrollableContainerRef = _s === void 0 ? function () { return null; } : _s, bottomSheetInstanceRef = _a.bottomSheetInstanceRef, _t = _a.sheetContainerRef, sheetContainerRef = _t === void 0 ? function () { return null; } : _t, _u = _a.headerOffset, headerOffset = _u === void 0 ? 24 : _u, _v = _a.adjustContainerHeight, adjustContainerHeight = _v === void 0 ? adjustContainerHeightDefault : _v, onClose = _a.onClose, onBack = _a.onBack, onMagnetize = _a.onMagnetize, onSwipeStart = _a.onSwipeStart, onSwipeEnd = _a.onSwipeEnd, disableRestoreFocus = _a.disableRestoreFocus, disableAutoFocus = _a.disableAutoFocus, disableEscapeKeyDown = _a.disableEscapeKeyDown, keepMounted = _a.keepMounted, onMagnetizeEnd = _a.onMagnetizeEnd, onOffsetChange = _a.onOffsetChange, _w = _a.showSwipeMarker, showSwipeMarker = _w === void 0 ? true : _w, swipeableMarker = _a.swipeableMarker, swipeableMarkerClassName = _a.swipeableMarkerClassName, backButtonProps = _a.backButtonProps, _x = _a.iOSLock, iOSLock = _x === void 0 ? false : _x, _y = _a.virtualKeyboard, virtualKeyboard = _y === void 0 ? false : _y, preventScrollOnSwipe = _a.preventScrollOnSwipe;
|
|
36
36
|
var windowHeight = (_g = reactDiv100vh.use100vh()) !== null && _g !== void 0 ? _g : 0;
|
|
37
37
|
var visualViewportSize = hooks_useVisualviewportSize.useVisualViewportSize();
|
|
38
38
|
var fullHeight = virtualKeyboard ? (_h = visualViewportSize === null || visualViewportSize === void 0 ? void 0 : visualViewportSize.height) !== null && _h !== void 0 ? _h : 0 : windowHeight;
|
|
@@ -299,6 +299,7 @@ function (_a, ref) {
|
|
|
299
299
|
trackMouse: swipeable,
|
|
300
300
|
trackTouch: swipeable,
|
|
301
301
|
delta: swipeThreshold,
|
|
302
|
+
preventScrollOnSwipe: preventScrollOnSwipe,
|
|
302
303
|
});
|
|
303
304
|
var handleExited = function (node) {
|
|
304
305
|
var idx = initialIndexRef.current;
|
package/cssm/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react-transition-group" />
|
|
2
2
|
import { HTMLAttributes, ReactElement, ReactNode, RefObject } from 'react';
|
|
3
|
+
import { SwipeableProps } from 'react-swipeable';
|
|
3
4
|
import { HandledEvents } from 'react-swipeable/es/types';
|
|
4
5
|
import { TransitionProps } from 'react-transition-group/Transition';
|
|
5
6
|
import { BaseModalProps } from "@alfalab/core-components-base-modal";
|
|
@@ -291,5 +292,10 @@ type BottomSheetProps = {
|
|
|
291
292
|
* Учитывать высоту виртуальной клавиатуры
|
|
292
293
|
*/
|
|
293
294
|
virtualKeyboard?: boolean;
|
|
295
|
+
/**
|
|
296
|
+
* Предотвращать скролл во время свайпа
|
|
297
|
+
* @default false
|
|
298
|
+
*/
|
|
299
|
+
preventScrollOnSwipe?: SwipeableProps['preventScrollOnSwipe'];
|
|
294
300
|
};
|
|
295
301
|
export { BottomSheetTitleAlign, BottomSheetProps };
|
package/esm/component.js
CHANGED
|
@@ -13,7 +13,7 @@ import { horizontalDirections } from './consts/swipeConsts.js';
|
|
|
13
13
|
import { useVisualViewportSize } from './hooks/use-visualviewport-size.js';
|
|
14
14
|
import { convertPercentToNumber, TIMEOUT, MARKER_HEIGHT, SCROLL_OFFSET, SWIPE_VELOCITY, CLOSE_OFFSET } from './utils.js';
|
|
15
15
|
|
|
16
|
-
var styles = {"modal":"bottom-
|
|
16
|
+
var styles = {"modal":"bottom-sheet__modal_u7i0l","wrapper":"bottom-sheet__wrapper_u7i0l","fullscreen":"bottom-sheet__fullscreen_u7i0l","component":"bottom-sheet__component_u7i0l","withTransition":"bottom-sheet__withTransition_u7i0l","scrollableContainer":"bottom-sheet__scrollableContainer_u7i0l","marker":"bottom-sheet__marker_u7i0l","defaultMarker":"bottom-sheet__defaultMarker_u7i0l","content":"bottom-sheet__content_u7i0l","noHeader":"bottom-sheet__noHeader_u7i0l","noFooter":"bottom-sheet__noFooter_u7i0l","scrollLocked":"bottom-sheet__scrollLocked_u7i0l","hiddenScrollbar":"bottom-sheet__hiddenScrollbar_u7i0l","disabledPointerEvents":"bottom-sheet__disabledPointerEvents_u7i0l","appear":"bottom-sheet__appear_u7i0l","enter":"bottom-sheet__enter_u7i0l","appearActive":"bottom-sheet__appearActive_u7i0l","enterActive":"bottom-sheet__enterActive_u7i0l","enterDone":"bottom-sheet__enterDone_u7i0l","appearDone":"bottom-sheet__appearDone_u7i0l","exit":"bottom-sheet__exit_u7i0l","exitActive":"bottom-sheet__exitActive_u7i0l","safeAreaBottom":"bottom-sheet__safeAreaBottom_u7i0l","background-accent":"bottom-sheet__background-accent_u7i0l","background-info":"bottom-sheet__background-info_u7i0l","background-attention-muted":"bottom-sheet__background-attention-muted_u7i0l","background-positive-muted":"bottom-sheet__background-positive-muted_u7i0l","background-negative-muted":"bottom-sheet__background-negative-muted_u7i0l","background-primary":"bottom-sheet__background-primary_u7i0l","background-primary-inverted":"bottom-sheet__background-primary-inverted_u7i0l","background-secondary":"bottom-sheet__background-secondary_u7i0l","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_u7i0l","background-tertiary":"bottom-sheet__background-tertiary_u7i0l","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_u7i0l","background-quaternary":"bottom-sheet__background-quaternary_u7i0l","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_u7i0l","background-specialbg-component":"bottom-sheet__background-specialbg-component_u7i0l","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_u7i0l","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_u7i0l","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_u7i0l","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_u7i0l","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_u7i0l","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_u7i0l","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_u7i0l","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_u7i0l"};
|
|
17
17
|
require('./index.css')
|
|
18
18
|
|
|
19
19
|
var isNil = fnUtils.isNil;
|
|
@@ -23,7 +23,7 @@ var BottomSheet = forwardRef(
|
|
|
23
23
|
function (_a, ref) {
|
|
24
24
|
var _b, _c, _d, _e, _f;
|
|
25
25
|
var _g, _h;
|
|
26
|
-
var open = _a.open, title = _a.title, container = _a.container, usePortal = _a.usePortal, backgroundColor = _a.backgroundColor, _j = _a.titleSize, titleSize = _j === void 0 ? 'default' : _j, subtitle = _a.subtitle, 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, _k = _a.titleAlign, titleAlign = _k === void 0 ? 'left' : _k, trimTitle = _a.trimTitle, stickyHeader = _a.stickyHeader, _l = _a.stickyFooter, stickyFooter = _l === void 0 ? true : _l, _m = _a.initialHeight, initialHeight = _m === void 0 ? 'default' : _m, hideOverlay = _a.hideOverlay, hideScrollbar = _a.hideScrollbar, hideHeader = _a.hideHeader, disableOverlayClick = _a.disableOverlayClick, disableBlockingScroll = _a.disableBlockingScroll, disableFocusLock = _a.disableFocusLock, children = _a.children, zIndex = _a.zIndex, _o = _a.transitionProps, transitionProps = _o === void 0 ? {} : _o, magneticAreasProp = _a.magneticAreas, initialActiveAreaIndex = _a.initialActiveAreaIndex, dataTestId = _a.dataTestId, _p = _a.swipeable, swipeable = _p === void 0 ? true : _p, _q = _a.swipeableContent, swipeableContent = _q === void 0 ? true : _q, _r = _a.swipeThreshold, swipeThreshold = _r === void 0 ? 5 : _r, scrollLockedProp = _a.scrollLocked, backdropProps = _a.backdropProps, _s = _a.scrollableContainerRef, scrollableContainerRef = _s === void 0 ? function () { return null; } : _s, bottomSheetInstanceRef = _a.bottomSheetInstanceRef, _t = _a.sheetContainerRef, sheetContainerRef = _t === void 0 ? function () { return null; } : _t, _u = _a.headerOffset, headerOffset = _u === void 0 ? 24 : _u, _v = _a.adjustContainerHeight, adjustContainerHeight = _v === void 0 ? adjustContainerHeightDefault : _v, onClose = _a.onClose, onBack = _a.onBack, onMagnetize = _a.onMagnetize, onSwipeStart = _a.onSwipeStart, onSwipeEnd = _a.onSwipeEnd, disableRestoreFocus = _a.disableRestoreFocus, disableAutoFocus = _a.disableAutoFocus, disableEscapeKeyDown = _a.disableEscapeKeyDown, keepMounted = _a.keepMounted, onMagnetizeEnd = _a.onMagnetizeEnd, onOffsetChange = _a.onOffsetChange, _w = _a.showSwipeMarker, showSwipeMarker = _w === void 0 ? true : _w, swipeableMarker = _a.swipeableMarker, swipeableMarkerClassName = _a.swipeableMarkerClassName, backButtonProps = _a.backButtonProps, _x = _a.iOSLock, iOSLock = _x === void 0 ? false : _x, _y = _a.virtualKeyboard, virtualKeyboard = _y === void 0 ? false : _y;
|
|
26
|
+
var open = _a.open, title = _a.title, container = _a.container, usePortal = _a.usePortal, backgroundColor = _a.backgroundColor, _j = _a.titleSize, titleSize = _j === void 0 ? 'default' : _j, subtitle = _a.subtitle, 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, _k = _a.titleAlign, titleAlign = _k === void 0 ? 'left' : _k, trimTitle = _a.trimTitle, stickyHeader = _a.stickyHeader, _l = _a.stickyFooter, stickyFooter = _l === void 0 ? true : _l, _m = _a.initialHeight, initialHeight = _m === void 0 ? 'default' : _m, hideOverlay = _a.hideOverlay, hideScrollbar = _a.hideScrollbar, hideHeader = _a.hideHeader, disableOverlayClick = _a.disableOverlayClick, disableBlockingScroll = _a.disableBlockingScroll, disableFocusLock = _a.disableFocusLock, children = _a.children, zIndex = _a.zIndex, _o = _a.transitionProps, transitionProps = _o === void 0 ? {} : _o, magneticAreasProp = _a.magneticAreas, initialActiveAreaIndex = _a.initialActiveAreaIndex, dataTestId = _a.dataTestId, _p = _a.swipeable, swipeable = _p === void 0 ? true : _p, _q = _a.swipeableContent, swipeableContent = _q === void 0 ? true : _q, _r = _a.swipeThreshold, swipeThreshold = _r === void 0 ? 5 : _r, scrollLockedProp = _a.scrollLocked, backdropProps = _a.backdropProps, _s = _a.scrollableContainerRef, scrollableContainerRef = _s === void 0 ? function () { return null; } : _s, bottomSheetInstanceRef = _a.bottomSheetInstanceRef, _t = _a.sheetContainerRef, sheetContainerRef = _t === void 0 ? function () { return null; } : _t, _u = _a.headerOffset, headerOffset = _u === void 0 ? 24 : _u, _v = _a.adjustContainerHeight, adjustContainerHeight = _v === void 0 ? adjustContainerHeightDefault : _v, onClose = _a.onClose, onBack = _a.onBack, onMagnetize = _a.onMagnetize, onSwipeStart = _a.onSwipeStart, onSwipeEnd = _a.onSwipeEnd, disableRestoreFocus = _a.disableRestoreFocus, disableAutoFocus = _a.disableAutoFocus, disableEscapeKeyDown = _a.disableEscapeKeyDown, keepMounted = _a.keepMounted, onMagnetizeEnd = _a.onMagnetizeEnd, onOffsetChange = _a.onOffsetChange, _w = _a.showSwipeMarker, showSwipeMarker = _w === void 0 ? true : _w, swipeableMarker = _a.swipeableMarker, swipeableMarkerClassName = _a.swipeableMarkerClassName, backButtonProps = _a.backButtonProps, _x = _a.iOSLock, iOSLock = _x === void 0 ? false : _x, _y = _a.virtualKeyboard, virtualKeyboard = _y === void 0 ? false : _y, preventScrollOnSwipe = _a.preventScrollOnSwipe;
|
|
27
27
|
var windowHeight = (_g = use100vh()) !== null && _g !== void 0 ? _g : 0;
|
|
28
28
|
var visualViewportSize = useVisualViewportSize();
|
|
29
29
|
var fullHeight = virtualKeyboard ? (_h = visualViewportSize === null || visualViewportSize === void 0 ? void 0 : visualViewportSize.height) !== null && _h !== void 0 ? _h : 0 : windowHeight;
|
|
@@ -290,6 +290,7 @@ function (_a, ref) {
|
|
|
290
290
|
trackMouse: swipeable,
|
|
291
291
|
trackTouch: swipeable,
|
|
292
292
|
delta: swipeThreshold,
|
|
293
|
+
preventScrollOnSwipe: preventScrollOnSwipe,
|
|
293
294
|
});
|
|
294
295
|
var handleExited = function (node) {
|
|
295
296
|
var idx = initialIndexRef.current;
|
|
@@ -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_p43wg","sticky":"bottom-sheet__sticky_p43wg","highlighted":"bottom-sheet__highlighted_p43wg","background-accent":"bottom-sheet__background-accent_p43wg","background-info":"bottom-sheet__background-info_p43wg","background-attention-muted":"bottom-sheet__background-attention-muted_p43wg","background-positive-muted":"bottom-sheet__background-positive-muted_p43wg","background-negative-muted":"bottom-sheet__background-negative-muted_p43wg","background-primary":"bottom-sheet__background-primary_p43wg","background-primary-inverted":"bottom-sheet__background-primary-inverted_p43wg","background-secondary":"bottom-sheet__background-secondary_p43wg","background-secondary-inverted":"bottom-sheet__background-secondary-inverted_p43wg","background-tertiary":"bottom-sheet__background-tertiary_p43wg","background-tertiary-inverted":"bottom-sheet__background-tertiary-inverted_p43wg","background-quaternary":"bottom-sheet__background-quaternary_p43wg","background-quaternary-inverted":"bottom-sheet__background-quaternary-inverted_p43wg","background-specialbg-component":"bottom-sheet__background-specialbg-component_p43wg","background-specialbg-component-inverted":"bottom-sheet__background-specialbg-component-inverted_p43wg","background-specialbg-primary-grouped":"bottom-sheet__background-specialbg-primary-grouped_p43wg","background-specialbg-secondary-grouped":"bottom-sheet__background-specialbg-secondary-grouped_p43wg","background-specialbg-tertiary-grouped":"bottom-sheet__background-specialbg-tertiary-grouped_p43wg","background-specialbg-secondary-transparent":"bottom-sheet__background-specialbg-secondary-transparent_p43wg","background-specialbg-secondary-transparent-inverted":"bottom-sheet__background-specialbg-secondary-transparent-inverted_p43wg","background-specialbg-tertiary-transparent":"bottom-sheet__background-specialbg-tertiary-transparent_p43wg","background-specialbg-tertiary-transparent-inverted":"bottom-sheet__background-specialbg-tertiary-transparent-inverted_p43wg"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
var Footer = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: i91on */
|
|
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-modal-bg-primary: #fff;
|
|
@@ -55,58 +55,58 @@
|
|
|
55
55
|
/* footer */
|
|
56
56
|
--bottom-sheet-footer-border-top: 1px solid var(--color-light-neutral-300);
|
|
57
57
|
--bottom-sheet-footer-background-color: var(--color-light-modal-bg-primary);
|
|
58
|
-
} .bottom-
|
|
58
|
+
} .bottom-sheet__footer_p43wg {
|
|
59
59
|
padding: var(--gap-16) var(--gap-16);
|
|
60
60
|
background-color: var(--color-light-modal-bg-primary);
|
|
61
|
-
} .bottom-
|
|
61
|
+
} .bottom-sheet__sticky_p43wg {
|
|
62
62
|
position: sticky;
|
|
63
63
|
bottom: var(--gap-0);
|
|
64
64
|
z-index: 1;
|
|
65
|
-
} .bottom-
|
|
65
|
+
} .bottom-sheet__highlighted_p43wg {
|
|
66
66
|
border-top: var(--bottom-sheet-footer-border-top);
|
|
67
67
|
background-color: var(--bottom-sheet-footer-background-color);
|
|
68
|
-
} .bottom-sheet__background-
|
|
68
|
+
} .bottom-sheet__background-accent_p43wg {
|
|
69
69
|
background-color: var(--color-light-bg-accent);
|
|
70
|
-
} .bottom-sheet__background-
|
|
70
|
+
} .bottom-sheet__background-info_p43wg {
|
|
71
71
|
background-color: var(--color-light-bg-info);
|
|
72
|
-
} .bottom-sheet__background-attention-
|
|
72
|
+
} .bottom-sheet__background-attention-muted_p43wg {
|
|
73
73
|
background-color: var(--color-light-bg-attention-muted);
|
|
74
|
-
} .bottom-sheet__background-positive-
|
|
74
|
+
} .bottom-sheet__background-positive-muted_p43wg {
|
|
75
75
|
background-color: var(--color-light-bg-positive-muted);
|
|
76
|
-
} .bottom-sheet__background-negative-
|
|
76
|
+
} .bottom-sheet__background-negative-muted_p43wg {
|
|
77
77
|
background-color: var(--color-light-bg-negative-muted);
|
|
78
|
-
} .bottom-sheet__background-
|
|
78
|
+
} .bottom-sheet__background-primary_p43wg {
|
|
79
79
|
background-color: var(--color-light-bg-primary);
|
|
80
|
-
} .bottom-sheet__background-primary-
|
|
80
|
+
} .bottom-sheet__background-primary-inverted_p43wg {
|
|
81
81
|
background-color: var(--color-light-bg-primary-inverted);
|
|
82
|
-
} .bottom-sheet__background-
|
|
82
|
+
} .bottom-sheet__background-secondary_p43wg {
|
|
83
83
|
background-color: var(--color-light-bg-secondary);
|
|
84
|
-
} .bottom-sheet__background-secondary-
|
|
84
|
+
} .bottom-sheet__background-secondary-inverted_p43wg {
|
|
85
85
|
background-color: var(--color-light-bg-secondary-inverted);
|
|
86
|
-
} .bottom-sheet__background-
|
|
86
|
+
} .bottom-sheet__background-tertiary_p43wg {
|
|
87
87
|
background-color: var(--color-light-bg-tertiary);
|
|
88
|
-
} .bottom-sheet__background-tertiary-
|
|
88
|
+
} .bottom-sheet__background-tertiary-inverted_p43wg {
|
|
89
89
|
background-color: var(--color-light-bg-tertiary-inverted);
|
|
90
|
-
} .bottom-sheet__background-
|
|
90
|
+
} .bottom-sheet__background-quaternary_p43wg {
|
|
91
91
|
background-color: var(--color-light-bg-quaternary);
|
|
92
|
-
} .bottom-sheet__background-quaternary-
|
|
92
|
+
} .bottom-sheet__background-quaternary-inverted_p43wg {
|
|
93
93
|
background-color: var(--color-light-bg-quaternary-inverted);
|
|
94
|
-
} .bottom-sheet__background-specialbg-
|
|
94
|
+
} .bottom-sheet__background-specialbg-component_p43wg {
|
|
95
95
|
background-color: var(--color-light-specialbg-component);
|
|
96
|
-
} .bottom-sheet__background-specialbg-component-
|
|
96
|
+
} .bottom-sheet__background-specialbg-component-inverted_p43wg {
|
|
97
97
|
background-color: var(--color-light-specialbg-component-inverted);
|
|
98
|
-
} .bottom-sheet__background-specialbg-primary-
|
|
98
|
+
} .bottom-sheet__background-specialbg-primary-grouped_p43wg {
|
|
99
99
|
background-color: var(--color-light-specialbg-primary-grouped);
|
|
100
|
-
} .bottom-sheet__background-specialbg-secondary-
|
|
100
|
+
} .bottom-sheet__background-specialbg-secondary-grouped_p43wg {
|
|
101
101
|
background-color: var(--color-light-specialbg-secondary-grouped);
|
|
102
|
-
} .bottom-sheet__background-specialbg-tertiary-
|
|
102
|
+
} .bottom-sheet__background-specialbg-tertiary-grouped_p43wg {
|
|
103
103
|
background-color: var(--color-light-specialbg-tertiary-grouped);
|
|
104
|
-
} .bottom-sheet__background-specialbg-secondary-
|
|
104
|
+
} .bottom-sheet__background-specialbg-secondary-transparent_p43wg {
|
|
105
105
|
background-color: var(--color-light-specialbg-secondary-transparent);
|
|
106
|
-
} .bottom-sheet__background-specialbg-secondary-transparent-
|
|
106
|
+
} .bottom-sheet__background-specialbg-secondary-transparent-inverted_p43wg {
|
|
107
107
|
background-color: var(--color-light-specialbg-secondary-transparent-inverted);
|
|
108
|
-
} .bottom-sheet__background-specialbg-tertiary-
|
|
108
|
+
} .bottom-sheet__background-specialbg-tertiary-transparent_p43wg {
|
|
109
109
|
background-color: var(--color-light-specialbg-tertiary-transparent);
|
|
110
|
-
} .bottom-sheet__background-specialbg-tertiary-transparent-
|
|
110
|
+
} .bottom-sheet__background-specialbg-tertiary-transparent-inverted_p43wg {
|
|
111
111
|
background-color: var(--color-light-specialbg-tertiary-transparent-inverted);
|
|
112
112
|
}
|
|
@@ -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 = {"headerBase":"bottom-
|
|
7
|
+
var styles = {"headerBase":"bottom-sheet__headerBase_1rgak","headerWrapper":"bottom-sheet__headerWrapper_1rgak bottom-sheet__headerBase_1rgak","headerWrapperWithoutSwipeMarker":"bottom-sheet__headerWrapperWithoutSwipeMarker_1rgak bottom-sheet__headerBase_1rgak","hasContent":"bottom-sheet__hasContent_1rgak","header":"bottom-sheet__header_1rgak","sticky":"bottom-sheet__sticky_1rgak","highlighted":"bottom-sheet__highlighted_1rgak","justifyEnd":"bottom-sheet__justifyEnd_1rgak","addon":"bottom-sheet__addon_1rgak","addonFixed":"bottom-sheet__addonFixed_1rgak","title":"bottom-sheet__title_1rgak","titleCenter":"bottom-sheet__titleCenter_1rgak","titleLeft":"bottom-sheet__titleLeft_1rgak","trimTitle":"bottom-sheet__trimTitle_1rgak"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
var Header = function (_a) {
|