@salutejs/plasma-new-hope 0.149.0-canary.1418.10940499394.0 → 0.149.0-canary.1418.10942866373.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Mask/Mask.js +2 -3
- package/cjs/components/Mask/Mask.js.map +1 -1
- package/emotion/cjs/components/Mask/Mask.js +2 -3
- package/emotion/es/components/Mask/Mask.js +2 -3
- package/es/components/Mask/Mask.js +2 -3
- package/es/components/Mask/Mask.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Mask/Mask.js +2 -3
- package/styled-components/es/components/Mask/Mask.js +2 -3
- package/types/components/Mask/Mask.d.ts.map +1 -1
@@ -26,6 +26,7 @@ var composeMask = function composeMask(InputComponent) {
|
|
26
26
|
var _ref$maskFormat = _ref.maskFormat,
|
27
27
|
maskFormat = _ref$maskFormat === void 0 ? defaultFormatChars : _ref$maskFormat,
|
28
28
|
rest = _rollupPluginBabelHelpers.objectWithoutProperties(_ref, _excluded);
|
29
|
+
// TODO: replace inside react-maskinput 'getReference' on 'forwardRef'
|
29
30
|
var _useState = React.useState(null),
|
30
31
|
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
31
32
|
ref = _useState2[0],
|
@@ -34,9 +35,7 @@ var composeMask = function composeMask(InputComponent) {
|
|
34
35
|
return ref;
|
35
36
|
}, [ref]);
|
36
37
|
return /*#__PURE__*/React.createElement(MaskedInput, _rollupPluginBabelHelpers.extends({
|
37
|
-
getReference:
|
38
|
-
return setRef(el);
|
39
|
-
},
|
38
|
+
getReference: setRef,
|
40
39
|
maskFormat: maskFormat
|
41
40
|
}, rest));
|
42
41
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Mask.js","sources":["../../../src/components/Mask/Mask.tsx"],"sourcesContent":["import React, { forwardRef, useImperativeHandle, useState } from 'react';\nimport type { FC } from 'react';\nimport maskInputCompose from '@salutejs/react-maskinput';\n\nimport type { CustomInputProps, MaskProps } from './Mask.types';\n\nconst defaultFormatChars = [\n {\n str: '0',\n regexp: /[0-9]/,\n },\n {\n str: '*',\n regexp: /./,\n },\n {\n str: 'a',\n regexp: /[a-zA-Z]/,\n },\n {\n str: 'я',\n regexp: /[а-яА-ЯёЁ]/,\n },\n];\n\nexport const composeMask = <T extends CustomInputProps>(InputComponent: FC<T>) => {\n const MaskedInput = maskInputCompose(InputComponent);\n\n return forwardRef<HTMLInputElement, T & MaskProps>(({ maskFormat = defaultFormatChars, ...rest }, outerRef) => {\n const [ref, setRef] = useState<HTMLInputElement | null>(null);\n\n useImperativeHandle(outerRef, () => ref as HTMLInputElement, [ref]);\n\n return <MaskedInput getReference={
|
1
|
+
{"version":3,"file":"Mask.js","sources":["../../../src/components/Mask/Mask.tsx"],"sourcesContent":["import React, { forwardRef, useImperativeHandle, useState } from 'react';\nimport type { FC } from 'react';\nimport maskInputCompose from '@salutejs/react-maskinput';\n\nimport type { CustomInputProps, MaskProps } from './Mask.types';\n\nconst defaultFormatChars = [\n {\n str: '0',\n regexp: /[0-9]/,\n },\n {\n str: '*',\n regexp: /./,\n },\n {\n str: 'a',\n regexp: /[a-zA-Z]/,\n },\n {\n str: 'я',\n regexp: /[а-яА-ЯёЁ]/,\n },\n];\n\nexport const composeMask = <T extends CustomInputProps>(InputComponent: FC<T>) => {\n const MaskedInput = maskInputCompose(InputComponent);\n\n return forwardRef<HTMLInputElement, T & MaskProps>(({ maskFormat = defaultFormatChars, ...rest }, outerRef) => {\n // TODO: replace inside react-maskinput 'getReference' on 'forwardRef'\n const [ref, setRef] = useState<HTMLInputElement | null>(null);\n\n useImperativeHandle(outerRef, () => ref as HTMLInputElement, [ref]);\n\n return <MaskedInput getReference={setRef} maskFormat={maskFormat} {...(rest as T)} />;\n });\n};\n"],"names":["defaultFormatChars","str","regexp","composeMask","InputComponent","MaskedInput","maskInputCompose","forwardRef","_ref","outerRef","_ref$maskFormat","maskFormat","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","ref","setRef","useImperativeHandle","React","createElement","_extends","get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,EAAEL,MAAO;AAACT,MAAAA,UAAU,EAAEA,UAAAA;KAAiBC,EAAAA,IAAI,CAAS,CAAC,CAAA;AACzF,GAAC,CAAC,CAAA;AACN;;;;"}
|
@@ -39,6 +39,7 @@ var composeMask = exports.composeMask = function composeMask(InputComponent) {
|
|
39
39
|
var _ref$maskFormat = _ref.maskFormat,
|
40
40
|
maskFormat = _ref$maskFormat === void 0 ? defaultFormatChars : _ref$maskFormat,
|
41
41
|
rest = _objectWithoutProperties(_ref, _excluded);
|
42
|
+
// TODO: replace inside react-maskinput 'getReference' on 'forwardRef'
|
42
43
|
var _useState = (0, _react.useState)(null),
|
43
44
|
_useState2 = _slicedToArray(_useState, 2),
|
44
45
|
ref = _useState2[0],
|
@@ -47,9 +48,7 @@ var composeMask = exports.composeMask = function composeMask(InputComponent) {
|
|
47
48
|
return ref;
|
48
49
|
}, [ref]);
|
49
50
|
return /*#__PURE__*/_react["default"].createElement(MaskedInput, _extends({
|
50
|
-
getReference:
|
51
|
-
return setRef(el);
|
52
|
-
},
|
51
|
+
getReference: setRef,
|
53
52
|
maskFormat: maskFormat
|
54
53
|
}, rest));
|
55
54
|
});
|
@@ -29,6 +29,7 @@ export var composeMask = function composeMask(InputComponent) {
|
|
29
29
|
var _ref$maskFormat = _ref.maskFormat,
|
30
30
|
maskFormat = _ref$maskFormat === void 0 ? defaultFormatChars : _ref$maskFormat,
|
31
31
|
rest = _objectWithoutProperties(_ref, _excluded);
|
32
|
+
// TODO: replace inside react-maskinput 'getReference' on 'forwardRef'
|
32
33
|
var _useState = useState(null),
|
33
34
|
_useState2 = _slicedToArray(_useState, 2),
|
34
35
|
ref = _useState2[0],
|
@@ -37,9 +38,7 @@ export var composeMask = function composeMask(InputComponent) {
|
|
37
38
|
return ref;
|
38
39
|
}, [ref]);
|
39
40
|
return /*#__PURE__*/React.createElement(MaskedInput, _extends({
|
40
|
-
getReference:
|
41
|
-
return setRef(el);
|
42
|
-
},
|
41
|
+
getReference: setRef,
|
43
42
|
maskFormat: maskFormat
|
44
43
|
}, rest));
|
45
44
|
});
|
@@ -22,6 +22,7 @@ var composeMask = function composeMask(InputComponent) {
|
|
22
22
|
var _ref$maskFormat = _ref.maskFormat,
|
23
23
|
maskFormat = _ref$maskFormat === void 0 ? defaultFormatChars : _ref$maskFormat,
|
24
24
|
rest = _objectWithoutProperties(_ref, _excluded);
|
25
|
+
// TODO: replace inside react-maskinput 'getReference' on 'forwardRef'
|
25
26
|
var _useState = useState(null),
|
26
27
|
_useState2 = _slicedToArray(_useState, 2),
|
27
28
|
ref = _useState2[0],
|
@@ -30,9 +31,7 @@ var composeMask = function composeMask(InputComponent) {
|
|
30
31
|
return ref;
|
31
32
|
}, [ref]);
|
32
33
|
return /*#__PURE__*/React.createElement(MaskedInput, _extends({
|
33
|
-
getReference:
|
34
|
-
return setRef(el);
|
35
|
-
},
|
34
|
+
getReference: setRef,
|
36
35
|
maskFormat: maskFormat
|
37
36
|
}, rest));
|
38
37
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Mask.js","sources":["../../../src/components/Mask/Mask.tsx"],"sourcesContent":["import React, { forwardRef, useImperativeHandle, useState } from 'react';\nimport type { FC } from 'react';\nimport maskInputCompose from '@salutejs/react-maskinput';\n\nimport type { CustomInputProps, MaskProps } from './Mask.types';\n\nconst defaultFormatChars = [\n {\n str: '0',\n regexp: /[0-9]/,\n },\n {\n str: '*',\n regexp: /./,\n },\n {\n str: 'a',\n regexp: /[a-zA-Z]/,\n },\n {\n str: 'я',\n regexp: /[а-яА-ЯёЁ]/,\n },\n];\n\nexport const composeMask = <T extends CustomInputProps>(InputComponent: FC<T>) => {\n const MaskedInput = maskInputCompose(InputComponent);\n\n return forwardRef<HTMLInputElement, T & MaskProps>(({ maskFormat = defaultFormatChars, ...rest }, outerRef) => {\n const [ref, setRef] = useState<HTMLInputElement | null>(null);\n\n useImperativeHandle(outerRef, () => ref as HTMLInputElement, [ref]);\n\n return <MaskedInput getReference={
|
1
|
+
{"version":3,"file":"Mask.js","sources":["../../../src/components/Mask/Mask.tsx"],"sourcesContent":["import React, { forwardRef, useImperativeHandle, useState } from 'react';\nimport type { FC } from 'react';\nimport maskInputCompose from '@salutejs/react-maskinput';\n\nimport type { CustomInputProps, MaskProps } from './Mask.types';\n\nconst defaultFormatChars = [\n {\n str: '0',\n regexp: /[0-9]/,\n },\n {\n str: '*',\n regexp: /./,\n },\n {\n str: 'a',\n regexp: /[a-zA-Z]/,\n },\n {\n str: 'я',\n regexp: /[а-яА-ЯёЁ]/,\n },\n];\n\nexport const composeMask = <T extends CustomInputProps>(InputComponent: FC<T>) => {\n const MaskedInput = maskInputCompose(InputComponent);\n\n return forwardRef<HTMLInputElement, T & MaskProps>(({ maskFormat = defaultFormatChars, ...rest }, outerRef) => {\n // TODO: replace inside react-maskinput 'getReference' on 'forwardRef'\n const [ref, setRef] = useState<HTMLInputElement | null>(null);\n\n useImperativeHandle(outerRef, () => ref as HTMLInputElement, [ref]);\n\n return <MaskedInput getReference={setRef} maskFormat={maskFormat} {...(rest as T)} />;\n });\n};\n"],"names":["defaultFormatChars","str","regexp","composeMask","InputComponent","MaskedInput","maskInputCompose","forwardRef","_ref","outerRef","_ref$maskFormat","maskFormat","rest","_objectWithoutProperties","_excluded","_useState","useState","_useState2","_slicedToArray","ref","setRef","useImperativeHandle","React","createElement","_extends","getReference"],"mappings":";;;;;AAMA,IAAMA,kBAAkB,GAAG,CACvB;AACIC,EAAAA,GAAG,EAAE,GAAG;AACRC,EAAAA,MAAM,EAAE,OAAA;AACZ,CAAC,EACD;AACID,EAAAA,GAAG,EAAE,GAAG;AACRC,EAAAA,MAAM,EAAE,GAAA;AACZ,CAAC,EACD;AACID,EAAAA,GAAG,EAAE,GAAG;AACRC,EAAAA,MAAM,EAAE,UAAA;AACZ,CAAC,EACD;AACID,EAAAA,GAAG,EAAE,GAAG;AACRC,EAAAA,MAAM,EAAE,YAAA;AACZ,CAAC,CACJ,CAAA;IAEYC,WAAW,GAAG,SAAdA,WAAWA,CAAgCC,cAAqB,EAAK;AAC9E,EAAA,IAAMC,WAAW,GAAGC,gBAAgB,CAACF,cAAc,CAAC,CAAA;AAEpD,EAAA,oBAAOG,UAAU,CAAkC,UAAAC,IAAA,EAA+CC,QAAQ,EAAK;AAAA,IAAA,IAAAC,eAAA,GAAAF,IAAA,CAAzDG,UAAU;AAAVA,MAAAA,UAAU,GAAAD,eAAA,KAAGV,KAAAA,CAAAA,GAAAA,kBAAkB,GAAAU,eAAA;AAAKE,MAAAA,IAAI,GAAAC,wBAAA,CAAAL,IAAA,EAAAM,SAAA,CAAA,CAAA;AAC1F;AACA,IAAA,IAAAC,SAAA,GAAsBC,QAAQ,CAA0B,IAAI,CAAC;MAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAtDI,MAAAA,GAAG,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,MAAAA,MAAM,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;IAElBI,mBAAmB,CAACZ,QAAQ,EAAE,YAAA;AAAA,MAAA,OAAMU,GAAG,CAAA;AAAA,KAAoB,EAAE,CAACA,GAAG,CAAC,CAAC,CAAA;AAEnE,IAAA,oBAAOG,KAAA,CAAAC,aAAA,CAAClB,WAAW,EAAAmB,QAAA,CAAA;AAACC,MAAAA,YAAY,EAAEL,MAAO;AAACT,MAAAA,UAAU,EAAEA,UAAAA;KAAiBC,EAAAA,IAAI,CAAS,CAAC,CAAA;AACzF,GAAC,CAAC,CAAA;AACN;;;;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/plasma-new-hope",
|
3
|
-
"version": "0.149.0-canary.1418.
|
3
|
+
"version": "0.149.0-canary.1418.10942866373.0",
|
4
4
|
"description": "Salute Design System blueprint",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "es/index.js",
|
@@ -123,5 +123,5 @@
|
|
123
123
|
"react-popper": "2.3.0",
|
124
124
|
"storeon": "3.1.5"
|
125
125
|
},
|
126
|
-
"gitHead": "
|
126
|
+
"gitHead": "429c0ee3cb78ad8fcba1bd16bf082395e0bbb518"
|
127
127
|
}
|
@@ -39,6 +39,7 @@ var composeMask = exports.composeMask = function composeMask(InputComponent) {
|
|
39
39
|
var _ref$maskFormat = _ref.maskFormat,
|
40
40
|
maskFormat = _ref$maskFormat === void 0 ? defaultFormatChars : _ref$maskFormat,
|
41
41
|
rest = _objectWithoutProperties(_ref, _excluded);
|
42
|
+
// TODO: replace inside react-maskinput 'getReference' on 'forwardRef'
|
42
43
|
var _useState = (0, _react.useState)(null),
|
43
44
|
_useState2 = _slicedToArray(_useState, 2),
|
44
45
|
ref = _useState2[0],
|
@@ -47,9 +48,7 @@ var composeMask = exports.composeMask = function composeMask(InputComponent) {
|
|
47
48
|
return ref;
|
48
49
|
}, [ref]);
|
49
50
|
return /*#__PURE__*/_react["default"].createElement(MaskedInput, _extends({
|
50
|
-
getReference:
|
51
|
-
return setRef(el);
|
52
|
-
},
|
51
|
+
getReference: setRef,
|
53
52
|
maskFormat: maskFormat
|
54
53
|
}, rest));
|
55
54
|
});
|
@@ -29,6 +29,7 @@ export var composeMask = function composeMask(InputComponent) {
|
|
29
29
|
var _ref$maskFormat = _ref.maskFormat,
|
30
30
|
maskFormat = _ref$maskFormat === void 0 ? defaultFormatChars : _ref$maskFormat,
|
31
31
|
rest = _objectWithoutProperties(_ref, _excluded);
|
32
|
+
// TODO: replace inside react-maskinput 'getReference' on 'forwardRef'
|
32
33
|
var _useState = useState(null),
|
33
34
|
_useState2 = _slicedToArray(_useState, 2),
|
34
35
|
ref = _useState2[0],
|
@@ -37,9 +38,7 @@ export var composeMask = function composeMask(InputComponent) {
|
|
37
38
|
return ref;
|
38
39
|
}, [ref]);
|
39
40
|
return /*#__PURE__*/React.createElement(MaskedInput, _extends({
|
40
|
-
getReference:
|
41
|
-
return setRef(el);
|
42
|
-
},
|
41
|
+
getReference: setRef,
|
43
42
|
maskFormat: maskFormat
|
44
43
|
}, rest));
|
45
44
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Mask.d.ts","sourceRoot":"","sources":["../../../src/components/Mask/Mask.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAqBhE,eAAO,MAAM,WAAW,
|
1
|
+
{"version":3,"file":"Mask.d.ts","sourceRoot":"","sources":["../../../src/components/Mask/Mask.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AACzE,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,KAAK,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAqBhE,eAAO,MAAM,WAAW,4KAWvB,CAAC"}
|