123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437 |
- /* mixins & extensions */
- @keyframes in {
- 0% {
- opacity: 0;
- }
- 100% {
- opacity: 1;
- }
- }
- @keyframes in-down {
- 0% {
- opacity: 0;
- transform: translate3D(0, -5px, 0);
- }
- 100% {
- opacity: 1;
- transform: translate3D(0, 0, 0);
- }
- }
- @keyframes in-up {
- 0% {
- opacity: 0;
- transform: translate3D(0, 5px, 0);
- }
- 100% {
- opacity: 1;
- transform: translate3D(0, 0, 0);
- }
- }
- @keyframes in-scale {
- 0% {
- opacity: 0;
- transform: scale3D(0.95, 0.95, 1);
- }
- 100% {
- opacity: 1;
- transform: scale3D(1, 1, 1);
- }
- }
- :root {
- --calcite-animation-timing: calc(150ms * var(--calcite-internal-duration-factor));
- --calcite-internal-duration-factor: var(--calcite-duration-factor, 1);
- --calcite-internal-animation-timing-fast: calc(100ms * var(--calcite-internal-duration-factor));
- --calcite-internal-animation-timing-medium: calc(200ms * var(--calcite-internal-duration-factor));
- --calcite-internal-animation-timing-slow: calc(300ms * var(--calcite-internal-duration-factor));
- }
- .calcite-animate {
- opacity: 0;
- animation-fill-mode: both;
- animation-duration: var(--calcite-animation-timing);
- }
- .calcite-animate__in {
- animation-name: in;
- }
- .calcite-animate__in-down {
- animation-name: in-down;
- }
- .calcite-animate__in-up {
- animation-name: in-up;
- }
- .calcite-animate__in-scale {
- animation-name: in-scale;
- }
- /**
- * Currently only used in Checkbox.
- */
- :root {
- --calcite-popper-transition: var(--calcite-animation-timing);
- }
- :host([hidden]) {
- display: none;
- }
- :host {
- display: flex;
- min-width: 0px;
- cursor: pointer;
- justify-content: center;
- color: var(--calcite-ui-text-3);
- width: 14.2857142857%;
- }
- :host([disabled]) {
- pointer-events: none;
- cursor: default;
- -webkit-user-select: none;
- user-select: none;
- opacity: var(--calcite-ui-opacity-disabled);
- }
- :host([disabled]) ::slotted([calcite-hydrated][disabled]),
- :host([disabled]) [calcite-hydrated][disabled] {
- /* prevent opacity stacking */
- opacity: 1;
- }
- .day-v-wrapper {
- flex: 1 1 auto;
- }
- .day-wrapper {
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- .day {
- display: flex;
- align-items: center;
- justify-content: center;
- border-radius: 9999px;
- font-size: var(--calcite-font-size--2);
- line-height: 1rem;
- line-height: 1;
- color: var(--calcite-ui-text-3);
- opacity: var(--calcite-ui-opacity-disabled);
- transition-property: all;
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
- transition-duration: 150ms;
- background: none;
- box-shadow: 0 0 0 2px transparent, 0 0 0 0px transparent;
- }
- .text {
- margin-top: 1px;
- margin-right: 0px;
- margin-bottom: 0px;
- margin-left: 1px;
- }
- :host([scale=s]) .day-v-wrapper {
- padding-top: 0.125rem;
- padding-bottom: 0.125rem;
- }
- :host([scale=s]) .day-wrapper {
- padding: 0px;
- }
- :host([scale=s]) .day {
- height: 27px;
- width: 27px;
- font-size: var(--calcite-font-size--2);
- }
- :host([scale=m]) .day-v-wrapper {
- padding-top: 0.25rem;
- padding-bottom: 0.25rem;
- }
- :host([scale=m]) .day-wrapper {
- padding-left: 0.25rem;
- padding-right: 0.25rem;
- }
- :host([scale=m]) .day {
- height: 33px;
- width: 33px;
- font-size: var(--calcite-font-size--1);
- }
- :host([scale=l]) .day-v-wrapper {
- padding-top: 0.25rem;
- padding-bottom: 0.25rem;
- }
- :host([scale=l]) .day-wrapper {
- padding-left: 0.25rem;
- padding-right: 0.25rem;
- }
- :host([scale=l]) .day {
- height: 43px;
- width: 43px;
- font-size: var(--calcite-font-size-0);
- }
- :host([current-month]) .day {
- opacity: 1;
- }
- :host(:hover:not([disabled])) .day, :host([active]:not([range])) .day {
- background-color: var(--calcite-ui-foreground-2);
- color: var(--calcite-ui-text-1);
- }
- :host(:focus), :host([active]) {
- outline: 2px solid transparent;
- outline-offset: 2px;
- z-index: 1;
- }
- :host(:focus:not([disabled])) .day {
- box-shadow: 0 0 0 2px var(--calcite-ui-foreground-1), 0 0 0 4px var(--calcite-ui-brand);
- }
- :host([selected]) .day {
- font-weight: var(--calcite-font-weight-medium);
- background-color: var(--calcite-ui-brand) !important;
- color: var(--calcite-ui-foreground-1) !important;
- z-index: 1;
- }
- :host([range][selected]) .day-wrapper {
- background-color: var(--calcite-ui-foreground-current);
- }
- :host([start-of-range]) .day-wrapper {
- border-start-start-radius: 40%;
- border-end-start-radius: 40%;
- }
- :host([end-of-range]) .day-wrapper {
- border-start-end-radius: 40%;
- border-end-end-radius: 40%;
- }
- :host([start-of-range]) :not(.calcite--rtl) .day-wrapper,
- :host([end-of-range]) .calcite--rtl .day-wrapper {
- box-shadow: inset 4px 0 var(--calcite-ui-foreground-1);
- }
- :host([start-of-range]) :not(.calcite--rtl) .day,
- :host([end-of-range]) .calcite--rtl .day {
- opacity: 1;
- }
- :host([start-of-range]:not(:focus)) :not(.calcite--rtl) .day,
- :host([end-of-range]:not(:focus)) .calcite--rtl .day {
- box-shadow: 0 0 0 2px var(--calcite-ui-foreground-1);
- }
- :host([end-of-range]) :not(.calcite--rtl) .day-wrapper,
- :host([start-of-range]) .calcite--rtl .day-wrapper {
- box-shadow: inset -4px 0 var(--calcite-ui-foreground-1);
- }
- :host([end-of-range]) :not(.calcite--rtl) .day,
- :host([start-of-range]) .calcite--rtl .day {
- opacity: 1;
- }
- :host([end-of-range]:not(:focus)) :not(.calcite--rtl) .day,
- :host([start-of-range]:not(:focus)) .calcite--rtl .day {
- box-shadow: 0 0 0 2px var(--calcite-ui-foreground-1);
- }
- :host([end-of-range][scale=l]) :not(.calcite--rtl) .day-wrapper,
- :host([start-of-range][scale=l]) .calcite--rtl .day-wrapper {
- box-shadow: inset -8px 0 var(--calcite-ui-foreground-1);
- }
- :host([start-of-range][scale=l]) :not(.calcite--rtl) .day-wrapper,
- :host([end-of-range][scale=l]) .calcite--rtl .day-wrapper {
- box-shadow: inset 8px 0 var(--calcite-ui-foreground-1);
- }
- :host([highlighted]) .day-wrapper {
- background-color: var(--calcite-ui-foreground-current);
- }
- :host([highlighted]) .day-wrapper .day {
- color: var(--calcite-ui-text-1);
- }
- :host([highlighted]:not([active]:focus)) .day {
- border-radius: 0px;
- color: var(--calcite-ui-text-1);
- }
- :host([range-hover]:not([selected])) .day-wrapper {
- background-color: var(--calcite-ui-foreground-2);
- }
- :host([range-hover]:not([selected])) .day {
- border-radius: 0px;
- }
- :host([end-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper,
- :host([start-of-range][range-hover]) .calcite--rtl .day-wrapper {
- background-image: linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));
- border-radius: 0px;
- --tw-shadow: 0 0 #0000;
- --tw-shadow-colored: 0 0 #0000;
- box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
- }
- :host([start-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper,
- :host([end-of-range][range-hover]) .calcite--rtl .day-wrapper {
- background-image: linear-gradient(to left, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));
- border-radius: 0px;
- --tw-shadow: 0 0 #0000;
- --tw-shadow-colored: 0 0 #0000;
- box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
- }
- :host(:hover[end-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper,
- :host(:hover[start-of-range][range-hover]) .calcite--rtl .day-wrapper {
- background-image: linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1));
- border-radius: 0px;
- --tw-shadow: 0 0 #0000;
- --tw-shadow-colored: 0 0 #0000;
- box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
- }
- :host(:hover[start-of-range][range-hover]) :not(.calcite--rtl) .day-wrapper,
- :host(:hover[end-of-range][range-hover]) .calcite--rtl .day-wrapper {
- background-image: linear-gradient(to left, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1));
- border-radius: 0px;
- --tw-shadow: 0 0 #0000;
- --tw-shadow-colored: 0 0 #0000;
- box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
- }
- :host(:hover[range-hover]:not([selected]).focused--end) :not(.calcite--rtl) .day-wrapper,
- :host(:hover[range-hover]:not([selected]).focused--start) .calcite--rtl .day-wrapper {
- background-image: linear-gradient(to right, var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current));
- }
- :host(:hover[range-hover]:not([selected]).focused--end) :not(.calcite--rtl) .day, :host(:hover[range-hover]:not([selected]).focused--start) .calcite--rtl .day {
- border-radius: 9999px;
- opacity: 1;
- box-shadow: 0 0 0 2px var(--calcite-ui-foreground-1);
- }
- :host(:hover[range-hover]:not([selected]).focused--start) :not(.calcite--rtl) .day-wrapper,
- :host(:hover[range-hover]:not([selected]).focused--end) .calcite--rtl .day-wrapper {
- background-image: linear-gradient(to right, var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-current), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));
- }
- :host(:hover[range-hover]:not([selected]).focused--start) :not(.calcite--rtl) .day, :host(:hover[range-hover]:not([selected]).focused--end) .calcite--rtl .day {
- border-radius: 9999px;
- opacity: 1;
- box-shadow: 0 0 0 2px var(--calcite-ui-foreground-1);
- }
- :host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) :not(.calcite--rtl) .day-wrapper,
- :host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) .calcite--rtl .day-wrapper {
- background-image: linear-gradient(to right, var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2));
- }
- :host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) :not(.calcite--rtl) .day, :host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) .calcite--rtl .day {
- border-radius: 9999px;
- opacity: 1;
- box-shadow: 0 0 0 2px var(--calcite-ui-foreground-1);
- }
- :host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) :not(.calcite--rtl) .day-wrapper,
- :host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) .calcite--rtl .day-wrapper {
- background-image: linear-gradient(to right, var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-2), var(--calcite-ui-foreground-1), var(--calcite-ui-foreground-1));
- }
- :host(:hover[range-hover]:not([selected]).focused--end.hover--outside-range) :not(.calcite--rtl) .day, :host(:hover[range-hover]:not([selected]).focused--start.hover--outside-range) .calcite--rtl .day {
- border-radius: 9999px;
- opacity: 1;
- box-shadow: 0 0 0 2px var(--calcite-ui-foreground-1);
- }
- :host(:hover[start-of-range].hover--inside-range.focused--end) .day-wrapper, :host(:hover[end-of-range].hover--inside-range.focused--start) .day-wrapper {
- background-image: none;
- }
- :host([start-of-range].hover--inside-range.focused--end) .day-wrapper, :host([end-of-range].hover--inside-range.focused--start) .day-wrapper {
- background-color: var(--calcite-ui-foreground-2);
- }
- :host([highlighted]:last-child) :not(.calcite--rtl) .day-wrapper,
- :host([range-hover]:last-child) :not(.calcite--rtl) .day-wrapper,
- :host([highlighted]:first-child) .calcite--rtl .day-wrapper,
- :host([range-hover]:first-child) .calcite--rtl .day-wrapper {
- box-shadow: inset -4px 0px 0px 0px var(--calcite-ui-foreground-1);
- }
- :host([highlighted]:first-child) :not(.calcite--rtl) .day-wrapper,
- :host([range-hover]:first-child) :not(.calcite--rtl) .day-wrapper,
- :host([highlighted]:last-child) .calcite--rtl .day-wrapper,
- :host([range-hover]:last-child) .calcite--rtl .day-wrapper {
- box-shadow: inset 4px 0px 0px 0px var(--calcite-ui-foreground-1);
- }
- :host([scale=s][highlighted]:last-child) :not(.calcite--rtl) .day-wrapper,
- :host([scale=s][range-hover]:last-child) :not(.calcite--rtl) .day-wrapper,
- :host([scale=s][highlighted]:first-child) .calcite--rtl .day-wrapper,
- :host([scale=s][range-hover]:first-child) .calcite--rtl .day-wrapper {
- box-shadow: inset -1px 0px 0px 0px var(--calcite-ui-foreground-1);
- }
- :host([scale=s][highlighted]:first-child) :not(.calcite--rtl) .day-wrapper,
- :host([scale=s][range-hover]:first-child) :not(.calcite--rtl) .day-wrapper,
- :host([scale=s][highlighted]:last-child) .calcite--rtl .day-wrapper,
- :host([scale=s][range-hover]:last-child) .calcite--rtl .day-wrapper {
- box-shadow: inset 1px 0px 0px 0px var(--calcite-ui-foreground-1);
- }
- :host([scale=l][highlighted]:first-child) :not(.calcite--rtl) .day-wrapper,
- :host([scale=l][range-hover]:first-child) :not(.calcite--rtl) .day-wrapper,
- :host([scale=l][highlighted]:last-child) .calcite--rtl .day-wrapper,
- :host([scale=l][range-hover]:last-child) .calcite--rtl .day-wrapper {
- box-shadow: inset 6px 0px 0px 0px var(--calcite-ui-foreground-1);
- }
- :host([highlighted]:first-child) .day-wrapper,
- :host([range-hover]:first-child) .day-wrapper {
- border-start-start-radius: 45%;
- border-end-start-radius: 45%;
- }
- :host([highlighted]:last-child) .day-wrapper,
- :host([range-hover]:last-child) .day-wrapper {
- border-start-end-radius: 45%;
- border-end-end-radius: 45%;
- }
- :host([scale=l][highlighted]:last-child) :not(.calcite--rtl) .day-wrapper,
- :host([scale=l][range-hover]:last-child) :not(.calcite--rtl) .day-wrapper,
- :host([scale=l][highlighted]:first-child) .calcite--rtl .day-wrapper,
- :host([scale=l][range-hover]:first-child) .calcite--rtl .day-wrapper {
- box-shadow: inset -6px 0px 0px 0px var(--calcite-ui-foreground-1);
- }
- @media (forced-colors: active) {
- :host(:hover:not([disabled])) .day, :host([active]:not([range])) .day {
- border-radius: 0px;
- }
- :host([selected]) {
- outline: 2px solid canvasText;
- z-index: 1;
- }
- :host([selected]) .day {
- border-radius: 0px;
- background-color: highlight;
- }
- :host([range][selected]) .day-wrapper,
- :host([highlighted]) .day-wrapper,
- :host([range-hover]:not([selected])) .day-wrapper {
- background-color: highlight;
- }
- :host([range][selected][start-of-range]) .day-wrapper,
- :host([range][selected][end-of-range]) .day-wrapper {
- background-color: canvas;
- }
- }
|