@snack-uikit/fields 0.22.2 → 0.23.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +8 -0
- package/dist/components/FieldDate/FieldDate.d.ts +1 -1
- package/dist/components/FieldDate/FieldDate.js +2 -2
- package/dist/components/FieldDate/styles.module.css +3 -3
- package/dist/components/FieldDecorator/FieldDecorator.d.ts +1 -1
- package/dist/components/FieldDecorator/FieldDecorator.js +2 -2
- package/dist/components/FieldDecorator/Header.d.ts +3 -1
- package/dist/components/FieldDecorator/Header.js +2 -2
- package/dist/components/FieldDecorator/styles.module.css +48 -11
- package/dist/components/FieldDecorator/utils.d.ts +2 -1
- package/dist/components/FieldDecorator/utils.js +2 -1
- package/dist/components/FieldSecure/FieldSecure.d.ts +1 -1
- package/dist/components/FieldSecure/FieldSecure.js +2 -2
- package/dist/components/FieldSelect/styles.module.css +5 -5
- package/dist/components/FieldSelect/types.d.ts +1 -1
- package/dist/components/FieldSlider/FieldSlider.d.ts +1 -1
- package/dist/components/FieldSlider/FieldSlider.js +2 -2
- package/dist/components/FieldSlider/styles.module.css +1 -1
- package/dist/components/FieldStepper/FieldStepper.d.ts +1 -1
- package/dist/components/FieldStepper/FieldStepper.js +2 -2
- package/dist/components/FieldText/FieldText.d.ts +1 -1
- package/dist/components/FieldText/FieldText.js +2 -2
- package/dist/components/FieldTextArea/FieldTextArea.d.ts +1 -1
- package/dist/components/FieldTextArea/FieldTextArea.js +2 -2
- package/dist/helperComponents/ButtonCopyValue/styles.module.css +6 -6
- package/dist/helperComponents/ButtonHideValue/ButtonHideValue.js +1 -1
- package/dist/helperComponents/ButtonHideValue/styles.module.css +6 -6
- package/dist/helperComponents/FieldContainerPrivate/styles.module.css +11 -11
- package/dist/helperComponents/TextArea/styles.module.css +6 -6
- package/package.json +3 -3
- package/src/components/FieldDate/FieldDate.tsx +4 -1
- package/src/components/FieldDecorator/FieldDecorator.tsx +2 -0
- package/src/components/FieldDecorator/Header.tsx +10 -1
- package/src/components/FieldDecorator/styles.module.scss +38 -19
- package/src/components/FieldDecorator/utils.ts +2 -0
- package/src/components/FieldSecure/FieldSecure.tsx +3 -0
- package/src/components/FieldSelect/types.ts +1 -0
- package/src/components/FieldSlider/FieldSlider.tsx +11 -1
- package/src/components/FieldStepper/FieldStepper.tsx +3 -0
- package/src/components/FieldText/FieldText.tsx +3 -0
- package/src/components/FieldTextArea/FieldTextArea.tsx +3 -0
- package/src/helperComponents/ButtonHideValue/ButtonHideValue.tsx +4 -4
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
justify-content:center;
|
|
5
5
|
margin:0;
|
|
6
6
|
padding:0;
|
|
7
|
-
color:var(--sys-neutral-text-light, #
|
|
7
|
+
color:var(--sys-neutral-text-light, #8b8e9b);
|
|
8
8
|
background-color:transparent;
|
|
9
9
|
border:none;
|
|
10
10
|
}
|
|
@@ -28,20 +28,20 @@
|
|
|
28
28
|
}
|
|
29
29
|
.buttonCopyValue:hover{
|
|
30
30
|
cursor:pointer;
|
|
31
|
-
color:var(--sys-neutral-text-support, #
|
|
31
|
+
color:var(--sys-neutral-text-support, #6d707f);
|
|
32
32
|
}
|
|
33
33
|
.buttonCopyValue:focus-visible{
|
|
34
34
|
outline-width:var(--border-state-focus-s-border-width, 2px);
|
|
35
35
|
outline-style:var(--border-state-focus-s-border-style, solid);
|
|
36
36
|
outline-color:var(--border-state-focus-s-border-color, );
|
|
37
|
-
color:var(--sys-neutral-text-support, #
|
|
38
|
-
outline-color:var(--sys-available-complementary, #
|
|
37
|
+
color:var(--sys-neutral-text-support, #6d707f);
|
|
38
|
+
outline-color:var(--sys-available-complementary, #15151b);
|
|
39
39
|
outline-offset:var(--spacing-state-focus-offset, 2px);
|
|
40
40
|
}
|
|
41
41
|
.buttonCopyValue:active{
|
|
42
|
-
color:var(--sys-neutral-text-main, #
|
|
42
|
+
color:var(--sys-neutral-text-main, #33343f);
|
|
43
43
|
}
|
|
44
44
|
.buttonCopyValue[data-disabled]{
|
|
45
45
|
cursor:not-allowed;
|
|
46
|
-
color:var(--sys-neutral-text-disabled, #
|
|
46
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
47
47
|
}
|
|
@@ -11,5 +11,5 @@ export const ButtonHideValue = forwardRef(({ size, onClick, hidden, disabled, ta
|
|
|
11
11
|
event.stopPropagation();
|
|
12
12
|
onClick(event);
|
|
13
13
|
};
|
|
14
|
-
return (_jsx("button", { className: styles.buttonHideValue, "data-size": size, "data-disabled": disabled || undefined, disabled: disabled, onClick: handleClick, "data-test-id": 'button-hide-value', ref: ref, onKeyDown: onKeyDown, type: 'button', tabIndex: disabled ? -1 : tabIndex, children: hidden ? (_jsxs(_Fragment, { children: [size === BUTTON_SIZE.S && _jsx(
|
|
14
|
+
return (_jsx("button", { className: styles.buttonHideValue, "data-size": size, "data-disabled": disabled || undefined, disabled: disabled, onClick: handleClick, "data-test-id": 'button-hide-value', ref: ref, onKeyDown: onKeyDown, type: 'button', tabIndex: disabled ? -1 : tabIndex, children: hidden ? (_jsxs(_Fragment, { children: [size === BUTTON_SIZE.S && _jsx(EyeSVG, { size: 16 }), size === BUTTON_SIZE.M && _jsx(EyeSVG, {})] })) : (_jsxs(_Fragment, { children: [size === BUTTON_SIZE.S && _jsx(EyeClosedSVG, { size: 16 }), size === BUTTON_SIZE.M && _jsx(EyeClosedSVG, {})] })) }));
|
|
15
15
|
});
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
justify-content:center;
|
|
5
5
|
margin:0;
|
|
6
6
|
padding:0;
|
|
7
|
-
color:var(--sys-neutral-text-light, #
|
|
7
|
+
color:var(--sys-neutral-text-light, #8b8e9b);
|
|
8
8
|
background-color:transparent;
|
|
9
9
|
border:none;
|
|
10
10
|
}
|
|
@@ -28,20 +28,20 @@
|
|
|
28
28
|
}
|
|
29
29
|
.buttonHideValue:hover{
|
|
30
30
|
cursor:pointer;
|
|
31
|
-
color:var(--sys-neutral-text-support, #
|
|
31
|
+
color:var(--sys-neutral-text-support, #6d707f);
|
|
32
32
|
}
|
|
33
33
|
.buttonHideValue:focus-visible{
|
|
34
34
|
outline-width:var(--border-state-focus-s-border-width, 2px);
|
|
35
35
|
outline-style:var(--border-state-focus-s-border-style, solid);
|
|
36
36
|
outline-color:var(--border-state-focus-s-border-color, );
|
|
37
|
-
color:var(--sys-neutral-text-support, #
|
|
38
|
-
outline-color:var(--sys-available-complementary, #
|
|
37
|
+
color:var(--sys-neutral-text-support, #6d707f);
|
|
38
|
+
outline-color:var(--sys-available-complementary, #15151b);
|
|
39
39
|
outline-offset:var(--spacing-state-focus-offset, 2px);
|
|
40
40
|
}
|
|
41
41
|
.buttonHideValue:active{
|
|
42
|
-
color:var(--sys-neutral-text-main, #
|
|
42
|
+
color:var(--sys-neutral-text-main, #33343f);
|
|
43
43
|
}
|
|
44
44
|
.buttonHideValue[data-disabled]{
|
|
45
45
|
cursor:not-allowed;
|
|
46
|
-
color:var(--sys-neutral-text-disabled, #
|
|
46
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
47
47
|
}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
border-style:solid;
|
|
8
8
|
}
|
|
9
9
|
.container[data-validation=default]{
|
|
10
|
-
background-color:var(--sys-neutral-background1-level, #
|
|
11
|
-
border-color:var(--sys-neutral-decor-default, #
|
|
10
|
+
background-color:var(--sys-neutral-background1-level, #fdfdfd);
|
|
11
|
+
border-color:var(--sys-neutral-decor-default, #dde0ea);
|
|
12
12
|
}
|
|
13
13
|
.container[data-validation=default]:hover{
|
|
14
14
|
background-color:var(--sys-neutral-background2-level, #ffffff);
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
outline-style:var(--border-state-focus-m-border-style, solid);
|
|
52
52
|
outline-color:var(--border-state-focus-m-border-color, );
|
|
53
53
|
background-color:var(--sys-neutral-background2-level, #ffffff);
|
|
54
|
-
border-color:var(--sys-yellow-accent-default, #
|
|
54
|
+
border-color:var(--sys-yellow-accent-default, #ffc443);
|
|
55
55
|
outline-color:var(--sys-yellow-decor-activated, #e5c878);
|
|
56
56
|
}
|
|
57
57
|
.container[data-validation=success]{
|
|
@@ -181,15 +181,15 @@
|
|
|
181
181
|
cursor:default;
|
|
182
182
|
}
|
|
183
183
|
.container[data-readonly], .container[data-readonly]:hover{
|
|
184
|
-
background-color:var(--sys-neutral-decor-disabled, #
|
|
185
|
-
border-color:var(--sys-neutral-decor-disabled, #
|
|
184
|
+
background-color:var(--sys-neutral-decor-disabled, #e6e8ef);
|
|
185
|
+
border-color:var(--sys-neutral-decor-disabled, #e6e8ef);
|
|
186
186
|
}
|
|
187
187
|
.container[data-readonly]:focus-within, .container[data-readonly][data-focused]{
|
|
188
188
|
outline-width:var(--border-state-focus-m-border-width, 3px);
|
|
189
189
|
outline-style:var(--border-state-focus-m-border-style, solid);
|
|
190
190
|
outline-color:var(--border-state-focus-m-border-color, );
|
|
191
|
-
background-color:var(--sys-neutral-decor-disabled, #
|
|
192
|
-
border-color:var(--sys-neutral-decor-disabled, #
|
|
191
|
+
background-color:var(--sys-neutral-decor-disabled, #e6e8ef);
|
|
192
|
+
border-color:var(--sys-neutral-decor-disabled, #e6e8ef);
|
|
193
193
|
outline:none;
|
|
194
194
|
}
|
|
195
195
|
.container[data-disabled],
|
|
@@ -198,18 +198,18 @@
|
|
|
198
198
|
.container[data-disabled] textarea,
|
|
199
199
|
.container[data-disabled] span{
|
|
200
200
|
cursor:not-allowed;
|
|
201
|
-
background-color:var(--sys-neutral-background, #
|
|
201
|
+
background-color:var(--sys-neutral-background, #eeeff3);
|
|
202
202
|
}
|
|
203
203
|
.container[data-disabled], .container[data-disabled]:focus-within, .container[data-disabled][data-focused], .container[data-disabled]:hover{
|
|
204
|
-
background-color:var(--sys-neutral-background, #
|
|
205
|
-
border-color:var(--sys-neutral-decor-disabled, #
|
|
204
|
+
background-color:var(--sys-neutral-background, #eeeff3);
|
|
205
|
+
border-color:var(--sys-neutral-decor-disabled, #e6e8ef);
|
|
206
206
|
outline:none;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
209
|
.prefix{
|
|
210
210
|
display:inline-flex;
|
|
211
211
|
flex-shrink:0;
|
|
212
|
-
color:var(--sys-neutral-text-disabled, #
|
|
212
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
213
213
|
}
|
|
214
214
|
|
|
215
215
|
.postfix{
|
|
@@ -5,28 +5,28 @@
|
|
|
5
5
|
max-width:100%;
|
|
6
6
|
margin:0;
|
|
7
7
|
padding:0;
|
|
8
|
-
color:var(--sys-neutral-text-main, #
|
|
8
|
+
color:var(--sys-neutral-text-main, #33343f);
|
|
9
9
|
background-color:transparent;
|
|
10
10
|
border:none;
|
|
11
11
|
border-radius:0;
|
|
12
12
|
outline:0;
|
|
13
13
|
}
|
|
14
14
|
.textarea::-moz-placeholder{
|
|
15
|
-
color:var(--sys-neutral-text-disabled, #
|
|
15
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
16
16
|
}
|
|
17
17
|
.textarea::placeholder{
|
|
18
|
-
color:var(--sys-neutral-text-disabled, #
|
|
18
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
19
19
|
}
|
|
20
20
|
.textarea::-webkit-scrollbar{
|
|
21
21
|
width:0;
|
|
22
22
|
max-width:0;
|
|
23
23
|
}
|
|
24
24
|
.textarea:-moz-read-only{
|
|
25
|
-
color:var(--sys-neutral-text-support, #
|
|
25
|
+
color:var(--sys-neutral-text-support, #6d707f);
|
|
26
26
|
}
|
|
27
27
|
.textarea:read-only{
|
|
28
|
-
color:var(--sys-neutral-text-support, #
|
|
28
|
+
color:var(--sys-neutral-text-support, #6d707f);
|
|
29
29
|
}
|
|
30
30
|
.textarea[disabled]{
|
|
31
|
-
color:var(--sys-neutral-text-disabled, #
|
|
31
|
+
color:var(--sys-neutral-text-disabled, #aaaebd);
|
|
32
32
|
}
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
6
|
"title": "Fields",
|
|
7
|
-
"version": "0.
|
|
7
|
+
"version": "0.23.1",
|
|
8
8
|
"sideEffects": [
|
|
9
9
|
"*.css",
|
|
10
10
|
"*.woff",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"@snack-uikit/scroll": "0.6.0",
|
|
42
42
|
"@snack-uikit/skeleton": "0.3.4",
|
|
43
43
|
"@snack-uikit/slider": "0.1.14",
|
|
44
|
-
"@snack-uikit/tag": "0.9.
|
|
44
|
+
"@snack-uikit/tag": "0.9.6",
|
|
45
45
|
"@snack-uikit/tooltip": "0.13.6",
|
|
46
46
|
"@snack-uikit/truncate-string": "0.4.19",
|
|
47
47
|
"@snack-uikit/utils": "3.3.0",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"peerDependencies": {
|
|
60
60
|
"@snack-uikit/locale": "*"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "680e16bb363296e1b4a0a35ce8efd2b4f23c4ee2"
|
|
63
63
|
}
|
|
@@ -47,6 +47,7 @@ type WrapperProps = Pick<
|
|
|
47
47
|
| 'label'
|
|
48
48
|
| 'labelTooltip'
|
|
49
49
|
| 'required'
|
|
50
|
+
| 'caption'
|
|
50
51
|
| 'hint'
|
|
51
52
|
| 'showHintIcon'
|
|
52
53
|
| 'size'
|
|
@@ -101,6 +102,7 @@ export const FieldDate = forwardRef<HTMLInputElement, FieldDateProps>(
|
|
|
101
102
|
labelTooltip,
|
|
102
103
|
labelTooltipPlacement,
|
|
103
104
|
required = false,
|
|
105
|
+
caption,
|
|
104
106
|
hint,
|
|
105
107
|
showHintIcon,
|
|
106
108
|
size = SIZE.S,
|
|
@@ -259,6 +261,7 @@ export const FieldDate = forwardRef<HTMLInputElement, FieldDateProps>(
|
|
|
259
261
|
labelTooltipPlacement={labelTooltipPlacement}
|
|
260
262
|
labelFor={id}
|
|
261
263
|
required={required}
|
|
264
|
+
caption={caption}
|
|
262
265
|
hint={hint}
|
|
263
266
|
disabled={disabled}
|
|
264
267
|
readonly={readonly}
|
|
@@ -271,7 +274,7 @@ export const FieldDate = forwardRef<HTMLInputElement, FieldDateProps>(
|
|
|
271
274
|
<Dropdown
|
|
272
275
|
trigger='click'
|
|
273
276
|
triggerClassName={styles.triggerClassName}
|
|
274
|
-
widthStrategy='
|
|
277
|
+
widthStrategy='auto'
|
|
275
278
|
{...(readonly || disabled
|
|
276
279
|
? { open: false }
|
|
277
280
|
: {
|
|
@@ -32,6 +32,7 @@ export function FieldDecorator({
|
|
|
32
32
|
labelTooltip,
|
|
33
33
|
required,
|
|
34
34
|
labelFor,
|
|
35
|
+
caption,
|
|
35
36
|
length,
|
|
36
37
|
hint,
|
|
37
38
|
disabled,
|
|
@@ -55,6 +56,7 @@ export function FieldDecorator({
|
|
|
55
56
|
label={label}
|
|
56
57
|
labelTooltip={labelTooltip}
|
|
57
58
|
labelFor={labelFor}
|
|
59
|
+
caption={caption}
|
|
58
60
|
size={size}
|
|
59
61
|
/>
|
|
60
62
|
)}
|
|
@@ -10,6 +10,8 @@ import styles from './styles.module.scss';
|
|
|
10
10
|
export type HeaderProps = {
|
|
11
11
|
/** Лейбл */
|
|
12
12
|
label?: string;
|
|
13
|
+
/** Подпись справа от лейбла */
|
|
14
|
+
caption?: string;
|
|
13
15
|
/** Всплывающая подсказка лейбла */
|
|
14
16
|
labelTooltip?: ReactNode;
|
|
15
17
|
/** Аттрибут for */
|
|
@@ -28,6 +30,7 @@ export type HeaderProps = {
|
|
|
28
30
|
export function Header({
|
|
29
31
|
label = '',
|
|
30
32
|
labelTooltip,
|
|
33
|
+
caption,
|
|
31
34
|
labelFor,
|
|
32
35
|
size,
|
|
33
36
|
required = false,
|
|
@@ -41,7 +44,11 @@ export function Header({
|
|
|
41
44
|
<label className={styles.label} htmlFor={labelFor} data-test-id='field-decorator__label'>
|
|
42
45
|
<TruncateString text={label} />
|
|
43
46
|
</label>
|
|
44
|
-
{required &&
|
|
47
|
+
{required && (
|
|
48
|
+
<span className={styles.required} data-test-id='field-decorator__required-sign'>
|
|
49
|
+
*
|
|
50
|
+
</span>
|
|
51
|
+
)}
|
|
45
52
|
{labelTooltip && (
|
|
46
53
|
<Tooltip
|
|
47
54
|
tip={labelTooltip}
|
|
@@ -54,6 +61,8 @@ export function Header({
|
|
|
54
61
|
)}
|
|
55
62
|
</span>
|
|
56
63
|
)}
|
|
64
|
+
|
|
65
|
+
{caption && <span className={styles.caption}>{caption}</span>}
|
|
57
66
|
</span>
|
|
58
67
|
);
|
|
59
68
|
}
|
|
@@ -17,6 +17,11 @@ $hint-icon-container: (
|
|
|
17
17
|
'm': $fields-hint-icon-container-m,
|
|
18
18
|
'l': $fields-hint-icon-container-m,
|
|
19
19
|
);
|
|
20
|
+
$caption-typography: (
|
|
21
|
+
's': $sans-body-s,
|
|
22
|
+
'm': $sans-body-m,
|
|
23
|
+
'l': $sans-body-m,
|
|
24
|
+
);
|
|
20
25
|
|
|
21
26
|
.decorator {
|
|
22
27
|
display: flex;
|
|
@@ -35,12 +40,20 @@ $hint-icon-container: (
|
|
|
35
40
|
|
|
36
41
|
.header {
|
|
37
42
|
display: flex;
|
|
43
|
+
gap: $dimension-050m;
|
|
38
44
|
box-sizing: border-box;
|
|
39
|
-
color:
|
|
45
|
+
color: $sys-neutral-text-support;
|
|
40
46
|
|
|
41
47
|
@each $size in $sizes {
|
|
42
48
|
&[data-size='#{$size}'] {
|
|
43
49
|
@include composite-var($header-typography, $size);
|
|
50
|
+
|
|
51
|
+
.caption {
|
|
52
|
+
@include composite-var($caption-typography, $size);
|
|
53
|
+
|
|
54
|
+
margin-left: auto;
|
|
55
|
+
color: $sys-neutral-text-light;
|
|
56
|
+
}
|
|
44
57
|
}
|
|
45
58
|
}
|
|
46
59
|
}
|
|
@@ -50,10 +63,16 @@ $hint-icon-container: (
|
|
|
50
63
|
|
|
51
64
|
display: inline-flex;
|
|
52
65
|
align-items: center;
|
|
66
|
+
color: $sys-neutral-text-light;
|
|
53
67
|
}
|
|
54
68
|
|
|
55
69
|
.label {
|
|
56
70
|
display: grid;
|
|
71
|
+
color: $sys-neutral-text-support;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.required {
|
|
75
|
+
color: $sys-neutral-text-support;
|
|
57
76
|
}
|
|
58
77
|
|
|
59
78
|
.footer {
|
|
@@ -100,26 +119,26 @@ $hint-icon-container: (
|
|
|
100
119
|
word-break: break-word;
|
|
101
120
|
|
|
102
121
|
&[data-validation='default'] {
|
|
103
|
-
color:
|
|
122
|
+
color: $sys-neutral-text-light;
|
|
104
123
|
}
|
|
105
124
|
|
|
106
125
|
&[data-validation='error'] {
|
|
107
|
-
color:
|
|
126
|
+
color: $sys-red-text-main;
|
|
108
127
|
}
|
|
109
128
|
|
|
110
129
|
&[data-validation='warning'] {
|
|
111
|
-
color:
|
|
130
|
+
color: $sys-yellow-text-main;
|
|
112
131
|
}
|
|
113
132
|
|
|
114
133
|
&[data-validation='success'] {
|
|
115
|
-
color:
|
|
134
|
+
color: $sys-green-text-main;
|
|
116
135
|
}
|
|
117
136
|
}
|
|
118
137
|
|
|
119
138
|
.icon {
|
|
120
139
|
flex-shrink: 0;
|
|
121
140
|
box-sizing: content-box;
|
|
122
|
-
color:
|
|
141
|
+
color: $sys-neutral-text-light;
|
|
123
142
|
}
|
|
124
143
|
|
|
125
144
|
.hintIcon {
|
|
@@ -127,39 +146,39 @@ $hint-icon-container: (
|
|
|
127
146
|
box-sizing: content-box;
|
|
128
147
|
|
|
129
148
|
&[data-validation='default'] {
|
|
130
|
-
color:
|
|
149
|
+
color: $sys-neutral-accent-default;
|
|
131
150
|
}
|
|
132
151
|
|
|
133
152
|
&[data-validation='error'] {
|
|
134
|
-
color:
|
|
153
|
+
color: $sys-red-accent-default;
|
|
135
154
|
}
|
|
136
155
|
|
|
137
156
|
&[data-validation='warning'] {
|
|
138
|
-
color:
|
|
157
|
+
color: $sys-yellow-accent-default;
|
|
139
158
|
}
|
|
140
159
|
|
|
141
160
|
&[data-validation='success'] {
|
|
142
|
-
color:
|
|
161
|
+
color: $sys-green-accent-default;
|
|
143
162
|
}
|
|
144
163
|
}
|
|
145
164
|
|
|
146
165
|
.counterLimit {
|
|
147
166
|
> span {
|
|
148
167
|
&[data-validation='default'] {
|
|
149
|
-
color:
|
|
168
|
+
color: $sys-neutral-text-light;
|
|
150
169
|
}
|
|
151
170
|
|
|
152
171
|
&[data-limit-exceeded],
|
|
153
172
|
&[data-validation='error'] {
|
|
154
|
-
color:
|
|
173
|
+
color: $sys-red-text-light;
|
|
155
174
|
}
|
|
156
175
|
|
|
157
176
|
&[data-validation='warning'] {
|
|
158
|
-
color:
|
|
177
|
+
color: $sys-yellow-text-light;
|
|
159
178
|
}
|
|
160
179
|
|
|
161
180
|
&[data-validation='success'] {
|
|
162
|
-
color:
|
|
181
|
+
color: $sys-green-text-light;
|
|
163
182
|
}
|
|
164
183
|
}
|
|
165
184
|
}
|
|
@@ -167,18 +186,18 @@ $hint-icon-container: (
|
|
|
167
186
|
.counterCurrentValue {
|
|
168
187
|
&[data-limit-exceeded] {
|
|
169
188
|
&[data-validation='default'] {
|
|
170
|
-
color:
|
|
189
|
+
color: $sys-neutral-text-main;
|
|
171
190
|
}
|
|
172
191
|
&[data-validation='error'] {
|
|
173
|
-
color:
|
|
192
|
+
color: $sys-red-text-main;
|
|
174
193
|
}
|
|
175
194
|
|
|
176
195
|
&[data-validation='warning'] {
|
|
177
|
-
color:
|
|
196
|
+
color: $sys-yellow-text-main;
|
|
178
197
|
}
|
|
179
198
|
|
|
180
199
|
&[data-validation='success'] {
|
|
181
|
-
color:
|
|
200
|
+
color: $sys-green-text-light;
|
|
182
201
|
}
|
|
183
202
|
}
|
|
184
203
|
}
|
|
@@ -188,4 +207,4 @@ $hint-icon-container: (
|
|
|
188
207
|
display: flex;
|
|
189
208
|
align-items: center;
|
|
190
209
|
height: 100%;
|
|
191
|
-
}
|
|
210
|
+
}
|
|
@@ -8,6 +8,7 @@ export function extractFieldDecoratorProps<T extends Partial<FieldDecoratorProps
|
|
|
8
8
|
labelTooltip,
|
|
9
9
|
labelTooltipPlacement,
|
|
10
10
|
labelFor,
|
|
11
|
+
caption,
|
|
11
12
|
hint,
|
|
12
13
|
disabled,
|
|
13
14
|
showHintIcon,
|
|
@@ -23,6 +24,7 @@ export function extractFieldDecoratorProps<T extends Partial<FieldDecoratorProps
|
|
|
23
24
|
labelTooltip,
|
|
24
25
|
labelTooltipPlacement,
|
|
25
26
|
labelFor,
|
|
27
|
+
caption,
|
|
26
28
|
hint,
|
|
27
29
|
disabled,
|
|
28
30
|
showHintIcon,
|
|
@@ -28,6 +28,7 @@ type WrapperProps = Pick<
|
|
|
28
28
|
| 'label'
|
|
29
29
|
| 'labelTooltip'
|
|
30
30
|
| 'required'
|
|
31
|
+
| 'caption'
|
|
31
32
|
| 'hint'
|
|
32
33
|
| 'size'
|
|
33
34
|
| 'validationState'
|
|
@@ -76,6 +77,7 @@ export const FieldSecure = forwardRef<HTMLInputElement, FieldSecureProps>(
|
|
|
76
77
|
labelTooltip,
|
|
77
78
|
labelTooltipPlacement,
|
|
78
79
|
required = false,
|
|
80
|
+
caption,
|
|
79
81
|
hint,
|
|
80
82
|
size = SIZE.S,
|
|
81
83
|
validationState = VALIDATION_STATE.Default,
|
|
@@ -186,6 +188,7 @@ export const FieldSecure = forwardRef<HTMLInputElement, FieldSecureProps>(
|
|
|
186
188
|
labelTooltipPlacement={labelTooltipPlacement}
|
|
187
189
|
labelFor={id}
|
|
188
190
|
required={required}
|
|
191
|
+
caption={caption}
|
|
189
192
|
length={maxLength ? { max: maxLength, current: value.length } : undefined}
|
|
190
193
|
hint={hint}
|
|
191
194
|
disabled={disabled}
|
|
@@ -29,7 +29,15 @@ type SliderProps = Pick<InputPrivateProps, 'id' | 'name' | 'disabled' | 'readonl
|
|
|
29
29
|
|
|
30
30
|
type WrapperProps = Pick<
|
|
31
31
|
FieldDecoratorProps,
|
|
32
|
-
|
|
32
|
+
| 'className'
|
|
33
|
+
| 'label'
|
|
34
|
+
| 'labelTooltip'
|
|
35
|
+
| 'required'
|
|
36
|
+
| 'caption'
|
|
37
|
+
| 'hint'
|
|
38
|
+
| 'showHintIcon'
|
|
39
|
+
| 'size'
|
|
40
|
+
| 'labelTooltipPlacement'
|
|
33
41
|
>;
|
|
34
42
|
|
|
35
43
|
type FieldSliderOwnProps = {
|
|
@@ -82,6 +90,7 @@ export const FieldSlider = forwardRef<HTMLInputElement, FieldSliderProps>(
|
|
|
82
90
|
labelTooltip,
|
|
83
91
|
labelTooltipPlacement,
|
|
84
92
|
required,
|
|
93
|
+
caption,
|
|
85
94
|
hint,
|
|
86
95
|
showHintIcon,
|
|
87
96
|
size = SIZE.S,
|
|
@@ -251,6 +260,7 @@ export const FieldSlider = forwardRef<HTMLInputElement, FieldSliderProps>(
|
|
|
251
260
|
labelFor={id}
|
|
252
261
|
disabled={disabled}
|
|
253
262
|
required={required}
|
|
263
|
+
caption={caption}
|
|
254
264
|
hint={hint}
|
|
255
265
|
showHintIcon={showHintIcon}
|
|
256
266
|
readonly={readonly}
|
|
@@ -35,6 +35,7 @@ type WrapperProps = Pick<
|
|
|
35
35
|
| 'label'
|
|
36
36
|
| 'labelTooltip'
|
|
37
37
|
| 'required'
|
|
38
|
+
| 'caption'
|
|
38
39
|
| 'hint'
|
|
39
40
|
| 'showHintIcon'
|
|
40
41
|
| 'size'
|
|
@@ -90,6 +91,7 @@ export const FieldStepper = forwardRef<HTMLInputElement, FieldStepperProps>(
|
|
|
90
91
|
labelTooltip,
|
|
91
92
|
labelTooltipPlacement,
|
|
92
93
|
required = false,
|
|
94
|
+
caption,
|
|
93
95
|
hint,
|
|
94
96
|
showHintIcon,
|
|
95
97
|
size = SIZE.S,
|
|
@@ -215,6 +217,7 @@ export const FieldStepper = forwardRef<HTMLInputElement, FieldStepperProps>(
|
|
|
215
217
|
labelTooltipPlacement={labelTooltipPlacement}
|
|
216
218
|
labelFor={id}
|
|
217
219
|
required={required}
|
|
220
|
+
caption={caption}
|
|
218
221
|
hint={hint}
|
|
219
222
|
disabled={disabled}
|
|
220
223
|
readonly={readonly}
|
|
@@ -19,6 +19,7 @@ type WrapperProps = Pick<
|
|
|
19
19
|
| 'label'
|
|
20
20
|
| 'labelTooltip'
|
|
21
21
|
| 'required'
|
|
22
|
+
| 'caption'
|
|
22
23
|
| 'hint'
|
|
23
24
|
| 'showHintIcon'
|
|
24
25
|
| 'size'
|
|
@@ -64,6 +65,7 @@ export const FieldText = forwardRef<HTMLInputElement, FieldTextProps>(
|
|
|
64
65
|
labelTooltip,
|
|
65
66
|
labelTooltipPlacement,
|
|
66
67
|
required = false,
|
|
68
|
+
caption,
|
|
67
69
|
hint,
|
|
68
70
|
showHintIcon,
|
|
69
71
|
size = SIZE.S,
|
|
@@ -112,6 +114,7 @@ export const FieldText = forwardRef<HTMLInputElement, FieldTextProps>(
|
|
|
112
114
|
labelTooltipPlacement={labelTooltipPlacement}
|
|
113
115
|
labelFor={id}
|
|
114
116
|
required={required}
|
|
117
|
+
caption={caption}
|
|
115
118
|
length={maxLength ? { max: maxLength, current: value.length } : undefined}
|
|
116
119
|
hint={hint}
|
|
117
120
|
disabled={disabled}
|
|
@@ -21,6 +21,7 @@ type WrapperProps = Pick<
|
|
|
21
21
|
| 'label'
|
|
22
22
|
| 'labelTooltip'
|
|
23
23
|
| 'required'
|
|
24
|
+
| 'caption'
|
|
24
25
|
| 'hint'
|
|
25
26
|
| 'size'
|
|
26
27
|
| 'validationState'
|
|
@@ -76,6 +77,7 @@ export const FieldTextArea = forwardRef<HTMLTextAreaElement, FieldTextAreaProps>
|
|
|
76
77
|
labelTooltip,
|
|
77
78
|
labelTooltipPlacement,
|
|
78
79
|
required = false,
|
|
80
|
+
caption,
|
|
79
81
|
hint,
|
|
80
82
|
error,
|
|
81
83
|
size = SIZE.S,
|
|
@@ -124,6 +126,7 @@ export const FieldTextArea = forwardRef<HTMLTextAreaElement, FieldTextAreaProps>
|
|
|
124
126
|
labelTooltipPlacement={labelTooltipPlacement}
|
|
125
127
|
labelFor={id}
|
|
126
128
|
required={required}
|
|
129
|
+
caption={caption}
|
|
127
130
|
length={maxLength ? { max: maxLength, current: value.length } : undefined}
|
|
128
131
|
hint={hint}
|
|
129
132
|
disabled={disabled}
|
|
@@ -40,13 +40,13 @@ export const ButtonHideValue = forwardRef<HTMLButtonElement, ButtonHideValueProp
|
|
|
40
40
|
>
|
|
41
41
|
{hidden ? (
|
|
42
42
|
<>
|
|
43
|
-
{size === BUTTON_SIZE.S && <
|
|
44
|
-
{size === BUTTON_SIZE.M && <
|
|
43
|
+
{size === BUTTON_SIZE.S && <EyeSVG size={16} />}
|
|
44
|
+
{size === BUTTON_SIZE.M && <EyeSVG />}
|
|
45
45
|
</>
|
|
46
46
|
) : (
|
|
47
47
|
<>
|
|
48
|
-
{size === BUTTON_SIZE.S && <
|
|
49
|
-
{size === BUTTON_SIZE.M && <
|
|
48
|
+
{size === BUTTON_SIZE.S && <EyeClosedSVG size={16} />}
|
|
49
|
+
{size === BUTTON_SIZE.M && <EyeClosedSVG />}
|
|
50
50
|
</>
|
|
51
51
|
)}
|
|
52
52
|
</button>
|