Skip to content

Commit f039844

Browse files
committed
Add Command Bar host class
1 parent 3065f1d commit f039844

File tree

2 files changed

+86
-83
lines changed

2 files changed

+86
-83
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,106 +1,108 @@
11
/** <%= options.generationDisclaimerText %> **/
2-
.toolbar {
3-
font-size: inherit;
4-
align-items: center;
5-
max-width: unset;
2+
.js-sdk-command-bar {
3+
.toolbar {
4+
font-size: inherit;
5+
align-items: center;
6+
max-width: unset;
67

7-
.command-bar-number-of-items {
8-
display: flex;
9-
}
10-
11-
mat-toolbar {
12-
overflow: hidden;
13-
}
14-
15-
.mat-mdc-menu-panel {
16-
max-width: max-content !important;
17-
}
18-
19-
.mat-mdc-form-field {
20-
padding-top: 20px;
21-
margin-right: 8px;
22-
}
23-
24-
<% if (options.componentType === 'card' && options.addCommandBar) { %>
25-
.sorting-content {
8+
.command-bar-number-of-items {
269
display: flex;
27-
align-items: center;
28-
cursor: pointer;
29-
padding-right: 20px;
3010
}
31-
<% } %>
3211

33-
.command-bar-number-of-items {
34-
margin-right: 10px;
35-
}
12+
mat-toolbar {
13+
overflow: hidden;
14+
}
3615

37-
.padding-40 {
38-
padding:40px;
39-
}
16+
.mat-mdc-menu-panel {
17+
max-width: max-content !important;
18+
}
4019

41-
.filter-options-container {
42-
overflow-y: auto;
43-
min-height: 100px;
44-
max-height: 200px;
45-
}
20+
.mat-mdc-form-field {
21+
padding-top: 20px;
22+
margin-right: 8px;
23+
}
24+
25+
<% if (options.componentType === 'card' && options.addCommandBar) { %>
26+
.sorting-content {
27+
display: flex;
28+
align-items: center;
29+
cursor: pointer;
30+
padding-right: 20px;
31+
}
32+
<% } %>
4633

47-
.filter-actions-container {
48-
text-align: right;
49-
padding: 6px;
34+
.command-bar-number-of-items {
35+
margin-right: 10px;
36+
}
5037

51-
.filter-apply-btn {
52-
margin-left: 10px;
38+
.padding-40 {
39+
padding:40px;
5340
}
54-
}
5541

56-
::ng-deep {
57-
.advanced-search-option-description {
58-
position: relative;
59-
float: left;
60-
font-size: 10px;
61-
line-height: 1;
62-
top: -12px;
63-
white-space: break-spaces;
42+
.filter-options-container {
43+
overflow-y: auto;
44+
min-height: 100px;
45+
max-height: 200px;
6446
}
6547

66-
& .resizing {
67-
-moz-user-select: none;
68-
-ms-user-select: none;
69-
user-select: none;
70-
cursor: e-resize;
48+
.filter-actions-container {
49+
text-align: right;
50+
padding: 6px;
51+
52+
.filter-apply-btn {
53+
margin-left: 10px;
54+
}
7155
}
7256

73-
& .handle {
74-
width: 15px;
75-
position: absolute;
76-
top: 0;
77-
right: 0;
78-
height: 100%;
79-
cursor: col-resize;
80-
opacity: 0;
81-
transition: all 0.2s ease-in;
82-
83-
&:after {
84-
content: '';
85-
display: block;
86-
width: 1px;
57+
::ng-deep {
58+
.advanced-search-option-description {
59+
position: relative;
60+
float: left;
61+
font-size: 10px;
62+
line-height: 1;
63+
top: -12px;
64+
white-space: break-spaces;
65+
}
66+
67+
& .resizing {
68+
-moz-user-select: none;
69+
-ms-user-select: none;
70+
user-select: none;
71+
cursor: e-resize;
72+
}
73+
74+
& .handle {
75+
width: 15px;
76+
position: absolute;
77+
top: 0;
78+
right: 0;
8779
height: 100%;
88-
z-index: 1;
89-
background: linear-gradient(0, rgba(255, 255, 255, 1) 0%, rgba(157, 157, 157, 1) 49%, rgba(255, 255, 255, 1) 100%);
90-
transition: all 0.5ms ease-in;
80+
cursor: col-resize;
81+
opacity: 0;
82+
transition: all 0.2s ease-in;
83+
84+
&:after {
85+
content: '';
86+
display: block;
87+
width: 1px;
88+
height: 100%;
89+
z-index: 1;
90+
background: linear-gradient(0, rgba(255, 255, 255, 1) 0%, rgba(157, 157, 157, 1) 49%, rgba(255, 255, 255, 1) 100%);
91+
transition: all 0.5ms ease-in;
92+
}
9193
}
92-
}
9394

94-
.mat-mdc-menu-panel {
95-
max-width: max-content !important;
96-
}
95+
.mat-mdc-menu-panel {
96+
max-width: max-content !important;
97+
}
9798

98-
.mat-list-item-content {
99-
flex-direction: row !important;
100-
}
99+
.mat-list-item-content {
100+
flex-direction: row !important;
101+
}
101102

102-
.mat-pseudo-checkbox {
103-
margin-right: 10px;
103+
.mat-pseudo-checkbox {
104+
margin-right: 10px;
105+
}
104106
}
105107
}
106108
}

libs/schematic/generators/ng-generate/components/shared/generators/components/command-bar/files/__name@dasherize__-command-bar.component.ts.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ import {MatInput} from '@angular/material/input';
5555
templateUrl: './<%= dasherize(name) %>-command-bar.component.html',
5656
styleUrls: ['./<%= dasherize(name) %>-command-bar.component.scss'],
5757
encapsulation: ViewEncapsulation.None,
58+
host: {class: 'js-sdk-command-bar' }
5859
})
5960
export class <%= classify(name) %>CommandBarComponent implements AfterViewInit {
6061
private dialog = inject(MatDialog);

0 commit comments

Comments
 (0)