Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix screenshots
Browse files Browse the repository at this point in the history
waterplea committed Mar 29, 2024
1 parent f96956d commit fd7e46d
Showing 24 changed files with 93 additions and 73 deletions.
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
type="button"
[href]="link"
[iconLeft]="icons.code"
[style.height]="'var(--tui-height-l)'"
>
{{ text }}
</a>
1 change: 0 additions & 1 deletion projects/addon-doc/components/main/main.template.html
Original file line number Diff line number Diff line change
@@ -14,7 +14,6 @@
appearance="secondary"
size="s"
tuiIconButton
tuiMode="onLight"
type="button"
class="tui-doc-night-mode-switch"
[iconLeft]="icon"
3 changes: 2 additions & 1 deletion projects/addon-mobile/styles/common/button.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[tuiButtonNew] {
[tuiButton],
[tuiIconButton] {
width: 100%;

&[data-size='xs'],
Original file line number Diff line number Diff line change
@@ -7,15 +7,15 @@
}

/* stylelint-disable order/order */
[tuiWrapper][data-appearance='preview-action'] {
[tuiAppearance][data-appearance='preview-action'] {
background: rgba(104, 104, 104, 0.96);
color: var(--tui-text-01-night);

.wrapper-hover({
.appearance-hover({
background: rgba(159, 159, 159, 0.86);
});

.wrapper-active({
.appearance-active({
background: rgba(159, 159, 159, 0.75);
});
}
Original file line number Diff line number Diff line change
@@ -11,6 +11,7 @@
>
<div
class="t-container"
[attr.tuiTheme]="getMode(item.mode) === 'onDark' ? 'night' : null"
[class.t-container_adaptive]="item.adaptive"
>
<div class="t-inner">
1 change: 0 additions & 1 deletion projects/core/components/button/button.directive.ts
Original file line number Diff line number Diff line change
@@ -28,7 +28,6 @@ import {TUI_BUTTON_OPTIONS} from './button.options';
},
],
host: {
tuiButtonNew: '',
'[attr.data-size]': 'size',
},
})
8 changes: 4 additions & 4 deletions projects/core/components/button/button.style.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import '@taiga-ui/core/styles/taiga-ui-local';

// TODO: Change to [tuiButton] in 4.0
[tuiButtonNew] {
[tuiButton],
[tuiIconButton] {
--t-gap: 0.125rem;

.button-base();
@@ -102,10 +102,10 @@
}
}

[tuiIconButton][tuiButtonNew] {
[tuiIconButton] {
--t-gap: 0;

width: var(--t-size);
font-size: 0;
font-size: 0 !important;
padding: 0;
}
2 changes: 1 addition & 1 deletion projects/core/components/dialog/dialog.style.less
Original file line number Diff line number Diff line change
@@ -160,7 +160,7 @@
color: var(--tui-base-01);

:host-context(.t-dialog:last-of-type) & {
display: block;
display: inline-flex;
}

:host:not([data-size='fullscreen']):not([data-size='page']) & {
1 change: 1 addition & 0 deletions projects/core/styles/theme/appearance/textfield.less
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@
background: var(--tui-base-01);
color: var(--tui-text-01);
box-shadow: var(--t-shadow);
border: none;
outline: 1px solid var(--tui-base-03);
outline-offset: -1px;

Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<article class="zoom-controller">
<section class="zoom-controller">
<button
appearance="flat"
appearance="icon"
iconLeft="tuiIconMinus"
size="s"
size="xs"
tuiIconButton
tuiMode="onDark"
tuiTheme="night"
type="button"
class="minus"
(click)="change(-0.25)"
@@ -34,13 +34,13 @@
/>
</label>
<button
appearance="flat"
appearance="icon"
iconLeft="tuiIconPlus"
size="s"
size="xs"
tuiIconButton
tuiMode="onDark"
tuiTheme="night"
type="button"
class="plus"
(click)="change(+0.25)"
></button>
</article>
</section>
Original file line number Diff line number Diff line change
@@ -5,12 +5,13 @@
.zoom-controller {
border-radius: @border-radius;
background: var(--tui-base-05);

height: var(--tui-height-s);
display: flex;
justify-content: space-between;
align-items: center;
max-width: 18rem;
column-gap: 0.5rem;
padding: 0 0.25rem;
gap: 0.5rem;

@media @tui-mobile {
max-width: 100%;
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@
});
}

[tuiWrapper][data-appearance='material-button'] {
[tuiAppearance][data-appearance='material-button'] {
.transition(all);
border-radius: 0.25rem;
background: #6200ee;
@@ -60,19 +60,19 @@
0rem 0.125rem 0.125rem 0rem rgba(0, 0, 0, 0.14%),
0rem 0.0625rem 0.3125rem 0rem rgba(0, 0, 0, 0.12);

.wrapper-hover({
.appearance-hover({
background: #6e14ef;
box-shadow: 0 0.125rem 0.25rem -0.0625rem rgba(0, 0, 0, 0.2), 0rem 0.25rem 0.3125rem 0rem rgba(0, 0, 0, 0.14),
0rem 0.0625rem 0.625rem 0rem rgba(0, 0, 0, 0.12);
});

.wrapper-active({
.appearance-active({
background: #6e14ef;
box-shadow: 0 0.3125rem 0.3125rem -0.1875rem rgba(0, 0, 0, 0.2),
0rem 0.5rem 0.625rem 0.0625rem rgba(0, 0, 0, 0.14), 0rem 0.1875rem 0.875rem 0.125rem rgba(0, 0, 0, 0.12);
});

.wrapper-focus({
.appearance-focus({
background: #883df2;

&:after {
Original file line number Diff line number Diff line change
@@ -11,10 +11,7 @@
#tableBarTemplate
let-close
>
<div
tuiMode="onDark"
class="content"
>
<div class="content">
<button
size="m"
tuiButton
@@ -33,7 +30,7 @@
Cancel
</button>
<button
appearance="outline"
appearance="whiteblock"
iconLeft="tuiIconTrashLarge"
size="m"
tuiButton
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {RouterModule} from '@angular/router';
import {TuiAddonDocModule, tuiGenerateRoutes} from '@taiga-ui/addon-doc';
import {TuiButtonDirective, TuiLinkModule, TuiModeModule} from '@taiga-ui/core';
import {TuiButtonDirective, TuiLinkModule} from '@taiga-ui/core';
import {TuiInputModule, TuiRadioListComponent} from '@taiga-ui/kit';
import {PolymorpheusModule} from '@tinkoff/ng-polymorpheus';

@@ -19,7 +19,6 @@ import {ExampleTuiTableBarComponent} from './table-bar.component';
TuiInputModule,
TuiLinkModule,
FormsModule,
TuiModeModule,
TuiAddonDocModule,
RouterModule.forChild(tuiGenerateRoutes(ExampleTuiTableBarComponent)),
],
24 changes: 24 additions & 0 deletions projects/icons/src/tuiIconRotateOutline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 2 additions & 4 deletions projects/kit/components/carousel/carousel.style.less
Original file line number Diff line number Diff line change
@@ -26,10 +26,8 @@
}
}

::ng-deep {
[tuiCarouselButtons] [tuiIconButtons] {
border-radius: 100%;
}
::ng-deep [tuiCarouselButtons] [tuiIconButton] {
border-radius: 100%;
}

.t-item {
1 change: 1 addition & 0 deletions projects/kit/components/confirm/confirm.style.less
Original file line number Diff line number Diff line change
@@ -19,5 +19,6 @@
:host-context(tui-root._mobile) {
.t-button {
flex: 1;
overflow: visible;
}
}
5 changes: 5 additions & 0 deletions projects/kit/components/files/files/files.styles.less
Original file line number Diff line number Diff line change
@@ -15,6 +15,11 @@ tui-files {
}

.t-button {
width: 100%;
border-radius: inherit;
}

.t-bottom {
z-index: 3;
width: 100%;
background: var(--tui-base-01);
24 changes: 14 additions & 10 deletions projects/kit/components/files/files/files.template.html
Original file line number Diff line number Diff line change
@@ -19,15 +19,19 @@
</ng-container>
</div>
</tui-expand>
<button
<div
*ngIf="hasExtraItems"
appearance="outline"
size="m"
tuiButton
type="button"
class="t-button"
[class.t-button_collapsed]="!expanded"
(click)="toggle()"
class="t-bottom"
[class.t-bottom_collapsed]="!expanded"
>
{{ (expanded ? hideText$ : showAllText$) | async }}
</button>
<button
appearance="outline"
size="m"
tuiButton
type="button"
class="t-button"
(click)="toggle()"
>
{{ (expanded ? hideText$ : showAllText$) | async }}
</button>
</div>
2 changes: 2 additions & 0 deletions projects/kit/components/input-number/input-number.style.less
Original file line number Diff line number Diff line change
@@ -54,6 +54,8 @@
display: flex;
flex: 1;
height: auto;
align-items: center;
justify-content: center;
border-radius: 0;

&:first-child {
23 changes: 5 additions & 18 deletions projects/kit/components/pagination/pagination.component.ts
Original file line number Diff line number Diff line change
@@ -21,14 +21,8 @@ import {
tuiClamp,
tuiIsNativeFocusedIn,
} from '@taiga-ui/cdk';
import type {
TuiBrightness,
TuiHorizontalDirection,
TuiSizeL,
TuiSizeS,
TuiSizeXS,
} from '@taiga-ui/core';
import {TUI_SPIN_ICONS, TuiAppearance, TuiModeDirective} from '@taiga-ui/core';
import type {TuiHorizontalDirection, TuiSizeL, TuiSizeS, TuiSizeXS} from '@taiga-ui/core';
import {TUI_SPIN_ICONS, TuiModeDirective} from '@taiga-ui/core';
import {TUI_PAGINATION_TEXTS} from '@taiga-ui/kit/tokens';
import {tuiHorizontalDirectionToNumber} from '@taiga-ui/kit/utils/math';
import type {PolymorpheusContent} from '@tinkoff/ng-polymorpheus';
@@ -190,17 +184,10 @@ export class TuiPaginationComponent
);
}

protected getElementMode(index: number): TuiAppearance {
return this.index === index ? TuiAppearance.Primary : TuiAppearance.Flat;
}
protected getElementMode(index: number): string {
const fallback = this.size === 's' ? 'secondary' : 'flat';

protected getSmallElementMode(
index: number,
mode: TuiBrightness | null,
): TuiAppearance {
return this.index === index && mode !== 'onLight'
? TuiAppearance.Primary
: TuiAppearance.Secondary;
return this.index === index ? 'primary' : fallback;
}

protected onElementClick(index: number): void {
12 changes: 7 additions & 5 deletions projects/kit/components/pagination/pagination.style.less
Original file line number Diff line number Diff line change
@@ -13,21 +13,23 @@
}

.t-button {
margin: 0 (@space / 2);
width: var(--tui-height-s);
margin: 0 0.125rem;
flex-shrink: 0;

&_active {
background: currentColor;
&[data-size='xs'] {
width: var(--tui-height-xs);
}

&&&_small {
// @note: (&&&_) it's increasing css cascade priority
width: 0.5rem;
height: 0.5rem;
padding: 0;
margin: 0;

&:not(:first-child) {
margin-left: @space * 2;
margin-left: 0.5rem;
}
}
}
@@ -36,7 +38,7 @@
width: var(--tui-height-s);
height: var(--tui-height-s);
line-height: var(--tui-height-s);
margin: 0 (@space / 2);
margin: 0 0.125rem;
flex-shrink: 0;
color: var(--tui-text-03);
text-align: center;
Loading

0 comments on commit fd7e46d

Please sign in to comment.