@meduza/ui-kit-2 0.1.42 → 0.1.45

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.42",
2
+ "version": "0.1.45",
3
3
  "license": "MIT",
4
4
  "description": "UIKit for Meduza",
5
5
  "repository": "https://github.com/meduza-corp/ui-kit-2.git",
@@ -16,18 +16,38 @@
16
16
  position: absolute;
17
17
  z-index: 10;
18
18
 
19
+ display: flex;
20
+ align-items: center;
21
+ flex-flow: row nowrap;
22
+ justify-content: center;
23
+
19
24
  width: 28px;
20
25
  height: 28px;
21
26
 
22
27
  will-change: opacity;
23
28
  }
24
29
 
30
+ .marker::after {
31
+ position: absolute;
32
+ top: -5px;
33
+ right: -5px;
34
+ bottom: -5px;
35
+ left: -5px;
36
+
37
+ content: '';
38
+
39
+ @media $mobile {
40
+ content: none;
41
+ }
42
+ }
43
+
25
44
  .marker {
26
- width: 100%;
27
- height: 100%;
45
+ width: 20px;
46
+ height: 20px;
28
47
  padding: 0;
29
48
 
30
49
  cursor: pointer;
50
+ transition: box-shadow 350ms ease;
31
51
  text-align: center;
32
52
 
33
53
  opacity: 0;
@@ -36,26 +56,40 @@
36
56
  border-radius: 30px;
37
57
  outline-width: 0;
38
58
  background-color: #000;
39
- box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
59
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.2);
40
60
 
41
61
  font-family: $secondaryFont;
42
- font-size: 13px;
62
+ font-size: 9px;
43
63
  font-weight: 600;
44
- line-height: 28px;
64
+ line-height: 22px;
45
65
 
46
66
  appearance: none;
47
67
  will-change: opacity;
68
+
69
+ @media $mobile {
70
+ width: 28px;
71
+ height: 28px;
72
+
73
+ font-size: 13px;
74
+ line-height: 28px;
75
+ }
48
76
  }
49
77
 
50
78
  .marker svg {
51
79
  display: block;
52
80
 
81
+ width: 100%;
82
+ height: 100%;
83
+
53
84
  will-change: opacity;
54
85
  }
55
86
 
56
- .marker:hover,
87
+ .marker:hover {
88
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
89
+ }
90
+
57
91
  .marker.isActive {
58
- box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 1);
92
+ box-shadow: 0 0 8px rgba(0, 0, 0, 0.2), 0 0 0 1px #fff;
59
93
  }
60
94
 
61
95
  .popover {
@@ -115,7 +115,7 @@ export const DotsOnImage: React.FC<DotsOnImageProps> = ({
115
115
  height={height}
116
116
  alt={credit}
117
117
  display={display}
118
- fullscreen={{ mobile: false, desktop: false }}
118
+ fullscreen={false}
119
119
  />
120
120
 
121
121
  <div ref={container}>
@@ -10,9 +10,9 @@
10
10
  "y": 5
11
11
  },
12
12
  "icon": {
13
- "type": "svg",
13
+ "type": "number",
14
14
  "color": "#000000",
15
- "svg_string": "<svg width=\"28\" height=\"28\" viewBox=\"0 0 28 28\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M13.5733 19.192C14.1173 19.192 15.1093 18.632 16.1493 17.464C16.0693 17.352 15.9733 17.256 15.8773 17.144C15.4133 17.48 15.0133 17.752 14.5493 18.04C15.2533 14.712 15.5093 13.24 15.5093 12.824C15.5093 12.2 15.1733 11.784 14.3573 11.784C13.6213 11.784 12.7573 12.472 11.7653 13.592L12.0693 13.928C12.5653 13.544 13.0133 13.208 13.4613 12.904L12.7093 16.776C12.6293 17.224 12.5173 17.72 12.5173 18.136C12.5173 18.936 12.9013 19.192 13.5733 19.192ZM13.8133 9.288C13.8453 9.896 14.3093 10.376 14.9173 10.376C15.6213 10.376 16.2773 9.768 16.2773 9.032C16.2773 8.408 15.8133 7.912 15.1573 7.912C14.4213 7.912 13.8133 8.568 13.8133 9.288Z\" fill=\"white\"/>\n</svg>\n"
15
+ "number": "42"
16
16
  },
17
17
  "id": "0-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
18
18
  },
@@ -63,7 +63,6 @@ export const EmbedBlock: React.FC<EmbedBlockProps> = ({
63
63
  return (
64
64
  <div className={styles.figure}>
65
65
  <Image
66
- fullscreen={{ desktop: block.data.fullscreen, mobile: true }}
67
66
  source={!optimized && [small, large]}
68
67
  optimized={block.data.optimized}
69
68
  width={block.data.width}
@@ -29,7 +29,6 @@ const Example: React.FC = () => {
29
29
  alt={data.credit}
30
30
  display={data.display}
31
31
  lazy={data.lazy}
32
- fullscreen={{ mobile: true, desktop: false }}
33
32
  />
34
33
  </div>
35
34
  </>
@@ -15,10 +15,7 @@ export interface ImageProps {
15
15
  height?: number
16
16
  source?: string[]
17
17
  lazy?: boolean
18
- fullscreen?: {
19
- mobile: boolean
20
- desktop: boolean
21
- }
18
+ fullscreen?: boolean
22
19
  ratio?: number
23
20
  styleContext?: string[] | string
24
21
  }
@@ -3,9 +3,7 @@ import { ImageProps } from './Image.types'
3
3
  import { makeClassName, ClassNames } from '../utils/makeClassName'
4
4
  import makeStyleContext from '../utils/makeStyleContext'
5
5
  import BlockContext from '../utils/BlockContext'
6
- import viewportSize from '../utils/viewportSize'
7
6
  import postMessage from '../utils/postMessage'
8
- import { MediaQuerySizes } from '../constants'
9
7
  import { Lazy } from '../Lazy'
10
8
  import RenderPicture from './RenderPicture'
11
9
 
@@ -19,7 +17,7 @@ export const Image: React.FC<ImageProps> = ({
19
17
  height,
20
18
  source,
21
19
  lazy,
22
- fullscreen,
20
+ fullscreen = true,
23
21
  ratio,
24
22
  styleContext
25
23
  }) => {
@@ -27,19 +25,7 @@ export const Image: React.FC<ImageProps> = ({
27
25
  const [isLoaded, setIsLoaded] = useState(false)
28
26
 
29
27
  const handleClick = (): void => {
30
- if (!fullscreen || !lightBox || (optimized && !optimized.original)) {
31
- return
32
- }
33
-
34
- const { width: viewportWidth } = viewportSize()
35
-
36
- const disableFullscreenDesktop =
37
- viewportWidth >= MediaQuerySizes.LANDSCAPE_TABLET && !fullscreen.desktop
38
-
39
- const disableFullscreenMobile =
40
- viewportWidth < MediaQuerySizes.LANDSCAPE_TABLET && !fullscreen.mobile
41
-
42
- if (disableFullscreenDesktop || disableFullscreenMobile) {
28
+ if (!lightBox || (optimized && !optimized.original)) {
43
29
  return
44
30
  }
45
31
 
@@ -64,7 +50,7 @@ export const Image: React.FC<ImageProps> = ({
64
50
  let classNames: ClassNames = [
65
51
  [styles.root, true],
66
52
  [styles.isLoaded, isLoaded],
67
- [styles.fullscreen, fullscreen && fullscreen.desktop]
53
+ [styles.fullscreen, fullscreen]
68
54
  ]
69
55
 
70
56
  if (styleContext) {