-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(stark-ui): added white theme and full width for dropdown component
- Loading branch information
Showing
21 changed files
with
149 additions
and
41 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
28 changes: 28 additions & 0 deletions
28
packages/stark-ui/src/modules/dropdown/components/_dropdown-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,28 @@ | ||
@mixin stark-dropdown-color($color) { | ||
.mat-form-field-label { | ||
color: rgba($color: $color, $alpha: 0.87); | ||
} | ||
|
||
// arrow color change | ||
.mat-select-arrow, | ||
.mat-form-field.mat-focused .mat-select-arrow { | ||
color: rgba($color: $color, $alpha: 0.87); | ||
} | ||
|
||
// arrow color change | ||
.mat-select-value { | ||
color: rgba($color: $color, $alpha: 0.87); | ||
} | ||
|
||
// underline color change (normal and focus) | ||
.mat-form-field-underline, | ||
.mat-form-field.mat-focused .mat-form-field-ripple { | ||
background-color: rgba($color: $color, $alpha: 0.87); | ||
} | ||
} | ||
|
||
.stark-dropdown { | ||
&[color="white"] { | ||
@include stark-dropdown-color(map-get(map-get($dropdown-theme, white-transp), color)); | ||
} | ||
} |
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
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,7 @@ | ||
.dark .example-viewer-body { | ||
background: #333; | ||
} | ||
|
||
.result-display { | ||
color: #fff; | ||
} |
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
Empty file.
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 @@ | ||
export * from "./dropdown.component"; | ||
export * from "./demo-dropdown.component"; |
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,3 @@ | ||
.result-display { | ||
color: #fff; | ||
} |
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 @@ | ||
<stark-dropdown | ||
class="stark-full-width" | ||
color="white" | ||
dropdownId="serviceWhiteDropdown" | ||
[options]="serviceDropdownOptions" | ||
[value]="selectedServiceWhiteDropdown" | ||
placeholder="SHOWCASE.DEMO.DROPDOWNS.SELECT_SERVICE" | ||
optionIdProperty="id" | ||
optionLabelProperty="value" | ||
(dropdownSelectionChanged)="whiteDropdownOnChange($event)" | ||
required> | ||
</stark-dropdown> | ||
<div class="result-display" *ngIf="selectedServiceWhiteDropdown"> {{ 'SHOWCASE.DEMO.DROPDOWNS.SELECTED_VALUE' | translate }}: {{ selectedServiceWhiteDropdown }}</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { Component, OnInit } from "@angular/core"; | ||
|
||
@Component({ | ||
selector: "showcase-demo-dropdown", | ||
styleUrls: ["./white.scss"], | ||
templateUrl: "./white.html" | ||
}) | ||
export class WhiteDropdownComponent implements OnInit { | ||
public selectedServiceWhiteDropdown: string; | ||
|
||
public serviceDropdownOptions: any[]; | ||
/** | ||
* Component lifecycle hook | ||
*/ | ||
public ngOnInit(): void { | ||
this.serviceDropdownOptions = [ | ||
{ id: "PR", value: "IT application" }, | ||
{ id: "IO", value: "Informatics infrastructure and operations" }, | ||
{ id: "CS", value: "IT customer services" } | ||
]; | ||
} | ||
|
||
public whiteDropdownOnChange(selectedValue: string): void { | ||
this.selectedServiceWhiteDropdown = selectedValue; | ||
} | ||
} |
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