date-picker-month-header.css 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  1. /* mixins & extensions */
  2. @keyframes in {
  3. 0% {
  4. opacity: 0;
  5. }
  6. 100% {
  7. opacity: 1;
  8. }
  9. }
  10. @keyframes in-down {
  11. 0% {
  12. opacity: 0;
  13. transform: translate3D(0, -5px, 0);
  14. }
  15. 100% {
  16. opacity: 1;
  17. transform: translate3D(0, 0, 0);
  18. }
  19. }
  20. @keyframes in-up {
  21. 0% {
  22. opacity: 0;
  23. transform: translate3D(0, 5px, 0);
  24. }
  25. 100% {
  26. opacity: 1;
  27. transform: translate3D(0, 0, 0);
  28. }
  29. }
  30. @keyframes in-scale {
  31. 0% {
  32. opacity: 0;
  33. transform: scale3D(0.95, 0.95, 1);
  34. }
  35. 100% {
  36. opacity: 1;
  37. transform: scale3D(1, 1, 1);
  38. }
  39. }
  40. :root {
  41. --calcite-animation-timing: calc(150ms * var(--calcite-internal-duration-factor));
  42. --calcite-internal-duration-factor: var(--calcite-duration-factor, 1);
  43. --calcite-internal-animation-timing-fast: calc(100ms * var(--calcite-internal-duration-factor));
  44. --calcite-internal-animation-timing-medium: calc(200ms * var(--calcite-internal-duration-factor));
  45. --calcite-internal-animation-timing-slow: calc(300ms * var(--calcite-internal-duration-factor));
  46. }
  47. .calcite-animate {
  48. opacity: 0;
  49. animation-fill-mode: both;
  50. animation-duration: var(--calcite-animation-timing);
  51. }
  52. .calcite-animate__in {
  53. animation-name: in;
  54. }
  55. .calcite-animate__in-down {
  56. animation-name: in-down;
  57. }
  58. .calcite-animate__in-up {
  59. animation-name: in-up;
  60. }
  61. .calcite-animate__in-scale {
  62. animation-name: in-scale;
  63. }
  64. /**
  65. * Currently only used in Checkbox.
  66. */
  67. :root {
  68. --calcite-popper-transition: var(--calcite-animation-timing);
  69. }
  70. :host([hidden]) {
  71. display: none;
  72. }
  73. :host {
  74. display: block;
  75. }
  76. .header {
  77. display: flex;
  78. justify-content: space-between;
  79. padding-top: 0px;
  80. padding-bottom: 0px;
  81. padding-left: 0.25rem;
  82. padding-right: 0.25rem;
  83. }
  84. :host([scale=s]) .text {
  85. margin-top: 0.5rem;
  86. margin-bottom: 0.5rem;
  87. font-size: var(--calcite-font-size--1);
  88. line-height: 1rem;
  89. }
  90. :host([scale=s]) .chevron {
  91. height: 2.25rem;
  92. }
  93. :host([scale=m]) .text {
  94. margin-top: 0.75rem;
  95. margin-bottom: 0.75rem;
  96. font-size: var(--calcite-font-size-0);
  97. line-height: 1.25rem;
  98. }
  99. :host([scale=m]) .chevron {
  100. height: 3rem;
  101. }
  102. :host([scale=l]) .text {
  103. margin-top: 1rem;
  104. margin-bottom: 1rem;
  105. font-size: var(--calcite-font-size-1);
  106. line-height: 1.5rem;
  107. }
  108. :host([scale=l]) .chevron {
  109. height: 3.5rem;
  110. }
  111. .chevron {
  112. margin-left: -0.25rem;
  113. margin-right: -0.25rem;
  114. box-sizing: content-box;
  115. display: flex;
  116. flex-grow: 0;
  117. cursor: pointer;
  118. align-items: center;
  119. justify-content: center;
  120. border-style: none;
  121. background-color: var(--calcite-ui-foreground-1);
  122. padding-left: 0.25rem;
  123. padding-right: 0.25rem;
  124. color: var(--calcite-ui-text-3);
  125. outline: 2px solid transparent;
  126. outline-offset: 2px;
  127. transition-property: all;
  128. transition-duration: 150ms;
  129. transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  130. outline-offset: 0;
  131. outline-color: transparent;
  132. transition: outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;
  133. width: 14.2857142857%;
  134. }
  135. .chevron:focus {
  136. outline: 2px solid var(--calcite-ui-brand);
  137. outline-offset: -2px;
  138. }
  139. .chevron:hover, .chevron:focus {
  140. background-color: var(--calcite-ui-foreground-2);
  141. fill: var(--calcite-ui-text-1);
  142. color: var(--calcite-ui-text-1);
  143. }
  144. .chevron:active {
  145. background-color: var(--calcite-ui-foreground-3);
  146. }
  147. .chevron[aria-disabled=true] {
  148. pointer-events: none;
  149. opacity: 0;
  150. }
  151. .text {
  152. margin-top: auto;
  153. margin-bottom: auto;
  154. width: 100%;
  155. flex: 1 1 auto;
  156. align-items: center;
  157. justify-content: center;
  158. text-align: center;
  159. line-height: 1;
  160. }
  161. .text-nreverse {
  162. flex-direction: row-reverse;
  163. }
  164. .month, .year, .suffix {
  165. margin-left: 0.25rem;
  166. margin-right: 0.25rem;
  167. margin-top: auto;
  168. margin-bottom: auto;
  169. display: inline-block;
  170. background-color: var(--calcite-ui-foreground-1);
  171. font-weight: var(--calcite-font-weight-medium);
  172. line-height: 1.25;
  173. color: var(--calcite-ui-text-1);
  174. font-size: inherit;
  175. }
  176. .year {
  177. position: relative;
  178. width: 3rem;
  179. border-style: none;
  180. background-color: transparent;
  181. text-align: center;
  182. font-family: inherit;
  183. outline-offset: 0;
  184. outline-color: transparent;
  185. transition: outline-offset 100ms ease-in-out, outline-color 100ms ease-in-out;
  186. z-index: 2;
  187. }
  188. .year:hover {
  189. transition-duration: 100ms;
  190. transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  191. transition-property: outline-color;
  192. outline: 2px solid var(--calcite-ui-border-2);
  193. outline-offset: 2px;
  194. }
  195. .year:focus {
  196. outline: 2px solid var(--calcite-ui-brand);
  197. outline-offset: 2px;
  198. }
  199. .year--suffix {
  200. width: 4rem;
  201. text-align: left;
  202. }
  203. .year-wrap {
  204. position: relative;
  205. }
  206. .suffix {
  207. position: absolute;
  208. top: 0px;
  209. left: 0px;
  210. width: 4rem;
  211. white-space: nowrap;
  212. text-align: left;
  213. }
  214. .suffix__invisible {
  215. visibility: hidden;
  216. }