-
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 <taiga-family-bot@users.noreply.github.com>
- Loading branch information
1 parent
79e1e67
commit b20f6bf
Showing
41 changed files
with
327 additions
and
246 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,7 +177,7 @@ | |
|
||
.t-icon { | ||
cursor: pointer; | ||
border: 0.25rem solid transparent; | ||
border-width: 0.25rem; | ||
} | ||
|
||
.t-label { | ||
|
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 |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
margin: 1.25rem; | ||
|
||
::ng-deep tui-icon { | ||
border: 0.25rem solid transparent; | ||
border-width: 0.25rem; | ||
} | ||
} | ||
|
||
|
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 |
---|---|---|
|
@@ -156,5 +156,5 @@ | |
} | ||
|
||
.t-icon { | ||
border: 0.25rem solid transparent; | ||
border-width: 0.25rem; | ||
} |
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
132 changes: 95 additions & 37 deletions
132
projects/demo/src/modules/components/breadcrumbs/examples/2/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 |
---|---|---|
@@ -1,45 +1,103 @@ | ||
<tui-breadcrumbs [style.color]="'red'"> | ||
<button | ||
*tuiItem | ||
appearance="secondary" | ||
iconStart="@tui.ellipsis" | ||
size="xs" | ||
tuiDropdownOpen | ||
tuiIconButton | ||
type="button" | ||
[tuiDropdown]="content" | ||
> | ||
More | ||
</button> | ||
<ng-template #content> | ||
<tui-data-list> | ||
<h3 tuiTitle> | ||
<strong>Truncate</strong> | ||
<span tuiSubtitle> | ||
Using | ||
<code>.text-truncate()</code> | ||
mixin | ||
</span> | ||
</h3> | ||
<tui-breadcrumbs> | ||
<ng-container *ngFor="let item of items; let last = last"> | ||
<button | ||
*tuiItem | ||
tuiHintOverflow | ||
tuiLink | ||
type="button" | ||
class="link" | ||
[class.link_last]="last" | ||
> | ||
{{ item }} | ||
</button> | ||
</ng-container> | ||
</tui-breadcrumbs> | ||
<hr /> | ||
<h3 tuiTitle> | ||
<strong>Fade</strong> | ||
<span tuiSubtitle> | ||
Combining | ||
<code>.text-truncate()</code> | ||
mixin with | ||
<code> | ||
<a | ||
tuiLink | ||
[routerLink]="fade" | ||
> | ||
Fade | ||
</a> | ||
</code> | ||
directive | ||
</span> | ||
</h3> | ||
<tui-breadcrumbs> | ||
<ng-container *ngFor="let item of items; let last = last"> | ||
<button | ||
*tuiItem | ||
tuiFade | ||
tuiHintOverflow | ||
tuiLink | ||
type="button" | ||
class="link" | ||
[class.link_last]="last" | ||
> | ||
{{ item }} | ||
</button> | ||
</ng-container> | ||
</tui-breadcrumbs> | ||
<hr /> | ||
<h3 tuiTitle> | ||
<strong>Scroll</strong> | ||
<span tuiSubtitle> | ||
Putting | ||
<code> | ||
<a | ||
*tuiRepeatTimes="let index of items.length - max" | ||
tuiOption | ||
[href]="items[index]?.link" | ||
tuiLink | ||
[routerLink]="fade" | ||
> | ||
{{ items[index]?.caption }} | ||
Fade | ||
</a> | ||
</tui-data-list> | ||
</ng-template> | ||
<ng-container *tuiRepeatTimes="let index of max"> | ||
<a | ||
</code> | ||
directive on entire component | ||
</span> | ||
</h3> | ||
<tui-breadcrumbs tuiFade> | ||
<ng-container *ngFor="let item of items; let last = last"> | ||
<button | ||
*tuiItem | ||
tuiLink | ||
type="button" | ||
[class.link_last]="last" | ||
> | ||
{{ item }} | ||
</button> | ||
</ng-container> | ||
</tui-breadcrumbs> | ||
<hr /> | ||
<h3 tuiTitle> | ||
<strong>Collapse</strong> | ||
<span tuiSubtitle> | ||
Using | ||
<code>itemsLimit: number</code> | ||
</span> | ||
</h3> | ||
<tui-breadcrumbs [itemsLimit]="10"> | ||
<ng-container *ngFor="let item of items; let last = last"> | ||
<button | ||
*tuiItem | ||
appearance="link" | ||
tuiLink | ||
[href]="items[index + items.length - max]?.link" | ||
type="button" | ||
[class.link_last]="last" | ||
> | ||
{{ items[index + items.length - max]?.caption }} | ||
</a> | ||
{{ item }} | ||
</button> | ||
</ng-container> | ||
</tui-breadcrumbs> | ||
<p> | ||
<tui-input-number | ||
[max]="4" | ||
[min]="2" | ||
[step]="1" | ||
[(ngModel)]="max" | ||
> | ||
Max tabs | ||
</tui-input-number> | ||
</p> |
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
57 changes: 18 additions & 39 deletions
57
projects/demo/src/modules/components/breadcrumbs/examples/2/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 |
---|---|---|
@@ -1,58 +1,37 @@ | ||
import {NgForOf} from '@angular/common'; | ||
import {Component} from '@angular/core'; | ||
import {FormsModule} from '@angular/forms'; | ||
import {RouterLink} from '@angular/router'; | ||
import {changeDetection} from '@demo/emulate/change-detection'; | ||
import {encapsulation} from '@demo/emulate/encapsulation'; | ||
import {TuiItem, TuiRepeatTimes} from '@taiga-ui/cdk'; | ||
import {TuiButton, TuiDataList, TuiDropdown, TuiLink} from '@taiga-ui/core'; | ||
import {TuiBreadcrumbs, tuiBreadcrumbsOptionsProvider} from '@taiga-ui/kit'; | ||
import {TuiInputNumberModule} from '@taiga-ui/legacy'; | ||
import {DemoRoute} from '@demo/routes'; | ||
import {TuiItem} from '@taiga-ui/cdk'; | ||
import {TuiHint, TuiLink, TuiTitle} from '@taiga-ui/core'; | ||
import {TuiBreadcrumbs, tuiBreadcrumbsOptionsProvider, TuiFade} from '@taiga-ui/kit'; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [ | ||
FormsModule, | ||
NgForOf, | ||
RouterLink, | ||
TuiBreadcrumbs, | ||
TuiButton, | ||
TuiDataList, | ||
TuiDropdown, | ||
TuiInputNumberModule, | ||
TuiFade, | ||
TuiHint, | ||
TuiItem, | ||
TuiLink, | ||
TuiRepeatTimes, | ||
TuiTitle, | ||
], | ||
templateUrl: './index.html', | ||
styleUrls: ['./index.less'], | ||
encapsulation, | ||
changeDetection, | ||
providers: [ | ||
tuiBreadcrumbsOptionsProvider({ | ||
icon: '@tui.arrow-right', | ||
size: 'l', | ||
}), | ||
], | ||
providers: [tuiBreadcrumbsOptionsProvider({icon: '/'})], | ||
}) | ||
export default class Example { | ||
protected readonly fade = DemoRoute.Fade; | ||
protected readonly items = [ | ||
{ | ||
caption: 'Open Source', | ||
link: 'https://github.com', | ||
}, | ||
{ | ||
caption: 'Angular', | ||
link: 'https://github.com/topics/angular', | ||
}, | ||
{ | ||
caption: 'Taiga UI', | ||
link: 'https://github.com/taiga-family/taiga-ui', | ||
}, | ||
{ | ||
caption: 'Components', | ||
link: 'https://taiga-ui.dev', | ||
}, | ||
{ | ||
caption: 'Breadcrumbs', | ||
link: 'https://taiga-ui.dev/navigation/breadcrumbs', | ||
}, | ||
'First item', | ||
'Very very long second item that must overflow', | ||
'Third item', | ||
'One last super long item that is never gonna fit', | ||
]; | ||
|
||
protected max = 4; | ||
} |
41 changes: 0 additions & 41 deletions
41
projects/demo/src/modules/components/breadcrumbs/examples/3/index.html
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
projects/demo/src/modules/components/breadcrumbs/examples/3/index.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.