1 | @import (reference) './imports/global';
|
2 |
|
3 | @layer-buffer-x: @aui-grid;
|
4 | @layer-buffer-y: 100px;
|
5 |
|
6 | @footer-height: @aui-dialog-footer-height;
|
7 | @header-height: @aui-dialog-header-height;
|
8 |
|
9 | @header-footer-combined-height: (@header-height + @footer-height);
|
10 |
|
11 | @dialog-footer-padding-x: @aui-dialog2-padding;
|
12 | @dialog-footer-padding-y: 10px;
|
13 | @dialog-footer-padding: @dialog-footer-padding-y @dialog-footer-padding-x;
|
14 |
|
15 | @dialog-height-small: 200px;
|
16 | @dialog-height-medium: 300px;
|
17 | @dialog-height-large: 500px;
|
18 |
|
19 | @dialog-content-height-small: (@dialog-height-small - @header-footer-combined-height);
|
20 | @dialog-content-height-medium: (@dialog-height-medium - @header-footer-combined-height);
|
21 | @dialog-content-height-large: (@dialog-height-large - @header-footer-combined-height);
|
22 |
|
23 | @dialog-width-small: 400px;
|
24 | @dialog-width-medium: 600px;
|
25 | @dialog-width-large: 800px;
|
26 | @dialog-width-xlarge: 980px;
|
27 |
|
28 | @dialog-container-border-radius: @aui-border-radius-medium;
|
29 |
|
30 | @dialog-overflow-with-both-buffers: (@header-footer-combined-height + 2*@layer-buffer-y);
|
31 |
|
32 | @aui-dialog2-xlarge-width: (@dialog-width-xlarge + 2*@layer-buffer-x);
|
33 | @aui-dialog2-large-width: (@dialog-width-large + 2*@layer-buffer-x);
|
34 | @aui-dialog2-medium-width: (@dialog-width-medium + 2*@layer-buffer-x);
|
35 | @aui-dialog2-small-width: (@dialog-width-small + 2*@layer-buffer-x);
|
36 |
|
37 | .aui-dialog2 {
|
38 | #aui.shadow.z300();
|
39 | background-color: @aui-dialog2-bg-color;
|
40 | box-sizing: border-box;
|
41 | border-radius: @dialog-container-border-radius;
|
42 | left: 0;
|
43 | margin-left: auto;
|
44 | margin-right: auto;
|
45 | position: relative;
|
46 | right: 0;
|
47 |
|
48 | &.aui-layer {
|
49 | overflow: visible;
|
50 | position: fixed;
|
51 | top: @layer-buffer-y;
|
52 |
|
53 |
|
54 |
|
55 |
|
56 | .aui-dialog2-header,
|
57 | .aui-dialog2-footer,
|
58 | .aui-dialog2-content {
|
59 | #aui.transition.fadeOut();
|
60 | }
|
61 |
|
62 | &[open]:not([hidden]) {
|
63 | .aui-dialog2-header,
|
64 | .aui-dialog2-footer,
|
65 | .aui-dialog2-content {
|
66 | #aui.transition.fadeIn();
|
67 | }
|
68 | }
|
69 | }
|
70 |
|
71 | &-small {
|
72 | width: @dialog-width-small;
|
73 | min-height: (@dialog-content-height-small + @footer-height);
|
74 | }
|
75 |
|
76 | &-medium {
|
77 | width: @dialog-width-medium;
|
78 | min-height: (@dialog-content-height-medium + @footer-height);
|
79 | }
|
80 |
|
81 | &-large {
|
82 | width: @dialog-width-large;
|
83 | min-height: (@dialog-content-height-large + @footer-height);
|
84 | }
|
85 |
|
86 | &-xlarge {
|
87 | min-height: (@dialog-content-height-large + @footer-height);
|
88 | width: @dialog-width-xlarge;
|
89 | }
|
90 |
|
91 | &-small &-content {
|
92 | min-height: @dialog-content-height-small;
|
93 | }
|
94 |
|
95 | &-medium &-content {
|
96 | min-height: @dialog-content-height-medium;
|
97 | }
|
98 |
|
99 | &-xlarge &-content,
|
100 | &-large &-content {
|
101 | min-height: @dialog-content-height-large;
|
102 | }
|
103 |
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 | &-content {
|
110 | max-height: 100%;
|
111 | }
|
112 |
|
113 | &-content {
|
114 | background-color: @aui-dialog2-bg-color;
|
115 | box-sizing: border-box;
|
116 | overflow: auto;
|
117 | padding: @aui-dialog2-padding;
|
118 | max-height: calc(~"100vh" - @dialog-overflow-with-both-buffers);
|
119 |
|
120 | &:last-child {
|
121 | border-radius: 0 0 @dialog-container-border-radius @dialog-container-border-radius;
|
122 | }
|
123 | }
|
124 |
|
125 | &-header {
|
126 | #aui-dialog.aui-dialog-header-base();
|
127 | border-radius: @dialog-container-border-radius @dialog-container-border-radius 0 0;
|
128 | color: @aui-text-color;
|
129 | display: table;
|
130 | font-weight: normal;
|
131 | padding: 0 @aui-dialog2-padding;
|
132 | width: 100%;
|
133 |
|
134 | > * {
|
135 | display: table-cell;
|
136 | vertical-align: middle;
|
137 | }
|
138 |
|
139 | h2, h3 {
|
140 | #aui.typography.h600();
|
141 | }
|
142 | }
|
143 |
|
144 | &[data-aui-modal="true"] &-header-close {
|
145 | display: none;
|
146 | }
|
147 |
|
148 | &-footer {
|
149 | #aui-dialog.aui-dialog-footer-base();
|
150 | border-radius: 0 0 @dialog-container-border-radius @dialog-container-border-radius;
|
151 | padding: @dialog-footer-padding-y @dialog-footer-padding-x;
|
152 | width: 100%;
|
153 |
|
154 | &:empty {
|
155 | height: 5px;
|
156 | padding: 0;
|
157 | }
|
158 | }
|
159 |
|
160 | &-footer-hint {
|
161 | color: @aui-dialog2-footer-hint-text-color;
|
162 | line-height: (@footer-height - (2 * @dialog-footer-padding-y));
|
163 | }
|
164 |
|
165 | &-footer-hint,
|
166 | &-header-main {
|
167 | overflow: hidden;
|
168 | padding-right: 10px;
|
169 | text-overflow: ellipsis;
|
170 | white-space: nowrap;
|
171 | }
|
172 |
|
173 | &-header-main {
|
174 | color: @aui-text-color;
|
175 | max-width: 400px;
|
176 | }
|
177 |
|
178 | &-header-secondary,
|
179 | &-header-close,
|
180 | &-footer-actions {
|
181 | text-align: right;
|
182 | }
|
183 |
|
184 | &-footer-actions {
|
185 | float: right;
|
186 | }
|
187 |
|
188 | &-warning &-header {
|
189 | --aui-focus: var(--aui-dialog-header-warning-text-color);
|
190 | --aui-close-button-icon-color: var(--aui-dialog-header-warning-text-color);
|
191 |
|
192 | background-color: @aui-dialog2-header-warning-bg-color;
|
193 | border-bottom-color: @aui-dialog2-header-warning-bg-color;
|
194 | color: @aui-dialog2-header-warning-text-color;
|
195 |
|
196 | .aui-dialog2-header-main,
|
197 | .aui-dialog2-header-actions a,
|
198 | .aui-dialog2-header-secondary a {
|
199 | color: inherit;
|
200 | }
|
201 | }
|
202 |
|
203 | .aui-iconfont-close-dialog::before {
|
204 | content: @aui-glyph-close;
|
205 | }
|
206 | }
|
207 |
|
208 |
|
209 | .make-it-fullscreen() {
|
210 | box-shadow: none;
|
211 | height: 100vh;
|
212 | width: 100vw;
|
213 | top: 0;
|
214 | }
|
215 |
|
216 | .responsive-max-height((@dialog-height-large + 2*@layer-buffer-y), {
|
217 | .aui-dialog2-large,
|
218 | .aui-dialog2-xlarge {
|
219 | min-height: @dialog-height-small;
|
220 |
|
221 | &.aui-layer {
|
222 | bottom: @layer-buffer-y;
|
223 | }
|
224 |
|
225 | .aui-dialog2-content {
|
226 | height: calc(~"100vh" - @dialog-overflow-with-both-buffers);
|
227 | max-height: none;
|
228 | min-height: @dialog-content-height-small;
|
229 | }
|
230 | }
|
231 | });
|
232 |
|
233 | .responsive-max-height((@dialog-height-medium + 2*@layer-buffer-y), {
|
234 | .aui-dialog2-medium {
|
235 | min-height: @dialog-height-small;
|
236 |
|
237 | &.aui-layer {
|
238 | bottom: @layer-buffer-y;
|
239 | }
|
240 |
|
241 | .aui-dialog2-content {
|
242 | height: calc(~"100vh" - @dialog-overflow-with-both-buffers);
|
243 | max-height: none;
|
244 | min-height: @dialog-content-height-small;
|
245 | }
|
246 | }
|
247 | });
|
248 |
|
249 | .responsive-max-height((@dialog-height-small + @layer-buffer-y), {
|
250 | .aui-dialog2 {
|
251 | &.aui-layer {
|
252 | .make-it-fullscreen();
|
253 | }
|
254 | }
|
255 | });
|
256 |
|
257 | .aui-dialog2-responsive-full-width(@dialogType; @maxWidth) {
|
258 | .responsive-max-width(@maxWidth, {
|
259 | .aui-dialog2-@{dialogType} {
|
260 | &.aui-layer {
|
261 | .make-it-fullscreen();
|
262 | }
|
263 |
|
264 | .aui-dialog2-content {
|
265 | height: calc(~"100vh" - @header-footer-combined-height);
|
266 | max-height: none;
|
267 | }
|
268 | }
|
269 | });
|
270 | }
|
271 |
|
272 | .aui-dialog2-responsive-full-width(xlarge, @aui-dialog2-xlarge-width);
|
273 | .aui-dialog2-responsive-full-width(large, @aui-dialog2-large-width);
|
274 | .aui-dialog2-responsive-full-width(medium, @aui-dialog2-medium-width);
|
275 | .aui-dialog2-responsive-full-width(small, @aui-dialog2-small-width);
|
276 |
|
277 | @supports (display: flex) {
|
278 | .aui-dialog2 {
|
279 | display: flex;
|
280 | flex-direction: column;
|
281 |
|
282 | &-content {
|
283 | flex: 1;
|
284 | }
|
285 |
|
286 | &-header {
|
287 | align-items: center;
|
288 | display: flex;
|
289 | justify-content: space-between;
|
290 |
|
291 | > .aui-dialog2-header-secondary,
|
292 | > .aui-dialog2-header-actions {
|
293 | display: block;
|
294 | flex: 1;
|
295 | }
|
296 | }
|
297 | }
|
298 | }
|