-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Created the welcome lib for theme demonstration
- Loading branch information
Showing
21 changed files
with
414 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,29 @@ | ||
<router-outlet></router-outlet> | ||
<div [classList]="themeName + ' theme-wrapper'"> | ||
|
||
<mc-navbar> | ||
<mc-navbar-container position="left"> | ||
<mc-navbar-item> | ||
<i mc-icon="mc-hamburger_16"></i> | ||
</mc-navbar-item> | ||
<mc-navbar-brand> | ||
<mc-navbar-logo> | ||
<svg class="logo" height="32" viewBox="0 0 32 32" width="32" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path d="m0 32h32v-32h-32z" fill="#c00"/><path d="m11.7013126 2.13713398h3.4056699v5.22500971c.0083884 1.2815534 1.0494758 2.31984466 2.3304078 2.32543689v-1.89825242c-.2370486-.00528156-.4296699-.19231068-.432466-.42718447v-5.22500971h3.4050485v-1.89794175h-8.7086602zm-3.29065629-1.89806602h-5.95976699-.0167767c-1.28062136.00590291-2.3192233 1.04978641-2.32481553 2.33351456h1.89794174c.00590292-.23735922.19262136-.42407767.42687379-.43557281h5.97654369c.24295146 0 .44054369.19821359.44054369.44427184v.97646602c0 .23735923-.19759223.43867961-.44054369.43867961l-5.97654369.00248544c-1.28062136.01118447-2.3192233 1.04667961-2.32481553 2.33071845v3.35782524h1.89794174v-3.35782524c.00590292-.23207767.19262136-.42438835.42687379-.42718447h5.97654369c1.28932039 0 2.34190289-1.05227184 2.34190289-2.34469903v-.97646602c0-1.29242718-1.0525825-2.34221359-2.34190289-2.34221359" fill="#fff" transform="translate(5.592 10.889)"/></g></svg> | ||
</mc-navbar-logo> | ||
<mc-navbar-title>PT Brand</mc-navbar-title> | ||
</mc-navbar-brand> | ||
</mc-navbar-container> | ||
<mc-navbar-container position="right"> | ||
<mc-navbar-item> | ||
<select name="theme" [(ngModel)]="themeName"> | ||
<option value="theme-default">theme-default</option> | ||
<option value="theme-dark">theme-dark</option> | ||
<option value="theme-green">theme-green</option> | ||
</select> | ||
</mc-navbar-item> | ||
|
||
</mc-navbar-container> | ||
</mc-navbar> | ||
|
||
<router-outlet></router-outlet> | ||
</div> | ||
|
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,15 @@ | ||
import { NgModule } from '@angular/core'; | ||
import { RouterModule, Routes } from '@angular/router'; | ||
import { WelcomeComponent } from './welcome/welcome.component'; | ||
|
||
|
||
const routes: Routes = [ | ||
{ path: '', component: WelcomeComponent, pathMatch: 'full' }, | ||
]; | ||
|
||
@NgModule({ | ||
imports: [RouterModule.forChild(routes)], | ||
exports: [RouterModule] | ||
}) | ||
export class WelcomeRoutingModule { | ||
} |
16 changes: 16 additions & 0 deletions
16
libs/feature/welcome/src/lib/welcome-table/_welcome-table-theme.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,16 @@ | ||
@mixin welcome-table-theme($theme) { | ||
|
||
$foreground: map-get($theme, foreground); | ||
$second: map-get($theme, second); | ||
|
||
.welcome-table { | ||
td, th { | ||
border: 1px solid mc-color($foreground, text); | ||
} | ||
th { | ||
color: mc-color($foreground, text); | ||
background-color: mc-color($second, 200); | ||
} | ||
} | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
libs/feature/welcome/src/lib/welcome-table/welcome-table.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,14 @@ | ||
<table class="welcome-table"> | ||
<thead> | ||
<tr> | ||
<th>Index</th> | ||
<th>Item</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr *ngFor="let item of items; let i = index"> | ||
<td>{{i}}</td> | ||
<td>{{item}}</td> | ||
</tr> | ||
</tbody> | ||
</table> |
9 changes: 9 additions & 0 deletions
9
libs/feature/welcome/src/lib/welcome-table/welcome-table.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,9 @@ | ||
.welcome-table { | ||
width: 200px; | ||
td, th { | ||
line-height: 40px; | ||
height: 40px; | ||
vertical-align: middle; | ||
text-align: center; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
libs/feature/welcome/src/lib/welcome-table/welcome-table.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,15 @@ | ||
import { Component, Input } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'welcome-table', | ||
templateUrl: './welcome-table.component.html', | ||
styleUrls: ['./welcome-table.component.scss'] | ||
}) | ||
export class WelcomeTableComponent { | ||
|
||
@Input() items: string[] = []; | ||
|
||
constructor() { | ||
} | ||
|
||
} |
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 @@ | ||
import { CommonModule } from '@angular/common'; | ||
import { NgModule } from '@angular/core'; | ||
import { FormsModule } from '@angular/forms'; | ||
import { McInputModule, McFormFieldModule, McToggleModule, McNavbarModule, McButtonModule } from '@ptsecurity/mosaic'; | ||
|
||
import { WelcomeRoutingModule } from './welcome-routing.module'; | ||
import { WelcomeTableComponent } from './welcome-table/welcome-table.component'; | ||
import { WelcomeComponent } from './welcome/welcome.component'; | ||
|
||
|
||
@NgModule({ | ||
declarations: [ | ||
WelcomeComponent, | ||
WelcomeTableComponent | ||
], | ||
imports: [ | ||
CommonModule, | ||
WelcomeRoutingModule, | ||
McInputModule, | ||
McFormFieldModule, | ||
McToggleModule, | ||
McNavbarModule, | ||
McButtonModule, | ||
FormsModule | ||
] | ||
}) | ||
export class WelcomeModule { | ||
} |
70 changes: 70 additions & 0 deletions
70
libs/feature/welcome/src/lib/welcome/welcome.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,70 @@ | ||
|
||
|
||
|
||
<div class="container"> | ||
|
||
<h1 class="mc-display-1">Hello PT team!</h1> | ||
|
||
<div class="layout-row block"> | ||
<div class="flex layout-column block"> | ||
<div class="flex block"> | ||
<div class="mb-1"> | ||
<mc-form-field> | ||
<input mcInput [placeholder]="'Start typing'"> | ||
</mc-form-field> | ||
</div> | ||
|
||
|
||
<div class="mb-1"> | ||
<mc-form-field> | ||
<input mcInput [disabled]="true" [placeholder]="'Start typing'"> | ||
</mc-form-field> | ||
</div> | ||
<div class="mb-1"> | ||
<mc-form-field> | ||
<input mcInput [placeholder]="'Start typing'" [required]="true" [(ngModel)]="title"> | ||
</mc-form-field> | ||
</div> | ||
</div> | ||
<div class="flex block"> | ||
<div class="mb-1"> | ||
<button mc-button color="primary">primary</button> | ||
| ||
<button mc-button color="second">second</button> | ||
</div> | ||
|
||
<div> | ||
<mc-toggle [checked]="true"> | ||
Some text | ||
</mc-toggle> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="flex block ml-2"> | ||
<div class="mc-alert mb-1 mc-alert_error mc-alert_dismissible"> | ||
<i class="mc mc-icon mc-info_16 mc-alert__icon"></i> Alert text error | ||
</div> | ||
<div class="mc-alert mb-1 mc-alert_warning mc-alert_dismissible"> | ||
<i class="mc mc-icon mc-info_16 mc-alert__icon"></i> Alert text warning | ||
</div> | ||
<div class="mc-alert mb-1 mc-alert_success mc-alert_dismissible"> | ||
<i class="mc mc-icon mc-info_16 mc-alert__icon"></i> Alert text success | ||
</div> | ||
<div class="mc-alert mb-1 mc-alert_info mc-alert_dismissible"> | ||
<i class="mc mc-icon mc-info_16 mc-alert__icon"></i> Alert text info | ||
</div> | ||
<div class="mc-alert mb-1 mc-alert_default mc-alert_dismissible"> | ||
<i class="mc mc-icon mc-info_16 mc-alert__icon"></i> Alert text default | ||
</div> | ||
</div> | ||
|
||
<div class="flex block ml-2"> | ||
|
||
<welcome-table [items]="items"></welcome-table> | ||
|
||
</div> | ||
</div> | ||
|
||
</div> |
Oops, something went wrong.