panel.css 7.1 KB

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