@itcase/ui 1.8.4 → 1.8.9
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/{Input_cjs_DkQh0Utd.js → Input_cjs_C8RWS1SD.js} +134 -38
- package/dist/Input_es_FXxp51gq.js +195 -0
- package/dist/cjs/components/DadataHintField.js +1 -1
- package/dist/cjs/components/DatePicker.js +1 -1
- package/dist/cjs/components/Input.js +1 -2
- package/dist/cjs/components/Select.js +18 -7
- package/dist/cjs/components/Switch.js +1 -1
- package/dist/components/DadataHintField.js +1 -1
- package/dist/components/DatePicker.js +1 -1
- package/dist/components/Input.js +1 -1
- package/dist/components/Select.js +18 -7
- package/dist/components/Switch.js +1 -1
- package/dist/css/components/Avatar/Avatar.css +4 -4
- package/dist/css/components/Choice/Choice.css +4 -0
- package/dist/css/components/DadataHintField/DadataHintField.css +1 -1
- package/dist/css/components/DatePicker/DatePicker.css +10 -12
- package/dist/css/components/Input/Input.css +8 -2
- package/dist/css/components/InputPassword/InputPassword.css +1 -1
- package/dist/css/components/Pagination/Pagination.css +3 -3
- package/dist/css/components/Switch/Switch.css +1 -1
- package/dist/types/components/Input/Input.appearance.d.ts +1 -2
- package/dist/types/components/Input/Input.interface.d.ts +1 -2
- package/dist/types/components/Input/appearance/inputDefault.d.ts +24 -0
- package/dist/types/components/Input/appearance/inputDisabled.d.ts +20 -0
- package/dist/types/components/Input/appearance/inputError.d.ts +20 -0
- package/dist/types/components/Input/appearance/inputRequire.d.ts +20 -0
- package/dist/types/components/Input/appearance/inputSize.d.ts +31 -0
- package/dist/types/components/Input/appearance/inputStyle.d.ts +14 -0
- package/dist/types/components/Input/appearance/inputSuccess.d.ts +20 -0
- package/dist/types/components/Input/index.d.ts +1 -1
- package/dist/types/components/Select/appearance/selectDefault.d.ts +21 -0
- package/dist/types/components/Select/appearance/selectSize.d.ts +11 -0
- package/package.json +3 -3
- package/dist/Input_es_Bs0gEq3L.js +0 -98
- package/dist/types/appearance/default/defaultAccent.d.ts +0 -33
- package/dist/types/appearance/default/defaultAppearance.d.ts +0 -33
- package/dist/types/appearance/default/defaultDanger.d.ts +0 -33
- package/dist/types/appearance/default/defaultDisabled.d.ts +0 -33
- package/dist/types/appearance/default/defaultError.d.ts +0 -33
- package/dist/types/appearance/default/defaultInfo.d.ts +0 -33
- package/dist/types/appearance/default/defaultPrimary.d.ts +0 -33
- package/dist/types/appearance/default/defaultSecondary.d.ts +0 -33
- package/dist/types/appearance/default/defaultSuccess.d.ts +0 -33
- package/dist/types/appearance/default/defaultSurface.d.ts +0 -33
- package/dist/types/appearance/default/defaultWarning.d.ts +0 -33
- package/dist/types/appearance/index.d.ts +0 -12
- package/dist/types/appearance/styleAppearance.d.ts +0 -14
|
@@ -1242,6 +1242,7 @@ h2.react-datepicker__current-month {
|
|
|
1242
1242
|
width: 100%;
|
|
1243
1243
|
border-radius: var(--date-picker-day-border-radius);
|
|
1244
1244
|
&__input {
|
|
1245
|
+
width: 100%;
|
|
1245
1246
|
border-radius: var(--date-picker-day-border-radius);
|
|
1246
1247
|
}
|
|
1247
1248
|
}
|
|
@@ -1290,14 +1291,11 @@ h2.react-datepicker__current-month {
|
|
|
1290
1291
|
--date-picker-fill: var(--color-surface-fill-primary);
|
|
1291
1292
|
--date-picker-box-shadow: 0px 4px 24px 0px rgb(0, 0, 0, 0.2);
|
|
1292
1293
|
--date-picker-border-radius: 12px;
|
|
1293
|
-
--date-picker-border: solid 1px var(--color-surface-tertiary);
|
|
1294
|
+
--date-picker-border: solid 1px var(--color-surface-fill-tertiary);
|
|
1294
1295
|
|
|
1295
1296
|
--date-picker-input-container-padding: 9px 15px;
|
|
1296
1297
|
--date-picker-input-border-radius: 6px;
|
|
1297
1298
|
|
|
1298
|
-
--date-picker-name-size: 16px;
|
|
1299
|
-
|
|
1300
|
-
--date-picker-name-weight: 400;
|
|
1301
1299
|
--date-picker-selected-weight: 400;
|
|
1302
1300
|
--date-picker-week-width: 40px;
|
|
1303
1301
|
--date-picker-week-height: 40px;
|
|
@@ -1309,10 +1307,12 @@ h2.react-datepicker__current-month {
|
|
|
1309
1307
|
--date-picker-week-number-fill-hover: #eee;
|
|
1310
1308
|
--date-picker-week-number-text-color: var(--color-surface-text-quaternary);
|
|
1311
1309
|
|
|
1310
|
+
--date-picker-name-size: 16px;
|
|
1311
|
+
--date-picker-name-weight: 400;
|
|
1312
1312
|
--date-picker-day-name-text-size: 16px;
|
|
1313
1313
|
--date-picker-day-name-text-line-height: 18px;
|
|
1314
1314
|
--date-picker-day-name-text-weight: normal;
|
|
1315
|
-
--date-picker-day-name-text-color: var(--color-surface-text-
|
|
1315
|
+
--date-picker-day-name-text-color: var(--color-surface-text-quaternary);
|
|
1316
1316
|
|
|
1317
1317
|
--date-picker-day-width: 40px;
|
|
1318
1318
|
--date-picker-day-height: 40px;
|
|
@@ -1321,16 +1321,16 @@ h2.react-datepicker__current-month {
|
|
|
1321
1321
|
--date-picker-day-text-weight: normal;
|
|
1322
1322
|
--date-picker-day-text-color: var(--color-surface-text-primary);
|
|
1323
1323
|
--date-picker-day-padding: 8px 0;
|
|
1324
|
-
--date-picker-day-hover-background: var(--color-accent-tertiary);
|
|
1324
|
+
--date-picker-day-hover-background: var(--color-accent-fill-tertiary);
|
|
1325
1325
|
--date-picker-day-hover-text-color: var(--color-surface-text-secondary);
|
|
1326
1326
|
--date-picker-day-border-radius: 8px;
|
|
1327
1327
|
|
|
1328
|
-
--date-picker-day-today-background: var(--color-surface-secondary);
|
|
1328
|
+
--date-picker-day-today-background: var(--color-surface-fill-secondary);
|
|
1329
1329
|
--date-picker-day-today-border-radius: 12px;
|
|
1330
1330
|
--date-picker-day-today-text-color: var(--color-surface-text-primary);
|
|
1331
1331
|
|
|
1332
1332
|
--date-picker-day-range-start-end-border-radius: 8px;
|
|
1333
|
-
--date-picker-day-range-background: var(--color-accent-tertiary);
|
|
1333
|
+
--date-picker-day-range-background: var(--color-accent-fill-tertiary);
|
|
1334
1334
|
--date-picker-day-range-text-color: var(--color-accent-text-secondary);
|
|
1335
1335
|
--date-picker-day-range-border-radius: 0;
|
|
1336
1336
|
--date-picker-day-range-start-border-radius: 12px 0 0 12px;
|
|
@@ -1342,10 +1342,8 @@ h2.react-datepicker__current-month {
|
|
|
1342
1342
|
--color-secondary-text-disabled
|
|
1343
1343
|
);
|
|
1344
1344
|
|
|
1345
|
-
--date-picker-day-selected-background: var(--color-accent-primary);
|
|
1346
|
-
--date-picker-day-selected-background-hover: var(
|
|
1347
|
-
--color-accent-primary-hover
|
|
1348
|
-
);
|
|
1345
|
+
--date-picker-day-selected-background: var(--color-accent-fill-primary);
|
|
1346
|
+
--date-picker-day-selected-background-hover: var(--color-accent-fill-hover);
|
|
1349
1347
|
--date-picker-day-selected-text-color: var(--color-accent-text-primary);
|
|
1350
1348
|
--date-picker-day-selected-text-hover-color: var(--color-accent-text-primary);
|
|
1351
1349
|
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
--input-size-xl-padding: 13px 20px;
|
|
80
80
|
--input-size-xxl-padding: 17px 25px;
|
|
81
81
|
|
|
82
|
-
--input-caret-color: var(--color-accent-primary);
|
|
82
|
+
--input-caret-color: var(--color-accent-fill-primary);
|
|
83
83
|
|
|
84
84
|
/* State */
|
|
85
85
|
--input-state-success-background: none;
|
|
@@ -95,7 +95,13 @@
|
|
|
95
95
|
--input-state-hover-border: var(--color-surface-border-quaternary);
|
|
96
96
|
--input-state-hover-background: none;
|
|
97
97
|
|
|
98
|
-
|
|
98
|
+
--input-success-border: var(--color-success-border-primary);
|
|
99
|
+
--input-success-border-hover: var(--color-surface-border-quaternary);
|
|
100
|
+
--input-error-border: var(--color-error-border-primary);
|
|
101
|
+
--input-focus-background: var(--color-surface-primary);
|
|
102
|
+
--input-focus-border: var(--color-surface-border-quaternary);
|
|
103
|
+
|
|
104
|
+
/* Disabled */
|
|
99
105
|
--input-state-disabled-background: none;
|
|
100
106
|
--input-state-disabled-border: none;
|
|
101
107
|
}
|
|
@@ -87,6 +87,6 @@
|
|
|
87
87
|
--input-password-state-success-background: none;
|
|
88
88
|
--input-password-state-hover-border: var(--color-surface-border-quaternary);
|
|
89
89
|
--input-password-state-hover-background: none;
|
|
90
|
-
--input-password-caret-color: var(--color-accent-primary);
|
|
90
|
+
--input-password-caret-color: var(--color-accent-fill-primary);
|
|
91
91
|
--input-password-shape-rounded: 0;
|
|
92
92
|
}
|
|
@@ -131,11 +131,11 @@
|
|
|
131
131
|
--paginator-item-transition: all 0.2s ease 0s;
|
|
132
132
|
|
|
133
133
|
--paginator-item-default-fill: var(--color-surface-fill-primary);
|
|
134
|
-
--paginator-item-default-fill-hover: var(--color-surface-hover);
|
|
134
|
+
--paginator-item-default-fill-hover: var(--color-surface-fill-hover);
|
|
135
135
|
--paginator-item-default-text: var(--color-surface-text-primary);
|
|
136
136
|
|
|
137
|
-
--paginator-item-active-fill: var(--color-accent-primary);
|
|
138
|
-
--paginator-item-active-fill-hover: var(--color-accent-primary);
|
|
137
|
+
--paginator-item-active-fill: var(--color-accent-fill-primary);
|
|
138
|
+
--paginator-item-active-fill-hover: var(--color-accent-fill-primary);
|
|
139
139
|
--paginator-item-active-text: var(--color-accent-text-primary);
|
|
140
140
|
|
|
141
141
|
--paginator-item-disabled-fill: none;
|
|
@@ -27,7 +27,6 @@ type InputAppearance = {
|
|
|
27
27
|
interface InputConfig {
|
|
28
28
|
[key: number | string | symbol]: any;
|
|
29
29
|
appearance: InputAppearance | undefined;
|
|
30
|
-
state: InputState | undefined;
|
|
31
30
|
setAppearance: (newComponent: InputAppearance) => void;
|
|
32
31
|
setState: (newComponent: InputState) => void;
|
|
33
32
|
}
|
|
@@ -50,4 +49,4 @@ interface InputProps extends InputThemeColor, StyleAttributes {
|
|
|
50
49
|
onFocus?: (event?: React.FocusEvent<HTMLInputElement>) => void;
|
|
51
50
|
onKeyDown?: (event?: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
52
51
|
}
|
|
53
|
-
export type { InputThemeColor,
|
|
52
|
+
export type { InputThemeColor, InputAppearance, InputConfig, InputProps };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
declare const inputAppearanceDefault: {
|
|
2
|
+
defaultPrimary: {
|
|
3
|
+
fill: string;
|
|
4
|
+
borderColor: string;
|
|
5
|
+
borderHover: string;
|
|
6
|
+
iconBeforeFill: string;
|
|
7
|
+
iconClearFill: string;
|
|
8
|
+
textColor: string;
|
|
9
|
+
textColorDisabled: string;
|
|
10
|
+
caret: string;
|
|
11
|
+
};
|
|
12
|
+
defaultSecondary: {
|
|
13
|
+
fill: string;
|
|
14
|
+
borderColor: string;
|
|
15
|
+
borderHover: string;
|
|
16
|
+
iconBeforeFill: string;
|
|
17
|
+
iconClearFill: string;
|
|
18
|
+
placeholderTextColor: string;
|
|
19
|
+
textColor: string;
|
|
20
|
+
textColorDisabled: string;
|
|
21
|
+
caret: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export { inputAppearanceDefault };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const inputAppearanceDisabled: {
|
|
2
|
+
disabledPrimary: {
|
|
3
|
+
fill: string;
|
|
4
|
+
borderColor: string;
|
|
5
|
+
borderHover: string;
|
|
6
|
+
textColor: string;
|
|
7
|
+
iconBeforeFill: string;
|
|
8
|
+
iconClearFill: string;
|
|
9
|
+
placeholderTextColor: string;
|
|
10
|
+
};
|
|
11
|
+
disabledSecondary: {
|
|
12
|
+
fill: string;
|
|
13
|
+
borderColor: string;
|
|
14
|
+
borderHover: string;
|
|
15
|
+
iconBeforeFill: string;
|
|
16
|
+
iconClearFill: string;
|
|
17
|
+
placeholderTextColor: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export { inputAppearanceDisabled };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const inputAppearanceError: {
|
|
2
|
+
errorPrimary: {
|
|
3
|
+
fill: string;
|
|
4
|
+
borderColor: string;
|
|
5
|
+
borderHover: string;
|
|
6
|
+
textColor: string;
|
|
7
|
+
iconBeforeFill: string;
|
|
8
|
+
iconClearFill: string;
|
|
9
|
+
placeholderTextColor: string;
|
|
10
|
+
};
|
|
11
|
+
errorSecondary: {
|
|
12
|
+
fill: string;
|
|
13
|
+
borderColor: string;
|
|
14
|
+
borderHover: string;
|
|
15
|
+
iconBeforeFill: string;
|
|
16
|
+
iconClearFill: string;
|
|
17
|
+
placeholderTextColor: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export { inputAppearanceError };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const inputAppearanceRequire: {
|
|
2
|
+
requirePrimary: {
|
|
3
|
+
fill: string;
|
|
4
|
+
borderColor: string;
|
|
5
|
+
borderHover: string;
|
|
6
|
+
textColor: string;
|
|
7
|
+
iconBeforeFill: string;
|
|
8
|
+
iconClearFill: string;
|
|
9
|
+
placeholderTextColor: string;
|
|
10
|
+
};
|
|
11
|
+
requireSecondary: {
|
|
12
|
+
fill: string;
|
|
13
|
+
borderColor: string;
|
|
14
|
+
borderHover: string;
|
|
15
|
+
iconBeforeFill: string;
|
|
16
|
+
iconClearFill: string;
|
|
17
|
+
placeholderTextColor: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export { inputAppearanceRequire };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
declare const inputAppearanceSize: {
|
|
2
|
+
sizeXXL: {
|
|
3
|
+
size: string;
|
|
4
|
+
textSize: string;
|
|
5
|
+
};
|
|
6
|
+
sizeXL: {
|
|
7
|
+
size: string;
|
|
8
|
+
textSize: string;
|
|
9
|
+
};
|
|
10
|
+
sizeL: {
|
|
11
|
+
size: string;
|
|
12
|
+
textSize: string;
|
|
13
|
+
};
|
|
14
|
+
sizeM: {
|
|
15
|
+
size: string;
|
|
16
|
+
textSize: string;
|
|
17
|
+
};
|
|
18
|
+
sizeS: {
|
|
19
|
+
size: string;
|
|
20
|
+
textSize: string;
|
|
21
|
+
};
|
|
22
|
+
sizeXS: {
|
|
23
|
+
size: string;
|
|
24
|
+
textSize: string;
|
|
25
|
+
};
|
|
26
|
+
sizeXXS: {
|
|
27
|
+
size: string;
|
|
28
|
+
textSize: string;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
export { inputAppearanceSize };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
declare const inputAppearanceSuccess: {
|
|
2
|
+
successPrimary: {
|
|
3
|
+
fill: string;
|
|
4
|
+
borderColor: string;
|
|
5
|
+
borderHover: string;
|
|
6
|
+
textColor: string;
|
|
7
|
+
iconBeforeFill: string;
|
|
8
|
+
iconClearFill: string;
|
|
9
|
+
placeholderTextColor: string;
|
|
10
|
+
};
|
|
11
|
+
successSecondary: {
|
|
12
|
+
fill: string;
|
|
13
|
+
borderColor: string;
|
|
14
|
+
borderHover: string;
|
|
15
|
+
iconBeforeFill: string;
|
|
16
|
+
iconClearFill: string;
|
|
17
|
+
placeholderTextColor: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export { inputAppearanceSuccess };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { Input, inputConfig } from './Input';
|
|
2
|
-
export { inputAppearance
|
|
2
|
+
export { inputAppearance } from './Input.appearance';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
declare const selectAppearanceDefault: {
|
|
2
|
+
defaultPrimary: {
|
|
3
|
+
elevation: number;
|
|
4
|
+
inputBorderColor: string;
|
|
5
|
+
inputBorderColorHover: string;
|
|
6
|
+
inputFill: string;
|
|
7
|
+
inputShape: string;
|
|
8
|
+
inputTextColor: string;
|
|
9
|
+
multipleItemFill: string;
|
|
10
|
+
multipleItemFillHover: string;
|
|
11
|
+
multipleTextColor: string;
|
|
12
|
+
noOptionsText: string;
|
|
13
|
+
noOptionsTextColor: string;
|
|
14
|
+
optionFill: string;
|
|
15
|
+
optionFillHover: string;
|
|
16
|
+
optionTextColor: string;
|
|
17
|
+
placeholder: string;
|
|
18
|
+
placeholderTextColor: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export { selectAppearanceDefault };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@itcase/ui",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.9",
|
|
4
4
|
"description": "UI components (Modal, Loader, Popup, etc)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Modal",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"dependencies": {
|
|
98
98
|
"@emotion/is-prop-valid": "^1.3.1",
|
|
99
99
|
"@itcase/common": "^1.2.23",
|
|
100
|
-
"@itcase/config": "^1.0.
|
|
100
|
+
"@itcase/config": "^1.0.47",
|
|
101
101
|
"@itcase/icons": "^1.0.31",
|
|
102
102
|
"@itcase/storybook-config": "^1.1.9",
|
|
103
103
|
"@itcase/tokens-am": "^1.1.7",
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
"eslint": "9.27.0",
|
|
164
164
|
"husky": "^9.1.7",
|
|
165
165
|
"lint-staged": "^16.0.0",
|
|
166
|
-
"npm": "^11.4.
|
|
166
|
+
"npm": "^11.4.1",
|
|
167
167
|
"postcss": "^8.5.3",
|
|
168
168
|
"prettier": "^3.5.3",
|
|
169
169
|
"react-docgen-typescript": "^2.2.2",
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { _ as __assign } from './tslib.es6_es_Bwu1Cn-t.js';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import clsx from 'clsx';
|
|
5
|
-
import { useDevicePropsGenerator } from './hooks/useDevicePropsGenerator/useDevicePropsGenerator.js';
|
|
6
|
-
|
|
7
|
-
var inputAppearance = {
|
|
8
|
-
dev: {
|
|
9
|
-
size: 'm',
|
|
10
|
-
borderColor: 'surfaceBorderTertiary',
|
|
11
|
-
textColor: 'surfaceTextPrimary',
|
|
12
|
-
textSize: 'm',
|
|
13
|
-
placeholderTextColor: 'surfaceTextSecondary',
|
|
14
|
-
shape: 'rounded',
|
|
15
|
-
},
|
|
16
|
-
};
|
|
17
|
-
var inputState = {
|
|
18
|
-
filled: {
|
|
19
|
-
borderColor: 'surfaceBorderQuaternary',
|
|
20
|
-
textColor: 'surfaceTextPrimary',
|
|
21
|
-
},
|
|
22
|
-
disabled: {
|
|
23
|
-
borderColor: 'surfaceBorderDisabled',
|
|
24
|
-
borderColorHover: 'surfaceBorderDisabled',
|
|
25
|
-
textColor: 'surfaceTextPrimary',
|
|
26
|
-
placeholderTextColor: 'surfaceTextDisabled',
|
|
27
|
-
},
|
|
28
|
-
error: {
|
|
29
|
-
borderColor: 'errorBorderPrimary',
|
|
30
|
-
placeholderTextColor: 'secondaryTextSecondary',
|
|
31
|
-
},
|
|
32
|
-
errorFilled: {
|
|
33
|
-
borderColor: 'errorBorderPrimary',
|
|
34
|
-
textColor: 'surfaceTextPrimary',
|
|
35
|
-
},
|
|
36
|
-
success: {
|
|
37
|
-
borderColor: 'successBorderPrimary',
|
|
38
|
-
textColor: 'surfaceTextPrimary',
|
|
39
|
-
},
|
|
40
|
-
active: {
|
|
41
|
-
borderColor: 'surfaceBorderActive',
|
|
42
|
-
placeholderTextColor: 'secondaryTextSecondary',
|
|
43
|
-
},
|
|
44
|
-
activeFilled: {
|
|
45
|
-
borderColor: 'surfaceBorderActive',
|
|
46
|
-
textColor: 'surfaceTextPrimary',
|
|
47
|
-
},
|
|
48
|
-
normal: {
|
|
49
|
-
borderColor: 'surfaceBorderQuaternary',
|
|
50
|
-
placeholderTextColor: 'secondaryTextSecondary',
|
|
51
|
-
},
|
|
52
|
-
readonly: {
|
|
53
|
-
borderColor: 'surfaceBorderDisabled',
|
|
54
|
-
textColor: 'surfaceTextPrimary',
|
|
55
|
-
},
|
|
56
|
-
require: {
|
|
57
|
-
borderColor: 'surfaceBorderActive',
|
|
58
|
-
textColor: 'surfaceTextPrimary',
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
var inputConfig = {
|
|
63
|
-
appearance: inputAppearance,
|
|
64
|
-
state: inputState,
|
|
65
|
-
setAppearance: function (appearanceConfig) {
|
|
66
|
-
inputConfig.appearance = appearanceConfig;
|
|
67
|
-
},
|
|
68
|
-
setState: function (newComponent) {
|
|
69
|
-
inputConfig.state = newComponent;
|
|
70
|
-
},
|
|
71
|
-
};
|
|
72
|
-
var Input = React.forwardRef(function Input(props, ref) {
|
|
73
|
-
var id = props.id, className = props.className, _a = props.type, type = _a === void 0 ? 'text' : _a, name = props.name, appearance = props.appearance, isDisabled = props.isDisabled, autocomplete = props.autocomplete, dataTestId = props.dataTestId, index = props.index, placeholder = props.placeholder, value = props.value, onBlur = props.onBlur, onChange = props.onChange, onFocus = props.onFocus, onKeyDown = props.onKeyDown;
|
|
74
|
-
var appearanceConfig = appearance === null || appearance === void 0 ? void 0 : appearance.split(' ').reduce(function (resultConfig, appearanceKey) {
|
|
75
|
-
var _a;
|
|
76
|
-
return (__assign(__assign({}, resultConfig), (_a = inputConfig.appearance) === null || _a === void 0 ? void 0 : _a[appearanceKey]));
|
|
77
|
-
}, {});
|
|
78
|
-
// const stateConfig = state && inputConfig.state && inputConfig.state[state]
|
|
79
|
-
var propsGenerator = useDevicePropsGenerator(props, appearanceConfig);
|
|
80
|
-
var fillClass = propsGenerator.fillClass, fillDisabledClass = propsGenerator.fillDisabledClass, fillHoverClass = propsGenerator.fillHoverClass, borderColorClass = propsGenerator.borderColorClass, borderColorDisabledClass = propsGenerator.borderColorDisabledClass, borderWidthClass = propsGenerator.borderWidthClass, borderWidthDisabledClass = propsGenerator.borderWidthDisabledClass, textColorClass = propsGenerator.textColorClass, textColorDisabledClass = propsGenerator.textColorDisabledClass, textSizeClass = propsGenerator.textSizeClass, textWeightClass = propsGenerator.textWeightClass, placeholderTextColorDisabledClass = propsGenerator.placeholderTextColorDisabledClass, caretClass = propsGenerator.caretClass, placeholderTextColorClass = propsGenerator.placeholderTextColorClass, shapeClass = propsGenerator.shapeClass, sizeClass = propsGenerator.sizeClass, widthClass = propsGenerator.widthClass;
|
|
81
|
-
return (jsx("input", { id: String(id), className: clsx(className, 'input', type === 'number' && 'input_type_number', (textSizeClass || textColorClass || textWeightClass) && 'text', caretClass && "caret-color_".concat(caretClass), shapeClass && "input_shape_".concat(shapeClass), textSizeClass && "text_size_".concat(textSizeClass), textWeightClass && "text-weight_".concat(textWeightClass), widthClass && "width_".concat(widthClass), sizeClass && "input_size_".concat(sizeClass), textColorClass && "text-color_".concat(textColorClass), !isDisabled
|
|
82
|
-
? fillClass && "fill_".concat(fillClass)
|
|
83
|
-
: fillDisabledClass && "fill_disabled_".concat(fillDisabledClass), !isDisabled
|
|
84
|
-
? borderWidthClass && "border-width_".concat(borderWidthClass)
|
|
85
|
-
: borderWidthDisabledClass &&
|
|
86
|
-
"border-width_disabled_".concat(borderWidthDisabledClass), !isDisabled ? fillHoverClass && "fill_hover_".concat(fillHoverClass) : null, !isDisabled
|
|
87
|
-
? borderColorClass && "border-color_".concat(borderColorClass)
|
|
88
|
-
: borderColorDisabledClass &&
|
|
89
|
-
"border-color_disabled_".concat(borderColorDisabledClass), !isDisabled
|
|
90
|
-
? placeholderTextColorClass &&
|
|
91
|
-
"placeholder-text-color_".concat(placeholderTextColorClass)
|
|
92
|
-
: placeholderTextColorDisabledClass &&
|
|
93
|
-
"placeholder-text-color_disabled_".concat(placeholderTextColorDisabledClass), !isDisabled
|
|
94
|
-
? textColorClass && "text-color_".concat(textColorClass)
|
|
95
|
-
: textColorDisabledClass && "text-color_".concat(textColorDisabledClass)), type: type, disabled: isDisabled, autocomplete: autocomplete, "data-test-id": dataTestId || (name ? "".concat(name, "Input") : 'input'), index: index, placeholder: placeholder, ref: ref, value: value, onBlur: onBlur, onChange: onChange, onFocus: onFocus, onKeyDown: onKeyDown }));
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
export { Input as I, inputAppearance as a, inputState as b, inputConfig as i };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
declare const defaultAccentAppearance: {
|
|
2
|
-
accent: {
|
|
3
|
-
fill: string;
|
|
4
|
-
fillHover: string;
|
|
5
|
-
borderColor: string;
|
|
6
|
-
textColor: string;
|
|
7
|
-
};
|
|
8
|
-
accentPrimary: {
|
|
9
|
-
fill: string;
|
|
10
|
-
borderColor: string;
|
|
11
|
-
textColor: string;
|
|
12
|
-
iconFill: string;
|
|
13
|
-
};
|
|
14
|
-
accentSecondary: {
|
|
15
|
-
fill: string;
|
|
16
|
-
borderColor: string;
|
|
17
|
-
textColor: string;
|
|
18
|
-
iconFill: string;
|
|
19
|
-
};
|
|
20
|
-
accentTertiary: {
|
|
21
|
-
fill: string;
|
|
22
|
-
borderColor: string;
|
|
23
|
-
textColor: string;
|
|
24
|
-
iconFill: string;
|
|
25
|
-
};
|
|
26
|
-
accentQuaternary: {
|
|
27
|
-
fill: string;
|
|
28
|
-
borderColor: string;
|
|
29
|
-
textColor: string;
|
|
30
|
-
iconFill: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
export { defaultAccentAppearance };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
declare const defaultAppearance: {
|
|
2
|
-
accent: {
|
|
3
|
-
fill: string;
|
|
4
|
-
fillHover: string;
|
|
5
|
-
borderColor: string;
|
|
6
|
-
textColor: string;
|
|
7
|
-
};
|
|
8
|
-
accentPrimary: {
|
|
9
|
-
fill: string;
|
|
10
|
-
borderColor: string;
|
|
11
|
-
textColor: string;
|
|
12
|
-
iconFill: string;
|
|
13
|
-
};
|
|
14
|
-
accentSecondary: {
|
|
15
|
-
fill: string;
|
|
16
|
-
borderColor: string;
|
|
17
|
-
textColor: string;
|
|
18
|
-
iconFill: string;
|
|
19
|
-
};
|
|
20
|
-
accentTertiary: {
|
|
21
|
-
fill: string;
|
|
22
|
-
borderColor: string;
|
|
23
|
-
textColor: string;
|
|
24
|
-
iconFill: string;
|
|
25
|
-
};
|
|
26
|
-
accentQuaternary: {
|
|
27
|
-
fill: string;
|
|
28
|
-
borderColor: string;
|
|
29
|
-
textColor: string;
|
|
30
|
-
iconFill: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
export { defaultAppearance };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
declare const defaultDangerAppearance: {
|
|
2
|
-
danger: {
|
|
3
|
-
fill: string;
|
|
4
|
-
fillHover: string;
|
|
5
|
-
borderColor: string;
|
|
6
|
-
textColor: string;
|
|
7
|
-
};
|
|
8
|
-
dangerPrimary: {
|
|
9
|
-
fill: string;
|
|
10
|
-
borderColor: string;
|
|
11
|
-
textColor: string;
|
|
12
|
-
iconFill: string;
|
|
13
|
-
};
|
|
14
|
-
dangerSecondary: {
|
|
15
|
-
fill: string;
|
|
16
|
-
borderColor: string;
|
|
17
|
-
textColor: string;
|
|
18
|
-
iconFill: string;
|
|
19
|
-
};
|
|
20
|
-
dangerTertiary: {
|
|
21
|
-
fill: string;
|
|
22
|
-
borderColor: string;
|
|
23
|
-
textColor: string;
|
|
24
|
-
iconFill: string;
|
|
25
|
-
};
|
|
26
|
-
dangerQuaternary: {
|
|
27
|
-
fill: string;
|
|
28
|
-
borderColor: string;
|
|
29
|
-
textColor: string;
|
|
30
|
-
iconFill: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
export { defaultDangerAppearance };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
declare const defaultDisabledAppearance: {
|
|
2
|
-
disabled: {
|
|
3
|
-
fill: string;
|
|
4
|
-
fillHover: string;
|
|
5
|
-
borderColor: string;
|
|
6
|
-
textColor: string;
|
|
7
|
-
};
|
|
8
|
-
disabledPrimary: {
|
|
9
|
-
fill: string;
|
|
10
|
-
borderColor: string;
|
|
11
|
-
textColor: string;
|
|
12
|
-
iconFill: string;
|
|
13
|
-
};
|
|
14
|
-
disabledSecondary: {
|
|
15
|
-
fill: string;
|
|
16
|
-
borderColor: string;
|
|
17
|
-
textColor: string;
|
|
18
|
-
iconFill: string;
|
|
19
|
-
};
|
|
20
|
-
disabledTertiary: {
|
|
21
|
-
fill: string;
|
|
22
|
-
borderColor: string;
|
|
23
|
-
textColor: string;
|
|
24
|
-
iconFill: string;
|
|
25
|
-
};
|
|
26
|
-
disabledQuaternary: {
|
|
27
|
-
fill: string;
|
|
28
|
-
borderColor: string;
|
|
29
|
-
textColor: string;
|
|
30
|
-
iconFill: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
export { defaultDisabledAppearance };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
declare const defaultErrorAppearance: {
|
|
2
|
-
error: {
|
|
3
|
-
fill: string;
|
|
4
|
-
fillHover: string;
|
|
5
|
-
borderColor: string;
|
|
6
|
-
textColor: string;
|
|
7
|
-
};
|
|
8
|
-
errorPrimary: {
|
|
9
|
-
fill: string;
|
|
10
|
-
borderColor: string;
|
|
11
|
-
textColor: string;
|
|
12
|
-
iconFill: string;
|
|
13
|
-
};
|
|
14
|
-
errorSecondary: {
|
|
15
|
-
fill: string;
|
|
16
|
-
borderColor: string;
|
|
17
|
-
textColor: string;
|
|
18
|
-
iconFill: string;
|
|
19
|
-
};
|
|
20
|
-
errorTertiary: {
|
|
21
|
-
fill: string;
|
|
22
|
-
borderColor: string;
|
|
23
|
-
textColor: string;
|
|
24
|
-
iconFill: string;
|
|
25
|
-
};
|
|
26
|
-
errorQuaternary: {
|
|
27
|
-
fill: string;
|
|
28
|
-
borderColor: string;
|
|
29
|
-
textColor: string;
|
|
30
|
-
iconFill: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
export { defaultErrorAppearance };
|