@micromag/screen-urbania-recommendation 0.3.651 → 0.3.659

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.
Files changed (2) hide show
  1. package/es/index.js +31 -31
  2. package/package.json +14 -14
package/es/index.js CHANGED
@@ -125,17 +125,17 @@ var UrbaniaRecommendation = function UrbaniaRecommendation(_ref) {
125
125
  setDidAnimate = _useState4[1];
126
126
  var _ref2 = visual || {},
127
127
  _ref2$image = _ref2.image,
128
- image = _ref2$image === undefined ? null : _ref2$image; // note: image can be a video
128
+ image = _ref2$image === void 0 ? null : _ref2$image; // note: image can be a video
129
129
  var _ref3 = image || {},
130
130
  _ref3$type = _ref3.type,
131
- type = _ref3$type === undefined ? null : _ref3$type,
131
+ type = _ref3$type === void 0 ? null : _ref3$type,
132
132
  _ref3$metadata = _ref3.metadata,
133
- videoMetadata = _ref3$metadata === undefined ? null : _ref3$metadata;
133
+ videoMetadata = _ref3$metadata === void 0 ? null : _ref3$metadata;
134
134
  var _ref4 = videoMetadata || {},
135
135
  _ref4$width = _ref4.width,
136
- videoWidth = _ref4$width === undefined ? 0 : _ref4$width,
136
+ videoWidth = _ref4$width === void 0 ? 0 : _ref4$width,
137
137
  _ref4$height = _ref4.height,
138
- videoHeight = _ref4$height === undefined ? 0 : _ref4$height;
138
+ videoHeight = _ref4$height === void 0 ? 0 : _ref4$height;
139
139
  var hasVisual = image !== null;
140
140
  var isVideo = type === 'video';
141
141
  var isVideoLandscape = hasVisual && isVideo && videoWidth > videoHeight;
@@ -165,12 +165,12 @@ var UrbaniaRecommendation = function UrbaniaRecommendation(_ref) {
165
165
  var _useResizeObserver = useResizeObserver(),
166
166
  textContainerRef = _useResizeObserver.ref,
167
167
  _useResizeObserver$en = _useResizeObserver.entry.contentRect,
168
- textContainerRect = _useResizeObserver$en === undefined ? null : _useResizeObserver$en;
168
+ textContainerRect = _useResizeObserver$en === void 0 ? null : _useResizeObserver$en;
169
169
  var _ref5 = textContainerRect || {},
170
170
  _ref5$width = _ref5.width,
171
- textContainerWidth = _ref5$width === undefined ? 0 : _ref5$width,
171
+ textContainerWidth = _ref5$width === void 0 ? 0 : _ref5$width,
172
172
  _ref5$height = _ref5.height,
173
- textContainerHeight = _ref5$height === undefined ? 0 : _ref5$height;
173
+ textContainerHeight = _ref5$height === void 0 ? 0 : _ref5$height;
174
174
  var _useState7 = useState(false),
175
175
  _useState8 = _slicedToArray(_useState7, 2),
176
176
  visualModalTransitioning = _useState8[0],
@@ -182,10 +182,10 @@ var UrbaniaRecommendation = function UrbaniaRecommendation(_ref) {
182
182
  var visualModalClosed = !visualModalTransitioning && !visualModalOpened;
183
183
  var _ref6 = background || {},
184
184
  _ref6$text = _ref6.text,
185
- backgroundText = _ref6$text === undefined ? null : _ref6$text;
185
+ backgroundText = _ref6$text === void 0 ? null : _ref6$text;
186
186
  var _ref7 = backgroundText || {},
187
187
  _ref7$body = _ref7.body,
188
- backgroundTextBody = _ref7$body === undefined ? null : _ref7$body,
188
+ backgroundTextBody = _ref7$body === void 0 ? null : _ref7$body,
189
189
  backgroundTextStyle = _ref7.textStyle;
190
190
  var finalBackgroundText = useMemo(function () {
191
191
  function distributeTextEqually(text) {
@@ -304,14 +304,14 @@ var UrbaniaRecommendation = function UrbaniaRecommendation(_ref) {
304
304
  var _useMemo = useMemo(function () {
305
305
  var _ref9 = title || {},
306
306
  _ref9$textStyle = _ref9.textStyle,
307
- finalTitleTextStyle = _ref9$textStyle === undefined ? null : _ref9$textStyle;
307
+ finalTitleTextStyle = _ref9$textStyle === void 0 ? null : _ref9$textStyle;
308
308
  var _ref10 = finalTitleTextStyle || {},
309
309
  _ref10$color = _ref10.color,
310
- titleStyleColor = _ref10$color === undefined ? null : _ref10$color,
310
+ titleStyleColor = _ref10$color === void 0 ? null : _ref10$color,
311
311
  _ref10$fontFamily = _ref10.fontFamily,
312
- titleFontFamily = _ref10$fontFamily === undefined ? null : _ref10$fontFamily,
312
+ titleFontFamily = _ref10$fontFamily === void 0 ? null : _ref10$fontFamily,
313
313
  _ref10$fontStyle = _ref10.fontStyle,
314
- titleFontStyles = _ref10$fontStyle === undefined ? null : _ref10$fontStyle;
314
+ titleFontStyles = _ref10$fontStyle === void 0 ? null : _ref10$fontStyle;
315
315
  var finalTitleColor = getColorAsString(titleStyleColor);
316
316
  var finalTitleFontWeight = titleFontFamily === null ? 700 : null;
317
317
  var finalTextTransform = titleFontFamily === null ? 'uppercase' : null;
@@ -320,61 +320,61 @@ var UrbaniaRecommendation = function UrbaniaRecommendation(_ref) {
320
320
  }) : titleFontStyles;
321
321
  var _ref11 = category || {},
322
322
  _ref11$textStyle = _ref11.textStyle,
323
- finalCategoryTextStyle = _ref11$textStyle === undefined ? null : _ref11$textStyle;
323
+ finalCategoryTextStyle = _ref11$textStyle === void 0 ? null : _ref11$textStyle;
324
324
  var _ref12 = finalCategoryTextStyle || {},
325
325
  _ref12$fontFamily = _ref12.fontFamily,
326
- categoryFontFamily = _ref12$fontFamily === undefined ? null : _ref12$fontFamily,
326
+ categoryFontFamily = _ref12$fontFamily === void 0 ? null : _ref12$fontFamily,
327
327
  _ref12$fontStyle = _ref12.fontStyle,
328
- categoryFontStyles = _ref12$fontStyle === undefined ? null : _ref12$fontStyle;
328
+ categoryFontStyles = _ref12$fontStyle === void 0 ? null : _ref12$fontStyle;
329
329
  var finalCategoryFontWeight = categoryFontFamily === null ? 900 : null;
330
330
  var finalCategoryFontStyle = categoryFontFamily === null ? _objectSpread(_objectSpread({}, categoryFontStyles), {}, {
331
331
  transform: 'uppercase'
332
332
  }) : categoryFontStyles;
333
333
  var _ref13 = description || {},
334
334
  _ref13$textStyle = _ref13.textStyle,
335
- finalDescriptionTextStyle = _ref13$textStyle === undefined ? null : _ref13$textStyle;
335
+ finalDescriptionTextStyle = _ref13$textStyle === void 0 ? null : _ref13$textStyle;
336
336
  var _ref14 = finalDescriptionTextStyle || {},
337
337
  _ref14$fontFamily = _ref14.fontFamily,
338
- descriptionFontFamily = _ref14$fontFamily === undefined ? null : _ref14$fontFamily;
338
+ descriptionFontFamily = _ref14$fontFamily === void 0 ? null : _ref14$fontFamily;
339
339
  var finalDescriptionFontWeight = descriptionFontFamily === null ? 300 : null;
340
340
  var _ref15 = date || {},
341
341
  _ref15$textStyle = _ref15.textStyle,
342
- finalDateTextStyle = _ref15$textStyle === undefined ? null : _ref15$textStyle;
342
+ finalDateTextStyle = _ref15$textStyle === void 0 ? null : _ref15$textStyle;
343
343
  var _ref16 = finalDateTextStyle || {},
344
344
  _ref16$fontFamily = _ref16.fontFamily,
345
- dateFontFamily = _ref16$fontFamily === undefined ? null : _ref16$fontFamily,
345
+ dateFontFamily = _ref16$fontFamily === void 0 ? null : _ref16$fontFamily,
346
346
  _ref16$fontStyle = _ref16.fontStyle,
347
- dateFontStyles = _ref16$fontStyle === undefined ? null : _ref16$fontStyle;
347
+ dateFontStyles = _ref16$fontStyle === void 0 ? null : _ref16$fontStyle;
348
348
  var finalDateFontStyle = dateFontFamily === null ? _objectSpread(_objectSpread({}, dateFontStyles), {}, {
349
349
  transform: 'uppercase'
350
350
  }) : dateFontStyles;
351
351
  var _ref17 = location || {},
352
352
  _ref17$textStyle = _ref17.textStyle,
353
- finalLocationTextStyle = _ref17$textStyle === undefined ? null : _ref17$textStyle;
353
+ finalLocationTextStyle = _ref17$textStyle === void 0 ? null : _ref17$textStyle;
354
354
  var _ref18 = finalLocationTextStyle || {},
355
355
  _ref18$fontFamily = _ref18.fontFamily,
356
- locationFontFamily = _ref18$fontFamily === undefined ? null : _ref18$fontFamily,
356
+ locationFontFamily = _ref18$fontFamily === void 0 ? null : _ref18$fontFamily,
357
357
  _ref18$fontStyle = _ref18.fontStyle,
358
- locationFontStyles = _ref18$fontStyle === undefined ? null : _ref18$fontStyle;
358
+ locationFontStyles = _ref18$fontStyle === void 0 ? null : _ref18$fontStyle;
359
359
  var finalLocationFontStyle = locationFontFamily === null ? _objectSpread(_objectSpread({}, locationFontStyles), {}, {
360
360
  transform: 'uppercase'
361
361
  }) : locationFontStyles;
362
362
  var _ref19 = sponsor || {},
363
363
  _ref19$textStyle = _ref19.textStyle,
364
- finalSponsorTextStyle = _ref19$textStyle === undefined ? null : _ref19$textStyle;
364
+ finalSponsorTextStyle = _ref19$textStyle === void 0 ? null : _ref19$textStyle;
365
365
  var _ref20 = finalSponsorTextStyle || {},
366
366
  _ref20$fontFamily = _ref20.fontFamily,
367
- sponsorFontFamily = _ref20$fontFamily === undefined ? null : _ref20$fontFamily,
367
+ sponsorFontFamily = _ref20$fontFamily === void 0 ? null : _ref20$fontFamily,
368
368
  _ref20$fontStyle = _ref20.fontStyle,
369
- sponsorFontStyles = _ref20$fontStyle === undefined ? null : _ref20$fontStyle;
369
+ sponsorFontStyles = _ref20$fontStyle === void 0 ? null : _ref20$fontStyle;
370
370
  var finalSponsorFontStyle = sponsorFontFamily === null ? _objectSpread(_objectSpread({}, sponsorFontStyles), {}, {
371
371
  transform: 'uppercase'
372
372
  }) : sponsorFontStyles;
373
373
  var _ref21 = backgroundTextStyle || {},
374
374
  _ref21$fontFamily = _ref21.fontFamily,
375
- backgroundFontFamily = _ref21$fontFamily === undefined ? null : _ref21$fontFamily,
375
+ backgroundFontFamily = _ref21$fontFamily === void 0 ? null : _ref21$fontFamily,
376
376
  _ref21$fontStyle = _ref21.fontStyle,
377
- backgroundFontStyles = _ref21$fontStyle === undefined ? null : _ref21$fontStyle;
377
+ backgroundFontStyles = _ref21$fontStyle === void 0 ? null : _ref21$fontStyle;
378
378
  var finalBackgroundFontStyle = backgroundFontFamily === null ? _objectSpread(_objectSpread({}, backgroundFontStyles), {}, {
379
379
  transform: 'uppercase'
380
380
  }) : backgroundFontStyles;
@@ -417,7 +417,7 @@ var UrbaniaRecommendation = function UrbaniaRecommendation(_ref) {
417
417
  var layoutStyle = !isPlaceholder ? getStyleFromBox(cardBoxStyle) : null;
418
418
  var _ref22 = layoutStyle || {},
419
419
  _ref22$borderRadius = _ref22.borderRadius,
420
- layoutBorderRadius = _ref22$borderRadius === undefined ? null : _ref22$borderRadius;
420
+ layoutBorderRadius = _ref22$borderRadius === void 0 ? null : _ref22$borderRadius;
421
421
  var withoutCorners = layoutBorderRadius === 0;
422
422
  var finalBorderColor = useMemo(function () {
423
423
  return lineColor !== null ? getColorAsString(lineColor) : titleColor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/screen-urbania-recommendation",
3
- "version": "0.3.651",
3
+ "version": "0.3.659",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -60,18 +60,18 @@
60
60
  },
61
61
  "dependencies": {
62
62
  "@babel/runtime": "^7.13.10",
63
- "@micromag/core": "^0.3.651",
64
- "@micromag/element-background": "^0.3.651",
65
- "@micromag/element-button": "^0.3.651",
66
- "@micromag/element-container": "^0.3.651",
67
- "@micromag/element-footer": "^0.3.651",
68
- "@micromag/element-header": "^0.3.651",
69
- "@micromag/element-heading": "^0.3.651",
70
- "@micromag/element-layout": "^0.3.651",
71
- "@micromag/element-scroll": "^0.3.651",
72
- "@micromag/element-text": "^0.3.651",
73
- "@micromag/element-visual": "^0.3.651",
74
- "@micromag/transforms": "^0.3.651",
63
+ "@micromag/core": "^0.3.659",
64
+ "@micromag/element-background": "^0.3.659",
65
+ "@micromag/element-button": "^0.3.659",
66
+ "@micromag/element-container": "^0.3.659",
67
+ "@micromag/element-footer": "^0.3.659",
68
+ "@micromag/element-header": "^0.3.659",
69
+ "@micromag/element-heading": "^0.3.659",
70
+ "@micromag/element-layout": "^0.3.659",
71
+ "@micromag/element-scroll": "^0.3.659",
72
+ "@micromag/element-text": "^0.3.659",
73
+ "@micromag/element-visual": "^0.3.659",
74
+ "@micromag/transforms": "^0.3.659",
75
75
  "classnames": "^2.2.6",
76
76
  "lodash": "^4.17.21",
77
77
  "prop-types": "^15.7.2",
@@ -82,5 +82,5 @@
82
82
  "access": "public",
83
83
  "registry": "https://registry.npmjs.org/"
84
84
  },
85
- "gitHead": "9639dccc046f7adfe9673f53ede77360b8b75d51"
85
+ "gitHead": "7c13dad69a7e377cd2f900d95cb95694a3a8fcbb"
86
86
  }