@fonixtree/magic-design 1.0.209 → 1.0.211

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.
@@ -13,6 +13,8 @@ var _react = _interopRequireWildcard(require("react"));
13
13
 
14
14
  require("./index.less");
15
15
 
16
+ var _coreUtil = require("../../../../utils/coreUtil");
17
+
16
18
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
19
 
18
20
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
@@ -71,14 +73,14 @@ function (_super) {
71
73
  return /*#__PURE__*/_react["default"].createElement("img", {
72
74
  key: label.imgUrl || label.labelPictureUrl,
73
75
  alt: "img",
74
- className: (0, _classnames["default"])('image-label-wrap', 'img', (_a = {}, _a["position-" + label.position] = true, _a.small = small, _a)),
76
+ className: (0, _classnames["default"])('image-label-wrap', 'img', (_a = {}, _a["position-" + label.position] = true, _a.small = small, _a.isPc = (0, _coreUtil.isPc)(), _a)),
75
77
  src: label.imgUrl || label.labelPictureUrl
76
78
  });
77
79
  }
78
80
 
79
81
  return /*#__PURE__*/_react["default"].createElement("div", {
80
82
  key: label.labelName,
81
- className: (0, _classnames["default"])('image-label-wrap', 'label', (_b = {}, _b["position-" + label.position] = true, _b))
83
+ className: (0, _classnames["default"])('image-label-wrap', 'label', (_b = {}, _b["position-" + label.position] = true, _b.isPc = (0, _coreUtil.isPc)(), _b))
82
84
  }, label.labelName);
83
85
  });
84
86
  };
@@ -11,17 +11,6 @@
11
11
  }
12
12
  }
13
13
 
14
- @media (min-width: 768px) {
15
- &.img {
16
- max-width: 75%;
17
- max-height: 42px;
18
-
19
- &.small {
20
- max-height: 42px;
21
- }
22
- }
23
- }
24
-
25
14
  &.label {
26
15
  max-width: 100%;
27
16
  overflow: hidden;
@@ -74,4 +63,24 @@
74
63
  display: block;
75
64
  height: 16px;
76
65
  }
66
+
67
+ &.isPc {
68
+ &.img {
69
+ max-width: 75%;
70
+ max-height: 42px;
71
+
72
+ &.small {
73
+ max-height: 42px;
74
+ }
75
+ }
76
+ &.position-6 {
77
+ height: 24px;
78
+ max-width: 100%;
79
+ }
80
+
81
+ &.position-7 {
82
+ max-width: 100%;
83
+ height: 24px;
84
+ }
85
+ }
77
86
  }
@@ -217,7 +217,7 @@ function (_super) {
217
217
  text: _price
218
218
  }),
219
219
  readonly: true
220
- }), priceLabels.length > 0 && !hideLabels && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
220
+ })), /*#__PURE__*/_react["default"].createElement("div", null, priceLabels.length > 0 && !hideLabels && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
221
221
  labels: priceLabels,
222
222
  small: true
223
223
  })), panelProps.salesPrice.open && oldPrice && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
@@ -33,6 +33,15 @@
33
33
  line-height: 24px;
34
34
  height: 48px;
35
35
  white-space: wrap;
36
+
37
+ @media (min-width: 768px) {
38
+ .box {
39
+ line-height: 26px;
40
+ .image-label-wrap {
41
+ margin-top: 1px;
42
+ }
43
+ }
44
+ }
36
45
  }
37
46
 
38
47
  .price-wrap {
@@ -61,6 +70,16 @@
61
70
  width: fit-content;
62
71
  }
63
72
 
73
+ @media (min-width: 768px) {
74
+ .price {
75
+ margin-right: 8px;
76
+ }
77
+ .image-label-wrap {
78
+ margin-right: 8px;
79
+ margin-bottom: -5px;
80
+ }
81
+ }
82
+
64
83
  }
65
84
 
66
85
  .rate-sold-wrap {
@@ -13,6 +13,8 @@ var _react = _interopRequireWildcard(require("react"));
13
13
 
14
14
  require("./index.less");
15
15
 
16
+ var _coreUtil = require("../../../../utils/coreUtil");
17
+
16
18
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
17
19
 
18
20
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
@@ -71,14 +73,14 @@ function (_super) {
71
73
  return /*#__PURE__*/_react["default"].createElement("img", {
72
74
  key: label.imgUrl || label.labelPictureUrl,
73
75
  alt: "img",
74
- className: (0, _classnames["default"])('image-label-wrap', 'img', (_a = {}, _a["position-" + label.position] = true, _a.small = small, _a)),
76
+ className: (0, _classnames["default"])('image-label-wrap', 'img', (_a = {}, _a["position-" + label.position] = true, _a.small = small, _a.isPc = (0, _coreUtil.isPc)(), _a)),
75
77
  src: label.imgUrl || label.labelPictureUrl
76
78
  });
77
79
  }
78
80
 
79
81
  return /*#__PURE__*/_react["default"].createElement("div", {
80
82
  key: label.labelName,
81
- className: (0, _classnames["default"])('image-label-wrap', 'label', (_b = {}, _b["position-" + label.position] = true, _b))
83
+ className: (0, _classnames["default"])('image-label-wrap', 'label', (_b = {}, _b["position-" + label.position] = true, _b.isPc = (0, _coreUtil.isPc)(), _b))
82
84
  }, label.labelName);
83
85
  });
84
86
  };
@@ -11,17 +11,6 @@
11
11
  }
12
12
  }
13
13
 
14
- @media (min-width: 768px) {
15
- &.img {
16
- max-width: 75%;
17
- max-height: 42px;
18
-
19
- &.small {
20
- max-height: 42px;
21
- }
22
- }
23
- }
24
-
25
14
  &.label {
26
15
  max-width: 100%;
27
16
  overflow: hidden;
@@ -74,4 +63,24 @@
74
63
  display: block;
75
64
  height: 16px;
76
65
  }
66
+
67
+ &.isPc {
68
+ &.img {
69
+ max-width: 75%;
70
+ max-height: 42px;
71
+
72
+ &.small {
73
+ max-height: 42px;
74
+ }
75
+ }
76
+ &.position-6 {
77
+ height: 24px;
78
+ max-width: 100%;
79
+ }
80
+
81
+ &.position-7 {
82
+ max-width: 100%;
83
+ height: 24px;
84
+ }
85
+ }
77
86
  }
@@ -217,7 +217,7 @@ function (_super) {
217
217
  text: _price
218
218
  }),
219
219
  readonly: true
220
- }), priceLabels.length > 0 && !hideLabels && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
220
+ })), /*#__PURE__*/_react["default"].createElement("div", null, priceLabels.length > 0 && !hideLabels && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
221
221
  labels: priceLabels,
222
222
  small: true
223
223
  })), panelProps.salesPrice.open && oldPrice && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
@@ -33,6 +33,15 @@
33
33
  line-height: 24px;
34
34
  height: 48px;
35
35
  white-space: wrap;
36
+
37
+ @media (min-width: 768px) {
38
+ .box {
39
+ line-height: 26px;
40
+ .image-label-wrap {
41
+ margin-top: 1px;
42
+ }
43
+ }
44
+ }
36
45
  }
37
46
 
38
47
  .price-wrap {
@@ -61,6 +70,16 @@
61
70
  width: fit-content;
62
71
  }
63
72
 
73
+ @media (min-width: 768px) {
74
+ .price {
75
+ margin-right: 8px;
76
+ }
77
+ .image-label-wrap {
78
+ margin-right: 8px;
79
+ margin-bottom: -5px;
80
+ }
81
+ }
82
+
64
83
  }
65
84
 
66
85
  .rate-sold-wrap {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "1.0.209",
4
+ "version": "1.0.211",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",