@alfalab/core-components-bottom-sheet 4.0.2 → 4.1.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/dist/{component-67cb6035.d.ts → component-8680d27f.d.ts} +9 -1
- package/dist/{component-67cb6035.js → component-8680d27f.js} +8 -8
- package/dist/component.js +2 -2
- package/dist/components/backer/Component.js +2 -2
- package/dist/components/backer/index.css +5 -4
- package/dist/components/closer/Component.js +2 -2
- package/dist/components/closer/index.css +5 -4
- package/dist/components/footer/Component.js +1 -1
- package/dist/components/footer/index.css +4 -4
- package/dist/components/header/Component.js +2 -2
- package/dist/components/header/index.css +17 -18
- package/dist/components/swipeable-backdrop/Component.js +1 -1
- package/dist/{esm/component-ea51573a.d.ts → cssm/component-d1b19e73.d.ts} +9 -1
- package/dist/cssm/{component-1deadd87.js → component-d1b19e73.js} +5 -5
- package/dist/cssm/component.js +1 -1
- package/dist/cssm/components/backer/index.module.css +2 -1
- package/dist/cssm/components/closer/index.module.css +2 -1
- package/dist/cssm/components/header/Component.js +1 -1
- package/dist/cssm/components/header/index.module.css +1 -2
- package/dist/cssm/index.d.ts +1 -1
- package/dist/cssm/index.js +1 -1
- package/dist/{cssm/component-1deadd87.d.ts → esm/component-7d960f38.d.ts} +9 -1
- package/dist/esm/{component-ea51573a.js → component-7d960f38.js} +8 -8
- package/dist/esm/component.js +2 -2
- package/dist/esm/components/backer/Component.js +2 -2
- package/dist/esm/components/backer/index.css +5 -4
- package/dist/esm/components/closer/Component.js +2 -2
- package/dist/esm/components/closer/index.css +5 -4
- package/dist/esm/components/footer/Component.js +1 -1
- package/dist/esm/components/footer/index.css +4 -4
- package/dist/esm/components/header/Component.js +2 -2
- package/dist/esm/components/header/index.css +17 -18
- package/dist/esm/components/swipeable-backdrop/Component.js +1 -1
- package/dist/esm/index.css +15 -15
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/{tslib.es6-b6293862.d.ts → tslib.es6-7f629856.d.ts} +0 -0
- package/dist/esm/{tslib.es6-b6293862.js → tslib.es6-7f629856.js} +0 -0
- package/dist/index.css +15 -15
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/modern/{component-af296d00.d.ts → component-7a1c353b.d.ts} +9 -1
- package/dist/modern/{component-af296d00.js → component-7a1c353b.js} +7 -7
- package/dist/modern/component.js +1 -1
- package/dist/modern/components/backer/Component.js +1 -1
- package/dist/modern/components/backer/index.css +5 -4
- package/dist/modern/components/closer/Component.js +1 -1
- package/dist/modern/components/closer/index.css +5 -4
- package/dist/modern/components/footer/Component.js +1 -1
- package/dist/modern/components/footer/index.css +4 -4
- package/dist/modern/components/header/Component.js +1 -1
- package/dist/modern/components/header/index.css +17 -18
- package/dist/modern/index.css +15 -15
- package/dist/modern/index.d.ts +1 -1
- package/dist/modern/index.js +1 -1
- package/dist/{tslib.es6-80cc1ada.d.ts → tslib.es6-c74c8bbc.d.ts} +0 -0
- package/dist/{tslib.es6-80cc1ada.js → tslib.es6-c74c8bbc.js} +0 -0
- package/package.json +10 -10
|
@@ -12,7 +12,7 @@ type HeaderProps = {
|
|
|
12
12
|
/**
|
|
13
13
|
* Дополнительный класс
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
headerClassName?: string;
|
|
16
16
|
/**
|
|
17
17
|
* Дополнительный класс для аддонов
|
|
18
18
|
*/
|
|
@@ -85,10 +85,18 @@ type BottomSheetProps = {
|
|
|
85
85
|
* Дополнительный класс
|
|
86
86
|
*/
|
|
87
87
|
contentClassName?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Дополнительный класс
|
|
90
|
+
*/
|
|
91
|
+
containerClassName?: string;
|
|
88
92
|
/**
|
|
89
93
|
* Дополнительный класс шапки
|
|
90
94
|
*/
|
|
91
95
|
headerClassName?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Дополнительный класс футера
|
|
98
|
+
*/
|
|
99
|
+
footerClassName?: string;
|
|
92
100
|
/**
|
|
93
101
|
* Дополнительный класс для аддонов
|
|
94
102
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var tslib_es6 = require('./tslib.es6-
|
|
3
|
+
var tslib_es6 = require('./tslib.es6-c74c8bbc.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var cn = require('classnames');
|
|
6
6
|
var reactDiv100vh = require('react-div-100vh');
|
|
@@ -17,12 +17,12 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
17
17
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
18
18
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
19
19
|
|
|
20
|
-
var styles = {"header":"bottom-
|
|
20
|
+
var styles = {"header":"bottom-sheet__header_1ezhe","sticky":"bottom-sheet__sticky_1ezhe","highlighted":"bottom-sheet__highlighted_1ezhe","justifyEnd":"bottom-sheet__justifyEnd_1ezhe","addon":"bottom-sheet__addon_1ezhe","addonFixed":"bottom-sheet__addonFixed_1ezhe","addonLeft":"bottom-sheet__addonLeft_1ezhe","addonRight":"bottom-sheet__addonRight_1ezhe","title":"bottom-sheet__title_1ezhe","titleCenter":"bottom-sheet__titleCenter_1ezhe","titleLeft":"bottom-sheet__titleLeft_1ezhe","trimTitle":"bottom-sheet__trimTitle_1ezhe","titleBigIndentHorizontal":"bottom-sheet__titleBigIndentHorizontal_1ezhe","titleIndentRight":"bottom-sheet__titleIndentRight_1ezhe","titleIndentLeft":"bottom-sheet__titleIndentLeft_1ezhe"};
|
|
21
21
|
require('./components/header/index.css')
|
|
22
22
|
|
|
23
23
|
var Header = function (_a) {
|
|
24
24
|
var _b, _c, _d, _e;
|
|
25
|
-
var title = _a.title,
|
|
25
|
+
var title = _a.title, headerClassName = _a.headerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, titleAlign = _a.titleAlign, trimTitle = _a.trimTitle, sticky = _a.sticky, onBack = _a.onBack;
|
|
26
26
|
var _f = React.useContext(coreComponentsBaseModal.BaseModalContext), headerHighlighted = _f.headerHighlighted, setHasHeader = _f.setHasHeader, setHeaderOffset = _f.setHeaderOffset;
|
|
27
27
|
var hasLeftPart = hasBacker || leftAddons || titleAlign === 'center';
|
|
28
28
|
var hasRightPart = hasCloser || rightAddons || titleAlign === 'center';
|
|
@@ -44,7 +44,7 @@ var Header = function (_a) {
|
|
|
44
44
|
_a[styles.titleIndentRight] = !sticky && !titleAlignedCenter && hasRightPart,
|
|
45
45
|
_a));
|
|
46
46
|
};
|
|
47
|
-
return (React__default['default'].createElement("div", { className: cn__default['default'](styles.header,
|
|
47
|
+
return (React__default['default'].createElement("div", { className: cn__default['default'](styles.header, headerClassName, (_b = {},
|
|
48
48
|
_b[styles.justifyEnd] = !title,
|
|
49
49
|
_b[styles.highlighted] = headerHighlighted && sticky,
|
|
50
50
|
_b[styles.sticky] = sticky,
|
|
@@ -64,7 +64,7 @@ var Header = function (_a) {
|
|
|
64
64
|
_e)) }, hasCloser ? React__default['default'].createElement(components_closer_Component.Closer, { className: closerClassName }) : rightAddons))));
|
|
65
65
|
};
|
|
66
66
|
|
|
67
|
-
var styles$1 = {"modal":"bottom-
|
|
67
|
+
var styles$1 = {"modal":"bottom-sheet__modal_1nq3o","component":"bottom-sheet__component_1nq3o","withTransition":"bottom-sheet__withTransition_1nq3o","scrollableContainer":"bottom-sheet__scrollableContainer_1nq3o","marker":"bottom-sheet__marker_1nq3o","content":"bottom-sheet__content_1nq3o","noHeader":"bottom-sheet__noHeader_1nq3o","noFooter":"bottom-sheet__noFooter_1nq3o","scrollLocked":"bottom-sheet__scrollLocked_1nq3o","appear":"bottom-sheet__appear_1nq3o","enter":"bottom-sheet__enter_1nq3o","appearActive":"bottom-sheet__appearActive_1nq3o","enterActive":"bottom-sheet__enterActive_1nq3o","enterDone":"bottom-sheet__enterDone_1nq3o","appearDone":"bottom-sheet__appearDone_1nq3o","exit":"bottom-sheet__exit_1nq3o","exitActive":"bottom-sheet__exitActive_1nq3o"};
|
|
68
68
|
require('./index.css')
|
|
69
69
|
|
|
70
70
|
var TIMEOUT = 300;
|
|
@@ -77,7 +77,7 @@ var HEADER_OFFSET = 24;
|
|
|
77
77
|
var CLOSE_OFFSET = 0.2;
|
|
78
78
|
var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
79
79
|
var _b, _c, _d;
|
|
80
|
-
var open = _a.open, title = _a.title, actionButton = _a.actionButton, contentClassName = _a.contentClassName, headerClassName = _a.headerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, className = _a.className, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, _e = _a.titleAlign, titleAlign = _e === void 0 ? 'left' : _e, trimTitle = _a.trimTitle, stickyHeader = _a.stickyHeader, _f = _a.stickyFooter, stickyFooter = _f === void 0 ? true : _f, _g = _a.initialHeight, initialHeight = _g === void 0 ? 'default' : _g, hideOverlay = _a.hideOverlay, hideHeader = _a.hideHeader, disableOverlayClick = _a.disableOverlayClick, children = _a.children, zIndex = _a.zIndex, _h = _a.transitionProps, transitionProps = _h === void 0 ? {} : _h, dataTestId = _a.dataTestId, _j = _a.swipeable, swipeable = _j === void 0 ? true : _j, onClose = _a.onClose, onBack = _a.onBack;
|
|
80
|
+
var open = _a.open, title = _a.title, actionButton = _a.actionButton, contentClassName = _a.contentClassName, containerClassName = _a.containerClassName, headerClassName = _a.headerClassName, footerClassName = _a.footerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, className = _a.className, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, _e = _a.titleAlign, titleAlign = _e === void 0 ? 'left' : _e, trimTitle = _a.trimTitle, stickyHeader = _a.stickyHeader, _f = _a.stickyFooter, stickyFooter = _f === void 0 ? true : _f, _g = _a.initialHeight, initialHeight = _g === void 0 ? 'default' : _g, hideOverlay = _a.hideOverlay, hideHeader = _a.hideHeader, disableOverlayClick = _a.disableOverlayClick, children = _a.children, zIndex = _a.zIndex, _h = _a.transitionProps, transitionProps = _h === void 0 ? {} : _h, dataTestId = _a.dataTestId, _j = _a.swipeable, swipeable = _j === void 0 ? true : _j, onClose = _a.onClose, onBack = _a.onBack;
|
|
81
81
|
var _k = React.useState(0), sheetOffset = _k[0], setSheetOffset = _k[1];
|
|
82
82
|
var _l = React.useState(1), backdropOpacity = _l[0], setBackdropOpacity = _l[1];
|
|
83
83
|
var _m = React.useState(false), scrollLocked = _m[0], setScrollLocked = _m[1];
|
|
@@ -221,7 +221,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
|
221
221
|
React__default['default'].createElement("div", tslib_es6.__assign({ className: cn__default['default'](styles$1.component, className, (_b = {},
|
|
222
222
|
_b[styles$1.withTransition] = !sheetOffset,
|
|
223
223
|
_b)), style: tslib_es6.__assign(tslib_es6.__assign({}, getSwipeStyles()), getHeightStyles()) }, sheetSwipeablehandlers),
|
|
224
|
-
React__default['default'].createElement("div", { className: cn__default['default'](styles$1.scrollableContainer, (_c = {},
|
|
224
|
+
React__default['default'].createElement("div", { className: cn__default['default'](styles$1.scrollableContainer, containerClassName, (_c = {},
|
|
225
225
|
_c[styles$1.scrollLocked] = scrollLocked,
|
|
226
226
|
_c)), ref: scrollableContainer },
|
|
227
227
|
swipeable && React__default['default'].createElement("div", { className: cn__default['default'](styles$1.marker) }),
|
|
@@ -230,7 +230,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
|
230
230
|
_d[styles$1.noHeader] = hideHeader || emptyHeader,
|
|
231
231
|
_d[styles$1.noFooter] = !actionButton,
|
|
232
232
|
_d)) }, children),
|
|
233
|
-
actionButton && React__default['default'].createElement(components_footer_Component.Footer, { sticky: stickyFooter }, actionButton)))));
|
|
233
|
+
actionButton && (React__default['default'].createElement(components_footer_Component.Footer, { sticky: stickyFooter, className: footerClassName }, actionButton))))));
|
|
234
234
|
});
|
|
235
235
|
|
|
236
236
|
exports.BottomSheet = BottomSheet;
|
package/dist/component.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('./tslib.es6-
|
|
5
|
+
require('./tslib.es6-c74c8bbc.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('react-div-100vh');
|
|
@@ -14,7 +14,7 @@ require('@alfalab/icons-glyph/CrossMIcon');
|
|
|
14
14
|
require('./components/closer/Component.js');
|
|
15
15
|
require('@alfalab/icons-glyph/ArrowBackMIcon');
|
|
16
16
|
require('./components/backer/Component.js');
|
|
17
|
-
var components_header_Component = require('./component-
|
|
17
|
+
var components_header_Component = require('./component-8680d27f.js');
|
|
18
18
|
require('./components/footer/Component.js');
|
|
19
19
|
require('@alfalab/core-components-backdrop');
|
|
20
20
|
require('./components/swipeable-backdrop/Component.js');
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
5
|
+
var tslib_es6 = require('../../tslib.es6-c74c8bbc.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var cn = require('classnames');
|
|
8
8
|
var coreComponentsIconButton = require('@alfalab/core-components-icon-button');
|
|
@@ -13,7 +13,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
14
14
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
15
15
|
|
|
16
|
-
var styles = {"backer":"bottom-
|
|
16
|
+
var styles = {"backer":"bottom-sheet__backer_kyu8g","button":"bottom-sheet__button_kyu8g"};
|
|
17
17
|
require('./index.css')
|
|
18
18
|
|
|
19
19
|
var Backer = function (_a) {
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 11qdr */
|
|
2
2
|
:root {
|
|
3
|
-
--bottom-sheet-backer-bg-color: var(--color-light-bg-primary-alpha-
|
|
3
|
+
--bottom-sheet-backer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.bottom-
|
|
6
|
+
.bottom-sheet__backer_kyu8g {
|
|
7
7
|
width: 32px;
|
|
8
8
|
height: 32px;
|
|
9
9
|
display: flex;
|
|
10
10
|
justify-content: center;
|
|
11
11
|
align-items: center;
|
|
12
12
|
cursor: pointer;
|
|
13
|
+
color: var(--color-light-graphic-primary);
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
.bottom-
|
|
16
|
+
.bottom-sheet__button_kyu8g {
|
|
16
17
|
background: var(--bottom-sheet-backer-bg-color);
|
|
17
18
|
-webkit-backdrop-filter: blur(10px);
|
|
18
19
|
backdrop-filter: blur(10px);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
5
|
+
var tslib_es6 = require('../../tslib.es6-c74c8bbc.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var cn = require('classnames');
|
|
8
8
|
var coreComponentsBaseModal = require('@alfalab/core-components-base-modal');
|
|
@@ -14,7 +14,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
14
14
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
15
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
16
16
|
|
|
17
|
-
var styles = {"closer":"bottom-
|
|
17
|
+
var styles = {"closer":"bottom-sheet__closer_2ue0t","button":"bottom-sheet__button_2ue0t"};
|
|
18
18
|
require('./index.css')
|
|
19
19
|
|
|
20
20
|
var Closer = function (_a) {
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1lw2h */
|
|
2
2
|
:root {
|
|
3
|
-
--bottom-sheet-closer-bg-color: var(--color-light-bg-primary-alpha-
|
|
3
|
+
--bottom-sheet-closer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.bottom-
|
|
6
|
+
.bottom-sheet__closer_2ue0t {
|
|
7
7
|
width: 32px;
|
|
8
8
|
height: 32px;
|
|
9
9
|
display: flex;
|
|
10
10
|
justify-content: center;
|
|
11
11
|
align-items: center;
|
|
12
12
|
cursor: pointer;
|
|
13
|
+
color: var(--color-light-graphic-primary);
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
.bottom-
|
|
16
|
+
.bottom-sheet__button_2ue0t {
|
|
16
17
|
background: var(--bottom-sheet-closer-bg-color);
|
|
17
18
|
-webkit-backdrop-filter: blur(10px);
|
|
18
19
|
backdrop-filter: blur(10px);
|
|
@@ -11,7 +11,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
11
11
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
12
12
|
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
13
13
|
|
|
14
|
-
var styles = {"footer":"bottom-
|
|
14
|
+
var styles = {"footer":"bottom-sheet__footer_1fb6t","sticky":"bottom-sheet__sticky_1fb6t","highlighted":"bottom-sheet__highlighted_1fb6t"};
|
|
15
15
|
require('./index.css')
|
|
16
16
|
|
|
17
17
|
var Footer = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 12ev6 */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
--color-light-border-primary: #dbdee1;
|
|
@@ -18,15 +18,15 @@
|
|
|
18
18
|
--bottom-sheet-footer-border-top: 1px solid var(--color-light-border-primary);
|
|
19
19
|
--bottom-sheet-footer-background-color: var(--color-light-bg-primary);
|
|
20
20
|
}
|
|
21
|
-
.bottom-
|
|
21
|
+
.bottom-sheet__footer_1fb6t {
|
|
22
22
|
padding: var(--gap-m) var(--gap-m);
|
|
23
23
|
background-color: var(--color-light-bg-primary);
|
|
24
24
|
}
|
|
25
|
-
.bottom-
|
|
25
|
+
.bottom-sheet__sticky_1fb6t {
|
|
26
26
|
position: sticky;
|
|
27
27
|
bottom: 0;
|
|
28
28
|
}
|
|
29
|
-
.bottom-
|
|
29
|
+
.bottom-sheet__highlighted_1fb6t {
|
|
30
30
|
border-top: var(--bottom-sheet-footer-border-top);
|
|
31
31
|
background-color: var(--bottom-sheet-footer-background-color);
|
|
32
32
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('../../tslib.es6-
|
|
5
|
+
require('../../tslib.es6-c74c8bbc.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
8
|
require('react-div-100vh');
|
|
@@ -14,7 +14,7 @@ require('@alfalab/icons-glyph/CrossMIcon');
|
|
|
14
14
|
require('../closer/Component.js');
|
|
15
15
|
require('@alfalab/icons-glyph/ArrowBackMIcon');
|
|
16
16
|
require('../backer/Component.js');
|
|
17
|
-
var components_header_Component = require('../../component-
|
|
17
|
+
var components_header_Component = require('../../component-8680d27f.js');
|
|
18
18
|
require('../footer/Component.js');
|
|
19
19
|
require('@alfalab/core-components-backdrop');
|
|
20
20
|
require('../swipeable-backdrop/Component.js');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: c5fqk */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
}
|
|
@@ -30,45 +30,44 @@
|
|
|
30
30
|
--bottom-sheet-title-font-family: var(--font-family-system);
|
|
31
31
|
--bottom-sheet-title-margin-vertical: var(--gap-2xs);
|
|
32
32
|
}
|
|
33
|
-
.bottom-
|
|
33
|
+
.bottom-sheet__header_1ezhe {
|
|
34
34
|
display: flex;
|
|
35
|
-
align-items: center;
|
|
36
35
|
padding: var(--gap-xs);
|
|
37
36
|
padding-bottom: 0;
|
|
38
37
|
background-color: var(--color-light-bg-primary);
|
|
39
38
|
border-top-right-radius: var(--border-radius-xl);
|
|
40
39
|
border-top-left-radius: var(--border-radius-xl);
|
|
40
|
+
z-index: 1;
|
|
41
41
|
}
|
|
42
|
-
.bottom-
|
|
42
|
+
.bottom-sheet__sticky_1ezhe {
|
|
43
43
|
position: sticky;
|
|
44
44
|
top: 0;
|
|
45
45
|
}
|
|
46
|
-
.bottom-
|
|
46
|
+
.bottom-sheet__highlighted_1ezhe {
|
|
47
47
|
border-bottom: var(--bottom-sheet-header-border-bottom);
|
|
48
48
|
}
|
|
49
|
-
.bottom-
|
|
49
|
+
.bottom-sheet__justifyEnd_1ezhe {
|
|
50
50
|
justify-content: flex-end;
|
|
51
51
|
}
|
|
52
|
-
.bottom-
|
|
52
|
+
.bottom-sheet__addon_1ezhe {
|
|
53
53
|
display: flex;
|
|
54
54
|
justify-content: center;
|
|
55
55
|
align-items: center;
|
|
56
56
|
min-width: 48px;
|
|
57
57
|
height: 48px;
|
|
58
58
|
}
|
|
59
|
-
.bottom-
|
|
59
|
+
.bottom-sheet__addonFixed_1ezhe {
|
|
60
60
|
position: fixed;
|
|
61
61
|
}
|
|
62
|
-
.bottom-
|
|
62
|
+
.bottom-sheet__addonLeft_1ezhe {
|
|
63
63
|
left: 0;
|
|
64
64
|
margin-left: var(--gap-xs);
|
|
65
65
|
}
|
|
66
|
-
.bottom-
|
|
66
|
+
.bottom-sheet__addonRight_1ezhe {
|
|
67
67
|
right: 0;
|
|
68
68
|
margin-right: var(--gap-xs);
|
|
69
69
|
}
|
|
70
|
-
.bottom-
|
|
71
|
-
height: 24px;
|
|
70
|
+
.bottom-sheet__title_1ezhe {
|
|
72
71
|
padding: var(--gap-xs) var(--gap-xs);
|
|
73
72
|
margin: var(--bottom-sheet-title-margin-vertical) 0;
|
|
74
73
|
width: 100%;
|
|
@@ -77,23 +76,23 @@
|
|
|
77
76
|
line-height: var(--bottom-sheet-title-line-height);
|
|
78
77
|
font-family: var(--bottom-sheet-title-font-family);
|
|
79
78
|
}
|
|
80
|
-
.bottom-
|
|
79
|
+
.bottom-sheet__titleCenter_1ezhe {
|
|
81
80
|
text-align: center;
|
|
82
81
|
}
|
|
83
|
-
.bottom-
|
|
82
|
+
.bottom-sheet__titleLeft_1ezhe {
|
|
84
83
|
text-align: left;
|
|
85
84
|
}
|
|
86
|
-
.bottom-
|
|
85
|
+
.bottom-sheet__trimTitle_1ezhe {
|
|
87
86
|
white-space: nowrap;
|
|
88
87
|
overflow: hidden;
|
|
89
88
|
text-overflow: ellipsis;
|
|
90
89
|
}
|
|
91
|
-
.bottom-
|
|
90
|
+
.bottom-sheet__titleBigIndentHorizontal_1ezhe {
|
|
92
91
|
margin: var(--bottom-sheet-title-margin-vertical) var(--gap-4xl);
|
|
93
92
|
}
|
|
94
|
-
.bottom-
|
|
93
|
+
.bottom-sheet__titleIndentRight_1ezhe {
|
|
95
94
|
margin-right: var(--gap-4xl);
|
|
96
95
|
}
|
|
97
|
-
.bottom-
|
|
96
|
+
.bottom-sheet__titleIndentLeft_1ezhe {
|
|
98
97
|
margin-left: var(--gap-4xl);
|
|
99
98
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var tslib_es6 = require('../../tslib.es6-
|
|
5
|
+
var tslib_es6 = require('../../tslib.es6-c74c8bbc.js');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
var coreComponentsBackdrop = require('@alfalab/core-components-backdrop');
|
|
8
8
|
|
|
@@ -12,7 +12,7 @@ type HeaderProps = {
|
|
|
12
12
|
/**
|
|
13
13
|
* Дополнительный класс
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
headerClassName?: string;
|
|
16
16
|
/**
|
|
17
17
|
* Дополнительный класс для аддонов
|
|
18
18
|
*/
|
|
@@ -85,10 +85,18 @@ type BottomSheetProps = {
|
|
|
85
85
|
* Дополнительный класс
|
|
86
86
|
*/
|
|
87
87
|
contentClassName?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Дополнительный класс
|
|
90
|
+
*/
|
|
91
|
+
containerClassName?: string;
|
|
88
92
|
/**
|
|
89
93
|
* Дополнительный класс шапки
|
|
90
94
|
*/
|
|
91
95
|
headerClassName?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Дополнительный класс футера
|
|
98
|
+
*/
|
|
99
|
+
footerClassName?: string;
|
|
92
100
|
/**
|
|
93
101
|
* Дополнительный класс для аддонов
|
|
94
102
|
*/
|
|
@@ -23,7 +23,7 @@ var styles__default$1 = /*#__PURE__*/_interopDefaultLegacy(styles$1);
|
|
|
23
23
|
|
|
24
24
|
var Header = function (_a) {
|
|
25
25
|
var _b, _c, _d, _e;
|
|
26
|
-
var title = _a.title,
|
|
26
|
+
var title = _a.title, headerClassName = _a.headerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, titleAlign = _a.titleAlign, trimTitle = _a.trimTitle, sticky = _a.sticky, onBack = _a.onBack;
|
|
27
27
|
var _f = React.useContext(coreComponentsBaseModal.BaseModalContext), headerHighlighted = _f.headerHighlighted, setHasHeader = _f.setHasHeader, setHeaderOffset = _f.setHeaderOffset;
|
|
28
28
|
var hasLeftPart = hasBacker || leftAddons || titleAlign === 'center';
|
|
29
29
|
var hasRightPart = hasCloser || rightAddons || titleAlign === 'center';
|
|
@@ -45,7 +45,7 @@ var Header = function (_a) {
|
|
|
45
45
|
_a[styles__default['default'].titleIndentRight] = !sticky && !titleAlignedCenter && hasRightPart,
|
|
46
46
|
_a));
|
|
47
47
|
};
|
|
48
|
-
return (React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].header,
|
|
48
|
+
return (React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].header, headerClassName, (_b = {},
|
|
49
49
|
_b[styles__default['default'].justifyEnd] = !title,
|
|
50
50
|
_b[styles__default['default'].highlighted] = headerHighlighted && sticky,
|
|
51
51
|
_b[styles__default['default'].sticky] = sticky,
|
|
@@ -75,7 +75,7 @@ var HEADER_OFFSET = 24;
|
|
|
75
75
|
var CLOSE_OFFSET = 0.2;
|
|
76
76
|
var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
77
77
|
var _b, _c, _d;
|
|
78
|
-
var open = _a.open, title = _a.title, actionButton = _a.actionButton, contentClassName = _a.contentClassName, headerClassName = _a.headerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, className = _a.className, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, _e = _a.titleAlign, titleAlign = _e === void 0 ? 'left' : _e, trimTitle = _a.trimTitle, stickyHeader = _a.stickyHeader, _f = _a.stickyFooter, stickyFooter = _f === void 0 ? true : _f, _g = _a.initialHeight, initialHeight = _g === void 0 ? 'default' : _g, hideOverlay = _a.hideOverlay, hideHeader = _a.hideHeader, disableOverlayClick = _a.disableOverlayClick, children = _a.children, zIndex = _a.zIndex, _h = _a.transitionProps, transitionProps = _h === void 0 ? {} : _h, dataTestId = _a.dataTestId, _j = _a.swipeable, swipeable = _j === void 0 ? true : _j, onClose = _a.onClose, onBack = _a.onBack;
|
|
78
|
+
var open = _a.open, title = _a.title, actionButton = _a.actionButton, contentClassName = _a.contentClassName, containerClassName = _a.containerClassName, headerClassName = _a.headerClassName, footerClassName = _a.footerClassName, addonClassName = _a.addonClassName, closerClassName = _a.closerClassName, backerClassName = _a.backerClassName, className = _a.className, leftAddons = _a.leftAddons, rightAddons = _a.rightAddons, hasCloser = _a.hasCloser, hasBacker = _a.hasBacker, _e = _a.titleAlign, titleAlign = _e === void 0 ? 'left' : _e, trimTitle = _a.trimTitle, stickyHeader = _a.stickyHeader, _f = _a.stickyFooter, stickyFooter = _f === void 0 ? true : _f, _g = _a.initialHeight, initialHeight = _g === void 0 ? 'default' : _g, hideOverlay = _a.hideOverlay, hideHeader = _a.hideHeader, disableOverlayClick = _a.disableOverlayClick, children = _a.children, zIndex = _a.zIndex, _h = _a.transitionProps, transitionProps = _h === void 0 ? {} : _h, dataTestId = _a.dataTestId, _j = _a.swipeable, swipeable = _j === void 0 ? true : _j, onClose = _a.onClose, onBack = _a.onBack;
|
|
79
79
|
var _k = React.useState(0), sheetOffset = _k[0], setSheetOffset = _k[1];
|
|
80
80
|
var _l = React.useState(1), backdropOpacity = _l[0], setBackdropOpacity = _l[1];
|
|
81
81
|
var _m = React.useState(false), scrollLocked = _m[0], setScrollLocked = _m[1];
|
|
@@ -219,7 +219,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
|
219
219
|
React__default['default'].createElement("div", tslib_es6.__assign({ className: cn__default['default'](styles__default$1['default'].component, className, (_b = {},
|
|
220
220
|
_b[styles__default$1['default'].withTransition] = !sheetOffset,
|
|
221
221
|
_b)), style: tslib_es6.__assign(tslib_es6.__assign({}, getSwipeStyles()), getHeightStyles()) }, sheetSwipeablehandlers),
|
|
222
|
-
React__default['default'].createElement("div", { className: cn__default['default'](styles__default$1['default'].scrollableContainer, (_c = {},
|
|
222
|
+
React__default['default'].createElement("div", { className: cn__default['default'](styles__default$1['default'].scrollableContainer, containerClassName, (_c = {},
|
|
223
223
|
_c[styles__default$1['default'].scrollLocked] = scrollLocked,
|
|
224
224
|
_c)), ref: scrollableContainer },
|
|
225
225
|
swipeable && React__default['default'].createElement("div", { className: cn__default['default'](styles__default$1['default'].marker) }),
|
|
@@ -228,7 +228,7 @@ var BottomSheet = React.forwardRef(function (_a, ref) {
|
|
|
228
228
|
_d[styles__default$1['default'].noHeader] = hideHeader || emptyHeader,
|
|
229
229
|
_d[styles__default$1['default'].noFooter] = !actionButton,
|
|
230
230
|
_d)) }, children),
|
|
231
|
-
actionButton && React__default['default'].createElement(components_footer_Component.Footer, { sticky: stickyFooter }, actionButton)))));
|
|
231
|
+
actionButton && (React__default['default'].createElement(components_footer_Component.Footer, { sticky: stickyFooter, className: footerClassName }, actionButton))))));
|
|
232
232
|
});
|
|
233
233
|
|
|
234
234
|
exports.BottomSheet = BottomSheet;
|
package/dist/cssm/component.js
CHANGED
|
@@ -17,7 +17,7 @@ require('@alfalab/icons-glyph/ArrowBackMIcon');
|
|
|
17
17
|
require('./components/backer/index.module.css');
|
|
18
18
|
require('./components/backer/Component.js');
|
|
19
19
|
require('./components/header/index.module.css');
|
|
20
|
-
var components_header_Component = require('./component-
|
|
20
|
+
var components_header_Component = require('./component-d1b19e73.js');
|
|
21
21
|
require('./components/footer/index.module.css');
|
|
22
22
|
require('./components/footer/Component.js');
|
|
23
23
|
require('@alfalab/core-components-backdrop/dist/cssm');
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--bottom-sheet-backer-bg-color: var(--color-light-bg-primary-alpha-
|
|
2
|
+
--bottom-sheet-backer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.backer {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
justify-content: center;
|
|
10
10
|
align-items: center;
|
|
11
11
|
cursor: pointer;
|
|
12
|
+
color: var(--color-light-graphic-primary);
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
.button {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
:root {
|
|
2
|
-
--bottom-sheet-closer-bg-color: var(--color-light-bg-primary-alpha-
|
|
2
|
+
--bottom-sheet-closer-bg-color: var(--color-light-bg-primary-inverted-alpha-3);
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.closer {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
justify-content: center;
|
|
10
10
|
align-items: center;
|
|
11
11
|
cursor: pointer;
|
|
12
|
+
color: var(--color-light-graphic-primary);
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
.button {
|
|
@@ -17,7 +17,7 @@ require('@alfalab/icons-glyph/ArrowBackMIcon');
|
|
|
17
17
|
require('../backer/index.module.css');
|
|
18
18
|
require('../backer/Component.js');
|
|
19
19
|
require('./index.module.css');
|
|
20
|
-
var components_header_Component = require('../../component-
|
|
20
|
+
var components_header_Component = require('../../component-d1b19e73.js');
|
|
21
21
|
require('../footer/index.module.css');
|
|
22
22
|
require('../footer/Component.js');
|
|
23
23
|
require('@alfalab/core-components-backdrop/dist/cssm');
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
}
|
|
32
32
|
.header {
|
|
33
33
|
display: flex;
|
|
34
|
-
align-items: center;
|
|
35
34
|
padding: var(--gap-xs);
|
|
36
35
|
padding-bottom: 0;
|
|
37
36
|
background-color: var(--color-light-bg-primary);
|
|
38
37
|
border-top-right-radius: var(--border-radius-xl);
|
|
39
38
|
border-top-left-radius: var(--border-radius-xl);
|
|
39
|
+
z-index: 1;
|
|
40
40
|
}
|
|
41
41
|
.sticky {
|
|
42
42
|
position: sticky;
|
|
@@ -67,7 +67,6 @@
|
|
|
67
67
|
margin-right: var(--gap-xs);
|
|
68
68
|
}
|
|
69
69
|
.title {
|
|
70
|
-
height: 24px;
|
|
71
70
|
padding: var(--gap-xs) var(--gap-xs);
|
|
72
71
|
margin: var(--bottom-sheet-title-margin-vertical) 0;
|
|
73
72
|
width: 100%;
|
package/dist/cssm/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./component-
|
|
1
|
+
export * from "./component-d1b19e73";
|
package/dist/cssm/index.js
CHANGED
|
@@ -17,7 +17,7 @@ require('@alfalab/icons-glyph/ArrowBackMIcon');
|
|
|
17
17
|
require('./components/backer/index.module.css');
|
|
18
18
|
require('./components/backer/Component.js');
|
|
19
19
|
require('./components/header/index.module.css');
|
|
20
|
-
var components_header_Component = require('./component-
|
|
20
|
+
var components_header_Component = require('./component-d1b19e73.js');
|
|
21
21
|
require('./components/footer/index.module.css');
|
|
22
22
|
require('./components/footer/Component.js');
|
|
23
23
|
require('@alfalab/core-components-backdrop/dist/cssm');
|
|
@@ -12,7 +12,7 @@ type HeaderProps = {
|
|
|
12
12
|
/**
|
|
13
13
|
* Дополнительный класс
|
|
14
14
|
*/
|
|
15
|
-
|
|
15
|
+
headerClassName?: string;
|
|
16
16
|
/**
|
|
17
17
|
* Дополнительный класс для аддонов
|
|
18
18
|
*/
|
|
@@ -85,10 +85,18 @@ type BottomSheetProps = {
|
|
|
85
85
|
* Дополнительный класс
|
|
86
86
|
*/
|
|
87
87
|
contentClassName?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Дополнительный класс
|
|
90
|
+
*/
|
|
91
|
+
containerClassName?: string;
|
|
88
92
|
/**
|
|
89
93
|
* Дополнительный класс шапки
|
|
90
94
|
*/
|
|
91
95
|
headerClassName?: string;
|
|
96
|
+
/**
|
|
97
|
+
* Дополнительный класс футера
|
|
98
|
+
*/
|
|
99
|
+
footerClassName?: string;
|
|
92
100
|
/**
|
|
93
101
|
* Дополнительный класс для аддонов
|
|
94
102
|
*/
|