@megafon/ui-core 4.6.0 → 4.7.0

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,22 @@
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.7.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.6.0...@megafon/ui-core@4.7.0) (2022-11-07)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **textfield:** fix right padding with hideIcon prop ([c2aeffd](https://github.com/MegafonWebLab/megafon-ui/commit/c2aeffd1e4c94c97aac23128b9f1ccff4ead9a81))
12
+
13
+
14
+ ### Features
15
+
16
+ * **tabs:** add gray color to tabColorTheme prop ([9d01119](https://github.com/MegafonWebLab/megafon-ui/commit/9d01119aef6ee6ef26e02c7b22efd17cb8a1147a))
17
+
18
+
19
+
20
+
21
+
6
22
  # [4.6.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-core@4.5.1...@megafon/ui-core@4.6.0) (2022-10-31)
7
23
 
8
24
 
@@ -8,6 +8,8 @@ export interface IBannerDotProps {
8
8
  timerDelay: number;
9
9
  dataAttrs?: {
10
10
  root?: Record<string, string>;
11
+ svg?: Record<string, string>;
12
+ circle?: Record<string, string>;
11
13
  };
12
14
  onClick: (index: number) => void;
13
15
  }
@@ -22,10 +22,10 @@ var BannerDot = function BannerDot(_ref) {
22
22
  timer: showTimer
23
23
  }, className),
24
24
  onClick: handleDotClick
25
- }), showTimer && isActive && /*#__PURE__*/React.createElement("svg", {
25
+ }), showTimer && isActive && /*#__PURE__*/React.createElement("svg", _extends({
26
26
  className: cn('timer'),
27
27
  viewBox: "0 0 100 100"
28
- }, /*#__PURE__*/React.createElement("circle", {
28
+ }, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.svg)), /*#__PURE__*/React.createElement("circle", _extends({}, filterDataAttrs(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.circle), {
29
29
  className: cn('timer-circle'),
30
30
  style: {
31
31
  animationDuration: "".concat(timerDelay, "s")
@@ -33,13 +33,15 @@ var BannerDot = function BannerDot(_ref) {
33
33
  cx: "50",
34
34
  cy: "50",
35
35
  r: "50"
36
- })));
36
+ }))));
37
37
  };
38
38
 
39
39
  BannerDot.propTypes = {
40
40
  className: PropTypes.string,
41
41
  dataAttrs: PropTypes.shape({
42
- root: PropTypes.objectOf(PropTypes.string.isRequired)
42
+ root: PropTypes.objectOf(PropTypes.string.isRequired),
43
+ svg: PropTypes.objectOf(PropTypes.string.isRequired),
44
+ circle: PropTypes.objectOf(PropTypes.string.isRequired)
43
45
  }),
44
46
  index: PropTypes.number.isRequired,
45
47
  isActive: PropTypes.bool.isRequired,
@@ -149,8 +149,8 @@
149
149
  text-align: center;
150
150
  text-decoration: none;
151
151
  cursor: pointer;
152
- -webkit-transition: color 0.3s;
153
- transition: color 0.3s;
152
+ -webkit-transition: color 0.3s, fill 0.3s;
153
+ transition: color 0.3s, fill 0.3s;
154
154
  fill: var(--spbSky3);
155
155
  }
156
156
  .mfui-tabs__tab-inner:focus {
@@ -245,12 +245,15 @@
245
245
  z-index: 100;
246
246
  background-color: var(--base);
247
247
  }
248
+ .mfui-tabs_tab-color_gray .mfui-tabs__swiper {
249
+ background-color: var(--spbSky1);
250
+ }
248
251
  .mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__swiper {
249
- background-color: var(--stcBlack50);
252
+ background-color: var(--stcBlack20);
250
253
  }
251
254
  .mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__tab-inner:not(.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__tab-inner_current) {
252
- color: var(--stcWhite50);
253
- fill: var(--stcWhite50);
255
+ color: #ffffffb2;
256
+ fill: #ffffffb2;
254
257
  }
255
258
  .mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__tab-inner:not(.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__tab-inner_current):hover {
256
259
  color: var(--stcWhite);
@@ -12,6 +12,7 @@ export declare const TabSize: {
12
12
  export declare const TabColorTheme: {
13
13
  readonly WHITE: "white";
14
14
  readonly GREEN: "green";
15
+ readonly GRAY: "gray";
15
16
  };
16
17
  declare type TabSizeType = typeof TabSize[keyof typeof TabSize];
17
18
  declare type TabColorThemeType = typeof TabColorTheme[keyof typeof TabColorTheme];
@@ -32,7 +32,8 @@ export var TabSize = {
32
32
  };
33
33
  export var TabColorTheme = {
34
34
  WHITE: 'white',
35
- GREEN: 'green'
35
+ GREEN: 'green',
36
+ GRAY: 'gray'
36
37
  };
37
38
  var cn = cnCreate('mfui-tabs');
38
39
 
@@ -46,6 +46,9 @@
46
46
  transition: height 0.1s;
47
47
  will-change: height;
48
48
  }
49
+ .mfui-text-field__field_no-icon {
50
+ padding-right: 16px;
51
+ }
49
52
  .mfui-text-field__resizer {
50
53
  position: absolute;
51
54
  right: 0;
@@ -319,7 +319,9 @@ var TextField = function TextField(_ref) {
319
319
  });
320
320
 
321
321
  var inputParams = _extends(_extends({}, commonParams), {
322
- className: cn('field', classes === null || classes === void 0 ? void 0 : classes.input),
322
+ className: cn('field', {
323
+ 'no-icon': hideIcon
324
+ }, classes === null || classes === void 0 ? void 0 : classes.input),
323
325
  type: isVisiblePassword ? 'text' : type,
324
326
  autoComplete: autoComplete
325
327
  });
@@ -8,6 +8,8 @@ export interface IBannerDotProps {
8
8
  timerDelay: number;
9
9
  dataAttrs?: {
10
10
  root?: Record<string, string>;
11
+ svg?: Record<string, string>;
12
+ circle?: Record<string, string>;
11
13
  };
12
14
  onClick: (index: number) => void;
13
15
  }
@@ -40,10 +40,10 @@ var BannerDot = function BannerDot(_ref) {
40
40
  timer: showTimer
41
41
  }, className),
42
42
  onClick: handleDotClick
43
- }), showTimer && isActive && /*#__PURE__*/React.createElement("svg", {
43
+ }), showTimer && isActive && /*#__PURE__*/React.createElement("svg", (0, _extends2["default"])({
44
44
  className: cn('timer'),
45
45
  viewBox: "0 0 100 100"
46
- }, /*#__PURE__*/React.createElement("circle", {
46
+ }, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.svg)), /*#__PURE__*/React.createElement("circle", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.circle), {
47
47
  className: cn('timer-circle'),
48
48
  style: {
49
49
  animationDuration: "".concat(timerDelay, "s")
@@ -51,13 +51,15 @@ var BannerDot = function BannerDot(_ref) {
51
51
  cx: "50",
52
52
  cy: "50",
53
53
  r: "50"
54
- })));
54
+ }))));
55
55
  };
56
56
 
57
57
  BannerDot.propTypes = {
58
58
  className: PropTypes.string,
59
59
  dataAttrs: PropTypes.shape({
60
- root: PropTypes.objectOf(PropTypes.string.isRequired)
60
+ root: PropTypes.objectOf(PropTypes.string.isRequired),
61
+ svg: PropTypes.objectOf(PropTypes.string.isRequired),
62
+ circle: PropTypes.objectOf(PropTypes.string.isRequired)
61
63
  }),
62
64
  index: PropTypes.number.isRequired,
63
65
  isActive: PropTypes.bool.isRequired,
@@ -149,8 +149,8 @@
149
149
  text-align: center;
150
150
  text-decoration: none;
151
151
  cursor: pointer;
152
- -webkit-transition: color 0.3s;
153
- transition: color 0.3s;
152
+ -webkit-transition: color 0.3s, fill 0.3s;
153
+ transition: color 0.3s, fill 0.3s;
154
154
  fill: var(--spbSky3);
155
155
  }
156
156
  .mfui-tabs__tab-inner:focus {
@@ -245,12 +245,15 @@
245
245
  z-index: 100;
246
246
  background-color: var(--base);
247
247
  }
248
+ .mfui-tabs_tab-color_gray .mfui-tabs__swiper {
249
+ background-color: var(--spbSky1);
250
+ }
248
251
  .mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__swiper {
249
- background-color: var(--stcBlack50);
252
+ background-color: var(--stcBlack20);
250
253
  }
251
254
  .mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__tab-inner:not(.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__tab-inner_current) {
252
- color: var(--stcWhite50);
253
- fill: var(--stcWhite50);
255
+ color: #ffffffb2;
256
+ fill: #ffffffb2;
254
257
  }
255
258
  .mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__tab-inner:not(.mfui-tabs_tab-color_green:not(.mfui-tabs_sticky) .mfui-tabs__tab-inner_current):hover {
256
259
  color: var(--stcWhite);
@@ -12,6 +12,7 @@ export declare const TabSize: {
12
12
  export declare const TabColorTheme: {
13
13
  readonly WHITE: "white";
14
14
  readonly GREEN: "green";
15
+ readonly GRAY: "gray";
15
16
  };
16
17
  declare type TabSizeType = typeof TabSize[keyof typeof TabSize];
17
18
  declare type TabColorThemeType = typeof TabColorTheme[keyof typeof TabColorTheme];
@@ -61,7 +61,8 @@ var TabSize = {
61
61
  exports.TabSize = TabSize;
62
62
  var TabColorTheme = {
63
63
  WHITE: 'white',
64
- GREEN: 'green'
64
+ GREEN: 'green',
65
+ GRAY: 'gray'
65
66
  };
66
67
  exports.TabColorTheme = TabColorTheme;
67
68
  var cn = (0, _uiHelpers.cnCreate)('mfui-tabs');
@@ -46,6 +46,9 @@
46
46
  transition: height 0.1s;
47
47
  will-change: height;
48
48
  }
49
+ .mfui-text-field__field_no-icon {
50
+ padding-right: 16px;
51
+ }
49
52
  .mfui-text-field__resizer {
50
53
  position: absolute;
51
54
  right: 0;
@@ -346,7 +346,9 @@ var TextField = function TextField(_ref) {
346
346
  inputMode: inputMode
347
347
  });
348
348
  var inputParams = (0, _extends2["default"])((0, _extends2["default"])({}, commonParams), {
349
- className: cn('field', classes === null || classes === void 0 ? void 0 : classes.input),
349
+ className: cn('field', {
350
+ 'no-icon': hideIcon
351
+ }, classes === null || classes === void 0 ? void 0 : classes.input),
350
352
  type: isVisiblePassword ? 'text' : type,
351
353
  autoComplete: autoComplete
352
354
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megafon/ui-core",
3
- "version": "4.6.0",
3
+ "version": "4.7.0",
4
4
  "files": [
5
5
  "dist",
6
6
  "styles"
@@ -100,5 +100,5 @@
100
100
  "react-popper": "^2.2.3",
101
101
  "swiper": "^6.5.6"
102
102
  },
103
- "gitHead": "fd77e756d2591ad3489e94c585d40bfa05e40710"
103
+ "gitHead": "d22bcb18842bee0a570b666fb4007c81ac3aced0"
104
104
  }