-
Notifications
You must be signed in to change notification settings - Fork 477
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(experimental):
Header
add new component
- Loading branch information
1 parent
4b0fd0c
commit 5f2470b
Showing
26 changed files
with
634 additions
and
15 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
108 changes: 108 additions & 0 deletions
108
projects/demo/src/modules/experimental/header/examples/1/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,108 @@ | ||
<div tuiHeader="xxl"> | ||
<h1 tuiTitle> | ||
Title | ||
<div tuiSubtitle>Subtitle</div> | ||
</h1> | ||
|
||
<div tuiAccessories> | ||
<tui-badge-notification size="m">1</tui-badge-notification> | ||
<button | ||
size="l" | ||
tuiButton | ||
> | ||
Button | ||
</button> | ||
</div> | ||
</div> | ||
|
||
<div tuiHeader="xl"> | ||
<h2 tuiTitle> | ||
Title | ||
<div tuiSubtitle>Subtitle</div> | ||
</h2> | ||
|
||
<div tuiAccessories> | ||
<tui-badge-notification size="m">1</tui-badge-notification> | ||
<button | ||
size="m" | ||
tuiButton | ||
> | ||
Button | ||
</button> | ||
</div> | ||
</div> | ||
|
||
<div tuiHeader="l"> | ||
<h3 tuiTitle> | ||
Title | ||
<div tuiSubtitle>Subtitle</div> | ||
</h3> | ||
|
||
<div tuiAccessories> | ||
<tui-badge-notification size="m">1</tui-badge-notification> | ||
<button | ||
size="m" | ||
tuiButton | ||
> | ||
Button | ||
</button> | ||
</div> | ||
</div> | ||
|
||
<div tuiHeader="m"> | ||
<h4 tuiTitle> | ||
Title | ||
<div tuiSubtitle>Subtitle</div> | ||
</h4> | ||
|
||
<div tuiAccessories> | ||
<tui-badge-notification size="m">1</tui-badge-notification> | ||
<button tuiButton>Button</button> | ||
</div> | ||
</div> | ||
|
||
<div tuiHeader="s"> | ||
<h5 tuiTitle> | ||
Title | ||
<div tuiSubtitle>Subtitle</div> | ||
</h5> | ||
|
||
<div tuiAccessories> | ||
<tui-badge-notification size="m">1</tui-badge-notification> | ||
<button tuiButton>Button</button> | ||
</div> | ||
</div> | ||
|
||
<div tuiHeader="xs"> | ||
<h6 tuiTitle> | ||
Title | ||
<div tuiSubtitle>Subtitle</div> | ||
</h6> | ||
|
||
<div tuiAccessories> | ||
<tui-badge-notification size="s">1</tui-badge-notification> | ||
<button | ||
size="xs" | ||
tuiButton | ||
> | ||
Button | ||
</button> | ||
</div> | ||
</div> | ||
|
||
<div tuiHeader="xxs"> | ||
<span tuiTitle> | ||
Title | ||
<div tuiSubtitle>Subtitle</div> | ||
</span> | ||
|
||
<div tuiAccessories> | ||
<tui-badge-notification size="s">1</tui-badge-notification> | ||
<button | ||
size="xs" | ||
tuiButton | ||
> | ||
Button | ||
</button> | ||
</div> | ||
</div> |
5 changes: 5 additions & 0 deletions
5
projects/demo/src/modules/experimental/header/examples/1/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,5 @@ | ||
:host { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 2rem; | ||
} |
12 changes: 12 additions & 0 deletions
12
projects/demo/src/modules/experimental/header/examples/1/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,12 @@ | ||
import {Component} from '@angular/core'; | ||
import {changeDetection} from '@demo/emulate/change-detection'; | ||
import {encapsulation} from '@demo/emulate/encapsulation'; | ||
|
||
@Component({ | ||
selector: 'tui-header-example-1', | ||
templateUrl: './index.html', | ||
styleUrls: ['./index.less'], | ||
encapsulation, | ||
changeDetection, | ||
}) | ||
export class TuiHeaderExample1 {} |
62 changes: 62 additions & 0 deletions
62
projects/demo/src/modules/experimental/header/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 |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<div> | ||
<div tuiHeader> | ||
<h5 tuiTitle> | ||
<div tuiCaption>Opensource</div> | ||
Taiga UI | ||
<div tuiSubtitle>Component library</div> | ||
</h5> | ||
|
||
<div tuiAccessories> | ||
<tui-badge-notification size="m">1</tui-badge-notification> | ||
<tui-tooltip content="Angular kit"></tui-tooltip> | ||
<tui-avatar | ||
appearance="accent" | ||
src="tuiIconStar" | ||
></tui-avatar> | ||
</div> | ||
</div> | ||
<p class="description"> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium ad aliquam asperiores atque autem | ||
consequatur cumque cupiditate delectus doloremque doloribus ea earum eius eos error esse est eum eveniet | ||
</p> | ||
</div> | ||
|
||
<div> | ||
<div tuiHeader> | ||
<div tuiTitle> | ||
Maskito | ||
<div tuiSubtitle> | ||
Awesome | ||
<span [tuiSensitive]="true">one</span> | ||
</div> | ||
</div> | ||
|
||
<div tuiAccessories> | ||
<tui-badge-notification size="m">1</tui-badge-notification> | ||
<tui-tooltip content="Mask it"></tui-tooltip> | ||
<a | ||
href="https://maskito.dev/" | ||
rel="noreferrer" | ||
target="_blank" | ||
tuiButton | ||
> | ||
Support | ||
</a> | ||
</div> | ||
</div> | ||
<p class="description"> | ||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Accusantium ad aliquam asperiores atque autem | ||
consequatur cumque cupiditate delectus doloremque doloribus ea earum eius eos error esse est eum eveniet | ||
</p> | ||
</div> | ||
|
||
<div tuiHeader> | ||
<div tuiTitle> | ||
Polymorpheus | ||
<div tuiSubtitle>The power of dreams</div> | ||
</div> | ||
|
||
<div tuiAccessories> | ||
<tui-badge>Free tier</tui-badge> | ||
</div> | ||
</div> |
11 changes: 11 additions & 0 deletions
11
projects/demo/src/modules/experimental/header/examples/2/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,11 @@ | ||
:host { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 3rem; | ||
} | ||
|
||
.description { | ||
font: var(--tui-font-text-l); | ||
margin-top: 0.5rem; | ||
max-width: 30rem; | ||
} |
12 changes: 12 additions & 0 deletions
12
projects/demo/src/modules/experimental/header/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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import {Component} from '@angular/core'; | ||
import {changeDetection} from '@demo/emulate/change-detection'; | ||
import {encapsulation} from '@demo/emulate/encapsulation'; | ||
|
||
@Component({ | ||
selector: 'tui-header-example-2', | ||
templateUrl: './index.html', | ||
styleUrls: ['./index.less'], | ||
encapsulation, | ||
changeDetection, | ||
}) | ||
export class TuiHeaderExample2 {} |
10 changes: 10 additions & 0 deletions
10
projects/demo/src/modules/experimental/header/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,10 @@ | ||
<div tuiHeader="m"> | ||
<div tuiTitle> | ||
<span class="interactive-title"> | ||
Title | ||
<tui-icon icon="tuiIconChevronRight"></tui-icon> | ||
</span> | ||
|
||
<div tuiSubtitle>Subtitle</div> | ||
</div> | ||
</div> |
19 changes: 19 additions & 0 deletions
19
projects/demo/src/modules/experimental/header/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,19 @@ | ||
@import '@taiga-ui/core/styles/taiga-ui-local'; | ||
|
||
.interactive-title { | ||
.transition(color); | ||
|
||
cursor: pointer; | ||
|
||
& > tui-icon { | ||
.transition(transform); | ||
} | ||
} | ||
|
||
.interactive-title:hover { | ||
color: var(--tui-link); | ||
|
||
& > tui-icon { | ||
transform: translate(0.25rem); | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
projects/demo/src/modules/experimental/header/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,12 @@ | ||
import {Component} from '@angular/core'; | ||
import {changeDetection} from '@demo/emulate/change-detection'; | ||
import {encapsulation} from '@demo/emulate/encapsulation'; | ||
|
||
@Component({ | ||
selector: 'tui-header-example-3', | ||
templateUrl: './index.html', | ||
styleUrls: ['./index.less'], | ||
encapsulation, | ||
changeDetection, | ||
}) | ||
export class TuiHeaderExample3 {} |
13 changes: 13 additions & 0 deletions
13
projects/demo/src/modules/experimental/header/examples/import/import-module.md
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,13 @@ | ||
```ts | ||
import {NgModule} from '@angular/core'; | ||
import {TuiHeaderModule} from '@taiga-ui/experimental'; | ||
// ... | ||
|
||
@NgModule({ | ||
imports: [ | ||
// ... | ||
TuiHeaderModule, | ||
], | ||
}) | ||
export class MyModule {} | ||
``` |
10 changes: 10 additions & 0 deletions
10
projects/demo/src/modules/experimental/header/examples/import/insert-template.md
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,10 @@ | ||
```html | ||
<div tuiHeader> | ||
<div tuiTitle> | ||
Title | ||
<div tuiSubtitle>Subtitle</div> | ||
</div> | ||
|
||
<div tuiAccessories>Accessories</div> | ||
</div> | ||
``` |
38 changes: 38 additions & 0 deletions
38
projects/demo/src/modules/experimental/header/header.component.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,38 @@ | ||
import {Component, ViewEncapsulation} from '@angular/core'; | ||
import {changeDetection} from '@demo/emulate/change-detection'; | ||
import { | ||
TuiDocExample, | ||
tuiDocExampleOptionsProvider, | ||
TuiRawLoaderContent, | ||
} from '@taiga-ui/addon-doc'; | ||
|
||
@Component({ | ||
selector: 'example-header', | ||
templateUrl: './header.template.html', | ||
styleUrls: ['./header.styles.less'], | ||
encapsulation: ViewEncapsulation.None, | ||
changeDetection, | ||
providers: [tuiDocExampleOptionsProvider({fullsize: true})], | ||
}) | ||
export class ExampleTuiCellComponent { | ||
readonly exampleModule: TuiRawLoaderContent = import( | ||
'./examples/import/import-module.md?raw' | ||
); | ||
|
||
readonly exampleHtml: TuiRawLoaderContent = import( | ||
'./examples/import/insert-template.md?raw' | ||
); | ||
|
||
readonly example1: TuiDocExample = { | ||
HTML: import('./examples/1/index.html?raw'), | ||
}; | ||
|
||
readonly example2: TuiDocExample = { | ||
HTML: import('./examples/2/index.html?raw'), | ||
}; | ||
|
||
readonly example3: TuiDocExample = { | ||
HTML: import('./examples/3/index.html?raw'), | ||
LESS: import('./examples/3/index.less?raw'), | ||
}; | ||
} |
Oops, something went wrong.