@meduza/ui-kit-2 0.1.64 → 0.1.66
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/dist/ui-kit-2.cjs.development.js +6 -6
- package/dist/ui-kit-2.cjs.development.js.map +1 -1
- package/dist/ui-kit-2.cjs.production.min.js +1 -1
- package/dist/ui-kit-2.cjs.production.min.js.map +1 -1
- package/dist/ui-kit-2.esm.js +6 -6
- package/dist/ui-kit-2.esm.js.map +1 -1
- package/dist/ui-kit.css +837 -787
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/EmbedBlock/EmbedBlock.module.css +1 -1
- package/src/ListBlock/ListBlock.module.css +5 -5
- package/src/MediaCaption/MediaCaption.module.css +13 -9
- package/src/Meta/Meta.module.css +2 -2
- package/src/QuoteBlock/QuoteBlock.module.css +6 -6
- package/src/SimpleBlock/FootnoteLink.css +6 -14
- package/src/SimpleBlock/SimpleBlock.module.css +69 -40
- package/src/SimpleBlock/SimpleBlock.stories.tsx +3 -3
- package/src/SimpleTitle/index.tsx +2 -2
- package/src/SourceBlock/SourceBlock.module.css +15 -0
- package/src/SourceBlock/SourceBlock.stories.tsx +3 -3
- package/src/SvgSymbol/SvgSymbol.stories.module.css +28 -12
- package/src/SvgSymbol/SvgSymbol.stories.tsx +3 -3
- package/src/Toolbar/Toolbar.module.css +2 -1
- package/src/Toolbar/Toolbar.stories.tsx +4 -3
- package/src/ToolbarButton/ToolbarButton.module.css +8 -0
- package/src/ToolbarButton/ToolbarButton.stories.tsx +7 -3
- package/src/_storybook/PreviewWrapper/PreviewWrapper.module.css +6 -3
- package/src/vars-games.css +63 -0
package/package.json
CHANGED
package/src/.DS_Store
ADDED
|
Binary file
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
@import '../vars.css';
|
|
2
2
|
|
|
3
3
|
.root {
|
|
4
|
-
margin:
|
|
4
|
+
margin: calc(15rem / 16) 0;
|
|
5
5
|
padding: 0;
|
|
6
6
|
|
|
7
7
|
list-style: none;
|
|
8
8
|
|
|
9
9
|
font-family: $primaryFont;
|
|
10
|
-
font-size:
|
|
11
|
-
line-height:
|
|
10
|
+
font-size: calc(18rem / 16);
|
|
11
|
+
line-height: calc(24rem / 16);
|
|
12
12
|
|
|
13
13
|
@media $mobile {
|
|
14
14
|
font-size: 20px;
|
|
@@ -129,8 +129,8 @@
|
|
|
129
129
|
|
|
130
130
|
.isInImportantLead {
|
|
131
131
|
font-family: $secondaryFont;
|
|
132
|
-
font-size:
|
|
133
|
-
line-height:
|
|
132
|
+
font-size: 1rem;
|
|
133
|
+
line-height: calc(20rem / 16);
|
|
134
134
|
|
|
135
135
|
@media $portraitTablet {
|
|
136
136
|
font-size: 17px;
|
|
@@ -17,14 +17,15 @@
|
|
|
17
17
|
|
|
18
18
|
.caption {
|
|
19
19
|
max-width: 520px;
|
|
20
|
-
padding-top: 4px;
|
|
20
|
+
padding-top: calc(4px / 16);
|
|
21
21
|
|
|
22
22
|
color: $jet;
|
|
23
23
|
|
|
24
|
-
font-size:
|
|
25
|
-
line-height:
|
|
24
|
+
font-size: calc(14rem / 16);
|
|
25
|
+
line-height: calc(18rem / 16);
|
|
26
26
|
|
|
27
27
|
@media $mobile {
|
|
28
|
+
padding-top: 4px;
|
|
28
29
|
font-size: 16px;
|
|
29
30
|
line-height: 22px;
|
|
30
31
|
}
|
|
@@ -36,8 +37,8 @@
|
|
|
36
37
|
|
|
37
38
|
color: #666;
|
|
38
39
|
|
|
39
|
-
font-size:
|
|
40
|
-
line-height:
|
|
40
|
+
font-size: calc(12rem / 16);
|
|
41
|
+
line-height: 1rem;
|
|
41
42
|
|
|
42
43
|
@media $mobile {
|
|
43
44
|
padding-top: 3px;
|
|
@@ -45,7 +46,11 @@
|
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
.credit:first-child {
|
|
48
|
-
padding-top:
|
|
49
|
+
padding-top: calc(3rem / 16);
|
|
50
|
+
|
|
51
|
+
@media $mobile {
|
|
52
|
+
padding-top: 3px;
|
|
53
|
+
}
|
|
49
54
|
}
|
|
50
55
|
|
|
51
56
|
.dark .caption {
|
|
@@ -58,7 +63,7 @@
|
|
|
58
63
|
|
|
59
64
|
.video .caption,
|
|
60
65
|
.picture .caption {
|
|
61
|
-
padding-top:
|
|
66
|
+
padding-top: calc(10rem / 16);
|
|
62
67
|
|
|
63
68
|
@media $mobile {
|
|
64
69
|
padding-top: 12px;
|
|
@@ -67,7 +72,7 @@
|
|
|
67
72
|
|
|
68
73
|
.video .credit:first-child,
|
|
69
74
|
.picture .credit:first-child {
|
|
70
|
-
padding-top:
|
|
75
|
+
padding-top: calc(9rem / 16);
|
|
71
76
|
|
|
72
77
|
@media $mobile {
|
|
73
78
|
padding-top: 11px;
|
|
@@ -82,4 +87,3 @@
|
|
|
82
87
|
.desktop .caption {
|
|
83
88
|
max-width: 650px;
|
|
84
89
|
}
|
|
85
|
-
|
package/src/Meta/Meta.module.css
CHANGED
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
.root {
|
|
4
4
|
position: relative;
|
|
5
5
|
|
|
6
|
-
margin-bottom:
|
|
7
|
-
padding-left:
|
|
6
|
+
margin-bottom: calc(14rem / 16);
|
|
7
|
+
padding-left: calc(18rem / 16);
|
|
8
8
|
|
|
9
9
|
font-family: $primaryFont;
|
|
10
|
-
font-size:
|
|
11
|
-
line-height:
|
|
10
|
+
font-size: calc(18rem / 16);
|
|
11
|
+
line-height: calc(24rem / 16);
|
|
12
12
|
|
|
13
13
|
@media $mobile {
|
|
14
14
|
margin: 0 0 20px;
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
.root + .root {
|
|
23
|
-
margin-top: -
|
|
24
|
-
padding-top:
|
|
23
|
+
margin-top: calc(-14rem / 16);
|
|
24
|
+
padding-top: calc(14rem / 16);
|
|
25
25
|
|
|
26
26
|
@media $mobile {
|
|
27
27
|
margin-top: -20px;
|
|
@@ -10,8 +10,9 @@ span[data-body] {
|
|
|
10
10
|
white-space: pre-wrap;
|
|
11
11
|
|
|
12
12
|
border-radius: 4px;
|
|
13
|
-
background: #
|
|
14
|
-
box-shadow: inset 1px 0 $ash, inset 0 1px $ash, inset -1px 0 $ash,
|
|
13
|
+
background: #f8f8f8;
|
|
14
|
+
box-shadow: inset 1px 0 $ash, inset 0 1px $ash, inset -1px 0 $ash,
|
|
15
|
+
inset 0 -1px $ash;
|
|
15
16
|
|
|
16
17
|
@media $portraitTablet {
|
|
17
18
|
padding-bottom: 1px;
|
|
@@ -19,18 +20,9 @@ span[data-body] {
|
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
span[data-body]:hover {
|
|
22
|
-
background: #
|
|
23
|
-
box-shadow: inset 1px 0 #999, inset 0 1px #999, inset -1px 0 #999,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
.dark span[data-body] {
|
|
27
|
-
background-color: #5B5B5B;
|
|
28
|
-
box-shadow: inset 1px 0 #8B8B8B, inset 0 1px #8B8B8B, inset -1px 0 #8B8B8B, inset 0 -1px #8B8B8B;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.dark span[data-body]:hover {
|
|
32
|
-
background-color: #5B5B5B;
|
|
33
|
-
box-shadow: inset 1px 0 #747474, inset 0 1px #747474, inset -1px 0 #747474, inset 0 -1px #747474;
|
|
23
|
+
background: #f3f3f3;
|
|
24
|
+
box-shadow: inset 1px 0 #999, inset 0 1px #999, inset -1px 0 #999,
|
|
25
|
+
inset 0 -1px #999;
|
|
34
26
|
}
|
|
35
27
|
|
|
36
28
|
span[data-highlight='true'],
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
margin: 0 0 14px;
|
|
6
6
|
|
|
7
7
|
font-family: $primaryFont;
|
|
8
|
-
font-size:
|
|
9
|
-
line-height:
|
|
8
|
+
font-size: calc(18rem / 16);
|
|
9
|
+
line-height: calc(24rem / 16);
|
|
10
10
|
|
|
11
11
|
@media $mobile {
|
|
12
12
|
margin: 0 0 20px;
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
|
|
59
59
|
.h2 {
|
|
60
60
|
max-width: 520px;
|
|
61
|
-
margin: 0 0
|
|
61
|
+
margin: 0 0 calc(15rem / 16);
|
|
62
62
|
|
|
63
63
|
font-family: $primaryFont;
|
|
64
|
-
font-size:
|
|
64
|
+
font-size: calc(25rem / 16);
|
|
65
65
|
font-weight: bold;
|
|
66
|
-
line-height:
|
|
66
|
+
line-height: calc(28rem / 16);
|
|
67
67
|
|
|
68
68
|
@media $mobile {
|
|
69
69
|
margin: 0 0 45px;
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
.h2 + figure {
|
|
77
|
-
margin-top:
|
|
77
|
+
margin-top: calc(15rem / 16);
|
|
78
78
|
|
|
79
79
|
@media $mobile {
|
|
80
80
|
margin-top: -20px;
|
|
@@ -82,13 +82,13 @@
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
.h3 {
|
|
85
|
-
margin-top:
|
|
86
|
-
margin-bottom:
|
|
85
|
+
margin-top: calc(29rem / 16);
|
|
86
|
+
margin-bottom: calc(10rem / 16);
|
|
87
87
|
|
|
88
88
|
font-family: $secondaryFont;
|
|
89
|
-
font-size:
|
|
89
|
+
font-size: calc(20rem / 16);
|
|
90
90
|
font-weight: bold;
|
|
91
|
-
line-height:
|
|
91
|
+
line-height: calc(24rem / 16);
|
|
92
92
|
|
|
93
93
|
@media $mobile {
|
|
94
94
|
margin-top: 45px;
|
|
@@ -100,13 +100,13 @@
|
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
.h4 {
|
|
103
|
-
margin-top:
|
|
104
|
-
margin-bottom:
|
|
103
|
+
margin-top: calc(26rem / 16);
|
|
104
|
+
margin-bottom: calc(11rem / 16);
|
|
105
105
|
|
|
106
106
|
font-family: $secondaryFont;
|
|
107
|
-
font-size:
|
|
107
|
+
font-size: calc(17rem / 16);
|
|
108
108
|
font-weight: bold;
|
|
109
|
-
line-height:
|
|
109
|
+
line-height: calc(21rem / 16);
|
|
110
110
|
|
|
111
111
|
@media $mobile {
|
|
112
112
|
margin-top: 45px;
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
.h3 + .h4 {
|
|
126
|
-
margin-top:
|
|
126
|
+
margin-top: calc(15rem / 16);
|
|
127
127
|
|
|
128
128
|
@media $mobile {
|
|
129
129
|
margin-top: 15px;
|
|
@@ -134,21 +134,24 @@
|
|
|
134
134
|
.p + ol,
|
|
135
135
|
.game.lead + ul,
|
|
136
136
|
.game.lead + ol {
|
|
137
|
-
margin-top: -
|
|
137
|
+
margin-top: calc(-9rem / 16);
|
|
138
|
+
@media $mobile {
|
|
139
|
+
margin-top: -9px;
|
|
140
|
+
}
|
|
138
141
|
}
|
|
139
142
|
|
|
140
143
|
.blockquote {
|
|
141
|
-
margin:
|
|
142
|
-
padding:
|
|
144
|
+
margin: 1rem 0;
|
|
145
|
+
padding: calc(12rem / 16) calc(12rem / 16) calc(13rem / 16);
|
|
143
146
|
|
|
144
147
|
border: 1px solid rgba(0, 0, 0, 0.08);
|
|
145
148
|
border-radius: 8px;
|
|
146
149
|
background: #fff8c4;
|
|
147
150
|
|
|
148
151
|
font-family: $secondaryFont;
|
|
149
|
-
font-size:
|
|
152
|
+
font-size: 1rem;
|
|
150
153
|
font-weight: normal;
|
|
151
|
-
line-height:
|
|
154
|
+
line-height: calc(22rem / 16);
|
|
152
155
|
|
|
153
156
|
@media $mobile {
|
|
154
157
|
margin: 25px 0;
|
|
@@ -178,12 +181,12 @@
|
|
|
178
181
|
.lead {
|
|
179
182
|
position: relative;
|
|
180
183
|
|
|
181
|
-
margin-top:
|
|
184
|
+
margin-top: calc(30rem / 16);
|
|
182
185
|
margin-bottom: 0;
|
|
183
186
|
|
|
184
187
|
font-family: $secondaryFont;
|
|
185
|
-
font-size:
|
|
186
|
-
line-height:
|
|
188
|
+
font-size: 1rem;
|
|
189
|
+
line-height: calc(22rem / 16);
|
|
187
190
|
|
|
188
191
|
@media $mobile {
|
|
189
192
|
margin-top: 25px;
|
|
@@ -202,7 +205,7 @@
|
|
|
202
205
|
|
|
203
206
|
width: 100%;
|
|
204
207
|
max-width: 650px;
|
|
205
|
-
margin:
|
|
208
|
+
margin: calc(30rem / 16) auto;
|
|
206
209
|
|
|
207
210
|
border-bottom: 1px solid #e5e5e5;
|
|
208
211
|
|
|
@@ -238,14 +241,15 @@ a mark {
|
|
|
238
241
|
.context_p {
|
|
239
242
|
position: relative;
|
|
240
243
|
|
|
241
|
-
margin: 0 0
|
|
242
|
-
padding: 0 0 0
|
|
244
|
+
margin: 0 0 calc(15rem / 16);
|
|
245
|
+
padding: 0 0 0 calc(23rem / 16);
|
|
243
246
|
|
|
244
247
|
font-family: $primaryFont;
|
|
245
|
-
font-size:
|
|
246
|
-
line-height:
|
|
248
|
+
font-size: calc(18rem / 16);
|
|
249
|
+
line-height: calc(22rem / 16);
|
|
247
250
|
|
|
248
251
|
@media $portraitTablet {
|
|
252
|
+
margin: 0 0 15px;
|
|
249
253
|
padding: 0 0 0 38px;
|
|
250
254
|
|
|
251
255
|
font-size: 20px;
|
|
@@ -265,7 +269,7 @@ a mark {
|
|
|
265
269
|
|
|
266
270
|
color: $gold;
|
|
267
271
|
|
|
268
|
-
font-size:
|
|
272
|
+
font-size: calc(18rem / 16);
|
|
269
273
|
line-height: inherit;
|
|
270
274
|
|
|
271
275
|
@media $portraitTablet {
|
|
@@ -297,7 +301,7 @@ a mark {
|
|
|
297
301
|
}
|
|
298
302
|
|
|
299
303
|
.game.lead {
|
|
300
|
-
margin-bottom:
|
|
304
|
+
margin-bottom: calc(18rem / 16);
|
|
301
305
|
|
|
302
306
|
@media $portraitTablet {
|
|
303
307
|
margin-top: 27px;
|
|
@@ -309,7 +313,7 @@ a mark {
|
|
|
309
313
|
}
|
|
310
314
|
|
|
311
315
|
.slide.lead {
|
|
312
|
-
margin-bottom:
|
|
316
|
+
margin-bottom: calc(15rem / 16);
|
|
313
317
|
|
|
314
318
|
@media $portraitTablet {
|
|
315
319
|
margin-top: 20px;
|
|
@@ -326,8 +330,8 @@ a mark {
|
|
|
326
330
|
|
|
327
331
|
.isInImportantLead {
|
|
328
332
|
font-family: $secondaryFont;
|
|
329
|
-
font-size:
|
|
330
|
-
line-height:
|
|
333
|
+
font-size: 1rem;
|
|
334
|
+
line-height: calc(22rem / 16);
|
|
331
335
|
|
|
332
336
|
@media $portraitTablet {
|
|
333
337
|
font-size: 18px;
|
|
@@ -342,12 +346,12 @@ a mark {
|
|
|
342
346
|
}
|
|
343
347
|
|
|
344
348
|
.isInAnswer.p {
|
|
345
|
-
margin-top:
|
|
346
|
-
margin-bottom:
|
|
349
|
+
margin-top: calc(6rem / 16);
|
|
350
|
+
margin-bottom: calc(6rem / 16);
|
|
347
351
|
|
|
348
352
|
font-family: $secondaryFont;
|
|
349
|
-
font-size:
|
|
350
|
-
line-height:
|
|
353
|
+
font-size: 1rem;
|
|
354
|
+
line-height: calc(22rem / 16);
|
|
351
355
|
|
|
352
356
|
@media $portraitTablet {
|
|
353
357
|
margin-top: 12px;
|
|
@@ -359,8 +363,8 @@ a mark {
|
|
|
359
363
|
}
|
|
360
364
|
|
|
361
365
|
.isInAnswer.blockquote {
|
|
362
|
-
margin-top:
|
|
363
|
-
margin-bottom:
|
|
366
|
+
margin-top: calc(12rem / 16);
|
|
367
|
+
margin-bottom: calc(12rem / 16);
|
|
364
368
|
|
|
365
369
|
@media $portraitTablet {
|
|
366
370
|
margin-top: 10px;
|
|
@@ -369,7 +373,7 @@ a mark {
|
|
|
369
373
|
}
|
|
370
374
|
|
|
371
375
|
.isInAnswer:first-child {
|
|
372
|
-
margin-top:
|
|
376
|
+
margin-top: calc(6rem / 16);
|
|
373
377
|
}
|
|
374
378
|
|
|
375
379
|
.isInAnswer:last-child {
|
|
@@ -391,3 +395,28 @@ a mark {
|
|
|
391
395
|
display: block;
|
|
392
396
|
}
|
|
393
397
|
}
|
|
398
|
+
|
|
399
|
+
/* Footnote dakr theme */
|
|
400
|
+
.isDark span[data-body] {
|
|
401
|
+
background-color: #5b5b5b;
|
|
402
|
+
box-shadow: inset 1px 0 #8b8b8b, inset 0 1px #8b8b8b, inset -1px 0 #8b8b8b,
|
|
403
|
+
inset 0 -1px #8b8b8b;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
.isDark span[data-body]:hover {
|
|
407
|
+
background-color: #5b5b5b;
|
|
408
|
+
box-shadow: inset 1px 0 #747474, inset 0 1px #747474, inset -1px 0 #747474,
|
|
409
|
+
inset 0 -1px #747474;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/* Theme */
|
|
413
|
+
|
|
414
|
+
.blockquote.isDark {
|
|
415
|
+
color: inherit;
|
|
416
|
+
background-color: #34322a;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.blockquote.isDark a {
|
|
420
|
+
color: inherit;
|
|
421
|
+
box-shadow: inset 0 -1px #b88b59;
|
|
422
|
+
}
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
const Example: React.FC = () => {
|
|
17
|
+
const Example: React.FC<{ theme?: string }> = ({ theme }) => {
|
|
18
18
|
return (
|
|
19
19
|
<>
|
|
20
20
|
<div className={styles.root}>
|
|
@@ -22,7 +22,7 @@ const Example: React.FC = () => {
|
|
|
22
22
|
<SimpleBlock
|
|
23
23
|
block={item}
|
|
24
24
|
key={item.id}
|
|
25
|
-
styleContext={['no_mods', 'center', 'rich']}
|
|
25
|
+
styleContext={['no_mods', 'center', 'rich', theme]}
|
|
26
26
|
/>
|
|
27
27
|
))}
|
|
28
28
|
</div>
|
|
@@ -36,7 +36,7 @@ export const Default: React.FC = () => (
|
|
|
36
36
|
<Example />
|
|
37
37
|
</PreviewWrapper>
|
|
38
38
|
<PreviewWrapper theme="dark">
|
|
39
|
-
<Example />
|
|
39
|
+
<Example theme="isDark" />
|
|
40
40
|
</PreviewWrapper>
|
|
41
41
|
</>
|
|
42
42
|
)
|
|
@@ -22,8 +22,8 @@ export const SimpleTitle: React.FC<SimpleTitleProps> = ({
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
|
-
<
|
|
25
|
+
<h1 data-testid="simple-title" className={makeClassName(classNames)}>
|
|
26
26
|
{first}
|
|
27
|
-
</
|
|
27
|
+
</h1>
|
|
28
28
|
)
|
|
29
29
|
}
|
|
@@ -108,3 +108,18 @@
|
|
|
108
108
|
display: block;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
+
|
|
112
|
+
/* Dark theme */
|
|
113
|
+
.isDark,
|
|
114
|
+
.isDark:hover {
|
|
115
|
+
background-color: #262626;
|
|
116
|
+
color: inherit;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.isDark .origin {
|
|
120
|
+
color: #b8b8b8;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.isDark footer {
|
|
124
|
+
border-top-color: #3d3d3d;
|
|
125
|
+
}
|
|
@@ -14,10 +14,10 @@ export default {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
const Example: React.FC = () => {
|
|
17
|
+
const Example: React.FC<{ theme?: string }> = ({ theme }) => {
|
|
18
18
|
return (
|
|
19
19
|
<div className={styles.root}>
|
|
20
|
-
<SourceBlock block={mock} />
|
|
20
|
+
<SourceBlock styleContext={[theme]} block={mock} />
|
|
21
21
|
</div>
|
|
22
22
|
)
|
|
23
23
|
}
|
|
@@ -28,7 +28,7 @@ export const Default: React.FC = () => (
|
|
|
28
28
|
<Example />
|
|
29
29
|
</PreviewWrapper>
|
|
30
30
|
<PreviewWrapper theme="dark">
|
|
31
|
-
<Example />
|
|
31
|
+
<Example theme="isDark" />
|
|
32
32
|
</PreviewWrapper>
|
|
33
33
|
</>
|
|
34
34
|
)
|
|
@@ -2,21 +2,24 @@
|
|
|
2
2
|
font-family: 'PF Regal';
|
|
3
3
|
font-style: normal;
|
|
4
4
|
|
|
5
|
-
src: url('https://meduza.io/static/fonts/PFRegal/PFRegalTextPro-RegularB.woff')
|
|
5
|
+
src: url('https://meduza.io/static/fonts/PFRegal/PFRegalTextPro-RegularB.woff')
|
|
6
|
+
format('woff');
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
@font-face {
|
|
9
10
|
font-family: 'PF Regal';
|
|
10
11
|
font-style: italic;
|
|
11
12
|
|
|
12
|
-
src: url('https://meduza.io/static/fonts/PFRegal/PFRegalTextPro-RegularBItalic.woff')
|
|
13
|
+
src: url('https://meduza.io/static/fonts/PFRegal/PFRegalTextPro-RegularBItalic.woff')
|
|
14
|
+
format('woff');
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
@font-face {
|
|
16
18
|
font-weight: bold;
|
|
17
19
|
font-family: 'PF Regal';
|
|
18
20
|
|
|
19
|
-
src: url('https://meduza.io/static/fonts/PFRegal/PFRegalTextPro-Bold.woff')
|
|
21
|
+
src: url('https://meduza.io/static/fonts/PFRegal/PFRegalTextPro-Bold.woff')
|
|
22
|
+
format('woff');
|
|
20
23
|
}
|
|
21
24
|
|
|
22
25
|
@font-face {
|
|
@@ -24,7 +27,8 @@
|
|
|
24
27
|
font-family: 'PF Regal';
|
|
25
28
|
font-style: italic;
|
|
26
29
|
|
|
27
|
-
src: url('https://meduza.io/static/fonts/PFRegal/PFRegalTextPro-BoldItalic.woff')
|
|
30
|
+
src: url('https://meduza.io/static/fonts/PFRegal/PFRegalTextPro-BoldItalic.woff')
|
|
31
|
+
format('woff');
|
|
28
32
|
}
|
|
29
33
|
|
|
30
34
|
@font-face {
|
|
@@ -32,8 +36,10 @@
|
|
|
32
36
|
font-family: 'Proxima Nova';
|
|
33
37
|
font-style: normal;
|
|
34
38
|
|
|
35
|
-
src: url('https://meduza.io/static/fonts/ProximaNovaNew/ProximaNova-Regular.woff2')
|
|
36
|
-
|
|
39
|
+
src: url('https://meduza.io/static/fonts/ProximaNovaNew/ProximaNova-Regular.woff2')
|
|
40
|
+
format('woff2'),
|
|
41
|
+
url('https://meduza.io/static/fonts/ProximaNovaNew/ProximaNova-Regular.woff')
|
|
42
|
+
format('woff');
|
|
37
43
|
}
|
|
38
44
|
|
|
39
45
|
@font-face {
|
|
@@ -41,8 +47,10 @@
|
|
|
41
47
|
font-family: 'Proxima Nova';
|
|
42
48
|
font-style: normal;
|
|
43
49
|
|
|
44
|
-
src: url('https://meduza.io/static/fonts/ProximaNovaNew/ProximaNova-Semibold.woff2')
|
|
45
|
-
|
|
50
|
+
src: url('https://meduza.io/static/fonts/ProximaNovaNew/ProximaNova-Semibold.woff2')
|
|
51
|
+
format('woff2'),
|
|
52
|
+
url('https://meduza.io/static/fonts/ProximaNovaNew/ProximaNova-Semibold.woff')
|
|
53
|
+
format('woff');
|
|
46
54
|
}
|
|
47
55
|
|
|
48
56
|
@font-face {
|
|
@@ -50,11 +58,15 @@
|
|
|
50
58
|
font-family: 'Proxima Nova';
|
|
51
59
|
font-style: normal;
|
|
52
60
|
|
|
53
|
-
src: url('https://meduza.io/static/fonts/ProximaNovaNew/ProximaNova-Bold.woff2')
|
|
54
|
-
|
|
61
|
+
src: url('https://meduza.io/static/fonts/ProximaNovaNew/ProximaNova-Bold.woff2')
|
|
62
|
+
format('woff2'),
|
|
63
|
+
url('https://meduza.io/static/fonts/ProximaNovaNew/ProximaNova-Bold.woff')
|
|
64
|
+
format('woff');
|
|
55
65
|
}
|
|
56
66
|
|
|
57
|
-
* {
|
|
67
|
+
* {
|
|
68
|
+
box-sizing: border-box;
|
|
69
|
+
}
|
|
58
70
|
|
|
59
71
|
.row {
|
|
60
72
|
display: flex;
|
|
@@ -67,7 +79,6 @@
|
|
|
67
79
|
padding: 15px;
|
|
68
80
|
}
|
|
69
81
|
|
|
70
|
-
|
|
71
82
|
.root h2 {
|
|
72
83
|
margin-bottom: 0;
|
|
73
84
|
padding: 0 12px;
|
|
@@ -125,3 +136,8 @@
|
|
|
125
136
|
|
|
126
137
|
fill: rgba(255, 255, 255, 0.7);
|
|
127
138
|
}
|
|
139
|
+
|
|
140
|
+
[data-theme='dark'] .icon {
|
|
141
|
+
background-color: #262626;
|
|
142
|
+
border-color: #1b1b1b;
|
|
143
|
+
}
|
|
@@ -41,9 +41,9 @@ const other: Icons[] = [
|
|
|
41
41
|
'receipt'
|
|
42
42
|
]
|
|
43
43
|
|
|
44
|
-
const Example: React.FC = () => {
|
|
44
|
+
const Example: React.FC<{ theme?: string }> = ({ theme }) => {
|
|
45
45
|
return (
|
|
46
|
-
<div className={styles.root}>
|
|
46
|
+
<div className={styles.root} data-theme={theme}>
|
|
47
47
|
<h2>Кнопки соц. сетей и реакций</h2>
|
|
48
48
|
<div className={styles.row}>
|
|
49
49
|
{social.map((icon) => (
|
|
@@ -89,7 +89,7 @@ export const Default: React.FC = () => (
|
|
|
89
89
|
<Example />
|
|
90
90
|
</PreviewWrapper>
|
|
91
91
|
<PreviewWrapper theme="dark">
|
|
92
|
-
<Example />
|
|
92
|
+
<Example theme="dark" />
|
|
93
93
|
</PreviewWrapper>
|
|
94
94
|
</>
|
|
95
95
|
)
|
|
@@ -41,7 +41,7 @@ const buttons: { type: ToolbarButtonTypes; label?: string }[] = [
|
|
|
41
41
|
}
|
|
42
42
|
]
|
|
43
43
|
|
|
44
|
-
const Example: React.FC = () => {
|
|
44
|
+
const Example: React.FC<{ theme?: string }> = ({ theme }) => {
|
|
45
45
|
const [bookmark, setBookmark] = useState(false)
|
|
46
46
|
const handleButton = (type: string): void => {
|
|
47
47
|
alert(type)
|
|
@@ -54,10 +54,11 @@ const Example: React.FC = () => {
|
|
|
54
54
|
return (
|
|
55
55
|
<>
|
|
56
56
|
<div className={styles.root}>
|
|
57
|
-
<Toolbar>
|
|
57
|
+
<Toolbar styleContext={[theme]}>
|
|
58
58
|
{buttons.map((button, index) => (
|
|
59
59
|
<ToolbarButton
|
|
60
60
|
type={button.type}
|
|
61
|
+
theme={theme}
|
|
61
62
|
onClick={(): void =>
|
|
62
63
|
button.type === 'bookmark'
|
|
63
64
|
? handleBookmark()
|
|
@@ -81,7 +82,7 @@ export const Default: React.FC = () => (
|
|
|
81
82
|
<Example />
|
|
82
83
|
</PreviewWrapper>
|
|
83
84
|
<PreviewWrapper theme="dark">
|
|
84
|
-
<Example />
|
|
85
|
+
<Example theme="isDark" />
|
|
85
86
|
</PreviewWrapper>
|
|
86
87
|
</>
|
|
87
88
|
)
|