@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.
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.57",
2
+ "version": "0.1.59",
3
3
  "license": "MIT",
4
4
  "description": "UIKit for Meduza",
5
5
  "repository": "https://github.com/meduza-corp/ui-kit-2.git",
@@ -110,6 +110,7 @@ export const DotsOnImage: React.FC<DotsOnImageProps> = ({
110
110
  ref={ref}
111
111
  >
112
112
  <Image
113
+ fullscreen={false}
113
114
  optimized={optimized}
114
115
  width={width}
115
116
  height={height}
@@ -190,8 +190,8 @@
190
190
  .isInSlide.mobileFullwidth .object,
191
191
  .isInCard .figure,
192
192
  .isInSlide .figure,
193
- .isInCard .object,
194
- .isInSlide .object {
193
+ .isInCard.full .object,
194
+ .isInSlide.full .object {
195
195
  margin-right: -11px;
196
196
  margin-left: -11px;
197
197
 
@@ -40,6 +40,7 @@ export const EmbedBlock: React.FC<EmbedBlockProps> = ({
40
40
  'vimeo',
41
41
  'onetv',
42
42
  'coub',
43
+ 'meduza',
43
44
  'facebook_video'
44
45
  ]
45
46
 
@@ -16,6 +16,7 @@ export interface ImageProps {
16
16
  source?: string[]
17
17
  lazy?: boolean
18
18
  ratio?: number
19
+ fullscreen?: boolean
19
20
  styleContext?: string[] | string
20
21
  }
21
22
 
@@ -18,13 +18,14 @@ export const Image: React.FC<ImageProps> = ({
18
18
  source,
19
19
  lazy,
20
20
  ratio,
21
- styleContext
21
+ styleContext,
22
+ fullscreen = true
22
23
  }) => {
23
24
  const { lightBox } = useContext(BlockContext)
24
25
  const [isLoaded, setIsLoaded] = useState(lazy ? false : true)
25
26
 
26
27
  const handleClick = (): void => {
27
- if (!lightBox || (optimized && !optimized.original)) {
28
+ if (!lightBox || !fullscreen || (optimized && !optimized.original)) {
28
29
  return
29
30
  }
30
31
 
@@ -49,7 +50,10 @@ export const Image: React.FC<ImageProps> = ({
49
50
  let classNames: ClassNames = [
50
51
  [styles.root, true],
51
52
  [styles.isLoaded, isLoaded],
52
- [styles.fullscreen, lightBox && optimized && optimized.original]
53
+ [
54
+ styles.fullscreen,
55
+ lightBox && optimized && optimized.original && fullscreen
56
+ ]
53
57
  ]
54
58
 
55
59
  if (styleContext) {