@alfalab/core-components-side-panel 3.0.16 → 4.0.1
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.desktop.d.ts +2 -2
- package/Component.desktop.js +2 -2
- package/Component.mobile.js +2 -2
- package/Component.responsive.d.ts +2 -2
- package/Component.responsive.js +2 -3
- package/components/content/Component.desktop.js +1 -1
- package/components/content/Component.js +1 -1
- package/components/content/Component.mobile.js +1 -1
- package/components/content/desktop.css +3 -3
- package/components/content/index.css +4 -4
- package/components/content/mobile.css +3 -3
- package/components/footer/Component.desktop.js +1 -1
- package/components/footer/Component.js +2 -2
- package/components/footer/Component.mobile.js +1 -1
- package/components/footer/desktop.css +3 -3
- package/components/footer/index.css +4 -4
- package/components/footer/layout.css +25 -25
- package/components/footer/mobile.css +7 -7
- package/components/header/Component.js +3 -3
- package/components/header/desktop.css +5 -5
- package/components/header/index.css +14 -14
- package/components/header/mobile.css +4 -4
- package/cssm/Component.desktop.d.ts +2 -2
- package/cssm/Component.responsive.d.ts +2 -2
- package/cssm/Component.responsive.js +2 -3
- package/cssm/index.d.ts +2 -2
- package/cssm/index.js +4 -4
- package/cssm/shared.d.ts +1 -0
- package/cssm/shared.js +10 -0
- package/desktop.css +3 -3
- package/esm/Component.desktop.d.ts +2 -2
- package/esm/Component.desktop.js +2 -2
- package/esm/Component.mobile.js +2 -2
- package/esm/Component.responsive.d.ts +2 -2
- package/esm/Component.responsive.js +1 -2
- package/esm/components/content/Component.desktop.js +1 -1
- package/esm/components/content/Component.js +1 -1
- package/esm/components/content/Component.mobile.js +1 -1
- package/esm/components/content/desktop.css +3 -3
- package/esm/components/content/index.css +4 -4
- package/esm/components/content/mobile.css +3 -3
- package/esm/components/footer/Component.desktop.js +1 -1
- package/esm/components/footer/Component.js +2 -2
- package/esm/components/footer/Component.mobile.js +1 -1
- package/esm/components/footer/desktop.css +3 -3
- package/esm/components/footer/index.css +4 -4
- package/esm/components/footer/layout.css +25 -25
- package/esm/components/footer/mobile.css +7 -7
- package/esm/components/header/Component.js +3 -3
- package/esm/components/header/desktop.css +5 -5
- package/esm/components/header/index.css +14 -14
- package/esm/components/header/mobile.css +4 -4
- package/esm/desktop.css +3 -3
- package/esm/index.d.ts +2 -2
- package/esm/index.js +4 -3
- package/esm/mobile.css +3 -3
- package/esm/shared.d.ts +1 -0
- package/esm/shared.js +2 -0
- package/esm/transitions.desktop.css +7 -7
- package/esm/transitions.mobile.css +8 -8
- package/index.d.ts +2 -2
- package/index.js +4 -4
- package/mobile.css +3 -3
- package/modern/Component.desktop.d.ts +2 -2
- package/modern/Component.desktop.js +2 -2
- package/modern/Component.mobile.js +2 -2
- package/modern/Component.responsive.d.ts +2 -2
- package/modern/Component.responsive.js +1 -2
- package/modern/components/content/Component.desktop.js +1 -1
- package/modern/components/content/Component.js +1 -1
- package/modern/components/content/Component.mobile.js +1 -1
- package/modern/components/content/desktop.css +3 -3
- package/modern/components/content/index.css +4 -4
- package/modern/components/content/mobile.css +3 -3
- package/modern/components/footer/Component.desktop.js +1 -1
- package/modern/components/footer/Component.js +2 -2
- package/modern/components/footer/Component.mobile.js +1 -1
- package/modern/components/footer/desktop.css +3 -3
- package/modern/components/footer/index.css +4 -4
- package/modern/components/footer/layout.css +25 -25
- package/modern/components/footer/mobile.css +7 -7
- package/modern/components/header/Component.js +3 -3
- package/modern/components/header/desktop.css +5 -5
- package/modern/components/header/index.css +14 -14
- package/modern/components/header/mobile.css +4 -4
- package/modern/desktop.css +3 -3
- package/modern/index.d.ts +2 -2
- package/modern/index.js +4 -3
- package/modern/mobile.css +3 -3
- package/modern/shared.d.ts +1 -0
- package/modern/shared.js +2 -0
- package/modern/transitions.desktop.css +7 -7
- package/modern/transitions.mobile.css +8 -8
- package/package.json +30 -5
- package/shared.d.ts +1 -0
- package/shared.js +10 -0
- package/src/Component.desktop.tsx +105 -0
- package/src/Component.mobile.tsx +57 -0
- package/src/Component.responsive.tsx +83 -0
- package/src/Context.tsx +3 -0
- package/src/ResponsiveContext.ts +5 -0
- package/src/components/content/Component.desktop.tsx +19 -0
- package/src/components/content/Component.mobile.tsx +12 -0
- package/src/components/content/Component.tsx +39 -0
- package/src/components/content/desktop.module.css +9 -0
- package/src/components/content/index.module.css +16 -0
- package/src/components/content/mobile.module.css +9 -0
- package/src/components/footer/Component.desktop.tsx +28 -0
- package/src/components/footer/Component.mobile.tsx +24 -0
- package/src/components/footer/Component.tsx +72 -0
- package/src/components/footer/desktop.module.css +9 -0
- package/src/components/footer/index.module.css +18 -0
- package/src/components/footer/layout.module.css +70 -0
- package/src/components/footer/mobile.module.css +25 -0
- package/src/components/header/Component.tsx +59 -0
- package/src/components/header/desktop.module.css +20 -0
- package/src/components/header/index.module.css +66 -0
- package/src/components/header/mobile.module.css +17 -0
- package/src/desktop.module.css +9 -0
- package/src/desktop.ts +1 -0
- package/src/index.ts +4 -0
- package/src/mobile.module.css +19 -0
- package/src/mobile.ts +1 -0
- package/src/shared.ts +1 -0
- package/src/transitions.desktop.module.css +35 -0
- package/src/transitions.mobile.module.css +24 -0
- package/src/typings.ts +6 -0
- package/src/vars.css +40 -0
- package/transitions.desktop.css +7 -7
- package/transitions.mobile.css +8 -8
- package/cssm/responsive.d.ts +0 -2
- package/cssm/responsive.js +0 -42
- package/esm/responsive.d.ts +0 -2
- package/esm/responsive.js +0 -20
- package/modern/responsive.d.ts +0 -2
- package/modern/responsive.js +0 -19
- package/responsive.d.ts +0 -2
- package/responsive.js +0 -28
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
|
|
4
|
+
import { Footer, FooterProps } from './Component';
|
|
5
|
+
|
|
6
|
+
import styles from './desktop.module.css';
|
|
7
|
+
|
|
8
|
+
export type FooterDesktopProps = FooterProps & {
|
|
9
|
+
/**
|
|
10
|
+
* Размер (только для desktop версии компонента)
|
|
11
|
+
*/
|
|
12
|
+
size?: 's';
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export const FooterDesktop: FC<FooterDesktopProps> = ({
|
|
16
|
+
size = 's',
|
|
17
|
+
className,
|
|
18
|
+
sticky,
|
|
19
|
+
...restProps
|
|
20
|
+
}) => (
|
|
21
|
+
<Footer
|
|
22
|
+
className={cn(className, size && styles[size], {
|
|
23
|
+
[styles.sticky]: sticky,
|
|
24
|
+
})}
|
|
25
|
+
sticky={sticky}
|
|
26
|
+
{...restProps}
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
|
|
4
|
+
import { Footer, FooterProps } from './Component';
|
|
5
|
+
|
|
6
|
+
import styles from './mobile.module.css';
|
|
7
|
+
|
|
8
|
+
export type FooterMobileProps = FooterProps;
|
|
9
|
+
|
|
10
|
+
export const FooterMobile: FC<FooterMobileProps> = ({
|
|
11
|
+
className,
|
|
12
|
+
sticky,
|
|
13
|
+
layout = 'start',
|
|
14
|
+
...restProps
|
|
15
|
+
}) => (
|
|
16
|
+
<Footer
|
|
17
|
+
className={cn(className, styles.footer, styles[layout], {
|
|
18
|
+
[styles.sticky]: sticky,
|
|
19
|
+
})}
|
|
20
|
+
sticky={sticky}
|
|
21
|
+
layout={layout}
|
|
22
|
+
{...restProps}
|
|
23
|
+
/>
|
|
24
|
+
);
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import React, { FC, ReactNode, useContext, useEffect } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
|
|
4
|
+
import { ModalContext } from '../../Context';
|
|
5
|
+
|
|
6
|
+
import styles from './index.module.css';
|
|
7
|
+
import layoutStyles from './layout.module.css';
|
|
8
|
+
|
|
9
|
+
export type FooterProps = {
|
|
10
|
+
/**
|
|
11
|
+
* Контент футера
|
|
12
|
+
*/
|
|
13
|
+
children?: ReactNode;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Дополнительный класс
|
|
17
|
+
*/
|
|
18
|
+
className?: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Фиксирует футер
|
|
22
|
+
*/
|
|
23
|
+
sticky?: boolean;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Выравнивание элементов футера
|
|
27
|
+
*/
|
|
28
|
+
layout?: 'start' | 'center' | 'space-between' | 'column';
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Отступы между элементами футера
|
|
32
|
+
*/
|
|
33
|
+
gap?: 16 | 24 | 32;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
37
|
+
*/
|
|
38
|
+
dataTestId?: string;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
export const Footer: FC<FooterProps> = ({
|
|
42
|
+
children,
|
|
43
|
+
className,
|
|
44
|
+
sticky,
|
|
45
|
+
layout = 'start',
|
|
46
|
+
gap,
|
|
47
|
+
dataTestId,
|
|
48
|
+
}) => {
|
|
49
|
+
const { footerHighlighted, setHasFooter } = useContext(ModalContext);
|
|
50
|
+
|
|
51
|
+
useEffect(() => {
|
|
52
|
+
setHasFooter(true);
|
|
53
|
+
}, [setHasFooter]);
|
|
54
|
+
|
|
55
|
+
return (
|
|
56
|
+
<div
|
|
57
|
+
className={cn(
|
|
58
|
+
styles.footer,
|
|
59
|
+
className,
|
|
60
|
+
layoutStyles[layout],
|
|
61
|
+
gap && layoutStyles[`gap-${gap}`],
|
|
62
|
+
{
|
|
63
|
+
[styles.highlighted]: sticky && footerHighlighted,
|
|
64
|
+
[styles.sticky]: sticky,
|
|
65
|
+
},
|
|
66
|
+
)}
|
|
67
|
+
data-test-id={dataTestId}
|
|
68
|
+
>
|
|
69
|
+
{children}
|
|
70
|
+
</div>
|
|
71
|
+
);
|
|
72
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
@import '../../vars.css';
|
|
2
|
+
|
|
3
|
+
.footer {
|
|
4
|
+
width: 100%;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
transition: box-shadow 0.2s ease, background 0.2s ease;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.sticky {
|
|
10
|
+
background: var(--side-panel-footer-background);
|
|
11
|
+
position: sticky;
|
|
12
|
+
z-index: 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.highlighted {
|
|
16
|
+
background: var(--side-panel-footer-highlight-background);
|
|
17
|
+
box-shadow: var(--side-panel-footer-highlight-box-shadow);
|
|
18
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
@import '../../vars.css';
|
|
2
|
+
|
|
3
|
+
.column {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
|
|
7
|
+
& > * {
|
|
8
|
+
margin-bottom: var(--side-panel-footer-default-gap);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
& > *:last-child,
|
|
12
|
+
& > *:only-child {
|
|
13
|
+
margin-bottom: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&.gap-16 > * {
|
|
17
|
+
margin-bottom: var(--gap-m);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&.gap-24 > * {
|
|
21
|
+
margin-bottom: var(--gap-xl);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.gap-32 > * {
|
|
25
|
+
margin-bottom: var(--gap-2xl);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.start {
|
|
30
|
+
justify-content: flex-start;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.center {
|
|
34
|
+
justify-content: center;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.space-between {
|
|
38
|
+
justify-content: space-between;
|
|
39
|
+
|
|
40
|
+
& > * {
|
|
41
|
+
flex: 1;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.start,
|
|
46
|
+
.center,
|
|
47
|
+
.space-between {
|
|
48
|
+
display: flex;
|
|
49
|
+
|
|
50
|
+
& > * {
|
|
51
|
+
margin-right: var(--side-panel-footer-default-gap);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
& > *:last-child,
|
|
55
|
+
& > *:only-child {
|
|
56
|
+
margin-right: 0;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&.gap-16 > * {
|
|
60
|
+
margin-right: var(--gap-m);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.gap-24 > * {
|
|
64
|
+
margin-right: var(--gap-xl);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.gap-32 > * {
|
|
68
|
+
margin-right: var(--gap-2xl);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
@import '../../vars.css';
|
|
2
|
+
|
|
3
|
+
.footer {
|
|
4
|
+
padding: var(--gap-m);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.sticky {
|
|
8
|
+
bottom: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.column {
|
|
12
|
+
flex-direction: column-reverse;
|
|
13
|
+
|
|
14
|
+
& > * {
|
|
15
|
+
margin-bottom: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
& > *:last-child {
|
|
19
|
+
margin-bottom: var(--side-panel-footer-default-gap);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
& > *:only-child {
|
|
23
|
+
margin-bottom: 0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React, { FC, useContext, useEffect } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
|
|
4
|
+
import { NavigationBar, NavigationBarProps } from '@alfalab/core-components-navigation-bar';
|
|
5
|
+
|
|
6
|
+
import { ModalContext } from '../../Context';
|
|
7
|
+
import { ResponsiveContext } from '../../ResponsiveContext';
|
|
8
|
+
|
|
9
|
+
import desktopStyles from './desktop.module.css';
|
|
10
|
+
import styles from './index.module.css';
|
|
11
|
+
import mobileStyles from './mobile.module.css';
|
|
12
|
+
|
|
13
|
+
export type HeaderProps = Omit<NavigationBarProps, 'size' | 'view' | 'parentRef'>;
|
|
14
|
+
|
|
15
|
+
export const Header: FC<HeaderProps> = ({
|
|
16
|
+
className,
|
|
17
|
+
children,
|
|
18
|
+
contentClassName,
|
|
19
|
+
title,
|
|
20
|
+
sticky,
|
|
21
|
+
hasCloser = true,
|
|
22
|
+
...restProps
|
|
23
|
+
}) => {
|
|
24
|
+
const { setHasHeader, headerHighlighted, onClose, componentRef } = useContext(ModalContext);
|
|
25
|
+
const { size = 's', view = 'desktop' } = useContext(ResponsiveContext) || {};
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
setHasHeader(true);
|
|
29
|
+
}, [setHasHeader]);
|
|
30
|
+
|
|
31
|
+
const hasContent = Boolean(title || children);
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<NavigationBar
|
|
35
|
+
{...restProps}
|
|
36
|
+
scrollableParentRef={componentRef}
|
|
37
|
+
view={view}
|
|
38
|
+
sticky={sticky}
|
|
39
|
+
title={title}
|
|
40
|
+
hasCloser={hasCloser}
|
|
41
|
+
onClose={onClose}
|
|
42
|
+
className={cn(styles.header, className, {
|
|
43
|
+
[styles.highlighted]: hasContent && sticky && headerHighlighted,
|
|
44
|
+
[styles.sticky]: sticky,
|
|
45
|
+
[styles.hasContent]: hasContent,
|
|
46
|
+
[desktopStyles.sticky]: view === 'desktop' && sticky,
|
|
47
|
+
[desktopStyles[size]]: view === 'desktop',
|
|
48
|
+
[mobileStyles.sticky]: view === 'mobile' && sticky,
|
|
49
|
+
[mobileStyles.header]: view === 'mobile',
|
|
50
|
+
})}
|
|
51
|
+
contentClassName={cn(contentClassName, {
|
|
52
|
+
[desktopStyles.content]: view === 'desktop',
|
|
53
|
+
[mobileStyles.content]: view === 'mobile',
|
|
54
|
+
})}
|
|
55
|
+
>
|
|
56
|
+
{children}
|
|
57
|
+
</NavigationBar>
|
|
58
|
+
);
|
|
59
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
@import '../../vars.css';
|
|
2
|
+
|
|
3
|
+
.content {
|
|
4
|
+
font-weight: var(--side-panel-header-desktop-font-weight);
|
|
5
|
+
font-family: var(--side-panel-header-desktop-font-family);
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.s .content {
|
|
9
|
+
padding: var(--side-panel-s-header-desktop-content-paddings);
|
|
10
|
+
font-size: var(--side-panel-s-header-desktop-font-size);
|
|
11
|
+
line-height: var(--side-panel-s-header-desktop-line-height);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.s {
|
|
15
|
+
padding: var(--side-panel-s-header-paddings);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.sticky {
|
|
19
|
+
top: 0;
|
|
20
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@import '../../vars.css';
|
|
2
|
+
|
|
3
|
+
.header {
|
|
4
|
+
width: 100%;
|
|
5
|
+
box-sizing: border-box;
|
|
6
|
+
transition: box-shadow 0.2s ease, background 0.2s ease;
|
|
7
|
+
|
|
8
|
+
&:not(.hasContent) {
|
|
9
|
+
pointer-events: none;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.highlighted {
|
|
14
|
+
background: var(--side-panel-header-highlight-background);
|
|
15
|
+
box-shadow: var(--side-panel-header-highlight-box-shadow);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.sticky {
|
|
19
|
+
position: sticky;
|
|
20
|
+
z-index: 1;
|
|
21
|
+
|
|
22
|
+
&.hasContent {
|
|
23
|
+
background: var(--side-panel-header-background);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.header.backgroundImage {
|
|
28
|
+
background: center no-repeat;
|
|
29
|
+
background-size: cover;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.content {
|
|
33
|
+
flex-grow: 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.title {
|
|
37
|
+
word-break: break-word;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.addon {
|
|
41
|
+
min-width: 48px;
|
|
42
|
+
height: 48px;
|
|
43
|
+
display: flex;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
align-items: center;
|
|
46
|
+
pointer-events: all;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.closer {
|
|
50
|
+
margin-left: auto;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.right {
|
|
54
|
+
justify-content: flex-end;
|
|
55
|
+
text-align: right;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.trim {
|
|
59
|
+
overflow: hidden;
|
|
60
|
+
|
|
61
|
+
& .title {
|
|
62
|
+
overflow: hidden;
|
|
63
|
+
white-space: nowrap;
|
|
64
|
+
text-overflow: ellipsis;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@import '../../vars.css';
|
|
2
|
+
|
|
3
|
+
.header {
|
|
4
|
+
padding: var(--side-panel-header-mobile-paddings);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.sticky {
|
|
8
|
+
top: 0;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.content {
|
|
12
|
+
font-size: var(--side-panel-header-mobile-font-size);
|
|
13
|
+
line-height: var(--side-panel-header-mobile-line-height);
|
|
14
|
+
font-family: var(--side-panel-header-mobile-font-family);
|
|
15
|
+
font-weight: var(--side-panel-header-mobile-font-weight);
|
|
16
|
+
padding: var(--side-panel-header-mobile-content-paddings);
|
|
17
|
+
}
|
package/src/desktop.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Component.desktop';
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
@import './vars.css';
|
|
2
|
+
|
|
3
|
+
.component {
|
|
4
|
+
position: fixed;
|
|
5
|
+
top: 0;
|
|
6
|
+
flex: 1;
|
|
7
|
+
height: 100%;
|
|
8
|
+
width: 100%;
|
|
9
|
+
overflow-x: hidden;
|
|
10
|
+
overflow-y: auto;
|
|
11
|
+
max-width: 600px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.mobileContent {
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
|
+
width: 100%;
|
|
18
|
+
flex: 1;
|
|
19
|
+
}
|
package/src/mobile.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Component.mobile';
|
package/src/shared.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ModalContext } from './Context';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@define-mixin exit-active {
|
|
2
|
+
opacity: 0;
|
|
3
|
+
transition: opacity 200ms ease-out, transform 200ms ease-out;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.enterRight {
|
|
7
|
+
opacity: 0;
|
|
8
|
+
transform: translateX(15px);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.enterLeft {
|
|
12
|
+
opacity: 0;
|
|
13
|
+
transform: translateX(-15px);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.enterActive {
|
|
17
|
+
opacity: 1;
|
|
18
|
+
transform: translateX(0);
|
|
19
|
+
transition: opacity 200ms ease-in, transform 200ms ease-in;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.exit {
|
|
23
|
+
opacity: 1;
|
|
24
|
+
transform: translateX(0);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.exitActiveRight {
|
|
28
|
+
@mixin exit-active;
|
|
29
|
+
transform: translateX(15px);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.exitActiveLeft {
|
|
33
|
+
@mixin exit-active;
|
|
34
|
+
transform: translateX(-15px);
|
|
35
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.appear,
|
|
2
|
+
.enter {
|
|
3
|
+
opacity: 0;
|
|
4
|
+
transform: translateY(15px);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.appearActive,
|
|
8
|
+
.enterActive {
|
|
9
|
+
opacity: 1;
|
|
10
|
+
transform: translateY(0);
|
|
11
|
+
transition: opacity 200ms ease-in, transform 200ms ease-in;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.exit {
|
|
15
|
+
opacity: 1;
|
|
16
|
+
transform: translateY(0);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.exitActive,
|
|
20
|
+
.exitDone {
|
|
21
|
+
opacity: 0;
|
|
22
|
+
transform: translateY(15px);
|
|
23
|
+
transition: opacity 200ms ease-out, transform 200ms ease-out;
|
|
24
|
+
}
|
package/src/typings.ts
ADDED
package/src/vars.css
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
@import '@alfalab/core-components-themes/src/default.css';
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--side-panel-border-radius: var(--border-radius-l);
|
|
5
|
+
--side-panel-vertical-padding: var(--gap-3xl);
|
|
6
|
+
--side-panel-header-background: var(--color-light-bg-primary);
|
|
7
|
+
--side-panel-footer-background: var(--color-light-bg-primary);
|
|
8
|
+
--side-panel-footer-default-gap: var(--gap-m);
|
|
9
|
+
|
|
10
|
+
/* sizes */
|
|
11
|
+
--side-panel-s-width: 500px;
|
|
12
|
+
|
|
13
|
+
/* paddings */
|
|
14
|
+
--side-panel-s-header-paddings: 28px 28px 0;
|
|
15
|
+
--side-panel-s-content-paddings: var(--gap-3xl) var(--gap-3xl) 0;
|
|
16
|
+
--side-panel-s-footer-paddings: var(--gap-xl) var(--gap-3xl) var(--gap-3xl);
|
|
17
|
+
|
|
18
|
+
/* scroll */
|
|
19
|
+
--side-panel-header-highlight-background: var(--color-light-bg-primary);
|
|
20
|
+
--side-panel-footer-highlight-background: var(--color-light-bg-primary);
|
|
21
|
+
--side-panel-header-highlight-box-shadow: 0 1px 0 0 var(--color-light-border-secondary);
|
|
22
|
+
--side-panel-footer-highlight-box-shadow: 0 -1px 0 0 var(--color-light-border-secondary);
|
|
23
|
+
|
|
24
|
+
/* desktop */
|
|
25
|
+
--side-panel-s-header-desktop-content-paddings: 6px var(--gap-s) var(--gap-m);
|
|
26
|
+
--side-panel-s-header-desktop-font-size: 30px;
|
|
27
|
+
--side-panel-s-header-desktop-line-height: 36px;
|
|
28
|
+
--side-panel-header-desktop-font-weight: bold;
|
|
29
|
+
--side-panel-header-desktop-font-family: var(--font-family-system);
|
|
30
|
+
|
|
31
|
+
/* mobile */
|
|
32
|
+
--side-panel-header-mobile-content-paddings: var(--gap-s) var(--gap-xs);
|
|
33
|
+
--side-panel-header-mobile-font-size: 18px;
|
|
34
|
+
--side-panel-header-mobile-line-height: 24px;
|
|
35
|
+
--side-panel-header-mobile-font-family: var(--font-family-system);
|
|
36
|
+
--side-panel-header-mobile-font-weight: bold;
|
|
37
|
+
|
|
38
|
+
/* paddings */
|
|
39
|
+
--side-panel-header-mobile-paddings: var(--gap-2xs) var(--gap-xs);
|
|
40
|
+
}
|
package/transitions.desktop.css
CHANGED
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
/* hash:
|
|
2
|
-
.side-
|
|
1
|
+
/* hash: bpgap */
|
|
2
|
+
.side-panel__enterRight_9pl6z {
|
|
3
3
|
opacity: 0;
|
|
4
4
|
transform: translateX(15px);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
.side-
|
|
7
|
+
.side-panel__enterLeft_9pl6z {
|
|
8
8
|
opacity: 0;
|
|
9
9
|
transform: translateX(-15px);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
.side-
|
|
12
|
+
.side-panel__enterActive_9pl6z {
|
|
13
13
|
opacity: 1;
|
|
14
14
|
transform: translateX(0);
|
|
15
15
|
transition: opacity 200ms ease-in, transform 200ms ease-in;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.side-
|
|
18
|
+
.side-panel__exit_9pl6z {
|
|
19
19
|
opacity: 1;
|
|
20
20
|
transform: translateX(0);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
.side-
|
|
23
|
+
.side-panel__exitActiveRight_9pl6z {
|
|
24
24
|
opacity: 0;
|
|
25
25
|
transition: opacity 200ms ease-out, transform 200ms ease-out;
|
|
26
26
|
transform: translateX(15px);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
.side-
|
|
29
|
+
.side-panel__exitActiveLeft_9pl6z {
|
|
30
30
|
opacity: 0;
|
|
31
31
|
transition: opacity 200ms ease-out, transform 200ms ease-out;
|
|
32
32
|
transform: translateX(-15px);
|
package/transitions.mobile.css
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
/* hash:
|
|
2
|
-
.side-
|
|
3
|
-
.side-
|
|
1
|
+
/* hash: f1p2x */
|
|
2
|
+
.side-panel__appear_1r3i1,
|
|
3
|
+
.side-panel__enter_1r3i1 {
|
|
4
4
|
opacity: 0;
|
|
5
5
|
transform: translateY(15px);
|
|
6
6
|
}
|
|
7
7
|
|
|
8
|
-
.side-
|
|
9
|
-
.side-
|
|
8
|
+
.side-panel__appearActive_1r3i1,
|
|
9
|
+
.side-panel__enterActive_1r3i1 {
|
|
10
10
|
opacity: 1;
|
|
11
11
|
transform: translateY(0);
|
|
12
12
|
transition: opacity 200ms ease-in, transform 200ms ease-in;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.side-
|
|
15
|
+
.side-panel__exit_1r3i1 {
|
|
16
16
|
opacity: 1;
|
|
17
17
|
transform: translateY(0);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
.side-
|
|
21
|
-
.side-
|
|
20
|
+
.side-panel__exitActive_1r3i1,
|
|
21
|
+
.side-panel__exitDone_1r3i1 {
|
|
22
22
|
opacity: 0;
|
|
23
23
|
transform: translateY(15px);
|
|
24
24
|
transition: opacity 200ms ease-out, transform 200ms ease-out;
|
package/cssm/responsive.d.ts
DELETED