Skip to content

Commit a7e35f8

Browse files
authored
Merge branch 'master' into mkirova/row-pinning-editing
2 parents 446c44a + b36b75e commit a7e35f8

33 files changed

+1146
-733
lines changed

CHANGELOG.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,6 @@ All notable changes for each version of this project will be documented in this
108108
- `IgxGridExcelStyleFilteringComponent` and `IgxAdvancedFilteringDialogComponent` can now be hosted outside of the grid in order to provide the same experience as the built-in filtering UI.
109109
- `expandRow(rowID)`/`collapseRow(rowID)`/`toggleRow(rowID)` API methods are added for the `igxHierarchicalGrid`. They allow expanding/collapsing a row by its id.
110110
- `onRowToggle` event is added for the `igxHierarchicalGrid`. It is emitted when the expanded state of a row is changed.
111-
- `IgxOverlayService`:
112-
- `setOffset` method added. It offsets the content along the corresponding axis by the provided amount.
113-
- `IgxToggleDirective`:
114-
- `setOffset` method added. It offsets the content along the corresponding axis by the provided amount.
115111
- `IgxRowDragGhost` directive is added. It allows providing a custom template for the drag ghost when dragging a row.
116112
```html
117113
<igx-grid #grid1 [data]="remote | async" primaryKey="ProductID"
@@ -171,6 +167,12 @@ All notable changes for each version of this project will be documented in this
171167
- `IgxDropDown`:
172168
- `clearSelection` method is added, which can be used to deselect the selected dropdown item
173169

170+
- `IgxToggleDirective`:
171+
- `setOffset` method added. It offsets the content along the corresponding axis by the provided amount.
172+
173+
- `IgxOverlayService`:
174+
- `setOffset` method added. It offsets the content along the corresponding axis by the provided amount.
175+
174176
- `IgxCircularProgressBar`:
175177
- added `IgxProgressBarGradientDirective` to allow providing custom circular progress SVG gradients. Providing a custom gradient via a template is as easy as writing:
176178
```html

projects/igniteui-angular/src/lib/buttonGroup/buttongroup-content.component.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
[igxLabel]="button.label"
1212
[igxRipple]="button.ripple"
1313
>
14-
<div class="igx-button-group__item-content {{ itemContentCssClass }}">
14+
<span class="igx-button-group__item-content {{ itemContentCssClass }}">
1515
<igx-icon *ngIf="button.icon" fontSet="material">{{button.icon}}</igx-icon>
16-
<span *ngIf="button.label">{{button.label}}</span>
17-
</div>
16+
<span class="igx-button-group__button-text" *ngIf="button.label">{{button.label}}</span>
17+
</span>
1818
</button>
1919
<ng-content></ng-content>
2020
</div>

projects/igniteui-angular/src/lib/core/styles/components/_common/_igx-display-container.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%display-container {
1+
%display-container {
22
display: inherit;
33
position: relative;
44
width: 100%;

projects/igniteui-angular/src/lib/core/styles/components/_common/_igx-vhelper.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
%vhelper--vertical {
1414
position: absolute;
15-
width: 18px;
1615
top: 0;
1716
#{$right}: 0;
1817
}

projects/igniteui-angular/src/lib/core/styles/components/button-group/_button-group-component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
@extend %igx-group-item !optional;
1616
}
1717

18+
@include e(button-text) {
19+
@extend %igx-button-group__button-text !optional;
20+
}
21+
1822
@include e(item, $m: selected) {
1923
@extend %igx-group-item !optional;
2024
@extend %igx-group-item-selected !optional;

projects/igniteui-angular/src/lib/core/styles/components/button-group/_button-group-theme.scss

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -186,11 +186,10 @@
186186
display: flex;
187187
box-shadow: --var($theme, 'shadow');
188188
transition: $transition;
189-
border-radius: --var($theme, 'border-radius')
189+
border-radius: --var($theme, 'border-radius');
190190
}
191191

192192
%igx-group-item {
193-
@include ellipsis();
194193
border: $group-item-border-thickness solid --var($theme, 'item-border-color');
195194
color: --var($theme, 'item-text-color');
196195
background: --var($theme, 'item-background');
@@ -308,13 +307,16 @@
308307
%igx-group-item-content {
309308
display: flex;
310309
flex-flow: row nowrap;
311-
justify-content: center;
312-
align-items: center;
313-
text-align: center;
310+
min-width: 0;
314311

315312
* ~ * {
316313
margin-#{$left}: $group-items-margin;
317314
}
318315
}
316+
317+
%igx-button-group__button-text {
318+
width: 100%;
319+
@include ellipsis();
320+
}
319321
}
320322

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
////
2+
/// @group components
3+
/// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a>
4+
/// @requires {mixin} bem-block
5+
/// @requires {mixin} bem-elem
6+
/// @requires {mixin} bem-mod
7+
////
8+
@include b(igx-scrollbar) {
9+
// Register the component in the component registry
10+
$this: bem--selector-to-string(&);
11+
@include register-component(str-slice($this, 2, -1));
12+
13+
@extend %scrollbar-display !optional;
14+
}
15+
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
////
2+
/// @group themes
3+
/// @access public
4+
/// @author <a href="https://github.com/simeonoff" target="_blank">Simeon Simeonoff</a>
5+
////
6+
7+
/// If only background color is specified, text/icon color will be assigned automatically to a contrasting color.
8+
/// @param {Map} $palette [$default-palette] - The palette used as basis for styling the component.
9+
/// @param {Map} $schema [$light-schema] - The schema used as basis for styling the component.
10+
/// @param {Color} $thumb-background [null] - The background color used for the thumb.
11+
/// @param {Color} $track-background [null] - The background color used for the track.
12+
/// @param {Number | String} $size [null] - The size of the track.
13+
/// @requires $default-palette
14+
/// @requires $light-schema
15+
/// @requires apply-palette
16+
/// @requires text-contrast
17+
/// @requires extend
18+
///
19+
/// @example scss Change the background and track colors
20+
/// $my-scrollbar-theme: igx-scrollbar-theme($thumb-background: black, $track-background: gray);
21+
/// // Pass the theme to the igx-scrollbar component mixin
22+
/// @include igx-scrollbar($my-avatar-theme);
23+
@function igx-scrollbar-theme(
24+
$palette: $default-palette,
25+
$schema: $light-schema,
26+
$size: null,
27+
$thumb-background: null,
28+
$track-background: null,
29+
) {
30+
$name: 'igx-scrollbar';
31+
$scrollbar-schema: ();
32+
33+
@if map-has-key($schema, $name) {
34+
$scrollbar-schema: map-get($schema, $name);
35+
} @else {
36+
$scrollbar-schema: $schema;
37+
}
38+
39+
$theme: apply-palette($scrollbar-schema, $palette);
40+
41+
@return extend($theme, (
42+
name: $name,
43+
palette: $palette,
44+
thumb-background: $thumb-background,
45+
track-background: $track-background,
46+
size: $size
47+
));
48+
}
49+
50+
/// @param {Map} $theme - The theme used to style the component.
51+
/// @requires {mixin} igx-root-css-vars
52+
/// @requires rem
53+
/// @requires --var
54+
@mixin igx-scrollbar($theme) {
55+
@include igx-root-css-vars($theme);
56+
57+
%scrollbar-display {
58+
@if type-of(map-get($theme, 'size') == 'string') {
59+
scrollbar-width: --var($theme, 'size');
60+
}
61+
62+
scrollbar-color: --var($theme, 'thumb-background') --var($theme, 'track-background');
63+
64+
::-webkit-scrollbar {
65+
width: --var($theme, 'size');
66+
height: --var($theme, 'size');
67+
background: --var($theme, 'track-background');
68+
}
69+
70+
::-webkit-scrollbar-thumb {
71+
background: --var($theme, 'thumb-background');
72+
}
73+
}
74+
}
75+

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
@import '../components/overlay/overlay-component';
5252
@import '../components/progress/progress-component';
5353
@import '../components/radio/radio-component';
54+
@import '../components/scrollbar/scrollbar-component';
5455
@import '../components/slider/slider-component';
5556
@import '../components/snackbar/snackbar-component';
5657
@import '../components/switch/switch-component';

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
@import '../components/toast/toast-theme';
3535
@import '../components/tooltip/tooltip-theme';
3636
@import '../components/tabs/tabs-theme';
37+
@import '../components/scrollbar/scrollbar-theme';
3738
@import '../components/switch/switch-theme';
3839
@import '../components/snackbar/snackbar-theme';
3940
@import '../components/slider/slider-theme';
@@ -347,6 +348,10 @@
347348
@include igx-radio(igx-radio-theme($palette, $schema));
348349
}
349350

351+
@if not(index($exclude, 'igx-scrollbar')) {
352+
@include igx-scrollbar(igx-scrollbar-theme($palette, $schema));
353+
}
354+
350355
@if not(index($exclude, 'igx-slider')) {
351356
@include igx-slider(igx-slider-theme($palette, $schema));
352357
}

0 commit comments

Comments
 (0)