Skip to content

Commit

Permalink
chore: remove directive (#5699)
Browse files Browse the repository at this point in the history
  • Loading branch information
waterplea authored Oct 20, 2023
1 parent defd0be commit f7f8461
Show file tree
Hide file tree
Showing 11 changed files with 38 additions and 91 deletions.
2 changes: 0 additions & 2 deletions projects/addon-commerce/components/thumbnail-card/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export * from './deprecated';
export * from './thumbnail-card.component';
export * from './thumbnail-card.directive';
export * from './thumbnail-card.module';
export * from './thumbnail-card.providers';

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,10 @@ import {NgModule} from '@angular/core';
import {TuiSvgModule} from '@taiga-ui/core';

import {TuiThumbnailCardComponent} from './thumbnail-card.component';
import {TuiThumbnailCardDirective} from './thumbnail-card.directive';

@NgModule({
imports: [CommonModule, TuiSvgModule],
declarations: [TuiThumbnailCardComponent, TuiThumbnailCardDirective],
exports: [TuiThumbnailCardComponent, TuiThumbnailCardDirective],
declarations: [TuiThumbnailCardComponent],
exports: [TuiThumbnailCardComponent],
})
export class TuiThumbnailCardModule {}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@
height: 2rem;
}

&:before {
.fullsize();
content: '';
box-shadow: inset 0 0 0 1px;
border-radius: inherit;
color: var(--tui-clear);
}

&._active {
box-shadow: 0 0 0 1px var(--tui-base-01);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<tui-thumbnail-card
cardNumber="1234"
paymentSystem="visa"
preset="star"
class="star"
></tui-thumbnail-card>

<tui-thumbnail-card
cardNumber="5678"
paymentSystem="mastercard"
preset="gradient"
class="gradient"
></tui-thumbnail-card>

<tui-thumbnail-card
cardNumber="9000"
paymentSystem="dinersclub"
preset="pink"
class="pink"
></tui-thumbnail-card>

<tui-thumbnail-card
cardNumber="9000"
paymentSystem="amex"
preset="radial"
class="radial"
></tui-thumbnail-card>
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,24 @@
display: flex;
gap: 1rem;
}

.star {
color: #000;
background: linear-gradient(45deg, #ffaa00d1, #ffaa00), url(/assets/taiga-ui/icons/tuiIconStarLarge.svg);
background-color: #fff;
}

.gradient {
color: #fff;
background: #2b9aff linear-gradient(110deg, transparent 70%, #0780ff 71%, #db028b 100%);
}

.pink {
color: #0079be;
background: #ffc0cb;
}

.radial {
color: #fff;
background: radial-gradient(#c900ff, #0079be);
}
Original file line number Diff line number Diff line change
@@ -1,35 +1,12 @@
import {Component} from '@angular/core';
import {changeDetection} from '@demo/emulate/change-detection';
import {encapsulation} from '@demo/emulate/encapsulation';
import {tuiThumbnailCardPresetsProvider} from '@taiga-ui/addon-commerce';

@Component({
selector: 'tui-thumbnail-card-example-4',
templateUrl: './index.html',
styleUrls: ['./index.less'],
changeDetection,
encapsulation,
providers: [
tuiThumbnailCardPresetsProvider({
star: {
color: 'black',
background:
'linear-gradient(45deg, #ffaa00d1, #ffaa00), url(/assets/taiga-ui/icons/tuiIconStarLarge.svg)',
},
gradient: {
color: 'white',
background:
'#2b9aff linear-gradient(110deg, transparent 70%, #0780ff 71%, #db028b 100%)',
},
pink: {
color: '#0079be',
background: 'pink',
},
radial: {
color: 'white',
background: 'radial-gradient(#c900ff, #0079be)',
},
}),
],
})
export class TuiThumbnailCardExample4 {}
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ export class ExampleTuiThumbnailCardComponent {
};

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

paymentSystemVariants: readonly TuiPaymentSystem[] = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {CommonModule} from '@angular/common';
import {NgModule} from '@angular/core';
import {TuiThumbnailCardModule} from '@taiga-ui/addon-commerce';
import {tuiGetDocModules} from '@taiga-ui/addon-doc';
import {TuiNotificationModule} from '@taiga-ui/core';

import {TuiThumbnailCardExample1} from './examples/1';
import {TuiThumbnailCardExample2} from './examples/2';
Expand All @@ -14,7 +13,6 @@ import {ExampleTuiThumbnailCardComponent} from './thumbnail-card.component';
imports: [
CommonModule,
TuiThumbnailCardModule,
TuiNotificationModule,
tuiGetDocModules(ExampleTuiThumbnailCardComponent),
],
declarations: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,10 @@
</tui-doc-example>

<tui-doc-example
id="presets"
heading="Presets"
id="backgrounds"
heading="Backgrounds"
[content]="example4"
>
<tui-notification class="tui-space_bottom-4">
Provide your presets with
<code>TUI_THUMBNAIL_CARD_PRESETS</code>
token
</tui-notification>
<tui-thumbnail-card-example-4></tui-thumbnail-card-example-4>
</tui-doc-example>
</ng-template>
Expand Down

0 comments on commit f7f8461

Please sign in to comment.