@join-com/rc-phone-input
Version:
React component for entering telephone numbers
138 lines (135 loc) • 3 kB
CSS
.rc-phone-input {
position: relative;
}
.rc-phone-input * {
box-sizing: border-box;
-moz-box-sizing: border-box;
}
.rc-phone-input .hide {
display: none;
}
.rc-phone-input .v-hide {
visibility: hidden;
}
.rc-phone-input input[type=text],
.rc-phone-input input[type=tel] {
border: 1px solid #dce4e7;
border-radius: 6px;
font-weight: 400;
font-size: 14px;
line-height: 18px;
color: #1F313A;
padding: 8px;
display: block;
box-sizing: border-box;
width: 100%;
outline: none;
position: relative;
z-index: 0;
margin-top: 0 ;
margin-bottom: 0 ;
padding-left: 44px;
margin-left: 0;
}
.rc-phone-input input[type=text]:focus,
.rc-phone-input input[type=tel]:focus {
border-color: #55C3E6 ;
}
.rc-phone-input .flag-dropdown {
position: absolute;
top: 1px;
bottom: 1px;
left: 1px;
padding: 0;
background-color: #dce4e7;
border-radius: 2px 0 0 2px;
}
.rc-phone-input .flag-dropdown.open-dropdown {
background: #fff;
border-bottom: 0;
border-radius: 3px 0 0 0;
}
.rc-phone-input .flag-dropdown.open-dropdown .selected-flag {
background: #fff;
border-radius: 3px 0 0 0;
}
.rc-phone-input .flag-dropdown:hover {
cursor: pointer;
}
.rc-phone-input .flag-dropdown:hover .selected-flag {
background-color: #fff;
}
.rc-phone-input input[disabled] + .flag-dropdown:hover {
cursor: default;
}
.rc-phone-input input[disabled] + .flag-dropdown:hover .selected-flag {
background-color: transparent;
}
.rc-phone-input .selected-flag {
z-index: 13;
position: relative;
width: 38px;
height: 34px;
padding: 0 0 0 8px;
border-radius: 2px 0 0 2px;
}
.rc-phone-input .selected-flag .country {
position: absolute;
top: 50%;
margin-top: -5px;
}
.rc-phone-input .selected-flag .arrow {
position: relative;
top: 50%;
margin-top: -2px;
left: 20px;
width: 0;
height: 0;
border-left: 3px solid transparent;
border-right: 3px solid transparent;
border-top: 4px solid #555;
}
.rc-phone-input .selected-flag .arrow.up {
border-top: none;
border-bottom: 4px solid #555;
}
.rc-phone-input .country-list {
list-style: none;
position: absolute;
z-index: 100;
padding: 0;
margin: 0 0 0 -1px;
background-color: white;
border: 1px solid #dce4e7;
border-top: none;
width: 300px;
max-height: 200px;
overflow-y: scroll;
border-radius: 0 0 2px 2px;
top: 35px;
}
.rc-phone-input .country-list .divider {
padding-bottom: 5px;
margin-bottom: 5px;
border-bottom: 1px solid #ccc;
}
.rc-phone-input .country-list .country {
padding: 6px 12px;
font-size: 14px;
}
.rc-phone-input .country-list .country .dial-code {
color: #788388;
}
.rc-phone-input .country-list .country:hover {
background-color: #f6f8f9;
}
.rc-phone-input .country-list .country.highlight {
background-color: #dce4e7;
}
.rc-phone-input .country-list .country-name {
margin-right: 6px;
}
.rc-phone-input .country-list .country-name .suggestion-match {
font-weight: 700;
color: #258aff
}