shell-panel.css 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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. pointer-events: none;
  75. display: flex;
  76. flex: 0 1 auto;
  77. align-items: stretch;
  78. --calcite-shell-panel-detached-max-height: unset;
  79. }
  80. .container {
  81. pointer-events: none;
  82. box-sizing: border-box;
  83. display: flex;
  84. flex: 1 1 auto;
  85. align-items: stretch;
  86. background-color: transparent;
  87. font-size: var(--calcite-font-size--1);
  88. color: var(--calcite-ui-text-2);
  89. }
  90. .container * {
  91. box-sizing: border-box;
  92. }
  93. :host(:hover) .separator:not(:hover):not(:focus), :host(:focus-within) .separator:not(:hover):not(:focus) {
  94. opacity: 1;
  95. background-color: var(--calcite-ui-border-3);
  96. }
  97. .separator {
  98. pointer-events: auto;
  99. position: absolute;
  100. bottom: 0px;
  101. top: 0px;
  102. z-index: 10;
  103. display: flex;
  104. height: 100%;
  105. width: 0.125rem;
  106. background-color: transparent;
  107. opacity: 0;
  108. transition-property: all;
  109. transition-duration: var(--calcite-animation-timing);
  110. transition-timing-function: ease-in-out;
  111. transition-delay: 0s;
  112. cursor: col-resize;
  113. outline: none;
  114. }
  115. .separator:hover {
  116. opacity: 1;
  117. background-color: var(--calcite-ui-border-2);
  118. }
  119. .separator:focus {
  120. background-color: var(--calcite-ui-brand);
  121. opacity: 1;
  122. }
  123. :host([position=start]) .separator {
  124. inset-inline-end: -2px;
  125. }
  126. :host([position=end]) .separator {
  127. inset-inline-start: -2px;
  128. }
  129. ::slotted(calcite-panel), ::slotted(calcite-flow) {
  130. height: 100%;
  131. width: 100%;
  132. flex: 1 1 auto;
  133. max-height: unset;
  134. max-width: unset;
  135. }
  136. ::slotted(.calcite-match-height) {
  137. display: flex;
  138. flex: 1 1 auto;
  139. overflow: hidden;
  140. }
  141. .content {
  142. pointer-events: auto;
  143. display: flex;
  144. flex-direction: column;
  145. flex-wrap: nowrap;
  146. align-items: stretch;
  147. align-self: stretch;
  148. background-color: var(--calcite-ui-background);
  149. padding: 0px;
  150. width: var(--calcite-shell-panel-width);
  151. max-width: var(--calcite-shell-panel-max-width);
  152. min-width: var(--calcite-shell-panel-min-width);
  153. transition: max-height var(--calcite-animation-timing), max-width var(--calcite-animation-timing);
  154. }
  155. .content__header {
  156. display: flex;
  157. flex: 0 1 auto;
  158. flex-direction: column;
  159. flex-wrap: nowrap;
  160. align-items: stretch;
  161. }
  162. .content__body {
  163. display: flex;
  164. flex: 1 1 auto;
  165. flex-direction: column;
  166. overflow: hidden;
  167. }
  168. :host([width-scale=s]) .content {
  169. --calcite-shell-panel-width: calc(var(--calcite-panel-width-multiplier) * 12vw);
  170. --calcite-shell-panel-max-width: calc(var(--calcite-panel-width-multiplier) * 300px);
  171. --calcite-shell-panel-min-width: calc(var(--calcite-panel-width-multiplier) * 150px);
  172. }
  173. :host([width-scale=m]) .content {
  174. --calcite-shell-panel-width: calc(var(--calcite-panel-width-multiplier) * 20vw);
  175. --calcite-shell-panel-max-width: calc(var(--calcite-panel-width-multiplier) * 420px);
  176. --calcite-shell-panel-min-width: calc(var(--calcite-panel-width-multiplier) * 240px);
  177. }
  178. :host([width-scale=l]) .content {
  179. --calcite-shell-panel-width: calc(var(--calcite-panel-width-multiplier) * 45vw);
  180. --calcite-shell-panel-max-width: calc(var(--calcite-panel-width-multiplier) * 680px);
  181. --calcite-shell-panel-min-width: calc(var(--calcite-panel-width-multiplier) * 340px);
  182. }
  183. :host([detached-height-scale=s]) .content--detached {
  184. --calcite-shell-panel-detached-max-height: 40vh;
  185. }
  186. :host([detached-height-scale=m]) .content--detached {
  187. --calcite-shell-panel-detached-max-height: 60vh;
  188. }
  189. :host([detached-height-scale=l]) .content--detached {
  190. --calcite-shell-panel-detached-max-height: 80vh;
  191. }
  192. .content--detached {
  193. margin-left: 0.5rem;
  194. margin-right: 0.5rem;
  195. margin-top: 0.5rem;
  196. margin-bottom: auto;
  197. height: auto;
  198. overflow: hidden;
  199. border-radius: 0.25rem;
  200. --tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  201. --tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);
  202. box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
  203. max-height: var(--calcite-shell-panel-detached-max-height);
  204. }
  205. .content--detached ::slotted(calcite-panel),
  206. .content--detached ::slotted(calcite-flow) {
  207. max-height: unset;
  208. }
  209. :host([position=start]) .content--detached ::slotted(calcite-panel), :host([position=start]) .content--detached ::slotted(calcite-flow), :host([position=end]) .content--detached ::slotted(calcite-panel), :host([position=end]) .content--detached ::slotted(calcite-flow) {
  210. border-style: none;
  211. }
  212. .content[hidden] {
  213. display: none;
  214. }
  215. slot[name=action-bar]::slotted(calcite-action-bar), .content ::slotted(calcite-flow), .content ::slotted(calcite-panel:not([dismissed])) {
  216. border-width: 1px;
  217. border-style: solid;
  218. border-color: var(--calcite-ui-border-3);
  219. }
  220. :host([position=start]) slot[name=action-bar]::slotted(calcite-action-bar),
  221. :host([position=start]) .content ::slotted(calcite-flow),
  222. :host([position=start]) .content ::slotted(calcite-panel) {
  223. border-inline-start: none;
  224. }
  225. :host([position=end]) slot[name=action-bar]::slotted(calcite-action-bar),
  226. :host([position=end]) .content ::slotted(calcite-flow),
  227. :host([position=end]) .content ::slotted(calcite-panel) {
  228. border-inline-end: none;
  229. }