Skip to content

Commit 114cbd9

Browse files
committed
# This is a combination of 4 commits.
# This is the 1st commit message: add lib files for sticky-header add chose parent add support to 'optional 'cdkStickyRegion' input ' add app-demo for sticky-header fix bugs and deleted unused tag id in HTML files modify fix some code according to PR review comments change some format to pass TSlint check add '_' before private elements delete @Injectable for StickyHeaderDirective. Because we do not need @Injectable refine code encapsulate 'set style for element' change @input() Delete 'Observable.fromEvent(this.upperScrollableContainer, 'scroll')' add const STICK_START_CLASS and STICK_END_CLASS Add doc for [cdkStickyRegion] and 'unstuckElement()'. Delete 'detach()' function, add its content into 'ngOnDestroy()'. change 'MdStickyHeaderModule' to 'CdkStickyHeaderModule'; encapsulate reset css style operation for sticky header. delete unnecessary gloable variables sticky-header-rebased add one test && fixed bug 'sticky-header not working on iPhone', and bug 'reshape too obviously when being sticked'. && made some change according to the design doc('md-stick --> cdkSticky') make the sticky element being scrolled up smoothly when being unsticked Add code to support optional parentRegion input add add unit test for sticky-header add e2e/sticky-header files e2e test clear code master sticky-header-rebased Add code to support optional parentRegion input add e2e/sticky-header files e2e test clear code fix encapsulate reset css style operation for sticky header. sticky-header-rebased Add code to support optional parentRegion input add e2e/sticky-header files e2e test clear code master sticky-header-rebased Add code to support optional parentRegion input add e2e/sticky-header files e2e test clear code fix delete unused files encapsulate reset css style operation for sticky header. sticky-header-rebased Add code to support optional parentRegion input add unit test for sticky-header add e2e/sticky-header files e2e test clear code master sticky-header-rebased Add code to support optional parentRegion input add e2e/sticky-header files e2e test clear code fix encapsulate reset css style operation for sticky header. sticky-header-rebased Add code to support optional parentRegion input add e2e/sticky-header files e2e test clear code master sticky-header-rebased Add code to support optional parentRegion input add e2e/sticky-header files e2e test clear code fix clean unused files delete sticky-header delete styicky-heade demo delete sticky-header lib revert public_api delete sticky-header e2e files delete.firebasesrc revert revert revert revert add css styles for selection-list add selection-list structures in list.ts initial version of selection-list all src/lib code fix tslint error fix tslint error applied '[class.mat-list-item-content-reverse]="checkboxPosition == 'after'"', deleted comments in code Deleted 'MdSelectionListCssMatStyler' class Added doc for 'md-selection-option' Added binding expression for 'attr.aria-selected' and 'attr.aria-disabled' Added a value and a disabled @input() property Changed 'isSelected' to 'selected'. And added '@input(selected)' for it.(Using 'coerceBooleanProperty') changed '_slist' to 'selectionList' and deleted 'MdSelectionListCheckboxer' class Deleted navList in selection-list-option changed 'onchange()' to toggle(). And added doc for it checkedItems -> selectedOptions deleted 'pCheckbox' and store 'this' instead of HTMLelement in 'optionlist' optimized toggle() with 'this._selected = !this._selected' Added 'Tab' moves focus on selection-list, 'UP_ARROW' and 'DOWN_ARROW' moves focus within selection-list. And use 'SPACE' to select checkbox Added another empty line at the end of each file remove comment line in CSS file Deleted 'webkit-justify-content' in CSS file Deleted 'mat-list-item-content-reverse' to these existing styles; the 'mat-list-item-content-reverse' class should only have the extra styles you need to reverse the display Deleted 'mat-list-item-content' and 'mat-list-item-content-reverse' and '<a>' styles in '.mat-selection-list' Deleted unused 'mat-checkbox' class add ".mat-list-option" class in css file added 'mat-list-option' class fix toggle() disabled Deleted empty class Deleted unused import Removed 'if (this.selectable)' check moved styles in '.mat-selection-list .mat-list-item' to '.mat-list-option'. Deleted position, box-sizing, and height in '.mat-list-item-content-reverse' in list.scss file put md-selection-list and md-list-option in separate files(selection-list.ts and list-option.ts) # This is the commit message #2: nit # This is the commit message #3: correct imports in index.ts # This is the commit message #4: use ' @ContentChildren(MdListOption) options;' instead of QueryList
1 parent 0754320 commit 114cbd9

File tree

9 files changed

+609
-16
lines changed

9 files changed

+609
-16
lines changed

package-lock.json

Lines changed: 141 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"highlight.js": "^9.11.0",
8787
"http-rewrite-middleware": "^0.1.6",
8888
"image-diff": "^1.6.3",
89-
"jasmine-core": "^2.6.2",
89+
"jasmine-core": "^2.6.3",
9090
"jsonwebtoken": "^7.4.1",
9191
"karma": "^1.7.0",
9292
"karma-browserstack-launcher": "^1.2.0",

src/lib/list/_list-theme.scss

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@
88
$background: map-get($theme, background);
99
$foreground: map-get($theme, foreground);
1010

11-
.mat-list, .mat-nav-list {
11+
.mat-list, .mat-nav-list, .mat-selection-list {
1212
.mat-list-item {
1313
color: mat-color($foreground, text);
1414
}
1515

16+
.mat-list-option {
17+
color: mat-color($foreground, text);
18+
}
19+
1620
.mat-subheader {
1721
color: mat-color($foreground, secondary-text);
1822
}
@@ -29,6 +33,14 @@
2933
background: mat-color($background, 'hover');
3034
}
3135
}
36+
37+
.mat-list-option {
38+
outline: none;
39+
40+
&:hover, &.mat-list-item-focus {
41+
background: mat-color($background, 'hover');
42+
}
43+
}
3244
}
3345

3446
@mixin mat-list-typography($config) {
@@ -38,13 +50,22 @@
3850
font-family: $font-family;
3951
}
4052

53+
.mat-list-option {
54+
font-family: $font-family;
55+
}
56+
4157
// Default list
42-
.mat-list, .mat-nav-list {
58+
.mat-list, .mat-nav-list, .mat-selection-list {
4359
.mat-list-item {
4460
font-size: mat-font-size($config, subheading-2);
4561
@include mat-line-base(mat-font-size($config, body-1));
4662
}
4763

64+
.mat-list-option {
65+
font-size: mat-font-size($config, subheading-2);
66+
@include mat-line-base(mat-font-size($config, body-1));
67+
}
68+
4869
.mat-subheader {
4970
font-family: mat-font-family($config, body-2);
5071
font-size: mat-font-size($config, body-2);
@@ -53,12 +74,17 @@
5374
}
5475

5576
// Dense list
56-
.mat-list[dense], .mat-nav-list[dense] {
77+
.mat-list[dense], .mat-nav-list[dense], .mat-selection-list[dense] {
5778
.mat-list-item {
5879
font-size: mat-font-size($config, caption);
5980
@include mat-line-base(mat-font-size($config, caption));
6081
}
6182

83+
.mat-list-option {
84+
font-size: mat-font-size($config, caption);
85+
@include mat-line-base(mat-font-size($config, caption));
86+
}
87+
6288
.mat-subheader {
6389
font-family: $font-family;
6490
font-size: mat-font-size($config, caption);

0 commit comments

Comments
 (0)