datenel-react/src/style.scss
Astrian Zheng ac798d2e67
All checks were successful
Publish to npm / publish (push) Successful in 25s
fix: update type annotations in SingleDatePicker and SingleWeekPicker components
2025-02-20 17:04:50 +11:00

141 lines
2.3 KiB
SCSS

.datenel-component {
user-select: none;
color: var(--datenel-main-color);
button {
border: none;
background: none;
cursor: pointer;
color: var(--datenel-main-color);
&:hover {
background: var(--datenel-hover-color);
}
}
button.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
.header {
padding: 0.75rem;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid var(--datenel-border-color);
button {
img {
width: 1rem;
height: 1rem;
}
&.stepper{
width: 1.75rem;
height: 1.75rem;
display: flex;
justify-content: center;
align-items: center;
border-radius: 50%;
}
&.indicator {
padding: 0.25rem 0.5rem;
border-radius: 0.25rem;
}
}
input.indicator {
border:none;
background: none;
text-align: center;
outline: none;
border-radius: 0.25rem;
padding: 0.25rem 0;
color: var(--datenel-main-color);
&:hover {
background: var(--datenel-hover-color);
}
}
}
.calendar-view-body {
padding: 0.75rem;
gap: 0.125rem;
&.grid{
display: grid;
grid-template-columns: repeat(7, 1fr);
.item.date {
border-radius: 50%;
&.extra-month {
cursor: default;
}
&.active {
background: var(--datenel-accent-color);
color: var(--datenel-reversed-color);
}
}
}
&.flex {
display: flex;
flex-direction: column;
.listitem {
padding: 0;
display: grid;
grid-template-columns: repeat(7, 1fr);
border-radius: 1rem;
.item.date {
background: none;
}
&.active {
background: var(--datenel-accent-color);
color: var(--datenel-reversed-color);
.extra-month {
opacity: 0.5;
}
}
}
}
.item {
width: 2rem;
height: 2rem;
display: flex;
justify-content: center;
align-items: center;
font-size: 0.75rem;
position: relative;
&.extra-month {
opacity: 0.3;
}
&.day-indicator {
opacity: 0.5;
}
.today-indicator {
position: absolute;
bottom: 0.25rem;
width: 0.25rem;
height: 0.25rem;
}
}
}
.month-selector-body {
display: grid;
grid-template-columns: repeat(3, 1fr);
padding: 0.75rem;
gap: 0.125rem;
.item {
border-radius: 0.25rem;
height: 2rem;
}
}
}