-
Notifications
You must be signed in to change notification settings - Fork 471
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: taiga-family-bot <[email protected]>
- Loading branch information
1 parent
fef96a9
commit 1b732e8
Showing
14 changed files
with
129 additions
and
10 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
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 |
---|---|---|
|
@@ -146,3 +146,11 @@ | |
} | ||
} | ||
} | ||
|
||
.text-truncate() { | ||
.text-overflow(); | ||
|
||
flex: 1; | ||
min-inline-size: 0; | ||
max-inline-size: max-content; | ||
} |
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.
Empty file.
41 changes: 41 additions & 0 deletions
41
projects/demo/src/modules/components/breadcrumbs/examples/3/index.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,41 @@ | ||
<h3>Truncate</h3> | ||
<tui-breadcrumbs> | ||
<ng-container *ngFor="let item of items"> | ||
<button | ||
*tuiItem | ||
tuiHintOverflow | ||
tuiLink | ||
type="button" | ||
class="link" | ||
> | ||
{{ item }} | ||
</button> | ||
</ng-container> | ||
</tui-breadcrumbs> | ||
<h3>Fade</h3> | ||
<tui-breadcrumbs> | ||
<ng-container *ngFor="let item of items"> | ||
<button | ||
*tuiItem | ||
tuiFade | ||
tuiHintOverflow | ||
tuiLink | ||
type="button" | ||
class="link" | ||
> | ||
{{ item }} | ||
</button> | ||
</ng-container> | ||
</tui-breadcrumbs> | ||
<h3>Scroll</h3> | ||
<tui-breadcrumbs tuiFade> | ||
<ng-container *ngFor="let item of items"> | ||
<button | ||
*tuiItem | ||
tuiLink | ||
type="button" | ||
> | ||
{{ item }} | ||
</button> | ||
</ng-container> | ||
</tui-breadcrumbs> |
15 changes: 15 additions & 0 deletions
15
projects/demo/src/modules/components/breadcrumbs/examples/3/index.less
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 '@taiga-ui/core/styles/taiga-ui-local'; | ||
|
||
:host { | ||
display: block; | ||
max-inline-size: 30rem; | ||
} | ||
|
||
[tuiLink]:last-child { | ||
font-weight: bold; | ||
color: var(--tui-text-primary); | ||
} | ||
|
||
.link { | ||
.text-truncate(); | ||
} |
25 changes: 25 additions & 0 deletions
25
projects/demo/src/modules/components/breadcrumbs/examples/3/index.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,25 @@ | ||
import {NgForOf} from '@angular/common'; | ||
import {Component} from '@angular/core'; | ||
import {changeDetection} from '@demo/emulate/change-detection'; | ||
import {encapsulation} from '@demo/emulate/encapsulation'; | ||
import {TuiItem} from '@taiga-ui/cdk'; | ||
import {TuiHint, TuiLink} from '@taiga-ui/core'; | ||
import {TuiBreadcrumbs, tuiBreadcrumbsOptionsProvider, TuiFade} from '@taiga-ui/kit'; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [NgForOf, TuiBreadcrumbs, TuiFade, TuiHint, TuiItem, TuiLink], | ||
templateUrl: './index.html', | ||
styleUrls: ['./index.less'], | ||
encapsulation, | ||
changeDetection, | ||
providers: [tuiBreadcrumbsOptionsProvider({icon: '/'})], | ||
}) | ||
export default class Example { | ||
protected readonly items = [ | ||
'Short item', | ||
'Very very long item that must overflow', | ||
'Another item', | ||
'One more super long item that is never gonna fit', | ||
]; | ||
} |
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
13 changes: 8 additions & 5 deletions
13
projects/kit/components/breadcrumbs/breadcrumbs.template.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,9 +1,12 @@ | ||
<ng-container *ngIf="items.changes | async" /> | ||
<ng-container *ngFor="let item of items; let last = last"> | ||
<ng-container [ngTemplateOutlet]="item" /> | ||
<tui-icon | ||
*ngIf="!last" | ||
class="t-icon" | ||
[icon]="options.icon" | ||
/> | ||
<ng-container *ngIf="!last"> | ||
<tui-icon | ||
*ngIf="options.icon.length > 1; else char" | ||
class="t-icon" | ||
[icon]="options.icon" | ||
/> | ||
<ng-template #char> {{ options.icon }} </ng-template> | ||
</ng-container> | ||
</ng-container> |
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