@megafon/ui-shared 4.20.0 → 4.20.1

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,17 @@
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.20.1](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@4.20.0...@megafon/ui-shared@4.20.1) (2023-06-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **storebanner:** fix new mask for iphone 12 and green theme ([c7da417](https://github.com/MegafonWebLab/megafon-ui/commit/c7da417b7919eb4564eadfc2a6ee20895daf7740))
12
+
13
+
14
+
15
+
16
+
6
17
  # [4.20.0](https://github.com/MegafonWebLab/megafon-ui/compare/@megafon/ui-shared@4.19.0...@megafon/ui-shared@4.20.0) (2023-05-23)
7
18
 
8
19
 
@@ -0,0 +1,66 @@
1
+ h1,
2
+ h2,
3
+ h3,
4
+ h4,
5
+ h5 {
6
+ margin: 0;
7
+ }
8
+ .mfui-device-mask {
9
+ position: relative;
10
+ width: 250px;
11
+ height: 550px;
12
+ overflow: hidden;
13
+ background-repeat: no-repeat;
14
+ background-size: cover;
15
+ }
16
+ .mfui-device-mask__screen-content {
17
+ position: absolute;
18
+ z-index: 0;
19
+ width: 214px;
20
+ height: 462px;
21
+ overflow: hidden;
22
+ }
23
+ .mfui-device-mask__screen-content_android {
24
+ top: 10px;
25
+ left: 10px;
26
+ width: 228px;
27
+ height: 460px;
28
+ }
29
+ .mfui-device-mask__screen-content_iphone {
30
+ top: 16px;
31
+ left: 16px;
32
+ width: 218px;
33
+ height: 469px;
34
+ }
35
+ .mfui-device-mask__screen-content_black-iphone,
36
+ .mfui-device-mask__screen-content_white-iphone {
37
+ top: 60px;
38
+ left: 17px;
39
+ width: 216px;
40
+ height: 381px;
41
+ }
42
+ .mfui-device-mask__screen-content > * {
43
+ max-width: 100%;
44
+ }
45
+ .mfui-device-mask__device {
46
+ position: absolute;
47
+ top: 0;
48
+ left: 0;
49
+ z-index: 1;
50
+ width: 100%;
51
+ height: 100%;
52
+ background-repeat: no-repeat;
53
+ background-size: 100% auto;
54
+ }
55
+ .mfui-device-mask__device_android {
56
+ background-image: url('./i/android.png');
57
+ }
58
+ .mfui-device-mask__device_iphone {
59
+ background-image: url('./i/iphone.png');
60
+ }
61
+ .mfui-device-mask__device_black-iphone {
62
+ background-image: url('./i/black-iphone.png');
63
+ }
64
+ .mfui-device-mask__device_white-iphone {
65
+ background-image: url('./i/white-iphone.png');
66
+ }
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import './DeviceMask.less';
3
+ export declare const Devices: {
4
+ readonly IPHONE: "iphone";
5
+ readonly ANDROID: "android";
6
+ readonly BLACK_IPHONE: "black-iphone";
7
+ readonly WHITE_IPHONE: "white-iphone";
8
+ };
9
+ declare type DevicesType = typeof Devices[keyof typeof Devices];
10
+ export interface IDeviceMaskProps {
11
+ device: DevicesType;
12
+ screenContent: React.ReactNode;
13
+ }
14
+ declare const DeviceMask: React.FC<IDeviceMaskProps>;
15
+ export default DeviceMask;
@@ -0,0 +1,25 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ import React from 'react';
3
+ import { cnCreate } from '@megafon/ui-helpers';
4
+ import "./DeviceMask.css";
5
+ export var Devices = {
6
+ IPHONE: 'iphone',
7
+ ANDROID: 'android',
8
+ BLACK_IPHONE: 'black-iphone',
9
+ WHITE_IPHONE: 'white-iphone'
10
+ };
11
+ var cn = cnCreate('mfui-device-mask');
12
+
13
+ var DeviceMask = function DeviceMask(_ref) {
14
+ var device = _ref.device,
15
+ screenContent = _ref.screenContent;
16
+ return /*#__PURE__*/React.createElement("div", {
17
+ className: cn()
18
+ }, /*#__PURE__*/React.createElement("div", {
19
+ className: cn('screen-content', _defineProperty({}, device, true))
20
+ }, screenContent), /*#__PURE__*/React.createElement("div", {
21
+ className: cn('device', _defineProperty({}, device, true))
22
+ }));
23
+ };
24
+
25
+ export default DeviceMask;
@@ -15,6 +15,7 @@ export { default as Card } from './components/Card/Card';
15
15
  export { default as CardsBox } from './components/CardsBox/CardsBox';
16
16
  export { default as CarouselBox } from './components/CarouselBox/CarouselBox';
17
17
  export { default as Container } from './components/Container/Container';
18
+ export { default as DeviceMask } from './components/DeviceMask/DeviceMask';
18
19
  export { default as DownloadLink } from './components/DownloadLinks/DownloadLink';
19
20
  export { default as DownloadLinks } from './components/DownloadLinks/DownloadLinks';
20
21
  export { default as FaqWrapper } from './components/FaqWrapper/FaqWrapper';
package/dist/es/index.js CHANGED
@@ -15,6 +15,7 @@ export { default as Card } from "./components/Card/Card";
15
15
  export { default as CardsBox } from "./components/CardsBox/CardsBox";
16
16
  export { default as CarouselBox } from "./components/CarouselBox/CarouselBox";
17
17
  export { default as Container } from "./components/Container/Container";
18
+ export { default as DeviceMask } from "./components/DeviceMask/DeviceMask";
18
19
  export { default as DownloadLink } from "./components/DownloadLinks/DownloadLink";
19
20
  export { default as DownloadLinks } from "./components/DownloadLinks/DownloadLinks";
20
21
  export { default as FaqWrapper } from "./components/FaqWrapper/FaqWrapper";
@@ -0,0 +1,66 @@
1
+ h1,
2
+ h2,
3
+ h3,
4
+ h4,
5
+ h5 {
6
+ margin: 0;
7
+ }
8
+ .mfui-device-mask {
9
+ position: relative;
10
+ width: 250px;
11
+ height: 550px;
12
+ overflow: hidden;
13
+ background-repeat: no-repeat;
14
+ background-size: cover;
15
+ }
16
+ .mfui-device-mask__screen-content {
17
+ position: absolute;
18
+ z-index: 0;
19
+ width: 214px;
20
+ height: 462px;
21
+ overflow: hidden;
22
+ }
23
+ .mfui-device-mask__screen-content_android {
24
+ top: 10px;
25
+ left: 10px;
26
+ width: 228px;
27
+ height: 460px;
28
+ }
29
+ .mfui-device-mask__screen-content_iphone {
30
+ top: 16px;
31
+ left: 16px;
32
+ width: 218px;
33
+ height: 469px;
34
+ }
35
+ .mfui-device-mask__screen-content_black-iphone,
36
+ .mfui-device-mask__screen-content_white-iphone {
37
+ top: 60px;
38
+ left: 17px;
39
+ width: 216px;
40
+ height: 381px;
41
+ }
42
+ .mfui-device-mask__screen-content > * {
43
+ max-width: 100%;
44
+ }
45
+ .mfui-device-mask__device {
46
+ position: absolute;
47
+ top: 0;
48
+ left: 0;
49
+ z-index: 1;
50
+ width: 100%;
51
+ height: 100%;
52
+ background-repeat: no-repeat;
53
+ background-size: 100% auto;
54
+ }
55
+ .mfui-device-mask__device_android {
56
+ background-image: url('./i/android.png');
57
+ }
58
+ .mfui-device-mask__device_iphone {
59
+ background-image: url('./i/iphone.png');
60
+ }
61
+ .mfui-device-mask__device_black-iphone {
62
+ background-image: url('./i/black-iphone.png');
63
+ }
64
+ .mfui-device-mask__device_white-iphone {
65
+ background-image: url('./i/white-iphone.png');
66
+ }
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import './DeviceMask.less';
3
+ export declare const Devices: {
4
+ readonly IPHONE: "iphone";
5
+ readonly ANDROID: "android";
6
+ readonly BLACK_IPHONE: "black-iphone";
7
+ readonly WHITE_IPHONE: "white-iphone";
8
+ };
9
+ declare type DevicesType = typeof Devices[keyof typeof Devices];
10
+ export interface IDeviceMaskProps {
11
+ device: DevicesType;
12
+ screenContent: React.ReactNode;
13
+ }
14
+ declare const DeviceMask: React.FC<IDeviceMaskProps>;
15
+ export default DeviceMask;
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = exports.Devices = void 0;
7
+
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _uiHelpers = require("@megafon/ui-helpers");
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
+
16
+ var Devices = {
17
+ IPHONE: 'iphone',
18
+ ANDROID: 'android',
19
+ BLACK_IPHONE: 'black-iphone',
20
+ WHITE_IPHONE: 'white-iphone'
21
+ };
22
+ exports.Devices = Devices;
23
+ var cn = (0, _uiHelpers.cnCreate)('mfui-device-mask');
24
+
25
+ var DeviceMask = function DeviceMask(_ref) {
26
+ var device = _ref.device,
27
+ screenContent = _ref.screenContent;
28
+ return /*#__PURE__*/_react["default"].createElement("div", {
29
+ className: cn()
30
+ }, /*#__PURE__*/_react["default"].createElement("div", {
31
+ className: cn('screen-content', (0, _defineProperty2["default"])({}, device, true))
32
+ }, screenContent), /*#__PURE__*/_react["default"].createElement("div", {
33
+ className: cn('device', (0, _defineProperty2["default"])({}, device, true))
34
+ }));
35
+ };
36
+
37
+ var _default = DeviceMask;
38
+ exports["default"] = _default;
@@ -15,6 +15,7 @@ export { default as Card } from './components/Card/Card';
15
15
  export { default as CardsBox } from './components/CardsBox/CardsBox';
16
16
  export { default as CarouselBox } from './components/CarouselBox/CarouselBox';
17
17
  export { default as Container } from './components/Container/Container';
18
+ export { default as DeviceMask } from './components/DeviceMask/DeviceMask';
18
19
  export { default as DownloadLink } from './components/DownloadLinks/DownloadLink';
19
20
  export { default as DownloadLinks } from './components/DownloadLinks/DownloadLinks';
20
21
  export { default as FaqWrapper } from './components/FaqWrapper/FaqWrapper';
package/dist/lib/index.js CHANGED
@@ -105,6 +105,12 @@ Object.defineProperty(exports, "Container", {
105
105
  return _Container["default"];
106
106
  }
107
107
  });
108
+ Object.defineProperty(exports, "DeviceMask", {
109
+ enumerable: true,
110
+ get: function get() {
111
+ return _DeviceMask["default"];
112
+ }
113
+ });
108
114
  Object.defineProperty(exports, "DownloadLink", {
109
115
  enumerable: true,
110
116
  get: function get() {
@@ -308,6 +314,8 @@ var _CarouselBox = _interopRequireDefault(require("./components/CarouselBox/Caro
308
314
 
309
315
  var _Container = _interopRequireDefault(require("./components/Container/Container"));
310
316
 
317
+ var _DeviceMask = _interopRequireDefault(require("./components/DeviceMask/DeviceMask"));
318
+
311
319
  var _DownloadLink = _interopRequireDefault(require("./components/DownloadLinks/DownloadLink"));
312
320
 
313
321
  var _DownloadLinks = _interopRequireDefault(require("./components/DownloadLinks/DownloadLinks"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@megafon/ui-shared",
3
- "version": "4.20.0",
3
+ "version": "4.20.1",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -94,5 +94,5 @@
94
94
  "prop-types": "^15.7.2",
95
95
  "swiper": "^6.5.6"
96
96
  },
97
- "gitHead": "511c2426a2f60050064028622ccbd0312198286a"
97
+ "gitHead": "a5c7e2036b6bd896caecea24f7ddab0fd3648309"
98
98
  }