@alfalab/core-components-bottom-sheet 3.1.1 → 4.0.2
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/CHANGELOG.md +36 -0
- package/dist/component-67cb6035.d.ts +181 -0
- package/dist/component-67cb6035.js +239 -0
- package/dist/component.d.ts +0 -55
- package/dist/component.js +18 -144
- package/dist/components/backer/Component.d.ts +24 -0
- package/dist/components/backer/Component.js +25 -0
- package/dist/components/backer/index.css +20 -0
- package/dist/components/closer/Component.d.ts +20 -0
- package/dist/components/closer/Component.js +30 -0
- package/dist/components/closer/index.css +20 -0
- package/dist/components/footer/Component.d.ts +4 -0
- package/dist/components/footer/Component.js +4 -3
- package/dist/components/footer/index.css +14 -8
- package/dist/components/header/Component.d.ts +0 -0
- package/dist/components/header/Component.js +24 -0
- package/dist/components/header/index.css +99 -0
- package/dist/components/swipeable-backdrop/Component.d.ts +19 -0
- package/dist/components/swipeable-backdrop/Component.js +12 -4
- package/dist/cssm/component-1deadd87.d.ts +181 -0
- package/dist/cssm/component-1deadd87.js +237 -0
- package/dist/cssm/component.d.ts +0 -55
- package/dist/cssm/component.js +22 -143
- package/dist/cssm/components/backer/Component.d.ts +24 -0
- package/dist/cssm/components/backer/Component.js +24 -0
- package/dist/cssm/components/backer/index.module.css +19 -0
- package/dist/cssm/components/closer/Component.d.ts +20 -0
- package/dist/cssm/components/closer/Component.js +29 -0
- package/dist/cssm/components/closer/index.module.css +19 -0
- package/dist/cssm/components/footer/Component.d.ts +4 -0
- package/dist/cssm/components/footer/Component.js +3 -2
- package/dist/cssm/components/footer/index.module.css +11 -5
- package/dist/cssm/components/header/Component.d.ts +0 -0
- package/dist/cssm/components/header/Component.js +29 -0
- package/dist/cssm/components/header/index.module.css +98 -0
- package/dist/cssm/components/swipeable-backdrop/Component.d.ts +19 -0
- package/dist/cssm/components/swipeable-backdrop/Component.js +12 -4
- package/dist/cssm/index.d.ts +1 -1
- package/dist/cssm/index.js +15 -4
- package/dist/cssm/index.module.css +24 -18
- package/dist/{Component-dda925d9.d.ts → cssm/tslib.es6-ce870b46.d.ts} +1 -19
- package/dist/{Component-dda925d9.js → cssm/tslib.es6-ce870b46.js} +1 -14
- package/dist/esm/component-ea51573a.d.ts +181 -0
- package/dist/esm/component-ea51573a.js +229 -0
- package/dist/esm/component.d.ts +0 -55
- package/dist/esm/component.js +15 -141
- package/dist/esm/components/backer/Component.d.ts +24 -0
- package/dist/esm/components/backer/Component.js +16 -0
- package/dist/esm/components/backer/index.css +20 -0
- package/dist/esm/components/closer/Component.d.ts +20 -0
- package/dist/esm/components/closer/Component.js +21 -0
- package/dist/esm/components/closer/index.css +20 -0
- package/dist/esm/components/footer/Component.d.ts +4 -0
- package/dist/esm/components/footer/Component.js +4 -3
- package/dist/esm/components/footer/index.css +14 -8
- package/dist/esm/components/header/Component.d.ts +0 -0
- package/dist/esm/components/header/Component.js +16 -0
- package/dist/esm/components/header/index.css +99 -0
- package/dist/esm/components/swipeable-backdrop/Component.d.ts +19 -0
- package/dist/esm/components/swipeable-backdrop/Component.js +11 -3
- package/dist/esm/index.css +36 -30
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +9 -2
- package/dist/esm/{Component-83ac5461.d.ts → tslib.es6-b6293862.d.ts} +1 -19
- package/dist/esm/{Component-83ac5461.js → tslib.es6-b6293862.js} +1 -10
- package/dist/index.css +36 -30
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -4
- package/dist/modern/component-af296d00.d.ts +181 -0
- package/dist/modern/component-af296d00.js +230 -0
- package/dist/modern/component.d.ts +0 -55
- package/dist/modern/component.js +14 -143
- package/dist/modern/components/backer/Component.d.ts +24 -0
- package/dist/modern/components/backer/Component.js +14 -0
- package/dist/modern/components/backer/index.css +20 -0
- package/dist/modern/components/closer/Component.d.ts +20 -0
- package/dist/modern/components/closer/Component.js +19 -0
- package/dist/modern/components/closer/index.css +20 -0
- package/dist/modern/components/footer/Component.d.ts +4 -0
- package/dist/modern/components/footer/Component.js +4 -3
- package/dist/modern/components/footer/index.css +14 -8
- package/dist/modern/components/header/Component.d.ts +0 -0
- package/dist/modern/components/header/Component.js +15 -0
- package/dist/modern/components/header/index.css +99 -0
- package/dist/modern/index.css +36 -30
- package/dist/modern/index.d.ts +1 -1
- package/dist/modern/index.js +7 -1
- package/dist/{cssm/Component-24200d96.d.ts → tslib.es6-80cc1ada.d.ts} +1 -19
- package/dist/{cssm/Component-24200d96.js → tslib.es6-80cc1ada.js} +1 -14
- package/package.json +6 -4
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib_es6 = require('../../tslib.es6-ce870b46.js');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var cn = require('classnames');
|
|
8
|
+
var coreComponentsIconButton = require('@alfalab/core-components-icon-button/dist/cssm');
|
|
9
|
+
var ArrowBackMIcon = require('@alfalab/icons-glyph/ArrowBackMIcon');
|
|
10
|
+
var styles = require('./index.module.css');
|
|
11
|
+
|
|
12
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
13
|
+
|
|
14
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
15
|
+
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
16
|
+
var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
|
|
17
|
+
|
|
18
|
+
var Backer = function (_a) {
|
|
19
|
+
var className = _a.className, _b = _a.size, size = _b === void 0 ? 'xs' : _b, _c = _a.icon, icon = _c === void 0 ? ArrowBackMIcon.ArrowBackMIcon : _c, onClick = _a.onClick, restProps = tslib_es6.__rest(_a, ["className", "size", "icon", "onClick"]);
|
|
20
|
+
return (React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].backer, className) },
|
|
21
|
+
React__default['default'].createElement(coreComponentsIconButton.IconButton, tslib_es6.__assign({ size: size, className: styles__default['default'].button, "aria-label": '\u043D\u0430\u0437\u0430\u0434', onClick: onClick, icon: icon }, restProps))));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.Backer = Backer;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--bottom-sheet-backer-bg-color: var(--color-light-bg-primary-alpha-40);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.backer {
|
|
6
|
+
width: 32px;
|
|
7
|
+
height: 32px;
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: center;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.button {
|
|
15
|
+
background: var(--bottom-sheet-backer-bg-color);
|
|
16
|
+
-webkit-backdrop-filter: blur(10px);
|
|
17
|
+
backdrop-filter: blur(10px);
|
|
18
|
+
border-radius: 50px;
|
|
19
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ButtonHTMLAttributes, ElementType } from "react";
|
|
4
|
+
import { IconButtonProps } from "@alfalab/core-components-icon-button";
|
|
5
|
+
type CloserProps = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
6
|
+
/**
|
|
7
|
+
* Дополнительный класс
|
|
8
|
+
*/
|
|
9
|
+
className?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Размер кнопки
|
|
12
|
+
*/
|
|
13
|
+
size?: IconButtonProps['size'];
|
|
14
|
+
/**
|
|
15
|
+
* Иконка
|
|
16
|
+
*/
|
|
17
|
+
icon?: ElementType;
|
|
18
|
+
};
|
|
19
|
+
declare const Closer: React.FC<CloserProps>;
|
|
20
|
+
export { CloserProps, Closer };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var tslib_es6 = require('../../tslib.es6-ce870b46.js');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var cn = require('classnames');
|
|
8
|
+
var coreComponentsBaseModal = require('@alfalab/core-components-base-modal/dist/cssm');
|
|
9
|
+
var coreComponentsIconButton = require('@alfalab/core-components-icon-button/dist/cssm');
|
|
10
|
+
var CrossMIcon = require('@alfalab/icons-glyph/CrossMIcon');
|
|
11
|
+
var styles = require('./index.module.css');
|
|
12
|
+
|
|
13
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
14
|
+
|
|
15
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
16
|
+
var cn__default = /*#__PURE__*/_interopDefaultLegacy(cn);
|
|
17
|
+
var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
|
|
18
|
+
|
|
19
|
+
var Closer = function (_a) {
|
|
20
|
+
var className = _a.className, _b = _a.size, size = _b === void 0 ? 'xs' : _b, _c = _a.icon, icon = _c === void 0 ? CrossMIcon.CrossMIcon : _c, restProps = tslib_es6.__rest(_a, ["className", "size", "icon"]);
|
|
21
|
+
var onClose = React.useContext(coreComponentsBaseModal.BaseModalContext).onClose;
|
|
22
|
+
var handleClick = React.useCallback(function (event) {
|
|
23
|
+
onClose(event, 'closerClick');
|
|
24
|
+
}, [onClose]);
|
|
25
|
+
return (React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].closer, className) },
|
|
26
|
+
React__default['default'].createElement(coreComponentsIconButton.IconButton, tslib_es6.__assign({ size: size, className: styles__default['default'].button, "aria-label": '\u0437\u0430\u043A\u0440\u044B\u0442\u044C', onClick: handleClick, icon: icon }, restProps))));
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
exports.Closer = Closer;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--bottom-sheet-closer-bg-color: var(--color-light-bg-primary-alpha-40);
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.closer {
|
|
6
|
+
width: 32px;
|
|
7
|
+
height: 32px;
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: center;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.button {
|
|
15
|
+
background: var(--bottom-sheet-closer-bg-color);
|
|
16
|
+
-webkit-backdrop-filter: blur(10px);
|
|
17
|
+
backdrop-filter: blur(10px);
|
|
18
|
+
border-radius: 50px;
|
|
19
|
+
}
|
|
@@ -15,13 +15,14 @@ var styles__default = /*#__PURE__*/_interopDefaultLegacy(styles);
|
|
|
15
15
|
|
|
16
16
|
var Footer = function (_a) {
|
|
17
17
|
var _b;
|
|
18
|
-
var children = _a.children, className = _a.className;
|
|
18
|
+
var children = _a.children, className = _a.className, sticky = _a.sticky;
|
|
19
19
|
var _c = React.useContext(coreComponentsBaseModal.BaseModalContext), footerHighlighted = _c.footerHighlighted, setHasFooter = _c.setHasFooter;
|
|
20
20
|
React.useEffect(function () {
|
|
21
21
|
setHasFooter(true);
|
|
22
22
|
}, [setHasFooter]);
|
|
23
23
|
return (React__default['default'].createElement("div", { className: cn__default['default'](styles__default['default'].footer, className, (_b = {},
|
|
24
|
-
_b[styles__default['default'].
|
|
24
|
+
_b[styles__default['default'].sticky] = sticky,
|
|
25
|
+
_b[styles__default['default'].highlighted] = footerHighlighted && sticky,
|
|
25
26
|
_b)) }, children));
|
|
26
27
|
};
|
|
27
28
|
|
|
@@ -1,25 +1,31 @@
|
|
|
1
1
|
:root {
|
|
2
2
|
--color-light-bg-primary: #fff;
|
|
3
|
+
--color-light-border-primary: #dbdee1;
|
|
3
4
|
}
|
|
4
5
|
:root {
|
|
5
6
|
|
|
6
7
|
/* Hard */
|
|
7
8
|
|
|
8
9
|
/* Up */
|
|
9
|
-
--shadow-s-up: 0 0 8px rgba(11, 31, 53, 0.04), 0 -4px 8px rgba(11, 31, 53, 0.08);
|
|
10
10
|
|
|
11
11
|
/* Hard up */
|
|
12
12
|
}
|
|
13
13
|
:root {
|
|
14
14
|
--gap-m: 16px;
|
|
15
|
-
|
|
15
|
+
}
|
|
16
|
+
:root {
|
|
17
|
+
--bottom-sheet-footer-border-top: 1px solid var(--color-light-border-primary);
|
|
18
|
+
--bottom-sheet-footer-background-color: var(--color-light-bg-primary);
|
|
16
19
|
}
|
|
17
20
|
.footer {
|
|
21
|
+
padding: var(--gap-m) var(--gap-m);
|
|
22
|
+
background-color: var(--color-light-bg-primary);
|
|
23
|
+
}
|
|
24
|
+
.sticky {
|
|
18
25
|
position: sticky;
|
|
19
26
|
bottom: 0;
|
|
20
|
-
padding: var(--gap-m) var(--gap-m) var(--gap-3xl);
|
|
21
|
-
background-color: var(--color-light-bg-primary);
|
|
22
27
|
}
|
|
23
28
|
.highlighted {
|
|
24
|
-
|
|
29
|
+
border-top: var(--bottom-sheet-footer-border-top);
|
|
30
|
+
background-color: var(--bottom-sheet-footer-background-color);
|
|
25
31
|
}
|
|
File without changes
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
require('../../tslib.es6-ce870b46.js');
|
|
6
|
+
require('react');
|
|
7
|
+
require('classnames');
|
|
8
|
+
require('react-div-100vh');
|
|
9
|
+
require('react-swipeable');
|
|
10
|
+
require('@alfalab/core-components-base-modal/dist/cssm');
|
|
11
|
+
require('@alfalab/core-components-typography/dist/cssm');
|
|
12
|
+
require('@alfalab/core-components-icon-button/dist/cssm');
|
|
13
|
+
require('@alfalab/icons-glyph/CrossMIcon');
|
|
14
|
+
require('../closer/index.module.css');
|
|
15
|
+
require('../closer/Component.js');
|
|
16
|
+
require('@alfalab/icons-glyph/ArrowBackMIcon');
|
|
17
|
+
require('../backer/index.module.css');
|
|
18
|
+
require('../backer/Component.js');
|
|
19
|
+
require('./index.module.css');
|
|
20
|
+
var components_header_Component = require('../../component-1deadd87.js');
|
|
21
|
+
require('../footer/index.module.css');
|
|
22
|
+
require('../footer/Component.js');
|
|
23
|
+
require('@alfalab/core-components-backdrop/dist/cssm');
|
|
24
|
+
require('../swipeable-backdrop/Component.js');
|
|
25
|
+
require('../../index.module.css');
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
exports.Header = components_header_Component.Header;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--color-light-bg-primary: #fff;
|
|
3
|
+
}
|
|
4
|
+
:root {
|
|
5
|
+
|
|
6
|
+
/* Hard */
|
|
7
|
+
|
|
8
|
+
/* Up */
|
|
9
|
+
|
|
10
|
+
/* Hard up */
|
|
11
|
+
}
|
|
12
|
+
:root {
|
|
13
|
+
--gap-2xs: 4px;
|
|
14
|
+
--gap-xs: 8px;
|
|
15
|
+
--gap-4xl: 48px;
|
|
16
|
+
}
|
|
17
|
+
:root {
|
|
18
|
+
--font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
|
|
19
|
+
sans-serif;
|
|
20
|
+
}
|
|
21
|
+
:root {
|
|
22
|
+
--border-radius-xl: 16px;
|
|
23
|
+
}
|
|
24
|
+
:root {
|
|
25
|
+
--bottom-sheet-header-border-bottom: none;
|
|
26
|
+
--bottom-sheet-title-font-size: 18px;
|
|
27
|
+
--bottom-sheet-title-font-weight: 700;
|
|
28
|
+
--bottom-sheet-title-line-height: 24px;
|
|
29
|
+
--bottom-sheet-title-font-family: var(--font-family-system);
|
|
30
|
+
--bottom-sheet-title-margin-vertical: var(--gap-2xs);
|
|
31
|
+
}
|
|
32
|
+
.header {
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
padding: var(--gap-xs);
|
|
36
|
+
padding-bottom: 0;
|
|
37
|
+
background-color: var(--color-light-bg-primary);
|
|
38
|
+
border-top-right-radius: var(--border-radius-xl);
|
|
39
|
+
border-top-left-radius: var(--border-radius-xl);
|
|
40
|
+
}
|
|
41
|
+
.sticky {
|
|
42
|
+
position: sticky;
|
|
43
|
+
top: 0;
|
|
44
|
+
}
|
|
45
|
+
.highlighted {
|
|
46
|
+
border-bottom: var(--bottom-sheet-header-border-bottom);
|
|
47
|
+
}
|
|
48
|
+
.justifyEnd {
|
|
49
|
+
justify-content: flex-end;
|
|
50
|
+
}
|
|
51
|
+
.addon {
|
|
52
|
+
display: flex;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
align-items: center;
|
|
55
|
+
min-width: 48px;
|
|
56
|
+
height: 48px;
|
|
57
|
+
}
|
|
58
|
+
.addonFixed {
|
|
59
|
+
position: fixed;
|
|
60
|
+
}
|
|
61
|
+
.addonLeft {
|
|
62
|
+
left: 0;
|
|
63
|
+
margin-left: var(--gap-xs);
|
|
64
|
+
}
|
|
65
|
+
.addonRight {
|
|
66
|
+
right: 0;
|
|
67
|
+
margin-right: var(--gap-xs);
|
|
68
|
+
}
|
|
69
|
+
.title {
|
|
70
|
+
height: 24px;
|
|
71
|
+
padding: var(--gap-xs) var(--gap-xs);
|
|
72
|
+
margin: var(--bottom-sheet-title-margin-vertical) 0;
|
|
73
|
+
width: 100%;
|
|
74
|
+
font-size: var(--bottom-sheet-title-font-size);
|
|
75
|
+
font-weight: var(--bottom-sheet-title-font-weight);
|
|
76
|
+
line-height: var(--bottom-sheet-title-line-height);
|
|
77
|
+
font-family: var(--bottom-sheet-title-font-family);
|
|
78
|
+
}
|
|
79
|
+
.titleCenter {
|
|
80
|
+
text-align: center;
|
|
81
|
+
}
|
|
82
|
+
.titleLeft {
|
|
83
|
+
text-align: left;
|
|
84
|
+
}
|
|
85
|
+
.trimTitle {
|
|
86
|
+
white-space: nowrap;
|
|
87
|
+
overflow: hidden;
|
|
88
|
+
text-overflow: ellipsis;
|
|
89
|
+
}
|
|
90
|
+
.titleBigIndentHorizontal {
|
|
91
|
+
margin: var(--bottom-sheet-title-margin-vertical) var(--gap-4xl);
|
|
92
|
+
}
|
|
93
|
+
.titleIndentRight {
|
|
94
|
+
margin-right: var(--gap-4xl);
|
|
95
|
+
}
|
|
96
|
+
.titleIndentLeft {
|
|
97
|
+
margin-left: var(--gap-4xl);
|
|
98
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { BackdropProps } from "@alfalab/core-components-backdrop";
|
|
3
|
+
import { SwipeableHandlers } from 'react-swipeable/types';
|
|
4
|
+
type SwipeableBackdropProps = BackdropProps & {
|
|
5
|
+
/**
|
|
6
|
+
* Прозрачность бэкдропа
|
|
7
|
+
*/
|
|
8
|
+
opacity?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Обработчики свайпа
|
|
11
|
+
*/
|
|
12
|
+
handlers?: SwipeableHandlers;
|
|
13
|
+
/**
|
|
14
|
+
* Время анимации opacity
|
|
15
|
+
*/
|
|
16
|
+
opacityTimeout?: number;
|
|
17
|
+
};
|
|
18
|
+
declare const SwipeableBackdrop: FC<SwipeableBackdropProps>;
|
|
19
|
+
export { SwipeableBackdropProps, SwipeableBackdrop };
|
|
@@ -2,10 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('react');
|
|
7
|
-
require('@alfalab/core-components-backdrop/dist/cssm');
|
|
5
|
+
var tslib_es6 = require('../../tslib.es6-ce870b46.js');
|
|
6
|
+
var React = require('react');
|
|
7
|
+
var coreComponentsBackdrop = require('@alfalab/core-components-backdrop/dist/cssm');
|
|
8
8
|
|
|
9
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
10
|
|
|
11
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
var SwipeableBackdrop = function (_a) {
|
|
14
|
+
var opacity = _a.opacity, handlers = _a.handlers, opacityTimeout = _a.opacityTimeout, style = _a.style, backdropProps = tslib_es6.__rest(_a, ["opacity", "handlers", "opacityTimeout", "style"]);
|
|
15
|
+
return (React__default['default'].createElement("div", tslib_es6.__assign({}, handlers, { style: tslib_es6.__assign({ opacity: opacity, transition: opacity === 1 ? "opacity " + opacityTimeout + "ms ease-in-out" : '', position: 'relative' }, style) }),
|
|
16
|
+
React__default['default'].createElement(coreComponentsBackdrop.Backdrop, tslib_es6.__assign({}, backdropProps))));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
exports.SwipeableBackdrop = SwipeableBackdrop;
|
package/dist/cssm/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./component";
|
|
1
|
+
export * from "./component-1deadd87";
|
package/dist/cssm/index.js
CHANGED
|
@@ -2,19 +2,30 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
require('./
|
|
5
|
+
require('./tslib.es6-ce870b46.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('classnames');
|
|
8
|
+
require('react-div-100vh');
|
|
8
9
|
require('react-swipeable');
|
|
9
10
|
require('@alfalab/core-components-base-modal/dist/cssm');
|
|
10
11
|
require('@alfalab/core-components-typography/dist/cssm');
|
|
12
|
+
require('@alfalab/core-components-icon-button/dist/cssm');
|
|
13
|
+
require('@alfalab/icons-glyph/CrossMIcon');
|
|
14
|
+
require('./components/closer/index.module.css');
|
|
15
|
+
require('./components/closer/Component.js');
|
|
16
|
+
require('@alfalab/icons-glyph/ArrowBackMIcon');
|
|
17
|
+
require('./components/backer/index.module.css');
|
|
18
|
+
require('./components/backer/Component.js');
|
|
19
|
+
require('./components/header/index.module.css');
|
|
20
|
+
var components_header_Component = require('./component-1deadd87.js');
|
|
11
21
|
require('./components/footer/index.module.css');
|
|
12
22
|
require('./components/footer/Component.js');
|
|
13
23
|
require('@alfalab/core-components-backdrop/dist/cssm');
|
|
24
|
+
require('./components/swipeable-backdrop/Component.js');
|
|
14
25
|
require('./index.module.css');
|
|
15
|
-
var component = require('./component.js');
|
|
16
26
|
|
|
17
27
|
|
|
18
28
|
|
|
19
|
-
exports.BottomSheet =
|
|
20
|
-
exports.CLOSE_OFFSET =
|
|
29
|
+
exports.BottomSheet = components_header_Component.BottomSheet;
|
|
30
|
+
exports.CLOSE_OFFSET = components_header_Component.CLOSE_OFFSET;
|
|
31
|
+
exports.HEADER_OFFSET = components_header_Component.HEADER_OFFSET;
|
|
@@ -12,10 +12,12 @@
|
|
|
12
12
|
/* Hard up */
|
|
13
13
|
}
|
|
14
14
|
:root {
|
|
15
|
-
--gap-
|
|
15
|
+
--gap-2xs: 4px;
|
|
16
16
|
--gap-m: 16px;
|
|
17
17
|
--gap-xl: 24px;
|
|
18
|
-
|
|
18
|
+
}
|
|
19
|
+
:root {
|
|
20
|
+
--border-radius-xl: 16px;
|
|
19
21
|
}
|
|
20
22
|
:root {
|
|
21
23
|
--bottom-sheet-in-transition: 0.5s cubic-bezier(0.09, 0.91, 0.18, 0.99);
|
|
@@ -29,45 +31,49 @@
|
|
|
29
31
|
max-width: 600px;
|
|
30
32
|
}
|
|
31
33
|
.component {
|
|
34
|
+
overflow: hidden;
|
|
32
35
|
position: relative;
|
|
33
36
|
display: flex;
|
|
34
37
|
flex-direction: column;
|
|
35
|
-
|
|
36
|
-
border-top-
|
|
37
|
-
border-top-left-radius: 16px;
|
|
38
|
+
border-top-right-radius: var(--border-radius-xl);
|
|
39
|
+
border-top-left-radius: var(--border-radius-xl);
|
|
38
40
|
background: var(--color-light-bg-primary);
|
|
39
41
|
transform: translateY(100%);
|
|
40
42
|
}
|
|
41
43
|
.withTransition {
|
|
42
44
|
transition: var(--bottom-sheet-out-transition);
|
|
43
45
|
}
|
|
46
|
+
.scrollableContainer {
|
|
47
|
+
overflow: auto;
|
|
48
|
+
display: flex;
|
|
49
|
+
flex-direction: column;
|
|
50
|
+
position: relative;
|
|
51
|
+
height: 100%;
|
|
52
|
+
}
|
|
44
53
|
.marker {
|
|
45
|
-
position:
|
|
46
|
-
top: var(--gap-
|
|
54
|
+
position: fixed;
|
|
55
|
+
top: var(--gap-2xs);
|
|
47
56
|
left: 50%;
|
|
48
57
|
width: 36px;
|
|
49
58
|
height: 4px;
|
|
50
59
|
border-radius: 20px;
|
|
51
60
|
transform: translateX(-50%);
|
|
52
61
|
background-color: var(--color-light-graphic-neutral);
|
|
53
|
-
|
|
54
|
-
.scrollableContainer {
|
|
55
|
-
overflow: auto;
|
|
56
|
-
padding-top: var(--gap-2xl);
|
|
57
|
-
}
|
|
58
|
-
.withPadding {
|
|
59
|
-
padding-bottom: var(--gap-xl);
|
|
62
|
+
z-index: 1000;
|
|
60
63
|
}
|
|
61
64
|
.content {
|
|
62
65
|
display: flex;
|
|
63
66
|
flex-direction: column;
|
|
64
67
|
flex: 1;
|
|
65
|
-
padding: 0 var(--gap-m)
|
|
68
|
+
padding: 0 var(--gap-m);
|
|
66
69
|
color: var(--color-light-text-primary);
|
|
70
|
+
background-color: var(--color-light-bg-primary);
|
|
67
71
|
}
|
|
68
|
-
.
|
|
69
|
-
|
|
70
|
-
|
|
72
|
+
.noHeader {
|
|
73
|
+
padding-top: var(--gap-xl);
|
|
74
|
+
}
|
|
75
|
+
.noFooter {
|
|
76
|
+
padding-bottom: var(--gap-m);
|
|
71
77
|
}
|
|
72
78
|
.scrollLocked {
|
|
73
79
|
overflow: hidden;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { BackdropProps } from "@alfalab/core-components-backdrop";
|
|
3
|
-
import { SwipeableHandlers } from 'react-swipeable/types';
|
|
4
1
|
declare function __extends(d: any, b: any): void;
|
|
5
2
|
declare function __rest(s: any, e: any): {};
|
|
6
3
|
declare function __decorate(decorators: any, target: any, key: any, desc: any, ...args: any[]): any;
|
|
@@ -32,19 +29,4 @@ declare function __classPrivateFieldGet(receiver: any, privateMap: any): any;
|
|
|
32
29
|
declare function __classPrivateFieldSet(receiver: any, privateMap: any, value: any): any;
|
|
33
30
|
declare function __assign(...args: any[]): any;
|
|
34
31
|
declare function __createBinding(o: any, m: any, k: any, k2: any): void;
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Прозрачность бэкдропа
|
|
38
|
-
*/
|
|
39
|
-
opacity?: number;
|
|
40
|
-
/**
|
|
41
|
-
* Обработчики свайпа
|
|
42
|
-
*/
|
|
43
|
-
handlers?: SwipeableHandlers;
|
|
44
|
-
/**
|
|
45
|
-
* Время анимации opacity
|
|
46
|
-
*/
|
|
47
|
-
opacityTimeout?: number;
|
|
48
|
-
};
|
|
49
|
-
declare const SwipeableBackdrop: FC<SwipeableBackdropProps>;
|
|
50
|
-
export { __extends, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __assign, __createBinding, SwipeableBackdropProps, SwipeableBackdrop };
|
|
32
|
+
export { __extends, __rest, __decorate, __param, __metadata, __awaiter, __generator, __exportStar, __values, __read, __spread, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet, __assign, __createBinding };
|
|
@@ -1,12 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var React = require('react');
|
|
4
|
-
var coreComponentsBackdrop = require('@alfalab/core-components-backdrop');
|
|
5
|
-
|
|
6
|
-
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
7
|
-
|
|
8
|
-
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
9
|
-
|
|
10
3
|
/*! *****************************************************************************
|
|
11
4
|
Copyright (c) Microsoft Corporation.
|
|
12
5
|
|
|
@@ -46,10 +39,4 @@ function __rest(s, e) {
|
|
|
46
39
|
return t;
|
|
47
40
|
}
|
|
48
41
|
|
|
49
|
-
|
|
50
|
-
var opacity = _a.opacity, handlers = _a.handlers, opacityTimeout = _a.opacityTimeout, style = _a.style, backdropProps = __rest(_a, ["opacity", "handlers", "opacityTimeout", "style"]);
|
|
51
|
-
return (React__default['default'].createElement("div", exports.__assign({}, handlers, { style: exports.__assign({ opacity: opacity, transition: opacity === 1 ? "opacity " + opacityTimeout + "ms ease-in-out" : '', position: 'relative' }, style) }),
|
|
52
|
-
React__default['default'].createElement(coreComponentsBackdrop.Backdrop, exports.__assign({}, backdropProps))));
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
exports.SwipeableBackdrop = SwipeableBackdrop;
|
|
42
|
+
exports.__rest = __rest;
|