-
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 #2095 from HealthCatalyst/dev
Cashmere 14.1.0
- Loading branch information
Showing
10 changed files
with
84 additions
and
24 deletions.
There are no files selected for viewing
9 changes: 0 additions & 9 deletions
9
projects/cashmere-examples/src/lib/select-disabled/select-disabled-example.component.html
This file was deleted.
Oops, something went wrong.
11 changes: 0 additions & 11 deletions
11
projects/cashmere-examples/src/lib/select-disabled/select-disabled-example.component.ts
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
...ts/cashmere-examples/src/lib/select-placeholder/select-placeholder-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,25 @@ | ||
<div class="select-sample"> | ||
<hc-form-field inline> | ||
<hc-label>Select your facility:</hc-label> | ||
<hc-select placeholder="Select a city" [placeholderValue]="phVal" [formControl]="selectVal"> | ||
<option value="1">Philadelphia</option> | ||
<option value="2">Atlanta</option> | ||
</hc-select> | ||
</hc-form-field> | ||
<button hc-button (click)="reset()">Reset to Empty String</button> | ||
</div> | ||
|
||
<em> | ||
The placeholder option will default to a value of <code>""</code>. | ||
But if you can set it another value as needed. | ||
Note that changing the placeholder value below deselects the placeholder. | ||
</em> | ||
|
||
<hc-form-field inline> | ||
<hc-label>Placeholder value:</hc-label> | ||
<hc-radio-group (change)="updatePlaceholderVal($event)" [inline]="true"> | ||
<hc-radio-button value="1" [checked]="true">Empty String</hc-radio-button> | ||
<hc-radio-button value="2">Null</hc-radio-button> | ||
<hc-radio-button value="3">Undefined</hc-radio-button> | ||
</hc-radio-group> | ||
</hc-form-field> |
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 |
---|---|---|
|
@@ -2,3 +2,7 @@ | |
max-width: 350px; | ||
width: 100%; | ||
} | ||
|
||
button { | ||
margin: 10px 0 20px; | ||
} |
30 changes: 30 additions & 0 deletions
30
...ects/cashmere-examples/src/lib/select-placeholder/select-placeholder-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,30 @@ | ||
import { Component } from '@angular/core'; | ||
import { FormControl } from '@angular/forms'; | ||
import { RadioButtonChangeEvent } from '@healthcatalyst/cashmere'; | ||
|
||
/** | ||
* @title Select Component Placeholder | ||
*/ | ||
@Component({ | ||
selector: 'hc-select-placeholder-example', | ||
templateUrl: 'select-placeholder-example.component.html', | ||
styleUrls: ['select-placeholder-example.component.scss'] | ||
}) | ||
export class SelectPlaceholderExampleComponent { | ||
phVal: any = ""; | ||
selectVal = new FormControl(""); | ||
|
||
reset(): void { | ||
this.selectVal.setValue(""); | ||
} | ||
|
||
updatePlaceholderVal( selected: RadioButtonChangeEvent ): void { | ||
if ( selected.value === "1" ) { | ||
this.phVal = ""; | ||
} else if ( selected.value === "2" ) { | ||
this.phVal = null; | ||
} else { | ||
this.phVal = undefined; | ||
} | ||
} | ||
} |
4 changes: 3 additions & 1 deletion
4
projects/cashmere-examples/src/lib/tooltip-overview/tooltip-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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
This is an example of a bottom-aligned | ||
<u hcTooltip="I'm a tooltip" verticalAlign="below">tooltip in action</u>. | ||
<br><br> | ||
And this is a <u [hcTooltip]="veryLongString" maxWidth="400px">very large tooltip</u> with a constrained width. | ||
This is a <u [hcTooltip]="veryLongString" maxWidth="400px">very large tooltip</u> with a constrained width. | ||
<br><br> | ||
And this is a <u hcTooltip="">tooltip with an empty string</u> which means it won't be displayed. | ||
<br><br> |
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