@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.
Files changed (237) hide show
  1. package/Component.responsive.d.ts +3 -5
  2. package/Component.responsive.js +4 -3
  3. package/Component.responsive.js.map +1 -0
  4. package/components/base-pattern-lock/Component.d.ts +3 -5
  5. package/components/base-pattern-lock/Component.js +9 -10
  6. package/components/base-pattern-lock/Component.js.map +1 -0
  7. package/components/base-pattern-lock/index.css +10 -31
  8. package/components/base-pattern-lock/index.d.ts +1 -1
  9. package/components/base-pattern-lock/index.js +3 -2
  10. package/components/base-pattern-lock/index.js.map +1 -0
  11. package/components/base-pattern-lock/index.module.css.js +8 -0
  12. package/components/base-pattern-lock/index.module.css.js.map +1 -0
  13. package/consts.d.ts +6 -7
  14. package/consts.js +1 -0
  15. package/consts.js.map +1 -0
  16. package/cssm/Component.responsive.d.ts +3 -5
  17. package/cssm/Component.responsive.js +6 -5
  18. package/cssm/Component.responsive.js.map +1 -0
  19. package/cssm/components/base-pattern-lock/Component.d.ts +3 -5
  20. package/cssm/components/base-pattern-lock/Component.js +3 -2
  21. package/cssm/components/base-pattern-lock/Component.js.map +1 -0
  22. package/cssm/components/base-pattern-lock/index.d.ts +1 -1
  23. package/cssm/components/base-pattern-lock/index.js +3 -2
  24. package/cssm/components/base-pattern-lock/index.js.map +1 -0
  25. package/cssm/components/base-pattern-lock/index.module.css +3 -23
  26. package/cssm/consts.d.ts +6 -7
  27. package/cssm/consts.js +1 -0
  28. package/cssm/consts.js.map +1 -0
  29. package/cssm/desktop/Component.desktop.d.ts +3 -5
  30. package/cssm/desktop/Component.desktop.js +3 -2
  31. package/cssm/desktop/Component.desktop.js.map +1 -0
  32. package/cssm/desktop/desktop.module.css +2 -23
  33. package/cssm/desktop/index.d.ts +2 -2
  34. package/cssm/desktop/index.js +3 -2
  35. package/cssm/desktop/index.js.map +1 -0
  36. package/cssm/hooks/use-pattern-lock-cleanup.d.ts +2 -4
  37. package/cssm/hooks/use-pattern-lock-cleanup.js +1 -0
  38. package/cssm/hooks/use-pattern-lock-cleanup.js.map +1 -0
  39. package/cssm/index.d.ts +3 -3
  40. package/cssm/index.js +1 -0
  41. package/cssm/index.js.map +1 -0
  42. package/cssm/mobile/Component.mobile.d.ts +3 -5
  43. package/cssm/mobile/Component.mobile.js +3 -2
  44. package/cssm/mobile/Component.mobile.js.map +1 -0
  45. package/cssm/mobile/index.d.ts +2 -2
  46. package/cssm/mobile/index.js +3 -2
  47. package/cssm/mobile/index.js.map +1 -0
  48. package/cssm/mobile/mobile.module.css +2 -23
  49. package/cssm/shared/index.d.ts +2 -2
  50. package/cssm/shared/index.js +3 -2
  51. package/cssm/shared/index.js.map +1 -0
  52. package/cssm/typings.d.ts +6 -6
  53. package/cssm/typings.js +1 -0
  54. package/cssm/typings.js.map +1 -0
  55. package/cssm/utils.d.ts +5 -6
  56. package/cssm/utils.js +3 -2
  57. package/cssm/utils.js.map +1 -0
  58. package/desktop/Component.desktop.d.ts +3 -5
  59. package/desktop/Component.desktop.js +4 -5
  60. package/desktop/Component.desktop.js.map +1 -0
  61. package/desktop/desktop.css +5 -27
  62. package/desktop/desktop.module.css.js +8 -0
  63. package/desktop/desktop.module.css.js.map +1 -0
  64. package/desktop/index.d.ts +2 -2
  65. package/desktop/index.js +3 -2
  66. package/desktop/index.js.map +1 -0
  67. package/esm/Component.responsive.d.ts +3 -5
  68. package/esm/Component.responsive.js +1 -0
  69. package/esm/Component.responsive.js.map +1 -0
  70. package/esm/components/base-pattern-lock/Component.d.ts +3 -5
  71. package/esm/components/base-pattern-lock/Component.js +3 -4
  72. package/esm/components/base-pattern-lock/Component.js.map +1 -0
  73. package/esm/components/base-pattern-lock/index.css +10 -31
  74. package/esm/components/base-pattern-lock/index.d.ts +1 -1
  75. package/esm/components/base-pattern-lock/index.js +1 -0
  76. package/esm/components/base-pattern-lock/index.js.map +1 -0
  77. package/esm/components/base-pattern-lock/index.module.css.js +6 -0
  78. package/esm/components/base-pattern-lock/index.module.css.js.map +1 -0
  79. package/esm/consts.d.ts +6 -7
  80. package/esm/consts.js +1 -0
  81. package/esm/consts.js.map +1 -0
  82. package/esm/desktop/Component.desktop.d.ts +3 -5
  83. package/esm/desktop/Component.desktop.js +2 -3
  84. package/esm/desktop/Component.desktop.js.map +1 -0
  85. package/esm/desktop/desktop.css +5 -27
  86. package/esm/desktop/desktop.module.css.js +6 -0
  87. package/esm/desktop/desktop.module.css.js.map +1 -0
  88. package/esm/desktop/index.d.ts +2 -2
  89. package/esm/desktop/index.js +1 -0
  90. package/esm/desktop/index.js.map +1 -0
  91. package/esm/hooks/use-pattern-lock-cleanup.d.ts +2 -4
  92. package/esm/hooks/use-pattern-lock-cleanup.js +1 -0
  93. package/esm/hooks/use-pattern-lock-cleanup.js.map +1 -0
  94. package/esm/index.d.ts +3 -3
  95. package/esm/index.js +1 -0
  96. package/esm/index.js.map +1 -0
  97. package/esm/mobile/Component.mobile.d.ts +3 -5
  98. package/esm/mobile/Component.mobile.js +2 -3
  99. package/esm/mobile/Component.mobile.js.map +1 -0
  100. package/esm/mobile/index.d.ts +2 -2
  101. package/esm/mobile/index.js +1 -0
  102. package/esm/mobile/index.js.map +1 -0
  103. package/esm/mobile/mobile.css +4 -26
  104. package/esm/mobile/mobile.module.css.js +6 -0
  105. package/esm/mobile/mobile.module.css.js.map +1 -0
  106. package/esm/shared/index.d.ts +2 -2
  107. package/esm/shared/index.js +1 -0
  108. package/esm/shared/index.js.map +1 -0
  109. package/esm/typings.d.ts +6 -6
  110. package/esm/typings.js +1 -0
  111. package/esm/typings.js.map +1 -0
  112. package/esm/utils.d.ts +5 -6
  113. package/esm/utils.js +2 -1
  114. package/esm/utils.js.map +1 -0
  115. package/hooks/use-pattern-lock-cleanup.d.ts +2 -4
  116. package/hooks/use-pattern-lock-cleanup.js +1 -0
  117. package/hooks/use-pattern-lock-cleanup.js.map +1 -0
  118. package/index.d.ts +3 -3
  119. package/index.js +1 -0
  120. package/index.js.map +1 -0
  121. package/mobile/Component.mobile.d.ts +3 -5
  122. package/mobile/Component.mobile.js +4 -5
  123. package/mobile/Component.mobile.js.map +1 -0
  124. package/mobile/index.d.ts +2 -2
  125. package/mobile/index.js +3 -2
  126. package/mobile/index.js.map +1 -0
  127. package/mobile/mobile.css +4 -26
  128. package/mobile/mobile.module.css.js +8 -0
  129. package/mobile/mobile.module.css.js.map +1 -0
  130. package/modern/Component.responsive.d.ts +3 -5
  131. package/modern/Component.responsive.js +1 -0
  132. package/modern/Component.responsive.js.map +1 -0
  133. package/modern/components/base-pattern-lock/Component.d.ts +3 -5
  134. package/modern/components/base-pattern-lock/Component.js +4 -5
  135. package/modern/components/base-pattern-lock/Component.js.map +1 -0
  136. package/modern/components/base-pattern-lock/index.css +10 -31
  137. package/modern/components/base-pattern-lock/index.d.ts +1 -1
  138. package/modern/components/base-pattern-lock/index.js +1 -0
  139. package/modern/components/base-pattern-lock/index.js.map +1 -0
  140. package/modern/components/base-pattern-lock/index.module.css.js +6 -0
  141. package/modern/components/base-pattern-lock/index.module.css.js.map +1 -0
  142. package/modern/consts.d.ts +6 -7
  143. package/modern/consts.js +1 -0
  144. package/modern/consts.js.map +1 -0
  145. package/modern/desktop/Component.desktop.d.ts +3 -5
  146. package/modern/desktop/Component.desktop.js +2 -3
  147. package/modern/desktop/Component.desktop.js.map +1 -0
  148. package/modern/desktop/desktop.css +5 -27
  149. package/modern/desktop/desktop.module.css.js +6 -0
  150. package/modern/desktop/desktop.module.css.js.map +1 -0
  151. package/modern/desktop/index.d.ts +2 -2
  152. package/modern/desktop/index.js +1 -0
  153. package/modern/desktop/index.js.map +1 -0
  154. package/modern/hooks/use-pattern-lock-cleanup.d.ts +2 -4
  155. package/modern/hooks/use-pattern-lock-cleanup.js +1 -0
  156. package/modern/hooks/use-pattern-lock-cleanup.js.map +1 -0
  157. package/modern/index.d.ts +3 -3
  158. package/modern/index.js +1 -0
  159. package/modern/index.js.map +1 -0
  160. package/modern/mobile/Component.mobile.d.ts +3 -5
  161. package/modern/mobile/Component.mobile.js +2 -3
  162. package/modern/mobile/Component.mobile.js.map +1 -0
  163. package/modern/mobile/index.d.ts +2 -2
  164. package/modern/mobile/index.js +1 -0
  165. package/modern/mobile/index.js.map +1 -0
  166. package/modern/mobile/mobile.css +4 -26
  167. package/modern/mobile/mobile.module.css.js +6 -0
  168. package/modern/mobile/mobile.module.css.js.map +1 -0
  169. package/modern/shared/index.d.ts +2 -2
  170. package/modern/shared/index.js +1 -0
  171. package/modern/shared/index.js.map +1 -0
  172. package/modern/typings.d.ts +6 -6
  173. package/modern/typings.js +1 -0
  174. package/modern/typings.js.map +1 -0
  175. package/modern/utils.d.ts +5 -6
  176. package/modern/utils.js +2 -1
  177. package/modern/utils.js.map +1 -0
  178. package/moderncssm/Component.responsive.d.ts +3 -5
  179. package/moderncssm/Component.responsive.js +1 -0
  180. package/moderncssm/Component.responsive.js.map +1 -0
  181. package/moderncssm/components/base-pattern-lock/Component.d.ts +3 -5
  182. package/moderncssm/components/base-pattern-lock/Component.js +3 -2
  183. package/moderncssm/components/base-pattern-lock/Component.js.map +1 -0
  184. package/moderncssm/components/base-pattern-lock/index.d.ts +1 -1
  185. package/moderncssm/components/base-pattern-lock/index.js +1 -0
  186. package/moderncssm/components/base-pattern-lock/index.js.map +1 -0
  187. package/moderncssm/components/base-pattern-lock/index.module.css +0 -1
  188. package/moderncssm/consts.d.ts +6 -7
  189. package/moderncssm/consts.js +1 -0
  190. package/moderncssm/consts.js.map +1 -0
  191. package/moderncssm/desktop/Component.desktop.d.ts +3 -5
  192. package/moderncssm/desktop/Component.desktop.js +1 -0
  193. package/moderncssm/desktop/Component.desktop.js.map +1 -0
  194. package/moderncssm/desktop/desktop.module.css +0 -1
  195. package/moderncssm/desktop/index.d.ts +2 -2
  196. package/moderncssm/desktop/index.js +1 -0
  197. package/moderncssm/desktop/index.js.map +1 -0
  198. package/moderncssm/hooks/use-pattern-lock-cleanup.d.ts +2 -4
  199. package/moderncssm/hooks/use-pattern-lock-cleanup.js +1 -0
  200. package/moderncssm/hooks/use-pattern-lock-cleanup.js.map +1 -0
  201. package/moderncssm/index.d.ts +3 -3
  202. package/moderncssm/index.js +1 -0
  203. package/moderncssm/index.js.map +1 -0
  204. package/moderncssm/mobile/Component.mobile.d.ts +3 -5
  205. package/moderncssm/mobile/Component.mobile.js +1 -0
  206. package/moderncssm/mobile/Component.mobile.js.map +1 -0
  207. package/moderncssm/mobile/index.d.ts +2 -2
  208. package/moderncssm/mobile/index.js +1 -0
  209. package/moderncssm/mobile/index.js.map +1 -0
  210. package/moderncssm/mobile/mobile.module.css +0 -1
  211. package/moderncssm/shared/index.d.ts +2 -2
  212. package/moderncssm/shared/index.js +1 -0
  213. package/moderncssm/shared/index.js.map +1 -0
  214. package/moderncssm/typings.d.ts +6 -6
  215. package/moderncssm/typings.js +1 -0
  216. package/moderncssm/typings.js.map +1 -0
  217. package/moderncssm/utils.d.ts +5 -6
  218. package/moderncssm/utils.js +2 -1
  219. package/moderncssm/utils.js.map +1 -0
  220. package/package.json +6 -6
  221. package/shared/index.d.ts +2 -2
  222. package/shared/index.js +3 -2
  223. package/shared/index.js.map +1 -0
  224. package/typings.d.ts +6 -6
  225. package/typings.js +1 -0
  226. package/typings.js.map +1 -0
  227. package/utils.d.ts +5 -6
  228. package/utils.js +1 -0
  229. package/utils.js.map +1 -0
  230. package/cssm/vars.css +0 -0
  231. package/desktop/package.json +0 -3
  232. package/mobile/package.json +0 -3
  233. package/moderncssm/vars.css +0 -0
  234. package/shared/package.json +0 -3
  235. package/src/desktop/package.json +0 -3
  236. package/src/mobile/package.json +0 -3
  237. package/src/shared/package.json +0 -3
@@ -1,3 +1,3 @@
1
- export type { PatternLockProps } from "./typings";
2
- export * from "./Component.responsive";
3
- export { THEME_STATE } from "./consts";
1
+ export type { PatternLockProps } from './typings';
2
+ export * from './Component.responsive';
3
+ export { THEME_STATE } from './consts';
@@ -1,2 +1,3 @@
1
1
  export { PatternLock } from './Component.responsive.js';
2
2
  export { THEME_STATE } from './consts.js';
3
+ //# sourceMappingURL=index.js.map
@@ -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 "../typings";
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>>;
@@ -6,3 +6,4 @@ const PatternLockMobile = forwardRef((restProps, ref) => React.createElement(Bas
6
6
  PatternLockMobile.displayName = 'PatternLockMobile';
7
7
 
8
8
  export { PatternLockMobile };
9
+ //# sourceMappingURL=Component.mobile.js.map
@@ -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 "./Component.mobile";
2
- export type { CommonPatternLockProps as PatternLockMobileProps } from "../typings";
1
+ export { PatternLockMobile } from './Component.mobile';
2
+ export type { CommonPatternLockProps as PatternLockMobileProps } from '../typings';
@@ -1 +1,2 @@
1
1
  export { PatternLockMobile } from './Component.mobile.js';
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,4 +1,3 @@
1
- /* */
2
1
  :root {
3
2
  --pattern-lock-min-width: 304px;
4
3
  }
@@ -1,2 +1,2 @@
1
- export { getPatternLockTestIds } from "../utils";
2
- export { usePatternLockCleanup } from "../hooks/use-pattern-lock-cleanup";
1
+ export { getPatternLockTestIds } from '../utils';
2
+ export { usePatternLockCleanup } from '../hooks/use-pattern-lock-cleanup';
@@ -1,2 +1,3 @@
1
1
  export { getPatternLockTestIds } from '../utils.js';
2
2
  export { usePatternLockCleanup } from '../hooks/use-pattern-lock-cleanup.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -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 { CommonPatternLockProps, PrivatePatternLockProps, PatternLockProps, ObservableTokens };
96
+ export {};
@@ -1 +1,2 @@
1
1
 
2
+ //# sourceMappingURL=typings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typings.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -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 };
@@ -1,5 +1,5 @@
1
1
  import { getDataTestId } from '@alfalab/core-components-shared/moderncssm';
2
- import { OBSERVABLE_TOKENS, THEME_STATE } from './consts.js';
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,U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BAAiB,CAAC,wBAAwB,CAAC;AAC9E,aAAA;YACD,MAAM;AACT,SAAA;KACJ;AACL;AAEM,SAAU,qBAAqB,CAAC,UAAkB,EAAA;IACpD,OAAO;AACH,QAAA,WAAW,EAAE,UAAU;AACvB,QAAA,aAAa,EAAE,aAAa,CAAC,UAAU,EAAE,iBAAiB,CAAC;KAC9D;AACL;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alfalab/core-components-pattern-lock",
3
- "version": "2.5.13",
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": "^11.11.9",
20
- "@alfalab/core-components-shared": "^0.17.1",
21
- "@alfalab/core-components-mq": "^4.4.1",
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": "13.7.3",
27
- "varsVersion": "9.20.0"
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 "../utils";
2
- export { usePatternLockCleanup } from "../hooks/use-pattern-lock-cleanup";
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 hooks_usePatternLockCleanup = require('../hooks/use-pattern-lock-cleanup.js');
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 = hooks_usePatternLockCleanup.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 { CommonPatternLockProps, PrivatePatternLockProps, PatternLockProps, ObservableTokens };
96
+ export {};
package/typings.js CHANGED
@@ -1,2 +1,3 @@
1
1
  'use strict';
2
2
 
3
+ //# sourceMappingURL=typings.js.map
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
@@ -69,3 +69,4 @@ exports.getDefaultObserveTarget = getDefaultObserveTarget;
69
69
  exports.getPatternLockTestIds = getPatternLockTestIds;
70
70
  exports.getSizes = getSizes;
71
71
  exports.getTheme = getTheme;
72
+ //# sourceMappingURL=utils.js.map
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,wBAAiB,CAAC,WAAW,CAAC;AACrD,YAAA,KAAK,EAAE,eAAe,CAACA,wBAAiB,C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- {
2
- "module": "../esm/mobile/index.js"
3
- }
File without changes
@@ -1,3 +0,0 @@
1
- {
2
- "module": "../esm/shared/index.js"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "module": "../esm/desktop/index.js"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "module": "../esm/mobile/index.js"
3
- }
@@ -1,3 +0,0 @@
1
- {
2
- "module": "../esm/shared/index.js"
3
- }