react-wheel-time-picker
Version:
[](https://www.npmjs.com/package/react-wheel-time-picker) 
271 lines (238 loc) • 4.97 kB
CSS
button {
border: none;
background: transparent;
cursor: pointer;
}
input {
border: none;
background: transparent;
cursor: pointer;
}
input:focus {
outline: none;
}
.react-wheel-time-picker {
margin-bottom: 50px;
border-radius: 12px;
overflow: hidden;
box-shadow: 0 11px 15px #0005;
}
.react-wheel-time-picker-transition {
animation: fade-in 150ms ease-out;
}
@keyframes fade-in {
0% {
transform: translateY(150px);
opacity: 0;
}
100% {
transform: translateY(0);
opacity: 1;
}
}
.react-wheel-time-picker-container {
display: flex;
justify-content: center;
position: relative;
width: 220px;
overflow: hidden;
padding: 20px 0;
}
.react-wheel-time-picker-hour {
position: relative;
width: 50px;
overflow: hidden;
z-index: 100;
margin-right: 5px;
}
.react-wheel-time-picker-minute {
position: relative;
width: 50px;
overflow: hidden;
z-index: 100;
margin-left: 5px;
}
.react-wheel-time-picker-hour-format {
position: relative;
width: 40px;
overflow: hidden;
z-index: 100;
}
.react-wheel-time-picker-fast {
transition: transform 700ms cubic-bezier(0.13, 0.67, 0.01, 0.94);
}
.react-wheel-time-picker-slow {
transition: transform 600ms cubic-bezier(0.13, 0.67, 0.01, 0.94);
}
.react-wheel-time-picker-selected-overlay {
position: absolute;
border-radius: 6px;
pointer-events: none;
margin: 0 10px;
left: 0;
right: 0;
z-index: 1;
}
.react-wheel-time-picker-top-shadow {
position: absolute;
top: 0;
width: 100%;
background: #0009;
background: linear-gradient(180deg, #0009 0%, #1c1c1c 100%);
}
.react-wheel-time-picker-bottom-shadow {
position: absolute;
bottom: 0;
width: 100%;
background: #0009;
background: linear-gradient(0deg, #0009 0%, hsla(0, 0%, 11%, 1) 100%);
}
.react-wheel-time-picker-cell-hour {
width: 100%;
text-align: center;
display: flex;
justify-content: end;
align-items: center;
user-select: none;
transition: all 100ms linear;
}
.react-wheel-time-picker-cell-minute {
width: 100%;
text-align: center;
display: flex;
justify-content: start;
align-items: center;
user-select: none;
transition: all 100ms linear;
}
.react-wheel-time-picker-cell-hour-format {
width: 100%;
text-align: center;
display: flex;
justify-content: end;
align-items: center;
user-select: none;
transition: all 100ms linear;
}
.react-wheel-time-picker-cell-inner-hour {
width: fit-content;
height: 100%;
transition: all 100ms linear;
cursor: pointer;
border-radius: 7px;
line-height: 35px;
text-align: center;
display: flex;
justify-content: end;
align-items: center;
font-size: 14px;
color: #666;
padding: 0 10px;
}
.react-wheel-time-picker-cell-inner-hour-format {
width: fit-content;
height: 100%;
transition: all 100ms linear;
cursor: pointer;
border-radius: 7px;
line-height: 35px;
text-align: center;
display: flex;
justify-content: end;
align-items: center;
font-size: 14px;
color: #6a6a6b;
padding: 0 10px;
}
.react-wheel-time-picker-cell-inner-minute {
width: fit-content;
height: 100%;
transition: all 100ms linear;
cursor: pointer;
border-radius: 7px;
line-height: 35px;
text-align: center;
display: flex;
justify-content: start;
align-items: center;
font-size: 14px;
color: #6a6a6b;
padding: 0 10px;
}
.react-wheel-time-picker-cell-inner-hour:hover,
.react-wheel-time-picker-cell-inner-minute:hover,
.react-wheel-time-picker-cell-inner-hour-format:hover {
background-color: #ff9d0ac9;
color: white;
}
.react-wheel-time-picker-cell-inner-selected {
font-size: 16px;
}
.react-wheel-time-picker-cell-inner-hour-format-selected {
font-weight: 400;
}
.react-wheel-time-picker-btn-container {
position: relative;
display: flex;
justify-content: space-between;
border-bottom: 1px solid #333;
z-index: 100;
}
.react-wheel-time-picker-btn {
padding: 10px 15px;
font-size: 14px;
transition: all 150ms linear;
font-weight: 500;
z-index: 1;
}
.react-wheel-time-picker-btn:hover {
opacity: 0.6;
}
.react-wheel-time-picker-btn-cancel {
font-size: 12px;
font-weight: 300;
}
.react-wheel-time-picker-popup {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
display: flex;
justify-content: center;
align-items: flex-end;
z-index: 99998;
}
.react-wheel-time-picker-popup-overlay {
position: fixed;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.label {
color: #888;
}
.react-wheel-time-picker-input {
cursor: text;
padding: 5px 10px;
border-radius: 5px;
}
.react-wheel-time-picker-colon {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
position: relative;
z-index: 100;
font-weight: 600;
top: -9%;
}
.react-wheel-time-picker-cell-inner-hidden {
opacity: 0;
visibility: hidden;
pointer-events: none;
}
.react-wheel-time-picker-hour-format-transition {
transition: transform 100ms ease-out;
}