@alfalab/core-components-pattern-lock 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Component.js +11 -13
- package/consts.js +0 -2
- package/cssm/Component.js +11 -13
- package/cssm/consts.js +0 -2
- package/cssm/index.js +4 -6
- package/cssm/{utils-455c7792.d.ts → utils-5745f540.d.ts} +0 -0
- package/cssm/{utils-455c7792.js → utils-5745f540.js} +0 -0
- package/cssm/utils.js +1 -3
- package/esm/Component.js +3 -3
- package/esm/index.css +5 -5
- package/esm/index.js +3 -3
- package/esm/{utils-0cf042c3.d.ts → utils-addea6bf.d.ts} +0 -0
- package/esm/{utils-0cf042c3.js → utils-addea6bf.js} +0 -0
- package/esm/utils.js +1 -1
- package/index.css +5 -5
- package/index.js +4 -6
- package/modern/Component.js +2 -2
- package/modern/index.css +5 -5
- package/modern/index.js +2 -2
- package/package.json +2 -2
- package/{utils-e7492ab3.d.ts → utils-b2ef848f.d.ts} +0 -0
- package/{utils-e7492ab3.js → utils-b2ef848f.js} +0 -0
- package/utils.js +1 -3
package/Component.js
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var utils = require('./utils-e7492ab3.js');
|
|
3
|
+
var utils = require('./utils-b2ef848f.js');
|
|
6
4
|
var React = require('react');
|
|
7
5
|
var reactCanvasPatternLock = require('react-canvas-pattern-lock');
|
|
8
6
|
var cn = require('classnames');
|
|
9
7
|
var coreComponentsGap = require('@alfalab/core-components-gap');
|
|
10
8
|
var consts = require('./consts.js');
|
|
11
9
|
|
|
12
|
-
function
|
|
10
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
13
11
|
|
|
14
|
-
var React__default = /*#__PURE__*/
|
|
15
|
-
var cn__default = /*#__PURE__*/
|
|
12
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
13
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
16
14
|
|
|
17
|
-
var styles = {"component":"pattern-
|
|
15
|
+
var styles = {"component":"pattern-lock__component_1b6u2","hidden":"pattern-lock__hidden_1b6u2","error":"pattern-lock__error_1b6u2"};
|
|
18
16
|
require('./index.css')
|
|
19
17
|
|
|
20
18
|
var PatternLock = React.forwardRef(function (_a, ref) {
|
|
@@ -51,12 +49,12 @@ var PatternLock = React.forwardRef(function (_a, ref) {
|
|
|
51
49
|
return function () { return styleObserver === null || styleObserver === void 0 ? void 0 : styleObserver.disconnect(); };
|
|
52
50
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
53
51
|
}, [observeTokens]);
|
|
54
|
-
return (React__default
|
|
55
|
-
React__default
|
|
56
|
-
React__default
|
|
57
|
-
React__default
|
|
58
|
-
React__default
|
|
59
|
-
React__default
|
|
52
|
+
return (React__default.default.createElement("div", { className: cn__default.default(styles.component, className, (_b = {}, _b[styles.hidden] = !params, _b)), "data-test-id": dataTestId },
|
|
53
|
+
React__default.default.createElement(coreComponentsGap.Gap, { size: 'm' }),
|
|
54
|
+
React__default.default.createElement(coreComponentsGap.Gap, { size: 's' }),
|
|
55
|
+
React__default.default.createElement("div", { className: styles.error }, error),
|
|
56
|
+
React__default.default.createElement(coreComponentsGap.Gap, { size: 'xl' }),
|
|
57
|
+
React__default.default.createElement(reactCanvasPatternLock.ReactCanvasPatternLock, utils.__assign({}, restProps, params, { ref: ref, rows: 3, cols: 3, justifyNodes: justifyNodes }))));
|
|
60
58
|
});
|
|
61
59
|
|
|
62
60
|
exports.PatternLock = PatternLock;
|
package/consts.js
CHANGED
package/cssm/Component.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var utils = require('./utils-455c7792.js');
|
|
3
|
+
var utils = require('./utils-5745f540.js');
|
|
6
4
|
var React = require('react');
|
|
7
5
|
var reactCanvasPatternLock = require('react-canvas-pattern-lock');
|
|
8
6
|
var cn = require('classnames');
|
|
@@ -10,11 +8,11 @@ var coreComponentsGap = require('@alfalab/core-components-gap/cssm');
|
|
|
10
8
|
var consts = require('./consts.js');
|
|
11
9
|
var styles = require('./index.module.css');
|
|
12
10
|
|
|
13
|
-
function
|
|
11
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
14
12
|
|
|
15
|
-
var React__default = /*#__PURE__*/
|
|
16
|
-
var cn__default = /*#__PURE__*/
|
|
17
|
-
var styles__default = /*#__PURE__*/
|
|
13
|
+
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
|
+
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
15
|
+
var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
18
16
|
|
|
19
17
|
var PatternLock = React.forwardRef(function (_a, ref) {
|
|
20
18
|
var _b;
|
|
@@ -50,12 +48,12 @@ var PatternLock = React.forwardRef(function (_a, ref) {
|
|
|
50
48
|
return function () { return styleObserver === null || styleObserver === void 0 ? void 0 : styleObserver.disconnect(); };
|
|
51
49
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
52
50
|
}, [observeTokens]);
|
|
53
|
-
return (React__default
|
|
54
|
-
React__default
|
|
55
|
-
React__default
|
|
56
|
-
React__default
|
|
57
|
-
React__default
|
|
58
|
-
React__default
|
|
51
|
+
return (React__default.default.createElement("div", { className: cn__default.default(styles__default.default.component, className, (_b = {}, _b[styles__default.default.hidden] = !params, _b)), "data-test-id": dataTestId },
|
|
52
|
+
React__default.default.createElement(coreComponentsGap.Gap, { size: 'm' }),
|
|
53
|
+
React__default.default.createElement(coreComponentsGap.Gap, { size: 's' }),
|
|
54
|
+
React__default.default.createElement("div", { className: styles__default.default.error }, error),
|
|
55
|
+
React__default.default.createElement(coreComponentsGap.Gap, { size: 'xl' }),
|
|
56
|
+
React__default.default.createElement(reactCanvasPatternLock.ReactCanvasPatternLock, utils.__assign({}, restProps, params, { ref: ref, rows: 3, cols: 3, justifyNodes: justifyNodes }))));
|
|
59
57
|
});
|
|
60
58
|
|
|
61
59
|
exports.PatternLock = PatternLock;
|
package/cssm/consts.js
CHANGED
package/cssm/index.js
CHANGED
|
@@ -1,17 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
require('./utils-
|
|
3
|
+
var Component = require('./Component.js');
|
|
4
|
+
var consts = require('./consts.js');
|
|
5
|
+
require('./utils-5745f540.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('react-canvas-pattern-lock');
|
|
8
8
|
require('classnames');
|
|
9
9
|
require('@alfalab/core-components-gap/cssm');
|
|
10
|
-
var consts = require('./consts.js');
|
|
11
10
|
require('./index.module.css');
|
|
12
|
-
var Component = require('./Component.js');
|
|
13
11
|
|
|
14
12
|
|
|
15
13
|
|
|
16
|
-
exports.THEME_STATE = consts.THEME_STATE;
|
|
17
14
|
exports.PatternLock = Component.PatternLock;
|
|
15
|
+
exports.THEME_STATE = consts.THEME_STATE;
|
|
File without changes
|
|
File without changes
|
package/cssm/utils.js
CHANGED
package/esm/Component.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { _ as __rest, g as getSizes, a as getTheme, b as getColorByToken, c as __assign, d as getDefaultObserveTarget } from './utils-
|
|
1
|
+
import { _ as __rest, g as getSizes, a as getTheme, b as getColorByToken, c as __assign, d as getDefaultObserveTarget } from './utils-addea6bf.js';
|
|
2
2
|
import React, { forwardRef, useState, useEffect } from 'react';
|
|
3
3
|
import { ReactCanvasPatternLock } from 'react-canvas-pattern-lock';
|
|
4
4
|
import cn from 'classnames';
|
|
5
5
|
import { Gap } from '@alfalab/core-components-gap/esm';
|
|
6
|
-
import { THEME_STATE,
|
|
6
|
+
import { THEME_STATE, OBSERVE_OPTIONS, OBSERVABLE_TOKENS } from './consts.js';
|
|
7
7
|
|
|
8
|
-
var styles = {"component":"pattern-
|
|
8
|
+
var styles = {"component":"pattern-lock__component_1b6u2","hidden":"pattern-lock__hidden_1b6u2","error":"pattern-lock__error_1b6u2"};
|
|
9
9
|
require('./index.css')
|
|
10
10
|
|
|
11
11
|
var PatternLock = forwardRef(function (_a, ref) {
|
package/esm/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: osr8s */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-text-negative: #d91d0b;
|
|
4
4
|
}
|
|
@@ -18,18 +18,18 @@
|
|
|
18
18
|
:root {
|
|
19
19
|
--pattern-lock-max-width: 500px;
|
|
20
20
|
}
|
|
21
|
-
.pattern-
|
|
21
|
+
.pattern-lock__component_1b6u2 {
|
|
22
22
|
max-width: var(--pattern-lock-max-width);
|
|
23
23
|
margin: var(--gap-xs) 0 var(--gap-xl) 0
|
|
24
24
|
}
|
|
25
|
-
.pattern-
|
|
25
|
+
.pattern-lock__component_1b6u2 canvas {
|
|
26
26
|
display: block;
|
|
27
27
|
margin: 0 auto;
|
|
28
28
|
}
|
|
29
|
-
.pattern-
|
|
29
|
+
.pattern-lock__hidden_1b6u2 {
|
|
30
30
|
visibility: hidden;
|
|
31
31
|
}
|
|
32
|
-
.pattern-
|
|
32
|
+
.pattern-lock__error_1b6u2 {
|
|
33
33
|
font-size: 16px;
|
|
34
34
|
line-height: 24px;
|
|
35
35
|
font-weight: 400;
|
package/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
export { PatternLock } from './Component.js';
|
|
2
|
+
export { THEME_STATE } from './consts.js';
|
|
3
|
+
import './utils-addea6bf.js';
|
|
2
4
|
import 'react';
|
|
3
5
|
import 'react-canvas-pattern-lock';
|
|
4
6
|
import 'classnames';
|
|
5
7
|
import '@alfalab/core-components-gap/esm';
|
|
6
|
-
export { THEME_STATE } from './consts.js';
|
|
7
|
-
export { PatternLock } from './Component.js';
|
|
File without changes
|
|
File without changes
|
package/esm/utils.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { b as getColorByToken, d as getDefaultObserveTarget, g as getSizes, a as getTheme } from './utils-
|
|
1
|
+
export { b as getColorByToken, d as getDefaultObserveTarget, g as getSizes, a as getTheme } from './utils-addea6bf.js';
|
|
2
2
|
import './consts.js';
|
package/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: osr8s */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-text-negative: #d91d0b;
|
|
4
4
|
}
|
|
@@ -18,18 +18,18 @@
|
|
|
18
18
|
:root {
|
|
19
19
|
--pattern-lock-max-width: 500px;
|
|
20
20
|
}
|
|
21
|
-
.pattern-
|
|
21
|
+
.pattern-lock__component_1b6u2 {
|
|
22
22
|
max-width: var(--pattern-lock-max-width);
|
|
23
23
|
margin: var(--gap-xs) 0 var(--gap-xl) 0
|
|
24
24
|
}
|
|
25
|
-
.pattern-
|
|
25
|
+
.pattern-lock__component_1b6u2 canvas {
|
|
26
26
|
display: block;
|
|
27
27
|
margin: 0 auto;
|
|
28
28
|
}
|
|
29
|
-
.pattern-
|
|
29
|
+
.pattern-lock__hidden_1b6u2 {
|
|
30
30
|
visibility: hidden;
|
|
31
31
|
}
|
|
32
|
-
.pattern-
|
|
32
|
+
.pattern-lock__error_1b6u2 {
|
|
33
33
|
font-size: 16px;
|
|
34
34
|
line-height: 24px;
|
|
35
35
|
font-weight: 400;
|
package/index.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
require('./utils-
|
|
3
|
+
var Component = require('./Component.js');
|
|
4
|
+
var consts = require('./consts.js');
|
|
5
|
+
require('./utils-b2ef848f.js');
|
|
6
6
|
require('react');
|
|
7
7
|
require('react-canvas-pattern-lock');
|
|
8
8
|
require('classnames');
|
|
9
9
|
require('@alfalab/core-components-gap');
|
|
10
|
-
var consts = require('./consts.js');
|
|
11
|
-
var Component = require('./Component.js');
|
|
12
10
|
|
|
13
11
|
|
|
14
12
|
|
|
15
|
-
exports.THEME_STATE = consts.THEME_STATE;
|
|
16
13
|
exports.PatternLock = Component.PatternLock;
|
|
14
|
+
exports.THEME_STATE = consts.THEME_STATE;
|
package/modern/Component.js
CHANGED
|
@@ -2,10 +2,10 @@ import React, { forwardRef, useState, useEffect } from 'react';
|
|
|
2
2
|
import { ReactCanvasPatternLock } from 'react-canvas-pattern-lock';
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
import { Gap } from '@alfalab/core-components-gap/modern';
|
|
5
|
-
import { THEME_STATE,
|
|
5
|
+
import { THEME_STATE, OBSERVE_OPTIONS, OBSERVABLE_TOKENS } from './consts.js';
|
|
6
6
|
import { getSizes, getTheme, getColorByToken, getDefaultObserveTarget } from './utils.js';
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
const styles = {"component":"pattern-lock__component_1b6u2","hidden":"pattern-lock__hidden_1b6u2","error":"pattern-lock__error_1b6u2"};
|
|
9
9
|
require('./index.css')
|
|
10
10
|
|
|
11
11
|
const PatternLock = forwardRef(({ observeTokens = false, observerParams = {}, justifyNodes = 'space-between', className, error, dataTestId, ...restProps }, ref) => {
|
package/modern/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: osr8s */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-text-negative: #d91d0b;
|
|
4
4
|
}
|
|
@@ -18,18 +18,18 @@
|
|
|
18
18
|
:root {
|
|
19
19
|
--pattern-lock-max-width: 500px;
|
|
20
20
|
}
|
|
21
|
-
.pattern-
|
|
21
|
+
.pattern-lock__component_1b6u2 {
|
|
22
22
|
max-width: var(--pattern-lock-max-width);
|
|
23
23
|
margin: var(--gap-xs) 0 var(--gap-xl) 0
|
|
24
24
|
}
|
|
25
|
-
.pattern-
|
|
25
|
+
.pattern-lock__component_1b6u2 canvas {
|
|
26
26
|
display: block;
|
|
27
27
|
margin: 0 auto;
|
|
28
28
|
}
|
|
29
|
-
.pattern-
|
|
29
|
+
.pattern-lock__hidden_1b6u2 {
|
|
30
30
|
visibility: hidden;
|
|
31
31
|
}
|
|
32
|
-
.pattern-
|
|
32
|
+
.pattern-lock__error_1b6u2 {
|
|
33
33
|
font-size: 16px;
|
|
34
34
|
line-height: 24px;
|
|
35
35
|
font-weight: 400;
|
package/modern/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
+
export { PatternLock } from './Component.js';
|
|
2
|
+
export { THEME_STATE } from './consts.js';
|
|
1
3
|
import 'react';
|
|
2
4
|
import 'react-canvas-pattern-lock';
|
|
3
5
|
import 'classnames';
|
|
4
6
|
import '@alfalab/core-components-gap/modern';
|
|
5
|
-
export { THEME_STATE } from './consts.js';
|
|
6
7
|
import './utils.js';
|
|
7
|
-
export { PatternLock } from './Component.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-pattern-lock",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Pattern lock",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"react-dom": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@alfalab/core-components-gap": "^1.0.
|
|
18
|
+
"@alfalab/core-components-gap": "^1.0.1",
|
|
19
19
|
"react-canvas-pattern-lock": "^1.0.0",
|
|
20
20
|
"react-merge-refs": "^1.1.0",
|
|
21
21
|
"classnames": "^2.3.1"
|
|
File without changes
|
|
File without changes
|