mirror of
https://github.com/adoyle0/thaw.git
synced 2025-03-13 05:59:49 -04:00
* feat: add date picker component * feat: add date panel * feat: add month panel * feat: add month panel logic * feat: add year panel * style: date picker component * feat: optimized date picker style * fix: nightly mode build
174 lines
4.3 KiB
CSS
174 lines
4.3 KiB
CSS
.thaw-date-picker-panel {
|
|
width: 300px;
|
|
background-color: var(--thaw-background-color);
|
|
border-radius: 3px;
|
|
box-sizing: border-box;
|
|
box-shadow: 0 3px 6px -4px rgba(0, 0, 0, 0.12),
|
|
0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
.thaw-date-picker-date-panel__calendar {
|
|
padding: 6px 12px 4px;
|
|
}
|
|
|
|
.thaw-date-picker-date-panel__header {
|
|
display: grid;
|
|
grid-template-columns: 28px 28px 1fr 28px 28px;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.thaw-date-picker-date-panel__header > button {
|
|
color: var(--thaw-font-color-other-month);
|
|
}
|
|
|
|
.thaw-date-picker-date-panel__header-month-year {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.thaw-date-picker-date-panel__weekdays,
|
|
.thaw-date-picker-date-panel__dates {
|
|
display: grid;
|
|
grid-template-columns: repeat(7, minmax(0, 1fr));
|
|
grid-auto-rows: 1fr;
|
|
}
|
|
|
|
.thaw-date-picker-date-panel__weekdays {
|
|
border-bottom: 1px solid var(--thaw-item-border-color);
|
|
margin-bottom: 2px;
|
|
padding: 6px 4px;
|
|
}
|
|
|
|
.thaw-date-picker-date-panel__weekdays span,
|
|
.thaw-date-picker-date-panel__item {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.thaw-date-picker-date-panel__item {
|
|
padding: 4px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.thaw-date-picker-date-panel__item--other-month {
|
|
color: var(--thaw-font-color-other-month);
|
|
}
|
|
|
|
.thaw-date-picker-date-panel__item-day {
|
|
position: relative;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.thaw-date-picker-date-panel__item-sup {
|
|
position: absolute;
|
|
top: 2px;
|
|
right: 0;
|
|
height: 4px;
|
|
width: 4px;
|
|
border-radius: 2px;
|
|
background-color: var(--thaw-background-color-today);
|
|
}
|
|
|
|
.thaw-date-picker-date-panel__item:hover
|
|
.thaw-date-picker-date-panel__item-day {
|
|
background-color: var(--thaw-item-background-color-hover);
|
|
}
|
|
|
|
.thaw-date-picker-date-panel__item--selected
|
|
.thaw-date-picker-date-panel__item-day {
|
|
background-color: var(--thaw-background-color-today) !important;
|
|
color: white;
|
|
}
|
|
|
|
.thaw-date-picker-date-panel__footer {
|
|
padding: 8px 12px;
|
|
display: flex;
|
|
flex-direction: row-reverse;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
border-top: 1px solid var(--thaw-item-border-color);
|
|
}
|
|
|
|
.thaw-date-picker-date-panel__header-year {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.thaw-date-picker-month-panel__header {
|
|
display: grid;
|
|
grid-template-columns: 28px 1fr 28px;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
border-bottom: 1px solid var(--thaw-item-border-color);
|
|
padding: 2px 6px;
|
|
}
|
|
|
|
.thaw-date-picker-year-panel__header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
border-bottom: 1px solid var(--thaw-item-border-color);
|
|
padding: 4px 6px;
|
|
}
|
|
|
|
.thaw-date-picker-year-panel__header > button,
|
|
.thaw-date-picker-month-panel__header > button {
|
|
color: var(--thaw-font-color-other-month);
|
|
}
|
|
|
|
.thaw-date-picker-year-panel__years,
|
|
.thaw-date-picker-month-panel__months {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
grid-auto-rows: 1fr;
|
|
padding: 4px 0 6px;
|
|
}
|
|
|
|
.thaw-date-picker-year-panel__item:first-child,
|
|
.thaw-date-picker-year-panel__item:last-child {
|
|
color: var(--thaw-font-color-other-month);
|
|
}
|
|
|
|
.thaw-date-picker-year-panel__item,
|
|
.thaw-date-picker-month-panel__item {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding: 4px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.thaw-date-picker-year-panel__item--selected
|
|
.thaw-date-picker-year-panel__item-year,
|
|
.thaw-date-picker-month-panel__item--selected
|
|
.thaw-date-picker-month-panel__item-month {
|
|
background-color: var(--thaw-background-color-today) !important;
|
|
color: white;
|
|
}
|
|
|
|
.thaw-date-picker-year-panel__item:hover
|
|
.thaw-date-picker-year-panel__item-year,
|
|
.thaw-date-picker-month-panel__item:hover
|
|
.thaw-date-picker-month-panel__item-month {
|
|
background-color: var(--thaw-item-background-color-hover);
|
|
}
|
|
|
|
.thaw-date-picker-year-panel__item-year,
|
|
.thaw-date-picker-month-panel__item-month {
|
|
width: 52px;
|
|
line-height: 24px;
|
|
height: 24px;
|
|
text-align: center;
|
|
border-radius: 3px;
|
|
}
|