@sbh321/qcalendar
Version:
A forked version of Jeff Galbraith's fork of Quasar UI QCalendar
471 lines (461 loc) • 13.3 kB
CSS
/*!
* @subhambhandari/qcalendar v4.0.0-beta.19
* (c) 2024 Subham Bhandari <bhandarimaiya65@gmail.com>
* Released under the MIT License.
*/
.q-calendar {
position: relative;
display: flex;
flex-direction: column;
color: var(--calendar-color);
background: var(--calendar-background);
width: 100%;
min-width: auto;
overflow: hidden;
}
.q-calendar__bordered {
border: var(--calendar-border);
}
.q-calendar__button {
display: inline-block;
flex-direction: row;
align-items: center;
position: relative;
outline: 0;
border: 0;
vertical-align: middle;
padding: 0;
font-size: 0.75em;
line-height: 1.715em;
text-decoration: none;
color: inherit;
background: transparent;
text-transform: uppercase;
text-align: center;
width: auto;
height: auto;
min-height: 2em;
min-width: 2em;
will-change: background;
transition: background 0.3s;
}
.q-calendar__button--rounded {
border-radius: 6px;
}
.q-calendar__button--round {
border-radius: 50%;
}
.q-calendar__button--bordered {
border: var(--calendar-border);
}
.q-calendar__left {
text-align: right ;
justify-content: flex-start;
}
.q-calendar__center {
text-align: center ;
justify-content: center;
}
.q-calendar__right {
text-align: left ;
justify-content: flex-end;
}
.q-calendar__justify {
justify-content: space-between ;
}
.q-calendar__header--inline {
display: flex;
flex: 1 0 0;
flex-direction: row;
flex-wrap: nowrap;
justify-content: space-between;
align-items: center;
}
.q-calendar__ellipsis {
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
}
.q-calendar__overflow-wrap {
overflow-wrap: break-word;
overflow: hidden;
}
.q-calendar__parent {
transition: transform 0.3s;
border: solid currentColor;
border-width: 0 0 2px 2px;
display: inline-block;
padding: 2px;
width: 2px;
height: 2px;
cursor: pointer;
}
.q-calendar__parent--expanded {
margin: 0 2px;
transform: rotate(135deg);
}
.q-calendar__parent--collapsed {
margin: 0 2px;
transform: rotate(-45deg);
}
.q-calendar__child {
position: relative;
transition: max-height 0.28s linear;
}
.q-calendar__child--expanded {
max-height: 800px;
height: auto;
}
.q-calendar__child--collapsed {
max-height: 0;
overflow-y: hidden;
}
.q-calendar__focusable, .q-calendar__manual-focusable, .q-calendar__hoverable {
outline: 0;
}
.q-calendar__focus-helper {
position: absolute;
top: 0;
left: 0 ;
width: 100%;
height: 100%;
pointer-events: none;
border-radius: inherit;
opacity: 0;
transition: background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1), opacity 0.4s cubic-bezier(0.25, 0.8, 0.5, 1);
}
.q-calendar__focus-helper:before, .q-calendar__focus-helper:after {
content: "";
position: absolute;
top: 0;
left: 0 ;
width: 100%;
height: 100%;
opacity: 0;
border-radius: inherit;
transition: background-color 0.3s cubic-bezier(0.25, 0.8, 0.5, 1), opacity 0.6s cubic-bezier(0.25, 0.8, 0.5, 1);
}
.q-calendar__focus-helper:before {
background: #000;
}
.q-calendar__focus-helper:after {
background: #fff;
}
.q-calendar__focus-helper--rounded {
border-radius: 6px;
}
.q-calendar__focus-helper--round {
border-radius: 50%;
}
.q-calendar__focusable:focus > .q-calendar__focus-helper, .q-calendar__manual-focusable--focused > .q-calendar__focus-helper, .q-calendar__hoverable:hover > .q-calendar__focus-helper {
background: currentColor;
opacity: 0.15;
}
.q-calendar__focusable:focus > .q-calendar__focus-helper:before, .q-calendar__manual-focusable--focused > .q-calendar__focus-helper:before, .q-calendar__hoverable:hover > .q-calendar__focus-helper:before {
opacity: 0.1;
}
.q-calendar__focusable:focus > .q-calendar__focus-helper:after, .q-calendar__manual-focusable--focused > .q-calendar__focus-helper:after, .q-calendar__hoverable:hover > .q-calendar__focus-helper:after {
opacity: 0.4;
}
.q-calendar__focusable:focus > .q-calendar__focus-helper, .q-calendar__manual-focusable--focused > .q-calendar__focus-helper {
opacity: 0.22;
}
.disabled, .disabled *, [disabled], [disabled] * {
outline: 0 ;
cursor: not-allowed ;
}
.disabled, [disabled] {
opacity: 0.6 ;
}
.q-calendar {
color: var(--calendar-color);
background: var(--calendar-background);
}
.q-calendar .q-calendar__scroll::-webkit-scrollbar {
width: var(--calendar-scrollbar-width-height);
height: var(--calendar-scrollbar-width-height);
}
.q-calendar .q-calendar__scroll::-webkit-scrollbar-track {
background: var(--calendar-scrollbar-track);
box-shadow: inset 0 0 4px var(--calendar-scrollbar-track);
}
.q-calendar .q-calendar__scroll::-webkit-scrollbar-corner {
background: var(--calendar-scrollbar-track);
}
.q-calendar .q-calendar__scroll::-webkit-scrollbar-thumb {
background: var(--calendar-scrollbar-thumb);
border-radius: 5px;
}
.q-calendar .q-calendar__scroll::-webkit-scrollbar-thumb:hover {
background: var(--calendar-scrollbar-thumb-hover);
}
.q-dark div.q-calendar,
.body--dark div.q-calendar,
.q-calendar--dark.q-calendar {
color: var(--calendar-color-dark);
background: var(--calendar-background-dark);
}
.q-dark div.q-calendar__bordered,
.body--dark div.q-calendar__bordered,
.q-calendar--dark.q-calendar__bordered {
border: var(--calendar-border-dark);
}
.q-dark div.q-calendar .q-calendar__scroll::-webkit-scrollbar,
.body--dark div.q-calendar .q-calendar__scroll::-webkit-scrollbar,
.q-calendar--dark.q-calendar .q-calendar__scroll::-webkit-scrollbar {
width: var(--calendar-scrollbar-width-height);
height: var(--calendar-scrollbar-width-height);
}
.q-dark div.q-calendar .q-calendar__scroll::-webkit-scrollbar-track,
.body--dark div.q-calendar .q-calendar__scroll::-webkit-scrollbar-track,
.q-calendar--dark.q-calendar .q-calendar__scroll::-webkit-scrollbar-track {
background: var(--calendar-scrollbar-track-dark);
box-shadow: inset 0 0 4px var(--calendar-scrollbar-track-dark);
}
.q-dark div.q-calendar .q-calendar__scroll::-webkit-scrollbar-corner,
.body--dark div.q-calendar .q-calendar__scroll::-webkit-scrollbar-corner,
.q-calendar--dark.q-calendar .q-calendar__scroll::-webkit-scrollbar-corner {
background: var(--calendar-scrollbar-track-dark);
}
.q-dark div.q-calendar .q-calendar__scroll::-webkit-scrollbar-thumb,
.body--dark div.q-calendar .q-calendar__scroll::-webkit-scrollbar-thumb,
.q-calendar--dark.q-calendar .q-calendar__scroll::-webkit-scrollbar-thumb {
background: var(--calendar-scrollbar-thumb-dark);
border-radius: 5px;
}
.q-dark div.q-calendar .q-calendar__scroll::-webkit-scrollbar-thumb:hover,
.body--dark div.q-calendar .q-calendar__scroll::-webkit-scrollbar-thumb:hover,
.q-calendar--dark.q-calendar .q-calendar__scroll::-webkit-scrollbar-thumb:hover {
background: var(--calendar-scrollbar-thumb-hover-dark);
}
.q-calendar-resource {
display: flex;
flex: 1;
flex-direction: column;
flex-wrap: nowrap;
height: 100%;
width: 100%;
}
.q-calendar-resource__head--intervals {
display: flex;
flex-direction: row;
}
.q-calendar-resource__head {
position: relative;
flex: none;
display: flex;
flex-direction: row;
}
.q-calendar-resource__head--intervals {
display: flex;
flex-direction: row;
}
.q-calendar-resource__head--interval {
display: flex;
justify-content: center;
align-items: center;
position: relative;
font-size: 10px;
-webkit-user-select: none;
user-select: none;
width: 100%;
height: 100%;
}
.q-calendar-resource__body {
position: relative;
display: flex;
flex: 1 1 60%;
flex-direction: column;
overflow: hidden;
}
.q-calendar-resource__scroll-area {
flex: 1 1 auto;
display: flex;
align-items: flex-start;
overflow: auto;
}
.q-calendar-resource__day--container {
position: relative;
display: flex;
flex: 1;
flex-wrap: nowrap;
flex-direction: column;
}
.q-calendar-resource__resource--head {
display: flex;
flex-direction: row;
flex: 1;
position: relative;
font-size: 10px;
}
.q-calendar-resource__resources--body {
display: flex;
position: relative;
flex-direction: column;
flex-wrap: wrap;
}
.q-calendar-resource__resource--row {
display: flex;
position: relative;
flex-direction: row;
flex-wrap: nowrap;
flex: 1;
}
.q-calendar-resource__resource {
position: relative;
display: flex;
align-items: center;
text-align: right;
vertical-align: middle;
outline: 0;
}
.q-calendar-resource__resource--interval {
position: relative;
display: flex;
align-items: center;
text-align: right;
vertical-align: middle;
outline: 0;
}
.q-calendar-resource__resource--section {
position: relative;
display: flex;
align-items: center;
text-align: right;
vertical-align: middle;
outline: 0;
}
.q-calendar-resource__resource--text {
display: flex;
position: relative;
font-size: 12px;
align-items: center;
flex-wrap: wrap;
padding: 2px;
}
.q-calendar-resource__resource--intervals {
display: flex;
position: relative;
}
.q-calendar-resource__resource.q-calendar__sticky,
.q-calendar-resource__resource--section.q-calendar__sticky {
position: sticky;
left: 0 ;
z-index: 1;
}
.q-calendar-resource__head.q-calendar__sticky {
position: sticky;
left: 0 ;
top: 0;
z-index: 2;
}
.q-calendar-resource__head--resources.q-calendar__sticky {
position: sticky;
left: 0 ;
top: 0;
z-index: 10;
}
.q-calendar-resource__head {
border-bottom: var(--calendar-border);
color: var(--calendar-color);
background: var(--calendar-background);
font-weight: var(--calendar-head-font-weight);
}
.q-calendar-resource__head--resources {
border-left: var(--calendar-border);
border-bottom: var(--calendar-border);
color: var(--calendar-color);
background: var(--calendar-background);
min-width: var(--calendar-resources-width);
max-width: var(--calendar-resources-width);
}
.q-calendar-resource__head--resources:last-child {
border-bottom: none;
}
.q-calendar-resource__head--interval {
border-left: var(--calendar-border);
}
.q-calendar-resource__head--interval:last-child {
border-left: none;
}
.q-calendar-resource__resource {
border-left: var(--calendar-border);
color: var(--calendar-color);
background: var(--calendar-background);
min-width: var(--calendar-resources-width);
max-width: var(--calendar-resources-width);
}
.q-calendar-resource__resource:last-child {
border-left: none;
}
.q-calendar-resource__resource--row {
border-top: var(--calendar-border);
}
.q-calendar-resource__resource--row:first-child {
border-top: none;
}
.q-calendar-resource__resource--section {
border-left: var(--calendar-border);
color: var(--calendar-color);
background: var(--calendar-background);
min-width: var(--calendar-resources-width);
max-width: var(--calendar-resources-width);
}
.q-calendar-resource__resource--interval {
border-left: var(--calendar-border);
}
.q-calendar-resource__resource--interval:last-child {
border-left: none;
}
.q-calendar-resource .q-calendar__child--expanded > .q-calendar-resource__resource--row {
border-top: var(--calendar-border) ;
}
.q-dark div .q-calendar-resource__head,
.body--dark div .q-calendar-resource__head,
.q-calendar--dark .q-calendar-resource__head {
color: var(--calendar-color-dark);
background: var(--calendar-background-dark);
border-bottom: var(--calendar-border-dark);
}
.q-dark div .q-calendar-resource__head--resources,
.body--dark div .q-calendar-resource__head--resources,
.q-calendar--dark .q-calendar-resource__head--resources {
border-left: var(--calendar-border-dark);
border-bottom: var(--calendar-border-dark);
color: var(--calendar-color-dark);
background: var(--calendar-background-dark);
}
.q-dark div .q-calendar-resource__head--interval,
.body--dark div .q-calendar-resource__head--interval,
.q-calendar--dark .q-calendar-resource__head--interval {
border-left: var(--calendar-border-dark);
}
.q-dark div .q-calendar-resource__resource,
.body--dark div .q-calendar-resource__resource,
.q-calendar--dark .q-calendar-resource__resource {
border-left: var(--calendar-border-dark);
color: var(--calendar-color-dark);
background: var(--calendar-background-dark);
}
.q-dark div .q-calendar-resource__resource--row,
.body--dark div .q-calendar-resource__resource--row,
.q-calendar--dark .q-calendar-resource__resource--row {
border-top: var(--calendar-border-dark);
}
.q-dark div .q-calendar-resource__resource--section,
.body--dark div .q-calendar-resource__resource--section,
.q-calendar--dark .q-calendar-resource__resource--section {
border-left: var(--calendar-border-dark);
color: var(--calendar-color-dark);
background: var(--calendar-background-dark);
}
.q-dark div .q-calendar-resource__resource--interval,
.body--dark div .q-calendar-resource__resource--interval,
.q-calendar--dark .q-calendar-resource__resource--interval {
border-left: var(--calendar-border-dark);
}
.q-dark div .q-calendar-resource .q-calendar__child--expanded > .q-calendar-resource__resource--row,
.body--dark div .q-calendar-resource .q-calendar__child--expanded > .q-calendar-resource__resource--row,
.q-calendar--dark .q-calendar-resource .q-calendar__child--expanded > .q-calendar-resource__resource--row {
border-top: var(--calendar-border-dark) ;
}