@micromag/screen-quote 0.2.337 → 0.2.355
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/es/index.js +4 -4
- package/lib/index.js +29 -28
- package/package.json +14 -14
package/es/index.js
CHANGED
|
@@ -135,11 +135,12 @@ var QuoteScreen = function QuoteScreen(_ref) {
|
|
|
135
135
|
return /*#__PURE__*/React.createElement("div", {
|
|
136
136
|
className: classNames([styles.container, (_ref3 = {}, _defineProperty(_ref3, className, className), _defineProperty(_ref3, styles.isPlaceholder, isPlaceholder), _ref3)]),
|
|
137
137
|
"data-screen-ready": true
|
|
138
|
-
}, !isPlaceholder ? /*#__PURE__*/React.createElement(Background,
|
|
138
|
+
}, !isPlaceholder ? /*#__PURE__*/React.createElement(Background, {
|
|
139
|
+
background: background,
|
|
139
140
|
width: width,
|
|
140
141
|
height: height,
|
|
141
142
|
playing: backgroundPlaying
|
|
142
|
-
})
|
|
143
|
+
}) : null, /*#__PURE__*/React.createElement(Container, {
|
|
143
144
|
width: width,
|
|
144
145
|
height: height
|
|
145
146
|
}, /*#__PURE__*/React.createElement(Layout, {
|
|
@@ -272,5 +273,4 @@ var definition = {
|
|
|
272
273
|
}]
|
|
273
274
|
};
|
|
274
275
|
|
|
275
|
-
export default
|
|
276
|
-
export { QuoteScreen$1 as QuoteScreen };
|
|
276
|
+
export { QuoteScreen$1 as QuoteScreen, definition as default };
|
package/lib/index.js
CHANGED
|
@@ -39,16 +39,16 @@ var _toConsumableArray__default = /*#__PURE__*/_interopDefaultLegacy(_toConsumab
|
|
|
39
39
|
var styles = {"container":"micromag-screen-quote-container","disabled":"micromag-screen-quote-disabled","hidden":"micromag-screen-quote-hidden","placeholder":"micromag-screen-quote-placeholder","content":"micromag-screen-quote-content","emptyAuthor":"micromag-screen-quote-emptyAuthor","emptyQuote":"micromag-screen-quote-emptyQuote","quote":"micromag-screen-quote-quote","withMargin":"micromag-screen-quote-withMargin","isPlaceholder":"micromag-screen-quote-isPlaceholder","layout":"micromag-screen-quote-layout"};
|
|
40
40
|
|
|
41
41
|
var propTypes = {
|
|
42
|
-
layout: PropTypes__default[
|
|
42
|
+
layout: PropTypes__default["default"].oneOf(['top', 'middle', 'bottom', 'split']),
|
|
43
43
|
quote: core.PropTypes.textElement,
|
|
44
44
|
author: core.PropTypes.textElement,
|
|
45
|
-
spacing: PropTypes__default[
|
|
45
|
+
spacing: PropTypes__default["default"].number,
|
|
46
46
|
background: core.PropTypes.backgroundElement,
|
|
47
47
|
callToAction: core.PropTypes.callToAction,
|
|
48
|
-
current: PropTypes__default[
|
|
48
|
+
current: PropTypes__default["default"].bool,
|
|
49
49
|
transitions: core.PropTypes.transitions,
|
|
50
|
-
transitionStagger: PropTypes__default[
|
|
51
|
-
className: PropTypes__default[
|
|
50
|
+
transitionStagger: PropTypes__default["default"].number,
|
|
51
|
+
className: PropTypes__default["default"].string
|
|
52
52
|
};
|
|
53
53
|
var defaultProps = {
|
|
54
54
|
layout: 'top',
|
|
@@ -104,12 +104,12 @@ var QuoteScreen = function QuoteScreen(_ref) {
|
|
|
104
104
|
var transitionDisabled = isStatic || isCapture || isPlaceholder || isPreview || isEdit;
|
|
105
105
|
var backgroundPlaying = current && (isView || isEdit);
|
|
106
106
|
var hasCallToAction = callToAction !== null && callToAction.active === true;
|
|
107
|
-
var items = [!isPlaceholder && hasCallToAction && isMiddleLayout ? /*#__PURE__*/React__default[
|
|
107
|
+
var items = [!isPlaceholder && hasCallToAction && isMiddleLayout ? /*#__PURE__*/React__default["default"].createElement(Layout.Spacer, {
|
|
108
108
|
key: "spacer-cta-top"
|
|
109
|
-
}) : null, /*#__PURE__*/React__default[
|
|
109
|
+
}) : null, /*#__PURE__*/React__default["default"].createElement(components.ScreenElement, {
|
|
110
110
|
key: "quote",
|
|
111
111
|
placeholder: "quote",
|
|
112
|
-
emptyLabel: /*#__PURE__*/React__default[
|
|
112
|
+
emptyLabel: /*#__PURE__*/React__default["default"].createElement(reactIntl.FormattedMessage, {
|
|
113
113
|
id: "CrzYgw",
|
|
114
114
|
defaultMessage: [{
|
|
115
115
|
"type": 0,
|
|
@@ -118,14 +118,14 @@ var QuoteScreen = function QuoteScreen(_ref) {
|
|
|
118
118
|
}),
|
|
119
119
|
emptyClassName: styles.emptyQuote,
|
|
120
120
|
isEmpty: !hasQuote
|
|
121
|
-
}, hasQuote ? /*#__PURE__*/React__default[
|
|
122
|
-
className: classNames__default[
|
|
123
|
-
}, quote)) : null), isSplitted && /*#__PURE__*/React__default[
|
|
121
|
+
}, hasQuote ? /*#__PURE__*/React__default["default"].createElement(Quote__default["default"], Object.assign({
|
|
122
|
+
className: classNames__default["default"]([styles.quote, _defineProperty__default["default"]({}, styles.withMargin, quoteWithMargin)])
|
|
123
|
+
}, quote)) : null), isSplitted && /*#__PURE__*/React__default["default"].createElement(Layout.Spacer, {
|
|
124
124
|
key: "spacer"
|
|
125
|
-
}), /*#__PURE__*/React__default[
|
|
125
|
+
}), /*#__PURE__*/React__default["default"].createElement(components.ScreenElement, {
|
|
126
126
|
key: "author",
|
|
127
127
|
placeholder: "subtitle",
|
|
128
|
-
emptyLabel: /*#__PURE__*/React__default[
|
|
128
|
+
emptyLabel: /*#__PURE__*/React__default["default"].createElement(reactIntl.FormattedMessage, {
|
|
129
129
|
id: "xYqGzM",
|
|
130
130
|
defaultMessage: [{
|
|
131
131
|
"type": 0,
|
|
@@ -134,34 +134,35 @@ var QuoteScreen = function QuoteScreen(_ref) {
|
|
|
134
134
|
}),
|
|
135
135
|
emptyClassName: styles.emptyAuthor,
|
|
136
136
|
isEmpty: !hasAuthor
|
|
137
|
-
}, hasAuthor ? /*#__PURE__*/React__default[
|
|
137
|
+
}, hasAuthor ? /*#__PURE__*/React__default["default"].createElement(Text__default["default"], Object.assign({
|
|
138
138
|
className: styles.author
|
|
139
|
-
}, author)) : null), !isPlaceholder && hasCallToAction && (isTopLayout || isMiddleLayout) ? /*#__PURE__*/React__default[
|
|
139
|
+
}, author)) : null), !isPlaceholder && hasCallToAction && (isTopLayout || isMiddleLayout) ? /*#__PURE__*/React__default["default"].createElement(Layout.Spacer, {
|
|
140
140
|
key: "spacer-cta-bottom"
|
|
141
|
-
}) : null, !isPlaceholder && hasCallToAction ? /*#__PURE__*/React__default[
|
|
141
|
+
}) : null, !isPlaceholder && hasCallToAction ? /*#__PURE__*/React__default["default"].createElement("div", {
|
|
142
142
|
style: {
|
|
143
143
|
margin: -spacing,
|
|
144
144
|
marginTop: 0
|
|
145
145
|
},
|
|
146
146
|
key: "call-to-action"
|
|
147
|
-
}, /*#__PURE__*/React__default[
|
|
147
|
+
}, /*#__PURE__*/React__default["default"].createElement(CallToAction__default["default"], {
|
|
148
148
|
callToAction: callToAction,
|
|
149
149
|
animationDisabled: isPreview,
|
|
150
150
|
focusable: current && isView
|
|
151
151
|
})) : null].filter(function (el) {
|
|
152
152
|
return el !== null;
|
|
153
153
|
});
|
|
154
|
-
return /*#__PURE__*/React__default[
|
|
155
|
-
className: classNames__default[
|
|
154
|
+
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
155
|
+
className: classNames__default["default"]([styles.container, (_ref3 = {}, _defineProperty__default["default"](_ref3, className, className), _defineProperty__default["default"](_ref3, styles.isPlaceholder, isPlaceholder), _ref3)]),
|
|
156
156
|
"data-screen-ready": true
|
|
157
|
-
}, !isPlaceholder ? /*#__PURE__*/React__default[
|
|
157
|
+
}, !isPlaceholder ? /*#__PURE__*/React__default["default"].createElement(Background__default["default"], {
|
|
158
|
+
background: background,
|
|
158
159
|
width: width,
|
|
159
160
|
height: height,
|
|
160
161
|
playing: backgroundPlaying
|
|
161
|
-
})
|
|
162
|
+
}) : null, /*#__PURE__*/React__default["default"].createElement(Container__default["default"], {
|
|
162
163
|
width: width,
|
|
163
164
|
height: height
|
|
164
|
-
}, /*#__PURE__*/React__default[
|
|
165
|
+
}, /*#__PURE__*/React__default["default"].createElement(Layout__default["default"], {
|
|
165
166
|
className: styles.layout,
|
|
166
167
|
fullscreen: true,
|
|
167
168
|
verticalAlign: verticalAlign,
|
|
@@ -169,7 +170,7 @@ var QuoteScreen = function QuoteScreen(_ref) {
|
|
|
169
170
|
padding: spacing,
|
|
170
171
|
paddingTop: (menuOverScreen && !isPreview ? menuSize : 0) + spacing
|
|
171
172
|
} : null
|
|
172
|
-
}, /*#__PURE__*/React__default[
|
|
173
|
+
}, /*#__PURE__*/React__default["default"].createElement(components.TransitionsStagger, {
|
|
173
174
|
transitions: transitions,
|
|
174
175
|
stagger: transitionStagger,
|
|
175
176
|
disabled: transitionDisabled,
|
|
@@ -179,7 +180,7 @@ var QuoteScreen = function QuoteScreen(_ref) {
|
|
|
179
180
|
|
|
180
181
|
QuoteScreen.propTypes = propTypes;
|
|
181
182
|
QuoteScreen.defaultProps = defaultProps;
|
|
182
|
-
var QuoteScreen$1 = /*#__PURE__*/React__default[
|
|
183
|
+
var QuoteScreen$1 = /*#__PURE__*/React__default["default"].memo(QuoteScreen);
|
|
183
184
|
|
|
184
185
|
var transform = function transform(newStory, _ref) {
|
|
185
186
|
var quote = _ref.quote,
|
|
@@ -193,12 +194,12 @@ var transform = function transform(newStory, _ref) {
|
|
|
193
194
|
authorStory = _Author.story,
|
|
194
195
|
authorComponent = _Author.component;
|
|
195
196
|
|
|
196
|
-
var _Container = appleNews.Container(authorStory, [].concat(_toConsumableArray__default[
|
|
197
|
+
var _Container = appleNews.Container(authorStory, [].concat(_toConsumableArray__default["default"](quoteComponent ? [quoteComponent] : []), _toConsumableArray__default["default"](authorComponent ? [authorComponent] : []))),
|
|
197
198
|
containerStory = _Container.story,
|
|
198
199
|
containerComponent = _Container.component;
|
|
199
200
|
|
|
200
|
-
return _objectSpread__default[
|
|
201
|
-
components: [].concat(_toConsumableArray__default[
|
|
201
|
+
return _objectSpread__default["default"](_objectSpread__default["default"]({}, containerStory), {}, {
|
|
202
|
+
components: [].concat(_toConsumableArray__default["default"](newStory.components || []), _toConsumableArray__default["default"](containerComponent ? [containerComponent] : []))
|
|
202
203
|
});
|
|
203
204
|
};
|
|
204
205
|
|
|
@@ -292,4 +293,4 @@ var definition = {
|
|
|
292
293
|
};
|
|
293
294
|
|
|
294
295
|
exports.QuoteScreen = QuoteScreen$1;
|
|
295
|
-
exports
|
|
296
|
+
exports["default"] = definition;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-quote",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.355",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -40,23 +40,23 @@
|
|
|
40
40
|
"prepare": "../../scripts/prepare-package.sh"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
|
-
"react": "^16.8.0",
|
|
44
|
-
"react-dom": "^16.8.0"
|
|
43
|
+
"react": "^16.8.0 || ^17.0.0",
|
|
44
|
+
"react-dom": "^16.8.0 || ^17.0.0"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"react": "^16.8.0",
|
|
48
|
-
"react-dom": "^16.8.0"
|
|
47
|
+
"react": "^16.8.0 || ^17.0.0",
|
|
48
|
+
"react-dom": "^16.8.0 || ^17.0.0"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.13.10",
|
|
52
|
-
"@micromag/core": "^0.2.
|
|
53
|
-
"@micromag/element-background": "^0.2.
|
|
54
|
-
"@micromag/element-call-to-action": "^0.2.
|
|
55
|
-
"@micromag/element-container": "^0.2.
|
|
56
|
-
"@micromag/element-layout": "^0.2.
|
|
57
|
-
"@micromag/element-quote": "^0.2.
|
|
58
|
-
"@micromag/element-text": "^0.2.
|
|
59
|
-
"@micromag/transforms": "^0.2.
|
|
52
|
+
"@micromag/core": "^0.2.354",
|
|
53
|
+
"@micromag/element-background": "^0.2.355",
|
|
54
|
+
"@micromag/element-call-to-action": "^0.2.354",
|
|
55
|
+
"@micromag/element-container": "^0.2.354",
|
|
56
|
+
"@micromag/element-layout": "^0.2.354",
|
|
57
|
+
"@micromag/element-quote": "^0.2.354",
|
|
58
|
+
"@micromag/element-text": "^0.2.354",
|
|
59
|
+
"@micromag/transforms": "^0.2.354",
|
|
60
60
|
"classnames": "^2.2.6",
|
|
61
61
|
"lodash": "^4.17.20",
|
|
62
62
|
"prop-types": "^15.7.2",
|
|
@@ -66,5 +66,5 @@
|
|
|
66
66
|
"publishConfig": {
|
|
67
67
|
"access": "public"
|
|
68
68
|
},
|
|
69
|
-
"gitHead": "
|
|
69
|
+
"gitHead": "6544d507c14d0ad92cec7626f0d73aebcc2024c0"
|
|
70
70
|
}
|