@meduza/ui-kit-2 0.1.47 → 0.1.49

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.
@@ -14,7 +14,6 @@ export interface ImageProps {
14
14
  height?: number;
15
15
  source?: string[];
16
16
  lazy?: boolean;
17
- fullscreen?: boolean;
18
17
  ratio?: number;
19
18
  styleContext?: string[] | string;
20
19
  }
@@ -443,8 +443,6 @@ var Image = function Image(_ref) {
443
443
  height = _ref.height,
444
444
  source = _ref.source,
445
445
  lazy = _ref.lazy,
446
- _ref$fullscreen = _ref.fullscreen,
447
- fullscreen = _ref$fullscreen === void 0 ? true : _ref$fullscreen,
448
446
  ratio = _ref.ratio,
449
447
  styleContext = _ref.styleContext;
450
448
 
@@ -456,7 +454,7 @@ var Image = function Image(_ref) {
456
454
  setIsLoaded = _useState[1];
457
455
 
458
456
  var handleClick = function handleClick() {
459
- if (!fullscreen || !lightBox || optimized && !optimized.original) {
457
+ if (!lightBox || optimized && !optimized.original) {
460
458
  return;
461
459
  }
462
460
 
@@ -473,7 +471,7 @@ var Image = function Image(_ref) {
473
471
  /* fallback w325 url until w6 was released */
474
472
 
475
473
  var fallbackSource = source && source[0] || optimized.w325 && optimized.w325['1x'] || optimized.original;
476
- var classNames = [[styles$4.root, true], [styles$4.isLoaded, isLoaded], [styles$4.fullscreen, fullscreen]];
474
+ var classNames = [[styles$4.root, true], [styles$4.isLoaded, isLoaded], [styles$4.fullscreen, lightBox && optimized && optimized.original]];
477
475
 
478
476
  if (styleContext) {
479
477
  classNames = makeStyleContext(classNames, styleContext, styles$4);
@@ -1744,11 +1742,11 @@ var GroupedBlock = function GroupedBlock(_ref) {
1744
1742
  onlyOn = _ref.block.only_on,
1745
1743
  styleContext = _ref.styleContext;
1746
1744
  var maxHeight = Math.min.apply(Math, block.data.map(function (item) {
1747
- return item.data && item.data.height || item.item.data.height;
1745
+ return item.data && item.data.height || item.item && item.item.data.height;
1748
1746
  }));
1749
1747
  var normalizedBoxesWidth = block.data.map(function (item) {
1750
- var width = item.data && item.data.width || item.item.data.heigh;
1751
- var height = item.data && item.data.height || item.item.data.heigh;
1748
+ var width = item.data && item.data.width || item.item && item.item.data.heigh;
1749
+ var height = item.data && item.data.height || item.item && item.item.data.heigh;
1752
1750
  return width / (height / maxHeight);
1753
1751
  });
1754
1752
  var sumWidth = normalizedBoxesWidth.reduce(function (sum, x) {