@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
package/dist/ui-kit-2.esm.js
CHANGED
|
@@ -311,36 +311,6 @@ var postMessage = function postMessage(category, element, action) {
|
|
|
311
311
|
}
|
|
312
312
|
};
|
|
313
313
|
|
|
314
|
-
var viewportSize = (function () {
|
|
315
|
-
return {
|
|
316
|
-
width: window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
|
|
317
|
-
height: window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
|
|
318
|
-
};
|
|
319
|
-
});
|
|
320
|
-
|
|
321
|
-
var MediaQuerySizes = {
|
|
322
|
-
MOBILE: 512,
|
|
323
|
-
PORTRAIT_TABLET: 768,
|
|
324
|
-
LANDSCAPE_TABLET: 1024,
|
|
325
|
-
DESKTOP: 1010,
|
|
326
|
-
WIDE_DESKTOP: 1200
|
|
327
|
-
};
|
|
328
|
-
var imageBreakpoints = {
|
|
329
|
-
325: '(min-width: 0)',
|
|
330
|
-
520: '(min-width: 325px)',
|
|
331
|
-
600: '(min-width: 600px)',
|
|
332
|
-
650: '(min-width: 650px)',
|
|
333
|
-
980: '(min-width: 1000px)',
|
|
334
|
-
1335: '(min-width: 1000px)'
|
|
335
|
-
};
|
|
336
|
-
var imageConditionalKeys = {
|
|
337
|
-
xs: [325],
|
|
338
|
-
superFull: [1335, 650, 520, 325],
|
|
339
|
-
full: [980, 650, 520, 325],
|
|
340
|
-
"default": [650, 520, 325],
|
|
341
|
-
narrow: [600, 325]
|
|
342
|
-
};
|
|
343
|
-
|
|
344
314
|
var styles$3 = {"root":"Lazy-module_root__2Z72l"};
|
|
345
315
|
|
|
346
316
|
var Lazy = function Lazy(_ref) {
|
|
@@ -375,6 +345,29 @@ var Lazy = function Lazy(_ref) {
|
|
|
375
345
|
}, visible && children);
|
|
376
346
|
};
|
|
377
347
|
|
|
348
|
+
var MediaQuerySizes = {
|
|
349
|
+
MOBILE: 512,
|
|
350
|
+
PORTRAIT_TABLET: 768,
|
|
351
|
+
LANDSCAPE_TABLET: 1024,
|
|
352
|
+
DESKTOP: 1010,
|
|
353
|
+
WIDE_DESKTOP: 1200
|
|
354
|
+
};
|
|
355
|
+
var imageBreakpoints = {
|
|
356
|
+
325: '(min-width: 0)',
|
|
357
|
+
520: '(min-width: 325px)',
|
|
358
|
+
600: '(min-width: 600px)',
|
|
359
|
+
650: '(min-width: 650px)',
|
|
360
|
+
980: '(min-width: 1000px)',
|
|
361
|
+
1335: '(min-width: 1000px)'
|
|
362
|
+
};
|
|
363
|
+
var imageConditionalKeys = {
|
|
364
|
+
xs: [325],
|
|
365
|
+
superFull: [1335, 650, 520, 325],
|
|
366
|
+
full: [980, 650, 520, 325],
|
|
367
|
+
"default": [650, 520, 325],
|
|
368
|
+
narrow: [600, 325]
|
|
369
|
+
};
|
|
370
|
+
|
|
378
371
|
var toCamel = function toCamel(s) {
|
|
379
372
|
return s.replace(/([_][a-z])/gi, function (str) {
|
|
380
373
|
return str.toUpperCase().replace('_', '');
|
|
@@ -444,8 +437,7 @@ var Image = function Image(_ref) {
|
|
|
444
437
|
source = _ref.source,
|
|
445
438
|
lazy = _ref.lazy,
|
|
446
439
|
ratio = _ref.ratio,
|
|
447
|
-
styleContext = _ref.styleContext
|
|
448
|
-
fullscreen = _ref.fullscreen;
|
|
440
|
+
styleContext = _ref.styleContext;
|
|
449
441
|
|
|
450
442
|
var _useContext = useContext(BlockContext),
|
|
451
443
|
lightBox = _useContext.lightBox;
|
|
@@ -455,12 +447,7 @@ var Image = function Image(_ref) {
|
|
|
455
447
|
setIsLoaded = _useState[1];
|
|
456
448
|
|
|
457
449
|
var handleClick = function handleClick() {
|
|
458
|
-
|
|
459
|
-
viewportWidth = _viewportSize.width;
|
|
460
|
-
|
|
461
|
-
var disableFullscreenDesktop = viewportWidth >= MediaQuerySizes.LANDSCAPE_TABLET && !fullscreen;
|
|
462
|
-
|
|
463
|
-
if (disableFullscreenDesktop || !lightBox || optimized && !optimized.original) {
|
|
450
|
+
if (!lightBox || optimized && !optimized.original) {
|
|
464
451
|
return;
|
|
465
452
|
}
|
|
466
453
|
|
|
@@ -477,7 +464,7 @@ var Image = function Image(_ref) {
|
|
|
477
464
|
/* fallback w325 url until w6 was released */
|
|
478
465
|
|
|
479
466
|
var fallbackSource = source && source[0] || optimized.w325 && optimized.w325['1x'] || optimized.original;
|
|
480
|
-
var classNames = [[styles$4.root, true], [styles$4.isLoaded, isLoaded], [styles$4.fullscreen,
|
|
467
|
+
var classNames = [[styles$4.root, true], [styles$4.isLoaded, isLoaded], [styles$4.fullscreen, lightBox && optimized && optimized.original]];
|
|
481
468
|
|
|
482
469
|
if (styleContext) {
|
|
483
470
|
classNames = makeStyleContext(classNames, styleContext, styles$4);
|
|
@@ -631,6 +618,13 @@ var Footnote = function Footnote(_ref) {
|
|
|
631
618
|
}, children));
|
|
632
619
|
};
|
|
633
620
|
|
|
621
|
+
var viewportSize = (function () {
|
|
622
|
+
return {
|
|
623
|
+
width: window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth,
|
|
624
|
+
height: window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
|
|
625
|
+
};
|
|
626
|
+
});
|
|
627
|
+
|
|
634
628
|
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"};
|
|
635
629
|
|
|
636
630
|
var DotsOnImage = function DotsOnImage(_ref) {
|
|
@@ -1270,7 +1264,6 @@ var EmbedBlock = function EmbedBlock(_ref) {
|
|
|
1270
1264
|
alt: block.data.caption,
|
|
1271
1265
|
display: block.data.display,
|
|
1272
1266
|
lazy: block.data.lazy,
|
|
1273
|
-
fullscreen: block.data.fullscreen,
|
|
1274
1267
|
styleContext: styleContext
|
|
1275
1268
|
}));
|
|
1276
1269
|
}
|
|
@@ -2358,7 +2351,7 @@ var Spoiler = function Spoiler(_ref) {
|
|
|
2358
2351
|
}, title && React.createElement("h3", null, title)), React.createElement("div", {
|
|
2359
2352
|
className: styles$A.body
|
|
2360
2353
|
}, blocks.map(function (item) {
|
|
2361
|
-
return React.createElement(
|
|
2354
|
+
return React.createElement(RenderBlocks, {
|
|
2362
2355
|
key: item.id,
|
|
2363
2356
|
block: item,
|
|
2364
2357
|
styleContext: context
|