@megafon/ui-shared 2.3.0 → 3.0.0-beta.11

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.
Files changed (74) hide show
  1. package/CHANGELOG.md +124 -10
  2. package/dist/es/components/AccordionBox/AccordionBox.d.ts +3 -6
  3. package/dist/es/components/AccordionBox/AccordionBox.js +3 -4
  4. package/dist/es/components/Breadcrumbs/Breadcrumbs.css +5 -2
  5. package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +3 -1
  6. package/dist/es/components/Breadcrumbs/Breadcrumbs.js +5 -3
  7. package/dist/es/components/ButtonBanner/ButtonBanner.css +3 -3
  8. package/dist/es/components/ButtonBanner/ButtonBanner.d.ts +2 -2
  9. package/dist/es/components/ButtonBanner/ButtonBanner.js +4 -2
  10. package/dist/es/components/ButtonLinkBox/ButtonLinkBox.d.ts +2 -2
  11. package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +4 -2
  12. package/dist/es/components/Card/Card.css +3 -3
  13. package/dist/es/components/Container/Container.css +5 -168
  14. package/dist/es/components/DownloadLinks/DownloadLink.css +2 -1
  15. package/dist/es/components/Instructions/Instructions.css +7 -7
  16. package/dist/es/components/PageTitle/PageTitle.css +2 -2
  17. package/dist/es/components/Property/Property.css +5 -5
  18. package/dist/es/components/Property/PropertyDescription.css +3 -3
  19. package/dist/es/components/Steps/StepsItem.css +2 -2
  20. package/dist/es/components/StoreBanner/StoreBanner.css +31 -32
  21. package/dist/es/components/StoreBanner/StoreBanner.d.ts +3 -5
  22. package/dist/es/components/StoreBanner/StoreBanner.js +8 -25
  23. package/dist/es/components/StoreBanner/doc/img/qr-code.png +0 -0
  24. package/dist/es/components/Table/Table.css +15 -15
  25. package/dist/es/components/TextBox/TextBox.css +0 -9
  26. package/dist/es/components/TextBox/TextBoxPicture.css +1 -1
  27. package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.css +2 -2
  28. package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +2 -2
  29. package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +4 -2
  30. package/dist/es/components/VideoBanner/VideoBanner.css +4 -4
  31. package/dist/es/components/VideoBlock/VideoBlock.d.ts +1 -1
  32. package/dist/es/components/VideoBlock/VideoBlock.js +3 -3
  33. package/dist/es/index.d.ts +0 -1
  34. package/dist/es/index.js +0 -1
  35. package/dist/lib/components/AccordionBox/AccordionBox.d.ts +3 -6
  36. package/dist/lib/components/AccordionBox/AccordionBox.js +3 -4
  37. package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +5 -2
  38. package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +3 -1
  39. package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +5 -3
  40. package/dist/lib/components/ButtonBanner/ButtonBanner.css +3 -3
  41. package/dist/lib/components/ButtonBanner/ButtonBanner.d.ts +2 -2
  42. package/dist/lib/components/ButtonBanner/ButtonBanner.js +4 -2
  43. package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.d.ts +2 -2
  44. package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +4 -2
  45. package/dist/lib/components/Card/Card.css +3 -3
  46. package/dist/lib/components/Container/Container.css +5 -168
  47. package/dist/lib/components/DownloadLinks/DownloadLink.css +2 -1
  48. package/dist/lib/components/Instructions/Instructions.css +7 -7
  49. package/dist/lib/components/PageTitle/PageTitle.css +2 -2
  50. package/dist/lib/components/Property/Property.css +5 -5
  51. package/dist/lib/components/Property/PropertyDescription.css +3 -3
  52. package/dist/lib/components/Steps/StepsItem.css +2 -2
  53. package/dist/lib/components/StoreBanner/StoreBanner.css +31 -32
  54. package/dist/lib/components/StoreBanner/StoreBanner.d.ts +3 -5
  55. package/dist/lib/components/StoreBanner/StoreBanner.js +8 -28
  56. package/dist/lib/components/StoreBanner/doc/img/qr-code.png +0 -0
  57. package/dist/lib/components/Table/Table.css +15 -15
  58. package/dist/lib/components/TextBox/TextBox.css +0 -9
  59. package/dist/lib/components/TextBox/TextBoxPicture.css +1 -1
  60. package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.css +2 -2
  61. package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +2 -2
  62. package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +4 -2
  63. package/dist/lib/components/VideoBanner/VideoBanner.css +4 -4
  64. package/dist/lib/components/VideoBlock/VideoBlock.d.ts +1 -1
  65. package/dist/lib/components/VideoBlock/VideoBlock.js +3 -3
  66. package/dist/lib/index.d.ts +0 -1
  67. package/dist/lib/index.js +0 -8
  68. package/package.json +6 -5
  69. package/dist/es/components/TextWithIcon/TextWithIcon.css +0 -57
  70. package/dist/es/components/TextWithIcon/TextWithIcon.d.ts +0 -21
  71. package/dist/es/components/TextWithIcon/TextWithIcon.js +0 -53
  72. package/dist/lib/components/TextWithIcon/TextWithIcon.css +0 -57
  73. package/dist/lib/components/TextWithIcon/TextWithIcon.d.ts +0 -21
  74. package/dist/lib/components/TextWithIcon/TextWithIcon.js +0 -74
@@ -7,14 +7,8 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports["default"] = exports.DeviceMask = exports.Theme = void 0;
9
9
 
10
- require("core-js/modules/es.array.concat");
11
-
12
- require("core-js/modules/es.array.includes");
13
-
14
10
  require("core-js/modules/es.object.values");
15
11
 
16
- require("core-js/modules/es.string.includes");
17
-
18
12
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
19
13
 
20
14
  var React = _interopRequireWildcard(require("react"));
@@ -34,12 +28,9 @@ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj;
34
28
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
35
29
 
36
30
  var Theme = {
37
- BASE: 'base',
31
+ DEFAULT: 'default',
38
32
  GREEN: 'green',
39
- SPB_SKY_1: 'spbSky1',
40
-
41
- /** @deprecated */
42
- CLEAR_WHITE: 'clearWhite'
33
+ SPB_SKY_1: 'spbSky1'
43
34
  };
44
35
  exports.Theme = Theme;
45
36
  var DeviceMask = {
@@ -71,7 +62,7 @@ var StoreBanner = function StoreBanner(_ref) {
71
62
  qrCode = _ref.qrCode,
72
63
  imageSrc = _ref.imageSrc,
73
64
  _ref$theme = _ref.theme,
74
- theme = _ref$theme === void 0 ? Theme.CLEAR_WHITE : _ref$theme,
65
+ theme = _ref$theme === void 0 ? Theme.DEFAULT : _ref$theme,
75
66
  deviceMask = _ref.deviceMask,
76
67
  rootRef = _ref.rootRef,
77
68
  dataAttrs = _ref.dataAttrs,
@@ -84,7 +75,7 @@ var StoreBanner = function StoreBanner(_ref) {
84
75
  mask: deviceMask
85
76
  }, [className, rootClassName]),
86
77
  ref: rootRef
87
- }, (0, _uiHelpers.filterDataAttrs)(dataAttrs)), /*#__PURE__*/React.createElement("div", {
78
+ }, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root)), /*#__PURE__*/React.createElement("div", {
88
79
  className: cn('container')
89
80
  }, /*#__PURE__*/React.createElement("div", {
90
81
  className: cn('grid')
@@ -171,21 +162,10 @@ StoreBanner.propTypes = {
171
162
  rootRef: _propTypes["default"].oneOfType([_propTypes["default"].func, _propTypes["default"].oneOfType([_propTypes["default"].shape({
172
163
  current: _propTypes["default"].elementType
173
164
  }), _propTypes["default"].any])]),
174
- dataAttrs: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired),
175
- theme: function theme(props, propName, componentName) {
176
- var deprecatedValue = Theme.CLEAR_WHITE;
177
- var propValue = props[propName];
178
-
179
- if (propValue && !Object.values(Theme).includes(propValue)) {
180
- return new Error("Failed prop type: Invalid prop '".concat(propName, "' of value '").concat(propValue, "' supplied to '").concat(componentName, "',\n expected one of [").concat(Object.values(Theme), "]"));
181
- }
182
-
183
- if (propValue && propValue === deprecatedValue) {
184
- return new Error("Failed prop type: Invalid prop '".concat(propName, "' of value '").concat(propValue, "' supplied to '").concat(componentName, "',\n value '").concat(deprecatedValue, "' is deprecated, please use value '").concat(Theme.BASE, "'"));
185
- }
186
-
187
- return null;
188
- }
165
+ theme: _propTypes["default"].oneOf(Object.values(Theme)),
166
+ dataAttrs: _propTypes["default"].shape({
167
+ root: _propTypes["default"].objectOf(_propTypes["default"].string.isRequired)
168
+ })
189
169
  };
190
170
  var _default = StoreBanner;
191
171
  exports["default"] = _default;
@@ -18,17 +18,17 @@ h5 {
18
18
  height: 8px;
19
19
  }
20
20
  .mfui-table:not(.mfui-table_touch) ::-webkit-scrollbar-track {
21
- background-color: #EDEDED;
21
+ background-color: var(--spbSky1);
22
22
  }
23
23
  .mfui-table:not(.mfui-table_touch) ::-webkit-scrollbar-thumb {
24
24
  border-radius: 4px;
25
- background-color: #D8D8D8;
25
+ background-color: var(--spbSky2);
26
26
  }
27
27
  .mfui-table:not(.mfui-table_touch) ::-webkit-scrollbar-corner {
28
- background-color: #FFFFFF;
28
+ background-color: var(--base);
29
29
  }
30
30
  .mfui-table:not(.mfui-table_touch) .mfui-table__scroll {
31
- scrollbar-color: #D8D8D8 #EDEDED;
31
+ scrollbar-color: var(--spbSky2) var(--spbSky1);
32
32
  scrollbar-width: thin;
33
33
  }
34
34
  .mfui-table__scroll {
@@ -36,7 +36,7 @@ h5 {
36
36
  display: grid;
37
37
  grid-template-columns: auto auto auto;
38
38
  max-width: 100%;
39
- border: 1px solid #D8D8D8;
39
+ border: 1px solid var(--spbSky2);
40
40
  overflow: auto;
41
41
  }
42
42
  @media screen and (min-width: 1024px) {
@@ -80,8 +80,8 @@ h5 {
80
80
  width: 100%;
81
81
  height: 48px;
82
82
  margin-top: -48px;
83
- background: -webkit-gradient(linear, left bottom, left top, color-stop(25%, #FFFFFF), to(rgba(255, 255, 255, 0)));
84
- background: linear-gradient(to top, #FFFFFF 25%, rgba(255, 255, 255, 0));
83
+ background: -webkit-gradient(linear, left bottom, left top, color-stop(25%, var(--base)), to(rgba(255, 255, 255, 0)));
84
+ background: linear-gradient(to top, var(--base) 25%, rgba(255, 255, 255, 0));
85
85
  }
86
86
  .mfui-table__right-gradient {
87
87
  position: -webkit-sticky;
@@ -92,20 +92,20 @@ h5 {
92
92
  width: 48px;
93
93
  height: 100%;
94
94
  margin-left: -48px;
95
- background: -webkit-gradient(linear, right top, left top, color-stop(25%, #FFFFFF), to(rgba(255, 255, 255, 0)));
96
- background: linear-gradient(to left, #FFFFFF 25%, rgba(255, 255, 255, 0));
95
+ background: -webkit-gradient(linear, right top, left top, color-stop(25%, var(--base)), to(rgba(255, 255, 255, 0)));
96
+ background: linear-gradient(to left, var(--base) 25%, rgba(255, 255, 255, 0));
97
97
  }
98
98
  .mfui-table__table {
99
99
  border-width: 0;
100
100
  border-collapse: separate;
101
101
  border-spacing: 0;
102
- background-color: #FFFFFF;
102
+ background-color: var(--base);
103
103
  }
104
104
  .mfui-table__cell {
105
105
  -webkit-box-sizing: border-box;
106
106
  box-sizing: border-box;
107
107
  padding: 24px;
108
- background-color: #FFFFFF;
108
+ background-color: var(--base);
109
109
  }
110
110
  @media screen and (max-width: 767px) {
111
111
  .mfui-table__cell {
@@ -118,7 +118,7 @@ h5 {
118
118
  left: 0;
119
119
  width: 144px;
120
120
  min-width: 144px;
121
- border-right: 1px solid #D8D8D8;
121
+ border-right: 1px solid var(--spbSky2);
122
122
  }
123
123
  .mfui-table__cell:not(:first-child) {
124
124
  max-width: 288px;
@@ -128,12 +128,12 @@ h5 {
128
128
  line-height: 16px;
129
129
  height: 72px;
130
130
  padding-bottom: 12px;
131
- color: #33333380;
131
+ color: var(--stcBlack5);
132
132
  vertical-align: bottom;
133
- background-color: #F6F6F6;
133
+ background-color: var(--spbSky0);
134
134
  }
135
135
  .mfui-table__row:not(:last-child) .mfui-table__cell {
136
- border-bottom: 1px solid #D8D8D8;
136
+ border-bottom: 1px solid var(--spbSky2);
137
137
  }
138
138
  .mfui-table_min-cell-size_small .mfui-table__cell:not(:first-child) {
139
139
  min-width: 72px;
@@ -14,12 +14,3 @@ h5 {
14
14
  .mfui-text-box_text-center {
15
15
  text-align: center;
16
16
  }
17
- .mfui-text-box .mfui-text-with-icon {
18
- margin: 24px 0;
19
- }
20
- .mfui-text-box .mfui-text-with-icon + .mfui-header {
21
- margin-top: 32px;
22
- }
23
- .mfui-text-box .mfui-text-box-picture + .mfui-text-with-icon {
24
- margin: 32px 0 24px;
25
- }
@@ -20,5 +20,5 @@ h5 {
20
20
  .mfui-text-box-picture__img {
21
21
  display: block;
22
22
  max-width: 100%;
23
- border: 1px solid #EDEDED;
23
+ border: 1px solid var(--spbSky1);
24
24
  }
@@ -7,7 +7,7 @@ h5 {
7
7
  }
8
8
  .mfui-title-description-box {
9
9
  font-family: inherit;
10
- color: #333333;
10
+ color: var(--content);
11
11
  }
12
12
  .mfui-title-description-box__item_header {
13
13
  white-space: pre-wrap;
@@ -16,7 +16,7 @@ h5 {
16
16
  margin-bottom: 16px;
17
17
  }
18
18
  .mfui-title-description-box_text-color_white {
19
- color: #FFFFFF;
19
+ color: var(--stcWhite);
20
20
  }
21
21
  .mfui-title-description-box_h-align_center {
22
22
  text-align: center;
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import './TitleDescriptionBox.less';
3
3
  export interface ITitleDescriptionBoxProps {
4
- /** Дата атрибуты для корневого элемента */
4
+ /** Дополнительные data атрибуты к внутренним элементам */
5
5
  dataAttrs?: {
6
- [key: string]: string;
6
+ root?: Record<string, string>;
7
7
  };
8
8
  /** Ссылка на корневой элемент */
9
9
  rootRef?: React.Ref<HTMLDivElement>;
@@ -50,7 +50,7 @@ var TitleDescriptionBox = function TitleDescriptionBox(_ref) {
50
50
  className: cn('description')
51
51
  }, description);
52
52
  }, [description]);
53
- return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs), {
53
+ return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({}, (0, _uiHelpers.filterDataAttrs)(dataAttrs === null || dataAttrs === void 0 ? void 0 : dataAttrs.root), {
54
54
  className: cn({
55
55
  'h-align': hAlign,
56
56
  'text-color': textColor
@@ -71,7 +71,9 @@ var TitleDescriptionBox = function TitleDescriptionBox(_ref) {
71
71
  };
72
72
 
73
73
  TitleDescriptionBox.propTypes = {
74
- dataAttrs: PropTypes.objectOf(PropTypes.string.isRequired),
74
+ dataAttrs: PropTypes.shape({
75
+ root: PropTypes.objectOf(PropTypes.string.isRequired)
76
+ }),
75
77
  rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
76
78
  current: PropTypes.elementType
77
79
  }), PropTypes.any])]),
@@ -119,19 +119,19 @@ h5 {
119
119
  }
120
120
  }
121
121
  .mfui-video-banner__content_text-color_black {
122
- color: #333333;
122
+ color: var(--stcBlack);
123
123
  }
124
124
  .mfui-video-banner__content_text-color_white {
125
- color: #FFFFFF;
125
+ color: var(--stcWhite);
126
126
  }
127
127
  @media screen and (max-width: 767px) {
128
128
  .mfui-video-banner__content_text-color-mobile_black {
129
- color: #333333;
129
+ color: var(--stcBlack);
130
130
  }
131
131
  }
132
132
  @media screen and (max-width: 767px) {
133
133
  .mfui-video-banner__content_text-color-mobile_white {
134
- color: #FFFFFF;
134
+ color: var(--stcWhite);
135
135
  }
136
136
  }
137
137
  .mfui-video-banner__description {
@@ -6,7 +6,7 @@ export interface IContent {
6
6
  /** Текст-описание */
7
7
  description: string | React.ReactNode[] | React.ReactNode;
8
8
  /** Текст кнопки */
9
- buttonTitle?: string;
9
+ buttonTitle: string;
10
10
  /** Добавляет атрибут download для тега <a> компонента Button */
11
11
  buttonDownload?: boolean;
12
12
  /** Ссылка на кнопке */
@@ -101,7 +101,7 @@ var VideoBlock = function VideoBlock(_ref) {
101
101
  className: cn('header')
102
102
  }, title), /*#__PURE__*/_react["default"].createElement("div", {
103
103
  className: cn('description', [classes.description])
104
- }, description), buttonTitle && /*#__PURE__*/_react["default"].createElement(_uiCore.Button, {
104
+ }, description), /*#__PURE__*/_react["default"].createElement(_uiCore.Button, {
105
105
  className: cn('button', [classes.button]),
106
106
  href: href,
107
107
  onClick: onButtonClick,
@@ -121,7 +121,7 @@ var VideoBlock = function VideoBlock(_ref) {
121
121
  orderTablet: "2",
122
122
  orderMobile: "2",
123
123
  key: "column-content"
124
- }, renderContent(content)));
124
+ }, renderContent && renderContent(content)));
125
125
  }
126
126
 
127
127
  columns.push( /*#__PURE__*/_react["default"].createElement(_uiCore.GridColumn, {
@@ -161,7 +161,7 @@ VideoBlock.propTypes = {
161
161
  title: _propTypes["default"].string.isRequired,
162
162
  description: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].arrayOf(_propTypes["default"].node), _propTypes["default"].node]).isRequired,
163
163
  href: _propTypes["default"].string,
164
- buttonTitle: _propTypes["default"].string,
164
+ buttonTitle: _propTypes["default"].string.isRequired,
165
165
  buttonDownload: _propTypes["default"].bool,
166
166
  onButtonClick: _propTypes["default"].func
167
167
  }),
@@ -29,7 +29,6 @@ export { default as TableRow } from './components/Table/TableRow';
29
29
  export { default as TabsBox } from './components/TabsBox/TabsBox';
30
30
  export { default as TextBox } from './components/TextBox/TextBox';
31
31
  export { default as TextBoxPicture } from './components/TextBox/TextBoxPicture';
32
- export { default as TextWithIcon } from './components/TextWithIcon/TextWithIcon';
33
32
  export { default as TitleDescriptionBox } from './components/TitleDescriptionBox/TitleDescriptionBox';
34
33
  export { default as VideoBanner } from './components/VideoBanner/VideoBanner';
35
34
  export { default as VideoBlock } from './components/VideoBlock/VideoBlock';
package/dist/lib/index.js CHANGED
@@ -189,12 +189,6 @@ Object.defineProperty(exports, "TextBoxPicture", {
189
189
  return _TextBoxPicture["default"];
190
190
  }
191
191
  });
192
- Object.defineProperty(exports, "TextWithIcon", {
193
- enumerable: true,
194
- get: function get() {
195
- return _TextWithIcon["default"];
196
- }
197
- });
198
192
  Object.defineProperty(exports, "TitleDescriptionBox", {
199
193
  enumerable: true,
200
194
  get: function get() {
@@ -276,8 +270,6 @@ var _TextBox = _interopRequireDefault(require("./components/TextBox/TextBox"));
276
270
 
277
271
  var _TextBoxPicture = _interopRequireDefault(require("./components/TextBox/TextBoxPicture"));
278
272
 
279
- var _TextWithIcon = _interopRequireDefault(require("./components/TextWithIcon/TextWithIcon"));
280
-
281
273
  var _TitleDescriptionBox = _interopRequireDefault(require("./components/TitleDescriptionBox/TitleDescriptionBox"));
282
274
 
283
275
  var _VideoBanner = _interopRequireDefault(require("./components/VideoBanner/VideoBanner"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megafon/ui-shared",
3
- "version": "2.3.0",
3
+ "version": "3.0.0-beta.11",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -19,6 +19,7 @@
19
19
  "license": "MIT",
20
20
  "scripts": {
21
21
  "build": "gulp build",
22
+ "cleanDist": "rm -rf dist",
22
23
  "coverage": "yarn coverage:unit",
23
24
  "coverage:unit": "jest --ci --collectCoverage --coverageDirectory=coverage",
24
25
  "typecheck": "tsc --noEmit -p .",
@@ -51,7 +52,7 @@
51
52
  "@babel/preset-env": "^7.8.6",
52
53
  "@babel/preset-react": "^7.8.3",
53
54
  "@babel/preset-typescript": "^7.8.3",
54
- "@megafon/ui-icons": "^0.2.0",
55
+ "@megafon/ui-icons": "^1.0.0-beta.4",
55
56
  "@svgr/core": "^2.4.1",
56
57
  "@types/enzyme": "^3.10.5",
57
58
  "@types/enzyme-adapter-react-16": "^1.0.6",
@@ -81,13 +82,13 @@
81
82
  },
82
83
  "dependencies": {
83
84
  "@babel/runtime": "^7.8.4",
84
- "@megafon/ui-core": "^2.5.0",
85
- "@megafon/ui-helpers": "^1.0.0",
85
+ "@megafon/ui-core": "^3.0.0-beta.11",
86
+ "@megafon/ui-helpers": "^2.0.0-beta.4",
86
87
  "core-js": "^3.6.4",
87
88
  "htmr": "^0.9.2",
88
89
  "lodash.throttle": "^4.1.1",
89
90
  "prop-types": "^15.7.2",
90
91
  "swiper": "^6.5.6"
91
92
  },
92
- "gitHead": "28c22a646a8c5c18ef4a4060c1b1232aa45db14c"
93
+ "gitHead": "23f0d202d668ef8c92e83597338c029dc39250ee"
93
94
  }
@@ -1,57 +0,0 @@
1
- h1,
2
- h2,
3
- h3,
4
- h4,
5
- h5 {
6
- margin: 0;
7
- }
8
- .mfui-text-with-icon__item {
9
- display: -webkit-box;
10
- display: -ms-flexbox;
11
- display: flex;
12
- -webkit-box-align: center;
13
- -ms-flex-align: center;
14
- align-items: center;
15
- }
16
- @media screen and (max-width: 767px) {
17
- .mfui-text-with-icon__item {
18
- -webkit-box-orient: vertical;
19
- -webkit-box-direction: normal;
20
- -ms-flex-direction: column;
21
- flex-direction: column;
22
- }
23
- }
24
- .mfui-text-with-icon__item:not(:first-of-type) {
25
- margin-top: 16px;
26
- }
27
- @media screen and (max-width: 767px) {
28
- .mfui-text-with-icon__item:not(:first-of-type) {
29
- margin-top: 24px;
30
- }
31
- }
32
- .mfui-text-with-icon__header {
33
- margin-bottom: 24px;
34
- }
35
- @media screen and (max-width: 767px) {
36
- .mfui-text-with-icon__header {
37
- text-align: center;
38
- }
39
- }
40
- .mfui-text-with-icon__svg-icon {
41
- width: 40px;
42
- min-width: 40px;
43
- height: 40px;
44
- min-height: 40px;
45
- overflow: hidden;
46
- }
47
- @media screen and (min-width: 768px) {
48
- .mfui-text-with-icon__svg-icon {
49
- margin-right: 16px;
50
- }
51
- }
52
- @media screen and (max-width: 767px) {
53
- .mfui-text-with-icon__text {
54
- margin-top: 12px;
55
- text-align: center;
56
- }
57
- }
@@ -1,21 +0,0 @@
1
- import * as React from 'react';
2
- import { IFilterDataAttrs } from '@megafon/ui-helpers';
3
- import './TextWithIcon.less';
4
- export interface IItem {
5
- /** Текст */
6
- text: string;
7
- /** Иконка */
8
- icon: React.ReactNode;
9
- }
10
- export interface ITextWithIconProps extends IFilterDataAttrs {
11
- /** Список строк с иконками */
12
- items: IItem[];
13
- /** Заголовок */
14
- title?: string;
15
- /** Ссылка на корневой элемент */
16
- rootRef?: React.Ref<HTMLDivElement>;
17
- /** Дополнительный класс для корневого элемента */
18
- className?: string;
19
- }
20
- declare const TextWithIcon: React.FC<ITextWithIconProps>;
21
- export default TextWithIcon;
@@ -1,53 +0,0 @@
1
- import "core-js/modules/es.array.map";
2
- import _extends from "@babel/runtime/helpers/extends";
3
- import * as React from 'react';
4
- import { Header, Grid, GridColumn } from '@megafon/ui-core';
5
- import { cnCreate, filterDataAttrs } from '@megafon/ui-helpers';
6
- import * as PropTypes from 'prop-types';
7
- import "./TextWithIcon.css";
8
- var cn = cnCreate('mfui-text-with-icon');
9
-
10
- var TextWithIcon = function TextWithIcon(_ref) {
11
- var items = _ref.items,
12
- title = _ref.title,
13
- rootRef = _ref.rootRef,
14
- dataAttrs = _ref.dataAttrs,
15
- className = _ref.className;
16
- return /*#__PURE__*/React.createElement("div", _extends({
17
- className: cn([className]),
18
- ref: rootRef
19
- }, filterDataAttrs(dataAttrs)), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(GridColumn, {
20
- mobile: '12',
21
- tablet: '7',
22
- desktop: '6',
23
- wide: '6'
24
- }, title && /*#__PURE__*/React.createElement(Header, {
25
- className: cn('header'),
26
- as: "h5"
27
- }, title), items.map(function (_ref2, i) {
28
- var text = _ref2.text,
29
- icon = _ref2.icon;
30
- return /*#__PURE__*/React.createElement("div", {
31
- className: cn('item'),
32
- key: i
33
- }, /*#__PURE__*/React.createElement("div", {
34
- className: cn('svg-icon')
35
- }, icon), /*#__PURE__*/React.createElement("div", {
36
- className: cn('text')
37
- }, text));
38
- }))));
39
- };
40
-
41
- TextWithIcon.propTypes = {
42
- items: PropTypes.arrayOf(PropTypes.shape({
43
- text: PropTypes.string.isRequired,
44
- icon: PropTypes.node.isRequired
45
- }).isRequired).isRequired,
46
- title: PropTypes.string,
47
- rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
48
- current: PropTypes.elementType
49
- }), PropTypes.any])]),
50
- dataAttrs: PropTypes.objectOf(PropTypes.string.isRequired),
51
- className: PropTypes.string
52
- };
53
- export default TextWithIcon;
@@ -1,57 +0,0 @@
1
- h1,
2
- h2,
3
- h3,
4
- h4,
5
- h5 {
6
- margin: 0;
7
- }
8
- .mfui-text-with-icon__item {
9
- display: -webkit-box;
10
- display: -ms-flexbox;
11
- display: flex;
12
- -webkit-box-align: center;
13
- -ms-flex-align: center;
14
- align-items: center;
15
- }
16
- @media screen and (max-width: 767px) {
17
- .mfui-text-with-icon__item {
18
- -webkit-box-orient: vertical;
19
- -webkit-box-direction: normal;
20
- -ms-flex-direction: column;
21
- flex-direction: column;
22
- }
23
- }
24
- .mfui-text-with-icon__item:not(:first-of-type) {
25
- margin-top: 16px;
26
- }
27
- @media screen and (max-width: 767px) {
28
- .mfui-text-with-icon__item:not(:first-of-type) {
29
- margin-top: 24px;
30
- }
31
- }
32
- .mfui-text-with-icon__header {
33
- margin-bottom: 24px;
34
- }
35
- @media screen and (max-width: 767px) {
36
- .mfui-text-with-icon__header {
37
- text-align: center;
38
- }
39
- }
40
- .mfui-text-with-icon__svg-icon {
41
- width: 40px;
42
- min-width: 40px;
43
- height: 40px;
44
- min-height: 40px;
45
- overflow: hidden;
46
- }
47
- @media screen and (min-width: 768px) {
48
- .mfui-text-with-icon__svg-icon {
49
- margin-right: 16px;
50
- }
51
- }
52
- @media screen and (max-width: 767px) {
53
- .mfui-text-with-icon__text {
54
- margin-top: 12px;
55
- text-align: center;
56
- }
57
- }
@@ -1,21 +0,0 @@
1
- import * as React from 'react';
2
- import { IFilterDataAttrs } from '@megafon/ui-helpers';
3
- import './TextWithIcon.less';
4
- export interface IItem {
5
- /** Текст */
6
- text: string;
7
- /** Иконка */
8
- icon: React.ReactNode;
9
- }
10
- export interface ITextWithIconProps extends IFilterDataAttrs {
11
- /** Список строк с иконками */
12
- items: IItem[];
13
- /** Заголовок */
14
- title?: string;
15
- /** Ссылка на корневой элемент */
16
- rootRef?: React.Ref<HTMLDivElement>;
17
- /** Дополнительный класс для корневого элемента */
18
- className?: string;
19
- }
20
- declare const TextWithIcon: React.FC<ITextWithIconProps>;
21
- export default TextWithIcon;
@@ -1,74 +0,0 @@
1
- "use strict";
2
-
3
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
-
5
- Object.defineProperty(exports, "__esModule", {
6
- value: true
7
- });
8
- exports["default"] = void 0;
9
-
10
- require("core-js/modules/es.array.map");
11
-
12
- var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
-
14
- var React = _interopRequireWildcard(require("react"));
15
-
16
- var _uiCore = require("@megafon/ui-core");
17
-
18
- var _uiHelpers = require("@megafon/ui-helpers");
19
-
20
- var PropTypes = _interopRequireWildcard(require("prop-types"));
21
-
22
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
23
-
24
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
25
-
26
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
27
-
28
- var cn = (0, _uiHelpers.cnCreate)('mfui-text-with-icon');
29
-
30
- var TextWithIcon = function TextWithIcon(_ref) {
31
- var items = _ref.items,
32
- title = _ref.title,
33
- rootRef = _ref.rootRef,
34
- dataAttrs = _ref.dataAttrs,
35
- className = _ref.className;
36
- return /*#__PURE__*/React.createElement("div", (0, _extends2["default"])({
37
- className: cn([className]),
38
- ref: rootRef
39
- }, (0, _uiHelpers.filterDataAttrs)(dataAttrs)), /*#__PURE__*/React.createElement(_uiCore.Grid, null, /*#__PURE__*/React.createElement(_uiCore.GridColumn, {
40
- mobile: '12',
41
- tablet: '7',
42
- desktop: '6',
43
- wide: '6'
44
- }, title && /*#__PURE__*/React.createElement(_uiCore.Header, {
45
- className: cn('header'),
46
- as: "h5"
47
- }, title), items.map(function (_ref2, i) {
48
- var text = _ref2.text,
49
- icon = _ref2.icon;
50
- return /*#__PURE__*/React.createElement("div", {
51
- className: cn('item'),
52
- key: i
53
- }, /*#__PURE__*/React.createElement("div", {
54
- className: cn('svg-icon')
55
- }, icon), /*#__PURE__*/React.createElement("div", {
56
- className: cn('text')
57
- }, text));
58
- }))));
59
- };
60
-
61
- TextWithIcon.propTypes = {
62
- items: PropTypes.arrayOf(PropTypes.shape({
63
- text: PropTypes.string.isRequired,
64
- icon: PropTypes.node.isRequired
65
- }).isRequired).isRequired,
66
- title: PropTypes.string,
67
- rootRef: PropTypes.oneOfType([PropTypes.func, PropTypes.oneOfType([PropTypes.shape({
68
- current: PropTypes.elementType
69
- }), PropTypes.any])]),
70
- dataAttrs: PropTypes.objectOf(PropTypes.string.isRequired),
71
- className: PropTypes.string
72
- };
73
- var _default = TextWithIcon;
74
- exports["default"] = _default;