Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions projects/demo/src/pages/components/table/examples/11/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,27 @@
</tui-textfield>
</td>
</tr>
<tr>
<td tuiTd>
<tui-textfield>
<input
placeholder="Number"
tuiInputNumber
[(ngModel)]="number"
/>
</tui-textfield>
</td>
<td tuiTd>
<tui-textfield>
<input
placeholder="Number with step"
tuiInputNumber
[step]="10"
[(ngModel)]="numberStep"
/>
</tui-textfield>
</td>
</tr>
<tr>
<td tuiTd>
<tui-textfield multi>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
TuiDataListWrapper,
TuiInputChip,
TuiInputDateMulti,
TuiInputNumber,
TuiInputRange,
TuiInputSlider,
TuiMultiSelect,
Expand All @@ -19,7 +20,7 @@
} from '@taiga-ui/kit';

@Component({
imports: [

Check failure on line 23 in projects/demo/src/pages/components/table/examples/11/index.ts

View workflow job for this annotation

GitHub Actions / Lint

Order in imports should be [FormsModule, TuiChevron, TuiDataListWrapper, TuiInput, TuiInputCardGroup, TuiInputChip, TuiInputDateMulti, TuiInputNumber, TuiInputRange, TuiInputSlider, TuiMultiSelect, TuiSelect, TuiTable, TuiTextarea]
FormsModule,
TuiChevron,
TuiDataListWrapper,
Expand All @@ -33,13 +34,16 @@
TuiSelect,
TuiTable,
TuiTextarea,
TuiInputNumber,
],
templateUrl: './index.html',
encapsulation,
changeDetection,
})
export default class Example {
protected textarea = '';
protected number = null;
protected numberStep = null;
protected input = '';
protected chip = [];
protected multiselect = [];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
ChangeDetectionStrategy,
Component,
computed,
inject,
ViewEncapsulation,
} from '@angular/core';
Expand Down Expand Up @@ -43,6 +44,10 @@ export class TuiInputNumberStepButtons {
protected readonly appearance = inject(TUI_TEXTFIELD_OPTIONS).appearance;
protected readonly hold = inject(TuiInputNumberStepService<bigint | number>);

protected readonly buttonAppearance = computed(() =>
this.appearance() === 'table' ? 'icon' : this.appearance(),

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'icon' has increased icon size due to lack of background, maybe 'flat-grayscale' would look better?

);

protected readonly $ = this.hold.steps$
.pipe(takeUntilDestroyed())
.subscribe((value) => this.directive.onStep(value));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
tuiIconButton
type="button"
class="t-button"
[appearance]="appearance()"
[appearance]="buttonAppearance()"
[disabled]="!input.interactive() || input.parsed() >= mask.max()"
[iconStart]="options.icons.increase"
(click.prevent)="directive.onStep(directive.step())"
Expand All @@ -20,7 +20,7 @@
tuiIconButton
type="button"
class="t-button"
[appearance]="appearance()"
[appearance]="buttonAppearance()"
[disabled]="!input.interactive() || input.parsed() <= mask.min()"
[iconStart]="options.icons.decrease"
(click.prevent)="directive.onStep(-directive.step())"
Expand Down
Loading