-
Notifications
You must be signed in to change notification settings - Fork 474
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
466 additions
and
0 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
7 changes: 7 additions & 0 deletions
7
projects/demo/src/modules/components/message/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,7 @@ | ||
<span tuiMessage>Incoming message</span> | ||
<span | ||
appearance="accent" | ||
tuiMessage | ||
> | ||
Outgoing message | ||
</span> |
4 changes: 4 additions & 0 deletions
4
projects/demo/src/modules/components/message/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,4 @@ | ||
:host { | ||
display: flex; | ||
gap: 1rem; | ||
} |
14 changes: 14 additions & 0 deletions
14
projects/demo/src/modules/components/message/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,14 @@ | ||
import {Component} from '@angular/core'; | ||
import {changeDetection} from '@demo/emulate/change-detection'; | ||
import {encapsulation} from '@demo/emulate/encapsulation'; | ||
import {TuiMessage} from '@taiga-ui/kit'; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [TuiMessage], | ||
templateUrl: './index.html', | ||
styleUrls: ['./index.less'], | ||
encapsulation, | ||
changeDetection, | ||
}) | ||
export default class Example {} |
14 changes: 14 additions & 0 deletions
14
projects/demo/src/modules/components/message/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,14 @@ | ||
<span class="container left"> | ||
<span tuiMessage> | ||
<span>I'm defaulted 🤘</span> | ||
</span> | ||
</span> | ||
|
||
<span class="container right"> | ||
<span | ||
appearance="custom" | ||
tuiMessage | ||
> | ||
<span>And I'm colored 🤘🏿</span> | ||
</span> | ||
</span> |
25 changes: 25 additions & 0 deletions
25
projects/demo/src/modules/components/message/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,25 @@ | ||
@import '@taiga-ui/core/styles/taiga-ui-local'; | ||
|
||
:host { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
gap: 1rem; | ||
} | ||
|
||
.container { | ||
display: flex; | ||
inline-size: 100%; | ||
} | ||
|
||
.left { | ||
justify-content: flex-start; | ||
} | ||
|
||
.right { | ||
justify-content: flex-end; | ||
} | ||
|
||
[tuiAppearance][data-appearance='custom'] { | ||
background: var(--Brand-Pro, rgba(175, 242, 24, 1)); | ||
} |
14 changes: 14 additions & 0 deletions
14
projects/demo/src/modules/components/message/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,14 @@ | ||
import {Component} from '@angular/core'; | ||
import {changeDetection} from '@demo/emulate/change-detection'; | ||
import {encapsulation} from '@demo/emulate/encapsulation'; | ||
import {TuiFade, TuiMessage} from '@taiga-ui/kit'; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [TuiMessage, TuiFade], | ||
templateUrl: './index.html', | ||
styleUrls: ['./index.less'], | ||
encapsulation, | ||
changeDetection, | ||
}) | ||
export default class Example {} |
10 changes: 10 additions & 0 deletions
10
projects/demo/src/modules/components/message/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 @@ | ||
<span tuiMessage> | ||
All relevant guides in this | ||
<a | ||
href="#" | ||
tuiLink | ||
> | ||
project | ||
</a> | ||
with a lot of examples | ||
</span> |
Empty file.
15 changes: 15 additions & 0 deletions
15
projects/demo/src/modules/components/message/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,15 @@ | ||
import {Component} from '@angular/core'; | ||
import {changeDetection} from '@demo/emulate/change-detection'; | ||
import {encapsulation} from '@demo/emulate/encapsulation'; | ||
import {TuiLink} from '@taiga-ui/core'; | ||
import {TuiMessage} from '@taiga-ui/kit'; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [TuiMessage, TuiLink], | ||
templateUrl: './index.html', | ||
styleUrls: ['./index.less'], | ||
encapsulation, | ||
changeDetection, | ||
}) | ||
export default class Example {} |
37 changes: 37 additions & 0 deletions
37
projects/demo/src/modules/components/message/examples/4/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,37 @@ | ||
<h3>Fade</h3> | ||
|
||
<span class="container left"> | ||
<span | ||
tuiMessage | ||
class="fade" | ||
> | ||
<span tuiFade>Left Comment with very long content</span> | ||
</span> | ||
</span> | ||
|
||
<span class="container right"> | ||
<span | ||
appearance="accent" | ||
tuiMessage | ||
class="fade" | ||
> | ||
<span tuiFade>Right Comment with very long content</span> | ||
</span> | ||
</span> | ||
|
||
<h3>Multiline</h3> | ||
|
||
<span class="container left"> | ||
<span tuiMessage> | ||
<div class="multiline">Very long content that goes on the second line</div> | ||
</span> | ||
</span> | ||
|
||
<span class="container right"> | ||
<span | ||
appearance="accent" | ||
tuiMessage | ||
> | ||
<div class="multiline">Very long content that goes on the second line</div> | ||
</span> | ||
</span> |
39 changes: 39 additions & 0 deletions
39
projects/demo/src/modules/components/message/examples/4/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,39 @@ | ||
@import '@taiga-ui/core/styles/taiga-ui-local'; | ||
|
||
:host { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: flex-start; | ||
gap: 1rem; | ||
} | ||
|
||
.container { | ||
display: flex; | ||
inline-size: 100%; | ||
} | ||
|
||
.left { | ||
justify-content: flex-start; | ||
|
||
> [tuiMessage] { | ||
margin-inline-start: 1rem; | ||
margin-inline-end: 2rem; | ||
} | ||
} | ||
|
||
.right { | ||
justify-content: flex-end; | ||
|
||
> [tuiMessage] { | ||
margin-inline-start: 2rem; | ||
margin-inline-end: 1rem; | ||
} | ||
} | ||
|
||
.fade { | ||
max-inline-size: 11rem; | ||
} | ||
|
||
.multiline { | ||
white-space: initial; | ||
} |
14 changes: 14 additions & 0 deletions
14
projects/demo/src/modules/components/message/examples/4/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,14 @@ | ||
import {Component} from '@angular/core'; | ||
import {changeDetection} from '@demo/emulate/change-detection'; | ||
import {encapsulation} from '@demo/emulate/encapsulation'; | ||
import {TuiFade, TuiMessage} from '@taiga-ui/kit'; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [TuiMessage, TuiFade], | ||
templateUrl: './index.html', | ||
styleUrls: ['./index.less'], | ||
encapsulation, | ||
changeDetection, | ||
}) | ||
export default class Example {} |
50 changes: 50 additions & 0 deletions
50
projects/demo/src/modules/components/message/examples/5/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,50 @@ | ||
<div tuiCell> | ||
<tui-avatar | ||
tuiAccessories | ||
[src]="'https://avatars.githubusercontent.com/u/11832552' | tuiFallbackSrc: '@tui.user' | async" | ||
/> | ||
<div tuiTitle> | ||
<strong>John A.</strong> | ||
<div tuiSubtitle>USD</div> | ||
<span tuiMessage>Don't deny yourself anything</span> | ||
</div> | ||
<div | ||
tuiAccessories | ||
tuiTitle | ||
[style.white-space]="'nowrap'" | ||
[style.width]="0" | ||
> | ||
+ $123 456 | ||
<div tuiSubtitle>June 2</div> | ||
</div> | ||
</div> | ||
|
||
<div tuiCell> | ||
<tui-avatar | ||
tuiAccessories | ||
[src]="'https://avatars.githubusercontent.com/u/87331898' | tuiFallbackSrc: '@tui.user' | async" | ||
/> | ||
<div | ||
tuiTitle | ||
[style.align-self]="'stretch'" | ||
> | ||
<strong>Todd G.</strong> | ||
<div tuiSubtitle>USD</div> | ||
</div> | ||
<div | ||
tuiAccessories | ||
tuiTitle | ||
[style.max-block-size.%]="100" | ||
[style.white-space]="'nowrap'" | ||
[style.width]="0" | ||
> | ||
- $10 000 | ||
<div tuiSubtitle>September 6</div> | ||
<span | ||
appearance="accent" | ||
tuiMessage | ||
> | ||
For game | ||
</span> | ||
</div> | ||
</div> |
9 changes: 9 additions & 0 deletions
9
projects/demo/src/modules/components/message/examples/5/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,9 @@ | ||
:host { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 1rem; | ||
} | ||
|
||
[tuiCell] { | ||
max-inline-size: 25rem; | ||
} |
34 changes: 34 additions & 0 deletions
34
projects/demo/src/modules/components/message/examples/5/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,34 @@ | ||
import {AsyncPipe} from '@angular/common'; | ||
import {Component} from '@angular/core'; | ||
import {changeDetection} from '@demo/emulate/change-detection'; | ||
import {encapsulation} from '@demo/emulate/encapsulation'; | ||
import {TuiFallbackSrcPipe, TuiIcon, TuiTitle} from '@taiga-ui/core'; | ||
import { | ||
TuiAvatar, | ||
TuiBadge, | ||
TuiBadgeNotification, | ||
TuiFade, | ||
TuiMessage, | ||
} from '@taiga-ui/kit'; | ||
import {TuiCell} from '@taiga-ui/layout'; | ||
|
||
@Component({ | ||
standalone: true, | ||
imports: [ | ||
AsyncPipe, | ||
TuiAvatar, | ||
TuiBadge, | ||
TuiBadgeNotification, | ||
TuiCell, | ||
TuiFade, | ||
TuiIcon, | ||
TuiTitle, | ||
TuiMessage, | ||
TuiFallbackSrcPipe, | ||
], | ||
templateUrl: './index.html', | ||
styleUrls: ['./index.less'], | ||
encapsulation, | ||
changeDetection, | ||
}) | ||
export default class Example {} |
13 changes: 13 additions & 0 deletions
13
projects/demo/src/modules/components/message/examples/import/import.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 {Component} from '@angular/core'; | ||
import {TuiMessage} from '@taiga-ui/kit'; | ||
// ... | ||
|
||
@Component({ | ||
imports: [ | ||
// ... | ||
TuiMessage, | ||
], | ||
}) | ||
export class Example {} | ||
``` |
3 changes: 3 additions & 0 deletions
3
projects/demo/src/modules/components/message/examples/import/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,3 @@ | ||
```html | ||
<div tuiMessage>{{ value }}</tui-chip> | ||
``` |
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 @@ | ||
<tui-doc-page | ||
header="Message" | ||
package="KIT" | ||
type="components" | ||
> | ||
<ng-template pageTab> | ||
<p>Message component is used to display message block.</p> | ||
|
||
<tui-doc-example | ||
*ngFor="let example of examples; let index = index" | ||
[component]="index + 1 | tuiComponent" | ||
[content]="index + 1 | tuiExample" | ||
[heading]="example" | ||
[id]="example | tuiKebab" | ||
/> | ||
</ng-template> | ||
|
||
<tui-setup *pageTab="'Setup'" /> | ||
</tui-doc-page> |
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 {Component} from '@angular/core'; | ||
import {changeDetection} from '@demo/emulate/change-detection'; | ||
import {TuiDemo} from '@demo/utils'; | ||
|
||
@Component({ | ||
standalone: true, | ||
selector: 'example-message', | ||
imports: [TuiDemo], | ||
templateUrl: './index.html', | ||
changeDetection, | ||
}) | ||
export default class Example { | ||
protected readonly examples = [ | ||
'Basic', | ||
'Custom color', | ||
'With link', | ||
'Chat messages', | ||
'Inside cells', | ||
]; | ||
} |
Oops, something went wrong.