-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1169 from HealthCatalyst/dev
merge dev -> master
- Loading branch information
Showing
65 changed files
with
1,501 additions
and
55 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
projects/cashmere-examples/src/lib/checkbox-align/checkbox-align-example.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,16 @@ | ||
<div class="checkbox-example-container"> | ||
<hc-checkbox> | ||
This is a center aligned checkbox (default) with a lot of associated text. | ||
The align parameter is used to position the checkbox relative to its label. | ||
</hc-checkbox> | ||
|
||
<hc-checkbox align="top"> | ||
This checkbox is top aligned. Lorem ipsum dolor sit amet, consectetur adipiscing elit. | ||
Aenean commodo dolor sed justo ullamcorper mattis. | ||
</hc-checkbox> | ||
|
||
<hc-checkbox align="bottom"> | ||
This checkbox is bottom aligned. Praesent dignissim fermentum auctor. | ||
Nulla nibh lectus, dignissim ultrices condimentum et, rutrum eu tortor. | ||
</hc-checkbox> | ||
</div> |
9 changes: 9 additions & 0 deletions
9
projects/cashmere-examples/src/lib/checkbox-align/checkbox-align-example.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 @@ | ||
.checkbox-example-container { | ||
display: flex; | ||
align-items: center; | ||
|
||
hc-checkbox { | ||
flex: 1; | ||
margin-right: 15px; | ||
} | ||
} |
11 changes: 11 additions & 0 deletions
11
projects/cashmere-examples/src/lib/checkbox-align/checkbox-align-example.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,11 @@ | ||
import {Component} from '@angular/core'; | ||
|
||
/** | ||
* @title Checkbox Alignment | ||
*/ | ||
@Component({ | ||
selector: 'hc-checkbox-align-example', | ||
templateUrl: 'checkbox-align-example.component.html', | ||
styleUrls: ['checkbox-align-example.component.scss'] | ||
}) | ||
export class CheckboxAlignExampleComponent {} |
8 changes: 5 additions & 3 deletions
8
...ects/cashmere-examples/src/lib/checkbox-standard/checkbox-standard-example.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,5 +1,7 @@ | ||
<hc-checkbox id="light">Standard Checkbox</hc-checkbox> | ||
<hc-checkbox>Standard Checkbox</hc-checkbox> | ||
|
||
<hc-checkbox id="disabled" disabled="true">Disabled Checkbox</hc-checkbox> | ||
<hc-checkbox disabled="true">Disabled Checkbox</hc-checkbox> | ||
|
||
<hc-checkbox id="disabled" [checked]="true" disabled="true">Disabled Checkbox (Checked)</hc-checkbox> | ||
<hc-checkbox [checked]="true" disabled="true">Disabled Checkbox (Checked)</hc-checkbox> | ||
|
||
<hc-checkbox tight="true">Tight Checkbox</hc-checkbox> |
45 changes: 45 additions & 0 deletions
45
projects/cashmere-examples/src/lib/form-field-tight/form-field-tight-example.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,45 @@ | ||
<p>For forms that need to fit in smaller spaces, the <code>tight</code> parameter may be set to true on | ||
either the <code>hcForm</code> or individual <code>hc-form-field</code> elements.</p> | ||
<br> | ||
<form hcForm tight="true"> | ||
<div class="form-sample"> | ||
<hc-form-field> | ||
<hc-label>Job Name:</hc-label> | ||
<input hcInput required [formControl]="inputControl"> | ||
<hc-error>A job name is required</hc-error> | ||
</hc-form-field> | ||
</div> | ||
|
||
<hc-form-field inline="true"> | ||
<hc-label>Data Source:</hc-label> | ||
<hc-radio-group [formControl]="radioControl" inline="true"> | ||
<hc-radio-button value="SM">Source Mart</hc-radio-button> | ||
<hc-radio-button value="SAM">Subject Area Mart</hc-radio-button> | ||
<hc-radio-button value="Other">Other</hc-radio-button> | ||
</hc-radio-group> | ||
<hc-error>Specified data source does not match description</hc-error> | ||
</hc-form-field> | ||
|
||
<div class="form-sample"> | ||
<hc-form-field inline="true"> | ||
<hc-label>Run Frequency:</hc-label> | ||
<hc-select placeholder="Select frequency:" [formControl]="selectControl"> | ||
<option value="daily">Daily</option> | ||
<option value="weekly">Weekly</option> | ||
<option value="monthly">Monthly</option> | ||
</hc-select> | ||
<hc-error>Please select the run frequency for this item</hc-error> | ||
</hc-form-field> | ||
</div> | ||
|
||
<div class="form-sample flex-column"> | ||
<hc-form-field> | ||
<hc-label>Requested Notifications:</hc-label> | ||
<hc-checkbox [formControl]="checkControl">On failure</hc-checkbox> | ||
<hc-checkbox [formControl]="checkControl">On sucess</hc-checkbox> | ||
<hc-checkbox [formControl]="checkControl">On row-count mismatch</hc-checkbox> | ||
<hc-checkbox [formControl]="checkControl">On dependency-wait timeout</hc-checkbox> | ||
<hc-error>At least one notification must be selected</hc-error> | ||
</hc-form-field> | ||
</div> | ||
</form> |
8 changes: 8 additions & 0 deletions
8
projects/cashmere-examples/src/lib/form-field-tight/form-field-tight-example.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,8 @@ | ||
.form-sample { | ||
max-width: 350px; | ||
width: 100%; | ||
} | ||
|
||
.flex-column { | ||
flex-direction: column; | ||
} |
17 changes: 17 additions & 0 deletions
17
projects/cashmere-examples/src/lib/form-field-tight/form-field-tight-example.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,17 @@ | ||
import {Component} from '@angular/core'; | ||
import {FormControl} from '@angular/forms'; | ||
|
||
/** | ||
* @title Tight Form Field Elements | ||
*/ | ||
@Component({ | ||
selector: 'hc-form-field-tight-example', | ||
templateUrl: 'form-field-tight-example.component.html', | ||
styleUrls: ['form-field-tight-example.component.scss'] | ||
}) | ||
export class FormFieldTightExampleComponent { | ||
selectControl = new FormControl('daily'); | ||
inputControl = new FormControl(''); | ||
radioControl = new FormControl('SM'); | ||
checkControl = new FormControl(''); | ||
} |
8 changes: 6 additions & 2 deletions
8
projects/cashmere-examples/src/lib/input-suffix/input-suffix-example.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
4 changes: 4 additions & 0 deletions
4
...ects/cashmere-examples/src/lib/modal-overview/modal-overview-example-modal.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
4 changes: 2 additions & 2 deletions
4
...ts/cashmere-examples/src/lib/radio-button-forms/radio-button-forms-example.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
4 changes: 2 additions & 2 deletions
4
...ects/cashmere-examples/src/lib/select-validation/select-validation-example.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
32 changes: 32 additions & 0 deletions
32
projects/cashmere-examples/src/lib/stepper-overview/stepper-overview-example.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,32 @@ | ||
<div class="stepper-options"> | ||
<hc-form-field> | ||
<hc-label>Stepper Type:</hc-label> | ||
<hc-select [(ngModel)]="currentType"> | ||
<option *ngFor="let type of typeOptions" [value]="type">{{type}}</option> | ||
</hc-select> | ||
</hc-form-field> | ||
|
||
<hc-form-field> | ||
<hc-label>Stepper Color:</hc-label> | ||
<hc-select [(ngModel)]="currentColor"> | ||
<option *ngFor="let color of colorOptions" [value]="color">{{color}}</option> | ||
</hc-select> | ||
</hc-form-field> | ||
|
||
<hc-form-field> | ||
<hc-label>Step Count (Isolated type only):</hc-label> | ||
<hc-checkbox [(ngModel)]="showSteps">Show Step Count</hc-checkbox> | ||
</hc-form-field> | ||
</div> | ||
|
||
<hc-stepper | ||
[color]="currentColor" | ||
[type]="currentType" | ||
[showStepCount]="showSteps" | ||
[steps]="progressSteps" | ||
useRouterOutlet="false" | ||
[(activeIndex)]="currentStep" | ||
#stepperElement> | ||
</hc-stepper> | ||
|
||
<p>Current Step Index: <strong>{{currentStep}}</strong></p> |
10 changes: 10 additions & 0 deletions
10
projects/cashmere-examples/src/lib/stepper-overview/stepper-overview-example.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,10 @@ | ||
.stepper-options { | ||
display: flex; | ||
margin-bottom: 20px; | ||
|
||
hc-form-field { | ||
flex: 1; | ||
max-width: 250px; | ||
margin-right: 25px; | ||
} | ||
} |
32 changes: 32 additions & 0 deletions
32
projects/cashmere-examples/src/lib/stepper-overview/stepper-overview-example.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,32 @@ | ||
import {Component, OnInit} from '@angular/core'; | ||
import {StepInterface} from '@healthcatalyst/cashmere'; | ||
|
||
/** | ||
* @title Stepper overview | ||
*/ | ||
@Component({ | ||
selector: 'hc-stepper-overview-example', | ||
templateUrl: 'stepper-overview-example.component.html', | ||
styleUrls: ['stepper-overview-example.component.scss'] | ||
}) | ||
export class StepperOverviewExampleComponent implements OnInit { | ||
progressSteps: StepInterface[]; | ||
currentColor: string = 'green'; | ||
colorOptions: string[] = ['green', 'blue', 'purple', 'orange', 'red']; | ||
currentType: string = 'arrow'; | ||
typeOptions: string[] = ['arrow', 'isolated']; | ||
showSteps: boolean = true; | ||
currentStep: number = 2; | ||
|
||
ngOnInit() { | ||
// To use with a router, add a `routerLink` to each step | ||
this.progressSteps = [ | ||
{label: 'Winter', iconSet: 'fa', icon: 'fa-check'}, | ||
{label: 'January', iconSet: 'fa', icon: 'fa-check'}, | ||
{label: 'Spring'}, | ||
{label: 'Summer'}, | ||
{label: 'Fall', iconSet: 'fa', icon: 'fa-lock', disabled: true}, | ||
{label: 'Year Round', iconSet: 'fa', icon: 'fa-lock', disabled: true} | ||
]; | ||
} | ||
} |
4 changes: 3 additions & 1 deletion
4
projects/cashmere-examples/src/lib/table-sort/table-sort-example.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
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 |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
.tab-demo { | ||
border: 1px solid #e0e0e0; | ||
margin-bottom: 15px; | ||
} | ||
|
||
.tab-bar-content { | ||
|
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
Oops, something went wrong.