@alfalab/core-components-bottom-sheet 3.0.2 → 4.0.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/CHANGELOG.md +35 -0
- package/dist/component-0665a3d7.d.ts +186 -0
- package/dist/component-0665a3d7.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 +16 -0
- package/dist/components/closer/Component.d.ts +20 -0
- package/dist/components/closer/Component.js +30 -0
- package/dist/components/closer/index.css +16 -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 +111 -0
- package/dist/components/swipeable-backdrop/Component.d.ts +19 -0
- package/dist/components/swipeable-backdrop/Component.js +12 -4
- package/dist/cssm/component-4b59a168.d.ts +186 -0
- package/dist/cssm/component-4b59a168.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 +15 -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 +15 -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 +110 -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 +23 -17
- package/dist/{Component-2ea4e400.d.ts → cssm/tslib.es6-ce870b46.d.ts} +1 -19
- package/dist/{Component-2ea4e400.js → cssm/tslib.es6-ce870b46.js} +1 -14
- package/dist/esm/component-2501d7d0.d.ts +186 -0
- package/dist/esm/component-2501d7d0.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 +16 -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 +16 -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 +111 -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 +35 -29
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +9 -2
- package/dist/esm/{Component-6badd464.d.ts → tslib.es6-97cd96ee.d.ts} +1 -19
- package/dist/esm/{Component-6badd464.js → tslib.es6-97cd96ee.js} +1 -10
- package/dist/index.css +35 -29
- package/dist/index.d.ts +1 -1
- package/dist/index.js +12 -4
- package/dist/modern/component-6718dad9.d.ts +186 -0
- package/dist/modern/component-6718dad9.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 +16 -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 +16 -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 +111 -0
- package/dist/modern/index.css +35 -29
- package/dist/modern/index.d.ts +1 -1
- package/dist/modern/index.js +7 -1
- package/dist/{cssm/Component-24200d96.d.ts → tslib.es6-4d9b8d1d.d.ts} +1 -19
- package/dist/{cssm/Component-24200d96.js → tslib.es6-4d9b8d1d.js} +1 -14
- package/package.json +6 -4
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { IconButton } from '@alfalab/core-components-icon-button/dist/modern';
|
|
4
|
+
import { ArrowBackMIcon } from '@alfalab/icons-glyph/ArrowBackMIcon';
|
|
5
|
+
|
|
6
|
+
var styles = {"backer":"bottom-sheet__backer_1svh2","button":"bottom-sheet__button_1svh2"};
|
|
7
|
+
require('./index.css')
|
|
8
|
+
|
|
9
|
+
const Backer = ({ className, size = 'xs', icon = ArrowBackMIcon, onClick, ...restProps }) => {
|
|
10
|
+
return (React.createElement("div", { className: cn(styles.backer, className) },
|
|
11
|
+
React.createElement(IconButton, Object.assign({ size: size, className: styles.button, "aria-label": '\u043D\u0430\u0437\u0430\u0434', onClick: onClick, icon: icon }, restProps))));
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { Backer };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* hash: k9who */
|
|
2
|
+
.bottom-sheet__backer_1svh2 {
|
|
3
|
+
width: 32px;
|
|
4
|
+
height: 32px;
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
align-items: center;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.bottom-sheet__button_1svh2 {
|
|
12
|
+
background: rgba(0, 0, 0, 0.04);
|
|
13
|
+
-webkit-backdrop-filter: blur(10px);
|
|
14
|
+
backdrop-filter: blur(10px);
|
|
15
|
+
border-radius: 50px;
|
|
16
|
+
}
|
|
@@ -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,19 @@
|
|
|
1
|
+
import React, { useContext, useCallback } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { BaseModalContext } from '@alfalab/core-components-base-modal/dist/modern';
|
|
4
|
+
import { IconButton } from '@alfalab/core-components-icon-button/dist/modern';
|
|
5
|
+
import { CrossMIcon } from '@alfalab/icons-glyph/CrossMIcon';
|
|
6
|
+
|
|
7
|
+
var styles = {"closer":"bottom-sheet__closer_3tn3y","button":"bottom-sheet__button_3tn3y"};
|
|
8
|
+
require('./index.css')
|
|
9
|
+
|
|
10
|
+
const Closer = ({ className, size = 'xs', icon = CrossMIcon, ...restProps }) => {
|
|
11
|
+
const { onClose } = useContext(BaseModalContext);
|
|
12
|
+
const handleClick = useCallback((event) => {
|
|
13
|
+
onClose(event, 'closerClick');
|
|
14
|
+
}, [onClose]);
|
|
15
|
+
return (React.createElement("div", { className: cn(styles.closer, className) },
|
|
16
|
+
React.createElement(IconButton, Object.assign({ size: size, className: styles.button, "aria-label": '\u0437\u0430\u043A\u0440\u044B\u0442\u044C', onClick: handleClick, icon: icon }, restProps))));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { Closer };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* hash: ycx49 */
|
|
2
|
+
.bottom-sheet__closer_3tn3y {
|
|
3
|
+
width: 32px;
|
|
4
|
+
height: 32px;
|
|
5
|
+
display: flex;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
align-items: center;
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.bottom-sheet__button_3tn3y {
|
|
12
|
+
background: rgba(0, 0, 0, 0.04);
|
|
13
|
+
-webkit-backdrop-filter: blur(10px);
|
|
14
|
+
backdrop-filter: blur(10px);
|
|
15
|
+
border-radius: 50px;
|
|
16
|
+
}
|
|
@@ -2,16 +2,17 @@ import React, { useContext, useEffect } from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { BaseModalContext } from '@alfalab/core-components-base-modal/dist/modern';
|
|
4
4
|
|
|
5
|
-
var styles = {"footer":"bottom-
|
|
5
|
+
var styles = {"footer":"bottom-sheet__footer_1jt1d","sticky":"bottom-sheet__sticky_1jt1d","highlighted":"bottom-sheet__highlighted_1jt1d"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
|
-
const Footer = ({ children, className }) => {
|
|
8
|
+
const Footer = ({ children, className, sticky }) => {
|
|
9
9
|
const { footerHighlighted, setHasFooter } = useContext(BaseModalContext);
|
|
10
10
|
useEffect(() => {
|
|
11
11
|
setHasFooter(true);
|
|
12
12
|
}, [setHasFooter]);
|
|
13
13
|
return (React.createElement("div", { className: cn(styles.footer, className, {
|
|
14
|
-
[styles.
|
|
14
|
+
[styles.sticky]: sticky,
|
|
15
|
+
[styles.highlighted]: footerHighlighted && sticky,
|
|
15
16
|
}) }, children));
|
|
16
17
|
};
|
|
17
18
|
|
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1585q */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
|
+
--color-light-border-primary: #dbdee1;
|
|
4
5
|
}
|
|
5
6
|
:root {
|
|
6
7
|
|
|
7
8
|
/* Hard */
|
|
8
9
|
|
|
9
10
|
/* Up */
|
|
10
|
-
--shadow-s-up: 0 0 8px rgba(11, 31, 53, 0.04), 0 -4px 8px rgba(11, 31, 53, 0.08);
|
|
11
11
|
|
|
12
12
|
/* Hard up */
|
|
13
13
|
}
|
|
14
14
|
:root {
|
|
15
15
|
--gap-m: 16px;
|
|
16
|
-
--gap-3xl: 40px;
|
|
17
16
|
}
|
|
18
|
-
|
|
17
|
+
:root {
|
|
18
|
+
--bottom-sheet-footer-border-top: 1px solid var(--color-light-border-primary);
|
|
19
|
+
--bottom-sheet-footer-background-color: var(--color-light-bg-primary);
|
|
20
|
+
}
|
|
21
|
+
.bottom-sheet__footer_1jt1d {
|
|
22
|
+
padding: var(--gap-m) var(--gap-m);
|
|
23
|
+
background-color: var(--color-light-bg-primary);
|
|
24
|
+
}
|
|
25
|
+
.bottom-sheet__sticky_1jt1d {
|
|
19
26
|
position: sticky;
|
|
20
27
|
bottom: 0;
|
|
21
|
-
padding: var(--gap-m) var(--gap-m) var(--gap-3xl);
|
|
22
|
-
background-color: var(--color-light-bg-primary);
|
|
23
28
|
}
|
|
24
|
-
.bottom-
|
|
25
|
-
|
|
29
|
+
.bottom-sheet__highlighted_1jt1d {
|
|
30
|
+
border-top: var(--bottom-sheet-footer-border-top);
|
|
31
|
+
background-color: var(--bottom-sheet-footer-background-color);
|
|
26
32
|
}
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import 'react';
|
|
2
|
+
import 'classnames';
|
|
3
|
+
import 'react-div-100vh';
|
|
4
|
+
import 'react-swipeable';
|
|
5
|
+
import '@alfalab/core-components-base-modal/dist/modern';
|
|
6
|
+
import '@alfalab/core-components-typography/dist/modern';
|
|
7
|
+
import '@alfalab/core-components-icon-button/dist/modern';
|
|
8
|
+
import '@alfalab/icons-glyph/CrossMIcon';
|
|
9
|
+
import '../closer/Component.js';
|
|
10
|
+
import '@alfalab/icons-glyph/ArrowBackMIcon';
|
|
11
|
+
import '../backer/Component.js';
|
|
12
|
+
export { a as Header } from '../../component-6718dad9.js';
|
|
13
|
+
import '../footer/Component.js';
|
|
14
|
+
import '@alfalab/core-components-backdrop/dist/modern';
|
|
15
|
+
import '../swipeable-backdrop/Component.js';
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/* hash: nztoa */
|
|
2
|
+
:root {
|
|
3
|
+
--color-light-bg-primary: #fff;
|
|
4
|
+
--color-light-graphic-neutral: #dbdee1;
|
|
5
|
+
}
|
|
6
|
+
:root {
|
|
7
|
+
|
|
8
|
+
/* Hard */
|
|
9
|
+
|
|
10
|
+
/* Up */
|
|
11
|
+
|
|
12
|
+
/* Hard up */
|
|
13
|
+
}
|
|
14
|
+
:root {
|
|
15
|
+
--gap-2xs: 4px;
|
|
16
|
+
--gap-xs: 8px;
|
|
17
|
+
--gap-4xl: 48px;
|
|
18
|
+
}
|
|
19
|
+
:root {
|
|
20
|
+
--font-family-system: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica,
|
|
21
|
+
sans-serif;
|
|
22
|
+
}
|
|
23
|
+
:root {
|
|
24
|
+
--border-radius-xl: 16px;
|
|
25
|
+
}
|
|
26
|
+
:root {
|
|
27
|
+
--bottom-sheet-header-border-bottom: none;
|
|
28
|
+
--bottom-sheet-title-font-size: 18px;
|
|
29
|
+
--bottom-sheet-title-font-weight: 700;
|
|
30
|
+
--bottom-sheet-title-line-height: 24px;
|
|
31
|
+
--bottom-sheet-title-font-family: var(--font-family-system);
|
|
32
|
+
--bottom-sheet-title-margin-vertical: var(--gap-2xs);
|
|
33
|
+
}
|
|
34
|
+
.bottom-sheet__header_6oyfh {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
padding: var(--gap-xs);
|
|
38
|
+
padding-bottom: 0;
|
|
39
|
+
background-color: var(--color-light-bg-primary);
|
|
40
|
+
border-top-right-radius: var(--border-radius-xl);
|
|
41
|
+
border-top-left-radius: var(--border-radius-xl);
|
|
42
|
+
}
|
|
43
|
+
.bottom-sheet__sticky_6oyfh {
|
|
44
|
+
position: sticky;
|
|
45
|
+
top: 0;
|
|
46
|
+
}
|
|
47
|
+
.bottom-sheet__highlighted_6oyfh {
|
|
48
|
+
border-bottom: var(--bottom-sheet-header-border-bottom);
|
|
49
|
+
}
|
|
50
|
+
.bottom-sheet__justifyEnd_6oyfh {
|
|
51
|
+
justify-content: flex-end;
|
|
52
|
+
}
|
|
53
|
+
.bottom-sheet__marker_6oyfh {
|
|
54
|
+
position: absolute;
|
|
55
|
+
top: var(--gap-2xs);
|
|
56
|
+
left: 50%;
|
|
57
|
+
width: 36px;
|
|
58
|
+
height: 4px;
|
|
59
|
+
border-radius: 20px;
|
|
60
|
+
transform: translateX(-50%);
|
|
61
|
+
background-color: var(--color-light-graphic-neutral);
|
|
62
|
+
z-index: 1000;
|
|
63
|
+
}
|
|
64
|
+
.bottom-sheet__addon_6oyfh {
|
|
65
|
+
display: flex;
|
|
66
|
+
justify-content: center;
|
|
67
|
+
align-items: center;
|
|
68
|
+
min-width: 48px;
|
|
69
|
+
height: 48px;
|
|
70
|
+
}
|
|
71
|
+
.bottom-sheet__addonFixed_6oyfh {
|
|
72
|
+
position: fixed;
|
|
73
|
+
}
|
|
74
|
+
.bottom-sheet__addonLeft_6oyfh {
|
|
75
|
+
left: 0;
|
|
76
|
+
margin-left: var(--gap-xs);
|
|
77
|
+
}
|
|
78
|
+
.bottom-sheet__addonRight_6oyfh {
|
|
79
|
+
right: 0;
|
|
80
|
+
margin-right: var(--gap-xs);
|
|
81
|
+
}
|
|
82
|
+
.bottom-sheet__title_6oyfh {
|
|
83
|
+
height: 24px;
|
|
84
|
+
padding: var(--gap-xs) var(--gap-xs);
|
|
85
|
+
margin: var(--bottom-sheet-title-margin-vertical) 0;
|
|
86
|
+
width: 100%;
|
|
87
|
+
font-size: var(--bottom-sheet-title-font-size);
|
|
88
|
+
font-weight: var(--bottom-sheet-title-font-weight);
|
|
89
|
+
line-height: var(--bottom-sheet-title-line-height);
|
|
90
|
+
font-family: var(--bottom-sheet-title-font-family);
|
|
91
|
+
}
|
|
92
|
+
.bottom-sheet__titleCenter_6oyfh {
|
|
93
|
+
text-align: center;
|
|
94
|
+
}
|
|
95
|
+
.bottom-sheet__titleLeft_6oyfh {
|
|
96
|
+
text-align: left;
|
|
97
|
+
}
|
|
98
|
+
.bottom-sheet__trimTitle_6oyfh {
|
|
99
|
+
white-space: nowrap;
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
text-overflow: ellipsis;
|
|
102
|
+
}
|
|
103
|
+
.bottom-sheet__titleBigIndentHorizontal_6oyfh {
|
|
104
|
+
margin: var(--bottom-sheet-title-margin-vertical) var(--gap-4xl);
|
|
105
|
+
}
|
|
106
|
+
.bottom-sheet__titleIndentRight_6oyfh {
|
|
107
|
+
margin-right: var(--gap-4xl);
|
|
108
|
+
}
|
|
109
|
+
.bottom-sheet__titleIndentLeft_6oyfh {
|
|
110
|
+
margin-left: var(--gap-4xl);
|
|
111
|
+
}
|
package/dist/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1htal */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-bg-primary: #fff;
|
|
4
4
|
--color-light-graphic-neutral: #dbdee1;
|
|
@@ -13,80 +13,86 @@
|
|
|
13
13
|
/* Hard up */
|
|
14
14
|
}
|
|
15
15
|
:root {
|
|
16
|
-
--gap-
|
|
16
|
+
--gap-2xs: 4px;
|
|
17
17
|
--gap-m: 16px;
|
|
18
18
|
--gap-xl: 24px;
|
|
19
|
-
|
|
19
|
+
}
|
|
20
|
+
:root {
|
|
21
|
+
--border-radius-xl: 16px;
|
|
20
22
|
}
|
|
21
23
|
:root {
|
|
22
24
|
--bottom-sheet-in-transition: 0.5s cubic-bezier(0.09, 0.91, 0.18, 0.99);
|
|
23
25
|
--bottom-sheet-out-transition: 0.3s ease;
|
|
24
26
|
}
|
|
25
|
-
.bottom-
|
|
27
|
+
.bottom-sheet__modal_2931u {
|
|
26
28
|
background-color: transparent;
|
|
27
29
|
position: fixed;
|
|
28
30
|
bottom: 0;
|
|
29
31
|
width: 100%;
|
|
30
32
|
max-width: 600px;
|
|
31
33
|
}
|
|
32
|
-
.bottom-
|
|
34
|
+
.bottom-sheet__component_2931u {
|
|
35
|
+
overflow: hidden;
|
|
33
36
|
position: relative;
|
|
34
37
|
display: flex;
|
|
35
38
|
flex-direction: column;
|
|
36
|
-
|
|
37
|
-
border-top-
|
|
38
|
-
border-top-left-radius: 16px;
|
|
39
|
+
border-top-right-radius: var(--border-radius-xl);
|
|
40
|
+
border-top-left-radius: var(--border-radius-xl);
|
|
39
41
|
background: var(--color-light-bg-primary);
|
|
40
42
|
transform: translateY(100%);
|
|
41
43
|
}
|
|
42
|
-
.bottom-
|
|
44
|
+
.bottom-sheet__withTransition_2931u {
|
|
43
45
|
transition: var(--bottom-sheet-out-transition);
|
|
44
46
|
}
|
|
45
|
-
.bottom-
|
|
47
|
+
.bottom-sheet__scrollableContainer_2931u {
|
|
48
|
+
overflow: auto;
|
|
49
|
+
display: flex;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
position: relative;
|
|
52
|
+
height: 100%;
|
|
53
|
+
}
|
|
54
|
+
.bottom-sheet__marker_2931u {
|
|
46
55
|
position: absolute;
|
|
47
|
-
top: var(--gap-
|
|
56
|
+
top: var(--gap-2xs);
|
|
48
57
|
left: 50%;
|
|
49
58
|
width: 36px;
|
|
50
59
|
height: 4px;
|
|
51
60
|
border-radius: 20px;
|
|
52
61
|
transform: translateX(-50%);
|
|
53
62
|
background-color: var(--color-light-graphic-neutral);
|
|
63
|
+
z-index: 1000;
|
|
54
64
|
}
|
|
55
|
-
.bottom-
|
|
56
|
-
overflow: auto;
|
|
57
|
-
padding-top: var(--gap-2xl);
|
|
58
|
-
}
|
|
59
|
-
.bottom-sheet__withPadding_1ielz {
|
|
60
|
-
padding-bottom: var(--gap-xl);
|
|
61
|
-
}
|
|
62
|
-
.bottom-sheet__content_1ielz {
|
|
65
|
+
.bottom-sheet__content_2931u {
|
|
63
66
|
display: flex;
|
|
64
67
|
flex-direction: column;
|
|
65
68
|
flex: 1;
|
|
66
|
-
padding: 0 var(--gap-m)
|
|
69
|
+
padding: 0 var(--gap-m);
|
|
67
70
|
color: var(--color-light-text-primary);
|
|
71
|
+
background-color: var(--color-light-bg-primary);
|
|
68
72
|
}
|
|
69
|
-
.bottom-
|
|
70
|
-
|
|
71
|
-
|
|
73
|
+
.bottom-sheet__noHeader_2931u {
|
|
74
|
+
padding-top: var(--gap-xl);
|
|
75
|
+
}
|
|
76
|
+
.bottom-sheet__noFooter_2931u {
|
|
77
|
+
padding-bottom: var(--gap-m);
|
|
72
78
|
}
|
|
73
|
-
.bottom-
|
|
79
|
+
.bottom-sheet__scrollLocked_2931u {
|
|
74
80
|
overflow: hidden;
|
|
75
81
|
}
|
|
76
|
-
.bottom-
|
|
82
|
+
.bottom-sheet__appear_2931u .bottom-sheet__component_2931u, .bottom-sheet__enter_2931u .bottom-sheet__component_2931u {
|
|
77
83
|
transition: none;
|
|
78
84
|
}
|
|
79
|
-
.bottom-
|
|
85
|
+
.bottom-sheet__appearActive_2931u .bottom-sheet__component_2931u, .bottom-sheet__enterActive_2931u .bottom-sheet__component_2931u {
|
|
80
86
|
transition: var(--bottom-sheet-in-transition);
|
|
81
87
|
transform: translateY(0);
|
|
82
88
|
}
|
|
83
|
-
.bottom-
|
|
89
|
+
.bottom-sheet__enterDone_2931u .bottom-sheet__component_2931u, .bottom-sheet__appearDone_2931u .bottom-sheet__component_2931u {
|
|
84
90
|
transform: translateY(0);
|
|
85
91
|
}
|
|
86
|
-
.bottom-
|
|
92
|
+
.bottom-sheet__exit_2931u .bottom-sheet__component_2931u {
|
|
87
93
|
transform: translateY(0);
|
|
88
94
|
}
|
|
89
|
-
.bottom-
|
|
95
|
+
.bottom-sheet__exitActive_2931u .bottom-sheet__component_2931u {
|
|
90
96
|
transition: var(--bottom-sheet-out-transition);
|
|
91
97
|
transform: translateY(100%);
|
|
92
98
|
}
|
package/dist/modern/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./component";
|
|
1
|
+
export * from "./component-6718dad9";
|
package/dist/modern/index.js
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import 'classnames';
|
|
3
|
+
import 'react-div-100vh';
|
|
3
4
|
import 'react-swipeable';
|
|
4
5
|
import '@alfalab/core-components-base-modal/dist/modern';
|
|
5
6
|
import '@alfalab/core-components-typography/dist/modern';
|
|
7
|
+
import '@alfalab/core-components-icon-button/dist/modern';
|
|
8
|
+
import '@alfalab/icons-glyph/CrossMIcon';
|
|
9
|
+
import './components/closer/Component.js';
|
|
10
|
+
import '@alfalab/icons-glyph/ArrowBackMIcon';
|
|
11
|
+
import './components/backer/Component.js';
|
|
12
|
+
export { B as BottomSheet, C as CLOSE_OFFSET, H as HEADER_OFFSET } from './component-6718dad9.js';
|
|
6
13
|
import './components/footer/Component.js';
|
|
7
14
|
import '@alfalab/core-components-backdrop/dist/modern';
|
|
8
15
|
import './components/swipeable-backdrop/Component.js';
|
|
9
|
-
export { BottomSheet, CLOSE_OFFSET } from './component.js';
|
|
@@ -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/dist/cssm');
|
|
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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-bottom-sheet",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Bottom sheet mobile component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,11 +21,13 @@
|
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@alfalab/core-components-backdrop": "^2.0.1",
|
|
24
|
-
"@alfalab/core-components-base-modal": "^
|
|
25
|
-
"@alfalab/core-components-
|
|
24
|
+
"@alfalab/core-components-base-modal": "^4.0.0",
|
|
25
|
+
"@alfalab/core-components-icon-button": "^4.1.6",
|
|
26
|
+
"@alfalab/core-components-typography": "^2.4.1",
|
|
26
27
|
"classnames": "^2.2.6",
|
|
28
|
+
"react-div-100vh": "^0.7.0",
|
|
27
29
|
"react-swipeable": "^5.5.0",
|
|
28
30
|
"react-transition-group": "^4.3.0"
|
|
29
31
|
},
|
|
30
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "ae23b2de3600ef2921e125b35916a8b95cd1a909"
|
|
31
33
|
}
|