@itcase/forms 1.1.4 → 1.1.5
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/dist/css/form/Field/Chips/Chips.css +0 -27
- package/dist/css/form/Field/Choice/Choice.css +0 -27
- package/dist/css/form/Field/Code/Code.css +0 -3
- package/dist/css/form/Field/Custom/Custom.css +1 -23
- package/dist/css/form/Field/Input/Input.css +0 -43
- package/dist/css/form/Field/Textarea/Textarea.css +0 -31
- package/dist/itcase-forms.cjs.js +39 -72
- package/dist/itcase-forms.esm.js +39 -72
- package/package.json +1 -1
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
.form-chips {
|
|
2
|
-
&&_state {
|
|
3
|
-
&_success {
|
|
4
|
-
& .chips {
|
|
5
|
-
/* border: solid 1px var(--choice-success-border); */
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
&_error {
|
|
9
|
-
& .chips {
|
|
10
|
-
/* border: solid 1px var(--choice-error-border); */
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
&_focus {
|
|
14
|
-
/* border: solid 1px var(--choice-focus-border); */
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
.form-field {
|
|
19
|
-
&_type_chips {
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
:root {
|
|
23
|
-
--chips-success-border: var(--color-success-border-primary);
|
|
24
|
-
--chips-success-border-hover: var(--color-surface-border-quaternary);
|
|
25
|
-
--chips-error-border: var(--color-error-border-primary);
|
|
26
|
-
--chips-focus-border: var(--color-surface-border-quaternary);
|
|
27
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
.form-choice {
|
|
2
|
-
&&_state {
|
|
3
|
-
&_success {
|
|
4
|
-
& .choice {
|
|
5
|
-
/* border: solid 1px var(--choice-success-border); */
|
|
6
|
-
}
|
|
7
|
-
}
|
|
8
|
-
&_error {
|
|
9
|
-
& .choice {
|
|
10
|
-
/* border: solid 1px var(--choice-error-border); */
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
&_focus {
|
|
14
|
-
/* border: solid 1px var(--choice-focus-border); */
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
.form-field {
|
|
19
|
-
&_type_choice {
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
:root {
|
|
23
|
-
--choice-success-border: var(--color-success-border-primary);
|
|
24
|
-
--choice-success-border-hover: var(--color-surface-border-quaternary);
|
|
25
|
-
--choice-error-border: var(--color-error-border-primary);
|
|
26
|
-
--choice-focus-border: var(--color-surface-border-quaternary);
|
|
27
|
-
}
|
|
@@ -1,31 +1,9 @@
|
|
|
1
|
-
.form-custom {
|
|
2
|
-
&_state {
|
|
3
|
-
&_success {
|
|
4
|
-
& .input {
|
|
5
|
-
border: solid 1px var(--custom-success-border);
|
|
6
|
-
&:hover {
|
|
7
|
-
border: solid 1px var(--custom-success-border-hover);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
&_error {
|
|
12
|
-
& .input {
|
|
13
|
-
border: solid 1px var(--custom-error-border);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
&_focus {
|
|
17
|
-
& .input {
|
|
18
|
-
background: var(--custom-focus-background);
|
|
19
|
-
border: solid 1px var(--custom-focus-border);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
1
|
.form-field {
|
|
25
2
|
&_type_custom {
|
|
26
3
|
width: 100%;
|
|
27
4
|
}
|
|
28
5
|
}
|
|
6
|
+
|
|
29
7
|
:root {
|
|
30
8
|
--custom-success-border: var(--color-success-border-primary);
|
|
31
9
|
--custom-success-border-hover: var(--color-surface-border-quaternary);
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
.form-input {
|
|
2
|
-
position: relative;
|
|
3
|
-
&&_state {
|
|
4
|
-
&_success {
|
|
5
|
-
& .input {
|
|
6
|
-
border: solid 1px var(--input-success-border, green);
|
|
7
|
-
&:hover {
|
|
8
|
-
border: solid 1px var(--input-success-border-hover);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
&_disabled {
|
|
13
|
-
& .input {
|
|
14
|
-
background: var(--input-disabled-background, #ECECEC);
|
|
15
|
-
border: solid 1px var(--input-disabled-border, #747474);
|
|
16
|
-
&:hover {
|
|
17
|
-
background: var(--input-disabled-background, #ECECEC);
|
|
18
|
-
border: solid 1px var(--input-disabled-border, #747474);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&_error {
|
|
24
|
-
& .input {
|
|
25
|
-
border: solid 1px var(--input-error-border);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
&_focus {
|
|
29
|
-
& .input {
|
|
30
|
-
background: var(--input-focus-background);
|
|
31
|
-
border: solid 1px var(--input-focus-border);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
:root {
|
|
38
|
-
--input-success-border: var(--color-success-border-primary);
|
|
39
|
-
--input-success-border-hover: var(--color-surface-border-quaternary);
|
|
40
|
-
--input-error-border: var(--color-error-border-primary);
|
|
41
|
-
--input-focus-background: var(--color-surface-primary);
|
|
42
|
-
--input-focus-border: var(--color-surface-border-quaternary);
|
|
43
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
.form-textarea {
|
|
2
|
-
position: relative;
|
|
3
|
-
&&_state {
|
|
4
|
-
&_success {
|
|
5
|
-
& .textarea {
|
|
6
|
-
border: solid 1px var(--textarea-success-border);
|
|
7
|
-
&:hover {
|
|
8
|
-
border: solid 1px var(--textarea-success-border-hover);
|
|
9
|
-
}
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
&_error {
|
|
13
|
-
& .textarea {
|
|
14
|
-
border: solid 1px var(--textarea-error-border);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
&_focus {
|
|
18
|
-
& .textarea {
|
|
19
|
-
background: var(--textarea-focus-background);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
:root {
|
|
26
|
-
--textarea-success-border: var(--color-success-border-primary);
|
|
27
|
-
--textarea-success-border-hover: var(--color-surface-border-quaternary);
|
|
28
|
-
--textarea-error-border: var(--color-error-border-primary);
|
|
29
|
-
--textarea-focus-background: var(--color-surface-primary);
|
|
30
|
-
--textarea-focus-border: var(--color-surface-border-quaternary);
|
|
31
|
-
}
|
package/dist/itcase-forms.cjs.js
CHANGED
|
@@ -131,20 +131,16 @@ function useYupValidationSchema(schema, language) {
|
|
|
131
131
|
const defaultFieldProps = {
|
|
132
132
|
width: 'fill',
|
|
133
133
|
direction: 'vertical',
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
134
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
135
|
+
labelTextSize: 'm',
|
|
136
|
+
errorMessageTextColor: 'errorTextSecondary',
|
|
137
137
|
errorMessageTextSize: 's',
|
|
138
|
-
|
|
138
|
+
dividerFill: 'errorPrimary',
|
|
139
139
|
helpTextColor: 'surfaceTextQuaternary',
|
|
140
|
-
// messageTextSize: 's',
|
|
141
|
-
// messageTextColor: 'surfaceTextSecondary',
|
|
142
140
|
helpTextSize: 's',
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
requiredMessageTextColor: '
|
|
146
|
-
// appearance depending on the type of error
|
|
147
|
-
// required
|
|
141
|
+
messageTextColor: 'surfaceTextSecondary',
|
|
142
|
+
messageTextSize: 's',
|
|
143
|
+
requiredMessageTextColor: 'warningTextSecondary',
|
|
148
144
|
requiredMessageTextSize: 's',
|
|
149
145
|
showMessage: true
|
|
150
146
|
};
|
|
@@ -1482,28 +1478,18 @@ const Group = /*#__PURE__*/React__default.default.memo(function Group(props) {
|
|
|
1482
1478
|
});
|
|
1483
1479
|
|
|
1484
1480
|
const defaultInputProps = {
|
|
1481
|
+
appearance: 'sizeM defaultSecondary',
|
|
1485
1482
|
width: 'fill',
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
errorBorderColor: 'errorBorderPrimary',
|
|
1490
|
-
placeholderTextColor: 'surfaceTextQuaternary',
|
|
1491
|
-
// appearance depending on the type of error
|
|
1492
|
-
// required
|
|
1493
|
-
requiredBorderColor: 'warningBorderPrimary',
|
|
1494
|
-
shape: 'rounded',
|
|
1495
|
-
size: 'm',
|
|
1496
|
-
textColor: 'surfaceTextPrimary',
|
|
1497
|
-
textColorDisabled: 'surfaceTextDisabled',
|
|
1498
|
-
textSize: 'm'
|
|
1483
|
+
errorBorderColor: 'errorBorderSecondary',
|
|
1484
|
+
requiredBorderColor: 'warningBorderSecondary',
|
|
1485
|
+
shape: 'rounded'
|
|
1499
1486
|
};
|
|
1500
1487
|
|
|
1501
1488
|
const InputField = /*#__PURE__*/React__default.default.memo(function InputField(props) {
|
|
1502
1489
|
const {
|
|
1490
|
+
name,
|
|
1491
|
+
initialValue,
|
|
1503
1492
|
isDisabled,
|
|
1504
|
-
isPassword,
|
|
1505
|
-
isRequired,
|
|
1506
|
-
isRevealable,
|
|
1507
1493
|
classNameGroupItem,
|
|
1508
1494
|
// dataTestId,
|
|
1509
1495
|
// iconBorder,
|
|
@@ -1514,17 +1500,18 @@ const InputField = /*#__PURE__*/React__default.default.memo(function InputField(
|
|
|
1514
1500
|
clearIconShape,
|
|
1515
1501
|
clearIconSize,
|
|
1516
1502
|
fieldProps = {},
|
|
1517
|
-
inputProps = {},
|
|
1518
1503
|
iconFill,
|
|
1519
1504
|
iconFillHover,
|
|
1520
1505
|
iconRevealableHide,
|
|
1521
1506
|
iconRevealableShow,
|
|
1522
1507
|
iconShape,
|
|
1523
1508
|
iconSize,
|
|
1524
|
-
|
|
1525
|
-
name,
|
|
1509
|
+
inputProps = {},
|
|
1526
1510
|
parse,
|
|
1527
1511
|
showMessage,
|
|
1512
|
+
isPassword,
|
|
1513
|
+
isRequired,
|
|
1514
|
+
isRevealable,
|
|
1528
1515
|
onChange,
|
|
1529
1516
|
onClickClearIcon
|
|
1530
1517
|
} = props;
|
|
@@ -1579,43 +1566,43 @@ const InputField = /*#__PURE__*/React__default.default.memo(function InputField(
|
|
|
1579
1566
|
className: clsx__default.default('form-field_type_input', 'form__item_type_input', classNameGroupItem),
|
|
1580
1567
|
errorKey: errorKey,
|
|
1581
1568
|
errorMessage: errorMessage,
|
|
1569
|
+
isErrorState: isErrorState,
|
|
1570
|
+
metaError: meta.error,
|
|
1571
|
+
isDisabled: isDisabled,
|
|
1582
1572
|
fieldClassName: isRevealable ? 'form-password' : 'form-input',
|
|
1583
1573
|
inputName: input.name,
|
|
1584
1574
|
inputValue: input.value || '',
|
|
1585
1575
|
metaActive: meta.active,
|
|
1586
|
-
metaError: meta.error,
|
|
1587
1576
|
showMessage: showMessage,
|
|
1588
|
-
isDisabled: isDisabled,
|
|
1589
|
-
isErrorState: isErrorState,
|
|
1590
1577
|
isRequired: isRequired,
|
|
1591
1578
|
isValidState: isValidState
|
|
1592
1579
|
}, fieldProps), /*#__PURE__*/React__default.default.createElement(Input.Input, Object.assign({
|
|
1593
1580
|
className: clsx__default.default(meta.active && 'input_state_focus', meta.error && meta.touched && `input_state_${errorKey}`),
|
|
1581
|
+
type: inputType,
|
|
1594
1582
|
name: input.name,
|
|
1583
|
+
isDisabled: isDisabled,
|
|
1595
1584
|
autoComplete: "nope",
|
|
1596
1585
|
dataTestId: `${input.name}FieldInput`,
|
|
1597
|
-
type: inputType,
|
|
1598
1586
|
value: input.value || '',
|
|
1599
|
-
isDisabled: isDisabled,
|
|
1600
1587
|
onBlur: input.onBlur,
|
|
1601
1588
|
onChange: onChangeField,
|
|
1602
1589
|
onFocus: input.onFocus
|
|
1603
1590
|
}, updatedInputProps)), isRevealable && /*#__PURE__*/React__default.default.createElement(Icon.Icon, {
|
|
1604
1591
|
className: "form-field__icon",
|
|
1592
|
+
size: iconSize,
|
|
1605
1593
|
iconFill: iconFill,
|
|
1606
1594
|
iconFillHover: iconFillHover,
|
|
1607
1595
|
imageSrc: isRevealed ? iconRevealableHide : iconRevealableShow,
|
|
1608
1596
|
shape: iconShape,
|
|
1609
|
-
size: iconSize,
|
|
1610
1597
|
SvgImage: isRevealed ? iconRevealableHide : iconRevealableShow,
|
|
1611
1598
|
onClick: onClickIconReveal
|
|
1612
1599
|
}), clearIcon && /*#__PURE__*/React__default.default.createElement(Icon.Icon, {
|
|
1613
1600
|
className: "form-field__icon",
|
|
1601
|
+
size: clearIconSize,
|
|
1614
1602
|
iconFill: clearIconFill,
|
|
1615
1603
|
iconFillHover: clearIconFillHover,
|
|
1616
1604
|
imageSrc: clearIcon,
|
|
1617
1605
|
shape: clearIconShape,
|
|
1618
|
-
size: clearIconSize,
|
|
1619
1606
|
SvgImage: clearIcon,
|
|
1620
1607
|
onClick: onClickClearIcon
|
|
1621
1608
|
}));
|
|
@@ -1795,20 +1782,11 @@ const RadioGroup = /*#__PURE__*/React__default.default.memo(function RadioGroup(
|
|
|
1795
1782
|
});
|
|
1796
1783
|
|
|
1797
1784
|
const defaultSegmentedProps = {
|
|
1785
|
+
appearance: 'sizeM surfacePrimary',
|
|
1798
1786
|
width: 'fill',
|
|
1799
|
-
// error
|
|
1800
1787
|
errorLabelTextColor: 'errorTextPrimary',
|
|
1801
|
-
fill: 'surfaceSecondary',
|
|
1802
|
-
fillHover: 'surfacePrimaryHover',
|
|
1803
|
-
indicatorFill: 'accentPrimary',
|
|
1804
|
-
labelTextActiveColor: 'accentTextPrimary',
|
|
1805
|
-
labelTextColor: 'surfaceTextPrimary',
|
|
1806
|
-
labelTextSize: 'm',
|
|
1807
|
-
// appearance depending on the type of error
|
|
1808
|
-
// required
|
|
1809
1788
|
requiredLabelTextColor: 'warningTextPrimary',
|
|
1810
|
-
shape: 'rounded'
|
|
1811
|
-
size: 'normal'
|
|
1789
|
+
shape: 'rounded'
|
|
1812
1790
|
};
|
|
1813
1791
|
|
|
1814
1792
|
function SegmentedField(props) {
|
|
@@ -2143,19 +2121,11 @@ const SwitchField = /*#__PURE__*/React__default.default.memo(function SwitchFiel
|
|
|
2143
2121
|
});
|
|
2144
2122
|
|
|
2145
2123
|
const defaultTextareaProps = {
|
|
2124
|
+
appearance: 'sizeM defaultSecondary',
|
|
2146
2125
|
width: 'fill',
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
// error
|
|
2151
|
-
errorBorderColor: 'errorBorderPrimary',
|
|
2152
|
-
placeholderTextColor: 'surfaceTextSecondary',
|
|
2153
|
-
// appearance depending on the type of error
|
|
2154
|
-
// required
|
|
2155
|
-
requiredBorderColor: 'warningBorderPrimary',
|
|
2156
|
-
shape: 'rounded',
|
|
2157
|
-
textColor: 'surfaceTextPrimary',
|
|
2158
|
-
textSize: 's'
|
|
2126
|
+
errorBorderColor: 'errorBorderSecondary',
|
|
2127
|
+
requiredBorderColor: 'warningBorderSecondary',
|
|
2128
|
+
shape: 'rounded'
|
|
2159
2129
|
};
|
|
2160
2130
|
|
|
2161
2131
|
const TextareaField = /*#__PURE__*/React__default.default.memo(function TextareaField(props) {
|
|
@@ -2322,10 +2292,8 @@ const defaultChipsProps = {
|
|
|
2322
2292
|
width: 'fill',
|
|
2323
2293
|
borderColor: 'surfaceBorderTertiary',
|
|
2324
2294
|
activeIconItemFill: 'surfaceItemSecondary',
|
|
2325
|
-
appearance: 'surfacePrimary',
|
|
2326
|
-
|
|
2327
|
-
errorBorderColor: 'errorBorderPrimary',
|
|
2328
|
-
fill: 'surfacePrimary',
|
|
2295
|
+
appearance: 'surfacePrimary sizeM',
|
|
2296
|
+
errorBorderColor: 'errorBorderSecondary',
|
|
2329
2297
|
fillActive: 'accentPrimary',
|
|
2330
2298
|
fillActiveDisabled: 'surfaceTertiary',
|
|
2331
2299
|
fillActiveHover: 'errorPrimary',
|
|
@@ -2333,16 +2301,15 @@ const defaultChipsProps = {
|
|
|
2333
2301
|
iconItemFill: 'surfaceItemPrimary',
|
|
2334
2302
|
iconSize: 14,
|
|
2335
2303
|
indicatorFill: 'accentPrimary',
|
|
2336
|
-
labelSize: 's',
|
|
2337
|
-
labelTextActiveColor: 'accentTextPrimary',
|
|
2338
|
-
labelTextActiveColorDisabled: 'surfaceTextDisabled',
|
|
2339
|
-
labelTextColor: 'surfaceTextPrimary',
|
|
2340
|
-
labelTextColorDisabled: 'surfaceTextDisabled',
|
|
2304
|
+
// labelSize: 's',
|
|
2305
|
+
// labelTextActiveColor: 'accentTextPrimary',
|
|
2306
|
+
// labelTextActiveColorDisabled: 'surfaceTextDisabled',
|
|
2307
|
+
// labelTextColor: 'surfaceTextPrimary',
|
|
2308
|
+
// labelTextColorDisabled: 'surfaceTextDisabled',
|
|
2341
2309
|
// appearance depending on the type of error
|
|
2342
2310
|
// required
|
|
2343
|
-
requiredBorderColor: '
|
|
2344
|
-
shape: 'rounded'
|
|
2345
|
-
size: 'm'
|
|
2311
|
+
requiredBorderColor: 'warningBorderSecondary',
|
|
2312
|
+
shape: 'rounded'
|
|
2346
2313
|
};
|
|
2347
2314
|
|
|
2348
2315
|
function ChipsField(props) {
|
package/dist/itcase-forms.esm.js
CHANGED
|
@@ -120,20 +120,16 @@ function useYupValidationSchema(schema, language) {
|
|
|
120
120
|
const defaultFieldProps = {
|
|
121
121
|
width: 'fill',
|
|
122
122
|
direction: 'vertical',
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
labelTextColor: 'surfaceTextPrimary',
|
|
124
|
+
labelTextSize: 'm',
|
|
125
|
+
errorMessageTextColor: 'errorTextSecondary',
|
|
126
126
|
errorMessageTextSize: 's',
|
|
127
|
-
|
|
127
|
+
dividerFill: 'errorPrimary',
|
|
128
128
|
helpTextColor: 'surfaceTextQuaternary',
|
|
129
|
-
// messageTextSize: 's',
|
|
130
|
-
// messageTextColor: 'surfaceTextSecondary',
|
|
131
129
|
helpTextSize: 's',
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
requiredMessageTextColor: '
|
|
135
|
-
// appearance depending on the type of error
|
|
136
|
-
// required
|
|
130
|
+
messageTextColor: 'surfaceTextSecondary',
|
|
131
|
+
messageTextSize: 's',
|
|
132
|
+
requiredMessageTextColor: 'warningTextSecondary',
|
|
137
133
|
requiredMessageTextSize: 's',
|
|
138
134
|
showMessage: true
|
|
139
135
|
};
|
|
@@ -1471,28 +1467,18 @@ const Group = /*#__PURE__*/React$1.memo(function Group(props) {
|
|
|
1471
1467
|
});
|
|
1472
1468
|
|
|
1473
1469
|
const defaultInputProps = {
|
|
1470
|
+
appearance: 'sizeM defaultSecondary',
|
|
1474
1471
|
width: 'fill',
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
errorBorderColor: 'errorBorderPrimary',
|
|
1479
|
-
placeholderTextColor: 'surfaceTextQuaternary',
|
|
1480
|
-
// appearance depending on the type of error
|
|
1481
|
-
// required
|
|
1482
|
-
requiredBorderColor: 'warningBorderPrimary',
|
|
1483
|
-
shape: 'rounded',
|
|
1484
|
-
size: 'm',
|
|
1485
|
-
textColor: 'surfaceTextPrimary',
|
|
1486
|
-
textColorDisabled: 'surfaceTextDisabled',
|
|
1487
|
-
textSize: 'm'
|
|
1472
|
+
errorBorderColor: 'errorBorderSecondary',
|
|
1473
|
+
requiredBorderColor: 'warningBorderSecondary',
|
|
1474
|
+
shape: 'rounded'
|
|
1488
1475
|
};
|
|
1489
1476
|
|
|
1490
1477
|
const InputField = /*#__PURE__*/React$1.memo(function InputField(props) {
|
|
1491
1478
|
const {
|
|
1479
|
+
name,
|
|
1480
|
+
initialValue,
|
|
1492
1481
|
isDisabled,
|
|
1493
|
-
isPassword,
|
|
1494
|
-
isRequired,
|
|
1495
|
-
isRevealable,
|
|
1496
1482
|
classNameGroupItem,
|
|
1497
1483
|
// dataTestId,
|
|
1498
1484
|
// iconBorder,
|
|
@@ -1503,17 +1489,18 @@ const InputField = /*#__PURE__*/React$1.memo(function InputField(props) {
|
|
|
1503
1489
|
clearIconShape,
|
|
1504
1490
|
clearIconSize,
|
|
1505
1491
|
fieldProps = {},
|
|
1506
|
-
inputProps = {},
|
|
1507
1492
|
iconFill,
|
|
1508
1493
|
iconFillHover,
|
|
1509
1494
|
iconRevealableHide,
|
|
1510
1495
|
iconRevealableShow,
|
|
1511
1496
|
iconShape,
|
|
1512
1497
|
iconSize,
|
|
1513
|
-
|
|
1514
|
-
name,
|
|
1498
|
+
inputProps = {},
|
|
1515
1499
|
parse,
|
|
1516
1500
|
showMessage,
|
|
1501
|
+
isPassword,
|
|
1502
|
+
isRequired,
|
|
1503
|
+
isRevealable,
|
|
1517
1504
|
onChange,
|
|
1518
1505
|
onClickClearIcon
|
|
1519
1506
|
} = props;
|
|
@@ -1568,43 +1555,43 @@ const InputField = /*#__PURE__*/React$1.memo(function InputField(props) {
|
|
|
1568
1555
|
className: clsx('form-field_type_input', 'form__item_type_input', classNameGroupItem),
|
|
1569
1556
|
errorKey: errorKey,
|
|
1570
1557
|
errorMessage: errorMessage,
|
|
1558
|
+
isErrorState: isErrorState,
|
|
1559
|
+
metaError: meta.error,
|
|
1560
|
+
isDisabled: isDisabled,
|
|
1571
1561
|
fieldClassName: isRevealable ? 'form-password' : 'form-input',
|
|
1572
1562
|
inputName: input.name,
|
|
1573
1563
|
inputValue: input.value || '',
|
|
1574
1564
|
metaActive: meta.active,
|
|
1575
|
-
metaError: meta.error,
|
|
1576
1565
|
showMessage: showMessage,
|
|
1577
|
-
isDisabled: isDisabled,
|
|
1578
|
-
isErrorState: isErrorState,
|
|
1579
1566
|
isRequired: isRequired,
|
|
1580
1567
|
isValidState: isValidState
|
|
1581
1568
|
}, fieldProps), /*#__PURE__*/React$1.createElement(Input, Object.assign({
|
|
1582
1569
|
className: clsx(meta.active && 'input_state_focus', meta.error && meta.touched && `input_state_${errorKey}`),
|
|
1570
|
+
type: inputType,
|
|
1583
1571
|
name: input.name,
|
|
1572
|
+
isDisabled: isDisabled,
|
|
1584
1573
|
autoComplete: "nope",
|
|
1585
1574
|
dataTestId: `${input.name}FieldInput`,
|
|
1586
|
-
type: inputType,
|
|
1587
1575
|
value: input.value || '',
|
|
1588
|
-
isDisabled: isDisabled,
|
|
1589
1576
|
onBlur: input.onBlur,
|
|
1590
1577
|
onChange: onChangeField,
|
|
1591
1578
|
onFocus: input.onFocus
|
|
1592
1579
|
}, updatedInputProps)), isRevealable && /*#__PURE__*/React$1.createElement(Icon, {
|
|
1593
1580
|
className: "form-field__icon",
|
|
1581
|
+
size: iconSize,
|
|
1594
1582
|
iconFill: iconFill,
|
|
1595
1583
|
iconFillHover: iconFillHover,
|
|
1596
1584
|
imageSrc: isRevealed ? iconRevealableHide : iconRevealableShow,
|
|
1597
1585
|
shape: iconShape,
|
|
1598
|
-
size: iconSize,
|
|
1599
1586
|
SvgImage: isRevealed ? iconRevealableHide : iconRevealableShow,
|
|
1600
1587
|
onClick: onClickIconReveal
|
|
1601
1588
|
}), clearIcon && /*#__PURE__*/React$1.createElement(Icon, {
|
|
1602
1589
|
className: "form-field__icon",
|
|
1590
|
+
size: clearIconSize,
|
|
1603
1591
|
iconFill: clearIconFill,
|
|
1604
1592
|
iconFillHover: clearIconFillHover,
|
|
1605
1593
|
imageSrc: clearIcon,
|
|
1606
1594
|
shape: clearIconShape,
|
|
1607
|
-
size: clearIconSize,
|
|
1608
1595
|
SvgImage: clearIcon,
|
|
1609
1596
|
onClick: onClickClearIcon
|
|
1610
1597
|
}));
|
|
@@ -1784,20 +1771,11 @@ const RadioGroup = /*#__PURE__*/React$1.memo(function RadioGroup(props) {
|
|
|
1784
1771
|
});
|
|
1785
1772
|
|
|
1786
1773
|
const defaultSegmentedProps = {
|
|
1774
|
+
appearance: 'sizeM surfacePrimary',
|
|
1787
1775
|
width: 'fill',
|
|
1788
|
-
// error
|
|
1789
1776
|
errorLabelTextColor: 'errorTextPrimary',
|
|
1790
|
-
fill: 'surfaceSecondary',
|
|
1791
|
-
fillHover: 'surfacePrimaryHover',
|
|
1792
|
-
indicatorFill: 'accentPrimary',
|
|
1793
|
-
labelTextActiveColor: 'accentTextPrimary',
|
|
1794
|
-
labelTextColor: 'surfaceTextPrimary',
|
|
1795
|
-
labelTextSize: 'm',
|
|
1796
|
-
// appearance depending on the type of error
|
|
1797
|
-
// required
|
|
1798
1777
|
requiredLabelTextColor: 'warningTextPrimary',
|
|
1799
|
-
shape: 'rounded'
|
|
1800
|
-
size: 'normal'
|
|
1778
|
+
shape: 'rounded'
|
|
1801
1779
|
};
|
|
1802
1780
|
|
|
1803
1781
|
function SegmentedField(props) {
|
|
@@ -2132,19 +2110,11 @@ const SwitchField = /*#__PURE__*/React$1.memo(function SwitchField(props) {
|
|
|
2132
2110
|
});
|
|
2133
2111
|
|
|
2134
2112
|
const defaultTextareaProps = {
|
|
2113
|
+
appearance: 'sizeM defaultSecondary',
|
|
2135
2114
|
width: 'fill',
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
// error
|
|
2140
|
-
errorBorderColor: 'errorBorderPrimary',
|
|
2141
|
-
placeholderTextColor: 'surfaceTextSecondary',
|
|
2142
|
-
// appearance depending on the type of error
|
|
2143
|
-
// required
|
|
2144
|
-
requiredBorderColor: 'warningBorderPrimary',
|
|
2145
|
-
shape: 'rounded',
|
|
2146
|
-
textColor: 'surfaceTextPrimary',
|
|
2147
|
-
textSize: 's'
|
|
2115
|
+
errorBorderColor: 'errorBorderSecondary',
|
|
2116
|
+
requiredBorderColor: 'warningBorderSecondary',
|
|
2117
|
+
shape: 'rounded'
|
|
2148
2118
|
};
|
|
2149
2119
|
|
|
2150
2120
|
const TextareaField = /*#__PURE__*/React$1.memo(function TextareaField(props) {
|
|
@@ -2311,10 +2281,8 @@ const defaultChipsProps = {
|
|
|
2311
2281
|
width: 'fill',
|
|
2312
2282
|
borderColor: 'surfaceBorderTertiary',
|
|
2313
2283
|
activeIconItemFill: 'surfaceItemSecondary',
|
|
2314
|
-
appearance: 'surfacePrimary',
|
|
2315
|
-
|
|
2316
|
-
errorBorderColor: 'errorBorderPrimary',
|
|
2317
|
-
fill: 'surfacePrimary',
|
|
2284
|
+
appearance: 'surfacePrimary sizeM',
|
|
2285
|
+
errorBorderColor: 'errorBorderSecondary',
|
|
2318
2286
|
fillActive: 'accentPrimary',
|
|
2319
2287
|
fillActiveDisabled: 'surfaceTertiary',
|
|
2320
2288
|
fillActiveHover: 'errorPrimary',
|
|
@@ -2322,16 +2290,15 @@ const defaultChipsProps = {
|
|
|
2322
2290
|
iconItemFill: 'surfaceItemPrimary',
|
|
2323
2291
|
iconSize: 14,
|
|
2324
2292
|
indicatorFill: 'accentPrimary',
|
|
2325
|
-
labelSize: 's',
|
|
2326
|
-
labelTextActiveColor: 'accentTextPrimary',
|
|
2327
|
-
labelTextActiveColorDisabled: 'surfaceTextDisabled',
|
|
2328
|
-
labelTextColor: 'surfaceTextPrimary',
|
|
2329
|
-
labelTextColorDisabled: 'surfaceTextDisabled',
|
|
2293
|
+
// labelSize: 's',
|
|
2294
|
+
// labelTextActiveColor: 'accentTextPrimary',
|
|
2295
|
+
// labelTextActiveColorDisabled: 'surfaceTextDisabled',
|
|
2296
|
+
// labelTextColor: 'surfaceTextPrimary',
|
|
2297
|
+
// labelTextColorDisabled: 'surfaceTextDisabled',
|
|
2330
2298
|
// appearance depending on the type of error
|
|
2331
2299
|
// required
|
|
2332
|
-
requiredBorderColor: '
|
|
2333
|
-
shape: 'rounded'
|
|
2334
|
-
size: 'm'
|
|
2300
|
+
requiredBorderColor: 'warningBorderSecondary',
|
|
2301
|
+
shape: 'rounded'
|
|
2335
2302
|
};
|
|
2336
2303
|
|
|
2337
2304
|
function ChipsField(props) {
|