-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core):
Hint
support 12 directions
- Loading branch information
Showing
104 changed files
with
857 additions
and
1,401 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,3 @@ | |
box-shadow: 0 0 0 2px var(--tui-focus); | ||
} | ||
} | ||
|
||
.t-text { | ||
white-space: pre-wrap; | ||
} |
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 |
---|---|---|
|
@@ -77,10 +77,6 @@ | |
} | ||
} | ||
|
||
.t-text { | ||
white-space: pre-wrap; | ||
} | ||
|
||
.t-hint { | ||
.shadow(); | ||
position: absolute; | ||
|
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 |
---|---|---|
|
@@ -54,7 +54,3 @@ | |
.t-placeholder { | ||
fill: var(--tui-base-03); | ||
} | ||
|
||
.t-text { | ||
white-space: pre-wrap; | ||
} |
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,20 @@ | ||
import {Directive, Inject, Self} from '@angular/core'; | ||
import {TuiDestroyService} from '@taiga-ui/cdk'; | ||
import {Observable} from 'rxjs'; | ||
import {distinctUntilChanged, takeUntil} from 'rxjs/operators'; | ||
|
||
import {TuiDriver} from './driver'; | ||
import {TuiVehicle} from './vehicle'; | ||
|
||
@Directive() | ||
export class AbstractTuiDriverDirective { | ||
constructor( | ||
@Self() @Inject(TuiDestroyService) destroy$: Observable<unknown>, | ||
@Inject(TuiDriver) driver$: Observable<boolean>, | ||
@Inject(TuiVehicle) vehicle: TuiVehicle, | ||
) { | ||
driver$.pipe(distinctUntilChanged(), takeUntil(destroy$)).subscribe(value => { | ||
vehicle.toggle(value); | ||
}); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 {ExistingProvider, Type} from '@angular/core'; | ||
import {Observable} from 'rxjs'; | ||
|
||
export abstract class TuiDriver extends Observable<boolean> {} | ||
|
||
export function tuiAsDriver(useExisting: Type<TuiDriver>): ExistingProvider { | ||
return { | ||
provide: TuiDriver, | ||
useExisting, | ||
}; | ||
} |
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,4 +1,7 @@ | ||
export * from './abstract-driver.directive'; | ||
export * from './abstract-dropdown'; | ||
export * from './abstract-hint'; | ||
export * from './abstract-hint-options'; | ||
export * from './abstract-textfield-host'; | ||
export * from './driver'; | ||
export * from './position-accessor'; | ||
export * from './rect-accessor'; | ||
export * from './vehicle'; |
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,15 @@ | ||
import {ExistingProvider, Type} from '@angular/core'; | ||
import {TuiPoint} from '@taiga-ui/core/types'; | ||
|
||
export abstract class TuiPositionAccessor { | ||
abstract getPosition(rect: ClientRect): TuiPoint; | ||
} | ||
|
||
export function tuiAsPositionAccessor( | ||
useExisting: Type<TuiPositionAccessor>, | ||
): ExistingProvider { | ||
return { | ||
provide: TuiPositionAccessor, | ||
useExisting, | ||
}; | ||
} |
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,12 @@ | ||
import {ExistingProvider, Type} from '@angular/core'; | ||
|
||
export abstract class TuiRectAccessor { | ||
abstract getClientRect(): ClientRect; | ||
} | ||
|
||
export function tuiAsRectAccessor(useExisting: Type<TuiRectAccessor>): ExistingProvider { | ||
return { | ||
provide: TuiRectAccessor, | ||
useExisting, | ||
}; | ||
} |
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,12 @@ | ||
import {ExistingProvider, Type} from '@angular/core'; | ||
|
||
export abstract class TuiVehicle { | ||
abstract toggle(value: boolean): void; | ||
} | ||
|
||
export function tuiAsVehicle(useExisting: Type<TuiVehicle>): ExistingProvider { | ||
return { | ||
provide: TuiVehicle, | ||
useExisting, | ||
}; | ||
} |
Oops, something went wrong.