@micromag/screen-title 0.3.5 → 0.3.8

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.
@@ -1 +1 @@
1
- .micromag-screen-title-container{position:relative;width:100%;height:100%;overflow:hidden}.micromag-screen-title-disabled.micromag-screen-title-container{overflow:hidden;pointer-events:none}.micromag-screen-title-hidden.micromag-screen-title-container{display:none;visibility:hidden}.micromag-screen-title-placeholder.micromag-screen-title-container .micromag-screen-title-content{position:relative;padding:6px}.micromag-screen-title-container .micromag-screen-title-emptyDescription,.micromag-screen-title-container .micromag-screen-title-emptySubtitle,.micromag-screen-title-container .micromag-screen-title-emptyTitle{margin:5px auto;border:2px dashed #343434;color:#343434;width:100%;margin:10px auto}.micromag-screen-title-container .micromag-screen-title-emptyTitle{height:100px}.micromag-screen-title-container .micromag-screen-title-emptyDescription,.micromag-screen-title-container .micromag-screen-title-emptySubtitle{height:50px}.micromag-screen-title-container .micromag-screen-title-subtitle.micromag-screen-title-withMargin,.micromag-screen-title-container .micromag-screen-title-title.micromag-screen-title-withMargin{margin-bottom:.2em}.micromag-screen-title-container .micromag-screen-title-box{padding:.5em}.micromag-screen-title-container.micromag-screen-title-isPlaceholder .micromag-screen-title-layout{padding:10px}.micromag-screen-title-container.micromag-screen-title-isPlaceholder .micromag-screen-title-box{border:2px solid rgba(28,28,28,.5)}
1
+ .micromag-screen-title-container{position:relative;width:100%;height:100%;overflow:hidden}.micromag-screen-title-disabled.micromag-screen-title-container{overflow:hidden;pointer-events:none}.micromag-screen-title-hidden.micromag-screen-title-container{display:none;visibility:hidden}.micromag-screen-title-placeholder.micromag-screen-title-container .micromag-screen-title-content{position:relative;padding:6px}.micromag-screen-title-container .micromag-screen-title-emptyDescription,.micromag-screen-title-container .micromag-screen-title-emptySubtitle,.micromag-screen-title-container .micromag-screen-title-emptyTitle{margin:5px auto;border:2px dashed #343434;color:#343434;width:100%;margin:10px auto}.micromag-screen-title-container .micromag-screen-title-emptyTitle{height:100px}.micromag-screen-title-container .micromag-screen-title-emptyDescription,.micromag-screen-title-container .micromag-screen-title-emptySubtitle{height:50px}.micromag-screen-title-container .micromag-screen-title-subtitle.micromag-screen-title-withMargin,.micromag-screen-title-container .micromag-screen-title-title.micromag-screen-title-withMargin{margin-bottom:.2em}.micromag-screen-title-container .micromag-screen-title-box{padding:.5em}.micromag-screen-title-container.micromag-screen-title-isPlaceholder .micromag-screen-title-layout{padding:10px}.micromag-screen-title-container.micromag-screen-title-isPlaceholder .micromag-screen-title-box{border:2px solid hsla(0,0%,100%,.5);mix-blend-mode:difference}
package/es/index.js CHANGED
@@ -183,7 +183,7 @@ var TitleScreen = function TitleScreen(_ref) {
183
183
  key: "spacer-cta-top"
184
184
  }) : null, withBox && !isSplitted ? /*#__PURE__*/React.createElement("div", {
185
185
  className: styles.box,
186
- style: getStyleFromBox(boxStyle)
186
+ style: isEdit || isPlaceholder || hasTitle || hasSubtitle || hasDescription ? getStyleFromBox(boxStyle) : null
187
187
  }, /*#__PURE__*/React.createElement(TransitionsStagger, {
188
188
  transitions: transitions,
189
189
  stagger: transitionStagger,
@@ -199,13 +199,13 @@ var TitleScreen = function TitleScreen(_ref) {
199
199
  }, /*#__PURE__*/React.createElement("div", {
200
200
  className: styles.box,
201
201
  key: "top",
202
- style: getStyleFromBox(boxStyle)
202
+ style: isEdit || isPlaceholder || hasTitle || withDescription && verticalAlign === 'top' && hasSubtitle ? getStyleFromBox(boxStyle) : null
203
203
  }, titleElement, withDescription && verticalAlign === 'top' ? subtitleElement : null), /*#__PURE__*/React.createElement(Spacer, {
204
204
  key: "spacer1"
205
205
  }), /*#__PURE__*/React.createElement("div", {
206
206
  className: styles.box,
207
207
  key: "bottom",
208
- style: getStyleFromBox(boxStyle)
208
+ style: isEdit || isPlaceholder || hasDescription || (!withDescription || verticalAlign === 'bottom') && hasSubtitle ? getStyleFromBox(boxStyle) : null
209
209
  }, !withDescription || verticalAlign === 'bottom' ? subtitleElement : null, descriptionElement)) : null, !withBox ? /*#__PURE__*/React.createElement(TransitionsStagger, {
210
210
  transitions: transitions,
211
211
  stagger: transitionStagger,
@@ -633,14 +633,21 @@ var definition = [{
633
633
  }, {
634
634
  type: 'fields',
635
635
  isList: true,
636
+ label: defineMessage({
637
+ id: "LOknw0",
638
+ defaultMessage: [{
639
+ "type": 0,
640
+ "value": "Styles"
641
+ }]
642
+ }),
636
643
  fields: [{
637
644
  name: 'boxStyle',
638
645
  type: 'box-style',
639
646
  label: defineMessage({
640
- id: "p1pghO",
647
+ id: "f5Yipd",
641
648
  defaultMessage: [{
642
649
  "type": 0,
643
- "value": "Box style"
650
+ "value": "Box"
644
651
  }]
645
652
  })
646
653
  }]
@@ -648,7 +655,7 @@ var definition = [{
648
655
  name: 'background',
649
656
  type: 'background',
650
657
  label: defineMessage({
651
- id: "+MPZRu",
658
+ id: "cDj1mZ",
652
659
  defaultMessage: [{
653
660
  "type": 0,
654
661
  "value": "Background"
package/lib/index.js CHANGED
@@ -204,7 +204,7 @@ var TitleScreen = function TitleScreen(_ref) {
204
204
  key: "spacer-cta-top"
205
205
  }) : null, withBox && !isSplitted ? /*#__PURE__*/React__default["default"].createElement("div", {
206
206
  className: styles.box,
207
- style: utils.getStyleFromBox(boxStyle)
207
+ style: isEdit || isPlaceholder || hasTitle || hasSubtitle || hasDescription ? utils.getStyleFromBox(boxStyle) : null
208
208
  }, /*#__PURE__*/React__default["default"].createElement(components.TransitionsStagger, {
209
209
  transitions: transitions,
210
210
  stagger: transitionStagger,
@@ -220,13 +220,13 @@ var TitleScreen = function TitleScreen(_ref) {
220
220
  }, /*#__PURE__*/React__default["default"].createElement("div", {
221
221
  className: styles.box,
222
222
  key: "top",
223
- style: utils.getStyleFromBox(boxStyle)
223
+ style: isEdit || isPlaceholder || hasTitle || withDescription && verticalAlign === 'top' && hasSubtitle ? utils.getStyleFromBox(boxStyle) : null
224
224
  }, titleElement, withDescription && verticalAlign === 'top' ? subtitleElement : null), /*#__PURE__*/React__default["default"].createElement(Layout.Spacer, {
225
225
  key: "spacer1"
226
226
  }), /*#__PURE__*/React__default["default"].createElement("div", {
227
227
  className: styles.box,
228
228
  key: "bottom",
229
- style: utils.getStyleFromBox(boxStyle)
229
+ style: isEdit || isPlaceholder || hasDescription || (!withDescription || verticalAlign === 'bottom') && hasSubtitle ? utils.getStyleFromBox(boxStyle) : null
230
230
  }, !withDescription || verticalAlign === 'bottom' ? subtitleElement : null, descriptionElement)) : null, !withBox ? /*#__PURE__*/React__default["default"].createElement(components.TransitionsStagger, {
231
231
  transitions: transitions,
232
232
  stagger: transitionStagger,
@@ -654,14 +654,21 @@ var definition = [{
654
654
  }, {
655
655
  type: 'fields',
656
656
  isList: true,
657
+ label: reactIntl.defineMessage({
658
+ id: "LOknw0",
659
+ defaultMessage: [{
660
+ "type": 0,
661
+ "value": "Styles"
662
+ }]
663
+ }),
657
664
  fields: [{
658
665
  name: 'boxStyle',
659
666
  type: 'box-style',
660
667
  label: reactIntl.defineMessage({
661
- id: "p1pghO",
668
+ id: "f5Yipd",
662
669
  defaultMessage: [{
663
670
  "type": 0,
664
- "value": "Box style"
671
+ "value": "Box"
665
672
  }]
666
673
  })
667
674
  }]
@@ -669,7 +676,7 @@ var definition = [{
669
676
  name: 'background',
670
677
  type: 'background',
671
678
  label: reactIntl.defineMessage({
672
- id: "+MPZRu",
679
+ id: "cDj1mZ",
673
680
  defaultMessage: [{
674
681
  "type": 0,
675
682
  "value": "Background"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-title",
3
- "version": "0.3.5",
3
+ "version": "0.3.8",
4
4
  "description": "",
5
5
  "keywords": [
6
6
  "javascript"
@@ -49,14 +49,14 @@
49
49
  },
50
50
  "dependencies": {
51
51
  "@babel/runtime": "^7.13.10",
52
- "@micromag/core": "^0.3.5",
53
- "@micromag/element-background": "^0.3.5",
54
- "@micromag/element-call-to-action": "^0.3.5",
55
- "@micromag/element-container": "^0.3.5",
56
- "@micromag/element-heading": "^0.3.5",
57
- "@micromag/element-layout": "^0.3.5",
58
- "@micromag/element-text": "^0.3.5",
59
- "@micromag/transforms": "^0.3.5",
52
+ "@micromag/core": "^0.3.7",
53
+ "@micromag/element-background": "^0.3.7",
54
+ "@micromag/element-call-to-action": "^0.3.7",
55
+ "@micromag/element-container": "^0.3.7",
56
+ "@micromag/element-heading": "^0.3.7",
57
+ "@micromag/element-layout": "^0.3.7",
58
+ "@micromag/element-text": "^0.3.7",
59
+ "@micromag/transforms": "^0.3.7",
60
60
  "classnames": "^2.2.6",
61
61
  "lodash": "^4.17.21",
62
62
  "prop-types": "^15.7.2",
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "gitHead": "3a617eef4e655aabe14d4eb9da5460e8f3e93d7e"
69
+ "gitHead": "599922356ec0315a45e274c32d1063f5ffb6b21f"
70
70
  }