Skip to content

Commit d054e01

Browse files
authored
feat(ThemeProvider): move to designTokens for most components
close #201
1 parent 9be95c0 commit d054e01

File tree

67 files changed

+11244
-8598
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+11244
-8598
lines changed

src/components/Badge/__tests__/__snapshots__/demo.test.js.snap

Lines changed: 44 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -93,22 +93,27 @@ exports[`Badge demo -- badge 1`] = `
9393
}
9494
9595
.c30 {
96-
color: #6b798e;
96+
color: #526075;
9797
font-size: 12px;
9898
position: relative;
9999
cursor: pointer;
100100
display: inline-block;
101101
vertical-align: middle;
102102
height: 28px;
103103
line-height: 28px;
104+
color: #0a1633;
104105
}
105106
106107
.c30 .c31 {
107-
color: #3555f6;
108+
color: #c3cad9;
109+
}
110+
111+
.c30 .c31 {
112+
color: #3860f4;
108113
}
109114
110115
.c33 {
111-
color: #6b798e;
116+
color: #526075;
112117
font-size: 12px;
113118
position: relative;
114119
cursor: pointer;
@@ -118,19 +123,31 @@ exports[`Badge demo -- badge 1`] = `
118123
line-height: 28px;
119124
}
120125
126+
.c33 .c31 {
127+
color: #c3cad9;
128+
}
129+
130+
.c33:hover {
131+
color: #0a1633;
132+
}
133+
134+
.c33:hover .c31 {
135+
color: #3357df;
136+
}
137+
121138
.c28 {
122139
position: relative;
123140
margin-bottom: -8px;
124141
}
125142
126143
.c28 .c29,
127-
.c28 .style__RadioTagWrap-sc-25j3mq-3 {
144+
.c28 .sc-bxivhb {
128145
margin-right: 8px;
129146
margin-bottom: 8px;
130147
}
131148
132149
.c28 .c29:last-child,
133-
.c28 .style__RadioTagWrap-sc-25j3mq-3:last-child {
150+
.c28 .sc-bxivhb:last-child {
134151
margin-right: 0;
135152
}
136153
@@ -171,12 +188,12 @@ exports[`Badge demo -- badge 1`] = `
171188
display: inline-block;
172189
vertical-align: middle;
173190
box-sizing: border-box;
174-
color: #526075;
175-
border: 1px solid #d2d6ea;
176-
background: #fafafc;
177191
border-radius: 2px;
178192
height: 28px;
193+
color: #526075;
194+
border: 1px solid #d2d6ea;
179195
box-shadow: inset 0 1px 3px 0 #d2d6ea;
196+
background: #fafafc;
180197
-webkit-transition: .18s cubic-bezier(.4,0,.2,1);
181198
transition: .18s cubic-bezier(.4,0,.2,1);
182199
}
@@ -203,7 +220,7 @@ exports[`Badge demo -- badge 1`] = `
203220
.c7:hover {
204221
color: #0a1633;
205222
border-color: #c3cad9;
206-
background-color: #f6f6fb;
223+
background: #fafafc;
207224
}
208225
209226
.c7 input {
@@ -247,16 +264,16 @@ exports[`Badge demo -- badge 1`] = `
247264
border-style: solid;
248265
cursor: pointer;
249266
color: #0a1633;
250-
background: #ffffff;
251-
box-shadow: 0 1px 1px -1px #c3cad9,0 1px 3px -1px #7a8baa,inset 0 1px 0 0 #efeff8;
252267
border-color: #d2d6ea;
268+
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.08),0 1px 1px -1px rgba(0,0,0,0.30),0 1px 3px -1px rgba(0,0,0,0.12),inset 0 1px 0 0 rgba(0,0,0,0.05);
269+
background: #ffffff;
253270
display: inline-block;
254271
vertical-align: middle;
255272
}
256273
257274
.c11:hover {
258275
color: #3860f4;
259-
box-shadow: 0 0 1px 0 #c3cad9,0 8px 12px -4px #d2d6ea,0 4px 4px -2px #c3cad9;
276+
box-shadow: 0 0 1px 0 rgba(0,0,0,0.12),0 8px 12px -4px rgba(0,0,0,0.12),0 2px 1px -1px rgba(0,0,0,0.05);
260277
}
261278
262279
.c9 {
@@ -332,12 +349,13 @@ exports[`Badge demo -- badge 1`] = `
332349
}
333350
334351
.c9 .c10 {
352+
border-width: 0 0 0 1px;
335353
top: -1px;
336354
padding-top: 1px;
337355
}
338356
339357
.c9 .c13 {
340-
border-top-width: 1px;
358+
border-width: 1px 0 0 1px;
341359
bottom: 0;
342360
border-top-color: #c3cad9;
343361
}
@@ -385,14 +403,13 @@ exports[`Badge demo -- badge 1`] = `
385403
.c18 {
386404
position: relative;
387405
border-radius: 2px;
388-
overflow: hidden;
389406
box-sizing: border-box;
390407
cursor: pointer;
391408
-webkit-transition: all 0.3s;
392409
transition: all 0.3s;
393410
display: inline-block;
394411
vertical-align: middle;
395-
background: #fff;
412+
background: #ffffff;
396413
height: 28px;
397414
width: 80px;
398415
padding: 4px;
@@ -402,27 +419,31 @@ exports[`Badge demo -- badge 1`] = `
402419
}
403420
404421
.c18:hover {
405-
border-color: #3555f6;
422+
border-color: #3357df;
423+
}
424+
425+
.c18:hover .c24 {
426+
box-shadow: 0 0 1px 0 rgba(0,0,0,0.12),0 8px 12px -4px rgba(0,0,0,0.12),0 2px 1px -1px rgba(0,0,0,0.05);
406427
}
407428
408429
.c18 .c24 {
409-
background-color: #fff;
410-
box-shadow: 0 0.5px 0.5px #c3cad9;
411-
border: 1px solid #c3cad9;
430+
background: #ffffff;
431+
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.08),0 1px 1px -1px rgba(0,0,0,0.30),0 1px 3px -1px rgba(0,0,0,0.12),inset 0 1px 0 0 rgba(0,0,0,0.05);
412432
width: 20px;
413433
height: 20px;
414434
}
415435
416436
.c18 .c26 {
417-
background-color: #e69b9b;
437+
background: #f44336;
418438
left: 13px;
419439
height: 10px;
420440
}
421441
422442
.c18 .c19 {
423-
border: 1px solid #c3cad9;
424-
background-color: #ebedf0;
425-
color: #6b798e;
443+
color: #526075;
444+
border: 1px solid #d2d6ea;
445+
box-shadow: inset 0 1px 3px 0 #d2d6ea;
446+
background: #f6f6fb;
426447
}
427448
428449
.c18 .c21,

src/components/Breadcrumb/__tests__/__snapshots__/demo.test.js.snap

Lines changed: 44 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ exports[`Breadcrumb demo -- backbutton 1`] = `
3333
.c2:hover {
3434
color: #3860f4;
3535
border-color: #3357df;
36-
background: transparent;
36+
background: #ffffff;
3737
}
3838
3939
.c1 {
@@ -226,7 +226,7 @@ exports[`Breadcrumb demo -- breadcrumb 1`] = `
226226
.c18:hover {
227227
color: #3860f4;
228228
border-color: #3357df;
229-
background: transparent;
229+
background: #ffffff;
230230
}
231231
232232
.c17 {
@@ -399,22 +399,27 @@ exports[`Breadcrumb demo -- breadcrumb 1`] = `
399399
}
400400
401401
.c11 {
402-
color: #6b798e;
402+
color: #526075;
403403
font-size: 12px;
404404
position: relative;
405405
cursor: pointer;
406406
display: inline-block;
407407
vertical-align: middle;
408408
height: 28px;
409409
line-height: 28px;
410+
color: #0a1633;
410411
}
411412
412413
.c11 .c12 {
413-
color: #3555f6;
414+
color: #c3cad9;
415+
}
416+
417+
.c11 .c12 {
418+
color: #3860f4;
414419
}
415420
416421
.c15 {
417-
color: #6b798e;
422+
color: #526075;
418423
font-size: 12px;
419424
position: relative;
420425
cursor: pointer;
@@ -424,19 +429,31 @@ exports[`Breadcrumb demo -- breadcrumb 1`] = `
424429
line-height: 28px;
425430
}
426431
432+
.c15 .c12 {
433+
color: #c3cad9;
434+
}
435+
436+
.c15:hover {
437+
color: #0a1633;
438+
}
439+
440+
.c15:hover .c12 {
441+
color: #3357df;
442+
}
443+
427444
.c9 {
428445
position: relative;
429446
margin-bottom: -8px;
430447
}
431448
432449
.c9 .c10,
433-
.c9 .style__RadioTagWrap-sc-25j3mq-3 {
450+
.c9 .sc-bxivhb {
434451
margin-right: 8px;
435452
margin-bottom: 8px;
436453
}
437454
438455
.c9 .c10:last-child,
439-
.c9 .style__RadioTagWrap-sc-25j3mq-3:last-child {
456+
.c9 .sc-bxivhb:last-child {
440457
margin-right: 0;
441458
}
442459
@@ -477,12 +494,12 @@ exports[`Breadcrumb demo -- breadcrumb 1`] = `
477494
display: inline-block;
478495
vertical-align: middle;
479496
box-sizing: border-box;
480-
color: #526075;
481-
border: 1px solid #d2d6ea;
482-
background: #fafafc;
483497
border-radius: 2px;
484498
height: 28px;
499+
color: #526075;
500+
border: 1px solid #d2d6ea;
485501
box-shadow: inset 0 1px 3px 0 #d2d6ea;
502+
background: #fafafc;
486503
-webkit-transition: .18s cubic-bezier(.4,0,.2,1);
487504
transition: .18s cubic-bezier(.4,0,.2,1);
488505
}
@@ -509,7 +526,7 @@ exports[`Breadcrumb demo -- breadcrumb 1`] = `
509526
.c7:hover {
510527
color: #0a1633;
511528
border-color: #c3cad9;
512-
background-color: #f6f6fb;
529+
background: #fafafc;
513530
}
514531
515532
.c7 input {
@@ -711,7 +728,7 @@ exports[`Breadcrumb demo -- breadcrumb-separator 1`] = `
711728
.c2:hover {
712729
color: #3860f4;
713730
border-color: #3357df;
714-
background: transparent;
731+
background: #ffffff;
715732
}
716733
717734
.c1 {
@@ -1172,7 +1189,7 @@ exports[`Breadcrumb demo -- breadcrumb-styleType 1`] = `
11721189
.c2:hover {
11731190
color: #3860f4;
11741191
border-color: #3357df;
1175-
background: transparent;
1192+
background: #ffffff;
11761193
}
11771194
11781195
.c1 {
@@ -1528,7 +1545,7 @@ exports[`Breadcrumb demo -- item 1`] = `
15281545
.c19:hover {
15291546
color: #3860f4;
15301547
border-color: #3357df;
1531-
background: transparent;
1548+
background: #ffffff;
15321549
}
15331550
15341551
.c18 {
@@ -1699,14 +1716,13 @@ exports[`Breadcrumb demo -- item 1`] = `
16991716
.c7 {
17001717
position: relative;
17011718
border-radius: 2px;
1702-
overflow: hidden;
17031719
box-sizing: border-box;
17041720
cursor: pointer;
17051721
-webkit-transition: all 0.3s;
17061722
transition: all 0.3s;
17071723
display: inline-block;
17081724
vertical-align: middle;
1709-
background: #fff;
1725+
background: #ffffff;
17101726
height: 28px;
17111727
width: 80px;
17121728
padding: 4px;
@@ -1716,27 +1732,31 @@ exports[`Breadcrumb demo -- item 1`] = `
17161732
}
17171733
17181734
.c7:hover {
1719-
border-color: #3555f6;
1735+
border-color: #3357df;
1736+
}
1737+
1738+
.c7:hover .c13 {
1739+
box-shadow: 0 0 1px 0 rgba(0,0,0,0.12),0 8px 12px -4px rgba(0,0,0,0.12),0 2px 1px -1px rgba(0,0,0,0.05);
17201740
}
17211741
17221742
.c7 .c13 {
1723-
background-color: #fff;
1724-
box-shadow: 0 0.5px 0.5px #c3cad9;
1725-
border: 1px solid #c3cad9;
1743+
background: #ffffff;
1744+
box-shadow: 0 1px 2px 0 rgba(0,0,0,0.08),0 1px 1px -1px rgba(0,0,0,0.30),0 1px 3px -1px rgba(0,0,0,0.12),inset 0 1px 0 0 rgba(0,0,0,0.05);
17261745
width: 20px;
17271746
height: 20px;
17281747
}
17291748
17301749
.c7 .c15 {
1731-
background-color: #e69b9b;
1750+
background: #f44336;
17321751
left: 13px;
17331752
height: 10px;
17341753
}
17351754
17361755
.c7 .c8 {
1737-
border: 1px solid #c3cad9;
1738-
background-color: #ebedf0;
1739-
color: #6b798e;
1756+
color: #526075;
1757+
border: 1px solid #d2d6ea;
1758+
box-shadow: inset 0 1px 3px 0 #d2d6ea;
1759+
background: #f6f6fb;
17401760
}
17411761
17421762
.c7 .c10,

src/components/Button/Button.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ export default class Button extends PureComponent {
3030
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
3131
/** 设置原生的button上type属性 */
3232
type: PropTypes.string,
33+
/**
34+
* @ignore
35+
* 是否可选中,样式会有区别
36+
*/
37+
checkAble: PropTypes.bool,
3338
/**
3439
* @ignore
3540
* 选中状态

0 commit comments

Comments
 (0)