Skip to content

Commit b302549

Browse files
authored
refactor(column-actions): bundle styles with component (#15765)
1 parent 72f9d0d commit b302549

File tree

14 files changed

+123
-12
lines changed

14 files changed

+123
-12
lines changed

projects/igniteui-angular/src/lib/core/styles/themes/generators/_base.scss

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -336,13 +336,13 @@
336336
// @include chip($chip-theme-map);
337337
// }
338338

339-
@if is-used('igx-column-actions', $exclude) {
340-
$column-actions-theme-map: column-actions-theme(
341-
$schema: $schema,
342-
);
343-
$column-actions-theme-map: meta.call($theme-handler, $column-actions-theme-map);
344-
@include column-actions($column-actions-theme-map);
345-
}
339+
// @if is-used('igx-column-actions', $exclude) {
340+
// $column-actions-theme-map: column-actions-theme(
341+
// $schema: $schema,
342+
// );
343+
// $column-actions-theme-map: meta.call($theme-handler, $column-actions-theme-map);
344+
// @include column-actions($column-actions-theme-map);
345+
// }
346346

347347
@if is-used('igx-combo', $exclude) {
348348
$combo-theme-map: combo-theme(

projects/igniteui-angular/src/lib/core/styles/typography/_bootstrap.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
label: 'body-1',
5858
));
5959
// @include chip-typography();
60-
@include column-actions-typography();
60+
// @include column-actions-typography();
6161
@include date-range-typography();
6262
@include dialog-typography($categories: (
6363
title: 'h5',

projects/igniteui-angular/src/lib/core/styles/typography/_fluent.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
// @include chip-typography($categories: (
6161
// text: 'subtitle-2'
6262
// ));
63-
@include column-actions-typography();
63+
// @include column-actions-typography();
6464
@include date-range-typography();
6565
@include dialog-typography($categories: (
6666
title: 'h6',

projects/igniteui-angular/src/lib/core/styles/typography/_indigo.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
label: 'body-2',
6060
));
6161
// @include chip-typography();
62-
@include column-actions-typography();
62+
// @include column-actions-typography();
6363
@include date-range-typography();
6464
@include dialog-typography($categories: (
6565
title: 'h5',

projects/igniteui-angular/src/lib/core/styles/typography/_material.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
// @include card-typography();
4444
@include checkbox-typography();
4545
// @include chip-typography();
46-
@include column-actions-typography();
46+
// @include column-actions-typography();
4747
@include date-range-typography();
4848
@include dialog-typography();
4949
@include dock-manager-typography();
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@use 'themes/base';
2+
@use 'themes/shared';
3+
@use 'themes/light';
4+
@use 'themes/dark';

projects/igniteui-angular/src/lib/grids/column-actions/column-actions.component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, DoCheck, EventEmitter, HostBinding, Inject, Input, IterableDiffer, IterableDiffers, Output, Pipe, PipeTransform, QueryList, ViewChildren, booleanAttribute, forwardRef } from '@angular/core';
1+
import { Component, DoCheck, EventEmitter, HostBinding, Inject, Input, IterableDiffer, IterableDiffers, Output, Pipe, PipeTransform, QueryList, ViewChildren, ViewEncapsulation, booleanAttribute, forwardRef } from '@angular/core';
22
import { ColumnDisplayOrder } from '../common/enums';
33
import { ColumnType, GridType } from '../common/grid.interface';
44
import { IColumnToggledEventArgs } from '../common/events';
@@ -19,7 +19,9 @@ let NEXT_ID = 0;
1919
*/
2020
@Component({
2121
selector: 'igx-column-actions',
22+
styleUrl: 'column-actions.component.css',
2223
templateUrl: './column-actions.component.html',
24+
encapsulation: ViewEncapsulation.None,
2325
imports: [IgxInputGroupComponent, FormsModule, IgxInputDirective, IgxCheckboxComponent, IgxButtonDirective, IgxRippleDirective, forwardRef(() => IgxColumnActionEnabledPipe), forwardRef(() => IgxFilterActionColumnsPipe), forwardRef(() => IgxSortActionColumnsPipe)]
2426
})
2527
export class IgxColumnActionsComponent implements DoCheck {
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
@use 'sass:map';
2+
@use 'sass:meta';
3+
@use 'igniteui-theming/sass/bem' as *;
4+
@use 'igniteui-theming/sass/themes' as *;
5+
@use 'igniteui-theming/sass/typography' as *;
6+
@use 'styles/themes/standalone' as *;
7+
@use './light/tokens' as *;
8+
9+
$_theme: $material;
10+
11+
@include layer(base) {
12+
@include b(igx-column-actions) {
13+
display: flex;
14+
flex-flow: column nowrap;
15+
background: var-get($_theme, 'background-color');
16+
box-shadow: var(--ig-elevation-8);
17+
width: 100%;
18+
flex: 1 1 auto;
19+
min-width: rem(180px);
20+
21+
@include e(header-title) {
22+
@include type-style(subtitle-1);
23+
24+
color: var-get($_theme, 'title-color');
25+
margin: 0;
26+
padding: rem(16px) rem(16px) rem(8px);
27+
}
28+
29+
@include e(header-input) {
30+
font-size: rem(16px);
31+
margin: rem(-16px) 0 0 !important;
32+
padding: rem(8px) rem(16px);
33+
}
34+
35+
@include e(columns) {
36+
display: flex;
37+
flex-flow: column nowrap;
38+
overflow-y: auto;
39+
outline-style: none;
40+
}
41+
42+
@include e(columns-item) {
43+
padding: rem(4px) rem(16px);
44+
min-height: rem(32px);
45+
}
46+
47+
@include e(buttons) {
48+
display: flex;
49+
justify-content: flex-end;
50+
padding: rem(8px) rem(16px);
51+
}
52+
}
53+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@use 'sass:meta';
2+
@use 'tokens';
3+
@use 'styles/themes/standalone' as *;
4+
5+
$tokens: meta.module-variables(tokens);
6+
@include themes(igx-column-actions, $tokens, dark);
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@use 'igniteui-theming/sass/themes' as *;
2+
@use 'igniteui-theming/sass/themes/schemas/components/dark/column-actions' as *;
3+
4+
$material: digest-schema($dark-material-column-actions);
5+
$bootstrap: digest-schema($dark-bootstrap-column-actions);
6+
$fluent: digest-schema($dark-fluent-column-actions);
7+
$indigo: digest-schema($dark-indigo-column-actions);

0 commit comments

Comments
 (0)