/
calcite-panel.scss
188 lines (163 loc) · 3.69 KB
/
calcite-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
180
181
182
183
184
185
186
187
188
/**
* CSS Custom Properties
*
* These properties can be overridden using the component's tag as selector.
*
* @prop --calcite-panel-max-height: the maximum height of the panel
* @prop --calcite-panel-max-width: the maximum width of the panel
* @prop --calcite-panel-min-width: the minimum width of the panel
*/
:host {
@extend %component-host;
@apply flex flex-auto overflow-hidden relative w-full;
--calcite-min-header-height: calc(var(--calcite-icon-size) * 3);
--calcite-panel-max-height: unset;
--calcite-panel-width: 100%;
--calcite-panel-min-width: unset;
--calcite-panel-max-width: unset;
}
@import "../../assets/styles/header";
.container {
@apply flex flex-auto flex-col items-stretch bg-background w-full p-0 m-0;
max-height: var(--calcite-panel-max-height);
width: var(--calcite-panel-width);
max-width: var(--calcite-panel-max-width);
min-width: var(--calcite-panel-min-width);
transition: max-height $transition, width $transition;
}
:host([height-scale="s"]) {
--calcite-panel-max-height: 40vh;
}
:host([height-scale="m"]) {
--calcite-panel-max-height: 60vh;
}
:host([height-scale="l"]) {
--calcite-panel-max-height: 80vh;
}
:host([width-scale="s"]) {
--calcite-panel-width: calc(var(--calcite-panel-width-multiplier) * 12vw);
--calcite-panel-max-width: calc(var(--calcite-panel-width-multiplier) * 300px);
--calcite-panel-min-width: calc(var(--calcite-panel-width-multiplier) * 150px);
}
:host([width-scale="m"]) {
--calcite-panel-width: calc(var(--calcite-panel-width-multiplier) * 20vw);
--calcite-panel-max-width: calc(var(--calcite-panel-width-multiplier) * 420px);
--calcite-panel-min-width: calc(var(--calcite-panel-width-multiplier) * 240px);
}
:host([width-scale="l"]) {
--calcite-panel-width: calc(var(--calcite-panel-width-multiplier) * 45vw);
--calcite-panel-max-width: calc(var(--calcite-panel-width-multiplier) * 680px);
--calcite-panel-min-width: calc(var(--calcite-panel-width-multiplier) * 340px);
}
.container[hidden] {
@apply hidden;
}
:host([loading]) .container,
:host([disabled]) .container {
@apply relative;
z-index: 1;
}
.header {
border-bottom: 1px solid;
@apply items-stretch
bg-foreground-1
justify-start
sticky
top-0
border-b-color-3
w-full;
flex: 0 0 auto;
min-height: theme("spacing.12");
z-index: 2;
}
.header-content {
@apply overflow-hidden
px-3
py-4
flex
flex-col;
margin-inline-end: auto;
.heading,
.summary {
@apply p-0
block
overflow-hidden
whitespace-nowrap
w-full;
text-overflow: ellipsis;
}
.heading {
@apply font-medium mt-0 mx-0 mb-1 text-0h;
&:only-child {
@apply mb-0;
}
}
.summary {
@apply text-color-2 text--1h;
}
}
.back-button {
@apply border-color-3
border-solid
border-0;
border-inline-end-width: theme("borderWidth.DEFAULT");
}
.header-actions {
@apply flex
items-stretch
flex-row
flex-nowrap;
}
.header-actions--end,
.menu-container:only-child {
margin-inline-start: theme("margin.auto");
}
.menu-button {
@apply self-stretch
flex-initial
h-full
relative;
}
.menu {
min-width: theme("spacing.40");
flex-flow: column nowrap;
}
.content-wrapper {
@apply overflow-auto;
}
.content-height {
@apply h-full;
}
.content-container {
@apply items-stretch
bg-background
flex
flex-auto
flex-nowrap
flex-col;
}
.footer {
border-top: 1px solid;
@apply bg-foreground-1
border-t-color-3
flex
justify-evenly
sticky
bottom-0
w-full;
flex: 0 0 auto;
min-height: theme("spacing.12");
padding: theme("spacing.2");
}
.fab-container {
@apply block
sticky
my-0
mx-auto
p-2
bottom-0
left-0
right-0;
width: fit-content;
z-index: 1;
}