@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);
|
|
@@ -11,7 +11,7 @@ import '@alfalab/icons-glyph/ChevronForwardHeavyMIcon';
|
|
|
11
11
|
import '../../context.js';
|
|
12
12
|
import '../../utils/utils.js';
|
|
13
13
|
import '../../utils/constants.js';
|
|
14
|
-
import '../../slide-
|
|
14
|
+
import '../../slide-a481ee16.js';
|
|
15
15
|
import '@alfalab/core-components-typography/esm';
|
|
16
16
|
import './paths.js';
|
|
17
17
|
import 'swiper/swiper.min.css';
|
package/esm/components/index.js
CHANGED
|
@@ -9,10 +9,10 @@ import '../utils/constants.js';
|
|
|
9
9
|
import './header-info-block/Component.js';
|
|
10
10
|
import '@alfalab/core-components-typography/esm';
|
|
11
11
|
import '../utils/split-filename.js';
|
|
12
|
-
import '../buttons-
|
|
12
|
+
import '../buttons-83f36b01.js';
|
|
13
13
|
import 'tslib';
|
|
14
14
|
import '@alfalab/core-components-icon-button/esm';
|
|
15
|
-
import '@alfalab/core-components-tooltip/esm';
|
|
15
|
+
import '@alfalab/core-components-tooltip/esm/desktop';
|
|
16
16
|
import '@alfalab/icons-glyph/ArrowsInwardMIcon';
|
|
17
17
|
import '@alfalab/icons-glyph/ArrowsOutwardMIcon';
|
|
18
18
|
import '@alfalab/icons-glyph/CrossMIcon';
|
|
@@ -25,6 +25,6 @@ import 'swiper';
|
|
|
25
25
|
import 'swiper/react';
|
|
26
26
|
import '@alfalab/icons-glyph/ChevronBackHeavyMIcon';
|
|
27
27
|
import '@alfalab/icons-glyph/ChevronForwardHeavyMIcon';
|
|
28
|
-
import '../slide-
|
|
28
|
+
import '../slide-a481ee16.js';
|
|
29
29
|
import './image-viewer/paths.js';
|
|
30
30
|
import 'swiper/swiper.min.css';
|
|
@@ -7,7 +7,7 @@ import 'classnames';
|
|
|
7
7
|
import '@alfalab/hooks';
|
|
8
8
|
import '../image-preview/paths.js';
|
|
9
9
|
|
|
10
|
-
var styles = {"component":"
|
|
10
|
+
var styles = {"component":"gallery__component_1qs3o","preview":"gallery__preview_1qs3o"};
|
|
11
11
|
require('./index.css')
|
|
12
12
|
|
|
13
13
|
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,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/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1878a */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-static-bg-primary-dark: #121212; /* 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 */
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .
|
|
18
|
+
} .gallery__container_19ewl {
|
|
19
19
|
display: flex;
|
|
20
20
|
flex-direction: column;
|
|
21
21
|
justify-content: space-between;
|
|
22
22
|
height: 100%;
|
|
23
23
|
width: 100%;
|
|
24
24
|
background-color: var(--color-static-bg-primary-dark);
|
|
25
|
-
} .
|
|
25
|
+
} .gallery__modal_19ewl {
|
|
26
26
|
flex-grow: 1;
|
|
27
27
|
width: 100%;
|
|
28
28
|
height: 100%;
|
package/esm/index.js
CHANGED
|
@@ -13,10 +13,10 @@ import './components/image-preview/paths.js';
|
|
|
13
13
|
import './components/header/Component.js';
|
|
14
14
|
import './components/header-info-block/Component.js';
|
|
15
15
|
import '@alfalab/core-components-typography/esm';
|
|
16
|
-
import './buttons-
|
|
16
|
+
import './buttons-83f36b01.js';
|
|
17
17
|
import 'tslib';
|
|
18
18
|
import '@alfalab/core-components-icon-button/esm';
|
|
19
|
-
import '@alfalab/core-components-tooltip/esm';
|
|
19
|
+
import '@alfalab/core-components-tooltip/esm/desktop';
|
|
20
20
|
import '@alfalab/icons-glyph/ArrowsInwardMIcon';
|
|
21
21
|
import '@alfalab/icons-glyph/ArrowsOutwardMIcon';
|
|
22
22
|
import '@alfalab/icons-glyph/CrossMIcon';
|
|
@@ -27,6 +27,6 @@ import 'swiper';
|
|
|
27
27
|
import 'swiper/react';
|
|
28
28
|
import '@alfalab/icons-glyph/ChevronBackHeavyMIcon';
|
|
29
29
|
import '@alfalab/icons-glyph/ChevronForwardHeavyMIcon';
|
|
30
|
-
import './slide-
|
|
30
|
+
import './slide-a481ee16.js';
|
|
31
31
|
import './components/image-viewer/paths.js';
|
|
32
32
|
import 'swiper/swiper.min.css';
|
|
@@ -5,7 +5,7 @@ import { isSmallImage, getImageAlt } from './utils/utils.js';
|
|
|
5
5
|
import { TestIds } from './utils/constants.js';
|
|
6
6
|
import { NoImagePaths } from './components/image-viewer/paths.js';
|
|
7
7
|
|
|
8
|
-
var styles = {"component":"
|
|
8
|
+
var styles = {"component":"gallery__component_lby0o","swiper":"gallery__swiper_lby0o","singleSlide":"gallery__singleSlide_lby0o","hidden":"gallery__hidden_lby0o","slide":"gallery__slide_lby0o","slideLoading":"gallery__slideLoading_lby0o","image":"gallery__image_lby0o","smallImage":"gallery__smallImage_lby0o","verticalImageFit":"gallery__verticalImageFit_lby0o","horizontalImageFit":"gallery__horizontalImageFit_lby0o","arrow":"gallery__arrow_lby0o","focused":"gallery__focused_lby0o","placeholder":"gallery__placeholder_lby0o","brokenImgWrapper":"gallery__brokenImgWrapper_lby0o","brokenImgIcon":"gallery__brokenImgIcon_lby0o","fullScreenImage":"gallery__fullScreenImage_lby0o"};
|
|
9
9
|
require('./components/image-viewer/index.css')
|
|
10
10
|
|
|
11
11
|
var SlideInner = function (_a) {
|
|
@@ -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,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/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1878a */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-static-bg-primary-dark: #121212; /* 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 */
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
} :root {
|
|
16
16
|
} :root {
|
|
17
17
|
} :root {
|
|
18
|
-
} .
|
|
18
|
+
} .gallery__container_19ewl {
|
|
19
19
|
display: flex;
|
|
20
20
|
flex-direction: column;
|
|
21
21
|
justify-content: space-between;
|
|
22
22
|
height: 100%;
|
|
23
23
|
width: 100%;
|
|
24
24
|
background-color: var(--color-static-bg-primary-dark);
|
|
25
|
-
} .
|
|
25
|
+
} .gallery__modal_19ewl {
|
|
26
26
|
flex-grow: 1;
|
|
27
27
|
width: 100%;
|
|
28
28
|
height: 100%;
|
package/index.js
CHANGED
|
@@ -17,10 +17,10 @@ require('./components/image-preview/paths.js');
|
|
|
17
17
|
require('./components/header/Component.js');
|
|
18
18
|
require('./components/header-info-block/Component.js');
|
|
19
19
|
require('@alfalab/core-components-typography');
|
|
20
|
-
require('./buttons-
|
|
20
|
+
require('./buttons-a2be6d97.js');
|
|
21
21
|
require('tslib');
|
|
22
22
|
require('@alfalab/core-components-icon-button');
|
|
23
|
-
require('@alfalab/core-components-tooltip');
|
|
23
|
+
require('@alfalab/core-components-tooltip/desktop');
|
|
24
24
|
require('@alfalab/icons-glyph/ArrowsInwardMIcon');
|
|
25
25
|
require('@alfalab/icons-glyph/ArrowsOutwardMIcon');
|
|
26
26
|
require('@alfalab/icons-glyph/CrossMIcon');
|
|
@@ -31,7 +31,7 @@ require('swiper');
|
|
|
31
31
|
require('swiper/react');
|
|
32
32
|
require('@alfalab/icons-glyph/ChevronBackHeavyMIcon');
|
|
33
33
|
require('@alfalab/icons-glyph/ChevronForwardHeavyMIcon');
|
|
34
|
-
require('./slide-
|
|
34
|
+
require('./slide-610e04e2.js');
|
|
35
35
|
require('./components/image-viewer/paths.js');
|
|
36
36
|
require('swiper/swiper.min.css');
|
|
37
37
|
|