@alfalab/core-components-pattern-lock 2.5.13 → 3.0.0-snapshot-133b390
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.responsive.d.ts +3 -5
- package/Component.responsive.js +4 -3
- package/Component.responsive.js.map +1 -0
- package/components/base-pattern-lock/Component.d.ts +3 -5
- package/components/base-pattern-lock/Component.js +9 -10
- package/components/base-pattern-lock/Component.js.map +1 -0
- package/components/base-pattern-lock/index.css +10 -31
- package/components/base-pattern-lock/index.d.ts +1 -1
- package/components/base-pattern-lock/index.js +3 -2
- package/components/base-pattern-lock/index.js.map +1 -0
- package/components/base-pattern-lock/index.module.css.js +8 -0
- package/components/base-pattern-lock/index.module.css.js.map +1 -0
- package/consts.d.ts +6 -7
- package/consts.js +1 -0
- package/consts.js.map +1 -0
- package/cssm/Component.responsive.d.ts +3 -5
- package/cssm/Component.responsive.js +6 -5
- package/cssm/Component.responsive.js.map +1 -0
- package/cssm/components/base-pattern-lock/Component.d.ts +3 -5
- package/cssm/components/base-pattern-lock/Component.js +3 -2
- package/cssm/components/base-pattern-lock/Component.js.map +1 -0
- package/cssm/components/base-pattern-lock/index.d.ts +1 -1
- package/cssm/components/base-pattern-lock/index.js +3 -2
- package/cssm/components/base-pattern-lock/index.js.map +1 -0
- package/cssm/components/base-pattern-lock/index.module.css +3 -23
- package/cssm/consts.d.ts +6 -7
- package/cssm/consts.js +1 -0
- package/cssm/consts.js.map +1 -0
- package/cssm/desktop/Component.desktop.d.ts +3 -5
- package/cssm/desktop/Component.desktop.js +3 -2
- package/cssm/desktop/Component.desktop.js.map +1 -0
- package/cssm/desktop/desktop.module.css +2 -23
- package/cssm/desktop/index.d.ts +2 -2
- package/cssm/desktop/index.js +3 -2
- package/cssm/desktop/index.js.map +1 -0
- package/cssm/hooks/use-pattern-lock-cleanup.d.ts +2 -4
- package/cssm/hooks/use-pattern-lock-cleanup.js +1 -0
- package/cssm/hooks/use-pattern-lock-cleanup.js.map +1 -0
- package/cssm/index.d.ts +3 -3
- package/cssm/index.js +1 -0
- package/cssm/index.js.map +1 -0
- package/cssm/mobile/Component.mobile.d.ts +3 -5
- package/cssm/mobile/Component.mobile.js +3 -2
- package/cssm/mobile/Component.mobile.js.map +1 -0
- package/cssm/mobile/index.d.ts +2 -2
- package/cssm/mobile/index.js +3 -2
- package/cssm/mobile/index.js.map +1 -0
- package/cssm/mobile/mobile.module.css +2 -23
- package/cssm/shared/index.d.ts +2 -2
- package/cssm/shared/index.js +3 -2
- package/cssm/shared/index.js.map +1 -0
- package/cssm/typings.d.ts +6 -6
- package/cssm/typings.js +1 -0
- package/cssm/typings.js.map +1 -0
- package/cssm/utils.d.ts +5 -6
- package/cssm/utils.js +3 -2
- package/cssm/utils.js.map +1 -0
- package/desktop/Component.desktop.d.ts +3 -5
- package/desktop/Component.desktop.js +4 -5
- package/desktop/Component.desktop.js.map +1 -0
- package/desktop/desktop.css +5 -27
- package/desktop/desktop.module.css.js +8 -0
- package/desktop/desktop.module.css.js.map +1 -0
- package/desktop/index.d.ts +2 -2
- package/desktop/index.js +3 -2
- package/desktop/index.js.map +1 -0
- package/esm/Component.responsive.d.ts +3 -5
- package/esm/Component.responsive.js +1 -0
- package/esm/Component.responsive.js.map +1 -0
- package/esm/components/base-pattern-lock/Component.d.ts +3 -5
- package/esm/components/base-pattern-lock/Component.js +3 -4
- package/esm/components/base-pattern-lock/Component.js.map +1 -0
- package/esm/components/base-pattern-lock/index.css +10 -31
- package/esm/components/base-pattern-lock/index.d.ts +1 -1
- package/esm/components/base-pattern-lock/index.js +1 -0
- package/esm/components/base-pattern-lock/index.js.map +1 -0
- package/esm/components/base-pattern-lock/index.module.css.js +6 -0
- package/esm/components/base-pattern-lock/index.module.css.js.map +1 -0
- package/esm/consts.d.ts +6 -7
- package/esm/consts.js +1 -0
- package/esm/consts.js.map +1 -0
- package/esm/desktop/Component.desktop.d.ts +3 -5
- package/esm/desktop/Component.desktop.js +2 -3
- package/esm/desktop/Component.desktop.js.map +1 -0
- package/esm/desktop/desktop.css +5 -27
- package/esm/desktop/desktop.module.css.js +6 -0
- package/esm/desktop/desktop.module.css.js.map +1 -0
- package/esm/desktop/index.d.ts +2 -2
- package/esm/desktop/index.js +1 -0
- package/esm/desktop/index.js.map +1 -0
- package/esm/hooks/use-pattern-lock-cleanup.d.ts +2 -4
- package/esm/hooks/use-pattern-lock-cleanup.js +1 -0
- package/esm/hooks/use-pattern-lock-cleanup.js.map +1 -0
- package/esm/index.d.ts +3 -3
- package/esm/index.js +1 -0
- package/esm/index.js.map +1 -0
- package/esm/mobile/Component.mobile.d.ts +3 -5
- package/esm/mobile/Component.mobile.js +2 -3
- package/esm/mobile/Component.mobile.js.map +1 -0
- package/esm/mobile/index.d.ts +2 -2
- package/esm/mobile/index.js +1 -0
- package/esm/mobile/index.js.map +1 -0
- package/esm/mobile/mobile.css +4 -26
- package/esm/mobile/mobile.module.css.js +6 -0
- package/esm/mobile/mobile.module.css.js.map +1 -0
- package/esm/shared/index.d.ts +2 -2
- package/esm/shared/index.js +1 -0
- package/esm/shared/index.js.map +1 -0
- package/esm/typings.d.ts +6 -6
- package/esm/typings.js +1 -0
- package/esm/typings.js.map +1 -0
- package/esm/utils.d.ts +5 -6
- package/esm/utils.js +2 -1
- package/esm/utils.js.map +1 -0
- package/hooks/use-pattern-lock-cleanup.d.ts +2 -4
- package/hooks/use-pattern-lock-cleanup.js +1 -0
- package/hooks/use-pattern-lock-cleanup.js.map +1 -0
- package/index.d.ts +3 -3
- package/index.js +1 -0
- package/index.js.map +1 -0
- package/mobile/Component.mobile.d.ts +3 -5
- package/mobile/Component.mobile.js +4 -5
- package/mobile/Component.mobile.js.map +1 -0
- package/mobile/index.d.ts +2 -2
- package/mobile/index.js +3 -2
- package/mobile/index.js.map +1 -0
- package/mobile/mobile.css +4 -26
- package/mobile/mobile.module.css.js +8 -0
- package/mobile/mobile.module.css.js.map +1 -0
- package/modern/Component.responsive.d.ts +3 -5
- package/modern/Component.responsive.js +1 -0
- package/modern/Component.responsive.js.map +1 -0
- package/modern/components/base-pattern-lock/Component.d.ts +3 -5
- package/modern/components/base-pattern-lock/Component.js +4 -5
- package/modern/components/base-pattern-lock/Component.js.map +1 -0
- package/modern/components/base-pattern-lock/index.css +10 -31
- package/modern/components/base-pattern-lock/index.d.ts +1 -1
- package/modern/components/base-pattern-lock/index.js +1 -0
- package/modern/components/base-pattern-lock/index.js.map +1 -0
- package/modern/components/base-pattern-lock/index.module.css.js +6 -0
- package/modern/components/base-pattern-lock/index.module.css.js.map +1 -0
- package/modern/consts.d.ts +6 -7
- package/modern/consts.js +1 -0
- package/modern/consts.js.map +1 -0
- package/modern/desktop/Component.desktop.d.ts +3 -5
- package/modern/desktop/Component.desktop.js +2 -3
- package/modern/desktop/Component.desktop.js.map +1 -0
- package/modern/desktop/desktop.css +5 -27
- package/modern/desktop/desktop.module.css.js +6 -0
- package/modern/desktop/desktop.module.css.js.map +1 -0
- package/modern/desktop/index.d.ts +2 -2
- package/modern/desktop/index.js +1 -0
- package/modern/desktop/index.js.map +1 -0
- package/modern/hooks/use-pattern-lock-cleanup.d.ts +2 -4
- package/modern/hooks/use-pattern-lock-cleanup.js +1 -0
- package/modern/hooks/use-pattern-lock-cleanup.js.map +1 -0
- package/modern/index.d.ts +3 -3
- package/modern/index.js +1 -0
- package/modern/index.js.map +1 -0
- package/modern/mobile/Component.mobile.d.ts +3 -5
- package/modern/mobile/Component.mobile.js +2 -3
- package/modern/mobile/Component.mobile.js.map +1 -0
- package/modern/mobile/index.d.ts +2 -2
- package/modern/mobile/index.js +1 -0
- package/modern/mobile/index.js.map +1 -0
- package/modern/mobile/mobile.css +4 -26
- package/modern/mobile/mobile.module.css.js +6 -0
- package/modern/mobile/mobile.module.css.js.map +1 -0
- package/modern/shared/index.d.ts +2 -2
- package/modern/shared/index.js +1 -0
- package/modern/shared/index.js.map +1 -0
- package/modern/typings.d.ts +6 -6
- package/modern/typings.js +1 -0
- package/modern/typings.js.map +1 -0
- package/modern/utils.d.ts +5 -6
- package/modern/utils.js +2 -1
- package/modern/utils.js.map +1 -0
- package/moderncssm/Component.responsive.d.ts +3 -5
- package/moderncssm/Component.responsive.js +1 -0
- package/moderncssm/Component.responsive.js.map +1 -0
- package/moderncssm/components/base-pattern-lock/Component.d.ts +3 -5
- package/moderncssm/components/base-pattern-lock/Component.js +3 -2
- package/moderncssm/components/base-pattern-lock/Component.js.map +1 -0
- package/moderncssm/components/base-pattern-lock/index.d.ts +1 -1
- package/moderncssm/components/base-pattern-lock/index.js +1 -0
- package/moderncssm/components/base-pattern-lock/index.js.map +1 -0
- package/moderncssm/components/base-pattern-lock/index.module.css +0 -1
- package/moderncssm/consts.d.ts +6 -7
- package/moderncssm/consts.js +1 -0
- package/moderncssm/consts.js.map +1 -0
- package/moderncssm/desktop/Component.desktop.d.ts +3 -5
- package/moderncssm/desktop/Component.desktop.js +1 -0
- package/moderncssm/desktop/Component.desktop.js.map +1 -0
- package/moderncssm/desktop/desktop.module.css +0 -1
- package/moderncssm/desktop/index.d.ts +2 -2
- package/moderncssm/desktop/index.js +1 -0
- package/moderncssm/desktop/index.js.map +1 -0
- package/moderncssm/hooks/use-pattern-lock-cleanup.d.ts +2 -4
- package/moderncssm/hooks/use-pattern-lock-cleanup.js +1 -0
- package/moderncssm/hooks/use-pattern-lock-cleanup.js.map +1 -0
- package/moderncssm/index.d.ts +3 -3
- package/moderncssm/index.js +1 -0
- package/moderncssm/index.js.map +1 -0
- package/moderncssm/mobile/Component.mobile.d.ts +3 -5
- package/moderncssm/mobile/Component.mobile.js +1 -0
- package/moderncssm/mobile/Component.mobile.js.map +1 -0
- package/moderncssm/mobile/index.d.ts +2 -2
- package/moderncssm/mobile/index.js +1 -0
- package/moderncssm/mobile/index.js.map +1 -0
- package/moderncssm/mobile/mobile.module.css +0 -1
- package/moderncssm/shared/index.d.ts +2 -2
- package/moderncssm/shared/index.js +1 -0
- package/moderncssm/shared/index.js.map +1 -0
- package/moderncssm/typings.d.ts +6 -6
- package/moderncssm/typings.js +1 -0
- package/moderncssm/typings.js.map +1 -0
- package/moderncssm/utils.d.ts +5 -6
- package/moderncssm/utils.js +2 -1
- package/moderncssm/utils.js.map +1 -0
- package/package.json +6 -6
- package/shared/index.d.ts +2 -2
- package/shared/index.js +3 -2
- package/shared/index.js.map +1 -0
- package/typings.d.ts +6 -6
- package/typings.js +1 -0
- package/typings.js.map +1 -0
- package/utils.d.ts +5 -6
- package/utils.js +1 -0
- package/utils.js.map +1 -0
- package/cssm/vars.css +0 -0
- package/desktop/package.json +0 -3
- package/mobile/package.json +0 -3
- package/moderncssm/vars.css +0 -0
- package/shared/package.json +0 -3
- package/src/desktop/package.json +0 -3
- package/src/mobile/package.json +0 -3
- package/src/shared/package.json +0 -3
package/moderncssm/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export type { PatternLockProps } from
|
|
2
|
-
export * from
|
|
3
|
-
export { THEME_STATE } from
|
|
1
|
+
export type { PatternLockProps } from './typings';
|
|
2
|
+
export * from './Component.responsive';
|
|
3
|
+
export { THEME_STATE } from './consts';
|
package/moderncssm/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import { TPatternLockInstance } from '@alfalab/react-canvas-pattern-lock';
|
|
4
|
-
import { CommonPatternLockProps } from
|
|
5
|
-
declare const PatternLockMobile: React.ForwardRefExoticComponent<CommonPatternLockProps & React.RefAttributes<TPatternLockInstance>>;
|
|
6
|
-
export { PatternLockMobile };
|
|
2
|
+
import type { TPatternLockInstance } from '@alfalab/react-canvas-pattern-lock';
|
|
3
|
+
import { CommonPatternLockProps } from '../typings';
|
|
4
|
+
export declare const PatternLockMobile: React.ForwardRefExoticComponent<CommonPatternLockProps & React.RefAttributes<TPatternLockInstance>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Component.mobile.js","sources":["../../src/mobile/Component.mobile.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport type { TPatternLockInstance } from '@alfalab/react-canvas-pattern-lock';\n\nimport { BasePatternLock } from '../components/base-pattern-lock';\nimport { CommonPatternLockProps } from '../typings';\n\nimport styles from './mobile.module.css';\n\nexport const PatternLockMobile = forwardRef<TPatternLockInstance, CommonPatternLockProps>(\n (restProps, ref) => <BasePatternLock {...restProps} ref={ref} styles={styles} />,\n);\n\nPatternLockMobile.displayName = 'PatternLockMobile';\n"],"names":[],"mappings":";;;;AASa,MAAA,iBAAiB,GAAG,UAAU,CACvC,CAAC,SAAS,EAAE,GAAG,KAAK,KAAC,CAAA,aAAA,CAAA,eAAe,EAAK,EAAA,GAAA,SAAS,EAAE,GAAG,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAI,CAAA;AAGpF,iBAAiB,CAAC,WAAW,GAAG,mBAAmB;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { PatternLockMobile } from
|
|
2
|
-
export type { CommonPatternLockProps as PatternLockMobileProps } from
|
|
1
|
+
export { PatternLockMobile } from './Component.mobile';
|
|
2
|
+
export type { CommonPatternLockProps as PatternLockMobileProps } from '../typings';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { getPatternLockTestIds } from
|
|
2
|
-
export { usePatternLockCleanup } from
|
|
1
|
+
export { getPatternLockTestIds } from '../utils';
|
|
2
|
+
export { usePatternLockCleanup } from '../hooks/use-pattern-lock-cleanup';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
package/moderncssm/typings.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MouseEvent } from 'react';
|
|
2
2
|
import { ReactPatternLockProps } from '@alfalab/react-canvas-pattern-lock';
|
|
3
|
-
type ConditionalProps = {
|
|
3
|
+
declare type ConditionalProps = {
|
|
4
4
|
/**
|
|
5
5
|
* Показать кнопку "забыли код"
|
|
6
6
|
* @default "Забыли код?"
|
|
@@ -20,7 +20,7 @@ type ConditionalProps = {
|
|
|
20
20
|
onForgotBtnClick?: never;
|
|
21
21
|
forgotCodeBtnText?: never;
|
|
22
22
|
};
|
|
23
|
-
type CommonPatternLockProps = {
|
|
23
|
+
export declare type CommonPatternLockProps = {
|
|
24
24
|
/**
|
|
25
25
|
* Дополнительный класс
|
|
26
26
|
*/
|
|
@@ -53,7 +53,7 @@ type CommonPatternLockProps = {
|
|
|
53
53
|
*/
|
|
54
54
|
disabled?: boolean;
|
|
55
55
|
} & Omit<ReactPatternLockProps, 'theme' | 'width' | 'height' | 'rows' | 'cols' | 'hover' | 'justifyNodes'> & ConditionalProps;
|
|
56
|
-
type PrivatePatternLockProps = {
|
|
56
|
+
export declare type PrivatePatternLockProps = {
|
|
57
57
|
/**
|
|
58
58
|
* Включает ховер-эффект
|
|
59
59
|
*/
|
|
@@ -65,7 +65,7 @@ type PrivatePatternLockProps = {
|
|
|
65
65
|
[key: string]: string;
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
|
-
type PatternLockProps = CommonPatternLockProps & {
|
|
68
|
+
export declare type PatternLockProps = CommonPatternLockProps & {
|
|
69
69
|
/**
|
|
70
70
|
* Контрольная точка, с нее начинается desktop версия
|
|
71
71
|
* @default 1024
|
|
@@ -81,7 +81,7 @@ type PatternLockProps = CommonPatternLockProps & {
|
|
|
81
81
|
*/
|
|
82
82
|
defaultMatchMediaValue?: boolean | (() => boolean);
|
|
83
83
|
};
|
|
84
|
-
type ObservableTokens = {
|
|
84
|
+
export declare type ObservableTokens = {
|
|
85
85
|
ACCENT_INITIAL: string;
|
|
86
86
|
ACCENT_SUCCESS: string;
|
|
87
87
|
ACCENT_FAILURE: string;
|
|
@@ -93,4 +93,4 @@ type ObservableTokens = {
|
|
|
93
93
|
HOVER_INNER: string;
|
|
94
94
|
HOVER_OUTER: string;
|
|
95
95
|
};
|
|
96
|
-
export {
|
|
96
|
+
export {};
|
package/moderncssm/typings.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typings.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/moderncssm/utils.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { Theme, ThemeParams } from '@alfalab/react-canvas-pattern-lock';
|
|
2
|
-
declare function getDefaultObserveTarget(): HTMLHeadElement;
|
|
3
|
-
declare function getColorByToken(token: string): string;
|
|
4
|
-
declare const getSizes: () => {
|
|
2
|
+
export declare function getDefaultObserveTarget(): HTMLHeadElement;
|
|
3
|
+
export declare function getColorByToken(token: string): string;
|
|
4
|
+
export declare const getSizes: () => {
|
|
5
5
|
elementSizes: ThemeParams['dimens'];
|
|
6
6
|
width: number;
|
|
7
7
|
height: number;
|
|
8
8
|
};
|
|
9
|
-
declare function getTheme(dimens: ThemeParams['dimens']): Theme;
|
|
10
|
-
declare function getPatternLockTestIds(dataTestId: string): {
|
|
9
|
+
export declare function getTheme(dimens: ThemeParams['dimens']): Theme;
|
|
10
|
+
export declare function getPatternLockTestIds(dataTestId: string): {
|
|
11
11
|
patternLock: string;
|
|
12
12
|
forgotCodeBtn: string;
|
|
13
13
|
};
|
|
14
|
-
export { getDefaultObserveTarget, getColorByToken, getSizes, getTheme, getPatternLockTestIds };
|
package/moderncssm/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getDataTestId } from '@alfalab/core-components-shared/moderncssm';
|
|
2
|
-
import {
|
|
2
|
+
import { THEME_STATE, OBSERVABLE_TOKENS } from './consts.js';
|
|
3
3
|
|
|
4
4
|
function getDefaultObserveTarget() {
|
|
5
5
|
return document.head;
|
|
@@ -71,3 +71,4 @@ function getPatternLockTestIds(dataTestId) {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
export { getColorByToken, getDefaultObserveTarget, getPatternLockTestIds, getSizes, getTheme };
|
|
74
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../src/utils.ts"],"sourcesContent":["import { getDataTestId } from '@alfalab/core-components-shared';\nimport { Theme, ThemeParams } from '@alfalab/react-canvas-pattern-lock';\n\nimport { OBSERVABLE_TOKENS, THEME_STATE } from './consts';\n\nexport function getDefaultObserveTarget() {\n return document.head;\n}\n\nexport function getColorByToken(token: string) {\n return getComputedStyle(document.documentElement).getPropertyValue(token);\n}\n\nexport const getSizes = (() => {\n const COMMON_SIZES = {\n lineWidth: 6,\n nodeRing: 0,\n nodeCore: 12,\n };\n\n let cachedSize: { elementSizes: ThemeParams['dimens']; width: number; height: number };\n\n return () => {\n if (cachedSize) {\n return cachedSize;\n }\n\n cachedSize = {\n elementSizes: { ...COMMON_SIZES, nodeRadius: 32 },\n width: 240,\n height: 240,\n };\n\n return cachedSize;\n };\n})();\n\nexport function getTheme(dimens: ThemeParams['dimens']): Theme {\n const baseColors = {\n primary: getColorByToken(OBSERVABLE_TOKENS.PRIMARY),\n bg: 'transparent',\n ringBg: getColorByToken(OBSERVABLE_TOKENS.RING_BG_INITIAL),\n hover: {\n inner: getColorByToken(OBSERVABLE_TOKENS.HOVER_INNER),\n outer: getColorByToken(OBSERVABLE_TOKENS.HOVER_OUTER),\n },\n };\n\n return {\n [THEME_STATE.INITIAL]: {\n colors: {\n ...baseColors,\n accent: getColorByToken(OBSERVABLE_TOKENS.ACCENT_INITIAL),\n selectedRingBg: getColorByToken(OBSERVABLE_TOKENS.SELECTED_RING_BG_INITIAL),\n },\n dimens,\n },\n [THEME_STATE.SUCCESS]: {\n colors: {\n ...baseColors,\n accent: getColorByToken(OBSERVABLE_TOKENS.ACCENT_SUCCESS),\n selectedRingBg: getColorByToken(OBSERVABLE_TOKENS.SELECTED_RING_BG_SUCCESS),\n },\n dimens,\n },\n [THEME_STATE.FAILURE]: {\n colors: {\n ...baseColors,\n accent: getColorByToken(OBSERVABLE_TOKENS.ACCENT_FAILURE),\n selectedRingBg: getColorByToken(OBSERVABLE_TOKENS.SELECTED_RING_BG_FAILURE),\n },\n dimens,\n },\n };\n}\n\nexport function getPatternLockTestIds(dataTestId: string) {\n return {\n patternLock: dataTestId,\n forgotCodeBtn: getDataTestId(dataTestId, 'forgot-code-btn'),\n };\n}\n"],"names":[],"mappings":";;;SAKgB,uBAAuB,GAAA;IACnC,OAAO,QAAQ,CAAC,IAAI;AACxB;AAEM,SAAU,eAAe,CAAC,KAAa,EAAA;IACzC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC;AAC7E;AAEa,MAAA,QAAQ,GAAG,CAAC,MAAK;AAC1B,IAAA,MAAM,YAAY,GAAG;AACjB,QAAA,SAAS,EAAE,CAAC;AACZ,QAAA,QAAQ,EAAE,CAAC;AACX,QAAA,QAAQ,EAAE,EAAE;KACf;AAED,IAAA,IAAI,UAAkF;AAEtF,IAAA,OAAO,MAAK;AACR,QAAA,IAAI,UAAU,EAAE;AACZ,YAAA,OAAO,UAAU;AACpB;AAED,QAAA,UAAU,GAAG;YACT,YAAY,EAAE,EAAE,GAAG,YAAY,EAAE,UAAU,EAAE,EAAE,EAAE;AACjD,YAAA,KAAK,EAAE,GAAG;AACV,YAAA,MAAM,EAAE,GAAG;SACd;AAED,QAAA,OAAO,UAAU;AACrB,KAAC;AACL,CAAC;AAEK,SAAU,QAAQ,CAAC,MAA6B,EAAA;AAClD,IAAA,MAAM,UAAU,GAAG;AACf,QAAA,OAAO,EAAE,eAAe,CAAC,iBAAiB,CAAC,OAAO,CAAC;AACnD,QAAA,EAAE,EAAE,aAAa;AACjB,QAAA,MAAM,EAAE,eAAe,CAAC,iBAAiB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
|
-
"version": "
|
|
3
|
+
"version": "3.0.0-snapshot-133b390",
|
|
4
4
|
"description": "Pattern lock",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@alfalab/core-components-button": "
|
|
20
|
-
"@alfalab/core-components-shared": "
|
|
21
|
-
"@alfalab/core-components-mq": "
|
|
19
|
+
"@alfalab/core-components-button": "12.0.0-snapshot-133b390",
|
|
20
|
+
"@alfalab/core-components-shared": "1.0.0-snapshot-133b390",
|
|
21
|
+
"@alfalab/core-components-mq": "5.0.0-snapshot-133b390",
|
|
22
22
|
"@alfalab/react-canvas-pattern-lock": "^2.0.7",
|
|
23
23
|
"classnames": "^2.5.1",
|
|
24
24
|
"tslib": "^2.4.0"
|
|
25
25
|
},
|
|
26
|
-
"themesVersion": "
|
|
27
|
-
"varsVersion": "
|
|
26
|
+
"themesVersion": "14.0.0-snapshot-133b390",
|
|
27
|
+
"varsVersion": "10.0.0-snapshot-133b390"
|
|
28
28
|
}
|
package/shared/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { getPatternLockTestIds } from
|
|
2
|
-
export { usePatternLockCleanup } from
|
|
1
|
+
export { getPatternLockTestIds } from '../utils';
|
|
2
|
+
export { usePatternLockCleanup } from '../hooks/use-pattern-lock-cleanup';
|
package/shared/index.js
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var utils = require('../utils.js');
|
|
6
|
-
var
|
|
6
|
+
var usePatternLockCleanup = require('../hooks/use-pattern-lock-cleanup.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
exports.getPatternLockTestIds = utils.getPatternLockTestIds;
|
|
11
|
-
exports.usePatternLockCleanup =
|
|
11
|
+
exports.usePatternLockCleanup = usePatternLockCleanup.usePatternLockCleanup;
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
|
package/typings.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MouseEvent } from 'react';
|
|
2
2
|
import { ReactPatternLockProps } from '@alfalab/react-canvas-pattern-lock';
|
|
3
|
-
type ConditionalProps = {
|
|
3
|
+
declare type ConditionalProps = {
|
|
4
4
|
/**
|
|
5
5
|
* Показать кнопку "забыли код"
|
|
6
6
|
* @default "Забыли код?"
|
|
@@ -20,7 +20,7 @@ type ConditionalProps = {
|
|
|
20
20
|
onForgotBtnClick?: never;
|
|
21
21
|
forgotCodeBtnText?: never;
|
|
22
22
|
};
|
|
23
|
-
type CommonPatternLockProps = {
|
|
23
|
+
export declare type CommonPatternLockProps = {
|
|
24
24
|
/**
|
|
25
25
|
* Дополнительный класс
|
|
26
26
|
*/
|
|
@@ -53,7 +53,7 @@ type CommonPatternLockProps = {
|
|
|
53
53
|
*/
|
|
54
54
|
disabled?: boolean;
|
|
55
55
|
} & Omit<ReactPatternLockProps, 'theme' | 'width' | 'height' | 'rows' | 'cols' | 'hover' | 'justifyNodes'> & ConditionalProps;
|
|
56
|
-
type PrivatePatternLockProps = {
|
|
56
|
+
export declare type PrivatePatternLockProps = {
|
|
57
57
|
/**
|
|
58
58
|
* Включает ховер-эффект
|
|
59
59
|
*/
|
|
@@ -65,7 +65,7 @@ type PrivatePatternLockProps = {
|
|
|
65
65
|
[key: string]: string;
|
|
66
66
|
};
|
|
67
67
|
};
|
|
68
|
-
type PatternLockProps = CommonPatternLockProps & {
|
|
68
|
+
export declare type PatternLockProps = CommonPatternLockProps & {
|
|
69
69
|
/**
|
|
70
70
|
* Контрольная точка, с нее начинается desktop версия
|
|
71
71
|
* @default 1024
|
|
@@ -81,7 +81,7 @@ type PatternLockProps = CommonPatternLockProps & {
|
|
|
81
81
|
*/
|
|
82
82
|
defaultMatchMediaValue?: boolean | (() => boolean);
|
|
83
83
|
};
|
|
84
|
-
type ObservableTokens = {
|
|
84
|
+
export declare type ObservableTokens = {
|
|
85
85
|
ACCENT_INITIAL: string;
|
|
86
86
|
ACCENT_SUCCESS: string;
|
|
87
87
|
ACCENT_FAILURE: string;
|
|
@@ -93,4 +93,4 @@ type ObservableTokens = {
|
|
|
93
93
|
HOVER_INNER: string;
|
|
94
94
|
HOVER_OUTER: string;
|
|
95
95
|
};
|
|
96
|
-
export {
|
|
96
|
+
export {};
|
package/typings.js
CHANGED
package/typings.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typings.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/utils.d.ts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { Theme, ThemeParams } from '@alfalab/react-canvas-pattern-lock';
|
|
2
|
-
declare function getDefaultObserveTarget(): HTMLHeadElement;
|
|
3
|
-
declare function getColorByToken(token: string): string;
|
|
4
|
-
declare const getSizes: () => {
|
|
2
|
+
export declare function getDefaultObserveTarget(): HTMLHeadElement;
|
|
3
|
+
export declare function getColorByToken(token: string): string;
|
|
4
|
+
export declare const getSizes: () => {
|
|
5
5
|
elementSizes: ThemeParams['dimens'];
|
|
6
6
|
width: number;
|
|
7
7
|
height: number;
|
|
8
8
|
};
|
|
9
|
-
declare function getTheme(dimens: ThemeParams['dimens']): Theme;
|
|
10
|
-
declare function getPatternLockTestIds(dataTestId: string): {
|
|
9
|
+
export declare function getTheme(dimens: ThemeParams['dimens']): Theme;
|
|
10
|
+
export declare function getPatternLockTestIds(dataTestId: string): {
|
|
11
11
|
patternLock: string;
|
|
12
12
|
forgotCodeBtn: string;
|
|
13
13
|
};
|
|
14
|
-
export { getDefaultObserveTarget, getColorByToken, getSizes, getTheme, getPatternLockTestIds };
|
package/utils.js
CHANGED
package/utils.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["src/utils.ts"],"sourcesContent":["import { getDataTestId } from '@alfalab/core-components-shared';\nimport { Theme, ThemeParams } from '@alfalab/react-canvas-pattern-lock';\n\nimport { OBSERVABLE_TOKENS, THEME_STATE } from './consts';\n\nexport function getDefaultObserveTarget() {\n return document.head;\n}\n\nexport function getColorByToken(token: string) {\n return getComputedStyle(document.documentElement).getPropertyValue(token);\n}\n\nexport const getSizes = (() => {\n const COMMON_SIZES = {\n lineWidth: 6,\n nodeRing: 0,\n nodeCore: 12,\n };\n\n let cachedSize: { elementSizes: ThemeParams['dimens']; width: number; height: number };\n\n return () => {\n if (cachedSize) {\n return cachedSize;\n }\n\n cachedSize = {\n elementSizes: { ...COMMON_SIZES, nodeRadius: 32 },\n width: 240,\n height: 240,\n };\n\n return cachedSize;\n };\n})();\n\nexport function getTheme(dimens: ThemeParams['dimens']): Theme {\n const baseColors = {\n primary: getColorByToken(OBSERVABLE_TOKENS.PRIMARY),\n bg: 'transparent',\n ringBg: getColorByToken(OBSERVABLE_TOKENS.RING_BG_INITIAL),\n hover: {\n inner: getColorByToken(OBSERVABLE_TOKENS.HOVER_INNER),\n outer: getColorByToken(OBSERVABLE_TOKENS.HOVER_OUTER),\n },\n };\n\n return {\n [THEME_STATE.INITIAL]: {\n colors: {\n ...baseColors,\n accent: getColorByToken(OBSERVABLE_TOKENS.ACCENT_INITIAL),\n selectedRingBg: getColorByToken(OBSERVABLE_TOKENS.SELECTED_RING_BG_INITIAL),\n },\n dimens,\n },\n [THEME_STATE.SUCCESS]: {\n colors: {\n ...baseColors,\n accent: getColorByToken(OBSERVABLE_TOKENS.ACCENT_SUCCESS),\n selectedRingBg: getColorByToken(OBSERVABLE_TOKENS.SELECTED_RING_BG_SUCCESS),\n },\n dimens,\n },\n [THEME_STATE.FAILURE]: {\n colors: {\n ...baseColors,\n accent: getColorByToken(OBSERVABLE_TOKENS.ACCENT_FAILURE),\n selectedRingBg: getColorByToken(OBSERVABLE_TOKENS.SELECTED_RING_BG_FAILURE),\n },\n dimens,\n },\n };\n}\n\nexport function getPatternLockTestIds(dataTestId: string) {\n return {\n patternLock: dataTestId,\n forgotCodeBtn: getDataTestId(dataTestId, 'forgot-code-btn'),\n };\n}\n"],"names":["OBSERVABLE_TOKENS","THEME_STATE","__assign","getDataTestId"],"mappings":";;;;;;;;SAKgB,uBAAuB,GAAA;IACnC,OAAO,QAAQ,CAAC,IAAI;AACxB;AAEM,SAAU,eAAe,CAAC,KAAa,EAAA;IACzC,OAAO,gBAAgB,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC;AAC7E;AAEO,IAAM,QAAQ,GAAG,CAAC,YAAA;AACrB,IAAA,IAAM,YAAY,GAAG;AACjB,QAAA,SAAS,EAAE,CAAC;AACZ,QAAA,QAAQ,EAAE,CAAC;AACX,QAAA,QAAQ,EAAE,EAAE;KACf;AAED,IAAA,IAAI,UAAkF;IAEtF,OAAO,YAAA;AACH,QAAA,IAAI,UAAU,EAAE;AACZ,YAAA,OAAO,UAAU;AACpB;AAED,QAAA,UAAU,GAAG;AACT,YAAA,YAAY,oCAAO,YAAY,CAAA,EAAA,EAAE,UAAU,EAAE,EAAE,EAAE,CAAA;AACjD,YAAA,KAAK,EAAE,GAAG;AACV,YAAA,MAAM,EAAE,GAAG;SACd;AAED,QAAA,OAAO,UAAU;AACrB,KAAC;AACL,CAAC;AAEK,SAAU,QAAQ,CAAC,MAA6B,EAAA;;AAClD,IAAA,IAAM,UAAU,GAAG;AACf,QAAA,OAAO,EAAE,eAAe,CAACA,wBAAiB,CAAC,OAAO,CAAC;AACnD,QAAA,EAAE,EAAE,aAAa;AACjB,QAAA,MAAM,EAAE,eAAe,CAACA,wBAAiB,CAAC,eAAe,CAAC;AAC1D,QAAA,KAAK,EAAE;AACH,YAAA,KAAK,EAAE,eAAe,CAACA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es
|
package/desktop/package.json
DELETED
package/mobile/package.json
DELETED
package/moderncssm/vars.css
DELETED
|
File without changes
|
package/shared/package.json
DELETED
package/src/desktop/package.json
DELETED
package/src/mobile/package.json
DELETED
package/src/shared/package.json
DELETED