@alfalab/core-components-side-panel 1.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/CHANGELOG.md +11 -0
- package/dist/Component.desktop.d.ts +35 -0
- package/dist/Component.desktop.js +47 -0
- package/dist/Component.mobile.d.ts +22 -0
- package/dist/Component.mobile.js +42 -0
- package/dist/Component.responsive.d.ts +20 -0
- package/dist/Component.responsive.js +62 -0
- package/dist/Context.d.ts +4 -0
- package/dist/Context.js +9 -0
- package/dist/components/closer/Component.d.ts +29 -0
- package/dist/components/closer/Component.js +37 -0
- package/dist/components/closer/index.css +46 -0
- package/dist/components/content/Component.d.ts +13 -0
- package/dist/components/content/Component.desktop.d.ts +11 -0
- package/dist/components/content/Component.desktop.js +25 -0
- package/dist/components/content/Component.js +24 -0
- package/dist/components/content/Component.mobile.d.ts +5 -0
- package/dist/components/content/Component.mobile.js +25 -0
- package/dist/components/content/desktop.css +31 -0
- package/dist/components/content/index.css +28 -0
- package/dist/components/content/mobile.css +30 -0
- package/dist/components/footer/Component.d.ts +25 -0
- package/dist/components/footer/Component.desktop.d.ts +11 -0
- package/dist/components/footer/Component.desktop.js +28 -0
- package/dist/components/footer/Component.js +34 -0
- package/dist/components/footer/Component.mobile.d.ts +5 -0
- package/dist/components/footer/Component.mobile.js +28 -0
- package/dist/components/footer/desktop.css +32 -0
- package/dist/components/footer/index.css +41 -0
- package/dist/components/footer/layout.css +84 -0
- package/dist/components/footer/mobile.css +30 -0
- package/dist/components/header/Component.d.ts +45 -0
- package/dist/components/header/Component.desktop.d.ts +15 -0
- package/dist/components/header/Component.desktop.js +33 -0
- package/dist/components/header/Component.js +40 -0
- package/dist/components/header/Component.mobile.d.ts +10 -0
- package/dist/components/header/Component.mobile.js +33 -0
- package/dist/components/header/desktop.css +54 -0
- package/dist/components/header/index.css +85 -0
- package/dist/components/header/mobile.css +46 -0
- package/dist/cssm/Component.desktop.d.ts +35 -0
- package/dist/cssm/Component.desktop.js +53 -0
- package/dist/cssm/Component.mobile.d.ts +22 -0
- package/dist/cssm/Component.mobile.js +48 -0
- package/dist/cssm/Component.responsive.d.ts +20 -0
- package/dist/cssm/Component.responsive.js +77 -0
- package/dist/cssm/Context.d.ts +4 -0
- package/dist/cssm/Context.js +9 -0
- package/dist/cssm/components/closer/Component.d.ts +29 -0
- package/dist/cssm/components/closer/Component.js +36 -0
- package/dist/cssm/components/closer/index.module.css +45 -0
- package/dist/cssm/components/content/Component.d.ts +13 -0
- package/dist/cssm/components/content/Component.desktop.d.ts +11 -0
- package/dist/cssm/components/content/Component.desktop.js +25 -0
- package/dist/cssm/components/content/Component.js +23 -0
- package/dist/cssm/components/content/Component.mobile.d.ts +5 -0
- package/dist/cssm/components/content/Component.mobile.js +25 -0
- package/dist/cssm/components/content/desktop.module.css +30 -0
- package/dist/cssm/components/content/index.module.css +27 -0
- package/dist/cssm/components/content/mobile.module.css +29 -0
- package/dist/cssm/components/footer/Component.d.ts +25 -0
- package/dist/cssm/components/footer/Component.desktop.d.ts +11 -0
- package/dist/cssm/components/footer/Component.desktop.js +29 -0
- package/dist/cssm/components/footer/Component.js +32 -0
- package/dist/cssm/components/footer/Component.mobile.d.ts +5 -0
- package/dist/cssm/components/footer/Component.mobile.js +29 -0
- package/dist/cssm/components/footer/desktop.module.css +31 -0
- package/dist/cssm/components/footer/index.module.css +40 -0
- package/dist/cssm/components/footer/layout.module.css +83 -0
- package/dist/cssm/components/footer/mobile.module.css +29 -0
- package/dist/cssm/components/header/Component.d.ts +45 -0
- package/dist/cssm/components/header/Component.desktop.d.ts +15 -0
- package/dist/cssm/components/header/Component.desktop.js +34 -0
- package/dist/cssm/components/header/Component.js +39 -0
- package/dist/cssm/components/header/Component.mobile.d.ts +10 -0
- package/dist/cssm/components/header/Component.mobile.js +34 -0
- package/dist/cssm/components/header/desktop.module.css +53 -0
- package/dist/cssm/components/header/index.module.css +84 -0
- package/dist/cssm/components/header/mobile.module.css +45 -0
- package/dist/cssm/desktop.d.ts +1 -0
- package/dist/cssm/desktop.js +35 -0
- package/dist/cssm/desktop.module.css +27 -0
- package/dist/cssm/index.d.ts +2 -0
- package/dist/cssm/index.js +48 -0
- package/dist/cssm/mobile.d.ts +1 -0
- package/dist/cssm/mobile.js +34 -0
- package/dist/cssm/mobile.module.css +24 -0
- package/dist/cssm/responsive.d.ts +1 -0
- package/dist/cssm/responsive.js +47 -0
- package/dist/cssm/transitions.desktop.module.css +24 -0
- package/dist/cssm/transitions.mobile.module.css +24 -0
- package/dist/cssm/tslib.es6-ce870b46.d.ts +32 -0
- package/dist/cssm/tslib.es6-ce870b46.js +42 -0
- package/dist/cssm/vars.css +20 -0
- package/dist/desktop.css +28 -0
- package/dist/desktop.d.ts +1 -0
- package/dist/desktop.js +25 -0
- package/dist/esm/Component.desktop.d.ts +35 -0
- package/dist/esm/Component.desktop.js +37 -0
- package/dist/esm/Component.mobile.d.ts +22 -0
- package/dist/esm/Component.mobile.js +33 -0
- package/dist/esm/Component.responsive.d.ts +20 -0
- package/dist/esm/Component.responsive.js +54 -0
- package/dist/esm/Context.d.ts +4 -0
- package/dist/esm/Context.js +5 -0
- package/dist/esm/components/closer/Component.d.ts +29 -0
- package/dist/esm/components/closer/Component.js +28 -0
- package/dist/esm/components/closer/index.css +46 -0
- package/dist/esm/components/content/Component.d.ts +13 -0
- package/dist/esm/components/content/Component.desktop.d.ts +11 -0
- package/dist/esm/components/content/Component.desktop.js +16 -0
- package/dist/esm/components/content/Component.js +15 -0
- package/dist/esm/components/content/Component.mobile.d.ts +5 -0
- package/dist/esm/components/content/Component.mobile.js +16 -0
- package/dist/esm/components/content/desktop.css +31 -0
- package/dist/esm/components/content/index.css +28 -0
- package/dist/esm/components/content/mobile.css +30 -0
- package/dist/esm/components/footer/Component.d.ts +25 -0
- package/dist/esm/components/footer/Component.desktop.d.ts +11 -0
- package/dist/esm/components/footer/Component.desktop.js +19 -0
- package/dist/esm/components/footer/Component.js +25 -0
- package/dist/esm/components/footer/Component.mobile.d.ts +5 -0
- package/dist/esm/components/footer/Component.mobile.js +19 -0
- package/dist/esm/components/footer/desktop.css +32 -0
- package/dist/esm/components/footer/index.css +41 -0
- package/dist/esm/components/footer/layout.css +84 -0
- package/dist/esm/components/footer/mobile.css +30 -0
- package/dist/esm/components/header/Component.d.ts +45 -0
- package/dist/esm/components/header/Component.desktop.d.ts +15 -0
- package/dist/esm/components/header/Component.desktop.js +24 -0
- package/dist/esm/components/header/Component.js +31 -0
- package/dist/esm/components/header/Component.mobile.d.ts +10 -0
- package/dist/esm/components/header/Component.mobile.js +23 -0
- package/dist/esm/components/header/desktop.css +54 -0
- package/dist/esm/components/header/index.css +85 -0
- package/dist/esm/components/header/mobile.css +46 -0
- package/dist/esm/desktop.css +28 -0
- package/dist/esm/desktop.d.ts +1 -0
- package/dist/esm/desktop.js +17 -0
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +24 -0
- package/dist/esm/mobile.css +25 -0
- package/dist/esm/mobile.d.ts +1 -0
- package/dist/esm/mobile.js +16 -0
- package/dist/esm/responsive.d.ts +1 -0
- package/dist/esm/responsive.js +24 -0
- package/dist/esm/transitions.desktop.css +25 -0
- package/dist/esm/transitions.mobile.css +25 -0
- package/dist/esm/tslib.es6-44d9de0b.d.ts +32 -0
- package/dist/esm/tslib.es6-44d9de0b.js +40 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +33 -0
- package/dist/mobile.css +25 -0
- package/dist/mobile.d.ts +1 -0
- package/dist/mobile.js +24 -0
- package/dist/modern/Component.desktop.d.ts +35 -0
- package/dist/modern/Component.desktop.js +36 -0
- package/dist/modern/Component.mobile.d.ts +22 -0
- package/dist/modern/Component.mobile.js +34 -0
- package/dist/modern/Component.responsive.d.ts +20 -0
- package/dist/modern/Component.responsive.js +52 -0
- package/dist/modern/Context.d.ts +4 -0
- package/dist/modern/Context.js +5 -0
- package/dist/modern/components/closer/Component.d.ts +29 -0
- package/dist/modern/components/closer/Component.js +25 -0
- package/dist/modern/components/closer/index.css +46 -0
- package/dist/modern/components/content/Component.d.ts +13 -0
- package/dist/modern/components/content/Component.desktop.d.ts +11 -0
- package/dist/modern/components/content/Component.desktop.js +12 -0
- package/dist/modern/components/content/Component.js +14 -0
- package/dist/modern/components/content/Component.mobile.d.ts +5 -0
- package/dist/modern/components/content/Component.mobile.js +12 -0
- package/dist/modern/components/content/desktop.css +31 -0
- package/dist/modern/components/content/index.css +28 -0
- package/dist/modern/components/content/mobile.css +30 -0
- package/dist/modern/components/footer/Component.d.ts +25 -0
- package/dist/modern/components/footer/Component.desktop.d.ts +11 -0
- package/dist/modern/components/footer/Component.desktop.js +14 -0
- package/dist/modern/components/footer/Component.js +23 -0
- package/dist/modern/components/footer/Component.mobile.d.ts +5 -0
- package/dist/modern/components/footer/Component.mobile.js +14 -0
- package/dist/modern/components/footer/desktop.css +32 -0
- package/dist/modern/components/footer/index.css +41 -0
- package/dist/modern/components/footer/layout.css +84 -0
- package/dist/modern/components/footer/mobile.css +30 -0
- package/dist/modern/components/header/Component.d.ts +45 -0
- package/dist/modern/components/header/Component.desktop.d.ts +15 -0
- package/dist/modern/components/header/Component.desktop.js +21 -0
- package/dist/modern/components/header/Component.js +29 -0
- package/dist/modern/components/header/Component.mobile.d.ts +10 -0
- package/dist/modern/components/header/Component.mobile.js +18 -0
- package/dist/modern/components/header/desktop.css +54 -0
- package/dist/modern/components/header/index.css +85 -0
- package/dist/modern/components/header/mobile.css +46 -0
- package/dist/modern/desktop.css +28 -0
- package/dist/modern/desktop.d.ts +1 -0
- package/dist/modern/desktop.js +16 -0
- package/dist/modern/index.d.ts +2 -0
- package/dist/modern/index.js +23 -0
- package/dist/modern/mobile.css +25 -0
- package/dist/modern/mobile.d.ts +1 -0
- package/dist/modern/mobile.js +15 -0
- package/dist/modern/responsive.d.ts +1 -0
- package/dist/modern/responsive.js +23 -0
- package/dist/modern/transitions.desktop.css +25 -0
- package/dist/modern/transitions.mobile.css +25 -0
- package/dist/responsive.d.ts +1 -0
- package/dist/responsive.js +32 -0
- package/dist/send-stats.js +82 -0
- package/dist/transitions.desktop.css +25 -0
- package/dist/transitions.mobile.css +25 -0
- package/dist/tslib.es6-46fc2207.d.ts +32 -0
- package/dist/tslib.es6-46fc2207.js +42 -0
- package/package.json +29 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { _ as __rest, a as __assign } from '../../tslib.es6-44d9de0b.js';
|
|
2
|
+
import React, { useContext, useCallback } from 'react';
|
|
3
|
+
import cn from 'classnames';
|
|
4
|
+
import '@alfalab/core-components-base-modal/dist/esm';
|
|
5
|
+
import { ModalContext } from '../../Context.js';
|
|
6
|
+
import { IconButton } from '@alfalab/core-components-icon-button/dist/esm';
|
|
7
|
+
import { CrossHeavyMIcon } from '@alfalab/icons-glyph/CrossHeavyMIcon';
|
|
8
|
+
|
|
9
|
+
var styles = {"closer":"side-panel__closer_8pghy","button":"side-panel__button_8pghy","sticky":"side-panel__sticky_8pghy"};
|
|
10
|
+
require('./index.css')
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* @deprecated Компонент только для внутреннего использования. Используйте <Header />
|
|
14
|
+
*/
|
|
15
|
+
var Closer = function (_a) {
|
|
16
|
+
var _b;
|
|
17
|
+
var className = _a.className, _c = _a.size, size = _c === void 0 ? 's' : _c, sticky = _a.sticky, _d = _a.icon, icon = _d === void 0 ? CrossHeavyMIcon : _d, restProps = __rest(_a, ["className", "size", "sticky", "icon"]);
|
|
18
|
+
var onClose = useContext(ModalContext).onClose;
|
|
19
|
+
var handleClick = useCallback(function (event) {
|
|
20
|
+
onClose(event, 'closerClick');
|
|
21
|
+
}, [onClose]);
|
|
22
|
+
return (React.createElement("div", { className: cn(styles.closer, className, (_b = {},
|
|
23
|
+
_b[styles.sticky] = sticky,
|
|
24
|
+
_b)) },
|
|
25
|
+
React.createElement(IconButton, __assign({ size: size, className: styles.button, "aria-label": '\u0437\u0430\u043A\u0440\u044B\u0442\u044C', onClick: handleClick, icon: icon }, restProps))));
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export { Closer };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* hash: rxean */
|
|
2
|
+
:root {
|
|
3
|
+
--color-light-bg-primary-alpha-40: rgba(255, 255, 255, 0.4);
|
|
4
|
+
}
|
|
5
|
+
:root {
|
|
6
|
+
|
|
7
|
+
/* Hard */
|
|
8
|
+
|
|
9
|
+
/* Up */
|
|
10
|
+
|
|
11
|
+
/* Hard up */
|
|
12
|
+
}
|
|
13
|
+
:root {
|
|
14
|
+
|
|
15
|
+
/* sizes */
|
|
16
|
+
|
|
17
|
+
/* paddings */
|
|
18
|
+
|
|
19
|
+
/* scroll */
|
|
20
|
+
|
|
21
|
+
/* desktop */
|
|
22
|
+
|
|
23
|
+
/* mobile */
|
|
24
|
+
}
|
|
25
|
+
:root {
|
|
26
|
+
--side-panel-closer-bg-color: var(--color-light-bg-primary-alpha-40);
|
|
27
|
+
}
|
|
28
|
+
.side-panel__closer_8pghy {
|
|
29
|
+
flex-shrink: 0;
|
|
30
|
+
width: 48px;
|
|
31
|
+
height: 48px;
|
|
32
|
+
margin-left: auto;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
}
|
|
37
|
+
.side-panel__button_8pghy {
|
|
38
|
+
background: var(--side-panel-closer-bg-color);
|
|
39
|
+
-webkit-backdrop-filter: blur(10px);
|
|
40
|
+
backdrop-filter: blur(10px);
|
|
41
|
+
border-radius: 50px;
|
|
42
|
+
}
|
|
43
|
+
.side-panel__sticky_8pghy {
|
|
44
|
+
position: sticky;
|
|
45
|
+
top: 0;
|
|
46
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
type ContentProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Контент
|
|
5
|
+
*/
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Дополнительный класс
|
|
9
|
+
*/
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const Content: FC<ContentProps>;
|
|
13
|
+
export { ContentProps, Content };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { ContentProps } from "./Component";
|
|
3
|
+
import { SidePanelDesktopProps } from "../../Component.desktop";
|
|
4
|
+
type ContentDesktopProps = ContentProps & {
|
|
5
|
+
/**
|
|
6
|
+
* Размер
|
|
7
|
+
*/
|
|
8
|
+
size?: SidePanelDesktopProps['size'];
|
|
9
|
+
};
|
|
10
|
+
declare const ContentDesktop: FC<ContentDesktopProps>;
|
|
11
|
+
export { ContentDesktopProps, ContentDesktop };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { _ as __rest, a as __assign } from '../../tslib.es6-44d9de0b.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import cn from 'classnames';
|
|
4
|
+
import '@alfalab/core-components-base-modal/dist/esm';
|
|
5
|
+
import '../../Context.js';
|
|
6
|
+
import { Content } from './Component.js';
|
|
7
|
+
|
|
8
|
+
var styles = {"s":"side-panel__s_lq99o"};
|
|
9
|
+
require('./desktop.css')
|
|
10
|
+
|
|
11
|
+
var ContentDesktop = function (_a) {
|
|
12
|
+
var size = _a.size, className = _a.className, restProps = __rest(_a, ["size", "className"]);
|
|
13
|
+
return (React.createElement(Content, __assign({ className: cn(className, size && styles[size]) }, restProps)));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { ContentDesktop };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { useContext } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import '@alfalab/core-components-base-modal/dist/esm';
|
|
4
|
+
import { ModalContext } from '../../Context.js';
|
|
5
|
+
|
|
6
|
+
var styles = {"content":"side-panel__content_1yxkj","flex":"side-panel__flex_1yxkj"};
|
|
7
|
+
require('./index.css')
|
|
8
|
+
|
|
9
|
+
var Content = function (_a) {
|
|
10
|
+
var children = _a.children, className = _a.className;
|
|
11
|
+
var contentRef = useContext(ModalContext).contentRef;
|
|
12
|
+
return (React.createElement("div", { className: cn(styles.content, className, styles.flex), ref: contentRef }, children));
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { Content };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { _ as __rest, a as __assign } from '../../tslib.es6-44d9de0b.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import cn from 'classnames';
|
|
4
|
+
import '@alfalab/core-components-base-modal/dist/esm';
|
|
5
|
+
import '../../Context.js';
|
|
6
|
+
import { Content } from './Component.js';
|
|
7
|
+
|
|
8
|
+
var styles = {"content":"side-panel__content_7gese"};
|
|
9
|
+
require('./mobile.css')
|
|
10
|
+
|
|
11
|
+
var ContentMobile = function (_a) {
|
|
12
|
+
var className = _a.className, restProps = __rest(_a, ["className"]);
|
|
13
|
+
return (React.createElement(Content, __assign({ className: cn(className, styles.content) }, restProps)));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { ContentMobile };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* hash: 1e1gn */
|
|
2
|
+
:root {
|
|
3
|
+
|
|
4
|
+
/* Hard */
|
|
5
|
+
|
|
6
|
+
/* Up */
|
|
7
|
+
|
|
8
|
+
/* Hard up */
|
|
9
|
+
}
|
|
10
|
+
:root {
|
|
11
|
+
--gap-2xl: 32px;
|
|
12
|
+
}
|
|
13
|
+
:root {
|
|
14
|
+
|
|
15
|
+
/* sizes */
|
|
16
|
+
|
|
17
|
+
/* paddings */
|
|
18
|
+
--side-panel-s-content-paddings: 0 56px;
|
|
19
|
+
|
|
20
|
+
/* scroll */
|
|
21
|
+
|
|
22
|
+
/* desktop */
|
|
23
|
+
|
|
24
|
+
/* mobile */
|
|
25
|
+
}
|
|
26
|
+
.side-panel__s_lq99o {
|
|
27
|
+
padding: var(--side-panel-s-content-paddings)
|
|
28
|
+
}
|
|
29
|
+
.side-panel__s_lq99o:last-child {
|
|
30
|
+
padding-bottom: var(--gap-2xl);
|
|
31
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* hash: gtex2 */
|
|
2
|
+
:root {
|
|
3
|
+
|
|
4
|
+
/* Hard */
|
|
5
|
+
|
|
6
|
+
/* Up */
|
|
7
|
+
|
|
8
|
+
/* Hard up */
|
|
9
|
+
}
|
|
10
|
+
:root {
|
|
11
|
+
|
|
12
|
+
/* sizes */
|
|
13
|
+
|
|
14
|
+
/* paddings */
|
|
15
|
+
|
|
16
|
+
/* scroll */
|
|
17
|
+
|
|
18
|
+
/* desktop */
|
|
19
|
+
|
|
20
|
+
/* mobile */
|
|
21
|
+
}
|
|
22
|
+
.side-panel__content_1yxkj {
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
width: 100%;
|
|
25
|
+
}
|
|
26
|
+
.side-panel__flex_1yxkj {
|
|
27
|
+
flex: 1 1 auto;
|
|
28
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* hash: 1bi3k */
|
|
2
|
+
:root {
|
|
3
|
+
|
|
4
|
+
/* Hard */
|
|
5
|
+
|
|
6
|
+
/* Up */
|
|
7
|
+
|
|
8
|
+
/* Hard up */
|
|
9
|
+
}
|
|
10
|
+
:root {
|
|
11
|
+
--gap-m: 16px;
|
|
12
|
+
}
|
|
13
|
+
:root {
|
|
14
|
+
|
|
15
|
+
/* sizes */
|
|
16
|
+
|
|
17
|
+
/* paddings */
|
|
18
|
+
|
|
19
|
+
/* scroll */
|
|
20
|
+
|
|
21
|
+
/* desktop */
|
|
22
|
+
|
|
23
|
+
/* mobile */
|
|
24
|
+
}
|
|
25
|
+
.side-panel__content_7gese {
|
|
26
|
+
padding: 0 var(--gap-m)
|
|
27
|
+
}
|
|
28
|
+
.side-panel__content_7gese:last-child {
|
|
29
|
+
padding-bottom: var(--gap-m);
|
|
30
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
type FooterProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Контент футера
|
|
5
|
+
*/
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Дополнительный класс
|
|
9
|
+
*/
|
|
10
|
+
className?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Фиксирует футер
|
|
13
|
+
*/
|
|
14
|
+
sticky?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Выравнивание элементов футера
|
|
17
|
+
*/
|
|
18
|
+
layout?: 'start' | 'center' | 'space-between' | 'column';
|
|
19
|
+
/**
|
|
20
|
+
* Отступы между элементами футера
|
|
21
|
+
*/
|
|
22
|
+
gap?: 16 | 24 | 32;
|
|
23
|
+
};
|
|
24
|
+
declare const Footer: FC<FooterProps>;
|
|
25
|
+
export { FooterProps, Footer };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { FooterProps } from "./Component";
|
|
3
|
+
import { SidePanelDesktopProps } from "../../Component.desktop";
|
|
4
|
+
type FooterDesktopProps = FooterProps & {
|
|
5
|
+
/**
|
|
6
|
+
* Размер
|
|
7
|
+
*/
|
|
8
|
+
size?: SidePanelDesktopProps['size'];
|
|
9
|
+
};
|
|
10
|
+
declare const FooterDesktop: FC<FooterDesktopProps>;
|
|
11
|
+
export { FooterDesktopProps, FooterDesktop };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { _ as __rest, a as __assign } from '../../tslib.es6-44d9de0b.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import cn from 'classnames';
|
|
4
|
+
import '@alfalab/core-components-base-modal/dist/esm';
|
|
5
|
+
import '../../Context.js';
|
|
6
|
+
import { Footer } from './Component.js';
|
|
7
|
+
|
|
8
|
+
var styles = {"sticky":"side-panel__sticky_1nka4","s":"side-panel__s_1nka4"};
|
|
9
|
+
require('./desktop.css')
|
|
10
|
+
|
|
11
|
+
var FooterDesktop = function (_a) {
|
|
12
|
+
var _b;
|
|
13
|
+
var size = _a.size, className = _a.className, sticky = _a.sticky, restProps = __rest(_a, ["size", "className", "sticky"]);
|
|
14
|
+
return (React.createElement(Footer, __assign({ className: cn(className, size && styles[size], (_b = {},
|
|
15
|
+
_b[styles.sticky] = sticky,
|
|
16
|
+
_b)), sticky: sticky }, restProps)));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { FooterDesktop };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { useContext, useEffect } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import '@alfalab/core-components-base-modal/dist/esm';
|
|
4
|
+
import { ModalContext } from '../../Context.js';
|
|
5
|
+
|
|
6
|
+
var styles = {"footer":"side-panel__footer_1efth","sticky":"side-panel__sticky_1efth","highlighted":"side-panel__highlighted_1efth"};
|
|
7
|
+
require('./index.css')
|
|
8
|
+
|
|
9
|
+
var layoutStyles = {"column":"side-panel__column_158ux","gap-16":"side-panel__gap-16_158ux","gap-24":"side-panel__gap-24_158ux","gap-32":"side-panel__gap-32_158ux","start":"side-panel__start_158ux","center":"side-panel__center_158ux","space-between":"side-panel__space-between_158ux"};
|
|
10
|
+
require('./layout.css')
|
|
11
|
+
|
|
12
|
+
var Footer = function (_a) {
|
|
13
|
+
var _b;
|
|
14
|
+
var children = _a.children, className = _a.className, sticky = _a.sticky, _c = _a.layout, layout = _c === void 0 ? 'start' : _c, gap = _a.gap;
|
|
15
|
+
var _d = useContext(ModalContext), footerHighlighted = _d.footerHighlighted, setHasFooter = _d.setHasFooter;
|
|
16
|
+
useEffect(function () {
|
|
17
|
+
setHasFooter(true);
|
|
18
|
+
}, [setHasFooter]);
|
|
19
|
+
return (React.createElement("div", { className: cn(styles.footer, className, layoutStyles[layout], gap && layoutStyles["gap-" + gap], (_b = {},
|
|
20
|
+
_b[styles.highlighted] = sticky && footerHighlighted,
|
|
21
|
+
_b[styles.sticky] = sticky,
|
|
22
|
+
_b)) }, children));
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export { Footer };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { _ as __rest, a as __assign } from '../../tslib.es6-44d9de0b.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import cn from 'classnames';
|
|
4
|
+
import '@alfalab/core-components-base-modal/dist/esm';
|
|
5
|
+
import '../../Context.js';
|
|
6
|
+
import { Footer } from './Component.js';
|
|
7
|
+
|
|
8
|
+
var styles = {"footer":"side-panel__footer_6188a","sticky":"side-panel__sticky_6188a"};
|
|
9
|
+
require('./mobile.css')
|
|
10
|
+
|
|
11
|
+
var FooterMobile = function (_a) {
|
|
12
|
+
var _b;
|
|
13
|
+
var className = _a.className, sticky = _a.sticky, restProps = __rest(_a, ["className", "sticky"]);
|
|
14
|
+
return (React.createElement(Footer, __assign({ className: cn(className, styles.footer, (_b = {},
|
|
15
|
+
_b[styles.sticky] = sticky,
|
|
16
|
+
_b)), sticky: sticky }, restProps)));
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export { FooterMobile };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* hash: 1kcn0 */
|
|
2
|
+
:root {
|
|
3
|
+
|
|
4
|
+
/* Hard */
|
|
5
|
+
|
|
6
|
+
/* Up */
|
|
7
|
+
|
|
8
|
+
/* Hard up */
|
|
9
|
+
}
|
|
10
|
+
:root {
|
|
11
|
+
--gap-xl: 24px;
|
|
12
|
+
--gap-2xl: 32px;
|
|
13
|
+
}
|
|
14
|
+
:root {
|
|
15
|
+
|
|
16
|
+
/* sizes */
|
|
17
|
+
|
|
18
|
+
/* paddings */
|
|
19
|
+
--side-panel-s-footer-paddings: var(--gap-xl) 56px var(--gap-2xl);
|
|
20
|
+
|
|
21
|
+
/* scroll */
|
|
22
|
+
|
|
23
|
+
/* desktop */
|
|
24
|
+
|
|
25
|
+
/* mobile */
|
|
26
|
+
}
|
|
27
|
+
.side-panel__sticky_1nka4 {
|
|
28
|
+
bottom: 0;
|
|
29
|
+
}
|
|
30
|
+
.side-panel__s_1nka4 {
|
|
31
|
+
padding: var(--side-panel-s-footer-paddings);
|
|
32
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/* hash: ylr82 */
|
|
2
|
+
:root {
|
|
3
|
+
--color-light-bg-primary: #fff;
|
|
4
|
+
--color-light-border-primary: #dbdee1;
|
|
5
|
+
}
|
|
6
|
+
:root {
|
|
7
|
+
|
|
8
|
+
/* Hard */
|
|
9
|
+
|
|
10
|
+
/* Up */
|
|
11
|
+
|
|
12
|
+
/* Hard up */
|
|
13
|
+
}
|
|
14
|
+
:root {
|
|
15
|
+
--side-panel-footer-background: var(--color-light-bg-primary);
|
|
16
|
+
|
|
17
|
+
/* sizes */
|
|
18
|
+
|
|
19
|
+
/* paddings */
|
|
20
|
+
|
|
21
|
+
/* scroll */
|
|
22
|
+
--side-panel-footer-highlight-background: var(--color-light-bg-primary);
|
|
23
|
+
--side-panel-footer-highlight-box-shadow: 0 -1px 0 0 var(--color-light-border-primary);
|
|
24
|
+
|
|
25
|
+
/* desktop */
|
|
26
|
+
|
|
27
|
+
/* mobile */
|
|
28
|
+
}
|
|
29
|
+
.side-panel__footer_1efth {
|
|
30
|
+
width: 100%;
|
|
31
|
+
box-sizing: border-box;
|
|
32
|
+
transition: box-shadow 0.2s ease, background 0.2s ease;
|
|
33
|
+
}
|
|
34
|
+
.side-panel__sticky_1efth {
|
|
35
|
+
background: var(--side-panel-footer-background);
|
|
36
|
+
position: sticky;
|
|
37
|
+
}
|
|
38
|
+
.side-panel__highlighted_1efth {
|
|
39
|
+
background: var(--side-panel-footer-highlight-background);
|
|
40
|
+
box-shadow: var(--side-panel-footer-highlight-box-shadow);
|
|
41
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/* hash: l0vdl */
|
|
2
|
+
:root {
|
|
3
|
+
|
|
4
|
+
/* Hard */
|
|
5
|
+
|
|
6
|
+
/* Up */
|
|
7
|
+
|
|
8
|
+
/* Hard up */
|
|
9
|
+
}
|
|
10
|
+
:root {
|
|
11
|
+
--gap-m: 16px;
|
|
12
|
+
--gap-xl: 24px;
|
|
13
|
+
--gap-2xl: 32px;
|
|
14
|
+
}
|
|
15
|
+
:root {
|
|
16
|
+
--side-panel-footer-default-gap: var(--gap-m);
|
|
17
|
+
|
|
18
|
+
/* sizes */
|
|
19
|
+
|
|
20
|
+
/* paddings */
|
|
21
|
+
|
|
22
|
+
/* scroll */
|
|
23
|
+
|
|
24
|
+
/* desktop */
|
|
25
|
+
|
|
26
|
+
/* mobile */
|
|
27
|
+
}
|
|
28
|
+
.side-panel__column_158ux {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column
|
|
31
|
+
}
|
|
32
|
+
.side-panel__column_158ux > * {
|
|
33
|
+
margin-bottom: var(--side-panel-footer-default-gap);
|
|
34
|
+
}
|
|
35
|
+
.side-panel__column_158ux > *:last-child,
|
|
36
|
+
.side-panel__column_158ux > *:only-child {
|
|
37
|
+
margin-bottom: 0;
|
|
38
|
+
}
|
|
39
|
+
.side-panel__column_158ux.side-panel__gap-16_158ux > * {
|
|
40
|
+
margin-bottom: var(--gap-m);
|
|
41
|
+
}
|
|
42
|
+
.side-panel__column_158ux.side-panel__gap-24_158ux > * {
|
|
43
|
+
margin-bottom: var(--gap-xl);
|
|
44
|
+
}
|
|
45
|
+
.side-panel__column_158ux.side-panel__gap-32_158ux > * {
|
|
46
|
+
margin-bottom: var(--gap-2xl);
|
|
47
|
+
}
|
|
48
|
+
.side-panel__start_158ux {
|
|
49
|
+
justify-content: flex-start;
|
|
50
|
+
}
|
|
51
|
+
.side-panel__center_158ux {
|
|
52
|
+
justify-content: center;
|
|
53
|
+
}
|
|
54
|
+
.side-panel__space-between_158ux {
|
|
55
|
+
justify-content: space-between
|
|
56
|
+
}
|
|
57
|
+
.side-panel__space-between_158ux > * {
|
|
58
|
+
flex: 1;
|
|
59
|
+
}
|
|
60
|
+
.side-panel__start_158ux,
|
|
61
|
+
.side-panel__center_158ux,
|
|
62
|
+
.side-panel__space-between_158ux {
|
|
63
|
+
display: flex
|
|
64
|
+
}
|
|
65
|
+
.side-panel__start_158ux > *, .side-panel__center_158ux > *, .side-panel__space-between_158ux > * {
|
|
66
|
+
margin-right: var(--side-panel-footer-default-gap);
|
|
67
|
+
}
|
|
68
|
+
.side-panel__start_158ux > *:last-child,
|
|
69
|
+
.side-panel__start_158ux > *:only-child,
|
|
70
|
+
.side-panel__center_158ux > *:last-child,
|
|
71
|
+
.side-panel__center_158ux > *:only-child,
|
|
72
|
+
.side-panel__space-between_158ux > *:last-child,
|
|
73
|
+
.side-panel__space-between_158ux > *:only-child {
|
|
74
|
+
margin-right: 0;
|
|
75
|
+
}
|
|
76
|
+
.side-panel__start_158ux.side-panel__gap-16_158ux > *, .side-panel__center_158ux.side-panel__gap-16_158ux > *, .side-panel__space-between_158ux.side-panel__gap-16_158ux > * {
|
|
77
|
+
margin-right: var(--gap-m);
|
|
78
|
+
}
|
|
79
|
+
.side-panel__start_158ux.side-panel__gap-24_158ux > *, .side-panel__center_158ux.side-panel__gap-24_158ux > *, .side-panel__space-between_158ux.side-panel__gap-24_158ux > * {
|
|
80
|
+
margin-right: var(--gap-xl);
|
|
81
|
+
}
|
|
82
|
+
.side-panel__start_158ux.side-panel__gap-32_158ux > *, .side-panel__center_158ux.side-panel__gap-32_158ux > *, .side-panel__space-between_158ux.side-panel__gap-32_158ux > * {
|
|
83
|
+
margin-right: var(--gap-2xl);
|
|
84
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* hash: 172sz */
|
|
2
|
+
:root {
|
|
3
|
+
|
|
4
|
+
/* Hard */
|
|
5
|
+
|
|
6
|
+
/* Up */
|
|
7
|
+
|
|
8
|
+
/* Hard up */
|
|
9
|
+
}
|
|
10
|
+
:root {
|
|
11
|
+
--gap-m: 16px;
|
|
12
|
+
}
|
|
13
|
+
:root {
|
|
14
|
+
|
|
15
|
+
/* sizes */
|
|
16
|
+
|
|
17
|
+
/* paddings */
|
|
18
|
+
|
|
19
|
+
/* scroll */
|
|
20
|
+
|
|
21
|
+
/* desktop */
|
|
22
|
+
|
|
23
|
+
/* mobile */
|
|
24
|
+
}
|
|
25
|
+
.side-panel__footer_6188a {
|
|
26
|
+
padding: var(--gap-m);
|
|
27
|
+
}
|
|
28
|
+
.side-panel__sticky_6188a {
|
|
29
|
+
bottom: 0;
|
|
30
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
type HeaderProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Контент шапки
|
|
5
|
+
*/
|
|
6
|
+
children?: ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Слот слева
|
|
9
|
+
*/
|
|
10
|
+
leftAddons?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Компонент крестика
|
|
13
|
+
*/
|
|
14
|
+
closer?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Дополнительный класс
|
|
17
|
+
*/
|
|
18
|
+
className?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Дополнительный класс для аддонов
|
|
21
|
+
*/
|
|
22
|
+
addonClassName?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Дополнительный класс для контента
|
|
25
|
+
*/
|
|
26
|
+
contentClassName?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Заголовок шапки
|
|
29
|
+
*/
|
|
30
|
+
title?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Выравнивание заголовка
|
|
33
|
+
*/
|
|
34
|
+
align?: 'left' | 'center';
|
|
35
|
+
/**
|
|
36
|
+
* Обрезать ли заголовок
|
|
37
|
+
*/
|
|
38
|
+
trim?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Фиксирует шапку
|
|
41
|
+
*/
|
|
42
|
+
sticky?: boolean;
|
|
43
|
+
};
|
|
44
|
+
declare const Header: FC<HeaderProps>;
|
|
45
|
+
export { HeaderProps, Header };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { HeaderProps } from "./Component";
|
|
3
|
+
import { SidePanelDesktopProps } from "../../Component.desktop";
|
|
4
|
+
type HeaderDesktopProps = Omit<HeaderProps, 'closer'> & {
|
|
5
|
+
/**
|
|
6
|
+
* Размер
|
|
7
|
+
*/
|
|
8
|
+
size?: SidePanelDesktopProps['size'];
|
|
9
|
+
/**
|
|
10
|
+
* Наличие крестика
|
|
11
|
+
*/
|
|
12
|
+
hasCloser?: boolean;
|
|
13
|
+
};
|
|
14
|
+
declare const HeaderDesktop: FC<HeaderDesktopProps>;
|
|
15
|
+
export { HeaderDesktopProps, HeaderDesktop };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { _ as __rest, a as __assign } from '../../tslib.es6-44d9de0b.js';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import cn from 'classnames';
|
|
4
|
+
import '@alfalab/core-components-base-modal/dist/esm';
|
|
5
|
+
import '../../Context.js';
|
|
6
|
+
import { Header } from './Component.js';
|
|
7
|
+
import '@alfalab/core-components-icon-button/dist/esm';
|
|
8
|
+
import '@alfalab/icons-glyph/CrossHeavyMIcon';
|
|
9
|
+
import { Closer } from '../closer/Component.js';
|
|
10
|
+
|
|
11
|
+
var styles = {"content":"side-panel__content_1gynr","s":"side-panel__s_1gynr","hasContent":"side-panel__hasContent_1gynr","sticky":"side-panel__sticky_1gynr"};
|
|
12
|
+
require('./desktop.css')
|
|
13
|
+
|
|
14
|
+
var HeaderDesktop = function (_a) {
|
|
15
|
+
var _b;
|
|
16
|
+
var size = _a.size, className = _a.className, contentClassName = _a.contentClassName, _c = _a.hasCloser, hasCloser = _c === void 0 ? true : _c, sticky = _a.sticky, _d = _a.leftAddons, leftAddons = _d === void 0 ? React.createElement("span", null) : _d, title = _a.title, children = _a.children, restProps = __rest(_a, ["size", "className", "contentClassName", "hasCloser", "sticky", "leftAddons", "title", "children"]);
|
|
17
|
+
var hasContent = Boolean(title || children);
|
|
18
|
+
return (React.createElement(Header, __assign({ className: cn(className, size && styles[size], (_b = {},
|
|
19
|
+
_b[styles.sticky] = sticky,
|
|
20
|
+
_b[styles.hasContent] = hasContent,
|
|
21
|
+
_b)), contentClassName: cn(styles.content, contentClassName), closer: hasCloser ? React.createElement(Closer, null) : null, leftAddons: leftAddons, sticky: sticky, title: title }, restProps), children));
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { HeaderDesktop };
|