This file contains hidden or 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
{ | |
"data": [ | |
{ "article": "1", "colorCode": "Windstorm", "materialCode": "23" } | |
] | |
} |
This file contains hidden or 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
import { Directive, ElementRef, HostListener } from '@angular/core'; | |
@Directive({ | |
selector: '[appAsFileDrop]' | |
}) | |
export class AsFileDropDirective { | |
private element: HTMLElement; | |
constructor(private elementRef: ElementRef) { | |
this.element = elementRef.nativeElement; | |
} |
This file contains hidden or 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
import { Directive, ElementRef, Renderer2, HostListener } from '@angular/core'; | |
@Directive({ | |
selector: '[appAsFileDrop]' | |
}) | |
export class AsFileDropDirective { | |
private element: HTMLElement; | |
constructor(private elementRef: ElementRef, private renderer: Renderer2) { | |
this.element = elementRef.nativeElement; | |
} |
This file contains hidden or 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
<button shButton>Simple</button> | |
<button shButton id='add-enabled' color="primary">Primary</button> | |
<button shButton color="accent">Accent</button> | |
<button shButton color="warn">Warn</button> | |
<button shButton id='add-disabled' color="primary" disabled="true">Disabled</button> | |
<button flatButton>Simple Flat</button> | |
<button flatButton color="primary">Primary Flat</button> | |
<button flatButton color="accent">Accent Flat</button> | |
<button flatButton color="warn">Warn Flat</button> |
This file contains hidden or 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
@Component({ | |
selector: 'uikit-checkbox', | |
exportAs: 'uiKitCheckbox', | |
changeDetection: ChangeDetectionStrategy.OnPush, | |
encapsulation: ViewEncapsulation.None, | |
template: ` | |
<span | |
class="checkbox" | |
[class.checkbox-checked]="checked" | |
> |
This file contains hidden or 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
export class CheckboxComponent implements OnInit , ControlValueAccessor, OnDestroy, AfterViewInit { | |
constructor(private cdr: ChangeDetectorRef) { } | |
checked = false; | |
disabled = false; | |
@Output() readonly сheckedChange = new EventEmitter<boolean>(); | |
onChange = (e) => {}; | |
onTouched = () => {}; | |
ngAfterViewInit(): void { | |
throw new Error('Method not implemented.'); |
This file contains hidden or 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
@Component({ | |
selector: 'uikit-checkbox', | |
exportAs: 'uiKitCheckbox', | |
changeDetection: ChangeDetectionStrategy.OnPush, | |
encapsulation: ViewEncapsulation.None, | |
template: ` | |
<span | |
class="checkbox" | |
[class.checkbox-checked]="checked" | |
> |
This file contains hidden or 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
.checkbox { | |
position: relative; | |
width: 16px; | |
height: 16px; | |
cursor: pointer; | |
} | |
.checkbox input { | |
margin: 0px; | |
background: none; |
This file contains hidden or 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
@import '../../core/theme/theming.scss'; | |
@mixin checkbox-color($theme) { | |
$primary: map-get($theme, primary); | |
$accent: map-get($theme, accent); | |
$warn: map-get($theme, warn); | |
$foreground: map-get($theme, foreground); | |
$color: get-color($primary); |
This file contains hidden or 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
@Component({ | |
selector: 'uikit-card', | |
exportAs: 'uiKitCard', | |
changeDetection: ChangeDetectionStrategy.OnPush, | |
encapsulation: ViewEncapsulation.None, | |
template: ` | |
<div class='ui-card'> | |
<div class='ui-card-title'> | |
<div class='ui-card-title-text'> |
OlderNewer