Skip to content

Commit 28789ec

Browse files
committed
moved component module changes from the Pro repo
1 parent 9ee6ea6 commit 28789ec

8 files changed

Lines changed: 18 additions & 8 deletions

File tree

modules/components/src/components/skeuomorph-slider/skeuomorph-slider.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export class SkeuomorphSliderComponent implements OnInit, OnDestroy {
115115
const changeDelta = -event.deltaY
116116
const diff = changeDelta < 0 ? -changeDelta : changeDelta
117117
if (diff < 2) return
118-
this.value += changeDelta / 100
118+
this.value += changeDelta * ((this.max - this.min) / 1000)
119119
this.userChangedValue.emit({ value: this.value })
120120
}
121121
}

modules/components/src/components/toggle/toggle.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="container {{enabled ? 'enabled' : ''}}" (click)="toggleState()">
1+
<div class="container" [class.enabled]="enabled" [class.highlighted]="highlighted" (click)="toggleState()">
22
<div class="indicator left"></div>
33
<div class="indicator right"></div>
44
<div [class]="'switch ' + (state ? 'on' : 'off')"></div>

modules/components/src/components/toggle/toggle.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,8 @@
6464

6565
.enabled {
6666
filter: none;
67+
}
68+
69+
.highlighted {
70+
box-shadow: 0 0 0 2px $accent;
6771
}

modules/components/src/components/toggle/toggle.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export class ToggleComponent implements OnInit {
1111
@Output() stateChange = new EventEmitter()
1212
@Input() enabled = true
1313
@Input() interactive = true
14+
@Input() highlighted = false
1415

1516
ngOnInit () {
1617
}

modules/components/src/components/tooltip/tooltip-container.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ import { FadeInOutAnimation } from '../../animations/fade-in-out'
1515
</eqm-tooltip>
1616
</div>
1717
`,
18-
animations: [ FadeInOutAnimation ],
19-
changeDetection: ChangeDetectionStrategy.OnPush
18+
animations: [ FadeInOutAnimation ]
2019
})
2120
export class TooltipContainerComponent {
2221
constructor (public tooltipService: TooltipService) {}

modules/components/src/components/tooltip/tooltip.component.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11

2+
:host {
3+
z-index: 9999;
4+
}
5+
26
.container {
37
display: block;
48
position: absolute;

modules/components/src/components/tooltip/tooltip.component.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ export type TooltipPositionSide = 'top' | 'bottom' | 'left' | 'right'
1313
@Component({
1414
selector: 'eqm-tooltip',
1515
templateUrl: './tooltip.component.html',
16-
styleUrls: [ './tooltip.component.scss' ],
17-
changeDetection: ChangeDetectionStrategy.OnPush
16+
styleUrls: [ './tooltip.component.scss' ]
1817
})
1918
export class TooltipComponent implements OnInit {
2019
@Input() text?: string

modules/components/src/components/tooltip/tooltip.directive.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Directive, OnDestroy, Input, HostListener, ElementRef } from '@angular/core'
1+
import { Directive, OnDestroy, Input, HostListener, ElementRef, ChangeDetectorRef } from '@angular/core'
22
import { TooltipService } from './tooltip.service'
33
import { TooltipPositionSide } from './tooltip.component'
44

@@ -12,7 +12,10 @@ export class TooltipDirective implements OnDestroy {
1212
@Input() eqmTooltipShowArrow: boolean = true
1313
public id?: string
1414
public left?: boolean
15-
constructor (public tooltipService: TooltipService, public element: ElementRef) { }
15+
constructor (
16+
public tooltipService: TooltipService,
17+
public element: ElementRef
18+
) { }
1619

1720
@HostListener('mouseenter')
1821
onMouseEnter (): void {

0 commit comments

Comments
 (0)