@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.
- package/Component-50136800.d.ts +38 -0
- package/Component.js +4 -4
- package/buttons-a2be6d97.d.ts +336 -0
- package/{buttons-a0cf7676.js → buttons-a2be6d97.js} +5 -5
- package/components/header/Component.js +2 -2
- package/components/header/buttons.js +2 -2
- package/components/header/index.css +6 -6
- package/components/header/index.js +2 -2
- package/components/header-info-block/Component.js +1 -1
- package/components/header-info-block/index.css +5 -5
- package/components/image-preview/Component.js +1 -1
- package/components/image-preview/index.css +13 -13
- package/components/image-viewer/component.js +1 -1
- package/components/image-viewer/index.css +19 -19
- package/components/image-viewer/index.js +1 -1
- package/components/image-viewer/slide.js +1 -1
- package/components/index.js +3 -3
- package/components/navigation-bar/Component.js +1 -1
- package/components/navigation-bar/index.css +6 -6
- package/cssm/Component-50136800.d.ts +38 -0
- package/cssm/Component.js +1 -1
- package/cssm/components/header/Component.js +1 -1
- package/cssm/components/header/buttons.js +4 -4
- package/cssm/components/header/index.js +1 -1
- package/cssm/components/index.js +1 -1
- package/cssm/index-50136800.d.ts +11 -0
- package/cssm/index-72dda473.d.ts +12 -0
- package/cssm/index-ebda875c.d.ts +35 -0
- package/cssm/index.js +1 -1
- package/cssm/types-83e2bd9e.d.ts +113 -0
- package/cssm/typings-9211a437.d.ts +95 -0
- package/esm/Component-50136800.d.ts +38 -0
- package/esm/Component.js +4 -4
- package/esm/buttons-83f36b01.d.ts +336 -0
- package/esm/{buttons-8138e150.js → buttons-83f36b01.js} +5 -5
- package/esm/components/header/Component.js +2 -2
- package/esm/components/header/buttons.js +2 -2
- package/esm/components/header/index.css +6 -6
- package/esm/components/header/index.js +2 -2
- package/esm/components/header-info-block/Component.js +1 -1
- package/esm/components/header-info-block/index.css +5 -5
- package/esm/components/image-preview/Component.js +1 -1
- package/esm/components/image-preview/index.css +13 -13
- package/esm/components/image-viewer/component.js +1 -1
- package/esm/components/image-viewer/index.css +19 -19
- package/esm/components/image-viewer/index.js +1 -1
- package/esm/components/image-viewer/slide.js +1 -1
- package/esm/components/index.js +3 -3
- package/esm/components/navigation-bar/Component.js +1 -1
- package/esm/components/navigation-bar/index.css +6 -6
- package/esm/index-50136800.d.ts +11 -0
- package/esm/index-72dda473.d.ts +12 -0
- package/esm/index-ebda875c.d.ts +35 -0
- package/esm/index.css +3 -3
- package/esm/index.js +3 -3
- package/esm/{slide-7040503f.js → slide-a481ee16.js} +1 -1
- package/esm/types-83e2bd9e.d.ts +113 -0
- package/esm/typings-9211a437.d.ts +95 -0
- package/index-50136800.d.ts +11 -0
- package/index-72dda473.d.ts +12 -0
- package/index-ebda875c.d.ts +35 -0
- package/index.css +3 -3
- package/index.js +3 -3
- package/modern/Component-50136800.d.ts +38 -0
- package/modern/Component.js +4 -4
- package/modern/buttons-fa6480fa.d.ts +336 -0
- package/modern/{buttons-c69fcb71.js → buttons-fa6480fa.js} +5 -5
- package/modern/components/header/Component.js +2 -2
- package/modern/components/header/buttons.js +2 -2
- package/modern/components/header/index.css +6 -6
- package/modern/components/header/index.js +2 -2
- package/modern/components/header-info-block/Component.js +1 -1
- package/modern/components/header-info-block/index.css +5 -5
- package/modern/components/image-preview/Component.js +1 -1
- package/modern/components/image-preview/index.css +13 -13
- package/modern/components/image-viewer/component.js +1 -1
- package/modern/components/image-viewer/index.css +19 -19
- package/modern/components/image-viewer/index.js +1 -1
- package/modern/components/image-viewer/slide.js +1 -1
- package/modern/components/index.js +3 -3
- package/modern/components/navigation-bar/Component.js +1 -1
- package/modern/components/navigation-bar/index.css +6 -6
- package/modern/index-50136800.d.ts +11 -0
- package/modern/index-72dda473.d.ts +12 -0
- package/modern/index-ebda875c.d.ts +35 -0
- package/modern/index.css +3 -3
- package/modern/index.js +3 -3
- package/modern/{slide-b249a536.js → slide-ef1f690b.js} +1 -1
- package/modern/types-83e2bd9e.d.ts +113 -0
- package/modern/typings-9211a437.d.ts +95 -0
- package/package.json +5 -5
- package/{slide-97bdc786.js → slide-610e04e2.js} +1 -1
- package/src/Component.tsx +185 -0
- package/src/components/header/Component.tsx +86 -0
- package/src/components/header/buttons.tsx +78 -0
- package/src/components/header/index.module.css +30 -0
- package/src/components/header/index.tsx +1 -0
- package/src/components/header-info-block/Component.tsx +47 -0
- package/src/components/header-info-block/index.module.css +29 -0
- package/src/components/header-info-block/index.ts +1 -0
- package/src/components/image-preview/Component.tsx +88 -0
- package/src/components/image-preview/index.module.css +68 -0
- package/src/components/image-preview/index.tsx +1 -0
- package/src/components/image-preview/paths.ts +5 -0
- package/src/components/image-viewer/component.tsx +232 -0
- package/src/components/image-viewer/index.module.css +126 -0
- package/src/components/image-viewer/index.ts +1 -0
- package/src/components/image-viewer/paths.ts +5 -0
- package/src/components/image-viewer/slide.tsx +113 -0
- package/src/components/index.ts +4 -0
- package/src/components/navigation-bar/Component.tsx +96 -0
- package/src/components/navigation-bar/index.module.css +31 -0
- package/src/components/navigation-bar/index.ts +1 -0
- package/src/context.ts +47 -0
- package/src/index.module.css +17 -0
- package/src/index.ts +2 -0
- package/src/types.ts +13 -0
- package/src/utils/constants.ts +10 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/split-filename.ts +17 -0
- package/src/utils/utils.ts +18 -0
- package/types-83e2bd9e.d.ts +113 -0
- package/typings-9211a437.d.ts +95 -0
- package/buttons-a0cf7676.d.ts +0 -11
- package/esm/buttons-8138e150.d.ts +0 -11
- package/modern/buttons-c69fcb71.d.ts +0 -11
- /package/esm/{slide-7040503f.d.ts → slide-a481ee16.d.ts} +0 -0
- /package/modern/{slide-b249a536.d.ts → slide-ef1f690b.d.ts} +0 -0
- /package/{slide-97bdc786.d.ts → slide-610e04e2.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
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
|
-
} .
|
|
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
|
-
} .
|
|
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
|
-
} .
|
|
45
|
+
} .gallery__singleSlide_lby0o .gallery__swiper_lby0o {
|
|
46
46
|
max-height: calc(100vh - 80px);
|
|
47
47
|
padding: var(--gap-2xl);
|
|
48
|
-
} .
|
|
48
|
+
} .gallery__hidden_lby0o {
|
|
49
49
|
display: none;
|
|
50
|
-
} .
|
|
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
|
-
} .
|
|
57
|
+
} .gallery__slideLoading_lby0o {
|
|
58
58
|
background-color: var(--color-static-bg-secondary-dark);
|
|
59
59
|
border-radius: var(--border-radius-m);
|
|
60
|
-
} .
|
|
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
|
-
} .
|
|
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
|
-
} .
|
|
74
|
+
} .gallery__verticalImageFit_lby0o {
|
|
75
75
|
width: auto;
|
|
76
76
|
height: 100%;
|
|
77
|
-
} .
|
|
77
|
+
} .gallery__horizontalImageFit_lby0o {
|
|
78
78
|
width: 100%;
|
|
79
79
|
height: auto;
|
|
80
|
-
} .
|
|
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
|
-
} .
|
|
92
|
+
} .gallery__arrow_lby0o:hover {
|
|
93
93
|
background-color: var(--color-static-bg-primary-dark-tint-15);
|
|
94
|
-
} .
|
|
94
|
+
} .gallery__arrow_lby0o:active {
|
|
95
95
|
background-color: var(--color-static-bg-primary-dark-tint-20);
|
|
96
|
-
} .
|
|
96
|
+
} .gallery__focused_lby0o {
|
|
97
97
|
outline: 2px solid var(--focus-color);
|
|
98
98
|
outline-offset: 2px;
|
|
99
|
-
} .
|
|
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
|
-
} .
|
|
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
|
-
} .
|
|
114
|
+
} .gallery__brokenImgIcon_lby0o {
|
|
115
115
|
width: 80px;
|
|
116
116
|
height: 80px;
|
|
117
117
|
margin-bottom: var(--gap-2xs);
|
|
118
|
-
} .
|
|
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-
|
|
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-
|
|
11
|
+
var components_imageViewer_slide = require('../../slide-610e04e2.js');
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
|
package/components/index.js
CHANGED
|
@@ -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-
|
|
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-
|
|
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":"
|
|
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:
|
|
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
|
-
} .
|
|
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
|
-
} .
|
|
30
|
+
} .gallery__component_1qs3o::-webkit-scrollbar {
|
|
31
31
|
display: none;
|
|
32
|
-
} .
|
|
32
|
+
} .gallery__preview_1qs3o {
|
|
33
33
|
flex-shrink: 0;
|
|
34
34
|
margin: 0 var(--gap-3xs)
|
|
35
|
-
} .
|
|
35
|
+
} .gallery__preview_1qs3o:first-child {
|
|
36
36
|
margin-left: auto;
|
|
37
|
-
} .
|
|
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
|
|
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(
|
|
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(
|
|
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(
|
|
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');
|
package/cssm/components/index.js
CHANGED
|
@@ -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 };
|