panel.css 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  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. :host {
  73. /* Base ":host" styles for the component */
  74. box-sizing: border-box;
  75. background-color: var(--calcite-ui-foreground-1);
  76. color: var(--calcite-ui-text-2);
  77. font-size: var(--calcite-font-size--1);
  78. }
  79. :host * {
  80. box-sizing: border-box;
  81. }
  82. :root {
  83. --calcite-floating-ui-transition: var(--calcite-animation-timing);
  84. }
  85. :host([hidden]) {
  86. display: none;
  87. }
  88. :host([disabled]) {
  89. pointer-events: none;
  90. cursor: default;
  91. -webkit-user-select: none;
  92. user-select: none;
  93. opacity: var(--calcite-ui-opacity-disabled);
  94. }
  95. /**
  96. * CSS Custom Properties
  97. *
  98. * These properties can be overridden using the component's tag as selector.
  99. *
  100. * @prop --calcite-panel-max-height: The maximum height of the component.
  101. * @prop --calcite-panel-max-width: The maximum width of the component.
  102. * @prop --calcite-panel-min-width: The minimum width of the component.
  103. */
  104. :host {
  105. position: relative;
  106. display: flex;
  107. inline-size: 100%;
  108. flex: 1 1 auto;
  109. overflow: hidden;
  110. --calcite-min-header-height: calc(var(--calcite-icon-size) * 3);
  111. --calcite-panel-max-height: unset;
  112. --calcite-panel-width: 100%;
  113. --calcite-panel-min-width: unset;
  114. --calcite-panel-max-width: unset;
  115. }
  116. :host([disabled]) ::slotted([calcite-hydrated][disabled]),
  117. :host([disabled]) [calcite-hydrated][disabled] {
  118. /* prevent opacity stacking */
  119. opacity: 1;
  120. }
  121. /* Shared styles for header elements */
  122. .header {
  123. margin: 0px;
  124. display: flex;
  125. align-content: space-between;
  126. align-items: center;
  127. fill: var(--calcite-ui-text-2);
  128. color: var(--calcite-ui-text-2);
  129. }
  130. .heading {
  131. margin: 0px;
  132. padding: 0px;
  133. font-weight: var(--calcite-font-weight-medium);
  134. }
  135. .header .heading {
  136. flex: 1 1 auto;
  137. padding: 0.5rem;
  138. }
  139. .container {
  140. margin: 0px;
  141. display: flex;
  142. inline-size: 100%;
  143. flex: 1 1 auto;
  144. flex-direction: column;
  145. align-items: stretch;
  146. background-color: var(--calcite-ui-background);
  147. padding: 0px;
  148. max-block-size: var(--calcite-panel-max-height);
  149. inline-size: var(--calcite-panel-width);
  150. max-inline-size: var(--calcite-panel-max-width);
  151. min-inline-size: var(--calcite-panel-min-width);
  152. transition: max-block-size var(--calcite-animation-timing), inline-size var(--calcite-animation-timing);
  153. }
  154. :host([height-scale=s]) {
  155. --calcite-panel-max-height: 40vh;
  156. }
  157. :host([height-scale=m]) {
  158. --calcite-panel-max-height: 60vh;
  159. }
  160. :host([height-scale=l]) {
  161. --calcite-panel-max-height: 80vh;
  162. }
  163. :host([width-scale=s]) {
  164. --calcite-panel-width: calc(var(--calcite-panel-width-multiplier) * 12vw);
  165. --calcite-panel-max-width: calc(var(--calcite-panel-width-multiplier) * 300px);
  166. --calcite-panel-min-width: calc(var(--calcite-panel-width-multiplier) * 150px);
  167. }
  168. :host([width-scale=m]) {
  169. --calcite-panel-width: calc(var(--calcite-panel-width-multiplier) * 20vw);
  170. --calcite-panel-max-width: calc(var(--calcite-panel-width-multiplier) * 420px);
  171. --calcite-panel-min-width: calc(var(--calcite-panel-width-multiplier) * 240px);
  172. }
  173. :host([width-scale=l]) {
  174. --calcite-panel-width: calc(var(--calcite-panel-width-multiplier) * 45vw);
  175. --calcite-panel-max-width: calc(var(--calcite-panel-width-multiplier) * 680px);
  176. --calcite-panel-min-width: calc(var(--calcite-panel-width-multiplier) * 340px);
  177. }
  178. .container[hidden] {
  179. display: none;
  180. }
  181. .header {
  182. border-block-end: 1px solid;
  183. position: sticky;
  184. inset-block-start: 0px;
  185. z-index: 400;
  186. inline-size: 100%;
  187. align-items: stretch;
  188. justify-content: flex-start;
  189. background-color: var(--calcite-ui-foreground-1);
  190. border-block-end-color: var(--calcite-ui-border-3);
  191. flex: 0 0 auto;
  192. }
  193. .header-content {
  194. display: flex;
  195. flex-direction: column;
  196. overflow: hidden;
  197. padding-inline: 0.75rem;
  198. padding-block: 0.875rem;
  199. margin-inline-end: auto;
  200. }
  201. .header-content .heading,
  202. .header-content .description {
  203. display: block;
  204. overflow-wrap: break-word;
  205. padding: 0px;
  206. }
  207. .header-content .heading {
  208. margin-inline: 0px;
  209. margin-block: 0px 0.25rem;
  210. font-size: var(--calcite-font-size-0);
  211. line-height: 1.25rem;
  212. font-weight: var(--calcite-font-weight-medium);
  213. }
  214. .header-content .heading:only-child {
  215. margin-block-end: 0px;
  216. }
  217. .header-content .description {
  218. font-size: var(--calcite-font-size--1);
  219. line-height: 1rem;
  220. color: var(--calcite-ui-text-2);
  221. }
  222. .back-button {
  223. border-width: 0px;
  224. border-style: solid;
  225. border-color: var(--calcite-ui-border-3);
  226. border-inline-end-width: 1px;
  227. }
  228. .header-actions {
  229. display: flex;
  230. flex-direction: row;
  231. flex-wrap: nowrap;
  232. align-items: stretch;
  233. }
  234. .header-actions--end {
  235. margin-inline-start: auto;
  236. }
  237. .content-wrapper {
  238. overflow: auto;
  239. }
  240. .content-height {
  241. block-size: 100%;
  242. }
  243. .content-container {
  244. display: flex;
  245. flex: 1 1 auto;
  246. flex-direction: column;
  247. flex-wrap: nowrap;
  248. align-items: stretch;
  249. background-color: var(--calcite-ui-background);
  250. }
  251. .footer {
  252. border-block-start: 1px solid;
  253. position: sticky;
  254. inset-block-end: 0px;
  255. display: flex;
  256. inline-size: 100%;
  257. justify-content: space-evenly;
  258. background-color: var(--calcite-ui-foreground-1);
  259. border-block-start-color: var(--calcite-ui-border-3);
  260. flex: 0 0 auto;
  261. min-block-size: 3rem;
  262. padding: 0.5rem;
  263. }
  264. .fab-container {
  265. position: sticky;
  266. inset-block-end: 0px;
  267. z-index: 300;
  268. margin-block: 0px;
  269. margin-inline: auto;
  270. display: block;
  271. padding: 0.5rem;
  272. inset-inline: 0;
  273. inline-size: -moz-fit-content;
  274. inline-size: fit-content;
  275. }
  276. [hidden] {
  277. display: none;
  278. }