-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(list): add initial commit for
ly-list
- Loading branch information
Showing
36 changed files
with
655 additions
and
17 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
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
28 changes: 28 additions & 0 deletions
28
src/app/docs/components/list-demo/folder-list/folder-list.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,28 @@ | ||
<div [className]="classes.root"> | ||
<ly-paper> | ||
<ly-list> | ||
<button ly-list-item> | ||
<ly-avatar> | ||
<ly-icon>photo</ly-icon> | ||
</ly-avatar> | ||
<h4 ly-line>Photos</h4> | ||
<p ly-line>Dec 9, 2018</p> | ||
</button> | ||
<button ly-list-item> | ||
<ly-avatar> | ||
<ly-icon>library_music</ly-icon> | ||
</ly-avatar> | ||
<h4 ly-line>Music</h4> | ||
<p ly-line>Jan 1, 2018</p> | ||
</button> | ||
<button ly-list-item> | ||
<ly-avatar> | ||
<ly-icon>work</ly-icon> | ||
</ly-avatar> | ||
<h4 ly-line>Work</h4> | ||
<p ly-line>Jan 21, 2018</p> | ||
</button> | ||
</ly-list> | ||
</ly-paper> | ||
</div> | ||
|
25 changes: 25 additions & 0 deletions
25
src/app/docs/components/list-demo/folder-list/folder-list.component.spec.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,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { FolderListComponent } from './folder-list.component'; | ||
|
||
describe('FolderListComponent', () => { | ||
let component: FolderListComponent; | ||
let fixture: ComponentFixture<FolderListComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ FolderListComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(FolderListComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
20 changes: 20 additions & 0 deletions
20
src/app/docs/components/list-demo/folder-list/folder-list.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,20 @@ | ||
import { Component } from '@angular/core'; | ||
import { LyTheme2, ThemeVariables } from '@alyle/ui'; | ||
|
||
const styles = (theme: ThemeVariables) => ({ | ||
root: { | ||
width: '100%', | ||
maxWidth: '360px' | ||
} | ||
}); | ||
|
||
@Component({ | ||
selector: 'aui-folder-list', | ||
templateUrl: './folder-list.component.html' | ||
}) | ||
export class FolderListComponent { | ||
readonly classes = this.theme.addStyleSheet(styles); | ||
constructor( | ||
private theme: LyTheme2 | ||
) { } | ||
} |
13 changes: 13 additions & 0 deletions
13
src/app/docs/components/list-demo/folder-list/folder-list.module.spec.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,13 @@ | ||
import { FolderListModule } from './folder-list.module'; | ||
|
||
describe('FolderListModule', () => { | ||
let folderListModule: FolderListModule; | ||
|
||
beforeEach(() => { | ||
folderListModule = new FolderListModule(); | ||
}); | ||
|
||
it('should create an instance', () => { | ||
expect(folderListModule).toBeTruthy(); | ||
}); | ||
}); |
19 changes: 19 additions & 0 deletions
19
src/app/docs/components/list-demo/folder-list/folder-list.module.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,19 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { LyListModule } from '@alyle/ui/list'; | ||
import { LyAvatarModule } from '@alyle/ui/avatar'; | ||
import { LyIconModule } from '@alyle/ui/icon'; | ||
|
||
import { FolderListComponent } from './folder-list.component'; | ||
|
||
@NgModule({ | ||
imports: [ | ||
CommonModule, | ||
LyListModule, | ||
LyAvatarModule, | ||
LyIconModule | ||
], | ||
exports: [FolderListComponent], | ||
declarations: [FolderListComponent] | ||
}) | ||
export class FolderListModule { } |
12 changes: 12 additions & 0 deletions
12
src/app/docs/components/list-demo/list-demo.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,12 @@ | ||
<p> | ||
Lists are a continuous group of text or images. | ||
</p> | ||
<h2 [lyTyp]="'display1'" gutter>Simple List</h2> | ||
<demo-view path="docs/components/list-demo/simple-list"> | ||
<aui-simple-list></aui-simple-list> | ||
</demo-view> | ||
|
||
<h2 [lyTyp]="'display1'" gutter>Folder List</h2> | ||
<demo-view path="docs/components/list-demo/folder-list"> | ||
<aui-folder-list></aui-folder-list> | ||
</demo-view> |
25 changes: 25 additions & 0 deletions
25
src/app/docs/components/list-demo/list-demo.component.spec.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,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { ListDemoComponent } from './list-demo.component'; | ||
|
||
describe('ListDemoComponent', () => { | ||
let component: ListDemoComponent; | ||
let fixture: ComponentFixture<ListDemoComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ ListDemoComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(ListDemoComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
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,8 @@ | ||
import { Component, ChangeDetectionStrategy } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'aui-list-demo', | ||
templateUrl: './list-demo.component.html', | ||
changeDetection: ChangeDetectionStrategy.OnPush | ||
}) | ||
export class ListDemoComponent { } |
18 changes: 18 additions & 0 deletions
18
src/app/docs/components/list-demo/simple-list/simple-list.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,18 @@ | ||
<div [className]="classes.root"> | ||
<ly-paper> | ||
<ly-list> | ||
<button ly-list-item> | ||
<ly-icon ly-list-icon>mail</ly-icon> | ||
<span ly-line>Inbox</span> | ||
</button> | ||
<button ly-list-item> | ||
<ly-icon ly-list-icon>bookmark</ly-icon> | ||
<span ly-line>Bookmark</span> | ||
</button> | ||
<button ly-list-item> | ||
<ly-icon ly-list-icon>message</ly-icon> | ||
<span ly-line>Chat</span> | ||
</button> | ||
</ly-list> | ||
</ly-paper> | ||
</div> |
25 changes: 25 additions & 0 deletions
25
src/app/docs/components/list-demo/simple-list/simple-list.component.spec.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,25 @@ | ||
import { async, ComponentFixture, TestBed } from '@angular/core/testing'; | ||
|
||
import { SimpleListComponent } from './simple-list.component'; | ||
|
||
describe('SimpleListComponent', () => { | ||
let component: SimpleListComponent; | ||
let fixture: ComponentFixture<SimpleListComponent>; | ||
|
||
beforeEach(async(() => { | ||
TestBed.configureTestingModule({ | ||
declarations: [ SimpleListComponent ] | ||
}) | ||
.compileComponents(); | ||
})); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(SimpleListComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
21 changes: 21 additions & 0 deletions
21
src/app/docs/components/list-demo/simple-list/simple-list.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,21 @@ | ||
import { Component, ChangeDetectionStrategy } from '@angular/core'; | ||
import { LyTheme2, ThemeVariables } from '@alyle/ui'; | ||
|
||
const styles = (theme: ThemeVariables) => ({ | ||
root: { | ||
width: '100%', | ||
maxWidth: '360px' | ||
} | ||
}); | ||
|
||
@Component({ | ||
selector: 'aui-simple-list', | ||
templateUrl: './simple-list.component.html', | ||
// changeDetection: ChangeDetectionStrategy.OnPush | ||
}) | ||
export class SimpleListComponent { | ||
readonly classes = this.theme.addStyleSheet(styles); | ||
constructor( | ||
private theme: LyTheme2 | ||
) { } | ||
} |
13 changes: 13 additions & 0 deletions
13
src/app/docs/components/list-demo/simple-list/simple-list.module.spec.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,13 @@ | ||
import { SimpleListModule } from './simple-list.module'; | ||
|
||
describe('SimpleListModule', () => { | ||
let simpleListModule: SimpleListModule; | ||
|
||
beforeEach(() => { | ||
simpleListModule = new SimpleListModule(); | ||
}); | ||
|
||
it('should create an instance', () => { | ||
expect(simpleListModule).toBeTruthy(); | ||
}); | ||
}); |
18 changes: 18 additions & 0 deletions
18
src/app/docs/components/list-demo/simple-list/simple-list.module.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,18 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { CommonModule } from '@angular/common'; | ||
import { SimpleListComponent } from './simple-list.component'; | ||
import { LyListModule } from '@alyle/ui/list'; | ||
import { LyAvatarModule } from '@alyle/ui/avatar'; | ||
import { LyIconModule } from '@alyle/ui/icon'; | ||
|
||
@NgModule({ | ||
imports: [ | ||
CommonModule, | ||
LyListModule, | ||
LyAvatarModule, | ||
LyIconModule | ||
], | ||
exports: [SimpleListComponent], | ||
declarations: [SimpleListComponent] | ||
}) | ||
export class SimpleListModule { } |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './public_api'; |
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,7 @@ | ||
<span [ngClass]="listItemClasses"> | ||
<ng-content></ng-content> | ||
<div *ngIf="_lines?.length" [className]="classes.lines"> | ||
<ng-content select="[ly-line]"></ng-content> | ||
</div> | ||
</span> | ||
<div *ngIf="_isBrowser" #rippleContainer [className]="_rippleService.classes.container"></div> |
Oops, something went wrong.