enr 0.2.3-alpha.3 → 1.0.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.
@@ -0,0 +1,242 @@
1
+ @keyframes loading {
2
+ // 45 - 25 * Math.sin((Math.PI * 5) / 12)
3
+ // 位置公式 35 - 25 * Math.cos((Math.PI * 5) / 12)
4
+
5
+ 100%,
6
+ 0% {
7
+ background-size:
8
+ 10% 10%,
9
+ 10% 10%,
10
+ 10% 10%,
11
+ 10% 10%;
12
+ background-position:
13
+ 25% 45%,
14
+ 41.7% 45%,
15
+ 58.3% 45%,
16
+ 75% 45%;
17
+ }
18
+
19
+ 20%,
20
+ 80% {
21
+ background-size: 2.5% 2.5%;
22
+ background-position: 25% 45%;
23
+ }
24
+
25
+ 22% {
26
+ background-size:
27
+ 3.75% 3.75%,
28
+ 2.5% 2.5%,
29
+ 2.5% 2.5%,
30
+ 2.5% 2.5%;
31
+ background-position:
32
+ // 位置 1
33
+ 25.85% 38.53%,
34
+ 25% 45%,
35
+ 25% 45%,
36
+ 25% 45%;
37
+ }
38
+
39
+ 24% {
40
+ background-size:
41
+ 5% 5%,
42
+ 2.5% 2.5%,
43
+ 2.5% 2.5%,
44
+ 2.5% 2.5%;
45
+ background-position:
46
+ // 位置 2
47
+ 28.35% 32.5%,
48
+ 25% 45%,
49
+ 25% 45%,
50
+ 25% 45%;
51
+ }
52
+
53
+ 26% {
54
+ background-size:
55
+ 6.25% 6.25%,
56
+ 2.5% 2.5%,
57
+ 2.5% 2.5%,
58
+ 2.5% 2.5%;
59
+ background-position:
60
+ // 位置 3
61
+ 32.32% 27.32%,
62
+ 25% 45%,
63
+ 25% 45%,
64
+ 25% 45%;
65
+ }
66
+
67
+ 28% {
68
+ background-size:
69
+ 7.5% 7.5%,
70
+ 3.75% 3.75%,
71
+ 2.5% 2.5%,
72
+ 2.5% 2.5%;
73
+ background-position:
74
+ // 位置 4
75
+ 37.5% 23.35%,
76
+ // 位置 1
77
+ 25.85% 38.53%,
78
+ 25% 45%,
79
+ 25% 45%;
80
+ }
81
+
82
+ 30% {
83
+ background-size:
84
+ 8.75% 8.75%,
85
+ 5% 5%,
86
+ 2.5% 2.5%,
87
+ 2.5% 2.5%;
88
+ background-position:
89
+ // 位置 5
90
+ 43.53% 20.85%,
91
+ // 位置 2
92
+ 28.35% 32.5%,
93
+ 25% 45%,
94
+ 25% 45%;
95
+ }
96
+
97
+ 32% {
98
+ background-size:
99
+ 10% 10%,
100
+ 6.25% 6.25%,
101
+ 3.75% 3.75%,
102
+ 2.5% 2.5%;
103
+ background-position:
104
+ // 位置 6
105
+ 50% 20%,
106
+ // 位置 3
107
+ 32.32% 27.32%,
108
+ // 位置 1
109
+ 25.85% 38.53%,
110
+ 25% 45%;
111
+ }
112
+
113
+ 34% {
114
+ background-size:
115
+ 10% 10%,
116
+ 7.5% 7.5%,
117
+ 5% 5%,
118
+ 2.5% 2.5%;
119
+ background-position:
120
+ // 位置 7
121
+ 56.47% 20.85%,
122
+ // 位置 4
123
+ 37.32% 23.35%,
124
+ // 位置 2
125
+ 28.35% 32.5%,
126
+ // 位置 1
127
+ 25.85% 38.53%;
128
+ }
129
+
130
+ $Pi: 3.1415926;
131
+
132
+ @for $i from 18 through 33 {
133
+ #{calc($i / 50 * 100%)} {
134
+ background-position: #{(50 - (25 * cos(($Pi * ($i - 10)) / 12))) * 1%} #{(45 - 25 * sin(($Pi * ($i - 10)) / 12)) * 1%},
135
+ #{(50 - (25 * cos(($Pi * ($i - 13)) / 12))) * 1%} #{(45 - 25 * sin(($Pi * ($i - 13)) / 12)) * 1%},
136
+ #{(50 - (25 * cos(($Pi * ($i - 15)) / 12))) * 1%} #{(45 - 25 * sin(($Pi * ($i - 15)) / 12)) * 1%},
137
+ #{(50 - (25 * cos(($Pi * ($i - 17)) / 12))) * 1%} #{(45 - 25 * sin(($Pi * ($i - 17)) / 12)) * 1%};
138
+ }
139
+ }
140
+
141
+ 68% {
142
+ background-size:
143
+ 10% 10%,
144
+ 7.5% 7.5%,
145
+ 5% 5%,
146
+ 2.5% 2.5%;
147
+ background-position:
148
+ // 位置 0
149
+ 25% 45%,
150
+ // 位置 22
151
+ 28.35% 57.45%,
152
+ // 位置 20
153
+ 37.45% 66.65%,
154
+ // 位置 18
155
+ 48% 70%;
156
+ }
157
+
158
+ 70% {
159
+ background-size:
160
+ 8.75% 8.75%,
161
+ 7.5% 7.5%,
162
+ 5% 5%,
163
+ 2.5% 2.5%;
164
+ background-position:
165
+ // 位置 0
166
+ 25% 45%,
167
+ // 位置 23
168
+ 25.85% 51.47%,
169
+ // 位置 21
170
+ 32.32% 62.68%,
171
+ // 位置 19
172
+ 43.53% 69.15%;
173
+ }
174
+
175
+ 72% {
176
+ background-size:
177
+ 7.5% 7.5%,
178
+ 7.5% 7.5%,
179
+ 5% 5%,
180
+ 2.5% 2.5%;
181
+ background-position:
182
+ // 位置 0
183
+ 25% 45%,
184
+ // 位置 0
185
+ 25% 45%,
186
+ // 位置 22
187
+ 28.35% 57.45%,
188
+ // 位置 20
189
+ 37.45% 66.65%;
190
+ }
191
+
192
+ 74% {
193
+ background-size:
194
+ 6.25% 6.25%,
195
+ 6.25% 6.25%,
196
+ 5% 5%,
197
+ 2.5% 2.5%;
198
+ background-position:
199
+ // 位置 0
200
+ 25% 45%,
201
+ // 位置 0
202
+ 25% 45%,
203
+ // 位置 23
204
+ 25.85% 51.47%,
205
+ // 位置 21
206
+ 32.32% 62.68%;
207
+ }
208
+
209
+ 76% {
210
+ background-size:
211
+ 5% 5%,
212
+ 5% 5%,
213
+ 5% 5%,
214
+ 2.5% 2.5%;
215
+ background-position:
216
+ // 位置 0
217
+ 25% 45%,
218
+ // 位置 0
219
+ 25% 45%,
220
+ // 位置 0
221
+ 25% 45%,
222
+ // 位置 22
223
+ 28.35% 57.45%;
224
+ }
225
+
226
+ 78% {
227
+ background-size:
228
+ 3.75% 3.75%,
229
+ 3.75% 3.75%,
230
+ 3.75% 3.75%,
231
+ 2.5% 2.5%;
232
+ background-position:
233
+ // 位置 0
234
+ 25% 45%,
235
+ // 位置 0
236
+ 25% 45%,
237
+ // 位置 0
238
+ 25% 45%,
239
+ // 位置 23
240
+ 25.85% 51.47%;
241
+ }
242
+ }
@@ -0,0 +1 @@
1
+ *,*::before,*::after{box-sizing:border-box;position:relative}html,body,figure,blockquote,dl,dd{margin:0}html{scroll-behavior:smooth}body{font-family:var(--en-font-body);font-size:var(--en-base-font-size);line-height:var(--en-font-content-line-height);text-rendering:optimizeSpeed;scroll-behavior:smooth}a:not([class]){text-decoration-skip-ink:auto}a{text-decoration:none}img,picture{display:block;max-width:100%}em{font-variation-settings:"slnt"-10}input,button,textarea,select{font:inherit}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{transition-delay:99999s;transition:color 99999s ease-out,background-color 99999s ease-out;-webkit-transition-delay:99999s;-webkit-transition:color 99999s ease-out,background-color 99999s ease-out;-webkit-text-fill-color:var(--en-text-primary)}@media(prefers-reduced-motion: reduce){html{scroll-behavior:auto}*,*::before,*::after{animation-duration:.01ms !important;animation-iteration-count:1 !important;scroll-behavior:auto !important;transition-duration:.01ms !important}}
package/styles/reset.scss CHANGED
@@ -1,16 +1,16 @@
1
- @use "./vars-color.scss" as *;
1
+ @use './vars-color.scss' as *;
2
2
 
3
3
  /* 盒模型 规则 */
4
4
  *,
5
5
  *::before,
6
6
  *::after {
7
7
  box-sizing: border-box;
8
+ position: relative;
8
9
  }
9
10
 
10
11
  /* 移除默认的 margin 外边距 */
11
12
  html,
12
13
  body,
13
- p,
14
14
  figure,
15
15
  blockquote,
16
16
  dl,
@@ -29,6 +29,7 @@ body {
29
29
  font-size: var(--en-base-font-size);
30
30
  line-height: var(--en-font-content-line-height);
31
31
  text-rendering: optimizeSpeed; // 文本渲染,是快速还是清晰
32
+ scroll-behavior: smooth;
32
33
  }
33
34
 
34
35
  /* 链接元素没有 class 类时的展示 */
@@ -49,7 +50,7 @@ picture {
49
50
 
50
51
  /* Fix Inter font bug: 'em' not slanted in Safari. See issue: https://github.com/mdn/yari/issues/7203 */
51
52
  em {
52
- font-variation-settings: "slnt" -10;
53
+ font-variation-settings: 'slnt'-10;
53
54
  }
54
55
 
55
56
  /* Inherit fonts for inputs and buttons */
@@ -73,7 +74,7 @@ input:-webkit-autofill:active {
73
74
  -webkit-transition:
74
75
  color 99999s ease-out,
75
76
  background-color 99999s ease-out;
76
- -webkit-text-fill-color: var(--text-primary);
77
+ -webkit-text-fill-color: var(--en-text-primary);
77
78
  }
78
79
 
79
80
  /* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@@ -0,0 +1,85 @@
1
+ @use './vars-color.scss' as color;
2
+
3
+ @mixin dark {
4
+ // 主要文本色(正文、标题)
5
+ --en-text-primary: var(--en-color-beige);
6
+ --en-text-primary-rgb: var(--en-color-beige-rgb);
7
+ // 次要文本色(辅助说明)
8
+ --en-text-secondary: var(--en-color-darkness-20);
9
+ --en-text-secondary-rgb: var(--en-color-darkness-20-rgb);
10
+ // 备注、浇注的文本色
11
+ --en-text-tertiary: var(--en-color-darkness-40);
12
+ --en-text-tertiary-rgb: var(--en-color-darkness-40-rgb);
13
+ --en-text-active: var(--en-color-darkness-50);
14
+ --en-text-active-rgb: var(--en-color-darkness-50-rgb);
15
+ --en-text-inactive: rgba(var(--en-color-darkness-20-rgb), 0.76);
16
+ --en-text-inactive-rgb: var(--en-color-darkness-20-rgb);
17
+ --en-text-link: var(--en-color-blue-30);
18
+ --en-text-link-rgb: var(--en-color-blue-30-rgb);
19
+ --en-text-invert: var(--en-color-darkness-90); // 文本反转色
20
+ --en-text-invert-rgb: var(--en-color-darkness-90-rgb); // 文本反转色
21
+ --en-text-muted: var(--en-color-darkness-60); // 温和文本色
22
+ --en-text-muted-rgb: var(--en-color-darkness-60-rgb); // 温和文本色
23
+ // 背景色
24
+ --en-background-primary: var(--en-color-darkness-90);
25
+ --en-background-primary-rgb: var(--en-color-darkness-90-rgb);
26
+ --en-background-secondary: var(--en-color-darkness-75);
27
+ --en-background-secondary-rgb: var(--en-color-darkness-75-rgb);
28
+ --en-background-tertiary: var(--en-color-darkness-60);
29
+ --en-background-tertiary-rgb: var(--en-color-darkness-60-rgb);
30
+ --en-background-weird: var(--en-color-darkness-70);
31
+ --en-background-weird-rgb: var(--en-color-darkness-70-rgb);
32
+ // 边框
33
+ --en-border-primary: var(--en-color-darkness-50);
34
+ --en-border-primary-rgb: var(--en-color-darkness-50-rgb);
35
+ --en-border-secondary: var(--en-color-darkness-60);
36
+ --en-border-secondary-rgb: var(--en-color-darkness-60-rgb);
37
+ // 成功盒子的提示框
38
+ --en-border-success: var(--en-color-green-20);
39
+ --en-border-success-rgb: var(--en-color-green-20-rgb);
40
+ // 按钮
41
+ --en-button-primary: var(--en-color-darkness-10);
42
+ --en-button-primary-rgb: var(--en-color-darkness-10-rgb);
43
+ --en-button-primary-hover: var(--en-color-darkness-15);
44
+ --en-button-primary-hover-rgb: var(--en-color-darkness-15-rgb);
45
+ --en-button-primary-active: var(--en-color-darkness-30);
46
+ --en-button-primary-active-rgb: var(--en-color-darkness-30-rgb);
47
+ --en-button-primary-inactive: var(--en-color-white);
48
+ --en-button-primary-inactive-rgb: var(--en-color-white-rgb);
49
+ --en-button-secondary: var(--en-color-darkness-70);
50
+ --en-button-secondary-rgb: var(--en-color-darkness-70-rgb);
51
+ --en-button-secondary-hover: var(--en-color-darkness-50);
52
+ --en-button-secondary-hover-rgb: var(--en-color-darkness-50-rgb);
53
+ --en-button-secondary-active: var(--en-color-darkness-40);
54
+ --en-button-secondary-active-rgb: var(--en-color-darkness-40-rgb);
55
+ --en-button-secondary-inactive: var(--en-color-darkness-70);
56
+ --en-button-secondary-inactive-rgb: var(--en-color-darkness-70-rgb);
57
+ --en-button-secondary-border-focus: var(--en-color-blue-60);
58
+ --en-button-secondary-border-focus-rgb: var(--en-color-blue-60-rgb);
59
+ // 红框按钮
60
+ --en-button-secondary-border-red: var(--en-color-red-30);
61
+ --en-button-secondary-border-red-rgb: var(--en-color-red-30-rgb);
62
+ --en-button-secondary-border-red-focus: var(--en-color-red-10);
63
+ --en-button-secondary-border-red-focus-rgb: var(--en-color-red-10-rgb);
64
+ --en-box-shadow-light: 0 1px 2px rgba(var(--en-color-darkness-10), 0.2);
65
+ --en-box-shadow-dark: 0 1px 6px rgba(var(--en-color-darkness-10), 0.2);
66
+ // ios 风格的按钮组
67
+ --en-close-button: var(--en-color-close-button);
68
+ // 输入框
69
+ --en-input-primary-text: var(--en-text-primary);
70
+ --en-input-primary-text-rgb: var(--en-text-primary-rgb);
71
+ --en-input-primary-background: var(--en-color-darkness-80);
72
+ --en-input-primary-background-rgb: var(--en-color-darkness-80-rgb);
73
+ --en-input-primary-placeholder-text: var(--en-color-darkness-45);
74
+ --en-input-primary-focus-visible-outline: var(--en-color-green-60) outset 1.5px;
75
+ --en-input-revers-text: var(--en-color-green-30);
76
+ --en-input-revers-text-rgb: var(--en-color-green-30-rgb);
77
+ --en-input-revers-background: var(--en-color-darkness-80);
78
+ --en-input-revers-background-rgb: var(--en-color-darkness-80-rgb);
79
+ --en-input-revers-placeholder-text: var(--en-color-darkness-45);
80
+ --en-input-revers-focus-visible-outline: var(--en-color-green-80) solid 2px;
81
+
82
+ color-scheme: dark;
83
+ color: var(--en-text-primary, #f0f2e5);
84
+ background-color: var(--en-background-primary, #333333);
85
+ }
@@ -0,0 +1,83 @@
1
+ @use './vars-color.scss' as color;
2
+
3
+ @mixin light {
4
+ // 主要文本色(正文、标题)
5
+ --en-text-primary: var(--en-color-darkness-85);
6
+ --en-text-primary-rgb: var(--en-color-darkness-85-rgb);
7
+ // 次要文本色(辅助说明)
8
+ --en-text-secondary: var(--en-color-darkness-70);
9
+ --en-text-secondary-rgb: var(--en-color-darkness-70-rgb);
10
+ // 备注、浇注的文本色
11
+ --en-text-tertiary: var(--en-color-darkness-40);
12
+ --en-text-tertiary-rgb: var(--en-color-darkness-40-rgb);
13
+ --en-text-active: var(--en-color-darkness-50);
14
+ --en-text-active-rgb: var(--en-color-darkness-50-rgb);
15
+ --en-text-inactive: rgba(var(--en-color-darkness-40-rgb), 0.76);
16
+ --en-text-inactive-rgb: var(--en-color-darkness-40-rgb);
17
+ --en-text-link: var(--en-color-blue-70);
18
+ --en-text-link-rgb: var(--en-color-blue-70-rgb);
19
+ --en-text-invert: var(--en-color-white); // 文本反转色
20
+ --en-text-invert-rgb: var(--en-color-white-rgb); // 文本反转色
21
+ --en-text-muted: var(--en-color-darkness-65); // 温和文本色
22
+ --en-text-muted-rgb: var(--en-color-darkness-65-rgb); // 温和文本色
23
+ // 背景色
24
+ --en-background-primary: var(--en-color-darkness-10);
25
+ --en-background-primary-rgb: var(--en-color-darkness-10-rgb);
26
+ --en-background-secondary: var(--en-color-darkness-15);
27
+ --en-background-secondary-rgb: var(--en-color-darkness-15-rgb);
28
+ --en-background-tertiary: var(--en-color-darkness-20);
29
+ --en-background-tertiary-rgb: var(--en-color-darkness-20-rgb);
30
+ --en-background-weird: var(--en-color-black);
31
+ --en-background-weird-rgb: var(--en-color-black-rgb);
32
+ // 边框
33
+ --en-border-primary: var(--en-color-darkness-10);
34
+ --en-border-primary-rgb: var(--en-color-darkness-10-rgb);
35
+ --en-border-secondary: var(--en-color-darkness-15);
36
+ --en-border-secondary-rgb: var(--en-color-darkness-15-rgb);
37
+ // 成功盒子的提示框
38
+ --en-border-success: var(--en-color-green-20);
39
+ --en-border-success-rgb: var(--en-color-green-20-rgb);
40
+ // 按钮
41
+ --en-button-primary: var(--en-color-darkness-85);
42
+ --en-button-primary-rgb: var(--en-color-darkness-85-rgb);
43
+ --en-button-primary-hover: var(--en-color-darkness-60);
44
+ --en-button-primary-hover-rgb: var(--en-color-darkness-60-rgb);
45
+ --en-button-primary-active: var(--en-color-darkness-40);
46
+ --en-button-primary-active-rgb: var(--en-color-darkness-40-rgb);
47
+ --en-button-primary-inactive: var(--en-color-darkness-85);
48
+ --en-button-primary-inactive-rgb: var(--en-color-darkness-85-rgb);
49
+ --en-button-secondary: var(--en-color-white);
50
+ --en-button-secondary-rgb: var(--en-color-white-rgb);
51
+ --en-button-secondary-hover: var(--en-color-darkness-20);
52
+ --en-button-secondary-hover-rgb: var(--en-color-darkness-20-rgb);
53
+ --en-button-secondary-active: var(--en-color-darkness-20);
54
+ --en-button-secondary-active-rgb: var(--en-color-darkness-20-rgb);
55
+ --en-button-secondary-inactive: var(--en-color-darkness-15);
56
+ --en-button-secondary-inactive-rgb: var(--en-color-darkness-15-rgb);
57
+ --en-button-secondary-border-focus: var(--en-color-blue-50);
58
+ --en-button-secondary-border-focus-rgb: var(--en-color-blue-50-rgb);
59
+ // 红框按钮
60
+ --en-button-secondary-border-red: var(--en-color-red-30);
61
+ --en-button-secondary-border-red-rgb: var(--en-color-red-30-rgb);
62
+ --en-button-secondary-border-red-focus: var(--en-color-red-10);
63
+ --en-button-secondary-border-red-focus-rgb: var(--en-color-red-10-rgb);
64
+ --en-box-shadow-light: 0 1px 2px rgba(var(--en-color-darkness-80), 0.05);
65
+ --en-box-shadow-dark: 0 1px 6px rgba(var(--en-color-darkness-80), 0.1);
66
+ // 输入框
67
+ --en-input-primary-text: var(--en-text-primary);
68
+ --en-input-primary-text-rgb: var(--en-text-primary-rgb);
69
+ --en-input-primary-background: var(--en-background-primary);
70
+ --en-input-primary-background-rgb: var(--en-background-primary-rgb);
71
+ --en-input-primary-placeholder-text: var(--en-color-darkness-50);
72
+ --en-input-primary-focus-visible-outline: var(--en-color-blue-60) solid 2px;
73
+ --en-input-revers-text: var(--en-color-green-20);
74
+ --en-input-revers-text-rgb: var(--en-color-green-20-rgb);
75
+ --en-input-revers-background: var(--en-color-darkness-90);
76
+ --en-input-revers-background-rgb: var(--en-color-darkness-90-rgb);
77
+ --en-input-revers-placeholder-text: var(--en-color-darkness-50);
78
+ --en-input-revers-focus-visible-outline: var(--en-color-green-60) solid 2px;
79
+
80
+ color-scheme: light;
81
+ color: var(--en-text-primary, #3a3b3f);
82
+ background-color: var(--en-background-primary, #f0f2e6);
83
+ }
@@ -0,0 +1 @@
1
+ // 怪异黑模式