-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/selectablelist'
- Loading branch information
Showing
21 changed files
with
1,193 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 7 additions & 1 deletion
8
projects/komponentkartan/src/lib/controls/scrollbar/scrollbar.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
<ng-scrollbar #scrollable [visibility]="'native'" [appearance]="'standard'" class="scroll-container" [autoHeightDisabled]="autoheightDisabled" > <!--[ngStyle]="{'height': height }"--> | ||
<ng-scrollbar #scrollable | ||
[visibility]="visibility" | ||
[appearance]="'standard'" | ||
class="scroll-container" | ||
[autoHeightDisabled]="autoheightDisabled" | ||
[autoWidthDisabled]="autowidthDisabled" | ||
[ngStyle]="{'max-height': maxHeight + 'px' }"> | ||
<ng-content></ng-content> | ||
</ng-scrollbar> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
projects/komponentkartan/src/lib/controls/selectablelist/selectablelist.column.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Component, Input, HostBinding } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'vgr-selectablelist-column', | ||
template: '<ng-content></ng-content>' | ||
}) | ||
export class SelectablelistColumnComponent { | ||
|
||
@HostBinding('class.right') @Input() alignRight = false; | ||
@HostBinding('class.center') @Input() alignCenter = false; | ||
|
||
constructor() { } | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
projects/komponentkartan/src/lib/controls/selectablelist/selectablelist.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<div class="list-header" [class.hidden]="!headersPresent"> | ||
<ng-content select="vgr-selectablelist-header"></ng-content> | ||
</div> | ||
|
||
<div class="scrollbar-container"> | ||
<vgr-scrollbar #scrollable [ngClass]="{'remove-scrollbar': !showScrollbar}" [maxHeight]="maxHeight"> | ||
<div #scrollWrapper class="scroll-wrapper"> | ||
<div class="list-wrapper" [class.active]="active"> | ||
<ng-content select="vgr-selectablelist-row"></ng-content> | ||
</div> | ||
</div> | ||
</vgr-scrollbar> | ||
</div> |
176 changes: 176 additions & 0 deletions
176
projects/komponentkartan/src/lib/controls/selectablelist/selectablelist.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,176 @@ | ||
@import "../../../assets/partials/_settings.sizes.scss"; | ||
@import "../../../assets/partials/_settings.colors.scss"; | ||
@import "../../../assets/partials/_settings.fonts.scss"; | ||
@import "../../../assets/partials/objects.images"; | ||
@import "../../../assets/partials/base.themify"; | ||
|
||
:host::ng-deep { | ||
outline: 0; | ||
position: relative; | ||
z-index: 0; | ||
width: 100%; | ||
|
||
vgr-selectablelist-header, | ||
vgr-selectablelist-row { | ||
display: table-row; | ||
height: 32px; | ||
} | ||
|
||
vgr-selectablelist-row:nth-child(even) { | ||
background: white; | ||
|
||
&.selected, | ||
&.selected:hover { | ||
@include themify($themes) { | ||
background: themed('primaryColorDimmed') !important; | ||
border-left-color: themed('primaryColor') !important; | ||
} | ||
border-left: 4px solid; | ||
} | ||
|
||
&.focused { | ||
outline: 3px solid #2275d3; | ||
outline-offset: -3px; | ||
} | ||
|
||
|
||
&.groupheader { | ||
font-weight: bold; | ||
|
||
vgr-selectablelist-column { | ||
padding-left: 10px; | ||
} | ||
} | ||
} | ||
|
||
vgr-selectablelist-row:nth-child(odd) { | ||
background: #f0f0f0; | ||
|
||
&.selected, | ||
&.selected:hover { | ||
@include themify($themes) { | ||
background: themed('primaryColorDimmed') !important; | ||
border-left-color: themed('primaryColor') !important; | ||
} | ||
border-left: 4px solid; | ||
} | ||
|
||
&.focused { | ||
outline: 3px solid #2275d3; | ||
outline-offset: -3px; | ||
} | ||
} | ||
|
||
vgr-selectablelist-header-column, | ||
vgr-selectablelist-column { | ||
display: table-cell; | ||
height: 22px; | ||
line-height: 22px; | ||
padding: 5px; | ||
|
||
&:first-child { | ||
padding-left: 20px; | ||
} | ||
|
||
&.center { | ||
text-align: center; | ||
} | ||
|
||
&.right { | ||
text-align: right; | ||
} | ||
} | ||
|
||
.list-wrapper.active { | ||
vgr-selectablelist-row:not(.groupheader) { | ||
cursor: pointer; | ||
|
||
&:hover { | ||
font-weight: bold; | ||
background: transparent; | ||
letter-spacing: -0.15px; | ||
|
||
&.selected { | ||
@include themify($themes) { | ||
background: themed('primaryColorDimmed') !important; | ||
border-left-color: themed('primaryColor') !important; | ||
} | ||
border-left: 4px solid; | ||
} | ||
} | ||
} | ||
vgr-selectablelist-row:not(.selectable) { | ||
cursor: default; | ||
&:hover { | ||
font-weight: normal; | ||
background: transparent; | ||
letter-spacing: 0; | ||
&:nth-child(odd) { | ||
// background: #f0f0f0; | ||
@include themify($themes) { | ||
background: themed('primaryColorDimmed') !important; | ||
border-left-color: themed('primaryColor') !important; | ||
} | ||
border-left: 4px solid; | ||
} | ||
} | ||
} | ||
} | ||
|
||
.scrollbar-container { | ||
@include themify($themes) { | ||
border-top-color: themed('primaryColor') !important; | ||
} | ||
border-top: 2px solid; | ||
border-bottom: 1px solid #97939f; | ||
border-left: 1px solid #97939f; | ||
border-right: 1px solid #97939f; | ||
} | ||
|
||
@media screen and (min-width: $desktop-width--medium) { | ||
.list-wrapper.active { | ||
vgr-selectablelist-row:hover { | ||
letter-spacing: -0.19px; | ||
} | ||
} | ||
} | ||
|
||
// IE HACK to fix outline bug on focused states | ||
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { | ||
/* IE10+ specific styles go here */ | ||
vgr-selectablelist-row.focused { | ||
border: 3px solid #2275d3 !important; | ||
outline: none !important; | ||
} | ||
} | ||
.scroll-wrapper { | ||
position: relative; | ||
background: white; | ||
display: block; | ||
// max-height: 244px; | ||
// overflow: auto; | ||
padding: 10px 0px; | ||
} | ||
|
||
.remove-scrollbar { | ||
.scroll-wrapper { | ||
width: calc(100% + 16px) !important; | ||
} | ||
scrollbar-y { | ||
display: none !important; | ||
} | ||
} | ||
} | ||
|
||
.list-header { | ||
display: table; | ||
width: 100%; | ||
border-spacing: 0px !important; | ||
} | ||
|
||
.list-wrapper { | ||
border-collapse: collapse; | ||
display: table; | ||
width: 100%; | ||
} | ||
|
Oops, something went wrong.