@meduza/ui-kit-2 0.1.51 → 0.1.52
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/dist/Image/Image.types.d.ts +0 -1
- package/dist/ui-kit-2.cjs.development.js +34 -41
- package/dist/ui-kit-2.cjs.development.js.map +1 -1
- package/dist/ui-kit-2.cjs.production.min.js +1 -1
- package/dist/ui-kit-2.cjs.production.min.js.map +1 -1
- package/dist/ui-kit-2.esm.js +34 -41
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/dist/ui-kit.css +1678 -1678
- package/package.json +1 -1
- package/src/EmbedBlock/EmbedBlock.tsx +0 -1
- package/src/Image/Image.types.ts +0 -1
- package/src/Image/index.tsx +3 -18
- package/src/Spoiler/index.tsx +2 -2
|
@@ -318,36 +318,6 @@ var postMessage = function postMessage(category, element, action) {
|
|
|
318
318
|
}
|
|
319
319
|
};
|
|
320
320
|
|
|
321
|
-
var viewportSize = (function () {
|
|
322
|
-
return {
|
|
323
|
-
width: window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
|
|
324
|
-
height: window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
|
|
325
|
-
};
|
|
326
|
-
});
|
|
327
|
-
|
|
328
|
-
var MediaQuerySizes = {
|
|
329
|
-
MOBILE: 512,
|
|
330
|
-
PORTRAIT_TABLET: 768,
|
|
331
|
-
LANDSCAPE_TABLET: 1024,
|
|
332
|
-
DESKTOP: 1010,
|
|
333
|
-
WIDE_DESKTOP: 1200
|
|
334
|
-
};
|
|
335
|
-
var imageBreakpoints = {
|
|
336
|
-
325: '(min-width: 0)',
|
|
337
|
-
520: '(min-width: 325px)',
|
|
338
|
-
600: '(min-width: 600px)',
|
|
339
|
-
650: '(min-width: 650px)',
|
|
340
|
-
980: '(min-width: 1000px)',
|
|
341
|
-
1335: '(min-width: 1000px)'
|
|
342
|
-
};
|
|
343
|
-
var imageConditionalKeys = {
|
|
344
|
-
xs: [325],
|
|
345
|
-
superFull: [1335, 650, 520, 325],
|
|
346
|
-
full: [980, 650, 520, 325],
|
|
347
|
-
"default": [650, 520, 325],
|
|
348
|
-
narrow: [600, 325]
|
|
349
|
-
};
|
|
350
|
-
|
|
351
321
|
var styles$3 = {"root":"Lazy-module_root__2Z72l"};
|
|
352
322
|
|
|
353
323
|
var Lazy = function Lazy(_ref) {
|
|
@@ -382,6 +352,29 @@ var Lazy = function Lazy(_ref) {
|
|
|
382
352
|
}, visible && children);
|
|
383
353
|
};
|
|
384
354
|
|
|
355
|
+
var MediaQuerySizes = {
|
|
356
|
+
MOBILE: 512,
|
|
357
|
+
PORTRAIT_TABLET: 768,
|
|
358
|
+
LANDSCAPE_TABLET: 1024,
|
|
359
|
+
DESKTOP: 1010,
|
|
360
|
+
WIDE_DESKTOP: 1200
|
|
361
|
+
};
|
|
362
|
+
var imageBreakpoints = {
|
|
363
|
+
325: '(min-width: 0)',
|
|
364
|
+
520: '(min-width: 325px)',
|
|
365
|
+
600: '(min-width: 600px)',
|
|
366
|
+
650: '(min-width: 650px)',
|
|
367
|
+
980: '(min-width: 1000px)',
|
|
368
|
+
1335: '(min-width: 1000px)'
|
|
369
|
+
};
|
|
370
|
+
var imageConditionalKeys = {
|
|
371
|
+
xs: [325],
|
|
372
|
+
superFull: [1335, 650, 520, 325],
|
|
373
|
+
full: [980, 650, 520, 325],
|
|
374
|
+
"default": [650, 520, 325],
|
|
375
|
+
narrow: [600, 325]
|
|
376
|
+
};
|
|
377
|
+
|
|
385
378
|
var toCamel = function toCamel(s) {
|
|
386
379
|
return s.replace(/([_][a-z])/gi, function (str) {
|
|
387
380
|
return str.toUpperCase().replace('_', '');
|
|
@@ -451,8 +444,7 @@ var Image = function Image(_ref) {
|
|
|
451
444
|
source = _ref.source,
|
|
452
445
|
lazy = _ref.lazy,
|
|
453
446
|
ratio = _ref.ratio,
|
|
454
|
-
styleContext = _ref.styleContext
|
|
455
|
-
fullscreen = _ref.fullscreen;
|
|
447
|
+
styleContext = _ref.styleContext;
|
|
456
448
|
|
|
457
449
|
var _useContext = React.useContext(BlockContext),
|
|
458
450
|
lightBox = _useContext.lightBox;
|
|
@@ -462,12 +454,7 @@ var Image = function Image(_ref) {
|
|
|
462
454
|
setIsLoaded = _useState[1];
|
|
463
455
|
|
|
464
456
|
var handleClick = function handleClick() {
|
|
465
|
-
|
|
466
|
-
viewportWidth = _viewportSize.width;
|
|
467
|
-
|
|
468
|
-
var disableFullscreenDesktop = viewportWidth >= MediaQuerySizes.LANDSCAPE_TABLET && !fullscreen;
|
|
469
|
-
|
|
470
|
-
if (disableFullscreenDesktop || !lightBox || optimized && !optimized.original) {
|
|
457
|
+
if (!lightBox || optimized && !optimized.original) {
|
|
471
458
|
return;
|
|
472
459
|
}
|
|
473
460
|
|
|
@@ -484,7 +471,7 @@ var Image = function Image(_ref) {
|
|
|
484
471
|
/* fallback w325 url until w6 was released */
|
|
485
472
|
|
|
486
473
|
var fallbackSource = source && source[0] || optimized.w325 && optimized.w325['1x'] || optimized.original;
|
|
487
|
-
var classNames = [[styles$4.root, true], [styles$4.isLoaded, isLoaded], [styles$4.fullscreen,
|
|
474
|
+
var classNames = [[styles$4.root, true], [styles$4.isLoaded, isLoaded], [styles$4.fullscreen, lightBox && optimized && optimized.original]];
|
|
488
475
|
|
|
489
476
|
if (styleContext) {
|
|
490
477
|
classNames = makeStyleContext(classNames, styleContext, styles$4);
|
|
@@ -638,6 +625,13 @@ var Footnote = function Footnote(_ref) {
|
|
|
638
625
|
}, children));
|
|
639
626
|
};
|
|
640
627
|
|
|
628
|
+
var viewportSize = (function () {
|
|
629
|
+
return {
|
|
630
|
+
width: window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
|
|
631
|
+
height: window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
|
|
632
|
+
};
|
|
633
|
+
});
|
|
634
|
+
|
|
641
635
|
var styles$7 = {"root":"DotsOnImage-module_root__2XP3Q","isVisible":"DotsOnImage-module_isVisible__Wqqqt","marker":"DotsOnImage-module_marker__lH5cP","show":"DotsOnImage-module_show__2TMBv","dot":"DotsOnImage-module_dot__H1wua","isActive":"DotsOnImage-module_isActive__3hh31","popover":"DotsOnImage-module_popover__35Cpj","isRight":"DotsOnImage-module_isRight__2RsJe","isTop":"DotsOnImage-module_isTop__3zmSK","isLeft":"DotsOnImage-module_isLeft__3quc9","isBottom":"DotsOnImage-module_isBottom__3Nk1T"};
|
|
642
636
|
|
|
643
637
|
var DotsOnImage = function DotsOnImage(_ref) {
|
|
@@ -1277,7 +1271,6 @@ var EmbedBlock = function EmbedBlock(_ref) {
|
|
|
1277
1271
|
alt: block.data.caption,
|
|
1278
1272
|
display: block.data.display,
|
|
1279
1273
|
lazy: block.data.lazy,
|
|
1280
|
-
fullscreen: block.data.fullscreen,
|
|
1281
1274
|
styleContext: styleContext
|
|
1282
1275
|
}));
|
|
1283
1276
|
}
|
|
@@ -2365,7 +2358,7 @@ var Spoiler = function Spoiler(_ref) {
|
|
|
2365
2358
|
}, title && React__default.createElement("h3", null, title)), React__default.createElement("div", {
|
|
2366
2359
|
className: styles$A.body
|
|
2367
2360
|
}, blocks.map(function (item) {
|
|
2368
|
-
return React__default.createElement(
|
|
2361
|
+
return React__default.createElement(RenderBlocks, {
|
|
2369
2362
|
key: item.id,
|
|
2370
2363
|
block: item,
|
|
2371
2364
|
styleContext: context
|