Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Jan 31, 2024
1 parent 9237137 commit 9842223
Show file tree
Hide file tree
Showing 75 changed files with 572 additions and 430 deletions.
15 changes: 12 additions & 3 deletions projects/demo/src/modules/app/app.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,11 +283,20 @@ export const ROUTES: Routes = [
},
},
{
path: 'experimental/card',
path: 'experimental/card-medium',
loadChildren: async () =>
(await import('../experimental/card/card.module')).ExampleTuiCardModule,
(await import('../experimental/card-medium/card-medium.module')).ExampleTuiCardModule,
data: {
title: 'Card',
title: 'CardMedium',
},
},
{
path: 'experimental/card-large',
loadChildren: async () =>
(await import('../experimental/card-large/card-large.module'))
.ExampleTuiCardLargeModule,
data: {
title: 'CardLarge',
},
},
{
Expand Down
10 changes: 5 additions & 5 deletions projects/demo/src/modules/app/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1037,15 +1037,15 @@ export const pages: TuiDocPages = [
},
{
section: 'Experimental',
title: 'Card',
keywords: 'card, card-medium, card-large, medium, large, block, карточка, блок',
route: '/experimental/card',
title: 'CardMedium',
keywords: 'card, card-medium, medium, block, карточка, блок',
route: '/experimental/card-medium',
},
{
section: 'Experimental',
title: 'CardLarge',
keywords: 'card, card-medium, card-large, medium, large, block, карточка, блок',
route: '/experimental/card/Large',
keywords: 'card, card-large, large, block, карточка, блок',
route: '/experimental/card-large',
},
{
section: 'Experimental',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import {TuiDocExample, TuiRawLoaderContent} from '@taiga-ui/addon-doc';

@Component({
selector: 'example-card',
templateUrl: './card.template.html',
templateUrl: './card-large.template.html',
changeDetection,
})
export class ExampleTuiCardComponent {
export class ExampleTuiCardLargeComponent {
readonly exampleModule: TuiRawLoaderContent = import(
'./examples/import/import-module.md?raw'
);
Expand All @@ -17,50 +17,40 @@ export class ExampleTuiCardComponent {
);

readonly example1: TuiDocExample = {
TypeScript: import('./examples/1/index.ts?raw'),
HTML: import('./examples/1/index.html?raw'),
LESS: import('./examples/1/index.less?raw'),
};

readonly example2: TuiDocExample = {
TypeScript: import('./examples/2/index.ts?raw'),
HTML: import('./examples/2/index.html?raw'),
LESS: import('./examples/2/index.less?raw'),
};

readonly example3: TuiDocExample = {
TypeScript: import('./examples/3/index.ts?raw'),
HTML: import('./examples/3/index.html?raw'),
LESS: import('./examples/3/index.less?raw'),
};

readonly example4: TuiDocExample = {
TypeScript: import('./examples/4/index.ts?raw'),
HTML: import('./examples/4/index.html?raw'),
LESS: import('./examples/4/index.less?raw'),
};

readonly example5: TuiDocExample = {
TypeScript: import('./examples/5/index.ts?raw'),
HTML: import('./examples/5/index.html?raw'),
LESS: import('./examples/5/index.less?raw'),
};

readonly example6: TuiDocExample = {
TypeScript: import('./examples/6/index.ts?raw'),
HTML: import('./examples/6/index.html?raw'),
LESS: import('./examples/6/index.less?raw'),
};

readonly example7: TuiDocExample = {
TypeScript: import('./examples/7/index.ts?raw'),
HTML: import('./examples/7/index.html?raw'),
LESS: import('./examples/7/index.less?raw'),
};

readonly example8: TuiDocExample = {
HTML: import('./examples/8/index.html?raw'),
LESS: import('./examples/8/index.less?raw'),
};

readonly example9: TuiDocExample = {
Expand All @@ -80,36 +70,4 @@ export class ExampleTuiCardComponent {
readonly example12: TuiDocExample = {
HTML: import('./examples/12/index.html?raw'),
};

readonly example13: TuiDocExample = {
HTML: import('./examples/13/index.html?raw'),
LESS: import('./examples/13/index.less?raw'),
};

readonly example14: TuiDocExample = {
HTML: import('./examples/14/index.html?raw'),
LESS: import('./examples/14/index.less?raw'),
};

readonly example15: TuiDocExample = {
HTML: import('./examples/15/index.html?raw'),
};

readonly example16: TuiDocExample = {
HTML: import('./examples/16/index.html?raw'),
};

readonly example17: TuiDocExample = {
HTML: import('./examples/17/index.html?raw'),
LESS: import('./examples/17/index.less?raw'),
};

readonly example18: TuiDocExample = {
HTML: import('./examples/18/index.html?raw'),
LESS: import('./examples/18/index.less?raw'),
};

readonly example19: TuiDocExample = {
HTML: import('./examples/19/index.html?raw'),
};
}
100 changes: 100 additions & 0 deletions projects/demo/src/modules/experimental/card-large/card-large.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {tuiGetDocModules} from '@taiga-ui/addon-doc';
import {TuiRippleModule} from '@taiga-ui/addon-mobile';
import {TuiPlatformModule, TuiRepeatTimesModule} from '@taiga-ui/cdk';
import {
TuiDataListModule,
TuiHintModule,
TuiHostedDropdownModule,
TuiLinkModule,
TuiNotificationModule,
TuiScrollbarModule,
TuiSvgModule,
} from '@taiga-ui/core';
import {
TuiAppearanceModule,
TuiAutoColorModule,
TuiAvatarModule,
TuiAvatarStackModule,
TuiBadgeModule,
TuiButtonCloseModule,
TuiButtonModule,
TuiCardModule,
TuiCellModule,
TuiFadeModule,
TuiFallbackSrcModule,
TuiHeaderModule,
TuiIconModule,
TuiInitialsModule,
TuiSurfaceModule,
TuiThumbnailCardModule,
TuiTitleModule,
} from '@taiga-ui/experimental';

import {ExampleTuiCardLargeComponent} from './card-large.component';
import {TuiCardLargeExample1} from './examples/1';
import {TuiCardLargeExample2} from './examples/2';
import {TuiCardLargeExample3} from './examples/3';
import {TuiCardLargeExample4} from './examples/4';
import {TuiCardLargeExample5} from './examples/5';
import {TuiCardLargeExample6} from './examples/6';
import {TuiCardLargeExample7} from './examples/7';
import {TuiCardLargeExample8} from './examples/8';
import {TuiCardLargeExample9} from './examples/9';
import {TuiCardLargeExample10} from './examples/10';
import {TuiCardLargeExample11} from './examples/11';
import {TuiCardLargeExample12} from './examples/12';

@NgModule({
imports: [
CommonModule,
TuiAvatarStackModule,
TuiAutoColorModule,
TuiInitialsModule,
TuiNotificationModule,
TuiFallbackSrcModule,
TuiFadeModule,
TuiCardModule,
TuiSurfaceModule,
TuiSvgModule,
TuiBadgeModule,
TuiTitleModule,
TuiAvatarModule,
TuiScrollbarModule,
TuiHintModule,
FormsModule,
TuiRippleModule,
TuiThumbnailCardModule,
TuiIconModule,
TuiButtonModule,
TuiHeaderModule,
TuiCellModule,
tuiGetDocModules(ExampleTuiCardLargeComponent),
TuiRepeatTimesModule,
TuiDataListModule,
TuiHostedDropdownModule,
TuiButtonCloseModule,
TuiPlatformModule,
TuiLinkModule,
TuiAppearanceModule,
],
declarations: [
ExampleTuiCardLargeComponent,
TuiCardLargeExample1,
TuiCardLargeExample2,
TuiCardLargeExample3,
TuiCardLargeExample4,
TuiCardLargeExample5,
TuiCardLargeExample6,
TuiCardLargeExample7,
TuiCardLargeExample8,
TuiCardLargeExample9,
TuiCardLargeExample10,
TuiCardLargeExample11,
TuiCardLargeExample12,
],
exports: [ExampleTuiCardLargeComponent],
})
export class ExampleTuiCardLargeModule {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
<tui-doc-page
header="CardLarge"
package="EXPERIMENTAL"
type="components"
>
<ng-template pageTab>
<tui-doc-example
id="basic"
heading="Basic"
[content]="example1"
>
<tui-card-large-example-1></tui-card-large-example-1>
</tui-doc-example>

<tui-doc-example
id="cell-avatar"
heading="Avatar"
[content]="example2"
>
<tui-card-large-example-2></tui-card-large-example-2>
</tui-doc-example>

<tui-doc-example
id="single"
heading="Single item"
[content]="example3"
>
<tui-card-large-example-3></tui-card-large-example-3>
</tui-doc-example>

<tui-doc-example
id="cards-list"
heading="Cards List"
[content]="example4"
>
<tui-card-large-example-4></tui-card-large-example-4>
</tui-doc-example>

<tui-doc-example
id="cell-list"
heading="Cell List"
[content]="example5"
>
<tui-card-large-example-5></tui-card-large-example-5>
</tui-doc-example>

<tui-doc-example
id="cell-list-columns"
heading="Cell List (2 columns)"
[content]="example6"
[fullsize]="true"
>
<tui-card-large-example-6></tui-card-large-example-6>
</tui-doc-example>

<tui-doc-example
id="cell-list-headless"
heading="Cell List (actions)"
[content]="example7"
>
<tui-card-large-example-7></tui-card-large-example-7>
</tui-doc-example>

<tui-doc-example
id="align"
heading="Footer alignment"
[content]="example8"
>
<tui-card-large-example-8></tui-card-large-example-8>
</tui-doc-example>

<tui-doc-example
id="map"
heading="Map"
[content]="example9"
[fullsize]="true"
>
<tui-card-large-example-9></tui-card-large-example-9>
</tui-doc-example>

<tui-doc-example
id="image"
heading="Image"
[content]="example10"
>
<tui-card-large-example-10></tui-card-large-example-10>
</tui-doc-example>

<tui-doc-example
id="image-dark"
heading="Image-dark"
[content]="example11"
>
<tui-card-large-example-11></tui-card-large-example-11>
</tui-doc-example>

<tui-doc-example
id="paddings"
heading="Paddings and radiuses"
[content]="example12"
>
<tui-card-large-example-12></tui-card-large-example-12>
</tui-doc-example>
</ng-template>

<ng-template pageTab="Setup">
<ol class="b-demo-steps">
<li>
<p>Import module:</p>

<tui-doc-code
filename="my.module.ts"
[code]="exampleModule"
></tui-doc-code>
</li>

<li>
<p>Add to the template:</p>

<tui-doc-code
filename="my.component.html"
[code]="exampleHtml"
></tui-doc-code>
</li>
</ol>
</ng-template>
</tui-doc-page>
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';

@Component({
selector: 'tui-card-example-10',
selector: 'tui-card-large-example-1',
templateUrl: './index.html',
styleUrls: ['./index.less'],
encapsulation,
changeDetection,
})
export class TuiCardExample10 {}
export class TuiCardLargeExample1 {}
Loading

0 comments on commit 9842223

Please sign in to comment.