@rescui/typography 0.6.0 → 0.7.0
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/lib/create-text-cn.d.ts +1 -1
- package/lib/create-text-cn.js +7 -1
- package/lib/index.css +37 -10
- package/lib/mixins.pcss +41 -9
- package/package.json +2 -2
package/lib/create-text-cn.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ export declare type Texts = 'rs-text-1' | 'rs-text-2' | 'rs-text-3';
|
|
|
5
5
|
export declare type Link = 'rs-link';
|
|
6
6
|
export declare type OrderedList = 'rs-ol';
|
|
7
7
|
export declare type UnorderedList = 'rs-ul';
|
|
8
|
-
export declare type Others = 'rs-super-hero' | 'rs-digits' | 'rs-hero' | 'rs-subtitle-1' | 'rs-h1' | 'rs-subtitle-2' | 'rs-h2' | 'rs-h3' | 'rs-h4' | 'rs-h5' | 'rs-overline' | 'rs-pre' | 'rs-code' | 'rs-link' | 'rs-article';
|
|
8
|
+
export declare type Others = 'rs-super-hero' | 'rs-digits-1' | 'rs-digits-2' | 'rs-hero' | 'rs-subtitle-1' | 'rs-h1' | 'rs-subtitle-2' | 'rs-h2' | 'rs-h3' | 'rs-h4' | 'rs-h5' | 'rs-overline' | 'rs-pre' | 'rs-code' | 'rs-link' | 'rs-article';
|
|
9
9
|
export declare type Type = Texts | Link | OrderedList | Others | UnorderedList;
|
|
10
10
|
export declare type Hardness = 'average' | 'hard' | 'pale';
|
|
11
11
|
export declare type TextsParams = {
|
package/lib/create-text-cn.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import _includesInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/includes";
|
|
2
2
|
import bemCnFast from 'bem-cn-fast';
|
|
3
|
-
var THEMED_TYPES = ['rs-super-hero', 'rs-digits', 'rs-hero', 'rs-subtitle-1', 'rs-h1', 'rs-subtitle-2', 'rs-h2', 'rs-h3', 'rs-h4', 'rs-h5', 'rs-overline', 'rs-pre', 'rs-code', 'rs-link', 'rs-article', 'rs-text-1', 'rs-text-2', 'rs-text-3', 'rs-link'];
|
|
3
|
+
var THEMED_TYPES = ['rs-super-hero', 'rs-digits-1', 'rs-digits-2', 'rs-hero', 'rs-subtitle-1', 'rs-h1', 'rs-subtitle-2', 'rs-h2', 'rs-h3', 'rs-h4', 'rs-h5', 'rs-overline', 'rs-pre', 'rs-code', 'rs-link', 'rs-article', 'rs-text-1', 'rs-text-2', 'rs-text-3', 'rs-link'];
|
|
4
4
|
|
|
5
5
|
function createTextCn(theme) {
|
|
6
6
|
if (!theme) {
|
|
@@ -24,6 +24,12 @@ function createTextCn(theme) {
|
|
|
24
24
|
_ref$offsetItems = _ref.offsetItems,
|
|
25
25
|
offsetItems = _ref$offsetItems === void 0 ? undefined : _ref$offsetItems;
|
|
26
26
|
|
|
27
|
+
if (type === 'rs-digits') {
|
|
28
|
+
// eslint-disable-next-line no-param-reassign
|
|
29
|
+
type = 'rs-digits-1';
|
|
30
|
+
console.warn("'rs-digits' style is deprecated, please use 'rs-digits-1' instead");
|
|
31
|
+
}
|
|
32
|
+
|
|
27
33
|
return bemCnFast(type)({
|
|
28
34
|
'paragraph-offset-auto': paragraphOffsetAuto,
|
|
29
35
|
hardness: hardness,
|
package/lib/index.css
CHANGED
|
@@ -43,37 +43,64 @@
|
|
|
43
43
|
color:#FFFFFF;
|
|
44
44
|
color:var(--rs-typography-color-hard, #FFFFFF);
|
|
45
45
|
}
|
|
46
|
-
.rs-digits{
|
|
46
|
+
.rs-digits-1{
|
|
47
47
|
letter-spacing:-0.005em;
|
|
48
48
|
font-variant-numeric:tabular-nums;
|
|
49
49
|
font-family:'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
50
50
|
font-family:var(--rs-font-family-headers, var(--rs-font-family-jb-sans, 'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif));
|
|
51
51
|
font-size:69px;
|
|
52
|
-
font-size:var(--rs-digits-font-size, 69px);
|
|
52
|
+
font-size:var(--rs-digits-1-font-size, 69px);
|
|
53
53
|
font-weight:320;
|
|
54
54
|
font-weight:var(--rs-font-weight-light, 320);
|
|
55
55
|
line-height:71px;
|
|
56
|
-
line-height:var(--rs-digits-line-height, 71px);
|
|
56
|
+
line-height:var(--rs-digits-1-line-height, 71px);
|
|
57
57
|
}
|
|
58
58
|
@media screen and (max-width: 640px){
|
|
59
|
-
.rs-digits{
|
|
60
|
-
--rs-digits-font-size:var(--rs-digits-font-size
|
|
61
|
-
--rs-digits-line-height:var(--rs-digits-line-height
|
|
59
|
+
.rs-digits-1{
|
|
60
|
+
--rs-digits-1-font-size:var(--rs-digits-2-font-size, 40px);
|
|
61
|
+
--rs-digits-1-line-height:var(--rs-digits-2-line-height, 44px);
|
|
62
62
|
letter-spacing:normal;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
.rs-reset-letter-spacing .rs-digits{
|
|
65
|
+
.rs-reset-letter-spacing .rs-digits-1{
|
|
66
66
|
letter-spacing:normal;
|
|
67
67
|
}
|
|
68
|
-
.rs-digits {
|
|
68
|
+
.rs-digits-1 {
|
|
69
69
|
color:#19191C;
|
|
70
70
|
color:var(--rs-typography-color-hard, #19191C);
|
|
71
71
|
}
|
|
72
|
-
.rs-
|
|
72
|
+
.rs-digits-1_theme_dark{
|
|
73
73
|
color:#FFFFFF;
|
|
74
74
|
color:var(--rs-typography-color-hard, #FFFFFF);
|
|
75
75
|
}
|
|
76
|
-
[class*='_theme_dark'] .rs-
|
|
76
|
+
[class*='_theme_dark'] .rs-digits-1_theme_auto{
|
|
77
|
+
color:#FFFFFF;
|
|
78
|
+
color:var(--rs-typography-color-hard, #FFFFFF);
|
|
79
|
+
}
|
|
80
|
+
.rs-digits-2{
|
|
81
|
+
letter-spacing:-0.005em;
|
|
82
|
+
font-variant-numeric:tabular-nums;
|
|
83
|
+
font-family:'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
84
|
+
font-family:var(--rs-font-family-headers, var(--rs-font-family-jb-sans, 'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif));
|
|
85
|
+
font-size:40px;
|
|
86
|
+
font-size:var(--rs-digits-2-font-size, 40px);
|
|
87
|
+
font-weight:320;
|
|
88
|
+
font-weight:var(--rs-font-weight-light, 320);
|
|
89
|
+
line-height:44px;
|
|
90
|
+
line-height:var(--rs-digits-2-line-height, 44px);
|
|
91
|
+
}
|
|
92
|
+
.rs-reset-letter-spacing .rs-digits-2{
|
|
93
|
+
letter-spacing:normal;
|
|
94
|
+
}
|
|
95
|
+
.rs-digits-2 {
|
|
96
|
+
color:#19191C;
|
|
97
|
+
color:var(--rs-typography-color-hard, #19191C);
|
|
98
|
+
}
|
|
99
|
+
.rs-digits-2_theme_dark{
|
|
100
|
+
color:#FFFFFF;
|
|
101
|
+
color:var(--rs-typography-color-hard, #FFFFFF);
|
|
102
|
+
}
|
|
103
|
+
[class*='_theme_dark'] .rs-digits-2_theme_auto{
|
|
77
104
|
color:#FFFFFF;
|
|
78
105
|
color:var(--rs-typography-color-hard, #FFFFFF);
|
|
79
106
|
}
|
package/lib/mixins.pcss
CHANGED
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
margin-top:96px;
|
|
90
90
|
margin-top:calc(var(--rs-flow-unit, 8px)*12);
|
|
91
91
|
}
|
|
92
|
-
@define-mixin rs-digits-base{
|
|
92
|
+
@define-mixin rs-digits-1-base{
|
|
93
93
|
letter-spacing:-0.005em;
|
|
94
94
|
|
|
95
95
|
font-variant-numeric:tabular-nums;
|
|
@@ -100,15 +100,15 @@
|
|
|
100
100
|
|
|
101
101
|
font-size:69px;
|
|
102
102
|
|
|
103
|
-
font-size:var(--rs-digits-font-size, 69px);
|
|
103
|
+
font-size:var(--rs-digits-1-font-size, 69px);
|
|
104
104
|
font-weight:320;
|
|
105
105
|
font-weight:var(--rs-font-weight-light, 320);
|
|
106
106
|
line-height:71px;
|
|
107
|
-
line-height:var(--rs-digits-line-height, 71px);
|
|
107
|
+
line-height:var(--rs-digits-1-line-height, 71px);
|
|
108
108
|
|
|
109
109
|
@media screen and (max-width: 640px){
|
|
110
|
-
--rs-digits-font-size:var(--rs-digits-font-size
|
|
111
|
-
--rs-digits-line-height:var(--rs-digits-line-height
|
|
110
|
+
--rs-digits-1-font-size:var(--rs-digits-2-font-size, 40px);
|
|
111
|
+
--rs-digits-1-line-height:var(--rs-digits-2-line-height, 44px);
|
|
112
112
|
letter-spacing:normal;
|
|
113
113
|
}
|
|
114
114
|
|
|
@@ -116,14 +116,46 @@
|
|
|
116
116
|
letter-spacing:normal;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
@define-mixin rs-digits{
|
|
120
|
-
@mixin rs-digits-base;
|
|
119
|
+
@define-mixin rs-digits-1{
|
|
120
|
+
@mixin rs-digits-1-base;
|
|
121
121
|
@mixin rs-text-hardness-hard;
|
|
122
122
|
}
|
|
123
|
-
@define-mixin rs-digits-theme-dark{
|
|
123
|
+
@define-mixin rs-digits-1-theme-dark{
|
|
124
124
|
@mixin rs-text-hardness-hard-theme-dark;
|
|
125
125
|
}
|
|
126
|
-
@define-mixin rs-digits-offset-top{
|
|
126
|
+
@define-mixin rs-digits-1-offset-top{
|
|
127
|
+
margin-top:32px;
|
|
128
|
+
margin-top:calc(var(--rs-flow-unit, 8px)*4);
|
|
129
|
+
}
|
|
130
|
+
@define-mixin rs-digits-2-base{
|
|
131
|
+
letter-spacing:-0.005em;
|
|
132
|
+
|
|
133
|
+
font-variant-numeric:tabular-nums;
|
|
134
|
+
|
|
135
|
+
font-family:'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif;
|
|
136
|
+
|
|
137
|
+
font-family:var(--rs-font-family-headers, var(--rs-font-family-jb-sans, 'JetBrains Sans', Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Droid Sans', 'Helvetica Neue', Arial, sans-serif));
|
|
138
|
+
|
|
139
|
+
font-size:40px;
|
|
140
|
+
|
|
141
|
+
font-size:var(--rs-digits-2-font-size, 40px);
|
|
142
|
+
font-weight:320;
|
|
143
|
+
font-weight:var(--rs-font-weight-light, 320);
|
|
144
|
+
line-height:44px;
|
|
145
|
+
line-height:var(--rs-digits-2-line-height, 44px);
|
|
146
|
+
|
|
147
|
+
.rs-reset-letter-spacing &{
|
|
148
|
+
letter-spacing:normal;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
@define-mixin rs-digits-2{
|
|
152
|
+
@mixin rs-digits-2-base;
|
|
153
|
+
@mixin rs-text-hardness-hard;
|
|
154
|
+
}
|
|
155
|
+
@define-mixin rs-digits-2-theme-dark{
|
|
156
|
+
@mixin rs-text-hardness-hard-theme-dark;
|
|
157
|
+
}
|
|
158
|
+
@define-mixin rs-digits-2-offset-top{
|
|
127
159
|
margin-top:32px;
|
|
128
160
|
margin-top:calc(var(--rs-flow-unit, 8px)*4);
|
|
129
161
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rescui/typography",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "JetBrains",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"build": "rescui-scripts build --no-css-modules && yarn run build-mixins && shx cp src/font-*.css lib",
|
|
41
41
|
"build-mixins": "rescui-scripts postcss --glob mixins.pcss --config ./.postcssrc-mixins.js --no-clean-out && shx mv lib/mixins.css lib/mixins.pcss && shx rm lib/mixins.css.map"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "90715a8ea8c558b23c243bc092be4ded23e4192c"
|
|
44
44
|
}
|