@salutejs/plasma-new-hope 0.327.0-canary.1973.15677961605.0 → 0.327.0-canary.1973.15733948288.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/cjs/components/CodeField/CodeField.js +10 -15
- package/cjs/components/CodeField/CodeField.js.map +1 -1
- package/cjs/components/CodeInput/CodeInput.js +13 -21
- package/cjs/components/CodeInput/CodeInput.js.map +1 -1
- package/cjs/components/CodeInput/CodeInput.tokens.js.map +1 -1
- package/cjs/components/CodeInput/utils/handleCodeError.js +2 -2
- package/cjs/components/CodeInput/utils/handleCodeError.js.map +1 -1
- package/cjs/components/CodeInput/utils/handleItemError.js +1 -1
- package/cjs/components/CodeInput/utils/handleItemError.js.map +1 -1
- package/cjs/components/CodeInput/variations/_size/base.js.map +1 -1
- package/cjs/hooks/useCodeHook.js +34 -0
- package/cjs/hooks/useCodeHook.js.map +1 -0
- package/cjs/index.js +6 -0
- package/cjs/index.js.map +1 -1
- package/cjs/utils/constants.js +12 -0
- package/cjs/utils/constants.js.map +1 -1
- package/cjs/utils/index.js.map +1 -1
- package/cjs/utils/initialValuesHelper.js.map +1 -0
- package/emotion/cjs/components/CodeField/CodeField.js +9 -15
- package/emotion/cjs/components/CodeInput/CodeInput.js +11 -20
- package/emotion/cjs/components/CodeInput/utils/handleCodeError.js +3 -3
- package/emotion/cjs/components/CodeInput/utils/handleItemError.js +1 -1
- package/emotion/cjs/components/CodeInput/utils/index.js +4 -4
- package/emotion/cjs/components/CodeInput/variations/_size/base.js +1 -1
- package/emotion/cjs/hooks/index.js +8 -1
- package/emotion/cjs/hooks/useCodeHook.js +32 -0
- package/emotion/cjs/utils/constants.js +8 -2
- package/emotion/cjs/utils/index.js +12 -0
- package/emotion/es/components/CodeField/CodeField.js +11 -16
- package/emotion/es/components/CodeInput/CodeInput.js +13 -21
- package/emotion/es/components/CodeInput/utils/handleCodeError.js +2 -2
- package/emotion/es/components/CodeInput/utils/handleItemError.js +1 -1
- package/emotion/es/components/CodeInput/utils/index.js +1 -1
- package/emotion/es/components/CodeInput/variations/_size/base.js +1 -1
- package/emotion/es/hooks/index.js +2 -1
- package/emotion/es/hooks/useCodeHook.js +26 -0
- package/emotion/es/utils/constants.js +7 -1
- package/emotion/es/utils/index.js +1 -0
- package/es/components/CodeField/CodeField.js +11 -16
- package/es/components/CodeField/CodeField.js.map +1 -1
- package/es/components/CodeInput/CodeInput.js +14 -22
- package/es/components/CodeInput/CodeInput.js.map +1 -1
- package/es/components/CodeInput/CodeInput.tokens.js.map +1 -1
- package/es/components/CodeInput/utils/handleCodeError.js +2 -2
- package/es/components/CodeInput/utils/handleCodeError.js.map +1 -1
- package/es/components/CodeInput/utils/handleItemError.js +1 -1
- package/es/components/CodeInput/utils/handleItemError.js.map +1 -1
- package/es/components/CodeInput/variations/_size/base.js.map +1 -1
- package/es/hooks/useCodeHook.js +30 -0
- package/es/hooks/useCodeHook.js.map +1 -0
- package/es/index.js +2 -0
- package/es/index.js.map +1 -1
- package/es/utils/constants.js +7 -1
- package/es/utils/constants.js.map +1 -1
- package/es/utils/index.js.map +1 -1
- package/es/utils/initialValuesHelper.js.map +1 -0
- package/package.json +2 -2
- package/styled-components/cjs/components/CodeField/CodeField.js +9 -15
- package/styled-components/cjs/components/CodeInput/CodeInput.js +11 -20
- package/styled-components/cjs/components/CodeInput/utils/handleCodeError.js +3 -3
- package/styled-components/cjs/components/CodeInput/utils/handleItemError.js +1 -1
- package/styled-components/cjs/components/CodeInput/utils/index.js +4 -4
- package/styled-components/cjs/hooks/index.js +8 -1
- package/styled-components/cjs/hooks/useCodeHook.js +32 -0
- package/styled-components/cjs/utils/constants.js +8 -2
- package/styled-components/cjs/utils/index.js +12 -0
- package/styled-components/es/components/CodeField/CodeField.js +11 -16
- package/styled-components/es/components/CodeInput/CodeInput.js +13 -21
- package/styled-components/es/components/CodeInput/utils/handleCodeError.js +2 -2
- package/styled-components/es/components/CodeInput/utils/handleItemError.js +1 -1
- package/styled-components/es/components/CodeInput/utils/index.js +1 -1
- package/styled-components/es/hooks/index.js +2 -1
- package/styled-components/es/hooks/useCodeHook.js +26 -0
- package/styled-components/es/utils/constants.js +7 -1
- package/styled-components/es/utils/index.js +1 -0
- package/types/components/CodeField/CodeField.d.ts.map +1 -1
- package/types/components/CodeInput/CodeInput.d.ts +0 -2
- package/types/components/CodeInput/CodeInput.d.ts.map +1 -1
- package/types/components/CodeInput/CodeInput.tokens.d.ts +1 -0
- package/types/components/CodeInput/CodeInput.tokens.d.ts.map +1 -1
- package/types/components/CodeInput/CodeInput.types.d.ts +2 -6
- package/types/components/CodeInput/CodeInput.types.d.ts.map +1 -1
- package/types/components/CodeInput/utils/handleCodeError.d.ts.map +1 -1
- package/types/components/CodeInput/utils/handleItemError.d.ts.map +1 -1
- package/types/components/CodeInput/utils/index.d.ts +1 -1
- package/types/components/CodeInput/utils/index.d.ts.map +1 -1
- package/types/components/CodeInput/variations/_size/base.d.ts.map +1 -1
- package/types/hooks/index.d.ts +1 -0
- package/types/hooks/index.d.ts.map +1 -1
- package/types/hooks/useCodeHook.d.ts +13 -0
- package/types/hooks/useCodeHook.d.ts.map +1 -0
- package/types/utils/constants.d.ts +6 -0
- package/types/utils/constants.d.ts.map +1 -1
- package/types/utils/index.d.ts +1 -0
- package/types/utils/index.d.ts.map +1 -1
- package/types/utils/initialValuesHelper.d.ts.map +1 -0
- package/cjs/components/CodeInput/utils/constants.js +0 -14
- package/cjs/components/CodeInput/utils/constants.js.map +0 -1
- package/cjs/components/CodeInput/utils/initialValuesHelper.js.map +0 -1
- package/emotion/cjs/components/CodeInput/utils/constants.js +0 -12
- package/emotion/cjs/components/CodeInput/utils/types.js +0 -5
- package/emotion/es/components/CodeInput/utils/constants.js +0 -6
- package/emotion/es/components/CodeInput/utils/types.js +0 -1
- package/es/components/CodeInput/utils/constants.js +0 -7
- package/es/components/CodeInput/utils/constants.js.map +0 -1
- package/es/components/CodeInput/utils/initialValuesHelper.js.map +0 -1
- package/styled-components/cjs/components/CodeInput/utils/constants.js +0 -12
- package/styled-components/cjs/components/CodeInput/utils/types.js +0 -5
- package/styled-components/es/components/CodeInput/utils/constants.js +0 -6
- package/styled-components/es/components/CodeInput/utils/types.js +0 -1
- package/types/components/CodeInput/utils/constants.d.ts +0 -7
- package/types/components/CodeInput/utils/constants.d.ts.map +0 -1
- package/types/components/CodeInput/utils/initialValuesHelper.d.ts.map +0 -1
- package/types/components/CodeInput/utils/types.d.ts +0 -11
- package/types/components/CodeInput/utils/types.d.ts.map +0 -1
- /package/cjs/{components/CodeInput/utils → utils}/initialValuesHelper.js +0 -0
- /package/emotion/cjs/{components/CodeInput/utils → utils}/initialValuesHelper.js +0 -0
- /package/emotion/es/{components/CodeInput/utils → utils}/initialValuesHelper.js +0 -0
- /package/es/{components/CodeInput/utils → utils}/initialValuesHelper.js +0 -0
- /package/styled-components/cjs/{components/CodeInput/utils → utils}/initialValuesHelper.js +0 -0
- /package/styled-components/es/{components/CodeInput/utils → utils}/initialValuesHelper.js +0 -0
- /package/types/{components/CodeInput/utils → utils}/initialValuesHelper.d.ts +0 -0
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"handleItemError.d.ts","sourceRoot":"","sources":["../../../../src/components/CodeInput/utils/handleItemError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;
|
1
|
+
{"version":3,"file":"handleItemError.d.ts","sourceRoot":"","sources":["../../../../src/components/CodeInput/utils/handleItemError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAEzC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAI5D,KAAK,mBAAmB,GAAG;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB,SAAS,EAAE,gBAAgB,CAAC,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC,CAAC;IAC5D,iBAAiB,EAAE,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC3D,UAAU,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,eAAe,oGAQzB,mBAAmB,SA4BrB,CAAC"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export { getFieldPattern, getPlaceholderValue, getCodeValue } from '
|
1
|
+
export { getFieldPattern, getPlaceholderValue, getCodeValue } from '../../../utils';
|
2
2
|
export { handleItemError } from './handleItemError';
|
3
3
|
export { handleCodeError } from './handleCodeError';
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/CodeInput/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/CodeInput/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/components/CodeInput/variations/_size/base.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/components/CodeInput/variations/_size/base.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,IAAI,0CA2BhB,CAAC"}
|
package/types/hooks/index.d.ts
CHANGED
@@ -6,4 +6,5 @@ export { useDidMountEffect } from './useDidMountEffect';
|
|
6
6
|
export { useDidMountLayoutEffect } from './useDidMountLayoutEffect';
|
7
7
|
export { useOutsideClick } from './useOutsideClick';
|
8
8
|
export { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect';
|
9
|
+
export { useCodeHook } from './useCodeHook';
|
9
10
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { MutableRefObject } from 'react';
|
2
|
+
type useCodeHookTypes = {
|
3
|
+
codeLength: number;
|
4
|
+
inputRefs: MutableRefObject<Array<HTMLInputElement | null>>;
|
5
|
+
autoFocus?: boolean;
|
6
|
+
disabled?: boolean;
|
7
|
+
originalValue: string;
|
8
|
+
getLastActiveIndex: () => number;
|
9
|
+
handleFullCodeEnter: (fullCode: string) => void;
|
10
|
+
};
|
11
|
+
export declare const useCodeHook: ({ inputRefs, codeLength, disabled, autoFocus, originalValue, getLastActiveIndex, handleFullCodeEnter, }: useCodeHookTypes) => void;
|
12
|
+
export {};
|
13
|
+
//# sourceMappingURL=useCodeHook.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useCodeHook.d.ts","sourceRoot":"","sources":["../../src/hooks/useCodeHook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAa,MAAM,OAAO,CAAC;AAIpD,KAAK,gBAAgB,GAAG;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,gBAAgB,CAAC,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC,CAAC;IAC5D,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,MAAM,MAAM,CAAC;IACjC,mBAAmB,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;CACnD,CAAC;AAEF,eAAO,MAAM,WAAW,4GAQrB,gBAAgB,SAkBlB,CAAC"}
|
@@ -16,4 +16,10 @@ export declare const screenGroupBreakpoints: {
|
|
16
16
|
medium: string;
|
17
17
|
large: string;
|
18
18
|
};
|
19
|
+
export declare const ONLY_DIGITS_PATTERN = "^\\d+$";
|
20
|
+
export declare const ONLY_CHARS_PATTERN = "^[a-zA-Z]+$";
|
21
|
+
export declare const ONLY_DIGITS_AND_CHARS_PATTERN = "^[a-zA-Z0-9]+$";
|
22
|
+
export declare const FORBIDDEN_KEYS: string[];
|
23
|
+
export declare const BACKSPACE_KEY = "Backspace";
|
24
|
+
export declare const ANIMATION_TIMEOUT = 300;
|
19
25
|
//# sourceMappingURL=constants.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;;;;;;;;;CAYpB,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;CAIlC,CAAC"}
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;;;;;;;;;;CAYpB,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;CAIlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAC5C,eAAO,MAAM,kBAAkB,gBAAgB,CAAC;AAChD,eAAO,MAAM,6BAA6B,mBAAmB,CAAC;AAE9D,eAAO,MAAM,cAAc,UAAuE,CAAC;AACnG,eAAO,MAAM,aAAa,cAAc,CAAC;AAEzC,eAAO,MAAM,iBAAiB,MAAM,CAAC"}
|
package/types/utils/index.d.ts
CHANGED
@@ -9,6 +9,7 @@ export { isEmpty } from './isEmpty';
|
|
9
9
|
export { createEvent } from './createEvent';
|
10
10
|
export * as constants from './constants';
|
11
11
|
export * from './getPopoverPlacement';
|
12
|
+
export * from './initialValuesHelper';
|
12
13
|
export { noop } from './noop';
|
13
14
|
export { getHeightAsNumber } from './getHeightAsNumber';
|
14
15
|
export { createConditionalComponent } from './createConditionalComponent';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,eAAO,MAAM,EAAE,eAAgB,CAAC,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,EAAE,WAAuD,CAAC;AAEvH,eAAO,MAAM,eAAe,MAAO,oBAAoB,WAAW,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,aAAa,CAAC,KAAG,MAQ1G,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE9C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,KAAK,SAAS,MAAM,aAAa,CAAC;AACzC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAE1E,eAAO,MAAM,EAAE,eAAgB,CAAC,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,EAAE,WAAuD,CAAC;AAEvH,eAAO,MAAM,eAAe,MAAO,oBAAoB,WAAW,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,aAAa,CAAC,KAAG,MAQ1G,CAAC;AAEF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"initialValuesHelper.d.ts","sourceRoot":"","sources":["../../src/utils/initialValuesHelper.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,mBAAoB,MAAM,GAAG,MAAM,kBAU9D,CAAC;AAEF,eAAO,MAAM,YAAY,eAAgB,MAAM,SAAS,MAAM,KAAG,KAAK,CAAC,MAAM,CAM5E,CAAC;AAEF,eAAO,MAAM,mBAAmB,eAAgB,MAAM,gBAAgB,MAAM,KAAG,IAAI,GAAG,MAAM,EAU3F,CAAC"}
|
@@ -1,14 +0,0 @@
|
|
1
|
-
'use strict';
|
2
|
-
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
-
|
5
|
-
var ONLY_DIGITS_PATTERN = '^\\d+$';
|
6
|
-
var FORBIDDEN_KEYS = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Delete', 'Tab'];
|
7
|
-
var BACKSPACE_KEY = 'Backspace';
|
8
|
-
var ANIMATION_TIMEOUT = 300;
|
9
|
-
|
10
|
-
exports.ANIMATION_TIMEOUT = ANIMATION_TIMEOUT;
|
11
|
-
exports.BACKSPACE_KEY = BACKSPACE_KEY;
|
12
|
-
exports.FORBIDDEN_KEYS = FORBIDDEN_KEYS;
|
13
|
-
exports.ONLY_DIGITS_PATTERN = ONLY_DIGITS_PATTERN;
|
14
|
-
//# sourceMappingURL=constants.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/components/CodeInput/utils/constants.ts"],"sourcesContent":["export const ONLY_DIGITS_PATTERN = '^\\\\d+$';\nexport const ONLY_CHARS_PATTERN = '^[a-zA-Z]+$';\nexport const ONLY_DIGITS_AND_CHARS_PATTERN = '^[a-zA-Z0-9]+$';\n\nexport const FORBIDDEN_KEYS = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Delete', 'Tab'];\nexport const BACKSPACE_KEY = 'Backspace';\n\nexport const ANIMATION_TIMEOUT = 300;\n"],"names":["ONLY_DIGITS_PATTERN","FORBIDDEN_KEYS","BACKSPACE_KEY","ANIMATION_TIMEOUT"],"mappings":";;;;AAAO,IAAMA,mBAAmB,GAAG,SAAQ;AAI9BC,IAAAA,cAAc,GAAG,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAC;AAC3F,IAAMC,aAAa,GAAG,YAAW;AAEjC,IAAMC,iBAAiB,GAAG;;;;;;;"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"initialValuesHelper.js","sources":["../../../../src/components/CodeInput/utils/initialValuesHelper.ts"],"sourcesContent":["export const getFieldPattern = (allowedSymbols: RegExp | string) => {\n if (!allowedSymbols) {\n return null;\n }\n\n if (typeof allowedSymbols === 'string') {\n return new RegExp(allowedSymbols, 'g');\n }\n\n return allowedSymbols;\n};\n\nexport const getCodeValue = (codeLength: number, value: string): Array<string> => {\n if (!value.length) {\n return new Array(codeLength).fill('');\n }\n\n return value.slice(0, codeLength).split('');\n};\n\nexport const getPlaceholderValue = (codeLength: number, placeholder?: string): null | string[] => {\n if (!placeholder || typeof placeholder !== 'string') {\n return null;\n }\n\n if (placeholder.length === 1) {\n return Array(codeLength).fill(placeholder);\n }\n\n return placeholder.slice(0, codeLength).split('');\n};\n"],"names":["getFieldPattern","allowedSymbols","RegExp","getCodeValue","codeLength","value","length","Array","fill","slice","split","getPlaceholderValue","placeholder"],"mappings":";;;;IAAaA,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,cAA+B,EAAK;EAChE,IAAI,CAACA,cAAc,EAAE;AACjB,IAAA,OAAO,IAAI,CAAA;AACf,GAAA;AAEA,EAAA,IAAI,OAAOA,cAAc,KAAK,QAAQ,EAAE;AACpC,IAAA,OAAO,IAAIC,MAAM,CAACD,cAAc,EAAE,GAAG,CAAC,CAAA;AAC1C,GAAA;AAEA,EAAA,OAAOA,cAAc,CAAA;AACzB,EAAC;AAEM,IAAME,YAAY,GAAG,SAAfA,YAAYA,CAAIC,UAAkB,EAAEC,KAAa,EAAoB;AAC9E,EAAA,IAAI,CAACA,KAAK,CAACC,MAAM,EAAE;IACf,OAAO,IAAIC,KAAK,CAACH,UAAU,CAAC,CAACI,IAAI,CAAC,EAAE,CAAC,CAAA;AACzC,GAAA;AAEA,EAAA,OAAOH,KAAK,CAACI,KAAK,CAAC,CAAC,EAAEL,UAAU,CAAC,CAACM,KAAK,CAAC,EAAE,CAAC,CAAA;AAC/C,EAAC;AAEM,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIP,UAAkB,EAAEQ,WAAoB,EAAsB;AAC9F,EAAA,IAAI,CAACA,WAAW,IAAI,OAAOA,WAAW,KAAK,QAAQ,EAAE;AACjD,IAAA,OAAO,IAAI,CAAA;AACf,GAAA;AAEA,EAAA,IAAIA,WAAW,CAACN,MAAM,KAAK,CAAC,EAAE;IAC1B,OAAOC,KAAK,CAACH,UAAU,CAAC,CAACI,IAAI,CAACI,WAAW,CAAC,CAAA;AAC9C,GAAA;AAEA,EAAA,OAAOA,WAAW,CAACH,KAAK,CAAC,CAAC,EAAEL,UAAU,CAAC,CAACM,KAAK,CAAC,EAAE,CAAC,CAAA;AACrD;;;;;;"}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.ONLY_DIGITS_PATTERN = exports.ONLY_DIGITS_AND_CHARS_PATTERN = exports.ONLY_CHARS_PATTERN = exports.FORBIDDEN_KEYS = exports.BACKSPACE_KEY = exports.ANIMATION_TIMEOUT = void 0;
|
7
|
-
var ONLY_DIGITS_PATTERN = exports.ONLY_DIGITS_PATTERN = '^\\d+$';
|
8
|
-
var ONLY_CHARS_PATTERN = exports.ONLY_CHARS_PATTERN = '^[a-zA-Z]+$';
|
9
|
-
var ONLY_DIGITS_AND_CHARS_PATTERN = exports.ONLY_DIGITS_AND_CHARS_PATTERN = '^[a-zA-Z0-9]+$';
|
10
|
-
var FORBIDDEN_KEYS = exports.FORBIDDEN_KEYS = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Delete', 'Tab'];
|
11
|
-
var BACKSPACE_KEY = exports.BACKSPACE_KEY = 'Backspace';
|
12
|
-
var ANIMATION_TIMEOUT = exports.ANIMATION_TIMEOUT = 300;
|
@@ -1,6 +0,0 @@
|
|
1
|
-
export var ONLY_DIGITS_PATTERN = '^\\d+$';
|
2
|
-
export var ONLY_CHARS_PATTERN = '^[a-zA-Z]+$';
|
3
|
-
export var ONLY_DIGITS_AND_CHARS_PATTERN = '^[a-zA-Z0-9]+$';
|
4
|
-
export var FORBIDDEN_KEYS = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Delete', 'Tab'];
|
5
|
-
export var BACKSPACE_KEY = 'Backspace';
|
6
|
-
export var ANIMATION_TIMEOUT = 300;
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,7 +0,0 @@
|
|
1
|
-
var ONLY_DIGITS_PATTERN = '^\\d+$';
|
2
|
-
var FORBIDDEN_KEYS = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Delete', 'Tab'];
|
3
|
-
var BACKSPACE_KEY = 'Backspace';
|
4
|
-
var ANIMATION_TIMEOUT = 300;
|
5
|
-
|
6
|
-
export { ANIMATION_TIMEOUT, BACKSPACE_KEY, FORBIDDEN_KEYS, ONLY_DIGITS_PATTERN };
|
7
|
-
//# sourceMappingURL=constants.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/components/CodeInput/utils/constants.ts"],"sourcesContent":["export const ONLY_DIGITS_PATTERN = '^\\\\d+$';\nexport const ONLY_CHARS_PATTERN = '^[a-zA-Z]+$';\nexport const ONLY_DIGITS_AND_CHARS_PATTERN = '^[a-zA-Z0-9]+$';\n\nexport const FORBIDDEN_KEYS = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Delete', 'Tab'];\nexport const BACKSPACE_KEY = 'Backspace';\n\nexport const ANIMATION_TIMEOUT = 300;\n"],"names":["ONLY_DIGITS_PATTERN","FORBIDDEN_KEYS","BACKSPACE_KEY","ANIMATION_TIMEOUT"],"mappings":"AAAO,IAAMA,mBAAmB,GAAG,SAAQ;AAI9BC,IAAAA,cAAc,GAAG,CAAC,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAC;AAC3F,IAAMC,aAAa,GAAG,YAAW;AAEjC,IAAMC,iBAAiB,GAAG;;;;"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"initialValuesHelper.js","sources":["../../../../src/components/CodeInput/utils/initialValuesHelper.ts"],"sourcesContent":["export const getFieldPattern = (allowedSymbols: RegExp | string) => {\n if (!allowedSymbols) {\n return null;\n }\n\n if (typeof allowedSymbols === 'string') {\n return new RegExp(allowedSymbols, 'g');\n }\n\n return allowedSymbols;\n};\n\nexport const getCodeValue = (codeLength: number, value: string): Array<string> => {\n if (!value.length) {\n return new Array(codeLength).fill('');\n }\n\n return value.slice(0, codeLength).split('');\n};\n\nexport const getPlaceholderValue = (codeLength: number, placeholder?: string): null | string[] => {\n if (!placeholder || typeof placeholder !== 'string') {\n return null;\n }\n\n if (placeholder.length === 1) {\n return Array(codeLength).fill(placeholder);\n }\n\n return placeholder.slice(0, codeLength).split('');\n};\n"],"names":["getFieldPattern","allowedSymbols","RegExp","getCodeValue","codeLength","value","length","Array","fill","slice","split","getPlaceholderValue","placeholder"],"mappings":"IAAaA,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,cAA+B,EAAK;EAChE,IAAI,CAACA,cAAc,EAAE;AACjB,IAAA,OAAO,IAAI,CAAA;AACf,GAAA;AAEA,EAAA,IAAI,OAAOA,cAAc,KAAK,QAAQ,EAAE;AACpC,IAAA,OAAO,IAAIC,MAAM,CAACD,cAAc,EAAE,GAAG,CAAC,CAAA;AAC1C,GAAA;AAEA,EAAA,OAAOA,cAAc,CAAA;AACzB,EAAC;AAEM,IAAME,YAAY,GAAG,SAAfA,YAAYA,CAAIC,UAAkB,EAAEC,KAAa,EAAoB;AAC9E,EAAA,IAAI,CAACA,KAAK,CAACC,MAAM,EAAE;IACf,OAAO,IAAIC,KAAK,CAACH,UAAU,CAAC,CAACI,IAAI,CAAC,EAAE,CAAC,CAAA;AACzC,GAAA;AAEA,EAAA,OAAOH,KAAK,CAACI,KAAK,CAAC,CAAC,EAAEL,UAAU,CAAC,CAACM,KAAK,CAAC,EAAE,CAAC,CAAA;AAC/C,EAAC;AAEM,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAIP,UAAkB,EAAEQ,WAAoB,EAAsB;AAC9F,EAAA,IAAI,CAACA,WAAW,IAAI,OAAOA,WAAW,KAAK,QAAQ,EAAE;AACjD,IAAA,OAAO,IAAI,CAAA;AACf,GAAA;AAEA,EAAA,IAAIA,WAAW,CAACN,MAAM,KAAK,CAAC,EAAE;IAC1B,OAAOC,KAAK,CAACH,UAAU,CAAC,CAACI,IAAI,CAACI,WAAW,CAAC,CAAA;AAC9C,GAAA;AAEA,EAAA,OAAOA,WAAW,CAACH,KAAK,CAAC,CAAC,EAAEL,UAAU,CAAC,CAACM,KAAK,CAAC,EAAE,CAAC,CAAA;AACrD;;;;"}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.ONLY_DIGITS_PATTERN = exports.ONLY_DIGITS_AND_CHARS_PATTERN = exports.ONLY_CHARS_PATTERN = exports.FORBIDDEN_KEYS = exports.BACKSPACE_KEY = exports.ANIMATION_TIMEOUT = void 0;
|
7
|
-
var ONLY_DIGITS_PATTERN = exports.ONLY_DIGITS_PATTERN = '^\\d+$';
|
8
|
-
var ONLY_CHARS_PATTERN = exports.ONLY_CHARS_PATTERN = '^[a-zA-Z]+$';
|
9
|
-
var ONLY_DIGITS_AND_CHARS_PATTERN = exports.ONLY_DIGITS_AND_CHARS_PATTERN = '^[a-zA-Z0-9]+$';
|
10
|
-
var FORBIDDEN_KEYS = exports.FORBIDDEN_KEYS = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Delete', 'Tab'];
|
11
|
-
var BACKSPACE_KEY = exports.BACKSPACE_KEY = 'Backspace';
|
12
|
-
var ANIMATION_TIMEOUT = exports.ANIMATION_TIMEOUT = 300;
|
@@ -1,6 +0,0 @@
|
|
1
|
-
export var ONLY_DIGITS_PATTERN = '^\\d+$';
|
2
|
-
export var ONLY_CHARS_PATTERN = '^[a-zA-Z]+$';
|
3
|
-
export var ONLY_DIGITS_AND_CHARS_PATTERN = '^[a-zA-Z0-9]+$';
|
4
|
-
export var FORBIDDEN_KEYS = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Delete', 'Tab'];
|
5
|
-
export var BACKSPACE_KEY = 'Backspace';
|
6
|
-
export var ANIMATION_TIMEOUT = 300;
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,7 +0,0 @@
|
|
1
|
-
export declare const ONLY_DIGITS_PATTERN = "^\\d+$";
|
2
|
-
export declare const ONLY_CHARS_PATTERN = "^[a-zA-Z]+$";
|
3
|
-
export declare const ONLY_DIGITS_AND_CHARS_PATTERN = "^[a-zA-Z0-9]+$";
|
4
|
-
export declare const FORBIDDEN_KEYS: string[];
|
5
|
-
export declare const BACKSPACE_KEY = "Backspace";
|
6
|
-
export declare const ANIMATION_TIMEOUT = 300;
|
7
|
-
//# sourceMappingURL=constants.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/components/CodeInput/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,WAAW,CAAC;AAC5C,eAAO,MAAM,kBAAkB,gBAAgB,CAAC;AAChD,eAAO,MAAM,6BAA6B,mBAAmB,CAAC;AAE9D,eAAO,MAAM,cAAc,UAAuE,CAAC;AACnG,eAAO,MAAM,aAAa,cAAc,CAAC;AAEzC,eAAO,MAAM,iBAAiB,MAAM,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"initialValuesHelper.d.ts","sourceRoot":"","sources":["../../../../src/components/CodeInput/utils/initialValuesHelper.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,mBAAoB,MAAM,GAAG,MAAM,kBAU9D,CAAC;AAEF,eAAO,MAAM,YAAY,eAAgB,MAAM,SAAS,MAAM,KAAG,KAAK,CAAC,MAAM,CAM5E,CAAC;AAEF,eAAO,MAAM,mBAAmB,eAAgB,MAAM,gBAAgB,MAAM,KAAG,IAAI,GAAG,MAAM,EAU3F,CAAC"}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import { tokens } from '../CodeInput.tokens';
|
2
|
-
type SmallScreen = 'smallXXS' | 'smallXS' | 'smallS' | 'smallM' | 'smallL' | 'smallXL' | 'smallXXL';
|
3
|
-
type MediumScreen = 'mediumXXS' | 'mediumXS' | 'mediumS' | 'mediumM' | 'mediumL' | 'mediumXL' | 'mediumXXL';
|
4
|
-
type LargeScreen = 'largeXXS' | 'largeXS' | 'largeS' | 'largeM' | 'largeL' | 'largeXL' | 'largeXXL';
|
5
|
-
export type ScreenVariant = SmallScreen | MediumScreen | LargeScreen;
|
6
|
-
export type BreakpointTokens = {
|
7
|
-
[x: string]: string | number;
|
8
|
-
};
|
9
|
-
export type TokensType = keyof typeof tokens;
|
10
|
-
export {};
|
11
|
-
//# sourceMappingURL=types.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/CodeInput/utils/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,KAAK,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AACpG,KAAK,YAAY,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,CAAC;AAC5G,KAAK,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;AACpG,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,YAAY,GAAG,WAAW,CAAC;AAErE,MAAM,MAAM,gBAAgB,GAAG;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAChE,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,MAAM,CAAC"}
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|