@megafon/ui-core 4.0.0-beta.20 → 4.0.0-beta.23
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 +38 -0
- package/dist/es/components/Accordion/Accordion.css +2 -2
- package/dist/es/components/Notification/Notification.css +19 -2
- package/dist/es/components/Search/Search.css +9 -0
- package/dist/es/components/Select/Select.css +9 -0
- package/dist/es/components/Tabs/Tabs.css +1 -1
- package/dist/es/components/Tabs/Tabs.js +1 -1
- package/dist/es/components/TextField/TextField.css +29 -17
- package/dist/es/components/TextField/TextField.js +12 -11
- package/dist/lib/components/Accordion/Accordion.css +2 -2
- package/dist/lib/components/Notification/Notification.css +19 -2
- package/dist/lib/components/Search/Search.css +9 -0
- package/dist/lib/components/Select/Select.css +9 -0
- package/dist/lib/components/Tabs/Tabs.css +1 -1
- package/dist/lib/components/Tabs/Tabs.js +1 -1
- package/dist/lib/components/TextField/TextField.css +29 -17
- package/dist/lib/components/TextField/TextField.js +12 -11
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,44 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [4.0.0-beta.23](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0-beta.22...@megafon/ui-core@4.0.0-beta.23) (2022-09-08)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **accordion:** fixes top and bottom padding for title wrap ([ee61836](https://github.com/MegafonWebLab/megafon-ui/commit/ee61836618f6689b87b17f1e13378442a5a7caee))
|
|
12
|
+
* **notification:** fixes passive close icon color for colored error type ([6233e9f](https://github.com/MegafonWebLab/megafon-ui/commit/6233e9f16b0a45ff168323fc241f05634e663fd0))
|
|
13
|
+
* **search:** fixes hidden placeholder on focus for firefox ([eab12c3](https://github.com/MegafonWebLab/megafon-ui/commit/eab12c34e25236015bffe072ffdbea31535d4d99))
|
|
14
|
+
* **select:** fixes hidden placeholder on focus for firefox ([2e5366d](https://github.com/MegafonWebLab/megafon-ui/commit/2e5366d5842754d8a26a4798f2e678dfe4d44372))
|
|
15
|
+
* **textfield:** fixes notice text transition ([c435aa9](https://github.com/MegafonWebLab/megafon-ui/commit/c435aa9223f5f0a4d10254b677b6bd9075fdaf07))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
# [4.0.0-beta.22](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0-beta.21...@megafon/ui-core@4.0.0-beta.22) (2022-08-31)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
### Bug Fixes
|
|
25
|
+
|
|
26
|
+
* **tabs:** fix swiper arrows ([cac401d](https://github.com/MegafonWebLab/megafon-ui/commit/cac401ddc6ecfde58353827f3a362d8d941d4db8))
|
|
27
|
+
* **textfield:** hide verification icon for disabled field ([c950d3c](https://github.com/MegafonWebLab/megafon-ui/commit/c950d3c64f13412e166c5d358b59638bc3c255ae))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
# [4.0.0-beta.21](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0-beta.20...@megafon/ui-core@4.0.0-beta.21) (2022-08-24)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* **notification:** fix margin for bottom block ([38d768c](https://github.com/MegafonWebLab/megafon-ui/commit/38d768cb48baf167863b6a143e84909217eff462))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
6
44
|
# [4.0.0-beta.20](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.0.0-beta.19...@megafon/ui-core@4.0.0-beta.20) (2022-08-24)
|
|
7
45
|
|
|
8
46
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
.mfui-accordion__title-wrap {
|
|
14
14
|
position: relative;
|
|
15
|
-
padding:
|
|
15
|
+
padding: 24px 44px 24px 16px;
|
|
16
16
|
border-radius: 12px;
|
|
17
17
|
cursor: pointer;
|
|
18
18
|
-webkit-transition: background-color 0.3s;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
}
|
|
21
21
|
@media screen and (min-width: 768px) {
|
|
22
22
|
.mfui-accordion__title-wrap {
|
|
23
|
-
padding:
|
|
23
|
+
padding: 24px 56px 24px 24px;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
.mfui-accordion__title-wrap:hover {
|
|
@@ -160,7 +160,6 @@ h5 {
|
|
|
160
160
|
-webkit-box-align: center;
|
|
161
161
|
-ms-flex-align: center;
|
|
162
162
|
align-items: center;
|
|
163
|
-
margin-left: 16px;
|
|
164
163
|
cursor: pointer;
|
|
165
164
|
}
|
|
166
165
|
@media screen and (max-width: 767px) {
|
|
@@ -169,6 +168,9 @@ h5 {
|
|
|
169
168
|
line-height: 18px;
|
|
170
169
|
}
|
|
171
170
|
}
|
|
171
|
+
.mfui-notification__button + .mfui-notification__link {
|
|
172
|
+
margin-left: 16px;
|
|
173
|
+
}
|
|
172
174
|
.mfui-notification__link-arrow,
|
|
173
175
|
.mfui-notification__collapse-arrow {
|
|
174
176
|
width: 20px;
|
|
@@ -197,7 +199,6 @@ h5 {
|
|
|
197
199
|
height: -webkit-fit-content;
|
|
198
200
|
height: -moz-fit-content;
|
|
199
201
|
height: fit-content;
|
|
200
|
-
margin-left: 20px;
|
|
201
202
|
padding: 0;
|
|
202
203
|
border: none;
|
|
203
204
|
color: var(--systemBlue);
|
|
@@ -212,6 +213,14 @@ h5 {
|
|
|
212
213
|
margin-left: 16px;
|
|
213
214
|
}
|
|
214
215
|
}
|
|
216
|
+
.mfui-notification__bottom-block + .mfui-notification__collapse-button {
|
|
217
|
+
margin-left: 20px;
|
|
218
|
+
}
|
|
219
|
+
@media screen and (max-width: 767px) {
|
|
220
|
+
.mfui-notification__bottom-block + .mfui-notification__collapse-button {
|
|
221
|
+
margin-left: 16px;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
215
224
|
.mfui-notification__collapse_hidden {
|
|
216
225
|
visibility: hidden;
|
|
217
226
|
}
|
|
@@ -327,3 +336,11 @@ h5 {
|
|
|
327
336
|
/* stylelint-disable-line max-nesting-depth */
|
|
328
337
|
fill: var(--stcWhite);
|
|
329
338
|
}
|
|
339
|
+
.mfui-notification_colored.mfui-notification_type_error .mfui-notification__close:not(:hover) {
|
|
340
|
+
background-color: var(--stcWhite20);
|
|
341
|
+
}
|
|
342
|
+
.mfui-notification_colored.mfui-notification_type_error .mfui-notification__close:not(:hover) .mfui-notification__close-icon {
|
|
343
|
+
/* stylelint-disable-line max-nesting-depth */
|
|
344
|
+
opacity: 1;
|
|
345
|
+
fill: var(--stcWhite);
|
|
346
|
+
}
|
|
@@ -141,6 +141,15 @@
|
|
|
141
141
|
.mfui-search__search-wrapper_labeled .mfui-search__search-field:focus:-ms-input-placeholder {
|
|
142
142
|
opacity: 1;
|
|
143
143
|
}
|
|
144
|
+
.mfui-search__search-wrapper_labeled .mfui-search__search-field:focus::-moz-placeholder {
|
|
145
|
+
opacity: 1;
|
|
146
|
+
}
|
|
147
|
+
.mfui-search__search-wrapper_labeled .mfui-search__search-field:focus::-ms-input-placeholder {
|
|
148
|
+
opacity: 1;
|
|
149
|
+
}
|
|
150
|
+
.mfui-search__search-wrapper_labeled .mfui-search__search-field:focus::placeholder {
|
|
151
|
+
opacity: 1;
|
|
152
|
+
}
|
|
144
153
|
.mfui-search__search-field_filled + .mfui-search__label,
|
|
145
154
|
.mfui-search__search-field:focus + .mfui-search__label {
|
|
146
155
|
-webkit-transform: scale(0.8) translate(-12.5%, -75%);
|
|
@@ -328,6 +328,15 @@
|
|
|
328
328
|
.mfui-select__control_labeled .mfui-select__combobox:focus:-ms-input-placeholder {
|
|
329
329
|
opacity: 1;
|
|
330
330
|
}
|
|
331
|
+
.mfui-select__control_labeled .mfui-select__combobox:focus::-moz-placeholder {
|
|
332
|
+
opacity: 1;
|
|
333
|
+
}
|
|
334
|
+
.mfui-select__control_labeled .mfui-select__combobox:focus::-ms-input-placeholder {
|
|
335
|
+
opacity: 1;
|
|
336
|
+
}
|
|
337
|
+
.mfui-select__control_labeled .mfui-select__combobox:focus::placeholder {
|
|
338
|
+
opacity: 1;
|
|
339
|
+
}
|
|
331
340
|
.mfui-select_open {
|
|
332
341
|
z-index: 100;
|
|
333
342
|
}
|
|
@@ -78,7 +78,7 @@ var Tabs = function Tabs(_ref) {
|
|
|
78
78
|
isBeginning = _React$useState4[0],
|
|
79
79
|
setBeginning = _React$useState4[1];
|
|
80
80
|
|
|
81
|
-
var _React$useState5 = React.useState(
|
|
81
|
+
var _React$useState5 = React.useState(true),
|
|
82
82
|
_React$useState6 = _slicedToArray(_React$useState5, 2),
|
|
83
83
|
isEnd = _React$useState6[0],
|
|
84
84
|
setEnd = _React$useState6[1];
|
|
@@ -113,6 +113,21 @@
|
|
|
113
113
|
.mfui-text-field__field:focus::-webkit-input-placeholder {
|
|
114
114
|
opacity: 1;
|
|
115
115
|
}
|
|
116
|
+
.mfui-text-field__field:focus:-moz-placeholder {
|
|
117
|
+
opacity: 1;
|
|
118
|
+
}
|
|
119
|
+
.mfui-text-field__field:focus:-ms-input-placeholder {
|
|
120
|
+
opacity: 1;
|
|
121
|
+
}
|
|
122
|
+
.mfui-text-field__field:focus::-moz-placeholder {
|
|
123
|
+
opacity: 1;
|
|
124
|
+
}
|
|
125
|
+
.mfui-text-field__field:focus::-ms-input-placeholder {
|
|
126
|
+
opacity: 1;
|
|
127
|
+
}
|
|
128
|
+
.mfui-text-field__field:focus::placeholder {
|
|
129
|
+
opacity: 1;
|
|
130
|
+
}
|
|
116
131
|
.mfui-text-field__field::-webkit-scrollbar {
|
|
117
132
|
width: 16px;
|
|
118
133
|
}
|
|
@@ -125,12 +140,6 @@
|
|
|
125
140
|
.mfui-text-field__field::-webkit-scrollbar-thumb:hover {
|
|
126
141
|
background-color: #999999;
|
|
127
142
|
}
|
|
128
|
-
.mfui-text-field__field:focus:-moz-placeholder {
|
|
129
|
-
opacity: 1;
|
|
130
|
-
}
|
|
131
|
-
.mfui-text-field__field:focus:-ms-input-placeholder {
|
|
132
|
-
opacity: 1;
|
|
133
|
-
}
|
|
134
143
|
.mfui-text-field__label {
|
|
135
144
|
position: absolute;
|
|
136
145
|
top: 18px;
|
|
@@ -171,6 +180,19 @@
|
|
|
171
180
|
display: flex;
|
|
172
181
|
overflow: hidden;
|
|
173
182
|
}
|
|
183
|
+
.mfui-text-field__field-bottom-wrapper {
|
|
184
|
+
display: -webkit-box;
|
|
185
|
+
display: -ms-flexbox;
|
|
186
|
+
display: flex;
|
|
187
|
+
margin-top: 0;
|
|
188
|
+
overflow: hidden;
|
|
189
|
+
color: var(--spbSky3);
|
|
190
|
+
font-size: 12px;
|
|
191
|
+
line-height: 18px;
|
|
192
|
+
}
|
|
193
|
+
.mfui-text-field__field-bottom-wrapper_filled {
|
|
194
|
+
margin-top: 8px;
|
|
195
|
+
}
|
|
174
196
|
.mfui-text-field__notice-text {
|
|
175
197
|
height: 0;
|
|
176
198
|
opacity: 0;
|
|
@@ -180,7 +202,7 @@
|
|
|
180
202
|
transition-duration: 0.3s;
|
|
181
203
|
}
|
|
182
204
|
.mfui-text-field__notice-text_active {
|
|
183
|
-
height:
|
|
205
|
+
height: 100%;
|
|
184
206
|
opacity: 1;
|
|
185
207
|
}
|
|
186
208
|
.mfui-text-field__icon-box {
|
|
@@ -231,16 +253,6 @@
|
|
|
231
253
|
.mfui-text-field__require-mark {
|
|
232
254
|
color: var(--fury);
|
|
233
255
|
}
|
|
234
|
-
.mfui-text-field__field-bottom-wrapper {
|
|
235
|
-
display: -webkit-box;
|
|
236
|
-
display: -ms-flexbox;
|
|
237
|
-
display: flex;
|
|
238
|
-
margin-top: 8px;
|
|
239
|
-
overflow: hidden;
|
|
240
|
-
color: var(--spbSky3);
|
|
241
|
-
font-size: 12px;
|
|
242
|
-
line-height: 18px;
|
|
243
|
-
}
|
|
244
256
|
.mfui-text-field__counter {
|
|
245
257
|
margin-left: auto;
|
|
246
258
|
}
|
|
@@ -146,8 +146,8 @@ var TextField = function TextField(_ref) {
|
|
|
146
146
|
|
|
147
147
|
var _useState9 = useState(noticeText),
|
|
148
148
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
149
|
-
|
|
150
|
-
|
|
149
|
+
currentNoticeText = _useState10[0],
|
|
150
|
+
setCurrentNoticeText = _useState10[1];
|
|
151
151
|
|
|
152
152
|
var _useState11 = useState(false),
|
|
153
153
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
@@ -169,8 +169,8 @@ var TextField = function TextField(_ref) {
|
|
|
169
169
|
return isPasswordType && !isPasswordHidden;
|
|
170
170
|
}, [isPasswordHidden, isPasswordType]);
|
|
171
171
|
var hasValue = isControlled ? !!value : !!inputValue;
|
|
172
|
-
var isValidVerification = verification === Verification.VALID;
|
|
173
|
-
var isErrorVerification = verification === Verification.ERROR;
|
|
172
|
+
var isValidVerification = verification === Verification.VALID && !disabled;
|
|
173
|
+
var isErrorVerification = verification === Verification.ERROR && !disabled;
|
|
174
174
|
var hasValueForClear = hasValue && !isPasswordType && !customIcon && !isValidVerification;
|
|
175
175
|
var hasClearIcon = !disabled && (hasValueForClear || isErrorVerification);
|
|
176
176
|
var actualPlaceholder = placeholder || DEFAULT_PLACEHOLDERS[type];
|
|
@@ -188,7 +188,7 @@ var TextField = function TextField(_ref) {
|
|
|
188
188
|
checkSymbolMaxLimit(value);
|
|
189
189
|
}, [value, checkSymbolMaxLimit, isControlled]);
|
|
190
190
|
useEffect(function () {
|
|
191
|
-
noticeText &&
|
|
191
|
+
noticeText && setCurrentNoticeText(noticeText);
|
|
192
192
|
}, [noticeText]);
|
|
193
193
|
useEffect(function () {
|
|
194
194
|
if (!resizerRef.current || textarea !== TextareaTypes.FLEXIBLE) {
|
|
@@ -257,7 +257,7 @@ var TextField = function TextField(_ref) {
|
|
|
257
257
|
};
|
|
258
258
|
|
|
259
259
|
var handleNoticeTransitionEnd = useCallback(function () {
|
|
260
|
-
!noticeText &&
|
|
260
|
+
!noticeText && setCurrentNoticeText(noticeText);
|
|
261
261
|
}, [noticeText]);
|
|
262
262
|
|
|
263
263
|
var handleTextareaScroll = function handleTextareaScroll() {
|
|
@@ -430,7 +430,6 @@ var TextField = function TextField(_ref) {
|
|
|
430
430
|
var isPlaceholderShowed = isPasswordType && isPasswordHidden && !!inputValue;
|
|
431
431
|
var valueHasSymbols = inputValue !== null && inputValue !== undefined;
|
|
432
432
|
var currentSymbolCount = valueHasSymbols && String(inputValue).length || 0;
|
|
433
|
-
var showAdditionalBlock = displayedNoticeText || symbolCounter;
|
|
434
433
|
return /*#__PURE__*/React.createElement("div", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
435
434
|
className: cn({
|
|
436
435
|
disabled: disabled,
|
|
@@ -447,14 +446,16 @@ var TextField = function TextField(_ref) {
|
|
|
447
446
|
}, renderField(), textareaType === TextareaTypes.FLEXIBLE && /*#__PURE__*/React.createElement("div", {
|
|
448
447
|
className: cn('resizer'),
|
|
449
448
|
ref: resizerRef
|
|
450
|
-
}, /*#__PURE__*/React.createElement(ResizeIcon, null))),
|
|
451
|
-
className: cn('field-bottom-wrapper'
|
|
452
|
-
|
|
449
|
+
}, /*#__PURE__*/React.createElement(ResizeIcon, null))), /*#__PURE__*/React.createElement("div", {
|
|
450
|
+
className: cn('field-bottom-wrapper', {
|
|
451
|
+
filled: !!currentNoticeText || !!symbolCounter
|
|
452
|
+
})
|
|
453
|
+
}, /*#__PURE__*/React.createElement("div", _extends({
|
|
453
454
|
className: cn('notice-text', {
|
|
454
455
|
active: !!noticeText
|
|
455
456
|
}),
|
|
456
457
|
onTransitionEnd: handleNoticeTransitionEnd
|
|
457
|
-
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.notice)),
|
|
458
|
+
}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.notice)), currentNoticeText), symbolCounter && /*#__PURE__*/React.createElement("span", {
|
|
458
459
|
className: cn('counter', {
|
|
459
460
|
error: isMaxLimitExceeded
|
|
460
461
|
})
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
}
|
|
13
13
|
.mfui-accordion__title-wrap {
|
|
14
14
|
position: relative;
|
|
15
|
-
padding:
|
|
15
|
+
padding: 24px 44px 24px 16px;
|
|
16
16
|
border-radius: 12px;
|
|
17
17
|
cursor: pointer;
|
|
18
18
|
-webkit-transition: background-color 0.3s;
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
}
|
|
21
21
|
@media screen and (min-width: 768px) {
|
|
22
22
|
.mfui-accordion__title-wrap {
|
|
23
|
-
padding:
|
|
23
|
+
padding: 24px 56px 24px 24px;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
.mfui-accordion__title-wrap:hover {
|
|
@@ -160,7 +160,6 @@ h5 {
|
|
|
160
160
|
-webkit-box-align: center;
|
|
161
161
|
-ms-flex-align: center;
|
|
162
162
|
align-items: center;
|
|
163
|
-
margin-left: 16px;
|
|
164
163
|
cursor: pointer;
|
|
165
164
|
}
|
|
166
165
|
@media screen and (max-width: 767px) {
|
|
@@ -169,6 +168,9 @@ h5 {
|
|
|
169
168
|
line-height: 18px;
|
|
170
169
|
}
|
|
171
170
|
}
|
|
171
|
+
.mfui-notification__button + .mfui-notification__link {
|
|
172
|
+
margin-left: 16px;
|
|
173
|
+
}
|
|
172
174
|
.mfui-notification__link-arrow,
|
|
173
175
|
.mfui-notification__collapse-arrow {
|
|
174
176
|
width: 20px;
|
|
@@ -197,7 +199,6 @@ h5 {
|
|
|
197
199
|
height: -webkit-fit-content;
|
|
198
200
|
height: -moz-fit-content;
|
|
199
201
|
height: fit-content;
|
|
200
|
-
margin-left: 20px;
|
|
201
202
|
padding: 0;
|
|
202
203
|
border: none;
|
|
203
204
|
color: var(--systemBlue);
|
|
@@ -212,6 +213,14 @@ h5 {
|
|
|
212
213
|
margin-left: 16px;
|
|
213
214
|
}
|
|
214
215
|
}
|
|
216
|
+
.mfui-notification__bottom-block + .mfui-notification__collapse-button {
|
|
217
|
+
margin-left: 20px;
|
|
218
|
+
}
|
|
219
|
+
@media screen and (max-width: 767px) {
|
|
220
|
+
.mfui-notification__bottom-block + .mfui-notification__collapse-button {
|
|
221
|
+
margin-left: 16px;
|
|
222
|
+
}
|
|
223
|
+
}
|
|
215
224
|
.mfui-notification__collapse_hidden {
|
|
216
225
|
visibility: hidden;
|
|
217
226
|
}
|
|
@@ -327,3 +336,11 @@ h5 {
|
|
|
327
336
|
/* stylelint-disable-line max-nesting-depth */
|
|
328
337
|
fill: var(--stcWhite);
|
|
329
338
|
}
|
|
339
|
+
.mfui-notification_colored.mfui-notification_type_error .mfui-notification__close:not(:hover) {
|
|
340
|
+
background-color: var(--stcWhite20);
|
|
341
|
+
}
|
|
342
|
+
.mfui-notification_colored.mfui-notification_type_error .mfui-notification__close:not(:hover) .mfui-notification__close-icon {
|
|
343
|
+
/* stylelint-disable-line max-nesting-depth */
|
|
344
|
+
opacity: 1;
|
|
345
|
+
fill: var(--stcWhite);
|
|
346
|
+
}
|
|
@@ -141,6 +141,15 @@
|
|
|
141
141
|
.mfui-search__search-wrapper_labeled .mfui-search__search-field:focus:-ms-input-placeholder {
|
|
142
142
|
opacity: 1;
|
|
143
143
|
}
|
|
144
|
+
.mfui-search__search-wrapper_labeled .mfui-search__search-field:focus::-moz-placeholder {
|
|
145
|
+
opacity: 1;
|
|
146
|
+
}
|
|
147
|
+
.mfui-search__search-wrapper_labeled .mfui-search__search-field:focus::-ms-input-placeholder {
|
|
148
|
+
opacity: 1;
|
|
149
|
+
}
|
|
150
|
+
.mfui-search__search-wrapper_labeled .mfui-search__search-field:focus::placeholder {
|
|
151
|
+
opacity: 1;
|
|
152
|
+
}
|
|
144
153
|
.mfui-search__search-field_filled + .mfui-search__label,
|
|
145
154
|
.mfui-search__search-field:focus + .mfui-search__label {
|
|
146
155
|
-webkit-transform: scale(0.8) translate(-12.5%, -75%);
|
|
@@ -328,6 +328,15 @@
|
|
|
328
328
|
.mfui-select__control_labeled .mfui-select__combobox:focus:-ms-input-placeholder {
|
|
329
329
|
opacity: 1;
|
|
330
330
|
}
|
|
331
|
+
.mfui-select__control_labeled .mfui-select__combobox:focus::-moz-placeholder {
|
|
332
|
+
opacity: 1;
|
|
333
|
+
}
|
|
334
|
+
.mfui-select__control_labeled .mfui-select__combobox:focus::-ms-input-placeholder {
|
|
335
|
+
opacity: 1;
|
|
336
|
+
}
|
|
337
|
+
.mfui-select__control_labeled .mfui-select__combobox:focus::placeholder {
|
|
338
|
+
opacity: 1;
|
|
339
|
+
}
|
|
331
340
|
.mfui-select_open {
|
|
332
341
|
z-index: 100;
|
|
333
342
|
}
|
|
@@ -108,7 +108,7 @@ var Tabs = function Tabs(_ref) {
|
|
|
108
108
|
isBeginning = _React$useState4[0],
|
|
109
109
|
setBeginning = _React$useState4[1];
|
|
110
110
|
|
|
111
|
-
var _React$useState5 = React.useState(
|
|
111
|
+
var _React$useState5 = React.useState(true),
|
|
112
112
|
_React$useState6 = (0, _slicedToArray2["default"])(_React$useState5, 2),
|
|
113
113
|
isEnd = _React$useState6[0],
|
|
114
114
|
setEnd = _React$useState6[1];
|
|
@@ -113,6 +113,21 @@
|
|
|
113
113
|
.mfui-text-field__field:focus::-webkit-input-placeholder {
|
|
114
114
|
opacity: 1;
|
|
115
115
|
}
|
|
116
|
+
.mfui-text-field__field:focus:-moz-placeholder {
|
|
117
|
+
opacity: 1;
|
|
118
|
+
}
|
|
119
|
+
.mfui-text-field__field:focus:-ms-input-placeholder {
|
|
120
|
+
opacity: 1;
|
|
121
|
+
}
|
|
122
|
+
.mfui-text-field__field:focus::-moz-placeholder {
|
|
123
|
+
opacity: 1;
|
|
124
|
+
}
|
|
125
|
+
.mfui-text-field__field:focus::-ms-input-placeholder {
|
|
126
|
+
opacity: 1;
|
|
127
|
+
}
|
|
128
|
+
.mfui-text-field__field:focus::placeholder {
|
|
129
|
+
opacity: 1;
|
|
130
|
+
}
|
|
116
131
|
.mfui-text-field__field::-webkit-scrollbar {
|
|
117
132
|
width: 16px;
|
|
118
133
|
}
|
|
@@ -125,12 +140,6 @@
|
|
|
125
140
|
.mfui-text-field__field::-webkit-scrollbar-thumb:hover {
|
|
126
141
|
background-color: #999999;
|
|
127
142
|
}
|
|
128
|
-
.mfui-text-field__field:focus:-moz-placeholder {
|
|
129
|
-
opacity: 1;
|
|
130
|
-
}
|
|
131
|
-
.mfui-text-field__field:focus:-ms-input-placeholder {
|
|
132
|
-
opacity: 1;
|
|
133
|
-
}
|
|
134
143
|
.mfui-text-field__label {
|
|
135
144
|
position: absolute;
|
|
136
145
|
top: 18px;
|
|
@@ -171,6 +180,19 @@
|
|
|
171
180
|
display: flex;
|
|
172
181
|
overflow: hidden;
|
|
173
182
|
}
|
|
183
|
+
.mfui-text-field__field-bottom-wrapper {
|
|
184
|
+
display: -webkit-box;
|
|
185
|
+
display: -ms-flexbox;
|
|
186
|
+
display: flex;
|
|
187
|
+
margin-top: 0;
|
|
188
|
+
overflow: hidden;
|
|
189
|
+
color: var(--spbSky3);
|
|
190
|
+
font-size: 12px;
|
|
191
|
+
line-height: 18px;
|
|
192
|
+
}
|
|
193
|
+
.mfui-text-field__field-bottom-wrapper_filled {
|
|
194
|
+
margin-top: 8px;
|
|
195
|
+
}
|
|
174
196
|
.mfui-text-field__notice-text {
|
|
175
197
|
height: 0;
|
|
176
198
|
opacity: 0;
|
|
@@ -180,7 +202,7 @@
|
|
|
180
202
|
transition-duration: 0.3s;
|
|
181
203
|
}
|
|
182
204
|
.mfui-text-field__notice-text_active {
|
|
183
|
-
height:
|
|
205
|
+
height: 100%;
|
|
184
206
|
opacity: 1;
|
|
185
207
|
}
|
|
186
208
|
.mfui-text-field__icon-box {
|
|
@@ -231,16 +253,6 @@
|
|
|
231
253
|
.mfui-text-field__require-mark {
|
|
232
254
|
color: var(--fury);
|
|
233
255
|
}
|
|
234
|
-
.mfui-text-field__field-bottom-wrapper {
|
|
235
|
-
display: -webkit-box;
|
|
236
|
-
display: -ms-flexbox;
|
|
237
|
-
display: flex;
|
|
238
|
-
margin-top: 8px;
|
|
239
|
-
overflow: hidden;
|
|
240
|
-
color: var(--spbSky3);
|
|
241
|
-
font-size: 12px;
|
|
242
|
-
line-height: 18px;
|
|
243
|
-
}
|
|
244
256
|
.mfui-text-field__counter {
|
|
245
257
|
margin-left: auto;
|
|
246
258
|
}
|
|
@@ -174,8 +174,8 @@ var TextField = function TextField(_ref) {
|
|
|
174
174
|
|
|
175
175
|
var _useState9 = (0, React.useState)(noticeText),
|
|
176
176
|
_useState10 = (0, _slicedToArray2["default"])(_useState9, 2),
|
|
177
|
-
|
|
178
|
-
|
|
177
|
+
currentNoticeText = _useState10[0],
|
|
178
|
+
setCurrentNoticeText = _useState10[1];
|
|
179
179
|
|
|
180
180
|
var _useState11 = (0, React.useState)(false),
|
|
181
181
|
_useState12 = (0, _slicedToArray2["default"])(_useState11, 2),
|
|
@@ -197,8 +197,8 @@ var TextField = function TextField(_ref) {
|
|
|
197
197
|
return isPasswordType && !isPasswordHidden;
|
|
198
198
|
}, [isPasswordHidden, isPasswordType]);
|
|
199
199
|
var hasValue = isControlled ? !!value : !!inputValue;
|
|
200
|
-
var isValidVerification = verification === Verification.VALID;
|
|
201
|
-
var isErrorVerification = verification === Verification.ERROR;
|
|
200
|
+
var isValidVerification = verification === Verification.VALID && !disabled;
|
|
201
|
+
var isErrorVerification = verification === Verification.ERROR && !disabled;
|
|
202
202
|
var hasValueForClear = hasValue && !isPasswordType && !customIcon && !isValidVerification;
|
|
203
203
|
var hasClearIcon = !disabled && (hasValueForClear || isErrorVerification);
|
|
204
204
|
var actualPlaceholder = placeholder || DEFAULT_PLACEHOLDERS[type];
|
|
@@ -216,7 +216,7 @@ var TextField = function TextField(_ref) {
|
|
|
216
216
|
checkSymbolMaxLimit(value);
|
|
217
217
|
}, [value, checkSymbolMaxLimit, isControlled]);
|
|
218
218
|
(0, React.useEffect)(function () {
|
|
219
|
-
noticeText &&
|
|
219
|
+
noticeText && setCurrentNoticeText(noticeText);
|
|
220
220
|
}, [noticeText]);
|
|
221
221
|
(0, React.useEffect)(function () {
|
|
222
222
|
if (!resizerRef.current || textarea !== TextareaTypes.FLEXIBLE) {
|
|
@@ -285,7 +285,7 @@ var TextField = function TextField(_ref) {
|
|
|
285
285
|
};
|
|
286
286
|
|
|
287
287
|
var handleNoticeTransitionEnd = (0, React.useCallback)(function () {
|
|
288
|
-
!noticeText &&
|
|
288
|
+
!noticeText && setCurrentNoticeText(noticeText);
|
|
289
289
|
}, [noticeText]);
|
|
290
290
|
|
|
291
291
|
var handleTextareaScroll = function handleTextareaScroll() {
|
|
@@ -454,7 +454,6 @@ var TextField = function TextField(_ref) {
|
|
|
454
454
|
var isPlaceholderShowed = isPasswordType && isPasswordHidden && !!inputValue;
|
|
455
455
|
var valueHasSymbols = inputValue !== null && inputValue !== undefined;
|
|
456
456
|
var currentSymbolCount = valueHasSymbols && String(inputValue).length || 0;
|
|
457
|
-
var showAdditionalBlock = displayedNoticeText || symbolCounter;
|
|
458
457
|
return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
|
|
459
458
|
className: cn({
|
|
460
459
|
disabled: disabled,
|
|
@@ -471,14 +470,16 @@ var TextField = function TextField(_ref) {
|
|
|
471
470
|
}, renderField(), textareaType === TextareaTypes.FLEXIBLE && /*#__PURE__*/React.createElement("div", {
|
|
472
471
|
className: cn('resizer'),
|
|
473
472
|
ref: resizerRef
|
|
474
|
-
}, /*#__PURE__*/React.createElement(ResizeIcon, null))),
|
|
475
|
-
className: cn('field-bottom-wrapper'
|
|
476
|
-
|
|
473
|
+
}, /*#__PURE__*/React.createElement(ResizeIcon, null))), /*#__PURE__*/React.createElement("div", {
|
|
474
|
+
className: cn('field-bottom-wrapper', {
|
|
475
|
+
filled: !!currentNoticeText || !!symbolCounter
|
|
476
|
+
})
|
|
477
|
+
}, /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
|
|
477
478
|
className: cn('notice-text', {
|
|
478
479
|
active: !!noticeText
|
|
479
480
|
}),
|
|
480
481
|
onTransitionEnd: handleNoticeTransitionEnd
|
|
481
|
-
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.notice)),
|
|
482
|
+
}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.notice)), currentNoticeText), symbolCounter && /*#__PURE__*/React.createElement("span", {
|
|
482
483
|
className: cn('counter', {
|
|
483
484
|
error: isMaxLimitExceeded
|
|
484
485
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@megafon/ui-core",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.23",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"styles"
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"react-popper": "^2.2.3",
|
|
98
98
|
"swiper": "^6.5.6"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "f2e436a3b1d1afe36e055d5a36f50760dddbc156"
|
|
101
101
|
}
|