@meduza/ui-kit-2 0.5.5 → 0.6.6

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.5.5",
2
+ "version": "0.6.6",
3
3
  "license": "MIT",
4
4
  "description": "UIKit for Meduza",
5
5
  "repository": "https://github.com/meduza-corp/ui-kit-2.git",
@@ -5,10 +5,17 @@
5
5
 
6
6
  margin: 50px auto 7px;
7
7
 
8
+ scroll-margin: 40px;
9
+
10
+ @media $landscapeTablet {
11
+ scroll-margin: 70px;
12
+ }
13
+
8
14
  @media $mobile {
9
15
  max-width: 650px;
10
16
  margin-top: 70px;
11
17
  }
18
+
12
19
  }
13
20
 
14
21
  .root:first-child {
@@ -4,4 +4,5 @@ export interface ChapterBlockProps {
4
4
  only_on?: string
5
5
  }
6
6
  styleContext?: string
7
+ id?: string
7
8
  }
@@ -5,11 +5,13 @@ import styles from './ChapterBlock.module.css'
5
5
 
6
6
  export const ChapterBlock: React.FC<ChapterBlockProps> = ({
7
7
  block: { data, only_on: onlyOn },
8
- styleContext
8
+ styleContext,
9
+ id
9
10
  }) => {
10
11
  return (
11
12
  <div
12
13
  data-testid="chapter-block"
14
+ id={id}
13
15
  className={makeClassName([
14
16
  [styles.root, true],
15
17
  [styles[onlyOn], !!onlyOn]
@@ -86,7 +86,7 @@ export const RenderBlocks: React.FC<RenderBlocksProps> = ({
86
86
  }
87
87
 
88
88
  case 'chapter-subtitle': {
89
- return <ChapterBlock block={block} styleContext={styleContext} />
89
+ return <ChapterBlock block={block} styleContext={styleContext} id={block.id} />
90
90
  }
91
91
 
92
92
  case 'card_title': {
@@ -68,6 +68,12 @@
68
68
  font-family: $primaryFont;
69
69
  line-height: calc(28rem / 16);
70
70
 
71
+ scroll-margin: 40px;
72
+
73
+ @media $landscapeTablet {
74
+ scroll-margin: 70px;
75
+ }
76
+
71
77
  @media $mobile {
72
78
  margin: 0 0 45px;
73
79
 
@@ -94,6 +100,12 @@
94
100
  font-family: $secondaryFont;
95
101
  line-height: calc(24rem / 16);
96
102
 
103
+ scroll-margin: 40px;
104
+
105
+ @media $landscapeTablet {
106
+ scroll-margin: 70px;
107
+ }
108
+
97
109
  @media $mobile {
98
110
  margin-top: 45px;
99
111
  margin-bottom: 15px;
@@ -113,6 +125,12 @@
113
125
  font-family: $secondaryFont;
114
126
  line-height: calc(21rem / 16);
115
127
 
128
+ scroll-margin: 40px;
129
+
130
+ @media $landscapeTablet {
131
+ scroll-margin: 70px;
132
+ }
133
+
116
134
  @media $mobile {
117
135
  margin-top: 45px;
118
136
  margin-bottom: 15px;
@@ -2,7 +2,7 @@ import React from 'react'
2
2
 
3
3
  export type TagSizes = 'small' | 'large'
4
4
 
5
- export type TagThemes = 'dark' | 'gold' | 'gray' | 'light' | 'inherit'
5
+ export type TagThemes = 'dark' | 'gold' | 'gray' | 'light' | 'inherit' | 'custom'
6
6
 
7
7
  export type TagStyleContexts = 'isInToolbar' | 'isInSpoiler' | 'isInDropdown'
8
8