@veyetals/react-veyetals-view
Version:
React component for web version of veyetals utilizing webrtc
410 lines (407 loc) • 8.16 kB
CSS
.veyetals-card {
flex: 1;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
background-color: #ffffff;
box-shadow: 0 6px 0 rgba(50, 50, 50, 0.3);
border: 1px solid #323232;
border-radius: 1rem ;
padding: 0.5rem;
height: 7rem;
overflow: hidden;
}
@media screen and (min-width: 900px) {
.veyetals-card {
min-width: 7.5rem;
max-width: 7.5rem;
}
}
.veyetals-card::before {
background-color: transparent ;
}
.veyetals-card__container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.veyetals-card__reading {
display: flex;
justify-content: center;
align-items: baseline;
margin-bottom: 0.5rem;
}
.veyetals-card__title {
margin: 0.25rem 0;
text-align: center;
}
.veyetals-card__value {
font-weight: 700 ;
margin: 0;
text-align: center;
}
.veyetals-card__unit {
font-size: 0.5rem;
line-height: 1rem;
color: #8b939c;
font-weight: 400;
color: #8b939c;
margin: 0;
margin-left: 0.5rem;
}
@media screen and (min-width: 600px) {
.veyetals-card__unit {
font-size: 0.75rem;
line-height: 1.25rem;
font-weight: 400;
}
}
.veyetals-card__icon--hr {
fill: #ff235b;
}
.veyetals-card__icon--hrv {
fill: #eb3f4a;
}
.veyetals-card__icon--o2Sat {
fill: #10237c;
}
.veyetals-card__icon--respRate {
fill: #ff9c8a;
}
.veyetals-card__icon--bp {
fill: #d64643;
}
.veyetals-card__icon--stress {
fill: #40c035;
}
.veyetals-card__icon--glucose {
fill: #AA2D32;
}
.progress-bar {
display: flex;
justify-content: center;
align-items: center;
position: relative;
background-color: #535353;
height: 1.5rem;
width: 100%;
margin: 1rem;
border-radius: 1rem;
overflow: hidden;
}
.progress-bar--hidden {
visibility: hidden;
}
.progress-bar__filler {
position: absolute;
top: 0;
left: 0;
height: 100%;
background-color: #19be87;
border-radius: 1rem;
transition: width 1s ease-in-out;
}
.progress-bar__label {
font-size: 0.5rem;
line-height: 1rem;
color: #8b939c;
font-weight: 400;
position: absolute;
color: #ffffff;
font-weight: 700;
z-index: 1;
}
@media screen and (min-width: 600px) {
.progress-bar__label {
font-size: 0.75rem;
line-height: 1.25rem;
font-weight: 400;
}
}
.veyetals-cards {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
left: 0;
right: 0;
bottom: 0;
padding: 1.5rem 1rem;
margin-left: auto;
margin-right: auto;
}
@media screen and (min-width: 1200px) {
.veyetals-cards {
padding-top: 0;
position: relative;
}
}
.veyetals-cards__container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
max-width: 55.5rem;
}
@media screen and (min-width: 1200px) {
.veyetals-cards__controls {
position: absolute;
top: -5rem;
}
}
.veyetals-cards__card-container {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
}
@media screen and (min-width: 900px) {
.veyetals-cards__card-container {
flex-direction: row;
}
}
.veyetals-cards__box {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
-moz-column-gap: 0.5rem;
column-gap: 0.5rem;
}
@media screen and (min-width: 900px) {
.veyetals-cards__box {
width: -moz-fit-content;
width: fit-content;
}
}
.veyetals-cards__box:first-of-type {
margin-bottom: 0.75rem;
}
@media screen and (min-width: 900px) {
.veyetals-cards__box:first-of-type {
margin-bottom: 0;
margin-right: 0.5rem;
}
}
.veyetals-button {
display: flex;
padding: 1rem 2rem;
text-decoration: none;
border: none;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}
.veyetals-button--primary {
background-color: #125090;
}
.veyetals-button--primary:hover {
background-color: #0c3763;
}
.veyetals-button--secondary {
background-color: #9C27B0;
}
.veyetals-button--secondary:hover {
background-color: #771e86;
}
.veyetals-button__text {
color: #ffffff;
}
.video-controls {
display: flex;
width: -moz-fit-content;
width: fit-content;
margin: auto;
margin-top: 1rem;
}
.video-controls__veyetals-logo {
width: 2rem;
height: 2rem;
margin-right: 0.75rem;
}
.video-controls__text {
font-size: 0.8125rem ;
line-height: 1.125rem ;
}
.tracker-box {
position: absolute;
display: flex;
justify-content: center;
align-items: center;
background-size: 1.5rem 1.5rem;
background-repeat: no-repeat;
background-position-x: 0px, 0px, 100%, 100%, 0px, 100%, 0px, 100%;
background-position-y: 0px, 100%, 0px, 100%, 0px, 0px, 100%, 100%;
}
.tracker-box__text {
position: absolute;
top: -2rem;
font-size: 1rem;
line-height: 1rem;
color: #fefefe;
text-shadow: 1px 0 0 #000, 0 -1px 0 #000, 0 1px 0 #000, -1px 0 0 #000;
}
@media screen and (min-width: 600px) {
.tracker-box__text {
font-size: 1.25rem;
line-height: 1.25rem;
}
}
.timer-box {
position: relative;
display: inline-flex;
align-items: center;
color: #fefefe;
font-size: 8rem;
}
.veyetals-view-message {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
}
.veyetals-view-message__container {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
background-color: #ffffff;
padding: 0.5rem 1rem;
border-radius: 1rem;
margin: 0 1rem;
}
@media screen and (min-width: 600px) {
.veyetals-view-message__container {
width: -moz-fit-content;
width: fit-content;
}
}
.veyetals-view-message__text {
margin-left: 0.5rem;
}
.veyetals-view-message__icon--done {
fill: #19be87;
}
.veyetals-view-message__icon--close {
stroke: #f16969;
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
}
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
z-index: 100;
}
.veyetals-view {
position: relative;
box-sizing: border-box;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 0;
margin: 0;
font-size: 0.8125rem;
line-height: 1.125rem;
color: #323232;
min-height: 100%;
min-width: 100%;
transition: width 1s ease-in-out;
}
@media screen and (min-width: 600px) {
.veyetals-view {
font-size: 1rem;
line-height: 1rem;
}
}
.veyetals-view *,
.veyetals-view *:before,
.veyetals-view *:after {
box-sizing: inherit;
}
.veyetals-view__container {
position: absolute;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
width: 100%;
bottom: 0;
}
.veyetals-view__timer {
position: absolute;
top: 40%;
left: 50%;
transform: translate(-50%, -50%);
color: #fefefe;
font-size: 10rem;
}
@media screen and (min-width: 600px) {
.veyetals-view__timer {
top: 50%;
}
}
.veyetals-view__video {
width: 100%;
height: 100%;
-o-object-fit: cover;
object-fit: cover;
-o-object-position: center center;
object-position: center center;
background-color: black;
transform: rotateY(180deg);
-webkit-transform: rotateY(180deg);
/* Safari and Chrome */
-moz-transform: rotateY(180deg);
/* Firefox */
}
.veyetals-view__video-container {
display: flex;
position: relative;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
overflow: hidden;
}
.veyetals-view__modal {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: end;
padding: 1.5rem;
background-color: #ffffff;
border-radius: 1rem;
}
.veyetals-view__modal-button {
margin-top: 1.5rem;
}
.veyetals-view-loader {
border: 0.25rem solid #afafaf;
border-top: 0.25rem solid #125090;
border-radius: 50%;
min-width: 1.5rem;
min-height: 1.5rem;
animation: spin 1s linear infinite;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}