@@ -3,40 +3,41 @@ styles.checkbox {
33 align-items : center;
44 margin : auto;
55 cursor : pointer;
6+ outline : none;
67}
78
8- styles .checkbox > .box {
9+ styles .checkbox > .checkbox {
910 width : 20px ;
1011 height : 20px ;
1112 border : ${border || $swatches.grey .p700 } solid 2px;
1213 bor der- radius: 3px;
1314}
1415
15- styles .checkbox > .box + label : not (: empty ) {
16+ styles .checkbox > .checkbox + label : not (: empty ) {
1617 margin-left : 8px ;
1718}
1819
19- styles .checkbox > .box : hover {
20+ styles .checkbox > .checkbox : hover {
2021 width : 20px ;
2122 height : 20px ;
2223 border : ${background || $design.accent } solid 2px;
2324 bor der- radius: 3px;
2425}
2526
26- styles .checkbox .checked > .box {
27+ styles .checkbox .checked > .checkbox {
2728 background-color : ${background || $design.accent };
2829 bor der: ${background || $design.accent } solid 2px;
2930}
3031
31- styles .checkbox > .box > .background-box {
32+ styles .checkbox > .checkbox > .background-box {
3233 width : 100% ;
3334 height : 100% ;
3435 transform : scale3d (0 , 0 , 0 );
3536 border-radius : 50% ;
3637 transition : 100ms ;
3738}
3839
39- styles .checkbox > .box > .background-box ::after {
40+ styles .checkbox > .checkbox > .background-box ::after {
4041 margin : auto;
4142 display : block;
4243 width : 6px ;
@@ -50,7 +51,7 @@ styles.checkbox>.box>.background-box::after {
5051 content: ' ' ;
5152}
5253
53- styles.checkbox .checked > .box > .background-box {
54+ styles.checkbox .checked > .checkbox > .background-box {
5455 transform : scale3d (1 , 1 , 1 );
5556 border-radius : 0 ;
5657}
@@ -61,19 +62,52 @@ styles.checkbox[disabled="true"] {
6162 cursor : default;
6263}
6364
64- styles .checkbox [disabled = "" ]> .box : hover ,
65- styles .checkbox [disabled = "true" ]> .box : hover {
65+ styles .checkbox [disabled = "" ]> .checkbox : hover ,
66+ styles .checkbox [disabled = "true" ]> .checkbox : hover {
6667 border : ${disabledBorder || $swatches.grey .p400 } solid 2px;
6768 bor der- radius: 3px;
6869}
6970
70- styles .checkbox .checked [disabled = "" ]> .box ,
71- styles .checkbox .checked [disabled = "true" ]> .box {
71+ styles .checkbox .checked [disabled = "" ]> .checkbox ,
72+ styles .checkbox .checked [disabled = "true" ]> .checkbox {
7273 background-color : ${disabledBackground || $swatches.grey .p500 };
7374 bor der: ${disabledBackground || $swatches.grey .p500 } solid 2px;
7475}
7576
76- styles .checkbox [disabled = "" ]> .box > .background-box ::after ,
77- styles .checkbox [disabled = "true" ]> .box > .background-box ::after {
77+ styles .checkbox [disabled = "" ]> .checkbox > .background-box ::after ,
78+ styles .checkbox [disabled = "true" ]> .checkbox > .background-box ::after {
7879 border-color : ${disabledForeground || $swatches.white };
7980}
81+
82+ styles .checkbox .ripplecontainer {
83+ position : relative;
84+ width : 0 ;
85+ height : 0
86+ }
87+
88+ styles .checkbox .ripplecontainer > .paper-ripple {
89+ top : auto;
90+ left : auto;
91+ right : -35px ;
92+ bottom : -25px ;
93+ width : 50px ;
94+ height : 50px ;
95+ border-radius : 50% ;
96+ }
97+
98+ .ripplecontainer > .ripple {
99+ position : absolute;
100+ right : -35px ;
101+ bottom : -25px ;
102+ width : 50px ;
103+ height : 50px ;
104+ border-radius : 50% ;
105+ pointer-events : none;
106+ background-color : rgba (0 , 0 , 0 , 0.22 );
107+ transition : transform 100ms ease-in-out;
108+ transform : scale3d (0 , 0 , 0 );
109+ }
110+
111+ styles .checkbox : focus > .ripplecontainer > .ripple {
112+ transform : scale3d (1 , 1 , 1 );
113+ }
0 commit comments