@alfalab/core-components-navigation-bar 0.8.1 → 0.8.3

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.
Files changed (44) hide show
  1. package/Component.js +1 -8
  2. package/components/back-arrow-addon/Component.d.ts +1 -1
  3. package/components/back-arrow-addon/Component.js +5 -4
  4. package/components/back-arrow-addon/index.css +15 -13
  5. package/components/back-arrow-addon/index.js +0 -7
  6. package/components/closer/Component.js +1 -1
  7. package/components/closer/index.css +6 -6
  8. package/components/closer/index.js +0 -6
  9. package/cssm/Component.js +0 -9
  10. package/cssm/components/back-arrow-addon/Component.d.ts +1 -1
  11. package/cssm/components/back-arrow-addon/Component.js +4 -3
  12. package/cssm/components/back-arrow-addon/index.js +0 -8
  13. package/cssm/components/back-arrow-addon/index.module.css +3 -1
  14. package/cssm/components/closer/index.js +0 -7
  15. package/cssm/index.js +0 -18
  16. package/cssm/shared/index.js +0 -12
  17. package/esm/Component.js +1 -8
  18. package/esm/components/back-arrow-addon/Component.d.ts +1 -1
  19. package/esm/components/back-arrow-addon/Component.js +5 -4
  20. package/esm/components/back-arrow-addon/index.css +15 -13
  21. package/esm/components/back-arrow-addon/index.js +0 -7
  22. package/esm/components/closer/Component.js +1 -1
  23. package/esm/components/closer/index.css +6 -6
  24. package/esm/components/closer/index.js +0 -6
  25. package/esm/index.css +27 -27
  26. package/esm/index.js +0 -15
  27. package/esm/shared/index.js +0 -10
  28. package/index.css +27 -27
  29. package/index.js +0 -15
  30. package/modern/Component.js +1 -8
  31. package/modern/components/back-arrow-addon/Component.d.ts +1 -1
  32. package/modern/components/back-arrow-addon/Component.js +5 -4
  33. package/modern/components/back-arrow-addon/index.css +15 -13
  34. package/modern/components/back-arrow-addon/index.js +0 -6
  35. package/modern/components/closer/Component.js +1 -1
  36. package/modern/components/closer/index.css +6 -6
  37. package/modern/components/closer/index.js +0 -5
  38. package/modern/index.css +27 -27
  39. package/modern/index.js +0 -14
  40. package/modern/shared/index.js +0 -9
  41. package/package.json +4 -4
  42. package/shared/index.js +0 -10
  43. package/src/components/back-arrow-addon/Component.tsx +6 -9
  44. package/src/components/back-arrow-addon/index.module.css +2 -0
package/Component.js CHANGED
@@ -10,13 +10,6 @@ var coreComponentsShared = require('@alfalab/core-components-shared');
10
10
  var hooks = require('@alfalab/hooks');
11
11
  var components_backArrowAddon_Component = require('./components/back-arrow-addon/Component.js');
12
12
  var components_closer_Component = require('./components/closer/Component.js');
13
- require('@alfalab/core-components-button/desktop');
14
- require('@alfalab/core-components-typography');
15
- require('@alfalab/icons-glyph/ArrowLeftMediumMIcon');
16
- require('@alfalab/icons-glyph/ArrowLeftMIcon');
17
- require('@alfalab/core-components-icon-button');
18
- require('@alfalab/icons-glyph/CrossHeavyMIcon');
19
- require('@alfalab/icons-glyph/CrossMIcon');
20
13
 
21
14
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
22
15
 
@@ -24,7 +17,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
24
17
  var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
25
18
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
26
19
 
27
- var styles = {"header":"navigation-bar__header_1ba97","backgroundImage":"navigation-bar__backgroundImage_1ba97","mainLine":"navigation-bar__mainLine_1ba97","mainLineSticky":"navigation-bar__mainLineSticky_1ba97","mainLineWithImageBg":"navigation-bar__mainLineWithImageBg_1ba97","content":"navigation-bar__content_1ba97","withBothAddons":"navigation-bar__withBothAddons_1ba97","withCompactTitle":"navigation-bar__withCompactTitle_1ba97","children":"navigation-bar__children_1ba97","title":"navigation-bar__title_1ba97","contentOnBotDesktop":"navigation-bar__contentOnBotDesktop_1ba97","contentOnBotMobile":"navigation-bar__contentOnBotMobile_1ba97","subtitle":"navigation-bar__subtitle_1ba97","addonsWrapper":"navigation-bar__addonsWrapper_1ba97","rightAddons":"navigation-bar__rightAddons_1ba97","addon":"navigation-bar__addon_1ba97","bottomAddons":"navigation-bar__bottomAddons_1ba97","closer":"navigation-bar__closer_1ba97","left":"navigation-bar__left_1ba97","center":"navigation-bar__center_1ba97","trim":"navigation-bar__trim_1ba97"};
20
+ var styles = {"header":"navigation-bar__header_1jzhj","backgroundImage":"navigation-bar__backgroundImage_1jzhj","mainLine":"navigation-bar__mainLine_1jzhj","mainLineSticky":"navigation-bar__mainLineSticky_1jzhj","mainLineWithImageBg":"navigation-bar__mainLineWithImageBg_1jzhj","content":"navigation-bar__content_1jzhj","withBothAddons":"navigation-bar__withBothAddons_1jzhj","withCompactTitle":"navigation-bar__withCompactTitle_1jzhj","children":"navigation-bar__children_1jzhj","title":"navigation-bar__title_1jzhj","contentOnBotDesktop":"navigation-bar__contentOnBotDesktop_1jzhj","contentOnBotMobile":"navigation-bar__contentOnBotMobile_1jzhj","subtitle":"navigation-bar__subtitle_1jzhj","addonsWrapper":"navigation-bar__addonsWrapper_1jzhj","rightAddons":"navigation-bar__rightAddons_1jzhj","addon":"navigation-bar__addon_1jzhj","bottomAddons":"navigation-bar__bottomAddons_1jzhj","closer":"navigation-bar__closer_1jzhj","left":"navigation-bar__left_1jzhj","center":"navigation-bar__center_1jzhj","trim":"navigation-bar__trim_1jzhj"};
28
21
  require('./index.css')
29
22
 
30
23
  var ADDONS_HEIGHT = 48;
@@ -4,7 +4,7 @@ interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
4
4
  /**
5
5
  * Текст после иконки
6
6
  */
7
- text?: string;
7
+ text?: string | null;
8
8
  /**
9
9
  * Дополнительный класс
10
10
  */
@@ -15,20 +15,21 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
15
15
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
16
16
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
17
17
 
18
- var styles = {"component":"navigation-bar__component_ymcm0","mobileComponent":"navigation-bar__mobileComponent_ymcm0","flex":"navigation-bar__flex_ymcm0","iconWrapper":"navigation-bar__iconWrapper_ymcm0","text":"navigation-bar__text_ymcm0","mobileWrapper":"navigation-bar__mobileWrapper_ymcm0"};
18
+ var styles = {"component":"navigation-bar__component_1qr5s","mobileComponent":"navigation-bar__mobileComponent_1qr5s","flex":"navigation-bar__flex_1qr5s","iconWrapper":"navigation-bar__iconWrapper_1qr5s","text":"navigation-bar__text_1qr5s","mobileWrapper":"navigation-bar__mobileWrapper_1qr5s"};
19
19
  require('./index.css')
20
20
 
21
21
  var BackArrowAddon = function (_a) {
22
22
  var _b, _c;
23
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
24
  var Icon = view === 'desktop' ? ArrowLeftMediumMIcon.ArrowLeftMediumMIcon : ArrowLeftMIcon.ArrowLeftMIcon;
25
- return (React__default.default.createElement(desktop.ButtonDesktop, tslib.__assign({ view: 'ghost', size: view === 'mobile' ? 'xxs' : 's', onClick: onClick, "aria-label": '\u043D\u0430\u0437\u0430\u0434', className: cn__default.default(styles.component, (_b = {}, _b[styles.mobileComponent] = view === 'mobile', _b), className) }, htmlAttributes),
25
+ var isMobileView = view === 'mobile';
26
+ return (React__default.default.createElement(desktop.ButtonDesktop, tslib.__assign({ view: 'ghost', 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),
26
27
  React__default.default.createElement("div", { className: styles.flex },
27
28
  React__default.default.createElement("div", { className: cn__default.default(styles.iconWrapper, (_c = {},
28
- _c[styles.mobileWrapper] = view === 'mobile',
29
+ _c[styles.mobileWrapper] = isMobileView,
29
30
  _c)) },
30
31
  React__default.default.createElement(Icon, null)),
31
- textOpacity > 0 && (React__default.default.createElement(coreComponentsTypography.Typography.Text, { className: styles.text, view: view === 'desktop' ? 'primary-large' : 'component', weight: 'medium', style: { opacity: textOpacity } }, text)))));
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)))));
32
33
  };
33
34
 
34
35
  exports.BackArrowAddon = BackArrowAddon;
@@ -1,4 +1,4 @@
1
- /* hash: 1ca2d */
1
+ /* hash: 1hp61 */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-neutral-1500: #0e0e0e;
@@ -24,46 +24,48 @@
24
24
  --gap-s: 12px;
25
25
  } :root {
26
26
  } :root {
27
- } .navigation-bar__component_ymcm0 {
27
+ } .navigation-bar__component_1qr5s {
28
28
  height: 100%;
29
29
  background: var(--color-light-bg-primary-alpha-40);
30
30
  -webkit-backdrop-filter: blur(10px);
31
31
  backdrop-filter: blur(10px);
32
- border-radius: var(--border-radius-pill)
33
- } .navigation-bar__component_ymcm0 svg > path {
32
+ border-radius: var(--border-radius-pill);
33
+ min-width: 48px
34
+ } .navigation-bar__component_1qr5s svg > path {
34
35
  transition: fill 0.2s ease;
35
36
  fill: var(--color-light-neutral-1500);
36
- } .navigation-bar__component_ymcm0:hover svg > path {
37
+ } .navigation-bar__component_1qr5s:hover svg > path {
37
38
  fill: var(--color-light-neutral-1500-hover);
38
- } .navigation-bar__component_ymcm0:active svg > path {
39
+ } .navigation-bar__component_1qr5s:active svg > path {
39
40
  fill: var(--color-light-neutral-1500-press);
40
- } .navigation-bar__mobileComponent_ymcm0 {
41
+ } .navigation-bar__mobileComponent_1qr5s {
41
42
  height: 32px;
43
+ min-width: 32px;
42
44
  margin: 0 var(--gap-xs);
43
45
  -webkit-backdrop-filter: none;
44
46
  backdrop-filter: none;
45
47
  background: none;
46
- } .navigation-bar__flex_ymcm0 {
48
+ } .navigation-bar__flex_1qr5s {
47
49
  display: flex;
48
50
  align-items: center;
49
- } .navigation-bar__iconWrapper_ymcm0 {
51
+ } .navigation-bar__iconWrapper_1qr5s {
50
52
  display: inline-flex;
51
53
  align-items: center;
52
54
  justify-content: center;
53
55
  height: 48px;
54
56
  margin: 0 var(--gap-xs) 0 var(--gap-s);
55
57
  border-radius: var(--border-radius-circle)
56
- } .navigation-bar__iconWrapper_ymcm0 + .navigation-bar__text_ymcm0 {
58
+ } .navigation-bar__iconWrapper_1qr5s + .navigation-bar__text_1qr5s {
57
59
  margin-right: var(--gap-s);
58
- } .navigation-bar__mobileWrapper_ymcm0 {
60
+ } .navigation-bar__mobileWrapper_1qr5s {
59
61
  width: 32px;
60
62
  height: 32px;
61
63
  background: var(--color-light-neutral-translucent-100);
62
64
  -webkit-backdrop-filter: blur(10px);
63
65
  backdrop-filter: blur(10px);
64
66
  margin: 0
65
- } .navigation-bar__mobileWrapper_ymcm0 + .navigation-bar__text_ymcm0 {
67
+ } .navigation-bar__mobileWrapper_1qr5s + .navigation-bar__text_1qr5s {
66
68
  margin: 0 var(--gap-s) 0 var(--gap-xs);
67
- } .navigation-bar__mobileWrapper_ymcm0 svg > path {
69
+ } .navigation-bar__mobileWrapper_1qr5s svg > path {
68
70
  fill: var(--color-light-neutral-translucent-700);
69
71
  }
@@ -3,13 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var components_backArrowAddon_Component = require('./Component.js');
6
- require('tslib');
7
- require('react');
8
- require('classnames');
9
- require('@alfalab/core-components-button/desktop');
10
- require('@alfalab/core-components-typography');
11
- require('@alfalab/icons-glyph/ArrowLeftMediumMIcon');
12
- require('@alfalab/icons-glyph/ArrowLeftMIcon');
13
6
 
14
7
 
15
8
 
@@ -14,7 +14,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
14
14
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
15
15
  var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
16
16
 
17
- var styles = {"closer":"navigation-bar__closer_kpzob","button":"navigation-bar__button_kpzob","mobile":"navigation-bar__mobile_kpzob","sticky":"navigation-bar__sticky_kpzob"};
17
+ var styles = {"closer":"navigation-bar__closer_tf80q","button":"navigation-bar__button_tf80q","mobile":"navigation-bar__mobile_tf80q","sticky":"navigation-bar__sticky_tf80q"};
18
18
  require('./index.css')
19
19
 
20
20
  var Closer = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: wqzu4 */
1
+ /* hash: 1ply5 */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-neutral-1500: #0e0e0e;
@@ -22,7 +22,7 @@
22
22
  } :root {
23
23
  /* closer-mobile */
24
24
  --navigation-bar-closer-mobile-color: var(--color-light-neutral-translucent-700);
25
- } .navigation-bar__closer_kpzob {
25
+ } .navigation-bar__closer_tf80q {
26
26
  flex-shrink: 0;
27
27
  width: 48px;
28
28
  height: 48px;
@@ -30,17 +30,17 @@
30
30
  display: flex;
31
31
  align-items: center;
32
32
  justify-content: center;
33
- } .navigation-bar__button_kpzob {
33
+ } .navigation-bar__button_tf80q {
34
34
  background: var(--color-light-bg-primary-alpha-40);
35
35
  -webkit-backdrop-filter: blur(10px);
36
36
  backdrop-filter: blur(10px);
37
37
  color: var(--color-light-neutral-1500)
38
- } .navigation-bar__button_kpzob.navigation-bar__mobile_kpzob {
38
+ } .navigation-bar__button_tf80q.navigation-bar__mobile_tf80q {
39
39
  background: var(--color-light-neutral-translucent-100);
40
40
  color: var(--navigation-bar-closer-mobile-color);
41
- } .navigation-bar__button_kpzob.navigation-bar__button_kpzob {
41
+ } .navigation-bar__button_tf80q.navigation-bar__button_tf80q {
42
42
  border-radius: var(--border-radius-circle);
43
- } .navigation-bar__sticky_kpzob {
43
+ } .navigation-bar__sticky_tf80q {
44
44
  position: sticky;
45
45
  top: 0;
46
46
  }
@@ -3,12 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var components_closer_Component = require('./Component.js');
6
- require('tslib');
7
- require('react');
8
- require('classnames');
9
- require('@alfalab/core-components-icon-button');
10
- require('@alfalab/icons-glyph/CrossHeavyMIcon');
11
- require('@alfalab/icons-glyph/CrossMIcon');
12
6
 
13
7
 
14
8
 
package/cssm/Component.js CHANGED
@@ -11,15 +11,6 @@ var hooks = require('@alfalab/hooks');
11
11
  var components_backArrowAddon_Component = require('./components/back-arrow-addon/Component.js');
12
12
  var components_closer_Component = require('./components/closer/Component.js');
13
13
  var styles = require('./index.module.css');
14
- require('@alfalab/core-components-button/cssm/desktop');
15
- require('@alfalab/core-components-typography/cssm');
16
- require('@alfalab/icons-glyph/ArrowLeftMediumMIcon');
17
- require('@alfalab/icons-glyph/ArrowLeftMIcon');
18
- require('./components/back-arrow-addon/index.module.css');
19
- require('@alfalab/core-components-icon-button/cssm');
20
- require('@alfalab/icons-glyph/CrossHeavyMIcon');
21
- require('@alfalab/icons-glyph/CrossMIcon');
22
- require('./components/closer/index.module.css');
23
14
 
24
15
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
25
16
 
@@ -4,7 +4,7 @@ interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
4
4
  /**
5
5
  * Текст после иконки
6
6
  */
7
- text?: string;
7
+ text?: string | null;
8
8
  /**
9
9
  * Дополнительный класс
10
10
  */
@@ -21,13 +21,14 @@ var BackArrowAddon = function (_a) {
21
21
  var _b, _c;
22
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
23
  var Icon = view === 'desktop' ? ArrowLeftMediumMIcon.ArrowLeftMediumMIcon : ArrowLeftMIcon.ArrowLeftMIcon;
24
- return (React__default.default.createElement(desktop.ButtonDesktop, tslib.__assign({ view: 'ghost', size: view === 'mobile' ? '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] = view === 'mobile', _b), className) }, htmlAttributes),
24
+ var isMobileView = view === 'mobile';
25
+ return (React__default.default.createElement(desktop.ButtonDesktop, tslib.__assign({ view: 'ghost', 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),
25
26
  React__default.default.createElement("div", { className: styles__default.default.flex },
26
27
  React__default.default.createElement("div", { className: cn__default.default(styles__default.default.iconWrapper, (_c = {},
27
- _c[styles__default.default.mobileWrapper] = view === 'mobile',
28
+ _c[styles__default.default.mobileWrapper] = isMobileView,
28
29
  _c)) },
29
30
  React__default.default.createElement(Icon, null)),
30
- textOpacity > 0 && (React__default.default.createElement(coreComponentsTypography.Typography.Text, { className: styles__default.default.text, view: view === 'desktop' ? 'primary-large' : 'component', weight: 'medium', style: { opacity: textOpacity } }, text)))));
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)))));
31
32
  };
32
33
 
33
34
  exports.BackArrowAddon = BackArrowAddon;
@@ -3,14 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var components_backArrowAddon_Component = require('./Component.js');
6
- require('tslib');
7
- require('react');
8
- require('classnames');
9
- require('@alfalab/core-components-button/cssm/desktop');
10
- require('@alfalab/core-components-typography/cssm');
11
- require('@alfalab/icons-glyph/ArrowLeftMediumMIcon');
12
- require('@alfalab/icons-glyph/ArrowLeftMIcon');
13
- require('./index.module.css');
14
6
 
15
7
 
16
8
 
@@ -28,7 +28,8 @@
28
28
  background: var(--color-light-bg-primary-alpha-40);
29
29
  -webkit-backdrop-filter: blur(10px);
30
30
  backdrop-filter: blur(10px);
31
- border-radius: var(--border-radius-pill)
31
+ border-radius: var(--border-radius-pill);
32
+ min-width: 48px
32
33
  } .component svg > path {
33
34
  transition: fill 0.2s ease;
34
35
  fill: var(--color-light-neutral-1500);
@@ -38,6 +39,7 @@
38
39
  fill: var(--color-light-neutral-1500-press);
39
40
  } .mobileComponent {
40
41
  height: 32px;
42
+ min-width: 32px;
41
43
  margin: 0 var(--gap-xs);
42
44
  -webkit-backdrop-filter: none;
43
45
  backdrop-filter: none;
@@ -3,13 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var components_closer_Component = require('./Component.js');
6
- require('tslib');
7
- require('react');
8
- require('classnames');
9
- require('@alfalab/core-components-icon-button/cssm');
10
- require('@alfalab/icons-glyph/CrossHeavyMIcon');
11
- require('@alfalab/icons-glyph/CrossMIcon');
12
- require('./index.module.css');
13
6
 
14
7
 
15
8
 
package/cssm/index.js CHANGED
@@ -3,24 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var Component = require('./Component.js');
6
- require('tslib');
7
- require('react');
8
- require('react-merge-refs');
9
- require('classnames');
10
- require('@alfalab/core-components-shared/cssm');
11
- require('@alfalab/hooks');
12
- require('./components/back-arrow-addon/Component.js');
13
- require('@alfalab/core-components-button/cssm/desktop');
14
- require('@alfalab/core-components-typography/cssm');
15
- require('@alfalab/icons-glyph/ArrowLeftMediumMIcon');
16
- require('@alfalab/icons-glyph/ArrowLeftMIcon');
17
- require('./components/back-arrow-addon/index.module.css');
18
- require('./components/closer/Component.js');
19
- require('@alfalab/core-components-icon-button/cssm');
20
- require('@alfalab/icons-glyph/CrossHeavyMIcon');
21
- require('@alfalab/icons-glyph/CrossMIcon');
22
- require('./components/closer/index.module.css');
23
- require('./index.module.css');
24
6
 
25
7
 
26
8
 
@@ -4,18 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var components_closer_Component = require('../components/closer/Component.js');
6
6
  var components_backArrowAddon_Component = require('../components/back-arrow-addon/Component.js');
7
- require('tslib');
8
- require('react');
9
- require('classnames');
10
- require('@alfalab/core-components-icon-button/cssm');
11
- require('@alfalab/icons-glyph/CrossHeavyMIcon');
12
- require('@alfalab/icons-glyph/CrossMIcon');
13
- require('../components/closer/index.module.css');
14
- require('@alfalab/core-components-button/cssm/desktop');
15
- require('@alfalab/core-components-typography/cssm');
16
- require('@alfalab/icons-glyph/ArrowLeftMediumMIcon');
17
- require('@alfalab/icons-glyph/ArrowLeftMIcon');
18
- require('../components/back-arrow-addon/index.module.css');
19
7
 
20
8
 
21
9
 
package/esm/Component.js CHANGED
@@ -6,15 +6,8 @@ import { getDataTestId } from '@alfalab/core-components-shared/esm';
6
6
  import { useLayoutEffect_SAFE_FOR_SSR } from '@alfalab/hooks';
7
7
  import { BackArrowAddon } from './components/back-arrow-addon/Component.js';
8
8
  import { Closer } from './components/closer/Component.js';
9
- import '@alfalab/core-components-button/esm/desktop';
10
- import '@alfalab/core-components-typography/esm';
11
- import '@alfalab/icons-glyph/ArrowLeftMediumMIcon';
12
- import '@alfalab/icons-glyph/ArrowLeftMIcon';
13
- import '@alfalab/core-components-icon-button/esm';
14
- import '@alfalab/icons-glyph/CrossHeavyMIcon';
15
- import '@alfalab/icons-glyph/CrossMIcon';
16
9
 
17
- var styles = {"header":"navigation-bar__header_1ba97","backgroundImage":"navigation-bar__backgroundImage_1ba97","mainLine":"navigation-bar__mainLine_1ba97","mainLineSticky":"navigation-bar__mainLineSticky_1ba97","mainLineWithImageBg":"navigation-bar__mainLineWithImageBg_1ba97","content":"navigation-bar__content_1ba97","withBothAddons":"navigation-bar__withBothAddons_1ba97","withCompactTitle":"navigation-bar__withCompactTitle_1ba97","children":"navigation-bar__children_1ba97","title":"navigation-bar__title_1ba97","contentOnBotDesktop":"navigation-bar__contentOnBotDesktop_1ba97","contentOnBotMobile":"navigation-bar__contentOnBotMobile_1ba97","subtitle":"navigation-bar__subtitle_1ba97","addonsWrapper":"navigation-bar__addonsWrapper_1ba97","rightAddons":"navigation-bar__rightAddons_1ba97","addon":"navigation-bar__addon_1ba97","bottomAddons":"navigation-bar__bottomAddons_1ba97","closer":"navigation-bar__closer_1ba97","left":"navigation-bar__left_1ba97","center":"navigation-bar__center_1ba97","trim":"navigation-bar__trim_1ba97"};
10
+ var styles = {"header":"navigation-bar__header_1jzhj","backgroundImage":"navigation-bar__backgroundImage_1jzhj","mainLine":"navigation-bar__mainLine_1jzhj","mainLineSticky":"navigation-bar__mainLineSticky_1jzhj","mainLineWithImageBg":"navigation-bar__mainLineWithImageBg_1jzhj","content":"navigation-bar__content_1jzhj","withBothAddons":"navigation-bar__withBothAddons_1jzhj","withCompactTitle":"navigation-bar__withCompactTitle_1jzhj","children":"navigation-bar__children_1jzhj","title":"navigation-bar__title_1jzhj","contentOnBotDesktop":"navigation-bar__contentOnBotDesktop_1jzhj","contentOnBotMobile":"navigation-bar__contentOnBotMobile_1jzhj","subtitle":"navigation-bar__subtitle_1jzhj","addonsWrapper":"navigation-bar__addonsWrapper_1jzhj","rightAddons":"navigation-bar__rightAddons_1jzhj","addon":"navigation-bar__addon_1jzhj","bottomAddons":"navigation-bar__bottomAddons_1jzhj","closer":"navigation-bar__closer_1jzhj","left":"navigation-bar__left_1jzhj","center":"navigation-bar__center_1jzhj","trim":"navigation-bar__trim_1jzhj"};
18
11
  require('./index.css')
19
12
 
20
13
  var ADDONS_HEIGHT = 48;
@@ -4,7 +4,7 @@ interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
4
4
  /**
5
5
  * Текст после иконки
6
6
  */
7
- text?: string;
7
+ text?: string | null;
8
8
  /**
9
9
  * Дополнительный класс
10
10
  */
@@ -6,20 +6,21 @@ import { Typography } from '@alfalab/core-components-typography/esm';
6
6
  import { ArrowLeftMediumMIcon } from '@alfalab/icons-glyph/ArrowLeftMediumMIcon';
7
7
  import { ArrowLeftMIcon } from '@alfalab/icons-glyph/ArrowLeftMIcon';
8
8
 
9
- var styles = {"component":"navigation-bar__component_ymcm0","mobileComponent":"navigation-bar__mobileComponent_ymcm0","flex":"navigation-bar__flex_ymcm0","iconWrapper":"navigation-bar__iconWrapper_ymcm0","text":"navigation-bar__text_ymcm0","mobileWrapper":"navigation-bar__mobileWrapper_ymcm0"};
9
+ var styles = {"component":"navigation-bar__component_1qr5s","mobileComponent":"navigation-bar__mobileComponent_1qr5s","flex":"navigation-bar__flex_1qr5s","iconWrapper":"navigation-bar__iconWrapper_1qr5s","text":"navigation-bar__text_1qr5s","mobileWrapper":"navigation-bar__mobileWrapper_1qr5s"};
10
10
  require('./index.css')
11
11
 
12
12
  var BackArrowAddon = function (_a) {
13
13
  var _b, _c;
14
14
  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 = __rest(_a, ["text", "onClick", "className", "textOpacity", "view"]);
15
15
  var Icon = view === 'desktop' ? ArrowLeftMediumMIcon : ArrowLeftMIcon;
16
- return (React.createElement(ButtonDesktop, __assign({ view: 'ghost', size: view === 'mobile' ? 'xxs' : 's', onClick: onClick, "aria-label": '\u043D\u0430\u0437\u0430\u0434', className: cn(styles.component, (_b = {}, _b[styles.mobileComponent] = view === 'mobile', _b), className) }, htmlAttributes),
16
+ var isMobileView = view === 'mobile';
17
+ return (React.createElement(ButtonDesktop, __assign({ view: 'ghost', size: isMobileView ? 'xxs' : 's', onClick: onClick, "aria-label": '\u043D\u0430\u0437\u0430\u0434', className: cn(styles.component, (_b = {}, _b[styles.mobileComponent] = isMobileView, _b), className) }, htmlAttributes),
17
18
  React.createElement("div", { className: styles.flex },
18
19
  React.createElement("div", { className: cn(styles.iconWrapper, (_c = {},
19
- _c[styles.mobileWrapper] = view === 'mobile',
20
+ _c[styles.mobileWrapper] = isMobileView,
20
21
  _c)) },
21
22
  React.createElement(Icon, null)),
22
- textOpacity > 0 && (React.createElement(Typography.Text, { className: styles.text, view: view === 'desktop' ? 'primary-large' : 'component', weight: 'medium', style: { opacity: textOpacity } }, text)))));
23
+ textOpacity > 0 && text && (React.createElement(Typography.Text, { className: styles.text, view: view === 'desktop' ? 'primary-large' : 'component', weight: 'medium', style: { opacity: textOpacity } }, text)))));
23
24
  };
24
25
 
25
26
  export { BackArrowAddon };
@@ -1,4 +1,4 @@
1
- /* hash: 1ca2d */
1
+ /* hash: 1hp61 */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-neutral-1500: #0e0e0e;
@@ -24,46 +24,48 @@
24
24
  --gap-s: 12px;
25
25
  } :root {
26
26
  } :root {
27
- } .navigation-bar__component_ymcm0 {
27
+ } .navigation-bar__component_1qr5s {
28
28
  height: 100%;
29
29
  background: var(--color-light-bg-primary-alpha-40);
30
30
  -webkit-backdrop-filter: blur(10px);
31
31
  backdrop-filter: blur(10px);
32
- border-radius: var(--border-radius-pill)
33
- } .navigation-bar__component_ymcm0 svg > path {
32
+ border-radius: var(--border-radius-pill);
33
+ min-width: 48px
34
+ } .navigation-bar__component_1qr5s svg > path {
34
35
  transition: fill 0.2s ease;
35
36
  fill: var(--color-light-neutral-1500);
36
- } .navigation-bar__component_ymcm0:hover svg > path {
37
+ } .navigation-bar__component_1qr5s:hover svg > path {
37
38
  fill: var(--color-light-neutral-1500-hover);
38
- } .navigation-bar__component_ymcm0:active svg > path {
39
+ } .navigation-bar__component_1qr5s:active svg > path {
39
40
  fill: var(--color-light-neutral-1500-press);
40
- } .navigation-bar__mobileComponent_ymcm0 {
41
+ } .navigation-bar__mobileComponent_1qr5s {
41
42
  height: 32px;
43
+ min-width: 32px;
42
44
  margin: 0 var(--gap-xs);
43
45
  -webkit-backdrop-filter: none;
44
46
  backdrop-filter: none;
45
47
  background: none;
46
- } .navigation-bar__flex_ymcm0 {
48
+ } .navigation-bar__flex_1qr5s {
47
49
  display: flex;
48
50
  align-items: center;
49
- } .navigation-bar__iconWrapper_ymcm0 {
51
+ } .navigation-bar__iconWrapper_1qr5s {
50
52
  display: inline-flex;
51
53
  align-items: center;
52
54
  justify-content: center;
53
55
  height: 48px;
54
56
  margin: 0 var(--gap-xs) 0 var(--gap-s);
55
57
  border-radius: var(--border-radius-circle)
56
- } .navigation-bar__iconWrapper_ymcm0 + .navigation-bar__text_ymcm0 {
58
+ } .navigation-bar__iconWrapper_1qr5s + .navigation-bar__text_1qr5s {
57
59
  margin-right: var(--gap-s);
58
- } .navigation-bar__mobileWrapper_ymcm0 {
60
+ } .navigation-bar__mobileWrapper_1qr5s {
59
61
  width: 32px;
60
62
  height: 32px;
61
63
  background: var(--color-light-neutral-translucent-100);
62
64
  -webkit-backdrop-filter: blur(10px);
63
65
  backdrop-filter: blur(10px);
64
66
  margin: 0
65
- } .navigation-bar__mobileWrapper_ymcm0 + .navigation-bar__text_ymcm0 {
67
+ } .navigation-bar__mobileWrapper_1qr5s + .navigation-bar__text_1qr5s {
66
68
  margin: 0 var(--gap-s) 0 var(--gap-xs);
67
- } .navigation-bar__mobileWrapper_ymcm0 svg > path {
69
+ } .navigation-bar__mobileWrapper_1qr5s svg > path {
68
70
  fill: var(--color-light-neutral-translucent-700);
69
71
  }
@@ -1,8 +1 @@
1
1
  export { BackArrowAddon } from './Component.js';
2
- import 'tslib';
3
- import 'react';
4
- import 'classnames';
5
- import '@alfalab/core-components-button/esm/desktop';
6
- import '@alfalab/core-components-typography/esm';
7
- import '@alfalab/icons-glyph/ArrowLeftMediumMIcon';
8
- import '@alfalab/icons-glyph/ArrowLeftMIcon';
@@ -5,7 +5,7 @@ import { IconButton } from '@alfalab/core-components-icon-button/esm';
5
5
  import { CrossHeavyMIcon } from '@alfalab/icons-glyph/CrossHeavyMIcon';
6
6
  import { CrossMIcon } from '@alfalab/icons-glyph/CrossMIcon';
7
7
 
8
- var styles = {"closer":"navigation-bar__closer_kpzob","button":"navigation-bar__button_kpzob","mobile":"navigation-bar__mobile_kpzob","sticky":"navigation-bar__sticky_kpzob"};
8
+ var styles = {"closer":"navigation-bar__closer_tf80q","button":"navigation-bar__button_tf80q","mobile":"navigation-bar__mobile_tf80q","sticky":"navigation-bar__sticky_tf80q"};
9
9
  require('./index.css')
10
10
 
11
11
  var Closer = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: wqzu4 */
1
+ /* hash: 1ply5 */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-neutral-1500: #0e0e0e;
@@ -22,7 +22,7 @@
22
22
  } :root {
23
23
  /* closer-mobile */
24
24
  --navigation-bar-closer-mobile-color: var(--color-light-neutral-translucent-700);
25
- } .navigation-bar__closer_kpzob {
25
+ } .navigation-bar__closer_tf80q {
26
26
  flex-shrink: 0;
27
27
  width: 48px;
28
28
  height: 48px;
@@ -30,17 +30,17 @@
30
30
  display: flex;
31
31
  align-items: center;
32
32
  justify-content: center;
33
- } .navigation-bar__button_kpzob {
33
+ } .navigation-bar__button_tf80q {
34
34
  background: var(--color-light-bg-primary-alpha-40);
35
35
  -webkit-backdrop-filter: blur(10px);
36
36
  backdrop-filter: blur(10px);
37
37
  color: var(--color-light-neutral-1500)
38
- } .navigation-bar__button_kpzob.navigation-bar__mobile_kpzob {
38
+ } .navigation-bar__button_tf80q.navigation-bar__mobile_tf80q {
39
39
  background: var(--color-light-neutral-translucent-100);
40
40
  color: var(--navigation-bar-closer-mobile-color);
41
- } .navigation-bar__button_kpzob.navigation-bar__button_kpzob {
41
+ } .navigation-bar__button_tf80q.navigation-bar__button_tf80q {
42
42
  border-radius: var(--border-radius-circle);
43
- } .navigation-bar__sticky_kpzob {
43
+ } .navigation-bar__sticky_tf80q {
44
44
  position: sticky;
45
45
  top: 0;
46
46
  }
@@ -1,7 +1 @@
1
1
  export { Closer } from './Component.js';
2
- import 'tslib';
3
- import 'react';
4
- import 'classnames';
5
- import '@alfalab/core-components-icon-button/esm';
6
- import '@alfalab/icons-glyph/CrossHeavyMIcon';
7
- import '@alfalab/icons-glyph/CrossMIcon';