@gravity-ui/blog-constructor 4.4.0 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (95) hide show
  1. package/build/cjs/blocks/Author/Author.css +2 -2
  2. package/build/cjs/blocks/Banner/schema.d.ts +11 -0
  3. package/build/cjs/blocks/CTA/CTA.css +1 -1
  4. package/build/cjs/blocks/CTA/CTA.js +1 -1
  5. package/build/cjs/blocks/CTA/schema.d.ts +11 -0
  6. package/build/cjs/blocks/ColoredText/schema.d.ts +11 -0
  7. package/build/cjs/blocks/Header/Header.js +1 -1
  8. package/build/cjs/blocks/Media/Media.css +1 -1
  9. package/build/cjs/blocks/Meta/Meta.js +2 -2
  10. package/build/cjs/components/ButtonWithIcon/ButtonWithIcon.css +6 -6
  11. package/build/cjs/components/FeedHeader/FeedHeader.css +3 -3
  12. package/build/cjs/components/FeedHeader/FeedHeader.js +1 -1
  13. package/build/cjs/components/FeedHeader/components/Controls/Controls.css +16 -12
  14. package/build/cjs/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.css +2 -2
  15. package/build/cjs/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.css +9 -9
  16. package/build/cjs/components/Paginator/Paginator.css +6 -6
  17. package/build/cjs/components/PostCard/PostCard.css +15 -15
  18. package/build/cjs/components/PostCard/PostCard.js +1 -1
  19. package/build/cjs/components/PostInfo/PostInfo.css +20 -20
  20. package/build/cjs/components/PostInfo/PostInfo.d.ts +3 -4
  21. package/build/cjs/components/PostInfo/PostInfo.js +3 -3
  22. package/build/cjs/components/PostInfo/SuggestPostInfo.d.ts +3 -4
  23. package/build/cjs/components/PostInfo/SuggestPostInfo.js +3 -3
  24. package/build/cjs/components/PostInfo/components/Save.d.ts +3 -3
  25. package/build/cjs/components/PostInfo/components/Save.js +3 -3
  26. package/build/cjs/components/PostInfo/components/Sharing.js +2 -2
  27. package/build/cjs/components/Posts/Posts.css +1 -1
  28. package/build/cjs/components/PostsEmpty/PostsEmpty.css +5 -5
  29. package/build/cjs/components/PostsError/PostError.css +5 -5
  30. package/build/cjs/components/Prompt/Prompt.css +2 -2
  31. package/build/cjs/components/Search/Search.css +4 -4
  32. package/build/cjs/components/Wrapper/Wrapper.d.ts +2 -3
  33. package/build/cjs/components/Wrapper/Wrapper.js +2 -2
  34. package/build/cjs/constants.d.ts +2 -0
  35. package/build/cjs/constants.js +3 -1
  36. package/build/cjs/containers/BlogPage/BlogPage.css +8 -8
  37. package/build/cjs/containers/BlogPostPage/BlogPostPage.css +49 -49
  38. package/build/cjs/containers/BlogPostPage/BlogPostPage.d.ts +1 -1
  39. package/build/cjs/contexts/PostPageContext.d.ts +1 -1
  40. package/build/cjs/contexts/theme/ThemeProvider.js +4 -4
  41. package/build/cjs/models/common.d.ts +3 -0
  42. package/build/cjs/schema/index.d.ts +33 -0
  43. package/build/cjs/utils/common.d.ts +1 -0
  44. package/build/esm/blocks/Author/Author.css +2 -2
  45. package/build/esm/blocks/Banner/schema.d.ts +11 -0
  46. package/build/esm/blocks/CTA/CTA.css +1 -1
  47. package/build/esm/blocks/CTA/CTA.js +1 -1
  48. package/build/esm/blocks/CTA/schema.d.ts +11 -0
  49. package/build/esm/blocks/ColoredText/schema.d.ts +11 -0
  50. package/build/esm/blocks/Header/Header.js +1 -1
  51. package/build/esm/blocks/Media/Media.css +1 -1
  52. package/build/esm/blocks/Meta/Meta.js +2 -2
  53. package/build/esm/components/ButtonWithIcon/ButtonWithIcon.css +6 -6
  54. package/build/esm/components/FeedHeader/FeedHeader.css +3 -3
  55. package/build/esm/components/FeedHeader/FeedHeader.js +1 -1
  56. package/build/esm/components/FeedHeader/components/Controls/Controls.css +16 -12
  57. package/build/esm/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.css +2 -2
  58. package/build/esm/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.css +9 -9
  59. package/build/esm/components/Paginator/Paginator.css +6 -6
  60. package/build/esm/components/PostCard/PostCard.css +15 -15
  61. package/build/esm/components/PostCard/PostCard.js +1 -1
  62. package/build/esm/components/PostInfo/PostInfo.css +20 -20
  63. package/build/esm/components/PostInfo/PostInfo.d.ts +3 -4
  64. package/build/esm/components/PostInfo/PostInfo.js +3 -3
  65. package/build/esm/components/PostInfo/SuggestPostInfo.d.ts +3 -4
  66. package/build/esm/components/PostInfo/SuggestPostInfo.js +3 -3
  67. package/build/esm/components/PostInfo/components/Save.d.ts +3 -3
  68. package/build/esm/components/PostInfo/components/Save.js +3 -3
  69. package/build/esm/components/PostInfo/components/Sharing.js +2 -2
  70. package/build/esm/components/Posts/Posts.css +1 -1
  71. package/build/esm/components/PostsEmpty/PostsEmpty.css +5 -5
  72. package/build/esm/components/PostsError/PostError.css +5 -5
  73. package/build/esm/components/Prompt/Prompt.css +2 -2
  74. package/build/esm/components/Search/Search.css +4 -4
  75. package/build/esm/components/Wrapper/Wrapper.d.ts +2 -3
  76. package/build/esm/components/Wrapper/Wrapper.js +2 -2
  77. package/build/esm/constants.d.ts +2 -0
  78. package/build/esm/constants.js +2 -0
  79. package/build/esm/containers/BlogPage/BlogPage.css +8 -8
  80. package/build/esm/containers/BlogPostPage/BlogPostPage.css +49 -49
  81. package/build/esm/containers/BlogPostPage/BlogPostPage.d.ts +1 -1
  82. package/build/esm/contexts/PostPageContext.d.ts +1 -1
  83. package/build/esm/contexts/theme/ThemeProvider.js +5 -5
  84. package/build/esm/models/common.d.ts +3 -0
  85. package/build/esm/schema/index.d.ts +33 -0
  86. package/build/esm/utils/common.d.ts +1 -0
  87. package/package.json +8 -7
  88. package/server/models/common.d.ts +3 -0
  89. package/styles/root.css +8 -8
  90. package/styles/root.scss +8 -8
  91. package/styles/storybook/common.scss +12 -6
  92. package/styles/storybook/palette.scss +6 -6
  93. package/styles/storybook/typography.scss +46 -46
  94. package/styles/yfm.css +26 -26
  95. package/styles/yfm.scss +14 -14
@@ -14,7 +14,7 @@
14
14
 
15
15
  &_text-contrasts,
16
16
  &_font-families {
17
- font-size: var(--yc-text-body-2-font-size);
17
+ font-size: var(--g-text-body-2-font-size);
18
18
 
19
19
  #{$block}__item + #{$block}__item {
20
20
  margin-top: 12px;
@@ -29,8 +29,8 @@
29
29
  &__caption {
30
30
  display: inline-block;
31
31
  width: 180px;
32
- color: var(--yc-color-text-secondary);
33
- font-size: var(--yc-text-body-font-size);
32
+ color: var(--g-color-text-secondary);
33
+ font-size: var(--g-text-body-font-size);
34
34
  text-transform: uppercase;
35
35
  }
36
36
 
@@ -41,95 +41,95 @@
41
41
  &__item_name {
42
42
  // font-sizes
43
43
  &_body .demo-typography__value {
44
- font-size: var(--yc-text-body-font-size);
45
- line-height: var(--yc-text-body-1-line-height);
44
+ font-size: var(--g-text-body-font-size);
45
+ line-height: var(--g-text-body-1-line-height);
46
46
  }
47
47
 
48
48
  &_body-2 .demo-typography__value {
49
- font-size: var(--yc-text-body-2-font-size);
50
- line-height: var(--yc-text-body-2-line-height);
49
+ font-size: var(--g-text-body-2-font-size);
50
+ line-height: var(--g-text-body-2-line-height);
51
51
  }
52
52
 
53
53
  &_body-3 .demo-typography__value {
54
- font-size: var(--yc-text-body-3-font-size);
55
- line-height: var(--yc-text-body-3-line-height);
54
+ font-size: var(--g-text-body-3-font-size);
55
+ line-height: var(--g-text-body-3-line-height);
56
56
  }
57
57
 
58
58
  &_lead .demo-typography__value {
59
- font-size: var(--yc-text-subheader-3-font-size);
60
- line-height: var(--yc-text-subheader-3-line-height);
59
+ font-size: var(--g-text-subheader-3-font-size);
60
+ line-height: var(--g-text-subheader-3-line-height);
61
61
  }
62
62
 
63
63
  &_header .demo-typography__value {
64
- font-size: var(--yc-text-header-1-font-size);
65
- line-height: var(--yc-text-header-1-line-height);
64
+ font-size: var(--g-text-header-1-font-size);
65
+ line-height: var(--g-text-header-1-line-height);
66
66
  }
67
67
 
68
68
  &_title .demo-typography__value {
69
- font-size: var(--yc-text-header-2-font-size);
70
- line-height: var(--yc-text-header-2-line-height);
69
+ font-size: var(--g-text-header-2-font-size);
70
+ line-height: var(--g-text-header-2-line-height);
71
71
  }
72
72
 
73
73
  &_display1 .demo-typography__value {
74
- font-size: var(--yc-text-display-1-font-size);
75
- line-height: var(--yc-text-display-1-line-height);
74
+ font-size: var(--g-text-display-1-font-size);
75
+ line-height: var(--g-text-display-1-line-height);
76
76
  }
77
77
 
78
78
  &_display2 .demo-typography__value {
79
- font-size: var(--yc-text-display-2-font-size);
80
- line-height: var(--yc-text-display-2-line-height);
79
+ font-size: var(--g-text-display-2-font-size);
80
+ line-height: var(--g-text-display-2-line-height);
81
81
  }
82
82
 
83
83
  &_display3 .demo-typography__value {
84
- font-size: var(--yc-text-display-3-font-size);
85
- line-height: var(--yc-text-display-3-line-height);
84
+ font-size: var(--g-text-display-3-font-size);
85
+ line-height: var(--g-text-display-3-line-height);
86
86
  }
87
87
 
88
88
  &_code-3 .demo-typography__value {
89
- font-size: var(--yc-text-code-3-font-size);
90
- line-height: var(--yc-text-code-3-line-height);
91
- font-weight: var(--yc-text-code-1-font-size);
92
- font-family: var(--yc-text-code-font-family);
89
+ font-size: var(--g-text-code-3-font-size);
90
+ line-height: var(--g-text-code-3-line-height);
91
+ font-weight: var(--g-text-code-1-font-size);
92
+ font-family: var(--g-text-code-font-family);
93
93
  }
94
94
 
95
95
  &_code-3-inline .demo-typography__value {
96
- font-size: var(--yc-text-code-inline-3-font-size);
97
- line-height: var(--yc-text-code-inline-3-line-height);
98
- font-weight: var(--yc-text-code-font-weight);
99
- font-family: var(--yc-text-code-font-family);
96
+ font-size: var(--g-text-code-inline-3-font-size);
97
+ line-height: var(--g-text-code-inline-3-line-height);
98
+ font-weight: var(--g-text-code-font-weight);
99
+ font-family: var(--g-text-code-font-family);
100
100
  }
101
101
 
102
102
  &_code-2 .demo-typography__value {
103
- font-size: var(--yc-text-code-2-font-size);
104
- line-height: var(--yc-text-code-2-line-height);
105
- font-weight: var(--yc-text-code-font-weight);
106
- font-family: var(--yc-text-code-font-family);
103
+ font-size: var(--g-text-code-2-font-size);
104
+ line-height: var(--g-text-code-2-line-height);
105
+ font-weight: var(--g-text-code-font-weight);
106
+ font-family: var(--g-text-code-font-family);
107
107
  }
108
108
 
109
109
  &_code-2-inline .demo-typography__value {
110
- font-size: var(--yc-text-code-inline-2-font-size);
111
- line-height: var(--yc-text-code-inline-2-line-height);
112
- font-weight: var(--yc-text-code-font-weight);
113
- font-family: var(--yc-text-code-font-family);
110
+ font-size: var(--g-text-code-inline-2-font-size);
111
+ line-height: var(--g-text-code-inline-2-line-height);
112
+ font-weight: var(--g-text-code-font-weight);
113
+ font-family: var(--g-text-code-font-family);
114
114
  }
115
115
 
116
116
  &_code-1 .demo-typography__value {
117
- font-size: var(--yc-text-code-1-font-size);
118
- line-height: var(--yc-text-code-1-line-height);
119
- font-weight: var(--yc-text-code-font-weight);
120
- font-family: var(--yc-text-code-font-family);
117
+ font-size: var(--g-text-code-1-font-size);
118
+ line-height: var(--g-text-code-1-line-height);
119
+ font-weight: var(--g-text-code-font-weight);
120
+ font-family: var(--g-text-code-font-family);
121
121
  }
122
122
 
123
123
  &_code-1-inline .demo-typography__value {
124
- font-size: var(--yc-text-code-inline-1-font-size);
125
- line-height: var(--yc-text-code-inline-1-line-height);
126
- font-weight: var(--yc-text-code-font-weight);
127
- font-family: var(--yc-text-code-font-family);
124
+ font-size: var(--g-text-code-inline-1-font-size);
125
+ line-height: var(--g-text-code-inline-1-line-height);
126
+ font-weight: var(--g-text-code-font-weight);
127
+ font-family: var(--g-text-code-font-family);
128
128
  }
129
129
 
130
130
  // font-families
131
131
  &_monospace .demo-typography__value {
132
- font-family: var(--yc-font-family-monospace);
132
+ font-family: var(--g-font-family-monospace);
133
133
  }
134
134
  }
135
135
 
package/styles/yfm.css CHANGED
@@ -1,9 +1,9 @@
1
1
  /* use this for style redefinitions to awoid problems with
2
2
  unpredictable css rules order in build */
3
3
  .yfm_blog {
4
- font-size: var(--yc-text-body-3-font-size);
5
- line-height: var(--yc-text-body-3-line-height);
6
- color: var(--yc-color-text-primary);
4
+ font-size: var(--g-text-body-3-font-size);
5
+ line-height: var(--g-text-body-3-line-height);
6
+ color: var(--g-color-text-primary);
7
7
  }
8
8
  .yfm_blog h1:first-child,
9
9
  .yfm_blog h2:first-child,
@@ -14,16 +14,16 @@ unpredictable css rules order in build */
14
14
  padding-top: 0;
15
15
  }
16
16
  .yfm_blog h2 {
17
- font-size: var(--yc-text-display-2-font-size);
18
- line-height: var(--yc-text-display-2-line-height);
17
+ font-size: var(--g-text-display-2-font-size);
18
+ line-height: var(--g-text-display-2-line-height);
19
19
  }
20
20
  .yfm_blog h3 {
21
- font-size: var(--yc-text-header-2-font-size);
22
- line-height: var(--yc-text-header-2-line-height);
21
+ font-size: var(--g-text-header-2-font-size);
22
+ line-height: var(--g-text-header-2-line-height);
23
23
  }
24
24
  .yfm_blog h4 {
25
- font-size: var(--yc-text-header-1-font-size);
26
- line-height: var(--yc-text-header-1-line-height);
25
+ font-size: var(--g-text-header-1-font-size);
26
+ line-height: var(--g-text-header-1-line-height);
27
27
  }
28
28
  .yfm_blog.yfm_blog h1,
29
29
  .yfm_blog.yfm_blog h2,
@@ -34,7 +34,7 @@ unpredictable css rules order in build */
34
34
  margin-bottom: 16px;
35
35
  margin-top: 32px;
36
36
  padding-top: 0;
37
- font-weight: var(--yc-text-header-font-weight);
37
+ font-weight: var(--g-text-header-font-weight);
38
38
  }
39
39
 
40
40
  .yfm_blog blockquote,
@@ -59,41 +59,41 @@ unpredictable css rules order in build */
59
59
  padding-left: 1.4em;
60
60
  }
61
61
  .yfm_blog code {
62
- color: var(--yc-color-text-misc);
62
+ color: var(--g-color-text-misc);
63
63
  }
64
64
  .yfm_blog pre > code {
65
- color: var(--yc-color-text-primary);
65
+ color: var(--g-color-text-primary);
66
66
  }
67
67
  .yfm_blog table {
68
- color: var(--yc-color-text-primary);
69
- border: 1px solid var(--yc-color-line-generic);
70
- background: var(--yc-color-base-background);
68
+ color: var(--g-color-text-primary);
69
+ border: 1px solid var(--g-color-line-generic);
70
+ background: var(--g-color-base-background);
71
71
  }
72
72
  .yfm_blog thead tr,
73
73
  .yfm_blog table tr:nth-child(2n) {
74
- background-color: var(--yc-color-base-generic);
74
+ background-color: var(--g-color-base-generic);
75
75
  }
76
76
  .yfm_blog_media {
77
- font-size: var(--yc-text-body-3-font-size);
78
- line-height: var(--yc-text-body-3-line-height);
79
- color: var(--yc-color-text-secondary);
77
+ font-size: var(--g-text-body-3-font-size);
78
+ line-height: var(--g-text-body-3-line-height);
79
+ color: var(--g-color-text-secondary);
80
80
  }
81
81
  .yfm_blog_breadcrumbs {
82
- font-size: var(--yc-text-body-2-font-size);
83
- line-height: var(--yc-text-body-2-line-height);
84
- color: var(--yc-text-color-base);
82
+ font-size: var(--g-text-body-2-font-size);
83
+ line-height: var(--g-text-body-2-line-height);
84
+ color: var(--g-text-color-base);
85
85
  }
86
86
  .yfm_blog a {
87
- color: var(--yc-color-text-link);
87
+ color: var(--g-color-text-link);
88
88
  }
89
89
  .yfm_blog a:hover {
90
- color: var(--yc-color-text-link-hover);
90
+ color: var(--g-color-text-link-hover);
91
91
  }
92
92
  .yfm_blog .yfm-tab:hover, .yfm_blog .yfm-tab:active {
93
- color: var(--yc-color-text-link-hover);
93
+ color: var(--g-color-text-link-hover);
94
94
  }
95
95
  .yfm_blog .yfm-tab.active {
96
- border-bottom-color: var(--yc-color-text-link);
96
+ border-bottom-color: var(--g-color-text-link);
97
97
  }
98
98
  .yfm_blog .yfm-clipboard {
99
99
  margin: 32px 0;
package/styles/yfm.scss CHANGED
@@ -5,7 +5,7 @@
5
5
  $root: &;
6
6
 
7
7
  @include text-size(body-3);
8
- color: var(--yc-color-text-primary);
8
+ color: var(--g-color-text-primary);
9
9
 
10
10
  h1:first-child,
11
11
  h2:first-child,
@@ -38,7 +38,7 @@
38
38
  margin-bottom: $indentXS;
39
39
  margin-top: $indentM;
40
40
  padding-top: 0;
41
- font-weight: var(--yc-text-header-font-weight);
41
+ font-weight: var(--g-text-header-font-weight);
42
42
  }
43
43
  }
44
44
 
@@ -68,50 +68,50 @@
68
68
  }
69
69
 
70
70
  code {
71
- color: var(--yc-color-text-misc);
71
+ color: var(--g-color-text-misc);
72
72
  }
73
73
 
74
74
  pre > code {
75
- color: var(--yc-color-text-primary);
75
+ color: var(--g-color-text-primary);
76
76
  }
77
77
 
78
78
  table {
79
- color: var(--yc-color-text-primary);
80
- border: 1px solid var(--yc-color-line-generic);
81
- background: var(--yc-color-base-background);
79
+ color: var(--g-color-text-primary);
80
+ border: 1px solid var(--g-color-line-generic);
81
+ background: var(--g-color-base-background);
82
82
  }
83
83
 
84
84
  thead tr,
85
85
  table tr:nth-child(2n) {
86
- background-color: var(--yc-color-base-generic);
86
+ background-color: var(--g-color-base-generic);
87
87
  }
88
88
 
89
89
  &_media {
90
90
  @include text-size(body-3);
91
- color: var(--yc-color-text-secondary);
91
+ color: var(--g-color-text-secondary);
92
92
  }
93
93
 
94
94
  &_breadcrumbs {
95
95
  @include text-size(body-2);
96
- color: var(--yc-text-color-base);
96
+ color: var(--g-text-color-base);
97
97
  }
98
98
 
99
99
  a {
100
- color: var(--yc-color-text-link);
100
+ color: var(--g-color-text-link);
101
101
 
102
102
  &:hover {
103
- color: var(--yc-color-text-link-hover);
103
+ color: var(--g-color-text-link-hover);
104
104
  }
105
105
  }
106
106
 
107
107
  .yfm-tab {
108
108
  &:hover,
109
109
  &:active {
110
- color: var(--yc-color-text-link-hover);
110
+ color: var(--g-color-text-link-hover);
111
111
  }
112
112
 
113
113
  &.active {
114
- border-bottom-color: var(--yc-color-text-link);
114
+ border-bottom-color: var(--g-color-text-link);
115
115
  }
116
116
  }
117
117