kamotive_ui 1.2.2 → 1.2.3
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/Icons/IconClose/IconClose10.d.ts +2 -1
- package/dist/Icons/IconClose/IconClose10.js +2 -2
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +3 -6
- package/dist/components/Button/Button.module.css +0 -11
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.js +5 -3
- package/dist/components/Checkbox/Checkbox.module.css +0 -11
- package/dist/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +12 -11
- package/dist/components/ColorPicker/ColorPicker.module.css +25 -42
- package/dist/components/Dropdown/Dropdown.d.ts +12 -8
- package/dist/components/Dropdown/Dropdown.js +230 -77
- package/dist/components/Dropdown/Dropdown.module.css +152 -89
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +26 -25
- package/dist/components/Input/Input.module.css +92 -45
- package/dist/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +4 -3
- package/dist/components/ProgressBar/ProgressBar.module.css +4 -11
- package/dist/components/ProgressLoader/ProgressLoader.d.ts +1 -1
- package/dist/components/ProgressLoader/ProgressLoader.js +3 -2
- package/dist/components/ProgressLoader/ProgressLoader.module.css +2 -11
- package/dist/components/RadioButton/RadioButton.d.ts +1 -1
- package/dist/components/RadioButton/RadioButton.js +5 -3
- package/dist/components/RadioButton/RadioButton.module.css +2 -15
- package/dist/components/SettingTag/SettingTag.d.ts +1 -1
- package/dist/components/SettingTag/SettingTag.js +2 -1
- package/dist/components/SettingTag/SettingTag.module.css +0 -9
- package/dist/components/Snackbar/Snackbar.d.ts +1 -1
- package/dist/components/Snackbar/Snackbar.js +3 -2
- package/dist/components/Snackbar/Snackbar.module.css +1 -9
- package/dist/components/Tab/Tab.d.ts +1 -1
- package/dist/components/Tab/Tab.js +7 -4
- package/dist/components/Tab/Tab.module.css +4 -17
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/Tabs/Tabs.js +2 -1
- package/dist/components/Tabs/Tabs.module.css +0 -6
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/components/Tag/Tag.js +2 -1
- package/dist/components/Tag/Tag.module.css +68 -74
- package/dist/components/ToggleButton/ToggleButton.d.ts +1 -1
- package/dist/components/ToggleButton/ToggleButton.js +6 -4
- package/dist/components/ToggleButton/ToggleButton.module.css +0 -5
- package/dist/components/Typography/Typography.d.ts +1 -1
- package/dist/components/Typography/Typography.js +3 -2
- package/dist/components/Typography/Typography.module.css +8 -13
- package/dist/components/Typography/enums.d.ts +2 -0
- package/dist/components/Typography/enums.js +2 -0
- package/dist/index.d.ts +8 -7
- package/dist/index.js +7 -7
- package/dist/types/index.d.ts +261 -0
- package/dist/types/index.js +1 -0
- package/package.json +2 -1
|
@@ -1,72 +1,69 @@
|
|
|
1
|
-
.
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
width: 900px;
|
|
1
|
+
.dropdown--container {
|
|
2
|
+
position: relative;
|
|
3
|
+
width: 100%;
|
|
4
|
+
max-width: 260px;
|
|
6
5
|
}
|
|
7
|
-
.
|
|
6
|
+
.dropdown--container-left {
|
|
8
7
|
display: flex;
|
|
8
|
+
gap: 20px;
|
|
9
9
|
align-items: center;
|
|
10
|
-
|
|
10
|
+
flex-wrap: nowrap;
|
|
11
|
+
width: fit-content;
|
|
12
|
+
max-width: none;
|
|
11
13
|
}
|
|
12
|
-
.
|
|
13
|
-
margin-
|
|
14
|
+
.dropdown--container-label {
|
|
15
|
+
margin-top: 20px;
|
|
14
16
|
}
|
|
15
|
-
.dropdown--container{
|
|
16
|
-
|
|
17
|
-
font-style: normal;
|
|
18
|
-
font-weight: 400;
|
|
19
|
-
line-height: 16.5px;
|
|
20
|
-
display: inline-block;
|
|
21
|
-
position: relative;
|
|
17
|
+
.dropdown--container-helperText {
|
|
18
|
+
margin-bottom: 15px;
|
|
22
19
|
}
|
|
23
|
-
|
|
20
|
+
|
|
21
|
+
.option--wrapper {
|
|
24
22
|
display: flex;
|
|
25
|
-
flex-direction: row;
|
|
26
|
-
gap: 20px;
|
|
27
23
|
align-items: center;
|
|
28
|
-
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.option--icon {
|
|
28
|
+
margin-left: 8px;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
.button {
|
|
32
|
-
font-family:
|
|
32
|
+
font-family: var(--font-family-main);
|
|
33
33
|
font-style: normal;
|
|
34
34
|
font-weight: 400;
|
|
35
35
|
line-height: 16.5px;
|
|
36
|
-
|
|
37
36
|
border-radius: 10px;
|
|
38
37
|
cursor: pointer;
|
|
39
|
-
/* padding: 0.5em 1em; */
|
|
40
38
|
padding: 10px 15px;
|
|
41
39
|
transition: all 0.3s ease;
|
|
42
|
-
width: 100%;
|
|
43
|
-
/* background-color: var(--white); */
|
|
44
40
|
background-color: transparent;
|
|
45
|
-
color:
|
|
41
|
+
color: var(--text-dark);
|
|
46
42
|
border: 1px solid var(--grey-light);
|
|
43
|
+
/* mix-blend-mode: multiply; */
|
|
47
44
|
display: flex;
|
|
48
45
|
align-items: center;
|
|
49
|
-
gap:
|
|
46
|
+
gap: 20px;
|
|
50
47
|
justify-content: space-between;
|
|
51
|
-
min-width: fit-content;
|
|
52
|
-
|
|
48
|
+
/* min-width: fit-content; */
|
|
49
|
+
position: relative;
|
|
50
|
+
width: 100%;
|
|
53
51
|
}
|
|
54
|
-
.button:hover{
|
|
52
|
+
.button:hover {
|
|
55
53
|
border: 1px solid #0d9aff00;
|
|
56
54
|
box-shadow: 0px 0px 2px var(--blue-main);
|
|
57
55
|
}
|
|
58
56
|
.button:focus,
|
|
59
|
-
.button:active{
|
|
57
|
+
.button:active {
|
|
60
58
|
border-color: var(--blue-main);
|
|
61
59
|
box-shadow: none;
|
|
62
|
-
|
|
63
60
|
}
|
|
64
|
-
.button--disabled{
|
|
61
|
+
.button--disabled {
|
|
65
62
|
background-color: rgba(120, 120, 128, 0.08);
|
|
66
63
|
border: 1px solid #0d9aff00;
|
|
67
64
|
color: rgba(60, 60, 67, 0.3);
|
|
68
65
|
}
|
|
69
|
-
.button--readOnly{
|
|
66
|
+
.button--readOnly {
|
|
70
67
|
background-color: rgba(120, 120, 128, 0.08);
|
|
71
68
|
border: 1px solid #0d9aff00;
|
|
72
69
|
color: var(--text-dark);
|
|
@@ -76,48 +73,74 @@
|
|
|
76
73
|
.button--disabled:active,
|
|
77
74
|
.button--readOnly:hover,
|
|
78
75
|
.button--readOnly:focus,
|
|
79
|
-
.button--readOnly:active{
|
|
76
|
+
.button--readOnly:active {
|
|
80
77
|
box-shadow: none;
|
|
81
78
|
border: 1px solid #0d9aff00;
|
|
82
79
|
}
|
|
83
|
-
.button--
|
|
80
|
+
.button--error {
|
|
81
|
+
border-color: var(--error-main);
|
|
82
|
+
color: var(--error-main);
|
|
83
|
+
}
|
|
84
|
+
.button--icons--item-selected {
|
|
84
85
|
display: flex;
|
|
85
86
|
align-items: center;
|
|
86
87
|
gap: 10px;
|
|
87
88
|
}
|
|
88
|
-
.button-item--selected{
|
|
89
|
+
.button-item--selected {
|
|
89
90
|
color: var(--text-dark);
|
|
90
91
|
}
|
|
91
92
|
|
|
92
93
|
/* Размеры кнопок */
|
|
93
|
-
.button--sm {
|
|
94
|
-
/* font-size: 0.8rem; */
|
|
95
|
-
font-size: 12px;
|
|
96
|
-
}
|
|
97
94
|
.button--md {
|
|
98
|
-
|
|
99
|
-
font-size: 14px;
|
|
95
|
+
font-size: 12px;
|
|
100
96
|
}
|
|
101
97
|
.button--lg {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
98
|
+
font-size: 14px;
|
|
99
|
+
}
|
|
100
|
+
.button:focus-visible {
|
|
101
|
+
outline: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.resetButton,
|
|
105
|
+
.dropdownIcon {
|
|
106
|
+
position: absolute;
|
|
107
|
+
background: none;
|
|
108
|
+
border: none;
|
|
109
|
+
cursor: pointer;
|
|
110
|
+
padding: 4px;
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.resetButton{
|
|
116
|
+
right: 35px;
|
|
117
|
+
}
|
|
118
|
+
.dropdownIcon{
|
|
119
|
+
right: 5px;
|
|
120
|
+
}
|
|
121
|
+
.resetButton:hover,
|
|
122
|
+
.dropdownIcon:hover {
|
|
123
|
+
background-color: rgba(120, 120, 128, 0.08);
|
|
124
|
+
border-radius: 50%;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.dropdown {
|
|
128
|
+
position: absolute;
|
|
129
|
+
top: 40px;
|
|
130
|
+
left: 0;
|
|
131
|
+
display: flex;
|
|
132
|
+
margin-top: 5px;
|
|
133
|
+
flex-direction: column;
|
|
134
|
+
align-items: flex-start;
|
|
135
|
+
padding: 10px 0px;
|
|
136
|
+
max-height: 175px;
|
|
137
|
+
width: 100%;
|
|
138
|
+
background: #ffffff;
|
|
139
|
+
box-shadow: 0px 0px 32px rgba(0, 0, 0, 0.2);
|
|
140
|
+
border-radius: 12px;
|
|
141
|
+
overflow-y: auto;
|
|
142
|
+
z-index: 1000;
|
|
143
|
+
overflow-x: hidden;
|
|
121
144
|
}
|
|
122
145
|
|
|
123
146
|
.item--container {
|
|
@@ -126,13 +149,12 @@ overflow-x: hidden;
|
|
|
126
149
|
margin: auto;
|
|
127
150
|
}
|
|
128
151
|
|
|
129
|
-
.item--container:hover
|
|
152
|
+
.item--container:hover,
|
|
153
|
+
.item--container--active {
|
|
130
154
|
background-color: rgba(120, 120, 128, 0.08);
|
|
131
155
|
border-radius: 5px;
|
|
132
|
-
width: 87%;
|
|
133
156
|
margin: auto;
|
|
134
|
-
|
|
135
|
-
|
|
157
|
+
}
|
|
136
158
|
|
|
137
159
|
.item-block {
|
|
138
160
|
cursor: pointer;
|
|
@@ -141,30 +163,19 @@ overflow-x: hidden;
|
|
|
141
163
|
}
|
|
142
164
|
.item-block--disabled {
|
|
143
165
|
color: var(--text-light);
|
|
144
|
-
cursor: not-allowed
|
|
166
|
+
cursor: not-allowed;
|
|
145
167
|
}
|
|
146
|
-
.item-block-
|
|
168
|
+
.item-block-icons,
|
|
147
169
|
.item-block-text {
|
|
148
170
|
display: grid;
|
|
149
171
|
grid-template-columns: auto 1fr;
|
|
150
172
|
justify-content: flex-start;
|
|
151
173
|
align-items: center;
|
|
152
|
-
gap:10px;
|
|
153
|
-
}
|
|
154
|
-
.item-block-default--selected {
|
|
155
|
-
display: grid;
|
|
156
|
-
grid-template-columns: auto 1fr 20px;
|
|
157
|
-
justify-content: space-between;
|
|
158
|
-
align-items: center;
|
|
159
|
-
overflow-x: hidden;
|
|
160
|
-
text-overflow: ellipsis;
|
|
161
|
-
white-space: nowrap;
|
|
162
174
|
gap: 10px;
|
|
163
|
-
color: var(--text-dark);
|
|
164
175
|
}
|
|
165
|
-
.item-block-
|
|
176
|
+
.item-block-icons--selected {
|
|
166
177
|
display: grid;
|
|
167
|
-
grid-template-columns: auto
|
|
178
|
+
grid-template-columns: auto 1fr 20px;
|
|
168
179
|
justify-content: space-between;
|
|
169
180
|
align-items: center;
|
|
170
181
|
overflow-x: hidden;
|
|
@@ -174,24 +185,21 @@ overflow-x: hidden;
|
|
|
174
185
|
color: var(--text-dark);
|
|
175
186
|
}
|
|
176
187
|
|
|
177
|
-
|
|
178
|
-
.item {
|
|
188
|
+
.item {
|
|
179
189
|
overflow: hidden;
|
|
180
190
|
text-overflow: ellipsis;
|
|
181
191
|
white-space: nowrap;
|
|
182
|
-
max-width: 100
|
|
192
|
+
max-width: 100%;
|
|
193
|
+
justify-self: self-start;
|
|
183
194
|
}
|
|
184
195
|
|
|
185
196
|
.label {
|
|
186
|
-
line-height: 14px;
|
|
187
|
-
font-weight: 400;
|
|
188
197
|
transition: 0.3ms ease-out;
|
|
189
198
|
/* color: var(--text-grey); */
|
|
190
199
|
}
|
|
191
200
|
.label--default {
|
|
192
|
-
font-size: 12px;
|
|
193
201
|
position: absolute;
|
|
194
|
-
top: -
|
|
202
|
+
top: -18px;
|
|
195
203
|
cursor: text;
|
|
196
204
|
white-space: nowrap;
|
|
197
205
|
overflow: hidden;
|
|
@@ -199,9 +207,64 @@ overflow-x: hidden;
|
|
|
199
207
|
max-width: calc(100% - 32px);
|
|
200
208
|
color: var(--text-grey);
|
|
201
209
|
}
|
|
210
|
+
.label--default.lg {
|
|
211
|
+
font-size: 12px;
|
|
212
|
+
}
|
|
213
|
+
.label--default.md {
|
|
214
|
+
font-size: 10px;
|
|
215
|
+
}
|
|
216
|
+
|
|
202
217
|
.label--left {
|
|
203
|
-
font-size: 13px;
|
|
204
218
|
color: var(--text-dark);
|
|
205
219
|
min-width: fit-content;
|
|
206
220
|
}
|
|
221
|
+
.label--left.lg {
|
|
222
|
+
font-size: 14px;
|
|
223
|
+
}
|
|
224
|
+
.label--left.md {
|
|
225
|
+
font-size: 12px;
|
|
226
|
+
}
|
|
227
|
+
/* Стили для обязательного поля */
|
|
228
|
+
.label--default.label--required {
|
|
229
|
+
position: relative;
|
|
230
|
+
top: 0;
|
|
231
|
+
}
|
|
232
|
+
.label--required::after {
|
|
233
|
+
content: '*';
|
|
234
|
+
color: var(--error-main);
|
|
235
|
+
position: absolute;
|
|
236
|
+
margin-left: 2px;
|
|
237
|
+
top: 2px;
|
|
238
|
+
font-size: 22px;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
.item-selected {
|
|
242
|
+
color: var(--text-dark);
|
|
243
|
+
white-space: nowrap;
|
|
244
|
+
overflow: hidden;
|
|
245
|
+
text-overflow: ellipsis;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.item-placeholder {
|
|
249
|
+
color: var(--text-grey);
|
|
250
|
+
transition: 0.3ms ease-out;
|
|
251
|
+
}
|
|
207
252
|
|
|
253
|
+
.helperText.md {
|
|
254
|
+
font-size: 10px;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.helperText.lg {
|
|
258
|
+
font-size: 12px;
|
|
259
|
+
}
|
|
260
|
+
.helperText {
|
|
261
|
+
position: absolute;
|
|
262
|
+
left: 0px;
|
|
263
|
+
bottom: -17px;
|
|
264
|
+
cursor: text;
|
|
265
|
+
transition: 0.3ms ease-out;
|
|
266
|
+
white-space: nowrap;
|
|
267
|
+
overflow: hidden;
|
|
268
|
+
text-overflow: ellipsis;
|
|
269
|
+
color: var(--error-main);
|
|
270
|
+
}
|
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
;
|
|
2
3
|
import styles from './Input.module.css';
|
|
3
4
|
import classNames from 'classnames';
|
|
5
|
+
import { Typography } from '../Typography/Typography';
|
|
4
6
|
/**
|
|
5
7
|
* Компонент Input для создания текстовых полей ввода различных стилей и размеров.
|
|
6
8
|
*/
|
|
7
|
-
export const Input = ({ id,
|
|
8
|
-
const handleChange = (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
9
|
+
export const Input = ({ id, label, placeholder, size = 'lg', value, className, multiline = false, rows = 4, resize = false, disabled = false, readOnly = false, isLeftLabel = false, icon, error = false, helperText, onChange, required = false, }) => {
|
|
10
|
+
const handleChange = (event) => {
|
|
11
|
+
event.stopPropagation();
|
|
12
|
+
onChange === null || onChange === void 0 ? void 0 : onChange(event);
|
|
12
13
|
};
|
|
13
|
-
const wrapperClassess = classNames(styles['wrapper'], {
|
|
14
|
-
'wrapper--left': isLeftLabel,
|
|
14
|
+
const wrapperClassess = classNames(styles['wrapper--input'], {
|
|
15
|
+
[styles['wrapper--left']]: isLeftLabel,
|
|
16
|
+
[styles['wrapper--input-label']]: label && !isLeftLabel && !required,
|
|
17
|
+
[styles['wrapper--input-helperText']]: error,
|
|
15
18
|
});
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
'
|
|
19
|
-
'
|
|
20
|
-
'
|
|
21
|
-
'textarea': multiline,
|
|
22
|
-
'resize': resize,
|
|
19
|
+
const inputClassess = classNames(styles.input, styles[size], className, {
|
|
20
|
+
[styles['input--error']]: error,
|
|
21
|
+
[styles['readOnly']]: readOnly,
|
|
22
|
+
[styles['input--withIcon']]: icon,
|
|
23
|
+
[styles['textarea']]: multiline,
|
|
24
|
+
// [styles['textarea-rows-&{rows}']]: multiline && rows,
|
|
25
|
+
[styles['resize']]: resize,
|
|
26
|
+
[styles['input--left']]: isLeftLabel,
|
|
23
27
|
});
|
|
24
|
-
const labelClasses = classNames(styles[
|
|
25
|
-
'label--default': !isLeftLabel,
|
|
26
|
-
'label--left': isLeftLabel,
|
|
27
|
-
|
|
28
|
-
const iconClassess = classNames(styles['icon'], {
|
|
29
|
-
'input--withIcon': multiline,
|
|
28
|
+
const labelClasses = classNames(styles.label, styles[size], {
|
|
29
|
+
[styles['label--default']]: !isLeftLabel,
|
|
30
|
+
[styles['label--left']]: isLeftLabel,
|
|
31
|
+
[styles['label--required']]: required,
|
|
30
32
|
});
|
|
31
33
|
return (React.createElement("div", { className: wrapperClassess },
|
|
32
|
-
|
|
33
|
-
React.createElement("div", { className:
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
hasError && helperText && React.createElement("div", { className: "helperText" }, helperText)));
|
|
34
|
+
label && (React.createElement(Typography, { variant: "Caption", className: labelClasses }, label)),
|
|
35
|
+
icon && React.createElement("div", { className: styles.icon }, icon),
|
|
36
|
+
multiline ? (React.createElement("textarea", { id: id, className: inputClassess, value: value, placeholder: placeholder, onChange: handleChange, disabled: disabled, style: { height: `${rows * 20}px` } })) : (React.createElement("input", { id: id, className: inputClassess, value: value, placeholder: placeholder, onChange: handleChange, disabled: disabled, readOnly: readOnly })),
|
|
37
|
+
error && helperText && (React.createElement(Typography, { variant: "Caption", className: classNames(styles.helperText, styles[size]) }, helperText))));
|
|
37
38
|
};
|
|
@@ -1,41 +1,54 @@
|
|
|
1
|
-
.
|
|
2
|
-
background-color: var(--white);
|
|
3
|
-
padding: 30px;
|
|
4
|
-
border-radius: 10px;
|
|
5
|
-
width: 900px;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.wrapper {
|
|
9
|
-
font-family: 'Raleway';
|
|
10
|
-
font-style: normal;
|
|
11
|
-
/* font-weight: 400; */
|
|
1
|
+
.wrapper--input {
|
|
12
2
|
position: relative;
|
|
3
|
+
max-width: 260px;
|
|
4
|
+
width: 100%;
|
|
5
|
+
}
|
|
6
|
+
.wrapper--input-label {
|
|
7
|
+
margin-top: 20px;
|
|
8
|
+
}
|
|
9
|
+
.wrapper--input-helperText {
|
|
10
|
+
margin-bottom: 15px;
|
|
13
11
|
}
|
|
14
12
|
.wrapper--left {
|
|
15
|
-
display: flex;
|
|
13
|
+
display: inline-flex;
|
|
16
14
|
flex-direction: row;
|
|
17
15
|
gap: 20px;
|
|
18
16
|
align-items: center;
|
|
17
|
+
width: fit-content;
|
|
18
|
+
max-width: none;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
.
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
.inputText {
|
|
25
|
-
font-family: 'Raleway';
|
|
21
|
+
.input {
|
|
22
|
+
font-family: var(--font-family-main);
|
|
26
23
|
font-style: normal;
|
|
27
24
|
font-weight: 400;
|
|
28
25
|
position: relative;
|
|
29
|
-
|
|
30
|
-
line-height: 14px;
|
|
26
|
+
|
|
31
27
|
color: var(--text-dark);
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
padding: 10px;
|
|
28
|
+
background-color: transparent;
|
|
29
|
+
padding: 10px 15px;
|
|
35
30
|
outline: none;
|
|
36
31
|
border: 1px solid var(--grey-light);
|
|
32
|
+
mix-blend-mode: multiply;
|
|
37
33
|
border-radius: 10px;
|
|
38
|
-
|
|
34
|
+
display: inline-flex;
|
|
35
|
+
width: 100%;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.input--left {
|
|
39
|
+
min-width: 260px;
|
|
40
|
+
}
|
|
41
|
+
.input.lg {
|
|
42
|
+
font-size: 14px;
|
|
43
|
+
line-height: 20px;
|
|
44
|
+
}
|
|
45
|
+
.input.md {
|
|
46
|
+
font-size: 12px;
|
|
47
|
+
line-height: 16px;
|
|
48
|
+
}
|
|
49
|
+
.input.sm {
|
|
50
|
+
font-size: 10px;
|
|
51
|
+
line-height: 14px;
|
|
39
52
|
}
|
|
40
53
|
/* Стили при наведении мыши */
|
|
41
54
|
.input:hover {
|
|
@@ -62,18 +75,6 @@
|
|
|
62
75
|
.resize {
|
|
63
76
|
resize: both;
|
|
64
77
|
}
|
|
65
|
-
.inputText.lg {
|
|
66
|
-
height: 40px;
|
|
67
|
-
/* height: 25px; */
|
|
68
|
-
}
|
|
69
|
-
.inputText.md {
|
|
70
|
-
height: 35px;
|
|
71
|
-
/* height: 20px; */
|
|
72
|
-
}
|
|
73
|
-
.inputText.sm {
|
|
74
|
-
/* height: 30px; */
|
|
75
|
-
height: 25px;
|
|
76
|
-
}
|
|
77
78
|
|
|
78
79
|
.filled {
|
|
79
80
|
border-color: var(--blue-main);
|
|
@@ -84,9 +85,18 @@
|
|
|
84
85
|
/* Стили для placeholder */
|
|
85
86
|
.input::placeholder {
|
|
86
87
|
color: var(--text-grey);
|
|
87
|
-
font-size: 12px;
|
|
88
|
+
/* font-size: 12px; */
|
|
88
89
|
line-height: 14px;
|
|
89
90
|
}
|
|
91
|
+
.input::placeholder.sm {
|
|
92
|
+
font-size: 10px;
|
|
93
|
+
}
|
|
94
|
+
.input::placeholder.md {
|
|
95
|
+
font-size: 12px;
|
|
96
|
+
}
|
|
97
|
+
.input::placeholder.lg {
|
|
98
|
+
font-size: 14px;
|
|
99
|
+
}
|
|
90
100
|
.input:focus::placeholder {
|
|
91
101
|
color: var(--text-light);
|
|
92
102
|
}
|
|
@@ -98,9 +108,8 @@
|
|
|
98
108
|
/* color: var(--text-grey); */
|
|
99
109
|
}
|
|
100
110
|
.label--default {
|
|
101
|
-
font-size: 12px;
|
|
102
111
|
position: absolute;
|
|
103
|
-
top: -
|
|
112
|
+
top: -18px;
|
|
104
113
|
cursor: text;
|
|
105
114
|
white-space: nowrap;
|
|
106
115
|
overflow: hidden;
|
|
@@ -108,9 +117,42 @@
|
|
|
108
117
|
max-width: calc(100% - 32px);
|
|
109
118
|
color: var(--text-grey);
|
|
110
119
|
}
|
|
120
|
+
.label--default .lg {
|
|
121
|
+
font-size: 12px;
|
|
122
|
+
}
|
|
123
|
+
.label--default.md {
|
|
124
|
+
font-size: 10px;
|
|
125
|
+
}
|
|
126
|
+
.label--default .sm {
|
|
127
|
+
font-size: 16px;
|
|
128
|
+
}
|
|
111
129
|
.label--left {
|
|
112
130
|
font-size: 13px;
|
|
113
131
|
color: var(--text-dark);
|
|
132
|
+
text-wrap-mode: nowrap;
|
|
133
|
+
}
|
|
134
|
+
.label--left.lg {
|
|
135
|
+
font-size: 14px;
|
|
136
|
+
}
|
|
137
|
+
.label--left .md {
|
|
138
|
+
font-size: 12px;
|
|
139
|
+
}
|
|
140
|
+
.label--left .sm {
|
|
141
|
+
font-size: 10px;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
/* Стили для обязательного input */
|
|
145
|
+
.label--default.label--required {
|
|
146
|
+
position: relative;
|
|
147
|
+
top: 0;
|
|
148
|
+
}
|
|
149
|
+
.label--required::after {
|
|
150
|
+
content: '*';
|
|
151
|
+
color: var(--error-main);
|
|
152
|
+
position: absolute;
|
|
153
|
+
margin-left: 2px;
|
|
154
|
+
top: 2px;
|
|
155
|
+
font-size: 22px;
|
|
114
156
|
}
|
|
115
157
|
|
|
116
158
|
/* Стили для input с ошибкой */
|
|
@@ -125,16 +167,22 @@
|
|
|
125
167
|
color: var(--error-secondary);
|
|
126
168
|
}
|
|
127
169
|
|
|
128
|
-
.helperText {
|
|
170
|
+
.helperText.md {
|
|
171
|
+
font-size: 10px;
|
|
172
|
+
}
|
|
173
|
+
.helperText.sm {
|
|
174
|
+
font-size: 8px;
|
|
175
|
+
}
|
|
176
|
+
.helperText.lg {
|
|
129
177
|
font-size: 12px;
|
|
130
|
-
|
|
178
|
+
}
|
|
179
|
+
.helperText {
|
|
131
180
|
position: absolute;
|
|
132
181
|
left: 0px;
|
|
133
|
-
|
|
134
|
-
bottom: -20px;
|
|
182
|
+
bottom: -15px;
|
|
135
183
|
cursor: text;
|
|
136
184
|
transition: 0.3ms ease-out;
|
|
137
|
-
max-width: calc(100% - 32px);
|
|
185
|
+
/* max-width: calc(100% - 32px); */
|
|
138
186
|
white-space: nowrap;
|
|
139
187
|
overflow: hidden;
|
|
140
188
|
text-overflow: ellipsis;
|
|
@@ -170,7 +218,6 @@
|
|
|
170
218
|
.icon {
|
|
171
219
|
position: absolute;
|
|
172
220
|
z-index: 1;
|
|
173
|
-
top: 25
|
|
221
|
+
top: 25%;
|
|
174
222
|
left: 10px;
|
|
175
223
|
}
|
|
176
|
-
|
|
@@ -2,15 +2,16 @@ import React, { useEffect, useState } from 'react';
|
|
|
2
2
|
import { Typography } from '../Typography/Typography';
|
|
3
3
|
import styles from './ProgressBar.module.css';
|
|
4
4
|
import classNames from 'classnames';
|
|
5
|
+
;
|
|
5
6
|
/**
|
|
6
7
|
* Компонент ProgressBar отображает прогресс в виде заполненной полосы.
|
|
7
8
|
*/
|
|
8
9
|
export const ProgressBar = ({ value = 0, max = 100, size = 'md', showValue = true, animated = false, }) => {
|
|
9
10
|
const [percent, setPercent] = useState(value);
|
|
10
11
|
const validPercentage = Math.min(Math.max(value, 0), max);
|
|
11
|
-
const progressBarClasses = classNames(styles['progress-bar'], size, {
|
|
12
|
-
'progress-bar--animated': animated,
|
|
13
|
-
'progress-bar--static': !animated,
|
|
12
|
+
const progressBarClasses = classNames(styles['progress-bar'], styles[size], {
|
|
13
|
+
[styles['progress-bar--animated']]: animated,
|
|
14
|
+
[styles['progress-bar--static']]: !animated,
|
|
14
15
|
});
|
|
15
16
|
useEffect(() => {
|
|
16
17
|
if (animated) {
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
.story--wrapper-progressbar {
|
|
2
|
-
background-color: var(--white);
|
|
3
|
-
padding: 30px;
|
|
4
|
-
border-radius: 10px;
|
|
5
|
-
width: 900px;
|
|
6
|
-
}
|
|
7
|
-
.progress-bar--default-story {
|
|
8
|
-
display: flex;
|
|
9
|
-
flex-direction: column;
|
|
10
|
-
gap: 30px;
|
|
11
|
-
}
|
|
12
1
|
.progress-bar--wrapper {
|
|
13
2
|
display: flex;
|
|
14
3
|
gap: 40px;
|
|
@@ -50,6 +39,10 @@
|
|
|
50
39
|
.progress-bar-percentage {
|
|
51
40
|
/* position: absolute; */
|
|
52
41
|
/* top: 50%; */
|
|
42
|
+
/* font-family: var(--font-family-main);
|
|
43
|
+
font-weight: 300;
|
|
44
|
+
font-size: 11px;
|
|
45
|
+
line-height: 13; */
|
|
53
46
|
left: 50%;
|
|
54
47
|
transform: translate(-50%, -50%);
|
|
55
48
|
}
|