@meduza/ui-kit-2 0.1.57 → 0.1.59

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.
@@ -15,6 +15,7 @@ export interface ImageProps {
15
15
  source?: string[];
16
16
  lazy?: boolean;
17
17
  ratio?: number;
18
+ fullscreen?: boolean;
18
19
  styleContext?: string[] | string;
19
20
  }
20
21
  export interface PictureProps {
@@ -444,7 +444,9 @@ var Image = function Image(_ref) {
444
444
  source = _ref.source,
445
445
  lazy = _ref.lazy,
446
446
  ratio = _ref.ratio,
447
- styleContext = _ref.styleContext;
447
+ styleContext = _ref.styleContext,
448
+ _ref$fullscreen = _ref.fullscreen,
449
+ fullscreen = _ref$fullscreen === void 0 ? true : _ref$fullscreen;
448
450
 
449
451
  var _useContext = React.useContext(BlockContext),
450
452
  lightBox = _useContext.lightBox;
@@ -454,7 +456,7 @@ var Image = function Image(_ref) {
454
456
  setIsLoaded = _useState[1];
455
457
 
456
458
  var handleClick = function handleClick() {
457
- if (!lightBox || optimized && !optimized.original) {
459
+ if (!lightBox || !fullscreen || optimized && !optimized.original) {
458
460
  return;
459
461
  }
460
462
 
@@ -471,7 +473,7 @@ var Image = function Image(_ref) {
471
473
  /* fallback w325 url until w6 was released */
472
474
 
473
475
  var fallbackSource = source && source[0] || optimized.w325 && optimized.w325['1x'] || optimized.original;
474
- var classNames = [[styles$4.root, true], [styles$4.isLoaded, isLoaded], [styles$4.fullscreen, lightBox && optimized && optimized.original]];
476
+ var classNames = [[styles$4.root, true], [styles$4.isLoaded, isLoaded], [styles$4.fullscreen, lightBox && optimized && optimized.original && fullscreen]];
475
477
 
476
478
  if (styleContext) {
477
479
  classNames = makeStyleContext(classNames, styleContext, styles$4);
@@ -745,6 +747,7 @@ var DotsOnImage = function DotsOnImage(_ref) {
745
747
  "data-testid": "dots-on-image",
746
748
  ref: ref
747
749
  }, React__default.createElement(Image, {
750
+ fullscreen: false,
748
751
  optimized: optimized,
749
752
  width: width,
750
753
  height: height,
@@ -1227,7 +1230,7 @@ var EmbedBlock = function EmbedBlock(_ref) {
1227
1230
 
1228
1231
  var style = {};
1229
1232
  var isProportional = block.data.height && block.data.width;
1230
- var fullWidthProviders = ['youtube', 'vimeo', 'onetv', 'coub', 'facebook_video'];
1233
+ var fullWidthProviders = ['youtube', 'vimeo', 'onetv', 'coub', 'meduza', 'facebook_video'];
1231
1234
  var mobileFullwidth = fullWidthProviders.indexOf(provider) > -1 || block.type === 'dots_on_image';
1232
1235
 
1233
1236
  var renderCC = function renderCC(context) {