thingsboard/ui-ngx/src/app/shared/components/toggle-header.component.scss

207 lines
5.4 KiB
SCSS
Raw Normal View History

/**
2024-01-09 10:46:16 +02:00
* Copyright © 2016-2024 The Thingsboard Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
2023-05-16 20:00:53 +03:00
@import "../../../scss/constants";
:host {
max-width: 100%;
display: grid;
grid-template-columns: min-content minmax(auto, 1fr) min-content;
.tb-toggle-header-pagination-button {
display: none;
}
&.tb-toggle-header-pagination-controls-enabled {
.tb-toggle-header-pagination-button {
display: block;
}
}
2023-08-03 19:26:35 +03:00
.tb-toggle-container, .tb-toggle-header-select {
display: inline-grid;
grid-column: 2;
overflow: hidden;
2023-08-03 19:26:35 +03:00
}
.tb-toggle-container {
&.tb-disable-pagination {
overflow: visible;
}
}
.tb-toggle-header {
transition: transform 500ms cubic-bezier(0.35, 0, 0.25, 1);
}
}
:host ::ng-deep {
.mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header {
overflow: visible;
width: 100%;
border-radius: 100px;
height: 32px;
padding: 2px;
border: none;
background: rgba(0, 0, 0, 0.06);
.mat-button-toggle + .mat-button-toggle {
border-left: none;
}
.mat-button-toggle.mat-button-toggle-appearance-standard {
flex: 1;
color: rgba(0, 0, 0, 0.38);
background: transparent;
.mat-button-toggle-focus-overlay, .mat-button-toggle-ripple {
border-radius: 20px;
}
.mat-button-toggle-button {
height: 28px;
.mat-button-toggle-label-content {
line-height: 26px;
font-weight: 400;
font-size: 14px;
letter-spacing: 0.2px;
}
}
&.mat-button-toggle-checked {
.mat-button-toggle-button {
background: #F3F6FA;
2023-05-19 17:54:27 +03:00
color: $tb-primary-color;
border: 1px solid $tb-primary-color;
border-radius: 20px;
.mat-button-toggle-label-content {
font-weight: 500;
line-height: 24px;
}
}
}
}
2023-05-16 20:00:53 +03:00
&.tb-fill {
.mat-button-toggle.mat-button-toggle-appearance-standard {
&.mat-button-toggle-checked {
.mat-button-toggle-button {
2023-05-19 17:54:27 +03:00
background: $tb-primary-color;
2023-05-16 20:00:53 +03:00
color: #FFFFFF;
}
}
}
&.tb-invert {
.mat-button-toggle.mat-button-toggle-appearance-standard {
color: rgba(255, 255, 255, 0.8);
&.mat-button-toggle-checked {
.mat-button-toggle-button {
background: #FFFFFF;
color: $tb-primary-color;
}
}
}
}
2023-05-16 20:00:53 +03:00
}
&.tb-disabled {
pointer-events: none;
background: rgba(0, 0, 0, 0.03);
.mat-button-toggle.mat-button-toggle-appearance-standard {
color: rgba(0, 0, 0, 0.28);
&.mat-button-toggle-checked {
.mat-button-toggle-button {
background: transparent;
color: rgba(0, 0, 0, 0.38);
border-color: rgba(0, 0, 0, 0.38);
}
}
}
&.tb-fill {
.mat-button-toggle.mat-button-toggle-appearance-standard {
&.mat-button-toggle-checked {
.mat-button-toggle-button {
background: rgba(0, 0, 0, 0.12);
color: rgba(0, 0, 0, 0.38);
border: transparent;
}
}
}
}
}
}
@media #{$mat-md-lg} {
2023-05-16 20:00:53 +03:00
.mat-button-toggle-group.mat-button-toggle-group-appearance-standard.tb-toggle-header:not(.tb-ignore-md-lg) {
height: 24px;
.mat-button-toggle.mat-button-toggle-appearance-standard {
.mat-button-toggle-button {
height: 20px;
display: grid;
.mat-button-toggle-label-content {
line-height: 20px;
font-size: 10px;
padding: 0 2px;
}
}
&.mat-button-toggle-checked {
.mat-button-toggle-button {
.mat-button-toggle-label-content {
line-height: 18px;
}
}
}
}
}
}
2023-04-17 19:09:23 +03:00
.tb-toggle-header-select {
&.mat-mdc-form-field {
line-height: 16px;
font-size: 12px;
}
.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix {
min-height: 0;
width: auto;
padding-top: 8px;
padding-bottom: 8px;
}
.mdc-text-field--outlined {
padding-left: 8px;
padding-right: 6px;
}
.mat-mdc-select {
font-weight: 400;
font-size: 12px;
line-height: 16px;
letter-spacing: 0.25px;
}
.mat-mdc-select-arrow-wrapper {
height: 12px;
padding-left: 6px;
}
.mat-mdc-select-arrow {
width: 12px;
height: 12px;
& > svg {
display: none;
}
&:after {
font-family: 'Material Icons';
content: "expand_more";
position: absolute;
display: inline-block;
font-size: 20px;
line-height: 12px;
top: 0;
left: -6px;
right: 0;
bottom: 0;
color: rgba(0, 0, 0, 0.38);
}
}
}
}