@fonixtree/magic-design 0.0.141 → 0.0.143

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.
@@ -62,7 +62,7 @@ var __decorate = void 0 && (void 0).__decorate || function (decorators, target,
62
62
  // import './index.less';
63
63
  // less to css 在线地址 https://tool.oschina.net/less
64
64
  // css 压缩地址 https://www.runoob.com/csspack
65
- var style = '.m-text .title-wrap{font-weight:500;font-size:20px;}.m-text .sub-title{font-size:15px;color:#b7b7b7;margin-top:10px;}.m-text .group-content-wrap{width:100%;}.m-text .group-content-wrap .group-wrap-container{padding:20px;}.m-text .group-content-wrap .group-wrap{display:flex;flex-direction:column;margin-top:20px;width:100%;}.m-text .group-content-wrap .group-wrap .group-title{font-size:14px;}.m-text .group-content-wrap.col-1 .group-wrap{width:100%;}.m-text .group-content-wrap.col-2{display:grid;grid-template-columns:50% 50%;}.m-text .group-content-wrap.col-3{display:grid;grid-template-columns:33.3% 33.3% 33.3%;}.m-text .group-content-wrap.mobile{display:block;}';
65
+ var style = '.m-text{display: flex;flex-direction: column;}.m-text .title-wrap{font-weight:500;font-size:20px;}.m-text .sub-title{font-size:15px;color:#b7b7b7;margin-top:10px;}.m-text .group-content-wrap{width:100%;}.m-text .group-content-wrap .group-wrap-container{padding:20px;}.m-text .group-content-wrap .group-wrap{display:flex;flex-direction:column;margin-top:20px;width:100%;}.m-text .group-content-wrap .group-wrap .group-title{font-size:14px;}.m-text .group-content-wrap.col-1 .group-wrap{width:100%;}.m-text .group-content-wrap.col-2{display:grid;grid-template-columns:50% 50%;}.m-text .group-content-wrap.col-3{display:grid;grid-template-columns:33.3% 33.3% 33.3%;}.m-text .group-content-wrap.mobile{display:block;}';
66
66
 
67
67
  var Text =
68
68
  /** @class */
@@ -1,5 +1,7 @@
1
1
  .m-text {
2
-
2
+ display: flex;
3
+ flex-direction: column;
4
+
3
5
  .title-wrap {
4
6
  font-weight: 500;
5
7
  font-size: 20px;
@@ -264,7 +264,7 @@ function (_super) {
264
264
  break;
265
265
 
266
266
  case 'TAG':
267
- groupName = '';
267
+ groupName = panelProps.button.text;
268
268
  break;
269
269
  }
270
270
 
@@ -130,8 +130,8 @@ function compositeDecorator(WrappedComponent) {
130
130
  wrapStyle.opacity = background.opacity ? background.opacity : 1;
131
131
  } else {
132
132
  wrapStyle.backgroundImage = "url(" + background.image + ")";
133
- wrapStyle.backgroundPosition = '0px 0px';
134
- wrapStyle.backgroundSize = 'auto 100%';
133
+ wrapStyle.backgroundPosition = 'center center';
134
+ wrapStyle.backgroundSize = 'cover';
135
135
  wrapStyle.backgroundRepeat = 'no-repeat';
136
136
  }
137
137
  } // 复合组件宽度
@@ -473,7 +473,8 @@ function (_super) {
473
473
  data = _a.data,
474
474
  className = _a.className,
475
475
  readonly = _a.readonly,
476
- onTextInput = _a.onTextInput;
476
+ onTextInput = _a.onTextInput,
477
+ mode = _a.mode;
477
478
  var style = contentStyle(data.content);
478
479
 
479
480
  if (data.underline) {
@@ -501,7 +502,7 @@ function (_super) {
501
502
  return /*#__PURE__*/_react["default"].createElement("div", {
502
503
  ref: this.textRef,
503
504
  className: (0, _classnames["default"])('m-meta-text', className),
504
- contentEditable: (0, _coreUtil.isDesignMode)() && !readonly,
505
+ contentEditable: mode == 'designer' && !readonly,
505
506
  onClick: function onClick() {
506
507
  (0, _coreUtil.clickUrl)(data.content.clickUrl);
507
508
  },
@@ -62,7 +62,7 @@ var __decorate = void 0 && (void 0).__decorate || function (decorators, target,
62
62
  // import './index.less';
63
63
  // less to css 在线地址 https://tool.oschina.net/less
64
64
  // css 压缩地址 https://www.runoob.com/csspack
65
- var style = '.m-text .title-wrap{font-weight:500;font-size:20px;}.m-text .sub-title{font-size:15px;color:#b7b7b7;margin-top:10px;}.m-text .group-content-wrap{width:100%;}.m-text .group-content-wrap .group-wrap-container{padding:20px;}.m-text .group-content-wrap .group-wrap{display:flex;flex-direction:column;margin-top:20px;width:100%;}.m-text .group-content-wrap .group-wrap .group-title{font-size:14px;}.m-text .group-content-wrap.col-1 .group-wrap{width:100%;}.m-text .group-content-wrap.col-2{display:grid;grid-template-columns:50% 50%;}.m-text .group-content-wrap.col-3{display:grid;grid-template-columns:33.3% 33.3% 33.3%;}.m-text .group-content-wrap.mobile{display:block;}';
65
+ var style = '.m-text{display: flex;flex-direction: column;}.m-text .title-wrap{font-weight:500;font-size:20px;}.m-text .sub-title{font-size:15px;color:#b7b7b7;margin-top:10px;}.m-text .group-content-wrap{width:100%;}.m-text .group-content-wrap .group-wrap-container{padding:20px;}.m-text .group-content-wrap .group-wrap{display:flex;flex-direction:column;margin-top:20px;width:100%;}.m-text .group-content-wrap .group-wrap .group-title{font-size:14px;}.m-text .group-content-wrap.col-1 .group-wrap{width:100%;}.m-text .group-content-wrap.col-2{display:grid;grid-template-columns:50% 50%;}.m-text .group-content-wrap.col-3{display:grid;grid-template-columns:33.3% 33.3% 33.3%;}.m-text .group-content-wrap.mobile{display:block;}';
66
66
 
67
67
  var Text =
68
68
  /** @class */
@@ -1,5 +1,7 @@
1
1
  .m-text {
2
-
2
+ display: flex;
3
+ flex-direction: column;
4
+
3
5
  .title-wrap {
4
6
  font-weight: 500;
5
7
  font-size: 20px;
@@ -264,7 +264,7 @@ function (_super) {
264
264
  break;
265
265
 
266
266
  case 'TAG':
267
- groupName = '';
267
+ groupName = panelProps.button.text;
268
268
  break;
269
269
  }
270
270
 
@@ -130,8 +130,8 @@ function compositeDecorator(WrappedComponent) {
130
130
  wrapStyle.opacity = background.opacity ? background.opacity : 1;
131
131
  } else {
132
132
  wrapStyle.backgroundImage = "url(" + background.image + ")";
133
- wrapStyle.backgroundPosition = '0px 0px';
134
- wrapStyle.backgroundSize = 'auto 100%';
133
+ wrapStyle.backgroundPosition = 'center center';
134
+ wrapStyle.backgroundSize = 'cover';
135
135
  wrapStyle.backgroundRepeat = 'no-repeat';
136
136
  }
137
137
  } // 复合组件宽度
@@ -473,7 +473,8 @@ function (_super) {
473
473
  data = _a.data,
474
474
  className = _a.className,
475
475
  readonly = _a.readonly,
476
- onTextInput = _a.onTextInput;
476
+ onTextInput = _a.onTextInput,
477
+ mode = _a.mode;
477
478
  var style = contentStyle(data.content);
478
479
 
479
480
  if (data.underline) {
@@ -501,7 +502,7 @@ function (_super) {
501
502
  return /*#__PURE__*/_react["default"].createElement("div", {
502
503
  ref: this.textRef,
503
504
  className: (0, _classnames["default"])('m-meta-text', className),
504
- contentEditable: (0, _coreUtil.isDesignMode)() && !readonly,
505
+ contentEditable: mode == 'designer' && !readonly,
505
506
  onClick: function onClick() {
506
507
  (0, _coreUtil.clickUrl)(data.content.clickUrl);
507
508
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fonixtree/magic-design",
3
3
  "author": "Cylon Team",
4
- "version": "0.0.141",
4
+ "version": "0.0.143",
5
5
  "description": "Magic Design",
6
6
  "license": "MIT",
7
7
  "module": "es/index.js",