ecomlab-components-next 0.1.308 → 0.1.311

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.
@@ -105,7 +105,7 @@ var CardsServicesV3 = function CardsServicesV3(_ref) {
105
105
  var label = _ref2.label;
106
106
  return label != service;
107
107
  });
108
- var _useState = (0, _react.useState)(6),
108
+ var _useState = (0, _react.useState)(3),
109
109
  _useState2 = _slicedToArray(_useState, 2),
110
110
  isShow = _useState2[0],
111
111
  setIsShow = _useState2[1];
@@ -82,7 +82,13 @@ var QuestionsV2 = function QuestionsV2(_ref) {
82
82
  className: "questions-v2__question-text"
83
83
  }, questions), /*#__PURE__*/_react["default"].createElement("span", {
84
84
  className: "questions-v2__icon"
85
- }, "+")), /*#__PURE__*/_react["default"].createElement("div", {
85
+ }, /*#__PURE__*/_react["default"].createElement("span", {
86
+ className: "questions-v2__icon-circle"
87
+ }), /*#__PURE__*/_react["default"].createElement("span", {
88
+ className: "questions-v2__icon-line questions-v2__icon-line_horizontal"
89
+ }), /*#__PURE__*/_react["default"].createElement("span", {
90
+ className: "questions-v2__icon-line questions-v2__icon-line_vertical"
91
+ }))), /*#__PURE__*/_react["default"].createElement("div", {
86
92
  className: "questions-v2__answer"
87
93
  }, /*#__PURE__*/_react["default"].createElement("p", {
88
94
  className: "questions-v2__answer-text"
@@ -52,8 +52,8 @@
52
52
 
53
53
  &_open {
54
54
  .questions-v2__icon {
55
- transform: rotate(45deg);
56
55
  color: $green;
56
+ transform: rotate(45deg);
57
57
  }
58
58
 
59
59
  .questions-v2__answer {
@@ -70,13 +70,14 @@
70
70
  }
71
71
  }
72
72
 
73
+ // При hover всегда зелёный
73
74
  .questions-v2__question:hover {
74
- color: rgb(139, 92, 246);
75
+ color: $green;
75
76
  }
76
77
  }
77
78
 
78
79
  &__question {
79
- padding: 20px 24px;
80
+ padding: 20px 18px 20px 24px;
80
81
  display: flex;
81
82
  justify-content: space-between;
82
83
  align-items: center;
@@ -89,6 +90,20 @@
89
90
 
90
91
  &:hover {
91
92
  color: $green;
93
+
94
+ .questions-v2__icon {
95
+ color: $green;
96
+ transform: scale(1.08);
97
+
98
+ .questions-v2__icon-circle {
99
+ opacity: 1;
100
+ transform: translate(-50%, -50%) scale(1.05);
101
+ }
102
+
103
+ .questions-v2__icon-line {
104
+ width: 23px;
105
+ }
106
+ }
92
107
  }
93
108
  }
94
109
 
@@ -97,13 +112,77 @@
97
112
  text-align: left;
98
113
  }
99
114
 
115
+ // Контейнер иконки
100
116
  &__icon {
101
- font-size: 20px;
102
- font-weight: 400;
103
- color: $muted;
104
- transition: transform 0.3s ease, color 0.2s ease;
105
- flex-shrink: 0;
117
+ position: relative;
118
+
119
+ width: 50px;
120
+ height: 50px;
121
+
122
+ flex: 0 0 50px;
106
123
  margin-left: 16px;
124
+
125
+ display: flex;
126
+ align-items: center;
127
+ justify-content: center;
128
+
129
+ color: $muted;
130
+
131
+ transition:
132
+ transform 0.25s ease,
133
+ color 0.2s ease;
134
+
135
+ // Круг
136
+ &-circle {
137
+ position: absolute;
138
+
139
+ left: 50%;
140
+ top: 50%;
141
+
142
+ width: 50px;
143
+ height: 50px;
144
+
145
+ border-radius: 50%;
146
+
147
+ background: rgba(5, 150, 105, 0.075);
148
+
149
+ opacity: 0;
150
+
151
+ transform: translate(-50%, -50%) scale(0.7);
152
+
153
+ transition:
154
+ opacity 0.25s ease,
155
+ transform 0.25s ease;
156
+ }
157
+
158
+ // Линии плюса
159
+ &-line {
160
+ position: absolute;
161
+
162
+ left: 50%;
163
+ top: 50%;
164
+
165
+ width: 23px;
166
+ height: 1.25px;
167
+
168
+ border-radius: 2px;
169
+
170
+ background: currentColor;
171
+
172
+ z-index: 2;
173
+
174
+ transition:
175
+ width 0.25s ease,
176
+ background-color 0.2s ease;
177
+
178
+ &_horizontal {
179
+ transform: translate(-50%, -50%);
180
+ }
181
+
182
+ &_vertical {
183
+ transform: translate(-50%, -50%) rotate(90deg);
184
+ }
185
+ }
107
186
  }
108
187
 
109
188
  &__answer {
@@ -132,7 +211,11 @@
132
211
  }
133
212
  }
134
213
 
135
- // Мобильная версия (до 768px)
214
+
215
+ // -----------------------------------------
216
+ // Планшет / небольшие экраны
217
+ // -----------------------------------------
218
+
136
219
  @media (max-width: 1100px) {
137
220
  .questions-v2 {
138
221
  padding: 72px 24px;
@@ -158,13 +241,36 @@
158
241
  }
159
242
 
160
243
  &__question {
161
- padding: 16px 20px;
244
+ padding: 16px 16px 16px 20px;
162
245
  font-size: 14px;
163
246
  }
164
247
 
165
248
  &__icon {
166
- font-size: 18px;
249
+ width: 46px;
250
+ height: 46px;
251
+ flex-basis: 46px;
167
252
  margin-left: 12px;
253
+
254
+ &-circle {
255
+ width: 46px;
256
+ height: 46px;
257
+ }
258
+
259
+ &-line {
260
+ width: 21px;
261
+ }
262
+ }
263
+
264
+ &__question:hover {
265
+ .questions-v2__icon {
266
+ .questions-v2__icon-circle {
267
+ transform: translate(-50%, -50%) scale(1.05);
268
+ }
269
+
270
+ .questions-v2__icon-line {
271
+ width: 22px;
272
+ }
273
+ }
168
274
  }
169
275
 
170
276
  &__answer-text {
@@ -174,7 +280,11 @@
174
280
  }
175
281
  }
176
282
 
177
- // Мобильная версия (до 430px)
283
+
284
+ // -----------------------------------------
285
+ // Мобильная версия
286
+ // -----------------------------------------
287
+
178
288
  @media (max-width: 430px) {
179
289
  .questions-v2 {
180
290
  padding: 40px 20px;
@@ -188,7 +298,35 @@
188
298
  }
189
299
 
190
300
  &__question {
191
- padding: 12px 16px;
301
+ padding: 12px 12px 12px 16px;
302
+ }
303
+
304
+ &__icon {
305
+ width: 42px;
306
+ height: 42px;
307
+ flex-basis: 42px;
308
+ margin-left: 10px;
309
+
310
+ &-circle {
311
+ width: 42px;
312
+ height: 42px;
313
+ }
314
+
315
+ &-line {
316
+ width: 20px;
317
+ }
318
+ }
319
+
320
+ &__question:hover {
321
+ .questions-v2__icon {
322
+ .questions-v2__icon-circle {
323
+ transform: translate(-50%, -50%) scale(1.04);
324
+ }
325
+
326
+ .questions-v2__icon-line {
327
+ width: 21px;
328
+ }
329
+ }
192
330
  }
193
331
  }
194
332
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecomlab-components-next",
3
- "version": "0.1.308",
3
+ "version": "0.1.311",
4
4
  "description": "A set of common and reusable React components",
5
5
  "main": "dist/index.js",
6
6
  "files": [