tip-manager.css 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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. @media (prefers-reduced-motion: reduce) {
  65. :root {
  66. --calcite-internal-duration-factor: 0.01;
  67. }
  68. }
  69. /**
  70. * Currently only used in Checkbox.
  71. */
  72. :root {
  73. --calcite-floating-ui-transition: var(--calcite-animation-timing);
  74. }
  75. :host([hidden]) {
  76. display: none;
  77. }
  78. /**
  79. * CSS Custom Properties
  80. *
  81. * These properties can be overridden using the component's tag as selector.
  82. *
  83. * @prop --calcite-tip-manager-height: The maximum height of the component.
  84. * @prop --calcite-tip-max-width: The maximum width of a slotted `calcite-tip` within the component.
  85. */
  86. :host {
  87. box-sizing: border-box;
  88. display: block;
  89. background-color: var(--calcite-ui-foreground-1);
  90. font-size: var(--calcite-font-size--1);
  91. line-height: 1rem;
  92. color: var(--calcite-ui-text-2);
  93. --calcite-tip-manager-height: 19vh;
  94. }
  95. :host * {
  96. box-sizing: border-box;
  97. }
  98. :host([closed]) {
  99. display: none;
  100. }
  101. /* Shared styles for header elements */
  102. .header {
  103. margin: 0px;
  104. display: flex;
  105. align-content: space-between;
  106. align-items: center;
  107. fill: var(--calcite-ui-text-2);
  108. color: var(--calcite-ui-text-2);
  109. }
  110. .heading {
  111. margin: 0px;
  112. padding: 0px;
  113. font-weight: var(--calcite-font-weight-medium);
  114. }
  115. .header .heading {
  116. flex: 1 1 auto;
  117. padding: 0.5rem;
  118. }
  119. .header {
  120. border-width: 0px;
  121. border-block-end-width: 1px;
  122. border-style: solid;
  123. border-color: var(--calcite-ui-border-3);
  124. padding-block: 0px;
  125. padding-inline-end: 0px;
  126. padding-inline-start: 1rem;
  127. }
  128. .header .heading {
  129. padding: 0px;
  130. font-size: var(--calcite-font-size-1);
  131. line-height: 1.5rem;
  132. font-weight: var(--calcite-font-weight-bold);
  133. color: var(--calcite-ui-text-1);
  134. }
  135. .container {
  136. position: relative;
  137. overflow: hidden;
  138. outline-color: transparent;
  139. min-block-size: 150px;
  140. }
  141. .container:focus {
  142. outline: 2px solid var(--calcite-ui-brand);
  143. outline-offset: 2px;
  144. }
  145. .tip-container {
  146. margin-block-start: 1px;
  147. display: flex;
  148. align-items: flex-start;
  149. justify-content: center;
  150. overflow: auto;
  151. outline-color: transparent;
  152. animation-name: none;
  153. animation-duration: var(--calcite-animation-timing);
  154. block-size: var(--calcite-tip-manager-height);
  155. }
  156. .tip-container:focus {
  157. outline: 2px solid var(--calcite-ui-brand);
  158. outline-offset: 2px;
  159. }
  160. ::slotted(calcite-tip) {
  161. border-style: none;
  162. padding: 0.75rem;
  163. max-inline-size: var(--calcite-tip-max-width);
  164. }
  165. .tip-container--advancing {
  166. animation-name: tip-advance;
  167. }
  168. .tip-container--retreating {
  169. animation-name: tip-retreat;
  170. }
  171. /* Pagination Styles*/
  172. .pagination {
  173. display: flex;
  174. align-items: center;
  175. justify-content: center;
  176. padding-inline: 0px;
  177. padding-block: 0.75rem 0.5rem;
  178. }
  179. .page-position {
  180. margin-block: 0px;
  181. margin-inline: 0.5rem;
  182. font-size: var(--calcite-font-size--2);
  183. line-height: 1rem;
  184. }
  185. /* @keyframes*/
  186. @keyframes tip-advance {
  187. 0% {
  188. opacity: 0;
  189. transform: translate3d(50px, 0, 0) scale(0.99);
  190. }
  191. 100% {
  192. opacity: 1;
  193. transform: translate3d(0, 0, 0) scale(1);
  194. }
  195. }
  196. @keyframes tip-retreat {
  197. 0% {
  198. opacity: 0;
  199. transform: translate3d(-50px, 0, 0) scale(0.99);
  200. }
  201. 100% {
  202. opacity: 1;
  203. transform: translate3d(0, 0, 0) scale(1);
  204. }
  205. }