@alfalab/core-components-gallery 5.2.13 → 5.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/Component-50136800.d.ts +38 -0
  2. package/Component.js +4 -4
  3. package/buttons-a2be6d97.d.ts +336 -0
  4. package/{buttons-a0cf7676.js → buttons-a2be6d97.js} +5 -5
  5. package/components/header/Component.js +2 -2
  6. package/components/header/buttons.js +2 -2
  7. package/components/header/index.css +6 -6
  8. package/components/header/index.js +2 -2
  9. package/components/header-info-block/Component.js +1 -1
  10. package/components/header-info-block/index.css +5 -5
  11. package/components/image-preview/Component.js +1 -1
  12. package/components/image-preview/index.css +13 -13
  13. package/components/image-viewer/component.js +1 -1
  14. package/components/image-viewer/index.css +19 -19
  15. package/components/image-viewer/index.js +1 -1
  16. package/components/image-viewer/slide.js +1 -1
  17. package/components/index.js +3 -3
  18. package/components/navigation-bar/Component.js +1 -1
  19. package/components/navigation-bar/index.css +6 -6
  20. package/cssm/Component-50136800.d.ts +38 -0
  21. package/cssm/Component.js +1 -1
  22. package/cssm/components/header/Component.js +1 -1
  23. package/cssm/components/header/buttons.js +4 -4
  24. package/cssm/components/header/index.js +1 -1
  25. package/cssm/components/index.js +1 -1
  26. package/cssm/index-50136800.d.ts +11 -0
  27. package/cssm/index-72dda473.d.ts +12 -0
  28. package/cssm/index-ebda875c.d.ts +35 -0
  29. package/cssm/index.js +1 -1
  30. package/cssm/types-83e2bd9e.d.ts +113 -0
  31. package/cssm/typings-9211a437.d.ts +95 -0
  32. package/esm/Component-50136800.d.ts +38 -0
  33. package/esm/Component.js +4 -4
  34. package/esm/buttons-83f36b01.d.ts +336 -0
  35. package/esm/{buttons-8138e150.js → buttons-83f36b01.js} +5 -5
  36. package/esm/components/header/Component.js +2 -2
  37. package/esm/components/header/buttons.js +2 -2
  38. package/esm/components/header/index.css +6 -6
  39. package/esm/components/header/index.js +2 -2
  40. package/esm/components/header-info-block/Component.js +1 -1
  41. package/esm/components/header-info-block/index.css +5 -5
  42. package/esm/components/image-preview/Component.js +1 -1
  43. package/esm/components/image-preview/index.css +13 -13
  44. package/esm/components/image-viewer/component.js +1 -1
  45. package/esm/components/image-viewer/index.css +19 -19
  46. package/esm/components/image-viewer/index.js +1 -1
  47. package/esm/components/image-viewer/slide.js +1 -1
  48. package/esm/components/index.js +3 -3
  49. package/esm/components/navigation-bar/Component.js +1 -1
  50. package/esm/components/navigation-bar/index.css +6 -6
  51. package/esm/index-50136800.d.ts +11 -0
  52. package/esm/index-72dda473.d.ts +12 -0
  53. package/esm/index-ebda875c.d.ts +35 -0
  54. package/esm/index.css +3 -3
  55. package/esm/index.js +3 -3
  56. package/esm/{slide-7040503f.js → slide-a481ee16.js} +1 -1
  57. package/esm/types-83e2bd9e.d.ts +113 -0
  58. package/esm/typings-9211a437.d.ts +95 -0
  59. package/index-50136800.d.ts +11 -0
  60. package/index-72dda473.d.ts +12 -0
  61. package/index-ebda875c.d.ts +35 -0
  62. package/index.css +3 -3
  63. package/index.js +3 -3
  64. package/modern/Component-50136800.d.ts +38 -0
  65. package/modern/Component.js +4 -4
  66. package/modern/buttons-fa6480fa.d.ts +336 -0
  67. package/modern/{buttons-c69fcb71.js → buttons-fa6480fa.js} +5 -5
  68. package/modern/components/header/Component.js +2 -2
  69. package/modern/components/header/buttons.js +2 -2
  70. package/modern/components/header/index.css +6 -6
  71. package/modern/components/header/index.js +2 -2
  72. package/modern/components/header-info-block/Component.js +1 -1
  73. package/modern/components/header-info-block/index.css +5 -5
  74. package/modern/components/image-preview/Component.js +1 -1
  75. package/modern/components/image-preview/index.css +13 -13
  76. package/modern/components/image-viewer/component.js +1 -1
  77. package/modern/components/image-viewer/index.css +19 -19
  78. package/modern/components/image-viewer/index.js +1 -1
  79. package/modern/components/image-viewer/slide.js +1 -1
  80. package/modern/components/index.js +3 -3
  81. package/modern/components/navigation-bar/Component.js +1 -1
  82. package/modern/components/navigation-bar/index.css +6 -6
  83. package/modern/index-50136800.d.ts +11 -0
  84. package/modern/index-72dda473.d.ts +12 -0
  85. package/modern/index-ebda875c.d.ts +35 -0
  86. package/modern/index.css +3 -3
  87. package/modern/index.js +3 -3
  88. package/modern/{slide-b249a536.js → slide-ef1f690b.js} +1 -1
  89. package/modern/types-83e2bd9e.d.ts +113 -0
  90. package/modern/typings-9211a437.d.ts +95 -0
  91. package/package.json +5 -5
  92. package/{slide-97bdc786.js → slide-610e04e2.js} +1 -1
  93. package/src/Component.tsx +185 -0
  94. package/src/components/header/Component.tsx +86 -0
  95. package/src/components/header/buttons.tsx +78 -0
  96. package/src/components/header/index.module.css +30 -0
  97. package/src/components/header/index.tsx +1 -0
  98. package/src/components/header-info-block/Component.tsx +47 -0
  99. package/src/components/header-info-block/index.module.css +29 -0
  100. package/src/components/header-info-block/index.ts +1 -0
  101. package/src/components/image-preview/Component.tsx +88 -0
  102. package/src/components/image-preview/index.module.css +68 -0
  103. package/src/components/image-preview/index.tsx +1 -0
  104. package/src/components/image-preview/paths.ts +5 -0
  105. package/src/components/image-viewer/component.tsx +232 -0
  106. package/src/components/image-viewer/index.module.css +126 -0
  107. package/src/components/image-viewer/index.ts +1 -0
  108. package/src/components/image-viewer/paths.ts +5 -0
  109. package/src/components/image-viewer/slide.tsx +113 -0
  110. package/src/components/index.ts +4 -0
  111. package/src/components/navigation-bar/Component.tsx +96 -0
  112. package/src/components/navigation-bar/index.module.css +31 -0
  113. package/src/components/navigation-bar/index.ts +1 -0
  114. package/src/context.ts +47 -0
  115. package/src/index.module.css +17 -0
  116. package/src/index.ts +2 -0
  117. package/src/types.ts +13 -0
  118. package/src/utils/constants.ts +10 -0
  119. package/src/utils/index.ts +3 -0
  120. package/src/utils/split-filename.ts +17 -0
  121. package/src/utils/utils.ts +18 -0
  122. package/types-83e2bd9e.d.ts +113 -0
  123. package/typings-9211a437.d.ts +95 -0
  124. package/buttons-a0cf7676.d.ts +0 -11
  125. package/esm/buttons-8138e150.d.ts +0 -11
  126. package/modern/buttons-c69fcb71.d.ts +0 -11
  127. /package/esm/{slide-7040503f.d.ts → slide-a481ee16.d.ts} +0 -0
  128. /package/modern/{slide-b249a536.d.ts → slide-ef1f690b.d.ts} +0 -0
  129. /package/{slide-97bdc786.d.ts → slide-610e04e2.d.ts} +0 -0
@@ -1,4 +1,4 @@
1
- /* hash: 1jj9u */
1
+ /* hash: 3zlus */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-bg-primary: #fff;
@@ -27,13 +27,13 @@
27
27
  } :root {
28
28
  } :root {
29
29
  --focus-color: var(--color-light-border-link);
30
- } .gallery__component_1cxw3 {
30
+ } .gallery__component_lby0o {
31
31
  display: flex;
32
32
  flex-grow: 1;
33
33
  justify-content: center;
34
34
  align-items: center;
35
35
  background-color: var(--color-static-bg-primary-dark);
36
- } .gallery__swiper_1cxw3 {
36
+ } .gallery__swiper_lby0o {
37
37
  display: flex;
38
38
  width: 100%;
39
39
  height: 100%;
@@ -42,42 +42,42 @@
42
42
  max-height: calc(100vh - 168px);
43
43
  padding: var(--gap-2xl) var(--gap-m);
44
44
  box-sizing: border-box;
45
- } .gallery__singleSlide_1cxw3 .gallery__swiper_1cxw3 {
45
+ } .gallery__singleSlide_lby0o .gallery__swiper_lby0o {
46
46
  max-height: calc(100vh - 80px);
47
47
  padding: var(--gap-2xl);
48
- } .gallery__hidden_1cxw3 {
48
+ } .gallery__hidden_lby0o {
49
49
  display: none;
50
- } .gallery__slide_1cxw3 {
50
+ } .gallery__slide_lby0o {
51
51
  position: relative;
52
52
  display: flex;
53
53
  justify-content: center;
54
54
  align-items: center;
55
55
  width: 100%;
56
56
  height: 100%;
57
- } .gallery__slideLoading_1cxw3 {
57
+ } .gallery__slideLoading_lby0o {
58
58
  background-color: var(--color-static-bg-secondary-dark);
59
59
  border-radius: var(--border-radius-m);
60
- } .gallery__image_1cxw3 {
60
+ } .gallery__image_lby0o {
61
61
  width: 0;
62
62
  height: 0;
63
63
  -webkit-user-select: none;
64
64
  user-select: none;
65
65
  background-color: var(--color-light-bg-primary);
66
66
  border-radius: var(--border-radius-m);
67
- } .gallery__smallImage_1cxw3 {
67
+ } .gallery__smallImage_lby0o {
68
68
  position: relative;
69
69
  width: auto;
70
70
  height: auto;
71
71
  -webkit-user-select: none;
72
72
  user-select: none;
73
73
  background-color: var(--color-light-bg-primary);
74
- } .gallery__verticalImageFit_1cxw3 {
74
+ } .gallery__verticalImageFit_lby0o {
75
75
  width: auto;
76
76
  height: 100%;
77
- } .gallery__horizontalImageFit_1cxw3 {
77
+ } .gallery__horizontalImageFit_lby0o {
78
78
  width: 100%;
79
79
  height: auto;
80
- } .gallery__arrow_1cxw3 {
80
+ } .gallery__arrow_lby0o {
81
81
  display: flex;
82
82
  flex-direction: column;
83
83
  justify-content: center;
@@ -89,14 +89,14 @@
89
89
  color: var(--color-static-graphic-light);
90
90
  transition: background-color 0.15s ease-in-out;
91
91
  outline: none
92
- } .gallery__arrow_1cxw3:hover {
92
+ } .gallery__arrow_lby0o:hover {
93
93
  background-color: var(--color-static-bg-primary-dark-tint-15);
94
- } .gallery__arrow_1cxw3:active {
94
+ } .gallery__arrow_lby0o:active {
95
95
  background-color: var(--color-static-bg-primary-dark-tint-20);
96
- } .gallery__focused_1cxw3 {
96
+ } .gallery__focused_lby0o {
97
97
  outline: 2px solid var(--focus-color);
98
98
  outline-offset: 2px;
99
- } .gallery__placeholder_1cxw3 {
99
+ } .gallery__placeholder_lby0o {
100
100
  display: flex;
101
101
  justify-content: center;
102
102
  align-items: center;
@@ -104,18 +104,18 @@
104
104
  height: 300px;
105
105
  border-radius: var(--border-radius-m);
106
106
  background-color: var(--color-static-bg-quaternary-dark);
107
- } .gallery__brokenImgWrapper_1cxw3 {
107
+ } .gallery__brokenImgWrapper_lby0o {
108
108
  position: relative;
109
109
  display: flex;
110
110
  flex-direction: column;
111
111
  align-items: center;
112
112
  width: 150px;
113
113
  text-align: center;
114
- } .gallery__brokenImgIcon_1cxw3 {
114
+ } .gallery__brokenImgIcon_lby0o {
115
115
  width: 80px;
116
116
  height: 80px;
117
117
  margin-bottom: var(--gap-2xs);
118
- } .gallery__fullScreenImage_1cxw3 {
118
+ } .gallery__fullScreenImage_lby0o {
119
119
  width: 100%;
120
120
  height: auto;
121
121
  background-color: var(--color-light-bg-primary);
@@ -15,7 +15,7 @@ require('@alfalab/icons-glyph/ChevronForwardHeavyMIcon');
15
15
  require('../../context.js');
16
16
  require('../../utils/utils.js');
17
17
  require('../../utils/constants.js');
18
- require('../../slide-97bdc786.js');
18
+ require('../../slide-610e04e2.js');
19
19
  require('@alfalab/core-components-typography');
20
20
  require('./paths.js');
21
21
  require('swiper/swiper.min.css');
@@ -8,7 +8,7 @@ require('@alfalab/core-components-typography');
8
8
  require('../../utils/utils.js');
9
9
  require('../../utils/constants.js');
10
10
  require('./paths.js');
11
- var components_imageViewer_slide = require('../../slide-97bdc786.js');
11
+ var components_imageViewer_slide = require('../../slide-610e04e2.js');
12
12
 
13
13
 
14
14
 
@@ -13,10 +13,10 @@ require('../utils/constants.js');
13
13
  require('./header-info-block/Component.js');
14
14
  require('@alfalab/core-components-typography');
15
15
  require('../utils/split-filename.js');
16
- require('../buttons-a0cf7676.js');
16
+ require('../buttons-a2be6d97.js');
17
17
  require('tslib');
18
18
  require('@alfalab/core-components-icon-button');
19
- require('@alfalab/core-components-tooltip');
19
+ require('@alfalab/core-components-tooltip/desktop');
20
20
  require('@alfalab/icons-glyph/ArrowsInwardMIcon');
21
21
  require('@alfalab/icons-glyph/ArrowsOutwardMIcon');
22
22
  require('@alfalab/icons-glyph/CrossMIcon');
@@ -29,7 +29,7 @@ require('swiper');
29
29
  require('swiper/react');
30
30
  require('@alfalab/icons-glyph/ChevronBackHeavyMIcon');
31
31
  require('@alfalab/icons-glyph/ChevronForwardHeavyMIcon');
32
- require('../slide-97bdc786.js');
32
+ require('../slide-610e04e2.js');
33
33
  require('./image-viewer/paths.js');
34
34
  require('swiper/swiper.min.css');
35
35
 
@@ -15,7 +15,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
15
15
 
16
16
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
17
17
 
18
- var styles = {"component":"gallery__component_15nle","preview":"gallery__preview_15nle"};
18
+ var styles = {"component":"gallery__component_1qs3o","preview":"gallery__preview_1qs3o"};
19
19
  require('./index.css')
20
20
 
21
21
  var MIN_SCROLL_STEP = 24;
@@ -1,4 +1,4 @@
1
- /* hash: xuyyx */
1
+ /* hash: 1eeni */
2
2
  :root {
3
3
  } /* deprecated */ :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 */
4
4
  } :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 */
@@ -16,7 +16,7 @@
16
16
  --gap-xl: 24px;
17
17
  } :root {
18
18
  } :root {
19
- } .gallery__component_15nle {
19
+ } .gallery__component_1qs3o {
20
20
  display: flex;
21
21
  flex-wrap: nowrap;
22
22
  align-content: center;
@@ -27,13 +27,13 @@
27
27
  padding: 10px var(--gap-xl);
28
28
  -ms-overflow-style: none;
29
29
  scrollbar-width: none
30
- } .gallery__component_15nle::-webkit-scrollbar {
30
+ } .gallery__component_1qs3o::-webkit-scrollbar {
31
31
  display: none;
32
- } .gallery__preview_15nle {
32
+ } .gallery__preview_1qs3o {
33
33
  flex-shrink: 0;
34
34
  margin: 0 var(--gap-3xs)
35
- } .gallery__preview_15nle:first-child {
35
+ } .gallery__preview_1qs3o:first-child {
36
36
  margin-left: auto;
37
- } .gallery__preview_15nle:last-child {
37
+ } .gallery__preview_1qs3o:last-child {
38
38
  margin-right: auto;
39
39
  }
@@ -0,0 +1,38 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { FC } from "react";
4
+ import { BaseButtonProps } from "./typings-9211a437";
5
+ type SpinnerProps = {
6
+ /**
7
+ * Управление видимостью компонента
8
+ */
9
+ visible?: boolean;
10
+ /**
11
+ * Размер компонента
12
+ */
13
+ size?: "xs" | "s" | "m";
14
+ /**
15
+ * Дополнительный класс
16
+ */
17
+ className?: string;
18
+ /**
19
+ * Идентификатор компонента в DOM
20
+ */
21
+ id?: string;
22
+ /**
23
+ * Идентификатор для систем автоматизированного тестирования
24
+ */
25
+ dataTestId?: string;
26
+ /**
27
+ * Палитра, в контексте которой используется спиннер
28
+ */
29
+ colors?: "default" | "inverted";
30
+ };
31
+ declare const Spinner: FC<SpinnerProps>;
32
+ /**
33
+ * Минимальное время отображения лоадера - 500мс,
34
+ * чтобы при быстрых ответах от сервера кнопка не «моргала».
35
+ */
36
+ declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
37
+ declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
38
+ export { SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };
package/cssm/Component.js CHANGED
@@ -24,7 +24,7 @@ require('./components/header-info-block/index.module.css');
24
24
  require('./components/header/buttons.js');
25
25
  require('tslib');
26
26
  require('@alfalab/core-components-icon-button/cssm');
27
- require('@alfalab/core-components-tooltip/cssm');
27
+ require('@alfalab/core-components-tooltip/cssm/desktop');
28
28
  require('@alfalab/icons-glyph/ArrowsInwardMIcon');
29
29
  require('@alfalab/icons-glyph/ArrowsOutwardMIcon');
30
30
  require('@alfalab/icons-glyph/CrossMIcon');
@@ -14,7 +14,7 @@ require('../../utils/split-filename.js');
14
14
  require('../header-info-block/index.module.css');
15
15
  require('tslib');
16
16
  require('@alfalab/core-components-icon-button/cssm');
17
- require('@alfalab/core-components-tooltip/cssm');
17
+ require('@alfalab/core-components-tooltip/cssm/desktop');
18
18
  require('@alfalab/icons-glyph/ArrowsInwardMIcon');
19
19
  require('@alfalab/icons-glyph/ArrowsOutwardMIcon');
20
20
  require('@alfalab/icons-glyph/CrossMIcon');
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var tslib = require('tslib');
6
6
  var React = require('react');
7
7
  var coreComponentsIconButton = require('@alfalab/core-components-icon-button/cssm');
8
- var coreComponentsTooltip = require('@alfalab/core-components-tooltip/cssm');
8
+ var desktop = require('@alfalab/core-components-tooltip/cssm/desktop');
9
9
  var ArrowsInwardMIcon = require('@alfalab/icons-glyph/ArrowsInwardMIcon');
10
10
  var ArrowsOutwardMIcon = require('@alfalab/icons-glyph/ArrowsOutwardMIcon');
11
11
  var CrossMIcon = require('@alfalab/icons-glyph/CrossMIcon');
@@ -19,15 +19,15 @@ var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
19
19
 
20
20
  var Fullscreen = function (_a) {
21
21
  var buttonRef = _a.buttonRef, restProps = tslib.__rest(_a, ["buttonRef"]);
22
- return (React__default.default.createElement(coreComponentsTooltip.Tooltip, { trigger: 'hover', position: 'bottom', content: '\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u043F\u043E\u043B\u043D\u043E\u044D\u043A\u0440\u0430\u043D\u043D\u043E\u043C \u0440\u0435\u0436\u0438\u043C\u0435', fallbackPlacements: ['bottom-end'] },
22
+ return (React__default.default.createElement(desktop.TooltipDesktop, { trigger: 'hover', position: 'bottom', content: '\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u043F\u043E\u043B\u043D\u043E\u044D\u043A\u0440\u0430\u043D\u043D\u043E\u043C \u0440\u0435\u0436\u0438\u043C\u0435', fallbackPlacements: ['bottom-end'] },
23
23
  React__default.default.createElement(coreComponentsIconButton.IconButton, tslib.__assign({}, restProps, { ref: buttonRef, icon: ArrowsOutwardMIcon.ArrowsOutwardMIcon, colors: 'inverted', "aria-label": '\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 \u043F\u043E\u043B\u043D\u043E\u044D\u043A\u0440\u0430\u043D\u043D\u043E\u043C \u0440\u0435\u0436\u0438\u043C\u0435', className: styles__default.default.iconButton }))));
24
24
  };
25
25
  var ExitFullscreen = function (_a) {
26
26
  var buttonRef = _a.buttonRef, restProps = tslib.__rest(_a, ["buttonRef"]);
27
- return (React__default.default.createElement(coreComponentsTooltip.Tooltip, { trigger: 'hover', position: 'bottom', content: '\u0412\u044B\u0439\u0442\u0438 \u0438\u0437 \u043F\u043E\u043B\u043D\u043E\u044D\u043A\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u0440\u0435\u0436\u0438\u043C\u0430', fallbackPlacements: ['bottom-end'] },
27
+ return (React__default.default.createElement(desktop.TooltipDesktop, { trigger: 'hover', position: 'bottom', content: '\u0412\u044B\u0439\u0442\u0438 \u0438\u0437 \u043F\u043E\u043B\u043D\u043E\u044D\u043A\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u0440\u0435\u0436\u0438\u043C\u0430', fallbackPlacements: ['bottom-end'] },
28
28
  React__default.default.createElement(coreComponentsIconButton.IconButton, tslib.__assign({}, restProps, { ref: buttonRef, icon: ArrowsInwardMIcon.ArrowsInwardMIcon, colors: 'inverted', "aria-label": '\u0412\u044B\u0439\u0442\u0438 \u0438\u0437 \u043F\u043E\u043B\u043D\u043E\u044D\u043A\u0440\u0430\u043D\u043D\u043E\u0433\u043E \u0440\u0435\u0436\u0438\u043C\u0430', className: styles__default.default.iconButton }))));
29
29
  };
30
- var Download = function (props) { return (React__default.default.createElement(coreComponentsTooltip.Tooltip, { trigger: 'hover', position: 'bottom', content: '\u0421\u043A\u0430\u0447\u0430\u0442\u044C', fallbackPlacements: ['bottom-end'] },
30
+ var Download = function (props) { return (React__default.default.createElement(desktop.TooltipDesktop, { trigger: 'hover', position: 'bottom', content: '\u0421\u043A\u0430\u0447\u0430\u0442\u044C', fallbackPlacements: ['bottom-end'] },
31
31
  React__default.default.createElement(coreComponentsIconButton.IconButton, tslib.__assign({}, props, { icon: PointerDownMIcon.PointerDownMIcon, colors: 'inverted', "aria-label": '\u0421\u043A\u0430\u0447\u0430\u0442\u044C', className: styles__default.default.iconButton })))); };
32
32
  var Exit = function (props) { return (React__default.default.createElement(coreComponentsIconButton.IconButton, tslib.__assign({}, props, { icon: CrossMIcon.CrossMIcon, colors: 'inverted', "aria-label": '\u0417\u0430\u043A\u0440\u044B\u0442\u044C', className: styles__default.default.iconButton }))); };
33
33
 
@@ -14,7 +14,7 @@ require('../header-info-block/index.module.css');
14
14
  require('./buttons.js');
15
15
  require('tslib');
16
16
  require('@alfalab/core-components-icon-button/cssm');
17
- require('@alfalab/core-components-tooltip/cssm');
17
+ require('@alfalab/core-components-tooltip/cssm/desktop');
18
18
  require('@alfalab/icons-glyph/ArrowsInwardMIcon');
19
19
  require('@alfalab/icons-glyph/ArrowsOutwardMIcon');
20
20
  require('@alfalab/icons-glyph/CrossMIcon');
@@ -18,7 +18,7 @@ require('./header-info-block/index.module.css');
18
18
  require('./header/buttons.js');
19
19
  require('tslib');
20
20
  require('@alfalab/core-components-icon-button/cssm');
21
- require('@alfalab/core-components-tooltip/cssm');
21
+ require('@alfalab/core-components-tooltip/cssm/desktop');
22
22
  require('@alfalab/icons-glyph/ArrowsInwardMIcon');
23
23
  require('@alfalab/icons-glyph/ArrowsOutwardMIcon');
24
24
  require('@alfalab/icons-glyph/CrossMIcon');
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { PaddingType } from "./index-72dda473";
4
+ declare const isClient: () => boolean;
5
+ declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
6
+ declare function createPaddingStyle(padding?: PaddingType): undefined | React.CSSProperties;
7
+ declare function easeInOutQuad(x: number): number;
8
+ declare const easingFns: {
9
+ easeInOutQuad: typeof easeInOutQuad;
10
+ };
11
+ export { isClient, getDataTestId, createPaddingStyle, easingFns };
@@ -0,0 +1,12 @@
1
+ type BackgroundColorType = 'accent' | 'info' | 'attention-muted' | 'positive-muted' | 'negative-muted' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'quaternary' | 'quaternary-inverted' | 'specialbg-component' | 'specialbg-component-inverted' | 'specialbg-primary-grouped' | 'specialbg-secondary-grouped' | 'specialbg-tertiary-grouped' | 'specialbg-secondary-transparent' | 'specialbg-secondary-transparent-inverted' | 'specialbg-tertiary-transparent' | 'specialbg-tertiary-transparent-inverted';
2
+ type BorderColorType = 'accent' | 'key' | 'key-inverted' | 'link' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'underline' | 'underline-inverted' | 'graphic-attention' | 'graphic-link' | 'graphic-negative' | 'graphic-positive' | 'specialbg-secondary-transparent' | 'specialbg-secondary-transparent-inverted' | 'specialbg-tertiary-transparent' | 'specialbg-tertiary-transparent-inverted';
3
+ type GraphicColorType = 'accent' | 'link' | 'attention' | 'positive' | 'negative' | 'primary' | 'primary-inverted' | 'secondary' | 'secondary-inverted' | 'tertiary' | 'tertiary-inverted' | 'quaternary' | 'quaternary-inverted' | 'static-light' | 'static-accent' | 'static-dark';
4
+ type ShadowType = 'shadow-xs' | 'shadow-s' | 'shadow-m' | 'shadow-l' | 'shadow-xl' | 'shadow-xs-hard' | 'shadow-s-hard' | 'shadow-m-hard' | 'shadow-l-hard' | 'shadow-xl-hard' | 'shadow-xs-up' | 'shadow-s-up' | 'shadow-m-up' | 'shadow-l-up' | 'shadow-xl-up' | 'shadow-xs-hard-up' | 'shadow-s-hard-up' | 'shadow-m-hard-up' | 'shadow-l-hard-up' | 'shadow-xl-hard-up';
5
+ type GapType = '3xs' | '2xs' | 'xs' | 's' | 'm' | 'l' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl';
6
+ type PaddingType = number | string | {
7
+ top?: number;
8
+ right?: number;
9
+ bottom?: number;
10
+ left?: number;
11
+ };
12
+ export { BackgroundColorType, BorderColorType, GraphicColorType, ShadowType, GapType, PaddingType };
@@ -0,0 +1,35 @@
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 };
package/cssm/index.js CHANGED
@@ -23,7 +23,7 @@ require('./components/header-info-block/index.module.css');
23
23
  require('./components/header/buttons.js');
24
24
  require('tslib');
25
25
  require('@alfalab/core-components-icon-button/cssm');
26
- require('@alfalab/core-components-tooltip/cssm');
26
+ require('@alfalab/core-components-tooltip/cssm/desktop');
27
27
  require('@alfalab/icons-glyph/ArrowsInwardMIcon');
28
28
  require('@alfalab/icons-glyph/ArrowsOutwardMIcon');
29
29
  require('@alfalab/icons-glyph/CrossMIcon');
@@ -0,0 +1,113 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { ReactNode } from "react";
4
+ import { CloserProps } from "./index-ebda875c";
5
+ type NavigationBarProps = {
6
+ /**
7
+ * Контент шапки
8
+ */
9
+ children?: ReactNode;
10
+ /**
11
+ * Заголовок шапки
12
+ */
13
+ title?: string;
14
+ /**
15
+ * Подзаголовок (доступен только в мобильной версии)
16
+ */
17
+ subtitle?: string;
18
+ /**
19
+ * Размер заголовка (compact доступен только в мобильной версии)
20
+ */
21
+ titleSize?: 'default' | 'compact';
22
+ /**
23
+ * Доп. класс для аддонов
24
+ */
25
+ addonClassName?: string;
26
+ /**
27
+ * Слот слева
28
+ */
29
+ leftAddons?: ReactNode;
30
+ /**
31
+ * Слот справа
32
+ */
33
+ rightAddons?: ReactNode;
34
+ /**
35
+ * Дополнительный класс для closer
36
+ */
37
+ closerClassName?: string;
38
+ /**
39
+ * Слот снизу
40
+ */
41
+ bottomAddons?: ReactNode;
42
+ /**
43
+ * Наличие компонента крестика
44
+ */
45
+ hasCloser?: boolean;
46
+ /**
47
+ * Наличие кнопки "Назад"
48
+ */
49
+ hasBackButton?: boolean;
50
+ /**
51
+ * Дополнительный класс для правого аддона
52
+ */
53
+ backButtonClassName?: string;
54
+ /**
55
+ * Дополнительный класс
56
+ */
57
+ className?: string;
58
+ /**
59
+ * Дополнительный класс для контента
60
+ */
61
+ contentClassName?: string;
62
+ /**
63
+ * Дополнительный класс для нижнего аддона
64
+ */
65
+ bottomAddonsClassName?: string;
66
+ /**
67
+ * Выравнивание заголовка
68
+ */
69
+ align?: 'left' | 'center';
70
+ /**
71
+ * Обрезать ли заголовок
72
+ */
73
+ trim?: boolean;
74
+ /**
75
+ * Фиксирует шапку
76
+ */
77
+ sticky?: boolean;
78
+ /**
79
+ * Идентификатор для систем автоматизированного тестирования
80
+ */
81
+ dataTestId?: string;
82
+ /**
83
+ * Фоновое изображение
84
+ */
85
+ imageUrl?: string;
86
+ /**
87
+ * Иконка closer.
88
+ */
89
+ closerIcon?: React.ElementType;
90
+ /**
91
+ * Обработчик закрытия
92
+ */
93
+ onClose?: CloserProps['onClose'];
94
+ /**
95
+ * обработчик клика по кнопке "назад"
96
+ */
97
+ onBack?: () => void;
98
+ /**
99
+ * Вид шапки - мобильный или десктоп
100
+ */
101
+ view: 'desktop' | 'mobile';
102
+ /**
103
+ * Ссылка на родительскую ноду overflow: auto
104
+ */
105
+ scrollableParentRef?: React.RefObject<HTMLDivElement>;
106
+ };
107
+ type ContentParams = {
108
+ extraClassName?: string;
109
+ wrapperRef?: React.RefObject<HTMLDivElement>;
110
+ style?: React.CSSProperties;
111
+ hidden?: boolean;
112
+ };
113
+ export { NavigationBarProps, ContentParams };
@@ -0,0 +1,95 @@
1
+ import { AnchorHTMLAttributes, ButtonHTMLAttributes, ElementType, ReactNode } from 'react';
2
+ type StyleColors = {
3
+ default: {
4
+ [key: string]: string;
5
+ };
6
+ inverted: {
7
+ [key: string]: string;
8
+ };
9
+ };
10
+ type ComponentProps = {
11
+ /**
12
+ * Тип кнопки
13
+ * @default secondary
14
+ */
15
+ view?: 'accent' | 'primary' | 'secondary' | 'tertiary' | 'outlined' | 'filled' | 'transparent' | 'link' | 'ghost';
16
+ /**
17
+ * Слот слева
18
+ */
19
+ leftAddons?: ReactNode;
20
+ /**
21
+ * Слот справа
22
+ */
23
+ rightAddons?: ReactNode;
24
+ /**
25
+ * Размер компонента
26
+ * @default m
27
+ */
28
+ size?: 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';
29
+ /**
30
+ * Растягивает компонент на ширину контейнера
31
+ * @default false
32
+ */
33
+ block?: boolean;
34
+ /**
35
+ * Дополнительный класс
36
+ */
37
+ className?: string;
38
+ /**
39
+ * Дополнительный класс для спиннера
40
+ */
41
+ spinnerClassName?: string;
42
+ /**
43
+ * Выводит ссылку в виде кнопки
44
+ */
45
+ href?: string;
46
+ /**
47
+ * Позволяет использовать кастомный компонент для кнопки (например Link из роутера)
48
+ */
49
+ Component?: ElementType;
50
+ /**
51
+ * Идентификатор для систем автоматизированного тестирования
52
+ */
53
+ dataTestId?: string;
54
+ /**
55
+ * Показать лоадер
56
+ * @default false
57
+ */
58
+ loading?: boolean;
59
+ /**
60
+ * Не переносить текст кнопки на новую строку
61
+ * @default false
62
+ */
63
+ nowrap?: boolean;
64
+ /**
65
+ * Набор цветов для компонента
66
+ */
67
+ colors?: 'default' | 'inverted';
68
+ /**
69
+ * Дочерние элементы.
70
+ */
71
+ children?: ReactNode;
72
+ /**
73
+ * Основные стили компонента.
74
+ */
75
+ styles: {
76
+ [key: string]: string;
77
+ };
78
+ /**
79
+ * Стили компонента для default и inverted режима.
80
+ */
81
+ colorStylesMap: StyleColors;
82
+ };
83
+ type AnchorBaseButtonProps = ComponentProps & AnchorHTMLAttributes<HTMLAnchorElement>;
84
+ type NativeBaseButtonProps = ComponentProps & ButtonHTMLAttributes<HTMLButtonElement>;
85
+ type BaseButtonProps = Partial<AnchorBaseButtonProps | NativeBaseButtonProps>;
86
+ type AnchorButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & AnchorHTMLAttributes<HTMLAnchorElement>;
87
+ type NativeButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & ButtonHTMLAttributes<HTMLButtonElement>;
88
+ type ButtonProps = Partial<AnchorButtonProps | NativeButtonProps> & {
89
+ /**
90
+ * Контрольная точка, с нее начинается desktop версия
91
+ * @default 1024
92
+ */
93
+ breakpoint?: number;
94
+ };
95
+ export { StyleColors, ComponentProps, AnchorBaseButtonProps, NativeBaseButtonProps, BaseButtonProps, AnchorButtonProps, NativeButtonProps, ButtonProps };
@@ -0,0 +1,38 @@
1
+ /// <reference types="react" />
2
+ import React from "react";
3
+ import { FC } from "react";
4
+ import { BaseButtonProps } from "./typings-9211a437";
5
+ type SpinnerProps = {
6
+ /**
7
+ * Управление видимостью компонента
8
+ */
9
+ visible?: boolean;
10
+ /**
11
+ * Размер компонента
12
+ */
13
+ size?: "xs" | "s" | "m";
14
+ /**
15
+ * Дополнительный класс
16
+ */
17
+ className?: string;
18
+ /**
19
+ * Идентификатор компонента в DOM
20
+ */
21
+ id?: string;
22
+ /**
23
+ * Идентификатор для систем автоматизированного тестирования
24
+ */
25
+ dataTestId?: string;
26
+ /**
27
+ * Палитра, в контексте которой используется спиннер
28
+ */
29
+ colors?: "default" | "inverted";
30
+ };
31
+ declare const Spinner: FC<SpinnerProps>;
32
+ /**
33
+ * Минимальное время отображения лоадера - 500мс,
34
+ * чтобы при быстрых ответах от сервера кнопка не «моргала».
35
+ */
36
+ declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
37
+ declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
38
+ export { SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };