1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 |
|
7 |
|
8 | @import '../../globals/scss/helper-mixins';
|
9 | @import '../../globals/scss/vendor/@carbon/elements/scss/import-once/import-once';
|
10 | @import '../../globals/scss/vars';
|
11 |
|
12 |
|
13 |
|
14 |
|
15 | @mixin data-table-v2-action {
|
16 |
|
17 |
|
18 |
|
19 | .#{$prefix}--table-toolbar {
|
20 |
|
21 | position: relative;
|
22 | display: flex;
|
23 | width: 100%;
|
24 | height: $layout-04;
|
25 | overflow: hidden;
|
26 | background: $ui-01;
|
27 | }
|
28 |
|
29 | .#{$prefix}--toolbar-content {
|
30 | display: flex;
|
31 | justify-content: flex-end;
|
32 | width: 100%;
|
33 | height: $layout-04;
|
34 | transform: translate3d(0, 0, 0);
|
35 | transition: transform $duration--fast-02 motion(standard, productive),
|
36 | clip-path $duration--fast-02 motion(standard, productive);
|
37 | }
|
38 |
|
39 | .#{$prefix}--batch-actions ~ .#{$prefix}--toolbar-content {
|
40 | clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
|
41 | }
|
42 |
|
43 | .#{$prefix}--toolbar-content .#{$prefix}--search .#{$prefix}--search-input {
|
44 |
|
45 | background-color: transparent;
|
46 | }
|
47 |
|
48 |
|
49 |
|
50 |
|
51 | .#{$prefix}--batch-actions ~ .#{$prefix}--toolbar-search-container {
|
52 | display: flex;
|
53 | align-items: center;
|
54 | opacity: 1;
|
55 | transition: opacity 110ms;
|
56 | }
|
57 |
|
58 |
|
59 |
|
60 |
|
61 | .#{$prefix}--toolbar-search-container-expandable {
|
62 | position: relative;
|
63 | width: $layout-04;
|
64 | height: $layout-04;
|
65 | box-shadow: none;
|
66 | transition: flex $transition--expansion $carbon--standard-easing;
|
67 | }
|
68 |
|
69 | .#{$prefix}--toolbar-search-container-expandable .#{$prefix}--search {
|
70 | position: initial;
|
71 | width: $layout-04;
|
72 | height: 100%;
|
73 | }
|
74 |
|
75 | .#{$prefix}--toolbar-search-container-expandable
|
76 | .#{$prefix}--search
|
77 | .#{$prefix}--search-magnifier {
|
78 | left: 0;
|
79 | width: $layout-04;
|
80 | height: $layout-04;
|
81 | padding: $spacing-05;
|
82 | cursor: pointer;
|
83 | transition: background $duration--fast-02 motion(entrance, productive);
|
84 | pointer-events: all;
|
85 | }
|
86 |
|
87 | .#{$prefix}--toolbar-search-container-expandable
|
88 | .#{$prefix}--search
|
89 | .#{$prefix}--search-magnifier:focus {
|
90 | @include focus-outline('outline');
|
91 | }
|
92 |
|
93 | .#{$prefix}--toolbar-search-container-expandable
|
94 | .#{$prefix}--search
|
95 | .#{$prefix}--search-magnifier:hover {
|
96 | background: $hover-field;
|
97 | }
|
98 |
|
99 | .#{$prefix}--toolbar-search-container-expandable
|
100 | .#{$prefix}--search
|
101 | .#{$prefix}--label {
|
102 | visibility: hidden;
|
103 | }
|
104 |
|
105 | .#{$prefix}--toolbar-search-container-expandable
|
106 | .#{$prefix}--search
|
107 | .#{$prefix}--search-input {
|
108 | height: 100%;
|
109 | padding: 0;
|
110 | background-color: transparent;
|
111 | border: none;
|
112 | visibility: hidden;
|
113 | }
|
114 |
|
115 | .#{$prefix}--toolbar-search-container-expandable
|
116 | .#{$prefix}--search
|
117 | .#{$prefix}--search-close {
|
118 | width: $layout-04;
|
119 | height: $layout-04;
|
120 |
|
121 | &::before {
|
122 | top: 2px;
|
123 | height: calc(100% - 4px);
|
124 | background-color: $hover-ui;
|
125 | }
|
126 | }
|
127 |
|
128 | .#{$prefix}--toolbar-search-container-expandable
|
129 | .#{$prefix}--search
|
130 | .#{$prefix}--search-close:focus::before {
|
131 | background-color: $focus;
|
132 | }
|
133 |
|
134 |
|
135 |
|
136 |
|
137 | .#{$prefix}--toolbar-search-container-active {
|
138 | flex: auto;
|
139 | transition: flex $duration--moderate-01 motion(standard, productive);
|
140 | }
|
141 |
|
142 | .#{$prefix}--toolbar-search-container-active .#{$prefix}--search {
|
143 | width: 100%;
|
144 | }
|
145 |
|
146 | .#{$prefix}--toolbar-search-container-active
|
147 | .#{$prefix}--search
|
148 | .#{$prefix}--label,
|
149 | .#{$prefix}--toolbar-search-container-active
|
150 | .#{$prefix}--search
|
151 | .#{$prefix}--search-input {
|
152 | padding: 0 $spacing-09;
|
153 | visibility: inherit;
|
154 | }
|
155 |
|
156 | .#{$prefix}--toolbar-search-container-active
|
157 | .#{$prefix}--search
|
158 | .#{$prefix}--search-input:focus {
|
159 | @include focus-outline('outline');
|
160 |
|
161 | box-shadow: inset 0 0 0 2px $focus;
|
162 | }
|
163 |
|
164 | .#{$prefix}--toolbar-search-container-active
|
165 | .#{$prefix}--search
|
166 | .#{$prefix}--search-input:focus
|
167 | + .#{$prefix}--search-close {
|
168 | border: none;
|
169 | outline: none;
|
170 | box-shadow: none;
|
171 | }
|
172 |
|
173 | .#{$prefix}--toolbar-search-container-active
|
174 | .#{$prefix}--search
|
175 | .#{$prefix}--search-input:not(:placeholder-shown) {
|
176 | background: $hover-field;
|
177 | border: none;
|
178 | }
|
179 |
|
180 | .#{$prefix}--toolbar-search-container-active
|
181 | .#{$prefix}--search
|
182 | .#{$prefix}--search-magnifier:focus,
|
183 | .#{$prefix}--toolbar-search-container-active
|
184 | .#{$prefix}--search
|
185 | .#{$prefix}--search-magnifier:active,
|
186 | .#{$prefix}--toolbar-search-container-active
|
187 | .#{$prefix}--search
|
188 | .#{$prefix}--search-magnifier:hover {
|
189 | background: transparent;
|
190 | border: none;
|
191 | outline: none;
|
192 | }
|
193 |
|
194 |
|
195 |
|
196 |
|
197 | .#{$prefix}--toolbar-search-container-persistent .#{$prefix}--search-close,
|
198 | .#{$prefix}--toolbar-search-container-persistent
|
199 | .#{$prefix}--search-close:hover,
|
200 | .#{$prefix}--toolbar-search-container-active
|
201 | .#{$prefix}--search
|
202 | .#{$prefix}--search-close,
|
203 | .#{$prefix}--toolbar-search-container-active
|
204 | .#{$prefix}--search
|
205 | .#{$prefix}--search-close:hover {
|
206 | background-color: transparent;
|
207 | border: none;
|
208 | }
|
209 |
|
210 | .#{$prefix}--toolbar-search-container-persistent
|
211 | .#{$prefix}--search-close::before {
|
212 | display: none;
|
213 | }
|
214 |
|
215 |
|
216 |
|
217 |
|
218 | .#{$prefix}--overflow-menu.#{$prefix}--toolbar-action {
|
219 | @include button-reset;
|
220 |
|
221 | display: flex;
|
222 | width: $layout-04;
|
223 | height: $layout-04;
|
224 | padding: $spacing-05;
|
225 | cursor: pointer;
|
226 | transition: background $duration--fast-02 motion(entrance, productive);
|
227 | }
|
228 |
|
229 |
|
230 | .#{$prefix}--toolbar-action {
|
231 | @include button-reset;
|
232 |
|
233 | display: flex;
|
234 | width: $layout-04;
|
235 | height: $layout-04;
|
236 | cursor: pointer;
|
237 | transition: background $duration--fast-02 motion(entrance, productive);
|
238 | }
|
239 |
|
240 | .#{$prefix}--toolbar-action:hover:not([disabled]) {
|
241 | background: $hover-field;
|
242 | }
|
243 |
|
244 | .#{$prefix}--toolbar-action:hover[aria-expanded='true'] {
|
245 | background: $ui-01;
|
246 | }
|
247 |
|
248 | .#{$prefix}--toolbar-action[disabled] {
|
249 | cursor: not-allowed;
|
250 | }
|
251 |
|
252 | .#{$prefix}--toolbar-action[disabled] .#{$prefix}--toolbar-action__icon {
|
253 | cursor: not-allowed;
|
254 | fill: $disabled;
|
255 | }
|
256 |
|
257 | .#{$prefix}--toolbar-action:focus:not([disabled]),
|
258 | .#{$prefix}--toolbar-action:active:not([disabled]) {
|
259 | @include focus-outline('outline');
|
260 |
|
261 | &.#{$prefix}--toolbar-search-container-expandable {
|
262 |
|
263 | outline: none;
|
264 | }
|
265 | }
|
266 |
|
267 | .#{$prefix}--toolbar-action ~ .#{$prefix}--btn {
|
268 | max-width: none;
|
269 | margin: 0;
|
270 | white-space: nowrap;
|
271 | }
|
272 |
|
273 | .#{$prefix}--overflow-menu--data-table {
|
274 | height: $layout-04;
|
275 | }
|
276 |
|
277 |
|
278 |
|
279 |
|
280 | .#{$prefix}--toolbar-action__icon {
|
281 | width: auto;
|
282 | max-width: $layout-01;
|
283 | height: $layout-01;
|
284 | fill: $icon-01;
|
285 | }
|
286 |
|
287 |
|
288 |
|
289 |
|
290 | .#{$prefix}--toolbar-search-container-persistent {
|
291 | position: relative;
|
292 | width: 100%;
|
293 | height: $layout-04;
|
294 | opacity: 1;
|
295 | }
|
296 |
|
297 | .#{$prefix}--toolbar-search-container-persistent
|
298 | + .#{$prefix}--toolbar-content {
|
299 | position: relative;
|
300 | width: auto;
|
301 | }
|
302 |
|
303 | .#{$prefix}--toolbar-search-container-persistent .#{$prefix}--search {
|
304 | position: initial;
|
305 | }
|
306 |
|
307 | .#{$prefix}--toolbar-search-container-persistent
|
308 | .#{$prefix}--search
|
309 | .#{$prefix}--search-magnifier {
|
310 | left: $spacing-05;
|
311 | }
|
312 |
|
313 | .#{$prefix}--toolbar-search-container-persistent
|
314 | .#{$prefix}--search
|
315 | .#{$prefix}--search-input {
|
316 | height: $layout-04;
|
317 | padding: 0 $spacing-09;
|
318 | border: none;
|
319 | }
|
320 |
|
321 | .#{$prefix}--toolbar-search-container-persistent
|
322 | .#{$prefix}--search
|
323 | .#{$prefix}--search-input:focus:not([disabled]) {
|
324 | @include focus-outline('outline');
|
325 | }
|
326 |
|
327 | .#{$prefix}--toolbar-search-container-persistent
|
328 | .#{$prefix}--search
|
329 | .#{$prefix}--search-input:hover:not([disabled]) {
|
330 | background: $hover-field;
|
331 | }
|
332 |
|
333 | .#{$prefix}--toolbar-search-container-persistent
|
334 | .#{$prefix}--search
|
335 | .#{$prefix}--search-input:active:not([disabled]),
|
336 | .#{$prefix}--toolbar-search-container-persistent
|
337 | .#{$prefix}--search
|
338 | .#{$prefix}--search-input:not(:placeholder-shown) {
|
339 | background: $hover-field;
|
340 | }
|
341 |
|
342 | .#{$prefix}--toolbar-search-container-persistent
|
343 | .#{$prefix}--search
|
344 | .#{$prefix}--search-close {
|
345 | width: $layout-04;
|
346 | height: $layout-04;
|
347 | }
|
348 |
|
349 | .#{$prefix}--batch-actions--active ~ .#{$prefix}--toolbar-search-container,
|
350 | .#{$prefix}--batch-actions--active ~ .#{$prefix}--toolbar-content {
|
351 | transform: translate3d(0, 48px, 0);
|
352 | transition: transform $duration--fast-02 motion(standard, productive),
|
353 | clip-path $duration--fast-02 motion(standard, productive);
|
354 | clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
|
355 | }
|
356 |
|
357 |
|
358 |
|
359 |
|
360 | .#{$prefix}--batch-actions {
|
361 | position: absolute;
|
362 | top: 0;
|
363 | left: 0;
|
364 | display: flex;
|
365 | align-items: center;
|
366 | width: 100%;
|
367 | height: 100%;
|
368 | padding-right: $spacing-06;
|
369 | padding-left: $spacing-06;
|
370 | overflow-x: auto;
|
371 | background-color: $interactive-01;
|
372 | transform: translate3d(0, 48px, 0);
|
373 | transition: transform $duration--fast-02 motion(standard, productive),
|
374 | clip-path $duration--fast-02 motion(standard, productive),
|
375 | opacity $duration--fast-02 motion(standard, productive);
|
376 | clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
|
377 | pointer-events: none;
|
378 | will-change: transform;
|
379 | }
|
380 |
|
381 | .#{$prefix}--batch-actions:focus {
|
382 | @include focus-outline;
|
383 | }
|
384 |
|
385 | .#{$prefix}--batch-actions--active {
|
386 | transform: translate3d(0, 0, 0);
|
387 | clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
|
388 | pointer-events: all;
|
389 | }
|
390 |
|
391 |
|
392 | .#{$prefix}--action-list {
|
393 | position: absolute;
|
394 | right: 0;
|
395 | display: flex;
|
396 | }
|
397 |
|
398 | .#{$prefix}--action-list .#{$prefix}--btn {
|
399 | min-width: 0;
|
400 | padding: $button-padding-ghost;
|
401 | color: $text-04;
|
402 | }
|
403 |
|
404 | .#{$prefix}--action-list .#{$prefix}--btn:disabled {
|
405 | color: $disabled-03;
|
406 | }
|
407 |
|
408 | .#{$prefix}--action-list .#{$prefix}--btn .#{$prefix}--btn__icon {
|
409 | position: static;
|
410 | margin-left: $spacing-03;
|
411 | fill: $icon-03;
|
412 | }
|
413 |
|
414 | .#{$prefix}--action-list .#{$prefix}--btn .#{$prefix}--btn__icon .st0 {
|
415 | fill: none;
|
416 | }
|
417 |
|
418 | .#{$prefix}--batch-download {
|
419 |
|
420 | padding: rem(1px);
|
421 | }
|
422 |
|
423 |
|
424 | .#{$prefix}--action-list .#{$prefix}--btn--primary:focus::before,
|
425 | .#{$prefix}--action-list .#{$prefix}--btn--primary::before,
|
426 | .#{$prefix}--action-list .#{$prefix}--btn--primary:focus::after,
|
427 | .#{$prefix}--action-list .#{$prefix}--btn--primary::after {
|
428 | display: none;
|
429 | }
|
430 |
|
431 | .#{$prefix}--action-list .#{$prefix}--btn--primary:focus {
|
432 | outline: 2px solid $ui-01;
|
433 | outline-offset: rem(-2px);
|
434 | }
|
435 |
|
436 |
|
437 | .#{$prefix}--action-list
|
438 | .#{$prefix}--btn--primary:nth-child(3):hover
|
439 | + .#{$prefix}--btn--primary.#{$prefix}--batch-summary__cancel::before,
|
440 | .#{$prefix}--action-list
|
441 | .#{$prefix}--btn--primary:nth-child(3):focus
|
442 | + .#{$prefix}--btn--primary.#{$prefix}--batch-summary__cancel::before {
|
443 | opacity: 0;
|
444 | }
|
445 |
|
446 | .#{$prefix}--btn--primary.#{$prefix}--batch-summary__cancel::before {
|
447 | position: absolute;
|
448 |
|
449 | top: rem(15px);
|
450 | left: 0;
|
451 | display: block;
|
452 | width: rem(1px);
|
453 | height: $layout-01;
|
454 | background-color: $text-04;
|
455 | border: none;
|
456 | opacity: 1;
|
457 | transition: opacity $duration--fast-02 motion(standard, productive);
|
458 | content: '';
|
459 | }
|
460 |
|
461 | .#{$prefix}--btn--primary.#{$prefix}--batch-summary__cancel:hover::before {
|
462 | opacity: 0;
|
463 | transition: opacity $transition--base $carbon--standard-easing;
|
464 | }
|
465 |
|
466 |
|
467 | .#{$prefix}--batch-summary__cancel {
|
468 | position: relative;
|
469 | padding-right: $spacing-05;
|
470 | }
|
471 |
|
472 |
|
473 | .#{$prefix}--batch-summary {
|
474 | position: absolute;
|
475 | left: 0;
|
476 | display: flex;
|
477 | align-items: center;
|
478 | margin-left: $spacing-05;
|
479 | color: $text-04;
|
480 | }
|
481 |
|
482 | .#{$prefix}--batch-summary__para {
|
483 | @include type-style('body-short-01');
|
484 | }
|
485 |
|
486 |
|
487 |
|
488 |
|
489 | .#{$prefix}--table-toolbar--small {
|
490 | height: rem(32px);
|
491 |
|
492 | .#{$prefix}--toolbar-search-container-expandable,
|
493 | .#{$prefix}--toolbar-search-container-persistent {
|
494 | height: rem(32px);
|
495 | }
|
496 |
|
497 | .#{$prefix}--toolbar-search-container-expandable
|
498 | .#{$prefix}--search
|
499 | .#{$prefix}--search-input,
|
500 | .#{$prefix}--toolbar-search-container-persistent
|
501 | .#{$prefix}--search
|
502 | .#{$prefix}--search-input {
|
503 | height: rem(32px);
|
504 | }
|
505 |
|
506 | .#{$prefix}--toolbar-search-container-expandable
|
507 | .#{$prefix}--search
|
508 | .#{$prefix}--search-close,
|
509 | .#{$prefix}--toolbar-search-container-persistent
|
510 | .#{$prefix}--search
|
511 | .#{$prefix}--search-close {
|
512 | width: rem(32px);
|
513 | height: rem(32px);
|
514 | }
|
515 |
|
516 | .#{$prefix}--toolbar-search-container-expandable
|
517 | .#{$prefix}--search
|
518 | .#{$prefix}--search-magnifier,
|
519 | .#{$prefix}--toolbar-search-container-persistent
|
520 | .#{$prefix}--search
|
521 | .#{$prefix}--search-magnifier {
|
522 | width: rem(32px);
|
523 | height: rem(32px);
|
524 | padding: $spacing-03;
|
525 | }
|
526 |
|
527 |
|
528 | .#{$prefix}--toolbar-search-container-expandable {
|
529 | width: rem(32px);
|
530 | }
|
531 |
|
532 | .#{$prefix}--toolbar-search-container-expandable
|
533 | .#{$prefix}--search
|
534 | .#{$prefix}--search-input {
|
535 | padding: 0 $spacing-09;
|
536 | }
|
537 |
|
538 |
|
539 | .#{$prefix}--toolbar-search-container-active {
|
540 | flex: auto;
|
541 | transition: flex 175ms $carbon--standard-easing;
|
542 | }
|
543 |
|
544 | .#{$prefix}--toolbar-search-container-active
|
545 | .#{$prefix}--search
|
546 | .#{$prefix}--search-input {
|
547 | visibility: inherit;
|
548 | }
|
549 |
|
550 | .#{$prefix}--toolbar-search-container-active
|
551 | .#{$prefix}--search
|
552 | .#{$prefix}--search-input:focus {
|
553 | @include focus-outline('outline');
|
554 |
|
555 | background: $hover-field;
|
556 | }
|
557 |
|
558 | .#{$prefix}--toolbar-search-container-active
|
559 | .#{$prefix}--search
|
560 | .#{$prefix}--search-input:active,
|
561 | .#{$prefix}--toolbar-search-container-active
|
562 | .#{$prefix}--search
|
563 | .#{$prefix}--search-input:not(:placeholder-shown) {
|
564 | background: $hover-field;
|
565 | }
|
566 |
|
567 | .#{$prefix}--toolbar-search-container-active
|
568 | .#{$prefix}--search
|
569 | .#{$prefix}--search-magnifier:focus,
|
570 | .#{$prefix}--toolbar-search-container-active
|
571 | .#{$prefix}--search
|
572 | .#{$prefix}--search-magnifier:active,
|
573 | .#{$prefix}--toolbar-search-container-active
|
574 | .#{$prefix}--search
|
575 | .#{$prefix}--search-magnifier:hover {
|
576 | @include focus-outline('reset');
|
577 |
|
578 | background: transparent;
|
579 | }
|
580 | }
|
581 |
|
582 |
|
583 |
|
584 |
|
585 | .#{$prefix}--table-toolbar--small
|
586 | .#{$prefix}--batch-actions
|
587 | .#{$prefix}--action-list {
|
588 | height: rem(32px);
|
589 | }
|
590 |
|
591 | .#{$prefix}--table-toolbar--small .#{$prefix}--toolbar-action {
|
592 | width: rem(32px);
|
593 | height: rem(32px);
|
594 | padding: $spacing-03 0;
|
595 | }
|
596 |
|
597 | .#{$prefix}--table-toolbar--small .#{$prefix}--btn--primary {
|
598 | height: rem(32px);
|
599 | min-height: auto;
|
600 | padding-top: calc(0.375rem - 3px);
|
601 | padding-bottom: calc(0.375rem - 3px);
|
602 | }
|
603 |
|
604 | .#{$prefix}--table-toolbar--small
|
605 | .#{$prefix}--btn--primary.#{$prefix}--batch-summary__cancel::before {
|
606 | top: rem(8px);
|
607 | }
|
608 |
|
609 | .#{$prefix}--table-toolbar--small
|
610 | .#{$prefix}--toolbar-action
|
611 | ~ .#{$prefix}--btn {
|
612 | height: rem(32px);
|
613 | overflow: hidden;
|
614 | }
|
615 | }
|
616 |
|
617 | @include exports('data-table-v2-action') {
|
618 | @include data-table-v2-action;
|
619 | }
|