@alfalab/core-components-confirmation 13.1.6 → 13.1.7
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-89f0cb07.d.ts +62 -0
- package/component.desktop.js +1 -1
- package/component.mobile.js +2 -2
- package/component.responsive.js +1 -1
- package/components/base-confirmation/component.js +2 -2
- package/components/base-confirmation/index.css +2 -2
- package/components/base-confirmation/index.js +1 -1
- package/components/countdown-loader/component.js +1 -1
- package/components/countdown-loader/index.css +2 -2
- package/components/header/component.js +1 -1
- package/components/header/index.css +7 -7
- package/components/index.js +1 -1
- package/components/screens/fatal-error/component.js +1 -1
- package/components/screens/fatal-error/index.css +6 -6
- package/components/screens/hint/component.js +3 -3
- package/components/screens/hint/index.css +12 -12
- package/components/screens/index.js +1 -1
- package/components/screens/initial/component.js +1 -1
- package/components/screens/initial/countdown-section.js +1 -1
- package/components/screens/initial/index.css +17 -17
- package/components/screens/initial/index.js +1 -1
- package/components/screens/temp-block/component.js +1 -1
- package/components/screens/temp-block/index.css +7 -7
- package/{countdown-section-a349a8ff.js → countdown-section-a7437221.js} +1 -1
- package/cssm/Component-89f0cb07.d.ts +62 -0
- package/cssm/components/header/index.module.css +3 -3
- package/cssm/components/screens/hint/component.js +2 -2
- package/cssm/typings-89f0cb07.d.ts +93 -0
- package/desktop.js +1 -1
- package/esm/Component-89f0cb07.d.ts +62 -0
- package/esm/component.desktop.js +1 -1
- package/esm/component.mobile.js +2 -2
- package/esm/component.responsive.js +1 -1
- package/esm/components/base-confirmation/component.js +2 -2
- package/esm/components/base-confirmation/index.css +2 -2
- package/esm/components/base-confirmation/index.js +1 -1
- package/esm/components/countdown-loader/component.js +1 -1
- package/esm/components/countdown-loader/index.css +2 -2
- package/esm/components/header/component.js +1 -1
- package/esm/components/header/index.css +7 -7
- package/esm/components/index.js +1 -1
- package/esm/components/screens/fatal-error/component.js +1 -1
- package/esm/components/screens/fatal-error/index.css +6 -6
- package/esm/components/screens/hint/component.js +3 -3
- package/esm/components/screens/hint/index.css +12 -12
- package/esm/components/screens/index.js +1 -1
- package/esm/components/screens/initial/component.js +1 -1
- package/esm/components/screens/initial/countdown-section.js +1 -1
- package/esm/components/screens/initial/index.css +17 -17
- package/esm/components/screens/initial/index.js +1 -1
- package/esm/components/screens/temp-block/component.js +1 -1
- package/esm/components/screens/temp-block/index.css +7 -7
- package/esm/{countdown-section-a04248a9.js → countdown-section-d5c7f116.js} +1 -1
- package/esm/desktop.js +1 -1
- package/esm/index.js +1 -1
- package/esm/mobile.css +2 -2
- package/esm/mobile.js +1 -1
- package/esm/shared.js +1 -1
- package/esm/typings-89f0cb07.d.ts +93 -0
- package/index.js +1 -1
- package/mobile.css +2 -2
- package/mobile.js +1 -1
- package/modern/Component-89f0cb07.d.ts +62 -0
- package/modern/component.desktop.js +1 -1
- package/modern/component.mobile.js +2 -2
- package/modern/component.responsive.js +1 -1
- package/modern/components/base-confirmation/component.js +2 -2
- package/modern/components/base-confirmation/index.css +2 -2
- package/modern/components/base-confirmation/index.js +1 -1
- package/modern/components/countdown-loader/component.js +1 -1
- package/modern/components/countdown-loader/index.css +2 -2
- package/modern/components/header/component.js +1 -1
- package/modern/components/header/index.css +7 -7
- package/modern/components/index.js +1 -1
- package/modern/components/screens/fatal-error/component.js +1 -1
- package/modern/components/screens/fatal-error/index.css +6 -6
- package/modern/components/screens/hint/component.js +3 -3
- package/modern/components/screens/hint/index.css +12 -12
- package/modern/components/screens/index.js +1 -1
- package/modern/components/screens/initial/component.js +1 -1
- package/modern/components/screens/initial/countdown-section.js +1 -1
- package/modern/components/screens/initial/index.css +17 -17
- package/modern/components/screens/initial/index.js +1 -1
- package/modern/components/screens/temp-block/component.js +1 -1
- package/modern/components/screens/temp-block/index.css +7 -7
- package/modern/{countdown-section-f9d36879.js → countdown-section-ffce9cdb.js} +1 -1
- package/modern/desktop.js +1 -1
- package/modern/index.js +1 -1
- package/modern/mobile.css +2 -2
- package/modern/mobile.js +1 -1
- package/modern/shared.js +1 -1
- package/modern/typings-89f0cb07.d.ts +93 -0
- package/package.json +2 -2
- package/shared.js +1 -1
- package/src/components/screens/hint/component.tsx +2 -2
- package/src/vars.css +3 -3
- package/typings-89f0cb07.d.ts +93 -0
- /package/{countdown-section-a349a8ff.d.ts → countdown-section-a7437221.d.ts} +0 -0
- /package/esm/{countdown-section-a04248a9.d.ts → countdown-section-d5c7f116.d.ts} +0 -0
- /package/modern/{countdown-section-f9d36879.d.ts → countdown-section-ffce9cdb.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1rc05 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-text-primary: #0e0e0e;
|
|
@@ -37,49 +37,49 @@
|
|
|
37
37
|
--confirmation-text-color: var(--color-light-text-primary)
|
|
38
38
|
|
|
39
39
|
/* header */
|
|
40
|
-
} .
|
|
40
|
+
} .confirmation__component_1wv7u {
|
|
41
41
|
display: flex;
|
|
42
42
|
flex-direction: column;
|
|
43
|
-
} .
|
|
43
|
+
} .confirmation__typographyTheme_1wv7u.confirmation__typographyTheme_1wv7u {
|
|
44
44
|
font-size: var(--confirmation-text-font-size);
|
|
45
45
|
line-height: var(--confirmation-text-line-height);
|
|
46
46
|
font-weight: var(--confirmation-text-font-weight);
|
|
47
47
|
font-family: var(--confirmation-text-font-family);
|
|
48
48
|
color: var(--confirmation-text-color);
|
|
49
|
-
} .
|
|
49
|
+
} .confirmation__phone_1wv7u.confirmation__phone_1wv7u {
|
|
50
50
|
color: var(--color-light-text-primary);
|
|
51
51
|
margin-bottom: var(--gap-2xl);
|
|
52
|
-
} .
|
|
52
|
+
} .confirmation__compact_1wv7u {
|
|
53
53
|
margin-bottom: var(--gap-xl);
|
|
54
|
-
} .
|
|
54
|
+
} .confirmation__loaderWrap_1wv7u {
|
|
55
55
|
display: flex;
|
|
56
56
|
align-items: center;
|
|
57
|
-
} .
|
|
57
|
+
} .confirmation__left_1wv7u {
|
|
58
58
|
align-items: flex-start;
|
|
59
|
-
} .
|
|
59
|
+
} .confirmation__center_1wv7u {
|
|
60
60
|
align-items: center;
|
|
61
61
|
text-align: center
|
|
62
|
-
} .
|
|
62
|
+
} .confirmation__center_1wv7u .confirmation__loaderWrap_1wv7u {
|
|
63
63
|
justify-content: center;
|
|
64
|
-
} .
|
|
64
|
+
} .confirmation__codeInput_1wv7u {
|
|
65
65
|
margin-bottom: var(--gap-s);
|
|
66
|
-
} .
|
|
66
|
+
} .confirmation__smsComeLink_1wv7u.confirmation__smsComeLink_1wv7u {
|
|
67
67
|
font-size: 14px;
|
|
68
68
|
line-height: 20px;
|
|
69
69
|
font-weight: 500;
|
|
70
|
-
} .
|
|
70
|
+
} .confirmation__countdownContainer_1wv7u.confirmation__countdownContainer_1wv7u {
|
|
71
71
|
color: var(--color-light-text-secondary);
|
|
72
72
|
margin-bottom: var(--gap-xl);
|
|
73
|
-
} .
|
|
73
|
+
} .confirmation__countdownMobile_1wv7u.confirmation__countdownMobile_1wv7u {
|
|
74
74
|
margin-bottom: var(--gap-l);
|
|
75
|
-
} .
|
|
75
|
+
} .confirmation__countdownLoaderMobile_1wv7u.confirmation__countdownLoaderMobile_1wv7u {
|
|
76
76
|
margin-bottom: var(--gap-m);
|
|
77
|
-
} .
|
|
77
|
+
} .confirmation__getCodeButton_1wv7u {
|
|
78
78
|
position: relative;
|
|
79
79
|
top: var(--gap-2xs-neg);
|
|
80
80
|
margin-bottom: var(--gap-m);
|
|
81
|
-
} .
|
|
81
|
+
} .confirmation__getCodeButtonMobile_1wv7u {
|
|
82
82
|
margin-bottom: 0;
|
|
83
|
-
} .
|
|
83
|
+
} .confirmation__containerInput_1wv7u {
|
|
84
84
|
min-height: 80px;
|
|
85
85
|
}
|
|
@@ -10,6 +10,6 @@ import '@alfalab/hooks';
|
|
|
10
10
|
import '../../../context.js';
|
|
11
11
|
import '../../../utils.js';
|
|
12
12
|
import '../../header/component.js';
|
|
13
|
-
import '../../../countdown-section-
|
|
13
|
+
import '../../../countdown-section-ffce9cdb.js';
|
|
14
14
|
import '@alfalab/core-components-button/modern';
|
|
15
15
|
import '@alfalab/core-components-spinner/modern';
|
|
@@ -6,7 +6,7 @@ import { useCountdown, formatMsAsMinutes } from '../../../utils.js';
|
|
|
6
6
|
import { CountdownLoader } from '../../countdown-loader/component.js';
|
|
7
7
|
import { Header } from '../../header/component.js';
|
|
8
8
|
|
|
9
|
-
const styles = {"component":"
|
|
9
|
+
const styles = {"component":"confirmation__component_tqagl","center":"confirmation__center_tqagl","typographyTheme":"confirmation__typographyTheme_tqagl","description":"confirmation__description_tqagl","countdownWrap":"confirmation__countdownWrap_tqagl","loader":"confirmation__loader_tqagl"};
|
|
10
10
|
require('./index.css')
|
|
11
11
|
|
|
12
12
|
const TempBlock = ({ mobile }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 7xfg2 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-text-primary: #0e0e0e; /* 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 */
|
|
@@ -31,23 +31,23 @@
|
|
|
31
31
|
--confirmation-text-color: var(--color-light-text-primary)
|
|
32
32
|
|
|
33
33
|
/* header */
|
|
34
|
-
} .
|
|
34
|
+
} .confirmation__component_tqagl {
|
|
35
35
|
display: flex;
|
|
36
36
|
flex-direction: column;
|
|
37
|
-
} .
|
|
37
|
+
} .confirmation__center_tqagl {
|
|
38
38
|
align-items: center;
|
|
39
39
|
text-align: center;
|
|
40
|
-
} .
|
|
40
|
+
} .confirmation__typographyTheme_tqagl.confirmation__typographyTheme_tqagl {
|
|
41
41
|
font-size: var(--confirmation-text-font-size);
|
|
42
42
|
line-height: var(--confirmation-text-line-height);
|
|
43
43
|
font-weight: var(--confirmation-text-font-weight);
|
|
44
44
|
font-family: var(--confirmation-text-font-family);
|
|
45
45
|
color: var(--confirmation-text-color);
|
|
46
|
-
} .
|
|
46
|
+
} .confirmation__description_tqagl.confirmation__description_tqagl {
|
|
47
47
|
margin-bottom: var(--gap-xs);
|
|
48
|
-
} .
|
|
48
|
+
} .confirmation__countdownWrap_tqagl {
|
|
49
49
|
display: flex;
|
|
50
50
|
align-items: center;
|
|
51
|
-
} .
|
|
51
|
+
} .confirmation__loader_tqagl {
|
|
52
52
|
margin-right: var(--gap-xs);
|
|
53
53
|
}
|
|
@@ -6,7 +6,7 @@ import { Typography } from '@alfalab/core-components-typography/modern';
|
|
|
6
6
|
import { ConfirmationContext } from './context.js';
|
|
7
7
|
import { formatMsAsMinutes } from './utils.js';
|
|
8
8
|
|
|
9
|
-
const styles = {"component":"
|
|
9
|
+
const styles = {"component":"confirmation__component_1wv7u","typographyTheme":"confirmation__typographyTheme_1wv7u","phone":"confirmation__phone_1wv7u","compact":"confirmation__compact_1wv7u","loaderWrap":"confirmation__loaderWrap_1wv7u","left":"confirmation__left_1wv7u","center":"confirmation__center_1wv7u","codeInput":"confirmation__codeInput_1wv7u","smsComeLink":"confirmation__smsComeLink_1wv7u","countdownContainer":"confirmation__countdownContainer_1wv7u","countdownMobile":"confirmation__countdownMobile_1wv7u","countdownLoaderMobile":"confirmation__countdownLoaderMobile_1wv7u","getCodeButton":"confirmation__getCodeButton_1wv7u","getCodeButtonMobile":"confirmation__getCodeButtonMobile_1wv7u","containerInput":"confirmation__containerInput_1wv7u"};
|
|
10
10
|
require('./components/screens/initial/index.css')
|
|
11
11
|
|
|
12
12
|
const CountdownSection = ({ codeSendHintVisible, timePassed, processing, mobile, handleSmsRetryClick, }) => {
|
package/modern/desktop.js
CHANGED
|
@@ -13,7 +13,7 @@ import '@alfalab/core-components-code-input/modern/mobile';
|
|
|
13
13
|
import '@alfalab/core-components-link/modern';
|
|
14
14
|
import '@alfalab/core-components-typography/modern';
|
|
15
15
|
import './components/header/component.js';
|
|
16
|
-
import './countdown-section-
|
|
16
|
+
import './countdown-section-ffce9cdb.js';
|
|
17
17
|
import '@alfalab/core-components-button/modern';
|
|
18
18
|
import '@alfalab/core-components-spinner/modern';
|
|
19
19
|
import './components/screens/hint/component.js';
|
package/modern/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import '@alfalab/core-components-code-input/modern/mobile';
|
|
|
15
15
|
import '@alfalab/core-components-link/modern';
|
|
16
16
|
import '@alfalab/core-components-typography/modern';
|
|
17
17
|
import './components/header/component.js';
|
|
18
|
-
import './countdown-section-
|
|
18
|
+
import './countdown-section-ffce9cdb.js';
|
|
19
19
|
import '@alfalab/core-components-button/modern';
|
|
20
20
|
import '@alfalab/core-components-spinner/modern';
|
|
21
21
|
import './components/screens/hint/component.js';
|
package/modern/mobile.css
CHANGED
package/modern/mobile.js
CHANGED
|
@@ -13,7 +13,7 @@ import '@alfalab/core-components-code-input/modern/mobile';
|
|
|
13
13
|
import '@alfalab/core-components-link/modern';
|
|
14
14
|
import '@alfalab/core-components-typography/modern';
|
|
15
15
|
import './components/header/component.js';
|
|
16
|
-
import './countdown-section-
|
|
16
|
+
import './countdown-section-ffce9cdb.js';
|
|
17
17
|
import '@alfalab/core-components-button/modern';
|
|
18
18
|
import '@alfalab/core-components-spinner/modern';
|
|
19
19
|
import './components/screens/hint/component.js';
|
package/modern/shared.js
CHANGED
|
@@ -15,6 +15,6 @@ import '@alfalab/core-components-link/modern';
|
|
|
15
15
|
import '@alfalab/core-components-typography/modern';
|
|
16
16
|
import '@alfalab/hooks';
|
|
17
17
|
import './components/header/component.js';
|
|
18
|
-
import './countdown-section-
|
|
18
|
+
import './countdown-section-ffce9cdb.js';
|
|
19
19
|
import '@alfalab/core-components-button/modern';
|
|
20
20
|
import '@alfalab/core-components-spinner/modern';
|
|
@@ -0,0 +1,93 @@
|
|
|
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
|
+
type PrivateButtonProps = {
|
|
74
|
+
/**
|
|
75
|
+
* Основные стили компонента.
|
|
76
|
+
*/
|
|
77
|
+
styles: {
|
|
78
|
+
[key: string]: string;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Стили компонента для default и inverted режима.
|
|
82
|
+
*/
|
|
83
|
+
colorStylesMap: StyleColors;
|
|
84
|
+
};
|
|
85
|
+
type CommonButtonProps = ComponentProps & Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
86
|
+
type ButtonProps = CommonButtonProps & {
|
|
87
|
+
/**
|
|
88
|
+
* Контрольная точка, с нее начинается desktop версия
|
|
89
|
+
* @default 1024
|
|
90
|
+
*/
|
|
91
|
+
breakpoint?: number;
|
|
92
|
+
};
|
|
93
|
+
export { StyleColors, ComponentProps, PrivateButtonProps, CommonButtonProps, ButtonProps };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-confirmation",
|
|
3
|
-
"version": "13.1.
|
|
3
|
+
"version": "13.1.7",
|
|
4
4
|
"description": "Sms confirmation component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"directory": "dist"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@alfalab/core-components-button": "^9.0.
|
|
38
|
+
"@alfalab/core-components-button": "^9.0.6",
|
|
39
39
|
"@alfalab/core-components-code-input": "^3.0.1",
|
|
40
40
|
"@alfalab/core-components-link": "^5.1.0",
|
|
41
41
|
"@alfalab/core-components-spinner": "^3.1.0",
|
package/shared.js
CHANGED
|
@@ -19,7 +19,7 @@ require('@alfalab/core-components-link');
|
|
|
19
19
|
require('@alfalab/core-components-typography');
|
|
20
20
|
require('@alfalab/hooks');
|
|
21
21
|
require('./components/header/component.js');
|
|
22
|
-
require('./countdown-section-
|
|
22
|
+
require('./countdown-section-a7437221.js');
|
|
23
23
|
require('@alfalab/core-components-button');
|
|
24
24
|
require('@alfalab/core-components-spinner');
|
|
25
25
|
|
|
@@ -42,7 +42,7 @@ export const Hint: FC<HintProps> = ({ mobile }) => {
|
|
|
42
42
|
<div className={styles.phonesWrap}>
|
|
43
43
|
<div className={cn(styles.phoneWrap, { [styles.phoneContentMobile]: mobile })}>
|
|
44
44
|
<Link href='tel:+78002000000' underline={false} className={styles.phoneLink}>
|
|
45
|
-
8 800 200
|
|
45
|
+
8 800 200 00 00
|
|
46
46
|
</Link>
|
|
47
47
|
<Typography.Text
|
|
48
48
|
view='primary-medium'
|
|
@@ -57,7 +57,7 @@ export const Hint: FC<HintProps> = ({ mobile }) => {
|
|
|
57
57
|
|
|
58
58
|
<div className={cn(styles.phoneWrap, { [styles.phoneContentMobile]: mobile })}>
|
|
59
59
|
<Link href='tel:+74957888878' underline={false} className={styles.phoneLink}>
|
|
60
|
-
+7 495 78
|
|
60
|
+
+7 495 78 888 78
|
|
61
61
|
</Link>
|
|
62
62
|
<Typography.Text
|
|
63
63
|
view='primary-medium'
|
package/src/vars.css
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
--confirmation-header-desktop-font-family: var(--font-family-system);
|
|
9
9
|
|
|
10
10
|
/* mobile */
|
|
11
|
-
--confirmation-header-mobile-font-size:
|
|
12
|
-
--confirmation-header-mobile-line-height:
|
|
13
|
-
--confirmation-header-mobile-font-weight:
|
|
11
|
+
--confirmation-header-mobile-font-size: 20px;
|
|
12
|
+
--confirmation-header-mobile-line-height: 28px;
|
|
13
|
+
--confirmation-header-mobile-font-weight: 600;
|
|
14
14
|
--confirmation-header-mobile-font-family: var(--font-family-system);
|
|
15
15
|
|
|
16
16
|
/* text */
|
|
@@ -0,0 +1,93 @@
|
|
|
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
|
+
type PrivateButtonProps = {
|
|
74
|
+
/**
|
|
75
|
+
* Основные стили компонента.
|
|
76
|
+
*/
|
|
77
|
+
styles: {
|
|
78
|
+
[key: string]: string;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Стили компонента для default и inverted режима.
|
|
82
|
+
*/
|
|
83
|
+
colorStylesMap: StyleColors;
|
|
84
|
+
};
|
|
85
|
+
type CommonButtonProps = ComponentProps & Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
86
|
+
type ButtonProps = CommonButtonProps & {
|
|
87
|
+
/**
|
|
88
|
+
* Контрольная точка, с нее начинается desktop версия
|
|
89
|
+
* @default 1024
|
|
90
|
+
*/
|
|
91
|
+
breakpoint?: number;
|
|
92
|
+
};
|
|
93
|
+
export { StyleColors, ComponentProps, PrivateButtonProps, CommonButtonProps, ButtonProps };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|