@alfalab/core-components-navigation-bar 0.8.6 → 1.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/Component.d.ts +70 -5
- package/Component.js +25 -128
- package/components/action-icon-addon/Component.d.ts +22 -0
- package/components/action-icon-addon/Component.js +32 -0
- package/components/action-icon-addon/index.css +44 -0
- package/components/action-icon-addon/index.js +9 -0
- package/components/action-text-addon/Component.d.ts +26 -0
- package/components/action-text-addon/Component.js +25 -0
- package/{cssm/components/closer/index.module.css → components/action-text-addon/index.css} +8 -32
- package/components/action-text-addon/index.js +9 -0
- package/cssm/Component.d.ts +70 -5
- package/cssm/Component.js +24 -127
- package/cssm/components/action-icon-addon/Component.d.ts +22 -0
- package/cssm/components/action-icon-addon/Component.js +31 -0
- package/cssm/components/action-icon-addon/index.js +9 -0
- package/{modern/components/closer/index.css → cssm/components/action-icon-addon/index.module.css} +23 -28
- package/cssm/components/action-text-addon/Component.d.ts +26 -0
- package/cssm/components/action-text-addon/Component.js +24 -0
- package/cssm/components/action-text-addon/index.js +9 -0
- package/cssm/{vars.css → components/action-text-addon/index.module.css} +6 -4
- package/cssm/index.d.ts +0 -1
- package/cssm/index.module.css +46 -76
- package/cssm/shared/index.d.ts +3 -2
- package/cssm/shared/index.js +6 -4
- package/cssm/utils.d.ts +6 -0
- package/cssm/utils.js +15 -0
- package/esm/Component.d.ts +70 -5
- package/esm/Component.js +26 -128
- package/esm/components/action-icon-addon/Component.d.ts +22 -0
- package/esm/components/action-icon-addon/Component.js +23 -0
- package/esm/components/action-icon-addon/index.css +44 -0
- package/esm/components/action-icon-addon/index.js +1 -0
- package/esm/components/action-text-addon/Component.d.ts +26 -0
- package/esm/components/action-text-addon/Component.js +16 -0
- package/esm/components/{closer → action-text-addon}/index.css +8 -33
- package/esm/components/action-text-addon/index.js +1 -0
- package/esm/index.css +49 -78
- package/esm/index.d.ts +0 -1
- package/esm/shared/index.d.ts +3 -2
- package/esm/shared/index.js +3 -2
- package/esm/utils.d.ts +6 -0
- package/esm/utils.js +11 -0
- package/index.css +49 -78
- package/index.d.ts +0 -1
- package/modern/Component.d.ts +70 -5
- package/modern/Component.js +26 -133
- package/modern/components/action-icon-addon/Component.d.ts +22 -0
- package/modern/components/action-icon-addon/Component.js +18 -0
- package/modern/components/action-icon-addon/index.css +44 -0
- package/modern/components/action-icon-addon/index.js +1 -0
- package/modern/components/action-text-addon/Component.d.ts +26 -0
- package/modern/components/action-text-addon/Component.js +12 -0
- package/{components/closer → modern/components/action-text-addon}/index.css +8 -33
- package/modern/components/action-text-addon/index.js +1 -0
- package/modern/index.css +49 -78
- package/modern/index.d.ts +0 -1
- package/modern/shared/index.d.ts +3 -2
- package/modern/shared/index.js +3 -2
- package/modern/utils.d.ts +6 -0
- package/modern/utils.js +11 -0
- package/package.json +6 -9
- package/shared/index.d.ts +3 -2
- package/shared/index.js +6 -4
- package/src/Component.tsx +183 -264
- package/src/components/action-icon-addon/Component.tsx +58 -0
- package/src/components/action-icon-addon/index.module.css +40 -0
- package/src/components/action-text-addon/Component.tsx +61 -0
- package/src/components/action-text-addon/index.module.css +9 -0
- package/src/index.module.css +39 -79
- package/src/index.ts +0 -1
- package/src/shared/index.ts +3 -2
- package/src/utils.ts +9 -0
- package/utils.d.ts +6 -0
- package/utils.js +15 -0
- package/components/back-arrow-addon/Component.d.ts +0 -26
- package/components/back-arrow-addon/Component.js +0 -35
- package/components/back-arrow-addon/index.css +0 -76
- package/components/back-arrow-addon/index.js +0 -9
- package/components/closer/Component.d.ts +0 -35
- package/components/closer/Component.js +0 -32
- package/components/closer/index.js +0 -9
- package/cssm/components/back-arrow-addon/Component.d.ts +0 -26
- package/cssm/components/back-arrow-addon/Component.js +0 -34
- package/cssm/components/back-arrow-addon/index.js +0 -9
- package/cssm/components/back-arrow-addon/index.module.css +0 -75
- package/cssm/components/closer/Component.d.ts +0 -35
- package/cssm/components/closer/Component.js +0 -31
- package/cssm/components/closer/index.js +0 -9
- package/cssm/types.d.ts +0 -118
- package/cssm/types.js +0 -2
- package/esm/components/back-arrow-addon/Component.d.ts +0 -26
- package/esm/components/back-arrow-addon/Component.js +0 -26
- package/esm/components/back-arrow-addon/index.css +0 -76
- package/esm/components/back-arrow-addon/index.js +0 -1
- package/esm/components/closer/Component.d.ts +0 -35
- package/esm/components/closer/Component.js +0 -23
- package/esm/components/closer/index.js +0 -1
- package/esm/types.d.ts +0 -118
- package/esm/types.js +0 -1
- package/modern/components/back-arrow-addon/Component.d.ts +0 -26
- package/modern/components/back-arrow-addon/Component.js +0 -23
- package/modern/components/back-arrow-addon/index.css +0 -76
- package/modern/components/back-arrow-addon/index.js +0 -1
- package/modern/components/closer/Component.d.ts +0 -35
- package/modern/components/closer/Component.js +0 -20
- package/modern/components/closer/index.js +0 -1
- package/modern/types.d.ts +0 -118
- package/modern/types.js +0 -1
- package/src/components/back-arrow-addon/Component.tsx +0 -79
- package/src/components/back-arrow-addon/index.module.css +0 -69
- package/src/components/closer/Component.tsx +0 -80
- package/src/components/closer/index.module.css +0 -32
- package/src/types.ts +0 -143
- package/src/vars.css +0 -9
- package/types.d.ts +0 -118
- package/types.js +0 -2
- /package/components/{back-arrow-addon → action-icon-addon}/index.d.ts +0 -0
- /package/components/{closer → action-text-addon}/index.d.ts +0 -0
- /package/cssm/components/{back-arrow-addon → action-icon-addon}/index.d.ts +0 -0
- /package/cssm/components/{closer → action-text-addon}/index.d.ts +0 -0
- /package/esm/components/{back-arrow-addon → action-icon-addon}/index.d.ts +0 -0
- /package/esm/components/{closer → action-text-addon}/index.d.ts +0 -0
- /package/modern/components/{back-arrow-addon → action-icon-addon}/index.d.ts +0 -0
- /package/modern/components/{closer → action-text-addon}/index.d.ts +0 -0
- /package/src/components/{back-arrow-addon → action-icon-addon}/index.ts +0 -0
- /package/src/components/{closer → action-text-addon}/index.ts +0 -0
package/src/index.module.css
CHANGED
|
@@ -1,118 +1,78 @@
|
|
|
1
1
|
@import '@alfalab/core-components-themes/src/default.css';
|
|
2
2
|
|
|
3
|
-
.
|
|
4
|
-
|
|
3
|
+
.component {
|
|
4
|
+
padding: var(--gap-xs) var(--gap-2xs);
|
|
5
5
|
box-sizing: border-box;
|
|
6
|
-
|
|
6
|
+
width: 100%;
|
|
7
|
+
}
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
.sticky {
|
|
10
|
+
position: sticky;
|
|
11
|
+
top: 0;
|
|
12
|
+
z-index: 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.border {
|
|
16
|
+
box-shadow: 0 1px 0 0 var(--color-light-neutral-300);
|
|
13
17
|
}
|
|
14
18
|
|
|
15
19
|
.mainLine {
|
|
16
20
|
display: flex;
|
|
17
|
-
align-items: stretch;
|
|
18
|
-
justify-content: space-between;
|
|
19
|
-
z-index: 1;
|
|
20
21
|
background-color: inherit;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
min-height: 40px;
|
|
24
|
+
align-items: stretch;
|
|
21
25
|
}
|
|
22
26
|
|
|
23
|
-
.
|
|
24
|
-
|
|
25
|
-
|
|
27
|
+
.left {
|
|
28
|
+
text-align: left;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.center {
|
|
32
|
+
text-align: center;
|
|
26
33
|
}
|
|
27
34
|
|
|
28
|
-
.
|
|
29
|
-
|
|
35
|
+
.children {
|
|
36
|
+
width: 100%;
|
|
30
37
|
}
|
|
31
38
|
|
|
32
39
|
.content {
|
|
33
|
-
color: var(--color-light-text-primary);
|
|
34
40
|
display: flex;
|
|
35
|
-
flex-flow: column nowrap;
|
|
36
|
-
justify-content: center;
|
|
37
41
|
flex-grow: 1;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
&.withBothAddons,
|
|
43
|
-
&.withCompactTitle {
|
|
44
|
-
@mixin action_component;
|
|
45
|
-
align-self: center;
|
|
46
|
-
padding-top: var(--gap-2xs);
|
|
47
|
-
padding-bottom: var(--gap-2xs);
|
|
48
|
-
|
|
49
|
-
& > .children,
|
|
50
|
-
& > .title {
|
|
51
|
-
-webkit-line-clamp: 1;
|
|
52
|
-
word-break: break-all;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
42
|
+
justify-content: center;
|
|
43
|
+
flex-flow: column nowrap;
|
|
44
|
+
color: var(--color-light-text-primary);
|
|
55
45
|
|
|
56
|
-
&.
|
|
57
|
-
padding
|
|
46
|
+
&.left {
|
|
47
|
+
padding: 0 var(--gap-m);
|
|
58
48
|
}
|
|
59
49
|
|
|
60
|
-
|
|
61
|
-
|
|
50
|
+
& > .title,
|
|
51
|
+
& > .subtitle {
|
|
52
|
+
@mixin row_limit 1;
|
|
53
|
+
word-break: break-all;
|
|
62
54
|
}
|
|
63
55
|
}
|
|
64
56
|
|
|
65
57
|
.title {
|
|
66
|
-
|
|
58
|
+
@mixin action_component_primary;
|
|
59
|
+
|
|
60
|
+
&.left {
|
|
61
|
+
@mixin headline-system-mobile_small;
|
|
62
|
+
}
|
|
67
63
|
}
|
|
68
64
|
|
|
69
65
|
.subtitle {
|
|
70
66
|
@mixin paragraph_primary_small;
|
|
71
|
-
@mixin row_limit 1;
|
|
72
|
-
|
|
73
67
|
color: var(--color-light-text-secondary);
|
|
74
|
-
word-break: break-all;
|
|
75
68
|
}
|
|
76
69
|
|
|
77
|
-
.
|
|
78
|
-
display: flex;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.rightAddons {
|
|
82
|
-
margin-left: auto;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.addon {
|
|
70
|
+
.addons {
|
|
86
71
|
min-width: 48px;
|
|
87
|
-
height: 48px;
|
|
88
72
|
display: flex;
|
|
89
73
|
justify-content: center;
|
|
90
|
-
align-items: center;
|
|
91
|
-
flex-shrink: 0;
|
|
92
|
-
pointer-events: all;
|
|
93
74
|
}
|
|
94
75
|
|
|
95
|
-
.
|
|
96
|
-
pointer-events: all;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.closer {
|
|
76
|
+
.rightAddons {
|
|
100
77
|
margin-left: auto;
|
|
101
78
|
}
|
|
102
|
-
|
|
103
|
-
.left {
|
|
104
|
-
text-align: left;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.center {
|
|
108
|
-
text-align: center;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.trim {
|
|
112
|
-
overflow: hidden;
|
|
113
|
-
|
|
114
|
-
& .title,
|
|
115
|
-
& .children {
|
|
116
|
-
@mixin row_limit 2;
|
|
117
|
-
}
|
|
118
|
-
}
|
package/src/index.ts
CHANGED
package/src/shared/index.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
export * from '../components/
|
|
2
|
-
export * from '../components/
|
|
1
|
+
export * from '../components/action-icon-addon';
|
|
2
|
+
export * from '../components/action-text-addon';
|
|
3
|
+
export { getNavigationBarTestIds } from '../utils';
|
package/src/utils.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { getDataTestId } from '@alfalab/core-components-shared';
|
|
2
|
+
|
|
3
|
+
export function getNavigationBarTestIds(dataTestId: string) {
|
|
4
|
+
return {
|
|
5
|
+
navigationBar: dataTestId,
|
|
6
|
+
title: getDataTestId(dataTestId, 'title'),
|
|
7
|
+
subtitle: getDataTestId(dataTestId, 'subtitle'),
|
|
8
|
+
};
|
|
9
|
+
}
|
package/utils.d.ts
ADDED
package/utils.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var coreComponentsShared = require('@alfalab/core-components-shared');
|
|
6
|
+
|
|
7
|
+
function getNavigationBarTestIds(dataTestId) {
|
|
8
|
+
return {
|
|
9
|
+
navigationBar: dataTestId,
|
|
10
|
+
title: coreComponentsShared.getDataTestId(dataTestId, 'title'),
|
|
11
|
+
subtitle: coreComponentsShared.getDataTestId(dataTestId, 'subtitle'),
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
exports.getNavigationBarTestIds = getNavigationBarTestIds;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
4
|
-
/**
|
|
5
|
-
* Текст после иконки
|
|
6
|
-
*/
|
|
7
|
-
text?: string | null;
|
|
8
|
-
/**
|
|
9
|
-
* Дополнительный класс
|
|
10
|
-
*/
|
|
11
|
-
className?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Вид компонента
|
|
14
|
-
*/
|
|
15
|
-
view: 'mobile' | 'desktop';
|
|
16
|
-
/**
|
|
17
|
-
* Прозрачность текста
|
|
18
|
-
*/
|
|
19
|
-
textOpacity?: number;
|
|
20
|
-
/**
|
|
21
|
-
* Обработчик клика
|
|
22
|
-
*/
|
|
23
|
-
onClick?: () => void;
|
|
24
|
-
}
|
|
25
|
-
declare const BackArrowAddon: React.FC<BackArrowAddonProps>;
|
|
26
|
-
export { BackArrowAddonProps, BackArrowAddon };
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var tslib = require('tslib');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var cn = require('classnames');
|
|
8
|
-
var desktop = require('@alfalab/core-components-button/desktop');
|
|
9
|
-
var coreComponentsTypography = require('@alfalab/core-components-typography');
|
|
10
|
-
var ArrowLeftMediumMIcon = require('@alfalab/icons-glyph/ArrowLeftMediumMIcon');
|
|
11
|
-
var ArrowLeftMIcon = require('@alfalab/icons-glyph/ArrowLeftMIcon');
|
|
12
|
-
|
|
13
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
14
|
-
|
|
15
|
-
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
16
|
-
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
17
|
-
|
|
18
|
-
var styles = {"component":"navigation-bar__component_gpf6n","mobileComponent":"navigation-bar__mobileComponent_gpf6n","flex":"navigation-bar__flex_gpf6n","iconWrapper":"navigation-bar__iconWrapper_gpf6n","text":"navigation-bar__text_gpf6n","mobileWrapper":"navigation-bar__mobileWrapper_gpf6n"};
|
|
19
|
-
require('./index.css')
|
|
20
|
-
|
|
21
|
-
var BackArrowAddon = function (_a) {
|
|
22
|
-
var _b, _c;
|
|
23
|
-
var _d = _a.text, text = _d === void 0 ? 'Назад' : _d, onClick = _a.onClick, className = _a.className, _e = _a.textOpacity, textOpacity = _e === void 0 ? 1 : _e, view = _a.view, htmlAttributes = tslib.__rest(_a, ["text", "onClick", "className", "textOpacity", "view"]);
|
|
24
|
-
var Icon = view === 'desktop' ? ArrowLeftMediumMIcon.ArrowLeftMediumMIcon : ArrowLeftMIcon.ArrowLeftMIcon;
|
|
25
|
-
var isMobileView = view === 'mobile';
|
|
26
|
-
return (React__default.default.createElement(desktop.ButtonDesktop, tslib.__assign({ view: 'text', size: isMobileView ? 'xxs' : 's', onClick: onClick, "aria-label": '\u043D\u0430\u0437\u0430\u0434', className: cn__default.default(styles.component, (_b = {}, _b[styles.mobileComponent] = isMobileView, _b), className) }, htmlAttributes),
|
|
27
|
-
React__default.default.createElement("div", { className: styles.flex },
|
|
28
|
-
React__default.default.createElement("div", { className: cn__default.default(styles.iconWrapper, (_c = {},
|
|
29
|
-
_c[styles.mobileWrapper] = isMobileView,
|
|
30
|
-
_c)) },
|
|
31
|
-
React__default.default.createElement(Icon, null)),
|
|
32
|
-
textOpacity > 0 && text && (React__default.default.createElement(coreComponentsTypography.Typography.Text, { className: styles.text, view: view === 'desktop' ? 'primary-large' : 'component', weight: 'medium', style: { opacity: textOpacity } }, text)))));
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
exports.BackArrowAddon = BackArrowAddon;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
/* hash: 1fecp */
|
|
2
|
-
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
3
|
-
} /* deprecated */ :root {
|
|
4
|
-
--color-light-neutral-1500: #0e0e0e;
|
|
5
|
-
--color-light-neutral-1500-hover: #3f3f45;
|
|
6
|
-
--color-light-neutral-1500-press: #5f5f66;
|
|
7
|
-
--color-light-neutral-translucent-100: rgba(38, 55, 88, 0.06);
|
|
8
|
-
--color-light-neutral-translucent-700: rgba(4, 4, 21, 0.47); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
9
|
-
--color-light-bg-primary-alpha-40: rgba(255, 255, 255, 0.4);
|
|
10
|
-
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
11
|
-
} :root {
|
|
12
|
-
} :root {
|
|
13
|
-
|
|
14
|
-
/* Hard */
|
|
15
|
-
|
|
16
|
-
/* Up */
|
|
17
|
-
|
|
18
|
-
/* Hard up */
|
|
19
|
-
} :root {
|
|
20
|
-
--border-radius-circle: 50%;
|
|
21
|
-
--border-radius-pill: 99px;
|
|
22
|
-
} :root {
|
|
23
|
-
--gap-xs: 8px;
|
|
24
|
-
--gap-s: 12px;
|
|
25
|
-
} :root {
|
|
26
|
-
} :root {
|
|
27
|
-
} :root {
|
|
28
|
-
/* closer-mobile */
|
|
29
|
-
|
|
30
|
-
/* back-arrow */
|
|
31
|
-
--navigation-bar-back-arrow-mobile-fill: var(--color-light-neutral-translucent-700);
|
|
32
|
-
} .navigation-bar__component_gpf6n {
|
|
33
|
-
height: 100%;
|
|
34
|
-
background: var(--color-light-bg-primary-alpha-40);
|
|
35
|
-
-webkit-backdrop-filter: blur(10px);
|
|
36
|
-
backdrop-filter: blur(10px);
|
|
37
|
-
border-radius: var(--border-radius-pill);
|
|
38
|
-
min-width: 48px
|
|
39
|
-
} .navigation-bar__component_gpf6n svg > path {
|
|
40
|
-
transition: fill 0.2s ease;
|
|
41
|
-
fill: var(--color-light-neutral-1500);
|
|
42
|
-
} .navigation-bar__component_gpf6n:hover svg > path {
|
|
43
|
-
fill: var(--color-light-neutral-1500-hover);
|
|
44
|
-
} .navigation-bar__component_gpf6n:active svg > path {
|
|
45
|
-
fill: var(--color-light-neutral-1500-press);
|
|
46
|
-
} .navigation-bar__mobileComponent_gpf6n {
|
|
47
|
-
height: 32px;
|
|
48
|
-
min-width: 32px;
|
|
49
|
-
margin: 0 var(--gap-xs);
|
|
50
|
-
-webkit-backdrop-filter: none;
|
|
51
|
-
backdrop-filter: none;
|
|
52
|
-
background: none;
|
|
53
|
-
} .navigation-bar__flex_gpf6n {
|
|
54
|
-
display: flex;
|
|
55
|
-
align-items: center;
|
|
56
|
-
} .navigation-bar__iconWrapper_gpf6n {
|
|
57
|
-
display: inline-flex;
|
|
58
|
-
align-items: center;
|
|
59
|
-
justify-content: center;
|
|
60
|
-
height: 48px;
|
|
61
|
-
margin: 0 var(--gap-xs) 0 var(--gap-s);
|
|
62
|
-
border-radius: var(--border-radius-circle)
|
|
63
|
-
} .navigation-bar__iconWrapper_gpf6n + .navigation-bar__text_gpf6n {
|
|
64
|
-
margin-right: var(--gap-s);
|
|
65
|
-
} .navigation-bar__mobileWrapper_gpf6n {
|
|
66
|
-
width: 32px;
|
|
67
|
-
height: 32px;
|
|
68
|
-
background: var(--color-light-neutral-translucent-100);
|
|
69
|
-
-webkit-backdrop-filter: blur(10px);
|
|
70
|
-
backdrop-filter: blur(10px);
|
|
71
|
-
margin: 0
|
|
72
|
-
} .navigation-bar__mobileWrapper_gpf6n + .navigation-bar__text_gpf6n {
|
|
73
|
-
margin: 0 var(--gap-s) 0 var(--gap-xs);
|
|
74
|
-
} .navigation-bar__mobileWrapper_gpf6n svg > path {
|
|
75
|
-
fill: var(--navigation-bar-back-arrow-mobile-fill);
|
|
76
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ButtonHTMLAttributes, ElementType, FC } from "react";
|
|
4
|
-
interface CloserProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
-
/**
|
|
6
|
-
* Вид компонента
|
|
7
|
-
*/
|
|
8
|
-
view: 'desktop' | 'mobile';
|
|
9
|
-
/**
|
|
10
|
-
* Дополнительный класс
|
|
11
|
-
*/
|
|
12
|
-
className?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Позиция крестика
|
|
15
|
-
*/
|
|
16
|
-
align?: 'left' | 'right';
|
|
17
|
-
/**
|
|
18
|
-
* Фиксирует крестик
|
|
19
|
-
*/
|
|
20
|
-
sticky?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Иконка
|
|
23
|
-
*/
|
|
24
|
-
icon?: ElementType;
|
|
25
|
-
/**
|
|
26
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
27
|
-
*/
|
|
28
|
-
dataTestId?: string;
|
|
29
|
-
/**
|
|
30
|
-
* Коллбэк закрытия.
|
|
31
|
-
*/
|
|
32
|
-
onClose?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, reason?: 'backdropClick' | 'escapeKeyDown' | 'closerClick') => void;
|
|
33
|
-
}
|
|
34
|
-
declare const Closer: FC<CloserProps>;
|
|
35
|
-
export { CloserProps, Closer };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var tslib = require('tslib');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var cn = require('classnames');
|
|
8
|
-
var coreComponentsIconButton = require('@alfalab/core-components-icon-button');
|
|
9
|
-
var CrossHeavyMIcon = require('@alfalab/icons-glyph/CrossHeavyMIcon');
|
|
10
|
-
var CrossMIcon = require('@alfalab/icons-glyph/CrossMIcon');
|
|
11
|
-
|
|
12
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
13
|
-
|
|
14
|
-
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
15
|
-
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
16
|
-
|
|
17
|
-
var styles = {"closer":"navigation-bar__closer_1a9q8","button":"navigation-bar__button_1a9q8","mobile":"navigation-bar__mobile_1a9q8","sticky":"navigation-bar__sticky_1a9q8"};
|
|
18
|
-
require('./index.css')
|
|
19
|
-
|
|
20
|
-
var Closer = function (_a) {
|
|
21
|
-
var _b, _c;
|
|
22
|
-
var view = _a.view, className = _a.className, sticky = _a.sticky, _d = _a.icon, icon = _d === void 0 ? view === 'desktop' ? CrossHeavyMIcon.CrossHeavyMIcon : CrossMIcon.CrossMIcon : _d, dataTestId = _a.dataTestId, onClose = _a.onClose, restProps = tslib.__rest(_a, ["view", "className", "sticky", "icon", "dataTestId", "onClose"]);
|
|
23
|
-
var handleClick = function (event) {
|
|
24
|
-
onClose === null || onClose === void 0 ? void 0 : onClose(event, 'closerClick');
|
|
25
|
-
};
|
|
26
|
-
return (React__default.default.createElement("div", { className: cn__default.default(styles.closer, className, (_b = {},
|
|
27
|
-
_b[styles.sticky] = sticky,
|
|
28
|
-
_b)) },
|
|
29
|
-
React__default.default.createElement(coreComponentsIconButton.IconButton, tslib.__assign({ size: view === 'desktop' ? 's' : 'xs', className: cn__default.default(styles.button, (_c = {}, _c[styles.mobile] = view === 'mobile', _c)), "aria-label": '\u0437\u0430\u043A\u0440\u044B\u0442\u044C', onClick: handleClick, icon: icon, dataTestId: dataTestId }, restProps))));
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
exports.Closer = Closer;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
4
|
-
/**
|
|
5
|
-
* Текст после иконки
|
|
6
|
-
*/
|
|
7
|
-
text?: string | null;
|
|
8
|
-
/**
|
|
9
|
-
* Дополнительный класс
|
|
10
|
-
*/
|
|
11
|
-
className?: string;
|
|
12
|
-
/**
|
|
13
|
-
* Вид компонента
|
|
14
|
-
*/
|
|
15
|
-
view: 'mobile' | 'desktop';
|
|
16
|
-
/**
|
|
17
|
-
* Прозрачность текста
|
|
18
|
-
*/
|
|
19
|
-
textOpacity?: number;
|
|
20
|
-
/**
|
|
21
|
-
* Обработчик клика
|
|
22
|
-
*/
|
|
23
|
-
onClick?: () => void;
|
|
24
|
-
}
|
|
25
|
-
declare const BackArrowAddon: React.FC<BackArrowAddonProps>;
|
|
26
|
-
export { BackArrowAddonProps, BackArrowAddon };
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var tslib = require('tslib');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var cn = require('classnames');
|
|
8
|
-
var desktop = require('@alfalab/core-components-button/cssm/desktop');
|
|
9
|
-
var coreComponentsTypography = require('@alfalab/core-components-typography/cssm');
|
|
10
|
-
var ArrowLeftMediumMIcon = require('@alfalab/icons-glyph/ArrowLeftMediumMIcon');
|
|
11
|
-
var ArrowLeftMIcon = require('@alfalab/icons-glyph/ArrowLeftMIcon');
|
|
12
|
-
var styles = require('./index.module.css');
|
|
13
|
-
|
|
14
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
15
|
-
|
|
16
|
-
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
17
|
-
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
18
|
-
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
19
|
-
|
|
20
|
-
var BackArrowAddon = function (_a) {
|
|
21
|
-
var _b, _c;
|
|
22
|
-
var _d = _a.text, text = _d === void 0 ? 'Назад' : _d, onClick = _a.onClick, className = _a.className, _e = _a.textOpacity, textOpacity = _e === void 0 ? 1 : _e, view = _a.view, htmlAttributes = tslib.__rest(_a, ["text", "onClick", "className", "textOpacity", "view"]);
|
|
23
|
-
var Icon = view === 'desktop' ? ArrowLeftMediumMIcon.ArrowLeftMediumMIcon : ArrowLeftMIcon.ArrowLeftMIcon;
|
|
24
|
-
var isMobileView = view === 'mobile';
|
|
25
|
-
return (React__default.default.createElement(desktop.ButtonDesktop, tslib.__assign({ view: 'text', size: isMobileView ? 'xxs' : 's', onClick: onClick, "aria-label": '\u043D\u0430\u0437\u0430\u0434', className: cn__default.default(styles__default.default.component, (_b = {}, _b[styles__default.default.mobileComponent] = isMobileView, _b), className) }, htmlAttributes),
|
|
26
|
-
React__default.default.createElement("div", { className: styles__default.default.flex },
|
|
27
|
-
React__default.default.createElement("div", { className: cn__default.default(styles__default.default.iconWrapper, (_c = {},
|
|
28
|
-
_c[styles__default.default.mobileWrapper] = isMobileView,
|
|
29
|
-
_c)) },
|
|
30
|
-
React__default.default.createElement(Icon, null)),
|
|
31
|
-
textOpacity > 0 && text && (React__default.default.createElement(coreComponentsTypography.Typography.Text, { className: styles__default.default.text, view: view === 'desktop' ? 'primary-large' : 'component', weight: 'medium', style: { opacity: textOpacity } }, text)))));
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
exports.BackArrowAddon = BackArrowAddon;
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
:root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
2
|
-
} /* deprecated */ :root {
|
|
3
|
-
--color-light-neutral-1500: #0e0e0e;
|
|
4
|
-
--color-light-neutral-1500-hover: #3f3f45;
|
|
5
|
-
--color-light-neutral-1500-press: #5f5f66;
|
|
6
|
-
--color-light-neutral-translucent-100: rgba(38, 55, 88, 0.06);
|
|
7
|
-
--color-light-neutral-translucent-700: rgba(4, 4, 21, 0.47); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
8
|
-
--color-light-bg-primary-alpha-40: rgba(255, 255, 255, 0.4);
|
|
9
|
-
} :root { /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
10
|
-
} :root {
|
|
11
|
-
} :root {
|
|
12
|
-
|
|
13
|
-
/* Hard */
|
|
14
|
-
|
|
15
|
-
/* Up */
|
|
16
|
-
|
|
17
|
-
/* Hard up */
|
|
18
|
-
} :root {
|
|
19
|
-
--border-radius-circle: 50%;
|
|
20
|
-
--border-radius-pill: 99px;
|
|
21
|
-
} :root {
|
|
22
|
-
--gap-xs: 8px;
|
|
23
|
-
--gap-s: 12px;
|
|
24
|
-
} :root {
|
|
25
|
-
} :root {
|
|
26
|
-
} :root {
|
|
27
|
-
/* closer-mobile */
|
|
28
|
-
|
|
29
|
-
/* back-arrow */
|
|
30
|
-
--navigation-bar-back-arrow-mobile-fill: var(--color-light-neutral-translucent-700);
|
|
31
|
-
} .component {
|
|
32
|
-
height: 100%;
|
|
33
|
-
background: var(--color-light-bg-primary-alpha-40);
|
|
34
|
-
-webkit-backdrop-filter: blur(10px);
|
|
35
|
-
backdrop-filter: blur(10px);
|
|
36
|
-
border-radius: var(--border-radius-pill);
|
|
37
|
-
min-width: 48px
|
|
38
|
-
} .component svg > path {
|
|
39
|
-
transition: fill 0.2s ease;
|
|
40
|
-
fill: var(--color-light-neutral-1500);
|
|
41
|
-
} .component:hover svg > path {
|
|
42
|
-
fill: var(--color-light-neutral-1500-hover);
|
|
43
|
-
} .component:active svg > path {
|
|
44
|
-
fill: var(--color-light-neutral-1500-press);
|
|
45
|
-
} .mobileComponent {
|
|
46
|
-
height: 32px;
|
|
47
|
-
min-width: 32px;
|
|
48
|
-
margin: 0 var(--gap-xs);
|
|
49
|
-
-webkit-backdrop-filter: none;
|
|
50
|
-
backdrop-filter: none;
|
|
51
|
-
background: none;
|
|
52
|
-
} .flex {
|
|
53
|
-
display: flex;
|
|
54
|
-
align-items: center;
|
|
55
|
-
} .iconWrapper {
|
|
56
|
-
display: inline-flex;
|
|
57
|
-
align-items: center;
|
|
58
|
-
justify-content: center;
|
|
59
|
-
height: 48px;
|
|
60
|
-
margin: 0 var(--gap-xs) 0 var(--gap-s);
|
|
61
|
-
border-radius: var(--border-radius-circle)
|
|
62
|
-
} .iconWrapper + .text {
|
|
63
|
-
margin-right: var(--gap-s);
|
|
64
|
-
} .mobileWrapper {
|
|
65
|
-
width: 32px;
|
|
66
|
-
height: 32px;
|
|
67
|
-
background: var(--color-light-neutral-translucent-100);
|
|
68
|
-
-webkit-backdrop-filter: blur(10px);
|
|
69
|
-
backdrop-filter: blur(10px);
|
|
70
|
-
margin: 0
|
|
71
|
-
} .mobileWrapper + .text {
|
|
72
|
-
margin: 0 var(--gap-s) 0 var(--gap-xs);
|
|
73
|
-
} .mobileWrapper svg > path {
|
|
74
|
-
fill: var(--navigation-bar-back-arrow-mobile-fill);
|
|
75
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ButtonHTMLAttributes, ElementType, FC } from "react";
|
|
4
|
-
interface CloserProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
5
|
-
/**
|
|
6
|
-
* Вид компонента
|
|
7
|
-
*/
|
|
8
|
-
view: 'desktop' | 'mobile';
|
|
9
|
-
/**
|
|
10
|
-
* Дополнительный класс
|
|
11
|
-
*/
|
|
12
|
-
className?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Позиция крестика
|
|
15
|
-
*/
|
|
16
|
-
align?: 'left' | 'right';
|
|
17
|
-
/**
|
|
18
|
-
* Фиксирует крестик
|
|
19
|
-
*/
|
|
20
|
-
sticky?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Иконка
|
|
23
|
-
*/
|
|
24
|
-
icon?: ElementType;
|
|
25
|
-
/**
|
|
26
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
27
|
-
*/
|
|
28
|
-
dataTestId?: string;
|
|
29
|
-
/**
|
|
30
|
-
* Коллбэк закрытия.
|
|
31
|
-
*/
|
|
32
|
-
onClose?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, reason?: 'backdropClick' | 'escapeKeyDown' | 'closerClick') => void;
|
|
33
|
-
}
|
|
34
|
-
declare const Closer: FC<CloserProps>;
|
|
35
|
-
export { CloserProps, Closer };
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var tslib = require('tslib');
|
|
6
|
-
var React = require('react');
|
|
7
|
-
var cn = require('classnames');
|
|
8
|
-
var coreComponentsIconButton = require('@alfalab/core-components-icon-button/cssm');
|
|
9
|
-
var CrossHeavyMIcon = require('@alfalab/icons-glyph/CrossHeavyMIcon');
|
|
10
|
-
var CrossMIcon = require('@alfalab/icons-glyph/CrossMIcon');
|
|
11
|
-
var styles = require('./index.module.css');
|
|
12
|
-
|
|
13
|
-
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
14
|
-
|
|
15
|
-
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
16
|
-
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
17
|
-
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
18
|
-
|
|
19
|
-
var Closer = function (_a) {
|
|
20
|
-
var _b, _c;
|
|
21
|
-
var view = _a.view, className = _a.className, sticky = _a.sticky, _d = _a.icon, icon = _d === void 0 ? view === 'desktop' ? CrossHeavyMIcon.CrossHeavyMIcon : CrossMIcon.CrossMIcon : _d, dataTestId = _a.dataTestId, onClose = _a.onClose, restProps = tslib.__rest(_a, ["view", "className", "sticky", "icon", "dataTestId", "onClose"]);
|
|
22
|
-
var handleClick = function (event) {
|
|
23
|
-
onClose === null || onClose === void 0 ? void 0 : onClose(event, 'closerClick');
|
|
24
|
-
};
|
|
25
|
-
return (React__default.default.createElement("div", { className: cn__default.default(styles__default.default.closer, className, (_b = {},
|
|
26
|
-
_b[styles__default.default.sticky] = sticky,
|
|
27
|
-
_b)) },
|
|
28
|
-
React__default.default.createElement(coreComponentsIconButton.IconButton, tslib.__assign({ size: view === 'desktop' ? 's' : 'xs', className: cn__default.default(styles__default.default.button, (_c = {}, _c[styles__default.default.mobile] = view === 'mobile', _c)), "aria-label": '\u0437\u0430\u043A\u0440\u044B\u0442\u044C', onClick: handleClick, icon: icon, dataTestId: dataTestId }, restProps))));
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
exports.Closer = Closer;
|