@fonixtree/magic-design 1.0.210 → 1.0.212

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
  }
@@ -226,10 +226,7 @@ function (_super) {
226
226
  style: {
227
227
  color: panelProps.salesPrice.content.color
228
228
  }
229
- }), /*#__PURE__*/_react["default"].createElement("div", null, priceLabels.length > 0 && !hideLabels && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
230
- labels: priceLabels,
231
- small: true
232
- }))), ((_d = panelProps.salesProgressVisible) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement("div", {
229
+ })), ((_d = panelProps.salesProgressVisible) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement("div", {
233
230
  className: "rate-sold-wrap"
234
231
  }, /*#__PURE__*/_react["default"].createElement("div", {
235
232
  className: "rate-wrap"
@@ -35,8 +35,11 @@
35
35
  white-space: wrap;
36
36
 
37
37
  @media (min-width: 768px) {
38
- .image-label-wrap {
39
- margin-top: 6px;
38
+ .box {
39
+ line-height: 26px;
40
+ .image-label-wrap {
41
+ margin-top: 1px;
42
+ }
40
43
  }
41
44
  }
42
45
  }
@@ -68,9 +71,12 @@
68
71
  }
69
72
 
70
73
  @media (min-width: 768px) {
74
+ .price {
75
+ margin-right: 8px;
76
+ }
71
77
  .image-label-wrap {
72
- margin-left: 6px;
73
- margin-bottom: -3px;
78
+ margin-right: 8px;
79
+ margin-bottom: -5px;
74
80
  }
75
81
  }
76
82
 
@@ -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
  }
@@ -226,10 +226,7 @@ function (_super) {
226
226
  style: {
227
227
  color: panelProps.salesPrice.content.color
228
228
  }
229
- }), /*#__PURE__*/_react["default"].createElement("div", null, priceLabels.length > 0 && !hideLabels && /*#__PURE__*/_react["default"].createElement(_ImageLabel["default"], {
230
- labels: priceLabels,
231
- small: true
232
- }))), ((_d = panelProps.salesProgressVisible) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement("div", {
229
+ })), ((_d = panelProps.salesProgressVisible) === null || _d === void 0 ? void 0 : _d.open) && /*#__PURE__*/_react["default"].createElement("div", {
233
230
  className: "rate-sold-wrap"
234
231
  }, /*#__PURE__*/_react["default"].createElement("div", {
235
232
  className: "rate-wrap"
@@ -35,8 +35,11 @@
35
35
  white-space: wrap;
36
36
 
37
37
  @media (min-width: 768px) {
38
- .image-label-wrap {
39
- margin-top: 6px;
38
+ .box {
39
+ line-height: 26px;
40
+ .image-label-wrap {
41
+ margin-top: 1px;
42
+ }
40
43
  }
41
44
  }
42
45
  }
@@ -68,9 +71,12 @@
68
71
  }
69
72
 
70
73
  @media (min-width: 768px) {
74
+ .price {
75
+ margin-right: 8px;
76
+ }
71
77
  .image-label-wrap {
72
- margin-left: 6px;
73
- margin-bottom: -3px;
78
+ margin-right: 8px;
79
+ margin-bottom: -5px;
74
80
  }
75
81
  }
76
82
 
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.210",
4
+ "version": "1.0.212",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",