@salutejs/plasma-new-hope 0.326.0-canary.1973.15343275842.0 → 0.326.0-canary.1983.15343210393.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/Breadcrumbs/Breadcrumbs.css +3 -1
- package/cjs/components/Breadcrumbs/utils/getShortItems.css +3 -1
- package/cjs/components/Link/Link.js +8 -4
- package/cjs/components/Link/Link.js.map +1 -1
- package/cjs/components/Link/Link.tokens.js +5 -0
- package/cjs/components/Link/Link.tokens.js.map +1 -1
- package/cjs/components/{CodeInput/variations/_disabled → Link/_size}/base.js +2 -2
- package/cjs/components/Link/_size/base.js.map +1 -0
- package/cjs/components/Link/_size/base_z01401.css +1 -0
- package/cjs/components/Link/_view/base.js +1 -1
- package/cjs/components/Link/_view/base.js.map +1 -1
- package/cjs/components/Link/_view/base_r5vd7o.css +1 -0
- package/cjs/index.css +3 -16
- package/cjs/index.js +0 -6
- package/cjs/index.js.map +1 -1
- package/emotion/cjs/components/Link/Link.js +9 -5
- package/emotion/cjs/components/Link/Link.tokens.js +5 -0
- package/emotion/cjs/components/Link/_size/base.js +9 -0
- package/emotion/cjs/components/Link/_view/base.js +1 -1
- package/emotion/cjs/components/Link/_view/tokens.json +0 -1
- package/emotion/cjs/engines/emotion.js +8 -3
- package/emotion/cjs/examples/plasma_b2c/components/Link/Link.config.js +31 -11
- package/emotion/cjs/examples/plasma_b2c/components/Link/Link.stories.tsx +1 -0
- package/emotion/cjs/index.js +0 -11
- package/emotion/es/components/Link/Link.js +5 -1
- package/emotion/es/components/Link/Link.tokens.js +5 -0
- package/emotion/es/components/Link/_size/base.js +3 -0
- package/emotion/es/components/Link/_view/base.js +1 -1
- package/emotion/es/components/Link/_view/tokens.json +0 -1
- package/emotion/es/engines/emotion.js +8 -3
- package/emotion/es/examples/plasma_b2c/components/Link/Link.config.js +31 -11
- package/emotion/es/examples/plasma_b2c/components/Link/Link.stories.tsx +1 -0
- package/emotion/es/index.js +0 -1
- package/es/components/Breadcrumbs/Breadcrumbs.css +3 -1
- package/es/components/Breadcrumbs/utils/getShortItems.css +3 -1
- package/es/components/Link/Link.js +8 -4
- package/es/components/Link/Link.js.map +1 -1
- package/es/components/Link/Link.tokens.js +5 -0
- package/es/components/Link/Link.tokens.js.map +1 -1
- package/es/components/{CodeInput/variations → Link}/_size/base.js +2 -2
- package/es/components/Link/_size/base.js.map +1 -0
- package/es/components/Link/_size/base_z01401.css +1 -0
- package/es/components/Link/_view/base.js +1 -1
- package/es/components/Link/_view/base.js.map +1 -1
- package/es/components/Link/_view/base_r5vd7o.css +1 -0
- package/es/index.css +3 -16
- package/es/index.js +0 -2
- package/es/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Link/Link.js +8 -4
- package/styled-components/cjs/components/Link/Link.tokens.js +5 -0
- package/styled-components/cjs/components/Link/_size/base.js +9 -0
- package/styled-components/cjs/components/Link/_view/base.js +1 -1
- package/styled-components/cjs/components/Link/_view/tokens.json +0 -1
- package/styled-components/cjs/engines/styled-components.js +8 -3
- package/styled-components/cjs/examples/plasma_b2c/components/Link/Link.config.js +29 -9
- package/styled-components/cjs/examples/plasma_b2c/components/Link/Link.stories.tsx +1 -0
- package/styled-components/cjs/index.js +0 -11
- package/styled-components/es/components/Link/Link.js +4 -0
- package/styled-components/es/components/Link/Link.tokens.js +5 -0
- package/styled-components/es/components/Link/_size/base.js +3 -0
- package/styled-components/es/components/Link/_view/base.js +1 -1
- package/styled-components/es/components/Link/_view/tokens.json +0 -1
- package/styled-components/es/engines/styled-components.js +8 -3
- package/styled-components/es/examples/plasma_b2c/components/Link/Link.config.js +29 -9
- package/styled-components/es/examples/plasma_b2c/components/Link/Link.stories.tsx +1 -0
- package/styled-components/es/index.js +0 -1
- package/types/components/Link/Link.d.ts +3 -0
- package/types/components/Link/Link.d.ts.map +1 -1
- package/types/components/Link/Link.tokens.d.ts +5 -0
- package/types/components/Link/Link.tokens.d.ts.map +1 -1
- package/types/components/Link/_size/base.d.ts.map +1 -0
- package/types/components/Link/_view/base.d.ts.map +1 -1
- package/types/engines/emotion.d.ts.map +1 -1
- package/types/engines/styled-components.d.ts.map +1 -1
- package/types/index.d.ts +0 -1
- package/types/index.d.ts.map +1 -1
- package/cjs/components/CodeInput/CodeInput.css +0 -14
- package/cjs/components/CodeInput/CodeInput.js +0 -292
- package/cjs/components/CodeInput/CodeInput.js.map +0 -1
- package/cjs/components/CodeInput/CodeInput.styles.js +0 -78
- package/cjs/components/CodeInput/CodeInput.styles.js.map +0 -1
- package/cjs/components/CodeInput/CodeInput.styles_29ush3.css +0 -8
- package/cjs/components/CodeInput/CodeInput.tokens.js +0 -72
- package/cjs/components/CodeInput/CodeInput.tokens.js.map +0 -1
- package/cjs/components/CodeInput/utils/constants.js +0 -14
- package/cjs/components/CodeInput/utils/constants.js.map +0 -1
- package/cjs/components/CodeInput/utils/handleCodeError.js +0 -55
- package/cjs/components/CodeInput/utils/handleCodeError.js.map +0 -1
- package/cjs/components/CodeInput/utils/handleItemError.js +0 -53
- package/cjs/components/CodeInput/utils/handleItemError.js.map +0 -1
- package/cjs/components/CodeInput/utils/initialValuesHelper.js +0 -33
- package/cjs/components/CodeInput/utils/initialValuesHelper.js.map +0 -1
- package/cjs/components/CodeInput/variations/_disabled/base.js.map +0 -1
- package/cjs/components/CodeInput/variations/_disabled/base_vkh53h.css +0 -1
- package/cjs/components/CodeInput/variations/_size/base.js +0 -9
- package/cjs/components/CodeInput/variations/_size/base.js.map +0 -1
- package/cjs/components/CodeInput/variations/_size/base_fhdb3l.css +0 -1
- package/cjs/components/CodeInput/variations/_view/base.js +0 -9
- package/cjs/components/CodeInput/variations/_view/base.js.map +0 -1
- package/cjs/components/CodeInput/variations/_view/base_lzwhmf.css +0 -1
- package/cjs/components/Link/_view/base_1vy4dme.css +0 -1
- package/emotion/cjs/components/CodeInput/CodeInput.js +0 -301
- package/emotion/cjs/components/CodeInput/CodeInput.styles.js +0 -76
- package/emotion/cjs/components/CodeInput/CodeInput.tokens.js +0 -70
- package/emotion/cjs/components/CodeInput/CodeInput.types.js +0 -5
- package/emotion/cjs/components/CodeInput/index.js +0 -31
- package/emotion/cjs/components/CodeInput/utils/constants.js +0 -12
- package/emotion/cjs/components/CodeInput/utils/handleCodeError.js +0 -58
- package/emotion/cjs/components/CodeInput/utils/handleItemError.js +0 -56
- package/emotion/cjs/components/CodeInput/utils/index.js +0 -38
- package/emotion/cjs/components/CodeInput/utils/initialValuesHelper.js +0 -30
- package/emotion/cjs/components/CodeInput/variations/_disabled/base.js +0 -9
- package/emotion/cjs/components/CodeInput/variations/_disabled/tokens.json +0 -4
- package/emotion/cjs/components/CodeInput/variations/_size/base.js +0 -10
- package/emotion/cjs/components/CodeInput/variations/_size/tokens.json +0 -19
- package/emotion/cjs/components/CodeInput/variations/_view/base.js +0 -10
- package/emotion/cjs/examples/plasma_b2c/components/CodeInput/CodeInput.config.js +0 -27
- package/emotion/cjs/examples/plasma_b2c/components/CodeInput/CodeInput.js +0 -11
- package/emotion/cjs/examples/plasma_b2c/components/CodeInput/CodeInput.stories.tsx +0 -107
- package/emotion/cjs/examples/plasma_web/components/CodeInput/CodeInput.config.js +0 -27
- package/emotion/cjs/examples/plasma_web/components/CodeInput/CodeInput.js +0 -11
- package/emotion/cjs/examples/plasma_web/components/CodeInput/CodeInput.stories.tsx +0 -107
- package/emotion/es/components/CodeInput/CodeInput.js +0 -292
- package/emotion/es/components/CodeInput/CodeInput.styles.js +0 -69
- package/emotion/es/components/CodeInput/CodeInput.tokens.js +0 -64
- package/emotion/es/components/CodeInput/CodeInput.types.js +0 -1
- package/emotion/es/components/CodeInput/index.js +0 -2
- package/emotion/es/components/CodeInput/utils/constants.js +0 -6
- package/emotion/es/components/CodeInput/utils/handleCodeError.js +0 -52
- package/emotion/es/components/CodeInput/utils/handleItemError.js +0 -50
- package/emotion/es/components/CodeInput/utils/index.js +0 -3
- package/emotion/es/components/CodeInput/utils/initialValuesHelper.js +0 -24
- package/emotion/es/components/CodeInput/variations/_disabled/base.js +0 -3
- package/emotion/es/components/CodeInput/variations/_disabled/tokens.json +0 -4
- package/emotion/es/components/CodeInput/variations/_size/base.js +0 -4
- package/emotion/es/components/CodeInput/variations/_size/tokens.json +0 -19
- package/emotion/es/components/CodeInput/variations/_view/base.js +0 -4
- package/emotion/es/examples/plasma_b2c/components/CodeInput/CodeInput.config.js +0 -21
- package/emotion/es/examples/plasma_b2c/components/CodeInput/CodeInput.js +0 -5
- package/emotion/es/examples/plasma_b2c/components/CodeInput/CodeInput.stories.tsx +0 -107
- package/emotion/es/examples/plasma_web/components/CodeInput/CodeInput.config.js +0 -21
- package/emotion/es/examples/plasma_web/components/CodeInput/CodeInput.js +0 -5
- package/emotion/es/examples/plasma_web/components/CodeInput/CodeInput.stories.tsx +0 -107
- package/es/components/CodeInput/CodeInput.css +0 -14
- package/es/components/CodeInput/CodeInput.js +0 -282
- package/es/components/CodeInput/CodeInput.js.map +0 -1
- package/es/components/CodeInput/CodeInput.styles.js +0 -67
- package/es/components/CodeInput/CodeInput.styles.js.map +0 -1
- package/es/components/CodeInput/CodeInput.styles_29ush3.css +0 -8
- package/es/components/CodeInput/CodeInput.tokens.js +0 -67
- package/es/components/CodeInput/CodeInput.tokens.js.map +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/handleCodeError.js +0 -51
- package/es/components/CodeInput/utils/handleCodeError.js.map +0 -1
- package/es/components/CodeInput/utils/handleItemError.js +0 -49
- package/es/components/CodeInput/utils/handleItemError.js.map +0 -1
- package/es/components/CodeInput/utils/initialValuesHelper.js +0 -27
- package/es/components/CodeInput/utils/initialValuesHelper.js.map +0 -1
- package/es/components/CodeInput/variations/_disabled/base.js +0 -5
- package/es/components/CodeInput/variations/_disabled/base.js.map +0 -1
- package/es/components/CodeInput/variations/_disabled/base_vkh53h.css +0 -1
- package/es/components/CodeInput/variations/_size/base.js.map +0 -1
- package/es/components/CodeInput/variations/_size/base_fhdb3l.css +0 -1
- package/es/components/CodeInput/variations/_view/base.js +0 -5
- package/es/components/CodeInput/variations/_view/base.js.map +0 -1
- package/es/components/CodeInput/variations/_view/base_lzwhmf.css +0 -1
- package/es/components/Link/_view/base_1vy4dme.css +0 -1
- package/styled-components/cjs/components/CodeInput/CodeInput.js +0 -301
- package/styled-components/cjs/components/CodeInput/CodeInput.styles.js +0 -47
- package/styled-components/cjs/components/CodeInput/CodeInput.tokens.js +0 -70
- package/styled-components/cjs/components/CodeInput/CodeInput.types.js +0 -5
- package/styled-components/cjs/components/CodeInput/index.js +0 -31
- package/styled-components/cjs/components/CodeInput/utils/constants.js +0 -12
- package/styled-components/cjs/components/CodeInput/utils/handleCodeError.js +0 -58
- package/styled-components/cjs/components/CodeInput/utils/handleItemError.js +0 -56
- package/styled-components/cjs/components/CodeInput/utils/index.js +0 -38
- package/styled-components/cjs/components/CodeInput/utils/initialValuesHelper.js +0 -30
- package/styled-components/cjs/components/CodeInput/variations/_disabled/base.js +0 -9
- package/styled-components/cjs/components/CodeInput/variations/_disabled/tokens.json +0 -4
- package/styled-components/cjs/components/CodeInput/variations/_size/base.js +0 -10
- package/styled-components/cjs/components/CodeInput/variations/_size/tokens.json +0 -19
- package/styled-components/cjs/components/CodeInput/variations/_view/base.js +0 -10
- package/styled-components/cjs/examples/plasma_b2c/components/CodeInput/CodeInput.config.js +0 -27
- package/styled-components/cjs/examples/plasma_b2c/components/CodeInput/CodeInput.js +0 -11
- package/styled-components/cjs/examples/plasma_b2c/components/CodeInput/CodeInput.stories.tsx +0 -107
- package/styled-components/cjs/examples/plasma_web/components/CodeInput/CodeInput.config.js +0 -27
- package/styled-components/cjs/examples/plasma_web/components/CodeInput/CodeInput.js +0 -11
- package/styled-components/cjs/examples/plasma_web/components/CodeInput/CodeInput.stories.tsx +0 -107
- package/styled-components/es/components/CodeInput/CodeInput.js +0 -292
- package/styled-components/es/components/CodeInput/CodeInput.styles.js +0 -39
- package/styled-components/es/components/CodeInput/CodeInput.tokens.js +0 -64
- package/styled-components/es/components/CodeInput/CodeInput.types.js +0 -1
- package/styled-components/es/components/CodeInput/index.js +0 -2
- package/styled-components/es/components/CodeInput/utils/constants.js +0 -6
- package/styled-components/es/components/CodeInput/utils/handleCodeError.js +0 -52
- package/styled-components/es/components/CodeInput/utils/handleItemError.js +0 -50
- package/styled-components/es/components/CodeInput/utils/index.js +0 -3
- package/styled-components/es/components/CodeInput/utils/initialValuesHelper.js +0 -24
- package/styled-components/es/components/CodeInput/variations/_disabled/base.js +0 -3
- package/styled-components/es/components/CodeInput/variations/_disabled/tokens.json +0 -4
- package/styled-components/es/components/CodeInput/variations/_size/base.js +0 -4
- package/styled-components/es/components/CodeInput/variations/_size/tokens.json +0 -19
- package/styled-components/es/components/CodeInput/variations/_view/base.js +0 -4
- package/styled-components/es/examples/plasma_b2c/components/CodeInput/CodeInput.config.js +0 -21
- package/styled-components/es/examples/plasma_b2c/components/CodeInput/CodeInput.js +0 -5
- package/styled-components/es/examples/plasma_b2c/components/CodeInput/CodeInput.stories.tsx +0 -107
- package/styled-components/es/examples/plasma_web/components/CodeInput/CodeInput.config.js +0 -21
- package/styled-components/es/examples/plasma_web/components/CodeInput/CodeInput.js +0 -5
- package/styled-components/es/examples/plasma_web/components/CodeInput/CodeInput.stories.tsx +0 -107
- package/types/components/CodeInput/CodeInput.d.ts +0 -67
- package/types/components/CodeInput/CodeInput.d.ts.map +0 -1
- package/types/components/CodeInput/CodeInput.styles.d.ts +0 -17
- package/types/components/CodeInput/CodeInput.styles.d.ts.map +0 -1
- package/types/components/CodeInput/CodeInput.tokens.d.ts +0 -65
- package/types/components/CodeInput/CodeInput.tokens.d.ts.map +0 -1
- package/types/components/CodeInput/CodeInput.types.d.ts +0 -96
- package/types/components/CodeInput/CodeInput.types.d.ts.map +0 -1
- package/types/components/CodeInput/index.d.ts +0 -3
- package/types/components/CodeInput/index.d.ts.map +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/handleCodeError.d.ts +0 -15
- package/types/components/CodeInput/utils/handleCodeError.d.ts.map +0 -1
- package/types/components/CodeInput/utils/handleItemError.d.ts +0 -14
- package/types/components/CodeInput/utils/handleItemError.d.ts.map +0 -1
- package/types/components/CodeInput/utils/index.d.ts +0 -4
- package/types/components/CodeInput/utils/index.d.ts.map +0 -1
- package/types/components/CodeInput/utils/initialValuesHelper.d.ts +0 -4
- package/types/components/CodeInput/utils/initialValuesHelper.d.ts.map +0 -1
- package/types/components/CodeInput/variations/_disabled/base.d.ts.map +0 -1
- package/types/components/CodeInput/variations/_size/base.d.ts +0 -2
- package/types/components/CodeInput/variations/_size/base.d.ts.map +0 -1
- package/types/components/CodeInput/variations/_view/base.d.ts +0 -2
- package/types/components/CodeInput/variations/_view/base.d.ts.map +0 -1
- /package/emotion/cjs/components/{CodeInput/variations/_view → Link/_size}/tokens.json +0 -0
- /package/emotion/es/components/{CodeInput/variations/_view → Link/_size}/tokens.json +0 -0
- /package/styled-components/cjs/components/{CodeInput/variations/_view → Link/_size}/tokens.json +0 -0
- /package/styled-components/es/components/{CodeInput/variations/_view → Link/_size}/tokens.json +0 -0
- /package/types/components/{CodeInput/variations/_disabled → Link/_size}/base.d.ts +0 -0
@@ -1,4 +0,0 @@
|
|
1
|
-
import { css } from 'styled-components';
|
2
|
-
import { CaptionWrapper, CodeGroup, CodeWrapper, ItemInput } from "../../CodeInput.styles";
|
3
|
-
import { tokens, classes } from "../../CodeInput.tokens";
|
4
|
-
export var base = /*#__PURE__*/css(["gap:var(", ");", ",", "{gap:var(", ");}&& .", "{", "{width:var(", ");height:var(", ");font-size:var(", ");line-height:var(", ");}}&& .", "{", "{width:var(", ");height:var(", ");font-size:var(", ");line-height:var(", ");}}&& .", "{", "{width:var(", ");height:var(", ");font-size:var(", ");line-height:var(", ");}}", "{font-family:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");}", "{font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");}"], tokens.captionGap, CodeWrapper, CodeGroup, tokens.codeItemsGap, classes.largeScreen, ItemInput, tokens.codeItemLargeWidth, tokens.codeItemLargeHeight, tokens.largeScreenFontSize, tokens.largeScreenLineHeight, classes.mediumScreen, ItemInput, tokens.codeItemMediumWidth, tokens.codeItemMediumHeight, tokens.mediumScreenFontSize, tokens.mediumScreenLineHeight, classes.smallScreen, ItemInput, tokens.codeItemSmallWidth, tokens.codeItemSmallHeight, tokens.smallScreenFontSize, tokens.smallScreenLineHeight, ItemInput, tokens.fontFamily, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, CaptionWrapper, tokens.captionFontFamily, tokens.captionFontSize, tokens.captionFontStyle, tokens.captionFontWeight, tokens.captionLetterSpacing, tokens.captionLineHeight);
|
@@ -1,19 +0,0 @@
|
|
1
|
-
[
|
2
|
-
"--plasma-codeinput-caption-gap",
|
3
|
-
"--plasma-codeinput-code-item-gap",
|
4
|
-
"--plasma-codeinput-separator-width",
|
5
|
-
"--plasma-codeinput-item-width",
|
6
|
-
"--plasma-codeinput-item-height",
|
7
|
-
"--plasma-codeinput-font-family",
|
8
|
-
"--plasma-codeinput-font-style",
|
9
|
-
"--plasma-codeinput-font-size",
|
10
|
-
"--plasma-codeinput-font-weight",
|
11
|
-
"--plasma-codeinput-letter-spacing",
|
12
|
-
"--plasma-codeinput-line-height",
|
13
|
-
"--plasma-codeinput-caption-font-family",
|
14
|
-
"--plasma-codeinput-caption-font-style",
|
15
|
-
"--plasma-codeinput-caption-font-size",
|
16
|
-
"--plasma-codeinput-caption-font-weight",
|
17
|
-
"--plasma-codeinput-caption-letter-spacing",
|
18
|
-
"--plasma-codeinput-caption-line-height"
|
19
|
-
]
|
@@ -1,4 +0,0 @@
|
|
1
|
-
import { css } from 'styled-components';
|
2
|
-
import { CaptionWrapper, ItemInput, ItemCircle } from "../../CodeInput.styles";
|
3
|
-
import { classes, tokens } from "../../CodeInput.tokens";
|
4
|
-
export var base = /*#__PURE__*/css(["", "{color:var(", ");&.", "{color:var(", ");}}", "{color:var(", ");background-color:var(", ");box-shadow:inset 0 0 0 var(", ") var(", ");}&:hover{.", "{background-color:var(", ");box-shadow:inset 0 0 0 var(", ") var(", ");}}&:focus-within{", ":focus-within{background-color:var(", ");box-shadow:inset 0 0 0 var(", ") var(", ");}}&& .", "{animation:shakingError 0.3s forwards;}&& .", "{", "{color:var(", ");background-color:var(", ");box-shadow:inset 0 0 0 var(", ") var(", ");}", "{border:var(", ") solid var(", ");&.", "{background-color:var(", ");}}&:focus-within{", "{background-color:var(", ");box-shadow:inset 0 0 0 var(", ") var(", ");}}&.", "{", "{animation:fadeError 0.3s forwards;}}}&& .", "{animation:shakingError 0.3s forwards;}&& .", ",&& .", ":focus-within{color:var(", ");background-color:var(", ");box-shadow:inset 0 0 0 var(", ") var(", ");&.", "{animation:shakingError 0.3s forwards fadeError 0.3s forwards;}}@keyframes shakingError{14%{transform:translateX(-0.125rem);}28%{transform:translateX(0.125rem);}42%{transform:translateX(-0.125rem);}57%{transform:translateX(0.125rem);}71%{transform:translateX(-0.125rem);}85%{transform:translateX(0.125rem);}100%{transform:translateX(-0.125rem);}}@keyframes fadeError{50%{color:var(", ");}100%{color:transparent;}}"], CaptionWrapper, tokens.captionColor, classes.captionError, tokens.captionColorError, ItemInput, tokens.codeColor, tokens.backgroundColor, tokens.borderWidth, tokens.borderColor, classes.hoverEnabled, tokens.backgroundColorHover, tokens.borderWidth, tokens.borderColorHover, ItemInput, tokens.backgroundColorFocus, tokens.borderWidth, tokens.borderColorFocus, classes.codeErrorAnimation, classes.codeError, ItemInput, tokens.codeColorError, tokens.backgroundErrorColor, tokens.borderWidth, tokens.borderErrorColor, ItemCircle, tokens.codeItemCircleBorderWidth, tokens.codeColorError, classes.itemCirlceFilled, tokens.codeColorError, ItemInput, tokens.backgroundErrorColor, tokens.borderWidth, tokens.borderErrorColor, classes.codeErrorFade, ItemInput, classes.itemErrorAnimation, classes.itemError, classes.itemError, tokens.codeColorError, tokens.backgroundErrorColor, tokens.borderWidth, tokens.borderErrorColor, classes.codeErrorFade, tokens.codeColorError);
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import { css } from 'styled-components';
|
2
|
-
import { codeInputTokens as tokens } from "../../../../components/CodeInput";
|
3
|
-
export var config = {
|
4
|
-
defaults: {
|
5
|
-
view: 'default',
|
6
|
-
size: 'l'
|
7
|
-
},
|
8
|
-
variations: {
|
9
|
-
view: {
|
10
|
-
"default": /*#__PURE__*/css(["", ":var(--text-secondary);", ":var(--text-negative);", ":var(--text-primary);", ":var(--text-negative);"], tokens.captionColor, tokens.captionColorError, tokens.codeColor, tokens.codeColorError)
|
11
|
-
},
|
12
|
-
size: {
|
13
|
-
l: /*#__PURE__*/css(["", ":2.5rem;", ":0.75rem;", ":1rem;", ":var(--plasma-typo-dspl-l-font-family);", ":var(--plasma-typo-dspl-l-font-style);", ":var(--plasma-typo-dspl-l-bold-font-weight);", ":var(--plasma-typo-dspl-l-letter-spacing);", ":8rem;", ":8rem;", ":7rem;", ":7rem;", ":5.5rem;", ":5.75rem;", ":var(--plasma-typo-h3-font-family);", ":var(--plasma-typo-h3-font-size);", ":var(--plasma-typo-h3-font-style);", ":var(--plasma-typo-h3-font-weight);", ":var(--plasma-typo-h3-letter-spacing);", ":var(--plasma-typo-h3-line-height);", ":5rem;", ":8rem;", ":4.5rem;", ":7rem;", ":3.5rem;", ":5.75rem;", ":0.125rem;", ":1.5rem;"], tokens.captionGap, tokens.codeItemsGap, tokens.separatorWidth, tokens.fontFamily, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.largeScreenFontSize, tokens.largeScreenLineHeight, tokens.mediumScreenFontSize, tokens.mediumScreenLineHeight, tokens.smallScreenFontSize, tokens.smallScreenLineHeight, tokens.captionFontFamily, tokens.captionFontSize, tokens.captionFontStyle, tokens.captionFontWeight, tokens.captionLetterSpacing, tokens.captionLineHeight, tokens.codeItemLargeWidth, tokens.codeItemLargeHeight, tokens.codeItemMediumWidth, tokens.codeItemMediumHeight, tokens.codeItemSmallWidth, tokens.codeItemSmallHeight, tokens.codeItemCircleBorderWidth, tokens.codeItemCircleSize),
|
14
|
-
m: /*#__PURE__*/css(["", ":1.75rem;", ":0.5rem;", ":1rem;", ":var(--plasma-typo-dspl-m-font-family);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-bold-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":5.5rem;", ":5.75rem;", ":4.5rem;", ":4.75rem;", ":3.5rem;", ":3.75rem;", ":var(--plasma-typo-h4-font-family);", ":var(--plasma-typo-h4-font-size);", ":var(--plasma-typo-h4-font-style);", ":var(--plasma-typo-h4-font-weight);", ":var(--plasma-typo-h4-letter-spacing);", ":var(--plasma-typo-h4-line-height);", ":3.5rem;", ":5.75rem;", ":3rem;", ":4.75rem;", ":2.25rem;", ":3.75rem;", ":0.094rem;", ":1rem;"], tokens.captionGap, tokens.codeItemsGap, tokens.separatorWidth, tokens.fontFamily, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.largeScreenFontSize, tokens.largeScreenLineHeight, tokens.mediumScreenFontSize, tokens.mediumScreenLineHeight, tokens.smallScreenFontSize, tokens.smallScreenLineHeight, tokens.captionFontFamily, tokens.captionFontSize, tokens.captionFontStyle, tokens.captionFontWeight, tokens.captionLetterSpacing, tokens.captionLineHeight, tokens.codeItemLargeWidth, tokens.codeItemLargeHeight, tokens.codeItemMediumWidth, tokens.codeItemMediumHeight, tokens.codeItemSmallWidth, tokens.codeItemSmallHeight, tokens.codeItemCircleBorderWidth, tokens.codeItemCircleSize),
|
15
|
-
s: /*#__PURE__*/css(["", ":1.5rem;", ":0.25rem;", ":0.5rem;", ":var(--plasma-typo-dspl-s-font-family);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":4rem;", ":4.25rem;", ":3rem;", ":3.25rem;", ":2.5rem;", ":2.75rem;", ":var(--plasma-typo-h5-font-family);", ":var(--plasma-typo-h5-font-size);", ":var(--plasma-typo-h5-font-style);", ":var(--plasma-typo-h5-font-weight);", ":var(--plasma-typo-h5-letter-spacing);", ":var(--plasma-typo-h5-line-height);", ":2.5rem;", ":4.25rem;", ":2rem;", ":3.25rem;", ":1.625rem;", ":2.75rem;", ":0.063rem;", ":0.75rem;"], tokens.captionGap, tokens.codeItemsGap, tokens.separatorWidth, tokens.fontFamily, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.largeScreenFontSize, tokens.largeScreenLineHeight, tokens.mediumScreenFontSize, tokens.mediumScreenLineHeight, tokens.smallScreenFontSize, tokens.smallScreenLineHeight, tokens.captionFontFamily, tokens.captionFontSize, tokens.captionFontStyle, tokens.captionFontWeight, tokens.captionLetterSpacing, tokens.captionLineHeight, tokens.codeItemLargeWidth, tokens.codeItemLargeHeight, tokens.codeItemMediumWidth, tokens.codeItemMediumHeight, tokens.codeItemSmallWidth, tokens.codeItemSmallHeight, tokens.codeItemCircleBorderWidth, tokens.codeItemCircleSize)
|
16
|
-
},
|
17
|
-
disabled: {
|
18
|
-
"true": /*#__PURE__*/css(["", ":0.4;"], tokens.disabledOpacity)
|
19
|
-
}
|
20
|
-
}
|
21
|
-
};
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import { codeInputConfig } from "../../../../components/CodeInput";
|
2
|
-
import { component, mergeConfig } from "../../../../engines";
|
3
|
-
import { config } from "./CodeInput.config";
|
4
|
-
var mergedConfig = /*#__PURE__*/mergeConfig(codeInputConfig, config);
|
5
|
-
export var CodeInput = /*#__PURE__*/component(mergedConfig);
|
@@ -1,107 +0,0 @@
|
|
1
|
-
import React, { ComponentProps, useState } from 'react';
|
2
|
-
import type { StoryObj, Meta } from '@storybook/react';
|
3
|
-
import { action } from '@storybook/addon-actions';
|
4
|
-
import { getConfigVariations } from '@salutejs/plasma-sb-utils';
|
5
|
-
|
6
|
-
import { WithTheme } from '../../../_helpers';
|
7
|
-
|
8
|
-
import { CodeInput } from './CodeInput';
|
9
|
-
import { config } from './CodeInput.config';
|
10
|
-
|
11
|
-
const onChange = action('onChange');
|
12
|
-
const onFullCodeEnter = action('onFullCodeEnter');
|
13
|
-
|
14
|
-
const { views, sizes } = getConfigVariations(config);
|
15
|
-
const codeLengths = [4, 5, 6];
|
16
|
-
const captionAlignVariants = ['left', 'center'];
|
17
|
-
const itemErrorBehaviorVariants = ['remove-symbol', 'keep', 'forbid-enter'];
|
18
|
-
const codeErrorBehaviorVariants = ['remove-code', 'keep'];
|
19
|
-
|
20
|
-
const meta: Meta<typeof CodeInput> = {
|
21
|
-
title: 'b2c/Data Entry/CodeInput',
|
22
|
-
component: CodeInput,
|
23
|
-
decorators: [WithTheme],
|
24
|
-
argTypes: {
|
25
|
-
view: {
|
26
|
-
options: views,
|
27
|
-
control: {
|
28
|
-
type: 'select',
|
29
|
-
},
|
30
|
-
},
|
31
|
-
size: {
|
32
|
-
options: sizes,
|
33
|
-
control: {
|
34
|
-
type: 'inline-radio',
|
35
|
-
},
|
36
|
-
},
|
37
|
-
screen: {
|
38
|
-
options: ['large', 'medium', 'small'],
|
39
|
-
control: {
|
40
|
-
type: 'inline-radio',
|
41
|
-
},
|
42
|
-
},
|
43
|
-
captionAlign: {
|
44
|
-
options: captionAlignVariants,
|
45
|
-
control: {
|
46
|
-
type: 'inline-radio',
|
47
|
-
},
|
48
|
-
},
|
49
|
-
codeLength: {
|
50
|
-
options: codeLengths,
|
51
|
-
control: {
|
52
|
-
type: 'inline-radio',
|
53
|
-
},
|
54
|
-
},
|
55
|
-
itemErrorBehavior: {
|
56
|
-
options: itemErrorBehaviorVariants,
|
57
|
-
control: {
|
58
|
-
type: 'inline-radio',
|
59
|
-
},
|
60
|
-
},
|
61
|
-
codeErrorBehavior: {
|
62
|
-
options: codeErrorBehaviorVariants,
|
63
|
-
control: {
|
64
|
-
type: 'inline-radio',
|
65
|
-
},
|
66
|
-
},
|
67
|
-
},
|
68
|
-
parameters: {
|
69
|
-
controls: {
|
70
|
-
exclude: ['view'],
|
71
|
-
},
|
72
|
-
},
|
73
|
-
};
|
74
|
-
|
75
|
-
export default meta;
|
76
|
-
|
77
|
-
type StoryPropsDefault = ComponentProps<typeof CodeInput>;
|
78
|
-
|
79
|
-
const StoryDefault = (args: StoryPropsDefault) => {
|
80
|
-
const [value, setValue] = useState('');
|
81
|
-
|
82
|
-
const handleChange = (newValue: string) => {
|
83
|
-
setValue(newValue);
|
84
|
-
onChange(newValue);
|
85
|
-
};
|
86
|
-
|
87
|
-
return <CodeInput {...args} value={value} onChange={handleChange} onFullCodeEnter={onFullCodeEnter} />;
|
88
|
-
};
|
89
|
-
|
90
|
-
export const Default: StoryObj<StoryPropsDefault> = {
|
91
|
-
args: {
|
92
|
-
view: 'default',
|
93
|
-
size: 'm',
|
94
|
-
codeLength: 6,
|
95
|
-
caption: 'Caption',
|
96
|
-
captionAlign: 'center',
|
97
|
-
width: '',
|
98
|
-
screen: 'medium',
|
99
|
-
isError: false,
|
100
|
-
itemErrorBehavior: 'remove-symbol',
|
101
|
-
codeErrorBehavior: 'remove-code',
|
102
|
-
autoFocus: true,
|
103
|
-
disabled: false,
|
104
|
-
hidden: false,
|
105
|
-
},
|
106
|
-
render: StoryDefault,
|
107
|
-
};
|
@@ -1,21 +0,0 @@
|
|
1
|
-
import { css } from 'styled-components';
|
2
|
-
import { codeInputTokens as tokens } from "../../../../components/CodeInput";
|
3
|
-
export var config = {
|
4
|
-
defaults: {
|
5
|
-
view: 'default',
|
6
|
-
size: 'l'
|
7
|
-
},
|
8
|
-
variations: {
|
9
|
-
view: {
|
10
|
-
"default": /*#__PURE__*/css(["", ":var(--text-secondary);", ":var(--text-negative);", ":var(--text-primary);", ":var(--text-negative);"], tokens.captionColor, tokens.captionColorError, tokens.codeColor, tokens.codeColorError)
|
11
|
-
},
|
12
|
-
size: {
|
13
|
-
l: /*#__PURE__*/css(["", ":2.5rem;", ":0.75rem;", ":1rem;", ":var(--plasma-typo-dspl-l-font-family);", ":var(--plasma-typo-dspl-l-font-style);", ":var(--plasma-typo-dspl-l-bold-font-weight);", ":var(--plasma-typo-dspl-l-letter-spacing);", ":8rem;", ":8rem;", ":7rem;", ":7rem;", ":5.5rem;", ":5.75rem;", ":var(--plasma-typo-h3-font-family);", ":var(--plasma-typo-h3-font-size);", ":var(--plasma-typo-h3-font-style);", ":var(--plasma-typo-h3-font-weight);", ":var(--plasma-typo-h3-letter-spacing);", ":var(--plasma-typo-h3-line-height);", ":5rem;", ":8rem;", ":4.5rem;", ":7rem;", ":3.5rem;", ":5.75rem;", ":0.125rem;", ":1.5rem;"], tokens.captionGap, tokens.codeItemsGap, tokens.separatorWidth, tokens.fontFamily, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.largeScreenFontSize, tokens.largeScreenLineHeight, tokens.mediumScreenFontSize, tokens.mediumScreenLineHeight, tokens.smallScreenFontSize, tokens.smallScreenLineHeight, tokens.captionFontFamily, tokens.captionFontSize, tokens.captionFontStyle, tokens.captionFontWeight, tokens.captionLetterSpacing, tokens.captionLineHeight, tokens.codeItemLargeWidth, tokens.codeItemLargeHeight, tokens.codeItemMediumWidth, tokens.codeItemMediumHeight, tokens.codeItemSmallWidth, tokens.codeItemSmallHeight, tokens.codeItemCircleBorderWidth, tokens.codeItemCircleSize),
|
14
|
-
m: /*#__PURE__*/css(["", ":1.75rem;", ":0.5rem;", ":1rem;", ":var(--plasma-typo-dspl-m-font-family);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-bold-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":5.5rem;", ":5.75rem;", ":4.5rem;", ":4.75rem;", ":3.5rem;", ":3.75rem;", ":var(--plasma-typo-h4-font-family);", ":var(--plasma-typo-h4-font-size);", ":var(--plasma-typo-h4-font-style);", ":var(--plasma-typo-h4-font-weight);", ":var(--plasma-typo-h4-letter-spacing);", ":var(--plasma-typo-h4-line-height);", ":3.5rem;", ":5.75rem;", ":3rem;", ":4.75rem;", ":2.25rem;", ":3.75rem;", ":0.09375rem;", ":1rem;"], tokens.captionGap, tokens.codeItemsGap, tokens.separatorWidth, tokens.fontFamily, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.largeScreenFontSize, tokens.largeScreenLineHeight, tokens.mediumScreenFontSize, tokens.mediumScreenLineHeight, tokens.smallScreenFontSize, tokens.smallScreenLineHeight, tokens.captionFontFamily, tokens.captionFontSize, tokens.captionFontStyle, tokens.captionFontWeight, tokens.captionLetterSpacing, tokens.captionLineHeight, tokens.codeItemLargeWidth, tokens.codeItemLargeHeight, tokens.codeItemMediumWidth, tokens.codeItemMediumHeight, tokens.codeItemSmallWidth, tokens.codeItemSmallHeight, tokens.codeItemCircleBorderWidth, tokens.codeItemCircleSize),
|
15
|
-
s: /*#__PURE__*/css(["", ":1.5rem;", ":0.25rem;", ":0.5rem;", ":var(--plasma-typo-dspl-s-font-family);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":4rem;", ":4.25rem;", ":3rem;", ":3.25rem;", ":2.5rem;", ":2.75rem;", ":var(--plasma-typo-h5-font-family);", ":var(--plasma-typo-h5-font-size);", ":var(--plasma-typo-h5-font-style);", ":var(--plasma-typo-h5-font-weight);", ":var(--plasma-typo-h5-letter-spacing);", ":var(--plasma-typo-h5-line-height);", ":2.5rem;", ":4.25rem;", ":2rem;", ":3.25rem;", ":1.625rem;", ":2.75rem;", ":0.0625rem;", ":0.75rem;"], tokens.captionGap, tokens.codeItemsGap, tokens.separatorWidth, tokens.fontFamily, tokens.fontStyle, tokens.fontWeight, tokens.letterSpacing, tokens.largeScreenFontSize, tokens.largeScreenLineHeight, tokens.mediumScreenFontSize, tokens.mediumScreenLineHeight, tokens.smallScreenFontSize, tokens.smallScreenLineHeight, tokens.captionFontFamily, tokens.captionFontSize, tokens.captionFontStyle, tokens.captionFontWeight, tokens.captionLetterSpacing, tokens.captionLineHeight, tokens.codeItemLargeWidth, tokens.codeItemLargeHeight, tokens.codeItemMediumWidth, tokens.codeItemMediumHeight, tokens.codeItemSmallWidth, tokens.codeItemSmallHeight, tokens.codeItemCircleBorderWidth, tokens.codeItemCircleSize)
|
16
|
-
},
|
17
|
-
disabled: {
|
18
|
-
"true": /*#__PURE__*/css(["", ":0.4;"], tokens.disabledOpacity)
|
19
|
-
}
|
20
|
-
}
|
21
|
-
};
|
@@ -1,5 +0,0 @@
|
|
1
|
-
import { codeInputConfig } from "../../../../components/CodeInput";
|
2
|
-
import { component, mergeConfig } from "../../../../engines";
|
3
|
-
import { config } from "./CodeInput.config";
|
4
|
-
var mergedConfig = /*#__PURE__*/mergeConfig(codeInputConfig, config);
|
5
|
-
export var CodeInput = /*#__PURE__*/component(mergedConfig);
|
@@ -1,107 +0,0 @@
|
|
1
|
-
import React, { ComponentProps, useState } from 'react';
|
2
|
-
import type { StoryObj, Meta } from '@storybook/react';
|
3
|
-
import { action } from '@storybook/addon-actions';
|
4
|
-
import { getConfigVariations } from '@salutejs/plasma-sb-utils';
|
5
|
-
|
6
|
-
import { WithTheme } from '../../../_helpers';
|
7
|
-
|
8
|
-
import { CodeInput } from './CodeInput';
|
9
|
-
import { config } from './CodeInput.config';
|
10
|
-
|
11
|
-
const onChange = action('onChange');
|
12
|
-
const onFullCodeEnter = action('onFullCodeEnter');
|
13
|
-
|
14
|
-
const { views, sizes } = getConfigVariations(config);
|
15
|
-
const codeLengths = [4, 5, 6];
|
16
|
-
const captionAlignVariants = ['left', 'center'];
|
17
|
-
const itemErrorBehaviorVariants = ['remove-symbol', 'keep', 'forbid-enter'];
|
18
|
-
const codeErrorBehaviorVariants = ['remove-code', 'keep'];
|
19
|
-
|
20
|
-
const meta: Meta<typeof CodeInput> = {
|
21
|
-
title: 'web/Data Entry/CodeInput',
|
22
|
-
component: CodeInput,
|
23
|
-
decorators: [WithTheme],
|
24
|
-
argTypes: {
|
25
|
-
view: {
|
26
|
-
options: views,
|
27
|
-
control: {
|
28
|
-
type: 'select',
|
29
|
-
},
|
30
|
-
},
|
31
|
-
size: {
|
32
|
-
options: sizes,
|
33
|
-
control: {
|
34
|
-
type: 'inline-radio',
|
35
|
-
},
|
36
|
-
},
|
37
|
-
screen: {
|
38
|
-
options: ['large', 'medium', 'small'],
|
39
|
-
control: {
|
40
|
-
type: 'inline-radio',
|
41
|
-
},
|
42
|
-
},
|
43
|
-
captionAlign: {
|
44
|
-
options: captionAlignVariants,
|
45
|
-
control: {
|
46
|
-
type: 'inline-radio',
|
47
|
-
},
|
48
|
-
},
|
49
|
-
codeLength: {
|
50
|
-
options: codeLengths,
|
51
|
-
control: {
|
52
|
-
type: 'inline-radio',
|
53
|
-
},
|
54
|
-
},
|
55
|
-
itemErrorBehavior: {
|
56
|
-
options: itemErrorBehaviorVariants,
|
57
|
-
control: {
|
58
|
-
type: 'inline-radio',
|
59
|
-
},
|
60
|
-
},
|
61
|
-
codeErrorBehavior: {
|
62
|
-
options: codeErrorBehaviorVariants,
|
63
|
-
control: {
|
64
|
-
type: 'inline-radio',
|
65
|
-
},
|
66
|
-
},
|
67
|
-
},
|
68
|
-
parameters: {
|
69
|
-
controls: {
|
70
|
-
exclude: ['view'],
|
71
|
-
},
|
72
|
-
},
|
73
|
-
};
|
74
|
-
|
75
|
-
export default meta;
|
76
|
-
|
77
|
-
type StoryPropsDefault = ComponentProps<typeof CodeInput>;
|
78
|
-
|
79
|
-
const StoryDefault = (args: StoryPropsDefault) => {
|
80
|
-
const [value, setValue] = useState('');
|
81
|
-
|
82
|
-
const handleChange = (newValue: string) => {
|
83
|
-
setValue(newValue);
|
84
|
-
onChange(newValue);
|
85
|
-
};
|
86
|
-
|
87
|
-
return <CodeInput {...args} value={value} onChange={handleChange} onFullCodeEnter={onFullCodeEnter} />;
|
88
|
-
};
|
89
|
-
|
90
|
-
export const Default: StoryObj<StoryPropsDefault> = {
|
91
|
-
args: {
|
92
|
-
view: 'default',
|
93
|
-
size: 'm',
|
94
|
-
codeLength: 6,
|
95
|
-
caption: 'Caption',
|
96
|
-
captionAlign: 'center',
|
97
|
-
width: '',
|
98
|
-
screen: 'medium',
|
99
|
-
isError: false,
|
100
|
-
itemErrorBehavior: 'remove-symbol',
|
101
|
-
codeErrorBehavior: 'remove-code',
|
102
|
-
autoFocus: true,
|
103
|
-
disabled: false,
|
104
|
-
hidden: false,
|
105
|
-
},
|
106
|
-
render: StoryDefault,
|
107
|
-
};
|
@@ -1,67 +0,0 @@
|
|
1
|
-
import React from 'react';
|
2
|
-
import type { RootProps } from '../../../src/engines';
|
3
|
-
import type { CodeInputProps } from './CodeInput.types';
|
4
|
-
export declare const codeInputRoot: (Root: RootProps<HTMLDivElement, CodeInputProps>) => React.ForwardRefExoticComponent<{
|
5
|
-
value?: string | undefined;
|
6
|
-
placeholder?: string | undefined;
|
7
|
-
autoFocus?: boolean | undefined;
|
8
|
-
codeLength?: 4 | 6 | 5 | undefined;
|
9
|
-
caption?: React.ReactNode;
|
10
|
-
captionAlign?: "center" | "left" | undefined;
|
11
|
-
hidden?: boolean | undefined;
|
12
|
-
view?: string | undefined;
|
13
|
-
size?: string | undefined;
|
14
|
-
screen?: "small" | "medium" | "large" | undefined;
|
15
|
-
disabled?: boolean | undefined;
|
16
|
-
isError?: boolean | undefined;
|
17
|
-
width?: string | number | undefined;
|
18
|
-
setIsError?: React.Dispatch<React.SetStateAction<boolean>> | undefined;
|
19
|
-
allowedSymbols?: string | RegExp | undefined;
|
20
|
-
itemErrorBehavior?: import("./CodeInput.types").ItemErrorBehavior | undefined;
|
21
|
-
codeErrorBehavior?: import("./CodeInput.types").CodeErrorBehavior | undefined;
|
22
|
-
onChange?: ((value: string) => void) | undefined;
|
23
|
-
onFullCodeEnter?: ((code: string) => void) | undefined;
|
24
|
-
} & Pick<React.InputHTMLAttributes<HTMLInputElement>, "aria-label" | "autoComplete"> & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<HTMLInputElement>>;
|
25
|
-
export declare const codeInputConfig: {
|
26
|
-
name: string;
|
27
|
-
tag: string;
|
28
|
-
layout: (Root: RootProps<HTMLDivElement, CodeInputProps>) => React.ForwardRefExoticComponent<{
|
29
|
-
value?: string | undefined;
|
30
|
-
placeholder?: string | undefined;
|
31
|
-
autoFocus?: boolean | undefined;
|
32
|
-
codeLength?: 4 | 6 | 5 | undefined;
|
33
|
-
caption?: React.ReactNode;
|
34
|
-
captionAlign?: "center" | "left" | undefined;
|
35
|
-
hidden?: boolean | undefined;
|
36
|
-
view?: string | undefined;
|
37
|
-
size?: string | undefined;
|
38
|
-
screen?: "small" | "medium" | "large" | undefined;
|
39
|
-
disabled?: boolean | undefined;
|
40
|
-
isError?: boolean | undefined;
|
41
|
-
width?: string | number | undefined;
|
42
|
-
setIsError?: React.Dispatch<React.SetStateAction<boolean>> | undefined;
|
43
|
-
allowedSymbols?: string | RegExp | undefined;
|
44
|
-
itemErrorBehavior?: import("./CodeInput.types").ItemErrorBehavior | undefined;
|
45
|
-
codeErrorBehavior?: import("./CodeInput.types").CodeErrorBehavior | undefined;
|
46
|
-
onChange?: ((value: string) => void) | undefined;
|
47
|
-
onFullCodeEnter?: ((code: string) => void) | undefined;
|
48
|
-
} & Pick<React.InputHTMLAttributes<HTMLInputElement>, "aria-label" | "autoComplete"> & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> & React.RefAttributes<HTMLInputElement>>;
|
49
|
-
base: import("@linaria/core").LinariaClassName;
|
50
|
-
variations: {
|
51
|
-
view: {
|
52
|
-
css: import("@linaria/core").LinariaClassName;
|
53
|
-
};
|
54
|
-
size: {
|
55
|
-
css: import("@linaria/core").LinariaClassName;
|
56
|
-
};
|
57
|
-
disabled: {
|
58
|
-
css: import("@linaria/core").LinariaClassName;
|
59
|
-
attrs: boolean;
|
60
|
-
};
|
61
|
-
};
|
62
|
-
defaults: {
|
63
|
-
size: string;
|
64
|
-
view: string;
|
65
|
-
};
|
66
|
-
};
|
67
|
-
//# sourceMappingURL=CodeInput.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CodeInput.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyE,MAAM,OAAO,CAAC;AAG9F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAkBxD,eAAO,MAAM,aAAa,SAAU,UAAU,cAAc,EAAE,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;sLAgSxE,CAAC;AAEN,eAAO,MAAM,eAAe;;;mBAlSQ,UAAU,cAAc,EAAE,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuT5E,CAAC"}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
/// <reference types="react" />
|
2
|
-
export declare const base: import("@linaria/core").LinariaClassName;
|
3
|
-
export declare const CodeWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
4
|
-
export declare const CodeGroup: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
5
|
-
export declare const Separator: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
6
|
-
export declare const ItemInput: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLInputElement> & import("react").InputHTMLAttributes<HTMLInputElement> & {
|
7
|
-
hide?: boolean | undefined;
|
8
|
-
}>;
|
9
|
-
export declare const ItemWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
10
|
-
export declare const ItemCircle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
11
|
-
filled?: boolean | undefined;
|
12
|
-
}>;
|
13
|
-
export declare const CaptionWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
14
|
-
captionAlign: 'left' | 'center';
|
15
|
-
widthValue?: string | undefined;
|
16
|
-
}>;
|
17
|
-
//# sourceMappingURL=CodeInput.styles.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CodeInput.styles.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.styles.ts"],"names":[],"mappings":";AAKA,eAAO,MAAM,IAAI,0CAUhB,CAAC;AAEF,eAAO,MAAM,WAAW,qKAGvB,CAAC;AAEF,eAAO,MAAM,SAAS,qKAGrB,CAAC;AAEF,eAAO,MAAM,SAAS,qKAErB,CAAC;AAEF,eAAO,MAAM,SAAS;;EAWrB,CAAC;AAEF,eAAO,MAAM,WAAW,qKAEvB,CAAC;AAEF,eAAO,MAAM,UAAU;;EActB,CAAC;AAEF,eAAO,MAAM,cAAc;kBAA8B,MAAM,GAAG,QAAQ;;EAKzE,CAAC"}
|
@@ -1,65 +0,0 @@
|
|
1
|
-
export declare const classes: {
|
2
|
-
itemError: string;
|
3
|
-
itemErrorAnimation: string;
|
4
|
-
itemErrorFade: string;
|
5
|
-
itemCirlceFilled: string;
|
6
|
-
captionError: string;
|
7
|
-
codeError: string;
|
8
|
-
codeErrorAnimation: string;
|
9
|
-
codeErrorFade: string;
|
10
|
-
captionAlignLeft: string;
|
11
|
-
hoverEnabled: string;
|
12
|
-
segmented: string;
|
13
|
-
default: string;
|
14
|
-
largeScreen: string;
|
15
|
-
mediumScreen: string;
|
16
|
-
smallScreen: string;
|
17
|
-
disabled: string;
|
18
|
-
};
|
19
|
-
export declare const tokens: {
|
20
|
-
captionGap: string;
|
21
|
-
codeItemsGap: string;
|
22
|
-
separatorWidth: string;
|
23
|
-
codeItemLargeWidth: string;
|
24
|
-
codeItemLargeHeight: string;
|
25
|
-
codeItemMediumWidth: string;
|
26
|
-
codeItemMediumHeight: string;
|
27
|
-
codeItemSmallWidth: string;
|
28
|
-
codeItemSmallHeight: string;
|
29
|
-
codeItemCircleSize: string;
|
30
|
-
codeItemCircleBorderWidth: string;
|
31
|
-
fontStyle: string;
|
32
|
-
fontFamily: string;
|
33
|
-
fontWeight: string;
|
34
|
-
letterSpacing: string;
|
35
|
-
largeScreenFontSize: string;
|
36
|
-
largeScreenLineHeight: string;
|
37
|
-
mediumScreenFontSize: string;
|
38
|
-
mediumScreenLineHeight: string;
|
39
|
-
smallScreenFontSize: string;
|
40
|
-
smallScreenLineHeight: string;
|
41
|
-
captionFontFamily: string;
|
42
|
-
captionFontSize: string;
|
43
|
-
captionFontStyle: string;
|
44
|
-
captionFontWeight: string;
|
45
|
-
captionLetterSpacing: string;
|
46
|
-
captionLineHeight: string;
|
47
|
-
borderRadius: string;
|
48
|
-
borderRadiusSegmented: string;
|
49
|
-
segmentedSideBorderRadius: string;
|
50
|
-
captionColor: string;
|
51
|
-
captionColorError: string;
|
52
|
-
codeColor: string;
|
53
|
-
codeColorError: string;
|
54
|
-
backgroundColor: string;
|
55
|
-
backgroundColorHover: string;
|
56
|
-
backgroundColorFocus: string;
|
57
|
-
backgroundErrorColor: string;
|
58
|
-
borderWidth: string;
|
59
|
-
borderColor: string;
|
60
|
-
borderColorHover: string;
|
61
|
-
borderColorFocus: string;
|
62
|
-
borderErrorColor: string;
|
63
|
-
disabledOpacity: string;
|
64
|
-
};
|
65
|
-
//# sourceMappingURL=CodeInput.tokens.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CodeInput.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;CAsBnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6DlB,CAAC"}
|
@@ -1,96 +0,0 @@
|
|
1
|
-
import type { Dispatch, HTMLAttributes, InputHTMLAttributes, ReactNode, SetStateAction } from 'react';
|
2
|
-
export declare type ItemErrorBehavior = 'remove-symbol' | 'keep' | 'remove-code' | 'forbid-enter';
|
3
|
-
export declare type CodeErrorBehavior = 'remove-code' | 'keep';
|
4
|
-
export declare type CodeInputProps = {
|
5
|
-
/**
|
6
|
-
* Значение поля ввода
|
7
|
-
*/
|
8
|
-
value?: string;
|
9
|
-
/**
|
10
|
-
* Строка равная, длине кода или же один символ,
|
11
|
-
* для отображения в качестве placeholder
|
12
|
-
*/
|
13
|
-
placeholder?: string;
|
14
|
-
/**
|
15
|
-
* Автофокус на компоненте
|
16
|
-
*/
|
17
|
-
autoFocus?: boolean;
|
18
|
-
/**
|
19
|
-
* Длина кода
|
20
|
-
* @default 6
|
21
|
-
*/
|
22
|
-
codeLength?: 4 | 5 | 6;
|
23
|
-
/**
|
24
|
-
* Подпись к компоненту
|
25
|
-
*/
|
26
|
-
caption?: ReactNode;
|
27
|
-
/**
|
28
|
-
* Выравнивание подписи
|
29
|
-
* @default left
|
30
|
-
*/
|
31
|
-
captionAlign?: 'left' | 'center';
|
32
|
-
/**
|
33
|
-
* Скрытые поля
|
34
|
-
*/
|
35
|
-
hidden?: boolean;
|
36
|
-
/**
|
37
|
-
* Вид компонента
|
38
|
-
*/
|
39
|
-
view?: string;
|
40
|
-
/**
|
41
|
-
* Размер компонента
|
42
|
-
*/
|
43
|
-
size?: string;
|
44
|
-
/**
|
45
|
-
* Размер экрана
|
46
|
-
*/
|
47
|
-
screen?: 'large' | 'medium' | 'small';
|
48
|
-
/**
|
49
|
-
* Компонент не активен
|
50
|
-
*/
|
51
|
-
disabled?: boolean;
|
52
|
-
/**
|
53
|
-
* Флаг ошибки кода
|
54
|
-
*/
|
55
|
-
isError?: boolean;
|
56
|
-
/**
|
57
|
-
* Ширина компонента
|
58
|
-
* @description
|
59
|
-
* Значение может принимать строку с единицой измерения CSS (px, rem и тд.).
|
60
|
-
* Если передано число без единицы измерения - рассчитывается в rem.
|
61
|
-
*/
|
62
|
-
width?: string | number;
|
63
|
-
/**
|
64
|
-
* Колбек для установки флага ошибки
|
65
|
-
*/
|
66
|
-
setIsError?: Dispatch<SetStateAction<boolean>>;
|
67
|
-
/**
|
68
|
-
* Регулярное выражение или строка, по которой проверяется символ при вводе
|
69
|
-
* @default '^\\d+$' - только цифры
|
70
|
-
*/
|
71
|
-
allowedSymbols?: string | RegExp;
|
72
|
-
/**
|
73
|
-
* Поведение элемента поля ввода, при вводе некорректного значения
|
74
|
-
* - `remove-symbol` - проигрывается анимация ошибки, значение элемента очищается
|
75
|
-
* - `keep` - проигрывается анимация ошибки, значение остается
|
76
|
-
* - `remove-code` - проигрывается анимация ошибки, значение всего поля очищается
|
77
|
-
* @default 'remove-symbol'
|
78
|
-
*/
|
79
|
-
itemErrorBehavior?: ItemErrorBehavior;
|
80
|
-
/**
|
81
|
-
* Поведение элемента поля ввода, при вводе некорректного значения
|
82
|
-
* - `remove-code` - проигрывается анимация ошибки, значение всего поля очищается
|
83
|
-
* - `keep` - проигрывается анимация ошибки, значение остается
|
84
|
-
* @default 'remove-code'
|
85
|
-
*/
|
86
|
-
codeErrorBehavior?: CodeErrorBehavior;
|
87
|
-
/**
|
88
|
-
* Коллбек, вызываемый при изменении значения кода
|
89
|
-
*/
|
90
|
-
onChange?: (value: string) => void;
|
91
|
-
/**
|
92
|
-
* Коллбек, вызываемый при вводе полного значения в поле
|
93
|
-
*/
|
94
|
-
onFullCodeEnter?: (code: string) => void;
|
95
|
-
} & Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-label' | 'autoComplete'> & Omit<HTMLAttributes<HTMLDivElement>, 'onChange'>;
|
96
|
-
//# sourceMappingURL=CodeInput.types.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"CodeInput.types.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/CodeInput.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,mBAAmB,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEtG,oBAAY,iBAAiB,GAAG,eAAe,GAAG,MAAM,GAAG,aAAa,GAAG,cAAc,CAAC;AAC1F,oBAAY,iBAAiB,GAAG,aAAa,GAAG,MAAM,CAAC;AAEvD,oBAAY,cAAc,GAAG;IACzB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IACjC;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;IACtC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;OAEG;IACH,UAAU,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IAC/C;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACjC;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;OAEG;IACH,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C,GAAG,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,YAAY,GAAG,cAAc,CAAC,GAC1E,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,CAAC"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/CodeInput/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
@@ -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,UAAgE,CAAC;AAC5F,eAAO,MAAM,aAAa,cAAc,CAAC;AAEzC,eAAO,MAAM,iBAAiB,MAAM,CAAC"}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
import { Dispatch, MutableRefObject, SetStateAction } from 'react';
|
2
|
-
import type { CodeErrorBehavior } from '../CodeInput.types';
|
3
|
-
declare type ValidateSymbolsArgs = {
|
4
|
-
codeLength: number;
|
5
|
-
codeErrorBehavior: CodeErrorBehavior;
|
6
|
-
currentCode: Array<string>;
|
7
|
-
inputContainerRef: MutableRefObject<HTMLDivElement | null>;
|
8
|
-
inputRefs: MutableRefObject<Array<HTMLInputElement | null>>;
|
9
|
-
captionRef: MutableRefObject<HTMLDivElement | null>;
|
10
|
-
setCode: Dispatch<SetStateAction<Array<string>>>;
|
11
|
-
codeSetter: (newCode: Array<string>) => void;
|
12
|
-
};
|
13
|
-
export declare const handleCodeError: ({ codeLength, codeErrorBehavior, currentCode, inputRefs, inputContainerRef, captionRef, setCode, codeSetter, }: ValidateSymbolsArgs) => void;
|
14
|
-
export {};
|
15
|
-
//# sourceMappingURL=handleCodeError.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"handleCodeError.d.ts","sourceRoot":"","sources":["../../../../src/components/CodeInput/utils/handleCodeError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAM5D,aAAK,mBAAmB,GAAG;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,WAAW,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3B,iBAAiB,EAAE,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC3D,SAAS,EAAE,gBAAgB,CAAC,KAAK,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC,CAAC;IAC5D,UAAU,EAAE,gBAAgB,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACpD,OAAO,EAAE,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IACjD,UAAU,EAAE,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,eAAe,mHASzB,mBAAmB,SA8CrB,CAAC"}
|