@alfalab/core-components-pattern-lock 1.4.9 → 1.5.0
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.js +1 -1
- package/cssm/index.js +0 -9
- package/cssm/shared/index.d.ts +1 -0
- package/cssm/shared/index.js +9 -0
- package/cssm/utils.d.ts +7 -1
- package/cssm/utils.js +10 -0
- package/esm/Component.js +1 -1
- package/esm/index.css +11 -11
- package/esm/index.js +0 -8
- package/esm/shared/index.d.ts +1 -0
- package/esm/shared/index.js +1 -0
- package/esm/utils.d.ts +7 -1
- package/esm/utils.js +10 -1
- package/index.css +11 -11
- package/index.js +0 -8
- package/modern/Component.js +1 -1
- package/modern/index.css +11 -11
- package/modern/index.js +0 -7
- package/modern/shared/index.d.ts +1 -0
- package/modern/shared/index.js +1 -0
- package/modern/utils.d.ts +7 -1
- package/modern/utils.js +10 -1
- package/package.json +3 -3
- package/shared/index.d.ts +1 -0
- package/shared/index.js +9 -0
- package/shared/package.json +3 -0
- package/src/shared/index.ts +1 -0
- package/src/shared/package.json +3 -0
- package/src/utils.ts +11 -0
- package/utils.d.ts +7 -1
- package/utils.js +10 -0
package/Component.js
CHANGED
|
@@ -17,7 +17,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
17
17
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
18
18
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
19
19
|
|
|
20
|
-
var styles = {"component":"pattern-
|
|
20
|
+
var styles = {"component":"pattern-lock__component_tnry3","hidden":"pattern-lock__hidden_tnry3","message":"pattern-lock__message_tnry3","error":"pattern-lock__error_tnry3","forgotBtn":"pattern-lock__forgotBtn_tnry3"};
|
|
21
21
|
require('./index.css')
|
|
22
22
|
|
|
23
23
|
var PatternLock = React.forwardRef(function (_a, ref) {
|
package/cssm/index.js
CHANGED
|
@@ -4,15 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var Component = require('./Component.js');
|
|
6
6
|
var consts = require('./consts.js');
|
|
7
|
-
require('tslib');
|
|
8
|
-
require('react');
|
|
9
|
-
require('react-canvas-pattern-lock');
|
|
10
|
-
require('classnames');
|
|
11
|
-
require('@alfalab/core-components-button/cssm/mobile');
|
|
12
|
-
require('@alfalab/core-components-gap/cssm');
|
|
13
|
-
require('@alfalab/core-components-shared/cssm');
|
|
14
|
-
require('./utils.js');
|
|
15
|
-
require('./index.module.css');
|
|
16
7
|
|
|
17
8
|
|
|
18
9
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getPatternLockTestIds } from "../utils";
|
package/cssm/utils.d.ts
CHANGED
|
@@ -7,4 +7,10 @@ declare const getSizes: () => {
|
|
|
7
7
|
height: number;
|
|
8
8
|
};
|
|
9
9
|
declare function getTheme(dimens: ThemeParams['dimens']): Theme;
|
|
10
|
-
|
|
10
|
+
declare function getPatternLockTestIds(dataTestId: string): {
|
|
11
|
+
patternLock: string;
|
|
12
|
+
forgotCodeBtn: string;
|
|
13
|
+
error: string;
|
|
14
|
+
message: string;
|
|
15
|
+
};
|
|
16
|
+
export { getDefaultObserveTarget, getColorByToken, getSizes, getTheme, getPatternLockTestIds };
|
package/cssm/utils.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
|
+
var coreComponentsShared = require('@alfalab/core-components-shared/cssm');
|
|
6
7
|
var consts = require('./consts.js');
|
|
7
8
|
|
|
8
9
|
function getDefaultObserveTarget() {
|
|
@@ -68,8 +69,17 @@ function getTheme(dimens) {
|
|
|
68
69
|
},
|
|
69
70
|
_a;
|
|
70
71
|
}
|
|
72
|
+
function getPatternLockTestIds(dataTestId) {
|
|
73
|
+
return {
|
|
74
|
+
patternLock: dataTestId,
|
|
75
|
+
forgotCodeBtn: coreComponentsShared.getDataTestId(dataTestId, 'forgot-code-btn'),
|
|
76
|
+
error: coreComponentsShared.getDataTestId(dataTestId, 'error'),
|
|
77
|
+
message: coreComponentsShared.getDataTestId(dataTestId, 'message'),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
71
80
|
|
|
72
81
|
exports.getColorByToken = getColorByToken;
|
|
73
82
|
exports.getDefaultObserveTarget = getDefaultObserveTarget;
|
|
83
|
+
exports.getPatternLockTestIds = getPatternLockTestIds;
|
|
74
84
|
exports.getSizes = getSizes;
|
|
75
85
|
exports.getTheme = getTheme;
|
package/esm/Component.js
CHANGED
|
@@ -8,7 +8,7 @@ import { getDataTestId } from '@alfalab/core-components-shared/esm';
|
|
|
8
8
|
import { THEME_STATE, DEFAULT_EXTRA_BOUNDS, OBSERVE_OPTIONS, OBSERVABLE_TOKENS } from './consts.js';
|
|
9
9
|
import { getSizes, getTheme, getColorByToken, getDefaultObserveTarget } from './utils.js';
|
|
10
10
|
|
|
11
|
-
var styles = {"component":"pattern-
|
|
11
|
+
var styles = {"component":"pattern-lock__component_tnry3","hidden":"pattern-lock__hidden_tnry3","message":"pattern-lock__message_tnry3","error":"pattern-lock__error_tnry3","forgotBtn":"pattern-lock__forgotBtn_tnry3"};
|
|
12
12
|
require('./index.css')
|
|
13
13
|
|
|
14
14
|
var PatternLock = forwardRef(function (_a, ref) {
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1f6kz */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-text-negative: #ec2e14;
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
--size-m-height: 56px;
|
|
28
28
|
} :root {
|
|
29
29
|
--pattern-lock-max-width: 500px;
|
|
30
|
-
} .pattern-
|
|
30
|
+
} .pattern-lock__component_tnry3 {
|
|
31
31
|
max-width: var(--pattern-lock-max-width);
|
|
32
32
|
margin: var(--gap-xs) 0 var(--gap-xl) 0
|
|
33
|
-
} .pattern-
|
|
33
|
+
} .pattern-lock__component_tnry3 canvas {
|
|
34
34
|
display: block;
|
|
35
35
|
margin: 0 auto;
|
|
36
|
-
} .pattern-
|
|
36
|
+
} .pattern-lock__hidden_tnry3 {
|
|
37
37
|
visibility: hidden;
|
|
38
|
-
} .pattern-
|
|
38
|
+
} .pattern-lock__message_tnry3 {
|
|
39
39
|
font-size: 16px;
|
|
40
40
|
line-height: 24px;
|
|
41
41
|
font-weight: 400;
|
|
@@ -47,27 +47,27 @@
|
|
|
47
47
|
text-overflow: ellipsis;
|
|
48
48
|
white-space: nowrap;
|
|
49
49
|
color: var(--color-light-text-primary);
|
|
50
|
-
} .pattern-
|
|
50
|
+
} .pattern-lock__error_tnry3 {
|
|
51
51
|
color: var(--color-light-text-negative);
|
|
52
|
-
} .pattern-
|
|
52
|
+
} .pattern-lock__forgotBtn_tnry3 {
|
|
53
53
|
display: block;
|
|
54
54
|
min-height: var(--size-xs-height);
|
|
55
55
|
margin: var(--gap-xl) auto 0;
|
|
56
56
|
} @media screen and (min-width: 360px) {
|
|
57
|
-
.pattern-
|
|
57
|
+
.pattern-lock__forgotBtn_tnry3 {
|
|
58
58
|
margin-top: var(--gap-2xl);
|
|
59
59
|
min-height: var(--size-s-height);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
.pattern-
|
|
62
|
+
.pattern-lock__component_tnry3 {
|
|
63
63
|
margin-bottom: var(--gap-s);
|
|
64
64
|
}
|
|
65
65
|
} @media screen and (min-width: 390px) {
|
|
66
|
-
.pattern-
|
|
66
|
+
.pattern-lock__forgotBtn_tnry3 {
|
|
67
67
|
min-height: var(--size-m-height);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
.pattern-
|
|
70
|
+
.pattern-lock__component_tnry3 {
|
|
71
71
|
margin-bottom: var(--gap-l);
|
|
72
72
|
}
|
|
73
73
|
}
|
package/esm/index.js
CHANGED
|
@@ -1,10 +1,2 @@
|
|
|
1
1
|
export { PatternLock } from './Component.js';
|
|
2
2
|
export { THEME_STATE } from './consts.js';
|
|
3
|
-
import 'tslib';
|
|
4
|
-
import 'react';
|
|
5
|
-
import 'react-canvas-pattern-lock';
|
|
6
|
-
import 'classnames';
|
|
7
|
-
import '@alfalab/core-components-button/esm/mobile';
|
|
8
|
-
import '@alfalab/core-components-gap/esm';
|
|
9
|
-
import '@alfalab/core-components-shared/esm';
|
|
10
|
-
import './utils.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getPatternLockTestIds } from "../utils";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getPatternLockTestIds } from '../utils.js';
|
package/esm/utils.d.ts
CHANGED
|
@@ -7,4 +7,10 @@ declare const getSizes: () => {
|
|
|
7
7
|
height: number;
|
|
8
8
|
};
|
|
9
9
|
declare function getTheme(dimens: ThemeParams['dimens']): Theme;
|
|
10
|
-
|
|
10
|
+
declare function getPatternLockTestIds(dataTestId: string): {
|
|
11
|
+
patternLock: string;
|
|
12
|
+
forgotCodeBtn: string;
|
|
13
|
+
error: string;
|
|
14
|
+
message: string;
|
|
15
|
+
};
|
|
16
|
+
export { getDefaultObserveTarget, getColorByToken, getSizes, getTheme, getPatternLockTestIds };
|
package/esm/utils.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { __assign } from 'tslib';
|
|
2
|
+
import { getDataTestId } from '@alfalab/core-components-shared/esm';
|
|
2
3
|
import { OBSERVABLE_TOKENS, THEME_STATE } from './consts.js';
|
|
3
4
|
|
|
4
5
|
function getDefaultObserveTarget() {
|
|
@@ -64,5 +65,13 @@ function getTheme(dimens) {
|
|
|
64
65
|
},
|
|
65
66
|
_a;
|
|
66
67
|
}
|
|
68
|
+
function getPatternLockTestIds(dataTestId) {
|
|
69
|
+
return {
|
|
70
|
+
patternLock: dataTestId,
|
|
71
|
+
forgotCodeBtn: getDataTestId(dataTestId, 'forgot-code-btn'),
|
|
72
|
+
error: getDataTestId(dataTestId, 'error'),
|
|
73
|
+
message: getDataTestId(dataTestId, 'message'),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
67
76
|
|
|
68
|
-
export { getColorByToken, getDefaultObserveTarget, getSizes, getTheme };
|
|
77
|
+
export { getColorByToken, getDefaultObserveTarget, getPatternLockTestIds, getSizes, getTheme };
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1f6kz */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-text-negative: #ec2e14;
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
--size-m-height: 56px;
|
|
28
28
|
} :root {
|
|
29
29
|
--pattern-lock-max-width: 500px;
|
|
30
|
-
} .pattern-
|
|
30
|
+
} .pattern-lock__component_tnry3 {
|
|
31
31
|
max-width: var(--pattern-lock-max-width);
|
|
32
32
|
margin: var(--gap-xs) 0 var(--gap-xl) 0
|
|
33
|
-
} .pattern-
|
|
33
|
+
} .pattern-lock__component_tnry3 canvas {
|
|
34
34
|
display: block;
|
|
35
35
|
margin: 0 auto;
|
|
36
|
-
} .pattern-
|
|
36
|
+
} .pattern-lock__hidden_tnry3 {
|
|
37
37
|
visibility: hidden;
|
|
38
|
-
} .pattern-
|
|
38
|
+
} .pattern-lock__message_tnry3 {
|
|
39
39
|
font-size: 16px;
|
|
40
40
|
line-height: 24px;
|
|
41
41
|
font-weight: 400;
|
|
@@ -47,27 +47,27 @@
|
|
|
47
47
|
text-overflow: ellipsis;
|
|
48
48
|
white-space: nowrap;
|
|
49
49
|
color: var(--color-light-text-primary);
|
|
50
|
-
} .pattern-
|
|
50
|
+
} .pattern-lock__error_tnry3 {
|
|
51
51
|
color: var(--color-light-text-negative);
|
|
52
|
-
} .pattern-
|
|
52
|
+
} .pattern-lock__forgotBtn_tnry3 {
|
|
53
53
|
display: block;
|
|
54
54
|
min-height: var(--size-xs-height);
|
|
55
55
|
margin: var(--gap-xl) auto 0;
|
|
56
56
|
} @media screen and (min-width: 360px) {
|
|
57
|
-
.pattern-
|
|
57
|
+
.pattern-lock__forgotBtn_tnry3 {
|
|
58
58
|
margin-top: var(--gap-2xl);
|
|
59
59
|
min-height: var(--size-s-height);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
.pattern-
|
|
62
|
+
.pattern-lock__component_tnry3 {
|
|
63
63
|
margin-bottom: var(--gap-s);
|
|
64
64
|
}
|
|
65
65
|
} @media screen and (min-width: 390px) {
|
|
66
|
-
.pattern-
|
|
66
|
+
.pattern-lock__forgotBtn_tnry3 {
|
|
67
67
|
min-height: var(--size-m-height);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
.pattern-
|
|
70
|
+
.pattern-lock__component_tnry3 {
|
|
71
71
|
margin-bottom: var(--gap-l);
|
|
72
72
|
}
|
|
73
73
|
}
|
package/index.js
CHANGED
|
@@ -4,14 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var Component = require('./Component.js');
|
|
6
6
|
var consts = require('./consts.js');
|
|
7
|
-
require('tslib');
|
|
8
|
-
require('react');
|
|
9
|
-
require('react-canvas-pattern-lock');
|
|
10
|
-
require('classnames');
|
|
11
|
-
require('@alfalab/core-components-button/mobile');
|
|
12
|
-
require('@alfalab/core-components-gap');
|
|
13
|
-
require('@alfalab/core-components-shared');
|
|
14
|
-
require('./utils.js');
|
|
15
7
|
|
|
16
8
|
|
|
17
9
|
|
package/modern/Component.js
CHANGED
|
@@ -7,7 +7,7 @@ import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
|
7
7
|
import { THEME_STATE, DEFAULT_EXTRA_BOUNDS, OBSERVE_OPTIONS, OBSERVABLE_TOKENS } from './consts.js';
|
|
8
8
|
import { getSizes, getTheme, getColorByToken, getDefaultObserveTarget } from './utils.js';
|
|
9
9
|
|
|
10
|
-
const styles = {"component":"pattern-
|
|
10
|
+
const styles = {"component":"pattern-lock__component_tnry3","hidden":"pattern-lock__hidden_tnry3","message":"pattern-lock__message_tnry3","error":"pattern-lock__error_tnry3","forgotBtn":"pattern-lock__forgotBtn_tnry3"};
|
|
11
11
|
require('./index.css')
|
|
12
12
|
|
|
13
13
|
const PatternLock = forwardRef(({ observeTokens = false, observerParams = {}, justifyNodes = 'space-between', className, error, dataTestId, forgotCodeBtnText = 'Забыли код?', showForgotCodeBtn = false, onForgotBtnClick, extraBounds = DEFAULT_EXTRA_BOUNDS, message, ...restProps }, ref) => {
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1f6kz */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-text-negative: #ec2e14;
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
--size-m-height: 56px;
|
|
28
28
|
} :root {
|
|
29
29
|
--pattern-lock-max-width: 500px;
|
|
30
|
-
} .pattern-
|
|
30
|
+
} .pattern-lock__component_tnry3 {
|
|
31
31
|
max-width: var(--pattern-lock-max-width);
|
|
32
32
|
margin: var(--gap-xs) 0 var(--gap-xl) 0
|
|
33
|
-
} .pattern-
|
|
33
|
+
} .pattern-lock__component_tnry3 canvas {
|
|
34
34
|
display: block;
|
|
35
35
|
margin: 0 auto;
|
|
36
|
-
} .pattern-
|
|
36
|
+
} .pattern-lock__hidden_tnry3 {
|
|
37
37
|
visibility: hidden;
|
|
38
|
-
} .pattern-
|
|
38
|
+
} .pattern-lock__message_tnry3 {
|
|
39
39
|
font-size: 16px;
|
|
40
40
|
line-height: 24px;
|
|
41
41
|
font-weight: 400;
|
|
@@ -47,27 +47,27 @@
|
|
|
47
47
|
text-overflow: ellipsis;
|
|
48
48
|
white-space: nowrap;
|
|
49
49
|
color: var(--color-light-text-primary);
|
|
50
|
-
} .pattern-
|
|
50
|
+
} .pattern-lock__error_tnry3 {
|
|
51
51
|
color: var(--color-light-text-negative);
|
|
52
|
-
} .pattern-
|
|
52
|
+
} .pattern-lock__forgotBtn_tnry3 {
|
|
53
53
|
display: block;
|
|
54
54
|
min-height: var(--size-xs-height);
|
|
55
55
|
margin: var(--gap-xl) auto 0;
|
|
56
56
|
} @media screen and (min-width: 360px) {
|
|
57
|
-
.pattern-
|
|
57
|
+
.pattern-lock__forgotBtn_tnry3 {
|
|
58
58
|
margin-top: var(--gap-2xl);
|
|
59
59
|
min-height: var(--size-s-height);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
.pattern-
|
|
62
|
+
.pattern-lock__component_tnry3 {
|
|
63
63
|
margin-bottom: var(--gap-s);
|
|
64
64
|
}
|
|
65
65
|
} @media screen and (min-width: 390px) {
|
|
66
|
-
.pattern-
|
|
66
|
+
.pattern-lock__forgotBtn_tnry3 {
|
|
67
67
|
min-height: var(--size-m-height);
|
|
68
68
|
}
|
|
69
69
|
|
|
70
|
-
.pattern-
|
|
70
|
+
.pattern-lock__component_tnry3 {
|
|
71
71
|
margin-bottom: var(--gap-l);
|
|
72
72
|
}
|
|
73
73
|
}
|
package/modern/index.js
CHANGED
|
@@ -1,9 +1,2 @@
|
|
|
1
1
|
export { PatternLock } from './Component.js';
|
|
2
2
|
export { THEME_STATE } from './consts.js';
|
|
3
|
-
import 'react';
|
|
4
|
-
import 'react-canvas-pattern-lock';
|
|
5
|
-
import 'classnames';
|
|
6
|
-
import '@alfalab/core-components-button/modern/mobile';
|
|
7
|
-
import '@alfalab/core-components-gap/modern';
|
|
8
|
-
import '@alfalab/core-components-shared/modern';
|
|
9
|
-
import './utils.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getPatternLockTestIds } from "../utils";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getPatternLockTestIds } from '../utils.js';
|
package/modern/utils.d.ts
CHANGED
|
@@ -7,4 +7,10 @@ declare const getSizes: () => {
|
|
|
7
7
|
height: number;
|
|
8
8
|
};
|
|
9
9
|
declare function getTheme(dimens: ThemeParams['dimens']): Theme;
|
|
10
|
-
|
|
10
|
+
declare function getPatternLockTestIds(dataTestId: string): {
|
|
11
|
+
patternLock: string;
|
|
12
|
+
forgotCodeBtn: string;
|
|
13
|
+
error: string;
|
|
14
|
+
message: string;
|
|
15
|
+
};
|
|
16
|
+
export { getDefaultObserveTarget, getColorByToken, getSizes, getTheme, getPatternLockTestIds };
|
package/modern/utils.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
1
2
|
import { OBSERVABLE_TOKENS, THEME_STATE } from './consts.js';
|
|
2
3
|
|
|
3
4
|
function getDefaultObserveTarget() {
|
|
@@ -74,5 +75,13 @@ function getTheme(dimens) {
|
|
|
74
75
|
},
|
|
75
76
|
};
|
|
76
77
|
}
|
|
78
|
+
function getPatternLockTestIds(dataTestId) {
|
|
79
|
+
return {
|
|
80
|
+
patternLock: dataTestId,
|
|
81
|
+
forgotCodeBtn: getDataTestId(dataTestId, 'forgot-code-btn'),
|
|
82
|
+
error: getDataTestId(dataTestId, 'error'),
|
|
83
|
+
message: getDataTestId(dataTestId, 'message'),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
77
86
|
|
|
78
|
-
export { getColorByToken, getDefaultObserveTarget, getSizes, getTheme };
|
|
87
|
+
export { getColorByToken, getDefaultObserveTarget, getPatternLockTestIds, getSizes, getTheme };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-pattern-lock",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Pattern lock",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@alfalab/core-components-button": "^11.
|
|
18
|
+
"@alfalab/core-components-button": "^11.2.0",
|
|
19
19
|
"@alfalab/core-components-gap": "^1.2.0",
|
|
20
|
-
"@alfalab/core-components-shared": "^0.9.
|
|
20
|
+
"@alfalab/core-components-shared": "^0.9.1",
|
|
21
21
|
"react-canvas-pattern-lock": "^1.1.1",
|
|
22
22
|
"classnames": "^2.3.1",
|
|
23
23
|
"tslib": "^2.4.0"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getPatternLockTestIds } from "../utils";
|
package/shared/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getPatternLockTestIds } from '../utils';
|
package/src/utils.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Theme, ThemeParams } from 'react-canvas-pattern-lock';
|
|
2
2
|
|
|
3
|
+
import { getDataTestId } from '@alfalab/core-components-shared';
|
|
4
|
+
|
|
3
5
|
import { OBSERVABLE_TOKENS, THEME_STATE } from './consts';
|
|
4
6
|
|
|
5
7
|
export function getDefaultObserveTarget() {
|
|
@@ -82,3 +84,12 @@ export function getTheme(dimens: ThemeParams['dimens']): Theme {
|
|
|
82
84
|
},
|
|
83
85
|
};
|
|
84
86
|
}
|
|
87
|
+
|
|
88
|
+
export function getPatternLockTestIds(dataTestId: string) {
|
|
89
|
+
return {
|
|
90
|
+
patternLock: dataTestId,
|
|
91
|
+
forgotCodeBtn: getDataTestId(dataTestId, 'forgot-code-btn'),
|
|
92
|
+
error: getDataTestId(dataTestId, 'error'),
|
|
93
|
+
message: getDataTestId(dataTestId, 'message'),
|
|
94
|
+
};
|
|
95
|
+
}
|
package/utils.d.ts
CHANGED
|
@@ -7,4 +7,10 @@ declare const getSizes: () => {
|
|
|
7
7
|
height: number;
|
|
8
8
|
};
|
|
9
9
|
declare function getTheme(dimens: ThemeParams['dimens']): Theme;
|
|
10
|
-
|
|
10
|
+
declare function getPatternLockTestIds(dataTestId: string): {
|
|
11
|
+
patternLock: string;
|
|
12
|
+
forgotCodeBtn: string;
|
|
13
|
+
error: string;
|
|
14
|
+
message: string;
|
|
15
|
+
};
|
|
16
|
+
export { getDefaultObserveTarget, getColorByToken, getSizes, getTheme, getPatternLockTestIds };
|
package/utils.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
|
+
var coreComponentsShared = require('@alfalab/core-components-shared');
|
|
6
7
|
var consts = require('./consts.js');
|
|
7
8
|
|
|
8
9
|
function getDefaultObserveTarget() {
|
|
@@ -68,8 +69,17 @@ function getTheme(dimens) {
|
|
|
68
69
|
},
|
|
69
70
|
_a;
|
|
70
71
|
}
|
|
72
|
+
function getPatternLockTestIds(dataTestId) {
|
|
73
|
+
return {
|
|
74
|
+
patternLock: dataTestId,
|
|
75
|
+
forgotCodeBtn: coreComponentsShared.getDataTestId(dataTestId, 'forgot-code-btn'),
|
|
76
|
+
error: coreComponentsShared.getDataTestId(dataTestId, 'error'),
|
|
77
|
+
message: coreComponentsShared.getDataTestId(dataTestId, 'message'),
|
|
78
|
+
};
|
|
79
|
+
}
|
|
71
80
|
|
|
72
81
|
exports.getColorByToken = getColorByToken;
|
|
73
82
|
exports.getDefaultObserveTarget = getDefaultObserveTarget;
|
|
83
|
+
exports.getPatternLockTestIds = getPatternLockTestIds;
|
|
74
84
|
exports.getSizes = getSizes;
|
|
75
85
|
exports.getTheme = getTheme;
|