@megafon/ui-core 4.8.0 → 4.8.2

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 CHANGED
@@ -3,6 +3,28 @@
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.8.2](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.8.1...@megafon/ui-core@4.8.2) (2022-11-21)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **tabs:** remove tab underline on hover ([1c6cfbd](https://github.com/MegafonWebLab/megafon-ui/commit/1c6cfbde1c66c71c99c42ae4a586f048688f3afb))
12
+
13
+
14
+
15
+
16
+
17
+ ## [4.8.1](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.8.0...@megafon/ui-core@4.8.1) (2022-11-15)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **search:** show placeholder without label ([b059216](https://github.com/MegafonWebLab/megafon-ui/commit/b05921619514787698e82d27644702d231829c50))
23
+
24
+
25
+
26
+
27
+
6
28
  # [4.8.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.7.0...@megafon/ui-core@4.8.0) (2022-11-14)
7
29
 
8
30
 
@@ -13,6 +13,7 @@ export interface ICheckboxProps {
13
13
  /** Дополнительные data атрибуты к внутренним элементам */
14
14
  dataAttrs?: {
15
15
  root?: Record<string, string>;
16
+ inner?: Record<string, string>;
16
17
  input?: Record<string, string>;
17
18
  customInput?: Record<string, string>;
18
19
  extraContent?: Record<string, string>;
@@ -60,9 +60,9 @@ var Checkbox = function Checkbox(_ref) {
60
60
  disabled: disabled,
61
61
  error: error
62
62
  }, className)
63
- }, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement("div", {
63
+ }, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement("div", _extends({
64
64
  className: cn('inner', [classes === null || classes === void 0 ? void 0 : classes.inner])
65
- }, /*#__PURE__*/React.createElement("label", {
65
+ }, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.inner)), /*#__PURE__*/React.createElement("label", {
66
66
  className: cn('label', {
67
67
  'no-touch': !isTouch
68
68
  })
@@ -99,6 +99,7 @@ Checkbox.propTypes = {
99
99
  error: PropTypes.bool,
100
100
  dataAttrs: PropTypes.shape({
101
101
  root: PropTypes.objectOf(PropTypes.string.isRequired),
102
+ inner: PropTypes.objectOf(PropTypes.string.isRequired),
102
103
  input: PropTypes.objectOf(PropTypes.string.isRequired),
103
104
  customInput: PropTypes.objectOf(PropTypes.string.isRequired),
104
105
  extraContent: PropTypes.objectOf(PropTypes.string.isRequired)
@@ -2,21 +2,24 @@
2
2
  font-family: inherit;
3
3
  font-size: 15px;
4
4
  line-height: 24px;
5
+ display: -webkit-box;
6
+ display: -ms-flexbox;
7
+ display: flex;
8
+ -webkit-box-pack: start;
9
+ -ms-flex-pack: start;
10
+ justify-content: flex-start;
5
11
  margin: 12px 0 12px 40px;
6
- padding: 0;
7
12
  font-style: normal;
8
13
  }
9
- .mfui-list_type_ul {
10
- list-style: disc;
11
- }
12
- .mfui-list_type_ol {
13
- list-style: decimal;
14
- }
15
14
  .mfui-list_h-align_center {
16
- text-align: center;
15
+ -webkit-box-pack: center;
16
+ -ms-flex-pack: center;
17
+ justify-content: center;
17
18
  }
18
19
  .mfui-list_h-align_right {
19
- text-align: right;
20
+ -webkit-box-pack: end;
21
+ -ms-flex-pack: end;
22
+ justify-content: flex-end;
20
23
  }
21
24
  .mfui-list_color_default {
22
25
  color: var(--content);
@@ -51,3 +54,13 @@
51
54
  .mfui-list_weight_bold {
52
55
  font-weight: 600;
53
56
  }
57
+ .mfui-list__inner {
58
+ margin: 0;
59
+ padding: 0;
60
+ }
61
+ .mfui-list__inner_type_ul {
62
+ list-style: disc;
63
+ }
64
+ .mfui-list_inner_type_ol {
65
+ list-style: decimal;
66
+ }
@@ -15,14 +15,17 @@ var List = function List(_ref) {
15
15
  className = _ref.className,
16
16
  children = _ref.children;
17
17
  var ElementType = as;
18
- return /*#__PURE__*/React.createElement(ElementType, {
18
+ return /*#__PURE__*/React.createElement("div", {
19
19
  className: cn({
20
20
  'h-align': align,
21
21
  color: color,
22
- weight: weight,
23
- type: as
22
+ weight: weight
24
23
  }, className)
25
- }, children);
24
+ }, /*#__PURE__*/React.createElement(ElementType, {
25
+ className: cn('inner', {
26
+ type: as
27
+ })
28
+ }, children));
26
29
  };
27
30
 
28
31
  List.propTypes = {
@@ -102,19 +102,19 @@
102
102
  -webkit-transition: opacity 0.2s;
103
103
  transition: opacity 0.2s;
104
104
  }
105
- .mfui-search__search-field:-moz-placeholder {
105
+ .mfui-search__search-field::-moz-placeholder {
106
106
  color: var(--spbSky3);
107
107
  opacity: 0;
108
108
  -webkit-transition: opacity 0.2s;
109
109
  transition: opacity 0.2s;
110
110
  }
111
- .mfui-search__search-field:-ms-input-placeholder {
111
+ .mfui-search__search-field:-moz-placeholder {
112
112
  color: var(--spbSky3);
113
113
  opacity: 0;
114
114
  -webkit-transition: opacity 0.2s;
115
115
  transition: opacity 0.2s;
116
116
  }
117
- .mfui-search__search-field::-moz-placeholder {
117
+ .mfui-search__search-field:-ms-input-placeholder {
118
118
  color: var(--spbSky3);
119
119
  opacity: 0;
120
120
  -webkit-transition: opacity 0.2s;
@@ -132,22 +132,40 @@
132
132
  -webkit-transition: opacity 0.2s;
133
133
  transition: opacity 0.2s;
134
134
  }
135
- .mfui-search__search-wrapper_labeled .mfui-search__search-field:focus::-webkit-input-placeholder {
135
+ .mfui-search__search-field:focus::-webkit-input-placeholder {
136
+ opacity: 1;
137
+ }
138
+ .mfui-search__search-field:focus::-moz-placeholder {
139
+ opacity: 1;
140
+ }
141
+ .mfui-search__search-field:focus:-moz-placeholder {
142
+ opacity: 1;
143
+ }
144
+ .mfui-search__search-field:focus:-ms-input-placeholder {
145
+ opacity: 1;
146
+ }
147
+ .mfui-search__search-field:focus::-ms-input-placeholder {
136
148
  opacity: 1;
137
149
  }
138
- .mfui-search__search-wrapper_labeled .mfui-search__search-field:focus:-moz-placeholder {
150
+ .mfui-search__search-field:focus::placeholder {
139
151
  opacity: 1;
140
152
  }
141
- .mfui-search__search-wrapper_labeled .mfui-search__search-field:focus:-ms-input-placeholder {
153
+ .mfui-search__search-wrapper_no-label .mfui-search__search-field::-webkit-input-placeholder {
142
154
  opacity: 1;
143
155
  }
144
- .mfui-search__search-wrapper_labeled .mfui-search__search-field:focus::-moz-placeholder {
156
+ .mfui-search__search-wrapper_no-label .mfui-search__search-field::-moz-placeholder {
145
157
  opacity: 1;
146
158
  }
147
- .mfui-search__search-wrapper_labeled .mfui-search__search-field:focus::-ms-input-placeholder {
159
+ .mfui-search__search-wrapper_no-label .mfui-search__search-field:-moz-placeholder {
148
160
  opacity: 1;
149
161
  }
150
- .mfui-search__search-wrapper_labeled .mfui-search__search-field:focus::placeholder {
162
+ .mfui-search__search-wrapper_no-label .mfui-search__search-field:-ms-input-placeholder {
163
+ opacity: 1;
164
+ }
165
+ .mfui-search__search-wrapper_no-label .mfui-search__search-field::-ms-input-placeholder {
166
+ opacity: 1;
167
+ }
168
+ .mfui-search__search-wrapper_no-label .mfui-search__search-field::placeholder {
151
169
  opacity: 1;
152
170
  }
153
171
  .mfui-search__search-field_filled + .mfui-search__label,
@@ -231,20 +249,6 @@
231
249
  max-height: 368px;
232
250
  padding: 16px;
233
251
  overflow-y: auto;
234
- scrollbar-width: thin;
235
- scrollbar-color: var(--spbSky2) transparent;
236
- }
237
- .mfui-search__list-inner::-webkit-scrollbar {
238
- width: 16px;
239
- }
240
- .mfui-search__list-inner::-webkit-scrollbar-thumb {
241
- border: 6px solid transparent;
242
- border-radius: 16px;
243
- background-color: #D8D8D8;
244
- background-clip: padding-box;
245
- }
246
- .mfui-search__list-inner::-webkit-scrollbar-thumb:hover {
247
- background-color: #999999;
248
252
  }
249
253
  .mfui-search__list-item {
250
254
  font-family: inherit;
@@ -192,7 +192,8 @@ var Search = function Search(_ref) {
192
192
  }, [classes === null || classes === void 0 ? void 0 : classes.control])
193
193
  }, /*#__PURE__*/React.createElement("label", {
194
194
  className: cn('search-wrapper', {
195
- labeled: !!label
195
+ labeled: !!label,
196
+ 'no-label': !label
196
197
  }),
197
198
  htmlFor: searchId
198
199
  }, /*#__PURE__*/React.createElement("input", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.searchField), {
@@ -157,6 +157,9 @@
157
157
  color: var(--spbSky3);
158
158
  fill: var(--spbSky3);
159
159
  }
160
+ .mfui-tabs__tab-inner:hover {
161
+ text-decoration: none;
162
+ }
160
163
  .mfui-tabs__tab-inner:not(.mfui-tabs__tab-inner_current):hover {
161
164
  color: var(--content);
162
165
  fill: var(--content);
@@ -13,6 +13,7 @@ export interface ICheckboxProps {
13
13
  /** Дополнительные data атрибуты к внутренним элементам */
14
14
  dataAttrs?: {
15
15
  root?: Record<string, string>;
16
+ inner?: Record<string, string>;
16
17
  input?: Record<string, string>;
17
18
  customInput?: Record<string, string>;
18
19
  extraContent?: Record<string, string>;
@@ -79,9 +79,9 @@ var Checkbox = function Checkbox(_ref) {
79
79
  disabled: disabled,
80
80
  error: error
81
81
  }, className)
82
- }, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/_react["default"].createElement("div", {
82
+ }, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/_react["default"].createElement("div", (0, _extends2["default"])({
83
83
  className: cn('inner', [classes === null || classes === void 0 ? void 0 : classes.inner])
84
- }, /*#__PURE__*/_react["default"].createElement("label", {
84
+ }, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.inner)), /*#__PURE__*/_react["default"].createElement("label", {
85
85
  className: cn('label', {
86
86
  'no-touch': !isTouch
87
87
  })
@@ -118,6 +118,7 @@ Checkbox.propTypes = {
118
118
  error: PropTypes.bool,
119
119
  dataAttrs: PropTypes.shape({
120
120
  root: PropTypes.objectOf(PropTypes.string.isRequired),
121
+ inner: PropTypes.objectOf(PropTypes.string.isRequired),
121
122
  input: PropTypes.objectOf(PropTypes.string.isRequired),
122
123
  customInput: PropTypes.objectOf(PropTypes.string.isRequired),
123
124
  extraContent: PropTypes.objectOf(PropTypes.string.isRequired)
@@ -2,21 +2,24 @@
2
2
  font-family: inherit;
3
3
  font-size: 15px;
4
4
  line-height: 24px;
5
+ display: -webkit-box;
6
+ display: -ms-flexbox;
7
+ display: flex;
8
+ -webkit-box-pack: start;
9
+ -ms-flex-pack: start;
10
+ justify-content: flex-start;
5
11
  margin: 12px 0 12px 40px;
6
- padding: 0;
7
12
  font-style: normal;
8
13
  }
9
- .mfui-list_type_ul {
10
- list-style: disc;
11
- }
12
- .mfui-list_type_ol {
13
- list-style: decimal;
14
- }
15
14
  .mfui-list_h-align_center {
16
- text-align: center;
15
+ -webkit-box-pack: center;
16
+ -ms-flex-pack: center;
17
+ justify-content: center;
17
18
  }
18
19
  .mfui-list_h-align_right {
19
- text-align: right;
20
+ -webkit-box-pack: end;
21
+ -ms-flex-pack: end;
22
+ justify-content: flex-end;
20
23
  }
21
24
  .mfui-list_color_default {
22
25
  color: var(--content);
@@ -51,3 +54,13 @@
51
54
  .mfui-list_weight_bold {
52
55
  font-weight: 600;
53
56
  }
57
+ .mfui-list__inner {
58
+ margin: 0;
59
+ padding: 0;
60
+ }
61
+ .mfui-list__inner_type_ul {
62
+ list-style: disc;
63
+ }
64
+ .mfui-list_inner_type_ol {
65
+ list-style: decimal;
66
+ }
@@ -30,14 +30,17 @@ var List = function List(_ref) {
30
30
  className = _ref.className,
31
31
  children = _ref.children;
32
32
  var ElementType = as;
33
- return /*#__PURE__*/React.createElement(ElementType, {
33
+ return /*#__PURE__*/React.createElement("div", {
34
34
  className: cn({
35
35
  'h-align': align,
36
36
  color: color,
37
- weight: weight,
38
- type: as
37
+ weight: weight
39
38
  }, className)
40
- }, children);
39
+ }, /*#__PURE__*/React.createElement(ElementType, {
40
+ className: cn('inner', {
41
+ type: as
42
+ })
43
+ }, children));
41
44
  };
42
45
 
43
46
  List.propTypes = {
@@ -102,19 +102,19 @@
102
102
  -webkit-transition: opacity 0.2s;
103
103
  transition: opacity 0.2s;
104
104
  }
105
- .mfui-search__search-field:-moz-placeholder {
105
+ .mfui-search__search-field::-moz-placeholder {
106
106
  color: var(--spbSky3);
107
107
  opacity: 0;
108
108
  -webkit-transition: opacity 0.2s;
109
109
  transition: opacity 0.2s;
110
110
  }
111
- .mfui-search__search-field:-ms-input-placeholder {
111
+ .mfui-search__search-field:-moz-placeholder {
112
112
  color: var(--spbSky3);
113
113
  opacity: 0;
114
114
  -webkit-transition: opacity 0.2s;
115
115
  transition: opacity 0.2s;
116
116
  }
117
- .mfui-search__search-field::-moz-placeholder {
117
+ .mfui-search__search-field:-ms-input-placeholder {
118
118
  color: var(--spbSky3);
119
119
  opacity: 0;
120
120
  -webkit-transition: opacity 0.2s;
@@ -132,22 +132,40 @@
132
132
  -webkit-transition: opacity 0.2s;
133
133
  transition: opacity 0.2s;
134
134
  }
135
- .mfui-search__search-wrapper_labeled .mfui-search__search-field:focus::-webkit-input-placeholder {
135
+ .mfui-search__search-field:focus::-webkit-input-placeholder {
136
+ opacity: 1;
137
+ }
138
+ .mfui-search__search-field:focus::-moz-placeholder {
139
+ opacity: 1;
140
+ }
141
+ .mfui-search__search-field:focus:-moz-placeholder {
142
+ opacity: 1;
143
+ }
144
+ .mfui-search__search-field:focus:-ms-input-placeholder {
145
+ opacity: 1;
146
+ }
147
+ .mfui-search__search-field:focus::-ms-input-placeholder {
136
148
  opacity: 1;
137
149
  }
138
- .mfui-search__search-wrapper_labeled .mfui-search__search-field:focus:-moz-placeholder {
150
+ .mfui-search__search-field:focus::placeholder {
139
151
  opacity: 1;
140
152
  }
141
- .mfui-search__search-wrapper_labeled .mfui-search__search-field:focus:-ms-input-placeholder {
153
+ .mfui-search__search-wrapper_no-label .mfui-search__search-field::-webkit-input-placeholder {
142
154
  opacity: 1;
143
155
  }
144
- .mfui-search__search-wrapper_labeled .mfui-search__search-field:focus::-moz-placeholder {
156
+ .mfui-search__search-wrapper_no-label .mfui-search__search-field::-moz-placeholder {
145
157
  opacity: 1;
146
158
  }
147
- .mfui-search__search-wrapper_labeled .mfui-search__search-field:focus::-ms-input-placeholder {
159
+ .mfui-search__search-wrapper_no-label .mfui-search__search-field:-moz-placeholder {
148
160
  opacity: 1;
149
161
  }
150
- .mfui-search__search-wrapper_labeled .mfui-search__search-field:focus::placeholder {
162
+ .mfui-search__search-wrapper_no-label .mfui-search__search-field:-ms-input-placeholder {
163
+ opacity: 1;
164
+ }
165
+ .mfui-search__search-wrapper_no-label .mfui-search__search-field::-ms-input-placeholder {
166
+ opacity: 1;
167
+ }
168
+ .mfui-search__search-wrapper_no-label .mfui-search__search-field::placeholder {
151
169
  opacity: 1;
152
170
  }
153
171
  .mfui-search__search-field_filled + .mfui-search__label,
@@ -231,20 +249,6 @@
231
249
  max-height: 368px;
232
250
  padding: 16px;
233
251
  overflow-y: auto;
234
- scrollbar-width: thin;
235
- scrollbar-color: var(--spbSky2) transparent;
236
- }
237
- .mfui-search__list-inner::-webkit-scrollbar {
238
- width: 16px;
239
- }
240
- .mfui-search__list-inner::-webkit-scrollbar-thumb {
241
- border: 6px solid transparent;
242
- border-radius: 16px;
243
- background-color: #D8D8D8;
244
- background-clip: padding-box;
245
- }
246
- .mfui-search__list-inner::-webkit-scrollbar-thumb:hover {
247
- background-color: #999999;
248
252
  }
249
253
  .mfui-search__list-item {
250
254
  font-family: inherit;
@@ -234,7 +234,8 @@ var Search = function Search(_ref) {
234
234
  }, [classes === null || classes === void 0 ? void 0 : classes.control])
235
235
  }, /*#__PURE__*/_react["default"].createElement("label", {
236
236
  className: cn('search-wrapper', {
237
- labeled: !!label
237
+ labeled: !!label,
238
+ 'no-label': !label
238
239
  }),
239
240
  htmlFor: searchId
240
241
  }, /*#__PURE__*/_react["default"].createElement("input", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.searchField), {
@@ -157,6 +157,9 @@
157
157
  color: var(--spbSky3);
158
158
  fill: var(--spbSky3);
159
159
  }
160
+ .mfui-tabs__tab-inner:hover {
161
+ text-decoration: none;
162
+ }
160
163
  .mfui-tabs__tab-inner:not(.mfui-tabs__tab-inner_current):hover {
161
164
  color: var(--content);
162
165
  fill: var(--content);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megafon/ui-core",
3
- "version": "4.8.0",
3
+ "version": "4.8.2",
4
4
  "files": [
5
5
  "dist",
6
6
  "styles"
@@ -54,7 +54,7 @@
54
54
  "@babel/preset-env": "^7.8.6",
55
55
  "@babel/preset-react": "^7.8.3",
56
56
  "@babel/preset-typescript": "^7.8.3",
57
- "@megafon/ui-icons": "^2.3.0",
57
+ "@megafon/ui-icons": "^2.4.0",
58
58
  "@svgr/core": "^2.4.1",
59
59
  "@testing-library/jest-dom": "5.16.2",
60
60
  "@testing-library/react": "12.1.2",
@@ -100,5 +100,5 @@
100
100
  "react-popper": "^2.2.3",
101
101
  "swiper": "^6.5.6"
102
102
  },
103
- "gitHead": "bcae549045e554803fd7e7b64e8d106a9aa6e31d"
103
+ "gitHead": "97195278ce7abd8205e0517b58f160e8bce5c40f"
104
104
  }