Skip to content

Commit d1b0dda

Browse files
MKirovaMKirova
authored andcommitted
chore(*): Merge from master
2 parents b3b236b + 2734508 commit d1b0dda

File tree

15 files changed

+415
-216
lines changed

15 files changed

+415
-216
lines changed

projects/igniteui-angular/src/lib/core/styles/components/slider/_slider-component.scss

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,18 @@
5656
}
5757
}
5858

59+
@include e(thumb, $m: hovered) {
60+
.dot {
61+
@extend %igx-thumb-dot--active !optional;
62+
}
63+
}
64+
65+
@include e(thumb, $m: pressed) {
66+
.dot {
67+
@extend %igx-thumb-dot--pressed !optional;
68+
}
69+
}
70+
5971
@include m(disabled) {
6072
@extend %igx-slider-display !optional;
6173

@@ -77,6 +89,7 @@
7789
@each $t in $thumbs {
7890
@include e(thumb-#{$t}) {
7991
@extend %igx-thumb-display !optional;
92+
@extend %igx-thumb--disabled !optional;
8093

8194
.label {
8295
@extend %igx-thumb-label !optional;

projects/igniteui-angular/src/lib/core/styles/components/slider/_slider-theme.scss

Lines changed: 112 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -75,23 +75,22 @@
7575
$slider-track-height: 2px;
7676

7777
// Slider Thumb
78-
$slider-thumb-width: 14px;
78+
$slider-thumb-width: 40px;
7979
$slider-thumb-height: $slider-thumb-width;
8080
$slider-thumb-radius: $slider-thumb-width / 2;
8181

8282
// Slider Label
83-
$slider-label-width: 28px;
83+
$slider-label-width: 36px;
8484
$slider-label-height: $slider-label-width;
8585
$slider-label-radius: $slider-label-width / 2;
86-
$slider-label-font-size: rem(11px);
86+
$slider-label-font-size: rem(12px);
8787
$slider-label-font-weight: 600;
88-
$slider-label-padding: 0 2px;
89-
$slider-background--start: #fff;
88+
$slider-label-padding: 0 rem(2px);
9089

9190
%igx-slider-display {
9291
display: flex;
9392
position: relative;
94-
height: $slider-height;
93+
height: rem($slider-height);
9594
align-items: center;
9695
}
9796

@@ -106,9 +105,9 @@
106105
%igx-slider-track {
107106
position: absolute;
108107
width: 100%;
109-
height: $slider-track-height;
108+
height: rem($slider-track-height);
110109
background: --var($theme, 'base-track-color');
111-
transition: background .2s ease;
110+
transition: background .2s $ease-out-quad;
112111
}
113112

114113
%igx-slider-track--disabled {
@@ -118,10 +117,10 @@
118117
%igx-slider-track-ticks {
119118
position: absolute;
120119
width: 100%;
121-
height: $slider-track-height;
122-
background-size: 100% $slider-track-height;
120+
height: rem($slider-track-height);
121+
background-size: 100% em($slider-track-height);
123122
opacity: .85;
124-
transition: opacity .2s ease;
123+
transition: opacity .2s $ease-out-quad;
125124
z-index: 1;
126125
}
127126

@@ -143,89 +142,146 @@
143142
}
144143

145144
%igx-thumb-display {
146-
display: flex;
147145
position: absolute;
146+
display: flex;
148147
justify-content: center;
149-
flex-flow: row nowrap;
150-
width: $slider-thumb-width;
151-
height: $slider-thumb-height;
152-
margin-left: -$slider-thumb-width / 2;
153-
top: -$slider-thumb-height / 2;
148+
align-items: center;
149+
flex-direction: column;
154150
outline: none;
151+
top: -#{rem($slider-thumb-radius)};
152+
margin-left: -#{rem($slider-thumb-radius)};
153+
154+
&:focus %igx-thumb-dot::after {
155+
opacity: .18;
156+
/* 32 / 40 */
157+
transform: scale(.8);
158+
}
159+
}
160+
161+
%igx-thumb--disabled {
162+
&:hover %igx-thumb-label {
163+
opacity: 0;
164+
}
155165
}
156166

157167
%igx-thumb-label {
168+
position: absolute;
158169
display: flex;
159-
position: relative;
160170
align-items: center;
161171
justify-content: center;
162172
flex: 0 0 auto;
163-
min-width: $slider-label-width;
164-
height: $slider-label-height;
173+
top: -#{rem($slider-thumb-height - 6px)};
174+
pointer-events: none;
175+
min-width: rem($slider-label-width);
176+
height: rem($slider-label-height);
165177
padding: $slider-label-padding;
166-
border-radius: $slider-label-radius;
167-
top: -36px;
178+
border-radius: rem($slider-label-radius);
179+
margin: 0 auto;
168180
font-size: $slider-label-font-size;
169181
font-weight: $slider-label-font-weight;
170-
line-height: $slider-label-font-size;
182+
line-height: 1;
171183
color: --var($theme, 'label-text-color');
172184
background: --var($theme, 'label-background-color');
173-
opacity: .5;
174-
transform: scale(0);
185+
opacity: 0;
175186
border-color: --var($theme, 'label-background-color') transparent transparent;
176-
transform-origin: 50% 150% 0;
177-
transition: transform .2s ease-out;
187+
transition: opacity .1s $ease-out-quad;
178188
z-index: -1;
179189

180190
&::after {
181191
content: '';
182192
position: absolute;
193+
top: 0;
183194
left: 50%;
184-
width: 0;
185-
height: 0;
186-
transform: translateX(-50%);
187-
border-left: 10px solid;
188-
border-right: 10px solid;
189-
border-top: 12px solid;
190-
border-color: inherit;
191-
top: 24px;
195+
margin-left: -#{$slider-label-radius};
196+
width: rem($slider-label-width);
197+
height: $slider-label-height;
198+
border-radius: 0 $slider-label-radius $slider-label-radius;
199+
background: inherit;
200+
transform: rotate(-135deg);
192201
z-index: -1;
193202
}
203+
204+
&::before {
205+
content: '';
206+
position: absolute;
207+
top: rem(40px);
208+
left: calc(50% - 1px);
209+
border-left: 1px solid;
210+
border-right: 1px solid;
211+
border-top: rem(14px) solid;
212+
border-color: inherit;
213+
}
194214
}
195215

196216
%igx-thumb-dot {
197-
position: absolute;
217+
position: relative;
198218
left: 0;
199-
width: inherit;
200-
height: inherit;
201-
border-radius: $slider-thumb-radius;
202-
background: --var($theme, 'thumb-color');
203-
transform: scale(1);
204-
transform-origin: 50% 50% 0;
205-
opacity: 1;
206-
transition: transform .2s ease-out;
219+
padding: rem(20px);
220+
221+
&:hover::after {
222+
opacity: .12;
223+
/* 32 / 40 */
224+
transform: scale(.8);
225+
}
226+
227+
&::before {
228+
position: absolute;
229+
content: '';
230+
width: rem(12px);
231+
height: rem(12px);
232+
left: #{rem($slider-thumb-radius) - rem(6px)};
233+
top: #{rem($slider-thumb-radius) - rem(6px)};
234+
background: --var($theme, 'thumb-color');
235+
transform: rotate(45deg);
236+
transition: transform .1s $ease-out-quad, border-radius .1s $ease-out-quad;
237+
border-radius: rem($slider-thumb-radius);
238+
}
239+
240+
&::after {
241+
position: absolute;
242+
content: '';
243+
width: rem($slider-thumb-width);
244+
height: rem($slider-thumb-height);
245+
background: --var($theme, 'thumb-color');
246+
top: 0;
247+
left: 0;
248+
opacity: 0;
249+
transform: scale(0);
250+
transform-origin: center center;
251+
transition: transform .1s $ease-out-quad, opacity .1s $ease-out-quad;
252+
border-radius: 50%;
253+
}
207254
}
208255

209256
%igx-thumb-dot--disabled {
210-
background: --var($theme, 'disabled-thumb-color');
211-
transform: scale(.9);
212-
border: 2px solid transparent;
257+
pointer-events: none;
258+
259+
&::before {
260+
background: --var($theme, 'disabled-thumb-color');
261+
border-radius: rem($slider-thumb-radius);
262+
}
263+
264+
&::after {
265+
transform: scale(0);
266+
}
213267
}
214268

215269
%igx-thumb-dot--active {
216-
opacity: 0;
217-
transform: scale(0);
270+
&::before {
271+
border-radius: 0 $slider-thumb-radius $slider-thumb-radius;
272+
}
218273
}
219274

220-
%igx-thumb-label--active {
221-
opacity: .85;
222-
transform: scale(1.2);
275+
%igx-thumb-dot--pressed {
276+
&::after {
277+
opacity: .24 !important;
278+
/* 48 / 40 */
279+
transform: scale(1.2) !important;
280+
}
223281
}
224282

225-
%igx-thumb-dot--start,
226-
%igx-thumb-label--start {
227-
background: $slider-background--start;
228-
border-color: $slider-background--start transparent transparent;
283+
%igx-thumb-label--active {
284+
opacity: 1;
229285
}
230286

231287
%igx-thumb--active {

projects/igniteui-angular/src/lib/core/styles/themes/schemas/light/_slider.scss

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ $_light-slider: extend((
3030

3131

3232
label-background-color: (
33-
igx-color: ('secondary', 500)
33+
igx-color: ('secondary', 500),
34+
hexrgba: ()
3435
),
3536

3637
label-text-color: (
@@ -43,7 +44,8 @@ $_light-slider: extend((
4344
),
4445

4546
base-track-color: (
46-
igx-color: ('grays', 500)
47+
igx-color: ('secondary', 500),
48+
rgba: .24
4749
),
4850

4951
disabled-base-track-color: (

projects/igniteui-angular/src/lib/directives/for-of/for_of.directive.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,19 +1086,21 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
10861086

10871087
protected _recalcScrollBarSize() {
10881088
const count = this.isRemote ? this.totalItemCount : (this.igxForOf ? this.igxForOf.length : 0);
1089-
const prevNotVirtual = this.dc.instance.notVirtual;
10901089
this.dc.instance.notVirtual = !(this.igxForContainerSize && this.dc && this.state.chunkSize < count);
1091-
if (!prevNotVirtual && prevNotVirtual !== this.dc.instance.notVirtual) {
1092-
this._scrollPosition = 0;
1093-
}
10941090
if (this.igxForScrollOrientation === 'horizontal') {
10951091
const totalWidth = this.igxForContainerSize ? this.initSizesCache(this.igxForOf) : 0;
10961092
this.hScroll.style.width = this.igxForContainerSize + 'px';
10971093
this.hScroll.children[0].style.width = totalWidth + 'px';
1094+
if (totalWidth <= parseInt(this.igxForContainerSize, 10)) {
1095+
this.scrollPosition = 0;
1096+
}
10981097
}
10991098
if (this.igxForScrollOrientation === 'vertical') {
11001099
this.vh.instance.elementRef.nativeElement.style.height = parseInt(this.igxForContainerSize, 10) + 'px';
11011100
this.vh.instance.height = this._calcHeight();
1101+
if (this.vh.instance.height <= parseInt(this.igxForContainerSize, 10)) {
1102+
this.scrollPosition = 0;
1103+
}
11021104
}
11031105
}
11041106

@@ -1126,7 +1128,7 @@ export class IgxForOfDirective<T> implements OnInit, OnChanges, DoCheck, OnDestr
11261128
if (prevChunkSize !== this.state.chunkSize) {
11271129
this.onChunkLoad.emit(this.state);
11281130
}
1129-
if (this.sizesCache && this.hScroll && this.scrollPosition !== 0) {
1131+
if (this.sizesCache && this.hScroll) {
11301132
// Updating horizontal chunks and offsets based on the new scrollLeft
11311133
const scrollOffset = this.fixedUpdateAllElements(this.scrollPosition);
11321134
this.dc.instance._viewContainer.element.nativeElement.style.left = -scrollOffset + 'px';

projects/igniteui-angular/src/lib/grids/grid-base.component.ts

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1986,49 +1986,6 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
19861986
this.cdr.markForCheck();
19871987
}
19881988

1989-
/**
1990-
* Returns the state of the grid virtualization, including the start index and how many records are rendered.
1991-
* ```typescript
1992-
* const gridVirtState = this.grid1.virtualizationState;
1993-
* ```
1994-
* @memberof IgxGridBaseComponent
1995-
*/
1996-
get virtualizationState() {
1997-
return this.verticalScrollContainer.state;
1998-
}
1999-
2000-
/**
2001-
* @hidden
2002-
*/
2003-
set virtualizationState(state) {
2004-
this.verticalScrollContainer.state = state;
2005-
}
2006-
2007-
/**
2008-
* Returns the total number of records in the data source.
2009-
* Works only with remote grid virtualization.
2010-
* ```typescript
2011-
* const itemCount = this.grid1.totalItemCount;
2012-
* ```
2013-
* @memberof IgxGridBaseComponent
2014-
*/
2015-
get totalItemCount() {
2016-
return this.verticalScrollContainer.totalItemCount;
2017-
}
2018-
2019-
/**
2020-
* Sets the total number of records in the data source.
2021-
* This property is required for virtualization to function when the grid is bound remotely.
2022-
* ```typescript
2023-
* this.grid1.totalItemCount = 55;
2024-
* ```
2025-
* @memberof IgxGridBaseComponent
2026-
*/
2027-
set totalItemCount(count) {
2028-
this.verticalScrollContainer.totalItemCount = count;
2029-
this.cdr.detectChanges();
2030-
}
2031-
20321989
/**
20331990
* @hidden
20341991
*/
@@ -4041,7 +3998,7 @@ export abstract class IgxGridBaseComponent extends DisplayDensityBase implements
40413998
* @hidden
40423999
*/
40434000
protected get defaultTargetBodyHeight(): number {
4044-
const allItems = this.totalItemCount || this.dataLength;
4001+
const allItems = this.dataLength;
40454002
return this.renderedRowHeight * Math.min(this._defaultTargetRecordNumber,
40464003
this.paging ? Math.min(allItems, this.perPage) : allItems);
40474004
}

0 commit comments

Comments
 (0)