/
calcite-shell-panel.scss
executable file
·179 lines (154 loc) · 3.88 KB
/
calcite-shell-panel.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
:host {
@apply flex
items-stretch
flex-initial
pointer-events-none;
--calcite-shell-panel-detached-max-height: unset;
}
.container {
@apply box-border
flex
items-stretch
bg-transparent
flex-auto
pointer-events-none
text-color-2
text--1;
* {
@apply box-border;
}
}
:host(:hover),
:host(:focus-within) {
.separator:not(:hover):not(:focus) {
@apply opacity-100;
background-color: var(--calcite-ui-border-3);
}
}
.separator {
@apply absolute
bg-transparent
bottom-0
flex
h-full
opacity-0
pointer-events-auto
top-0
transition-default
w-0.5
z-10;
cursor: col-resize;
outline: none;
&:hover {
@apply opacity-100;
background-color: var(--calcite-ui-border-2);
}
&:focus {
@apply bg-brand opacity-100;
}
}
:host([position="start"]) .separator {
inset-inline-end: -2px;
}
:host([position="end"]) .separator {
inset-inline-start: -2px;
}
::slotted(calcite-panel),
::slotted(calcite-flow) {
@apply flex-auto h-full w-full;
max-height: unset;
max-width: unset;
}
::slotted(.calcite-match-height) {
@apply flex flex-auto overflow-hidden;
}
.content {
@apply items-stretch
self-stretch
bg-background
flex
p-0
pointer-events-auto
flex-col
flex-nowrap;
width: var(--calcite-shell-panel-width);
max-width: var(--calcite-shell-panel-max-width);
min-width: var(--calcite-shell-panel-min-width);
transition: max-height $transition, max-width $transition;
}
.content__header {
@apply flex
flex-col
flex-initial
flex-nowrap
items-stretch;
}
.content__body {
@apply flex
flex-auto
flex-col
overflow-hidden;
}
:host([width-scale="s"]) .content {
--calcite-shell-panel-width: calc(var(--calcite-panel-width-multiplier) * 12vw);
--calcite-shell-panel-max-width: calc(var(--calcite-panel-width-multiplier) * 300px);
--calcite-shell-panel-min-width: calc(var(--calcite-panel-width-multiplier) * 150px);
}
:host([width-scale="m"]) .content {
--calcite-shell-panel-width: calc(var(--calcite-panel-width-multiplier) * 20vw);
--calcite-shell-panel-max-width: calc(var(--calcite-panel-width-multiplier) * 420px);
--calcite-shell-panel-min-width: calc(var(--calcite-panel-width-multiplier) * 240px);
}
:host([width-scale="l"]) .content {
--calcite-shell-panel-width: calc(var(--calcite-panel-width-multiplier) * 45vw);
--calcite-shell-panel-max-width: calc(var(--calcite-panel-width-multiplier) * 680px);
--calcite-shell-panel-min-width: calc(var(--calcite-panel-width-multiplier) * 340px);
}
:host([detached-height-scale="s"]) .content--detached {
--calcite-shell-panel-detached-max-height: 40vh;
}
:host([detached-height-scale="m"]) .content--detached {
--calcite-shell-panel-detached-max-height: 60vh;
}
:host([detached-height-scale="l"]) .content--detached {
--calcite-shell-panel-detached-max-height: 80vh;
}
.content--detached {
@apply rounded
shadow-0
h-auto
overflow-hidden
mt-2
mb-auto
mx-2;
max-height: var(--calcite-shell-panel-detached-max-height);
::slotted(calcite-panel),
::slotted(calcite-flow) {
max-height: unset;
}
}
:host([position="start"]) .content--detached,
:host([position="end"]) .content--detached {
::slotted(calcite-panel),
::slotted(calcite-flow) {
@apply border-none;
}
}
.content[hidden] {
@apply hidden;
}
slot[name="action-bar"]::slotted(calcite-action-bar),
.content ::slotted(calcite-flow),
.content ::slotted(calcite-panel) {
@apply border border-color-3 border-solid;
}
:host([position="start"]) slot[name="action-bar"]::slotted(calcite-action-bar),
:host([position="start"]) .content ::slotted(calcite-flow),
:host([position="start"]) .content ::slotted(calcite-panel) {
border-inline-start: none;
}
:host([position="end"]) slot[name="action-bar"]::slotted(calcite-action-bar),
:host([position="end"]) .content ::slotted(calcite-flow),
:host([position="end"]) .content ::slotted(calcite-panel) {
border-inline-end: none;
}