Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update taiga-ui cdk to v4 (major) - autoclosed #465

Closed
wants to merge 1 commit into from
Closed
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
6 changes: 3 additions & 3 deletions apps/demo/src/app/app.component.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';
import {RouterOutlet} from '@angular/router';
import {TuiRootModule} from '@taiga-ui/core';
import {TuiEditorModule} from '@tinkoff/tui-editor';
import {TuiRoot} from '@taiga-ui/core';
import {TuiEditor, TuiEditorSocket} from '@taiga-ui/editor';

@Component({
standalone: true,
selector: 'app',
imports: [RouterOutlet, TuiEditorModule, TuiRootModule],
imports: [RouterOutlet, TuiEditor, TuiEditorSocket, TuiRoot],
templateUrl: './app.component.html',
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
28 changes: 10 additions & 18 deletions apps/demo/src/app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,12 @@ import {importProvidersFrom, INJECTOR} from '@angular/core';
import {provideClientHydration} from '@angular/platform-browser';
import {provideAnimations} from '@angular/platform-browser/animations';
import {provideRouter} from '@angular/router';
import {
TUI_SANITIZER,
TuiAlertModule,
TuiDialogModule,
TuiRootModule,
} from '@taiga-ui/core';
import {TuiPushModule} from '@taiga-ui/kit';
import {NgDompurifySanitizer} from '@tinkoff/ng-dompurify';
import {TUI_EDITOR_DEFAULT_EXTENSIONS, TUI_EDITOR_EXTENSIONS} from '@tinkoff/tui-editor';
import {TuiAlert, TuiDialog} from '@taiga-ui/core';
import {NgDompurifySanitizer} from '@taiga-ui/dompurify';
import {TUI_EDITOR_DEFAULT_EXTENSIONS, TUI_EDITOR_EXTENSIONS} from '@taiga-ui/editor';
import {NG_EVENT_PLUGINS} from '@taiga-ui/event-plugins';
import {TuiPush} from '@taiga-ui/kit';
import {TUI_SANITIZER} from '@taiga-ui/legacy';

export const appConfig: ApplicationConfig = {
providers: [
Expand All @@ -24,26 +21,21 @@ export const appConfig: ApplicationConfig = {
loadComponent: async () => import('./home/home.component'),
},
]),
importProvidersFrom(
TuiRootModule,
TuiAlertModule,
TuiDialogModule,
TuiPushModule,
),
importProvidersFrom(TuiAlert, TuiDialog, TuiPush),
{
provide: TUI_EDITOR_EXTENSIONS,
deps: [INJECTOR],
useFactory: (injector: Injector) => [
...TUI_EDITOR_DEFAULT_EXTENSIONS,
import('@tinkoff/tui-editor/extensions/image-editor').then(
({tuiCreateImageEditorExtension}) =>
tuiCreateImageEditorExtension({injector}),
import('@taiga-ui/editor').then(({tuiCreateImageEditorExtension}) =>
tuiCreateImageEditorExtension({injector}),
),
],
},
{
provide: TUI_SANITIZER,
useClass: NgDompurifySanitizer,
},
NG_EVENT_PLUGINS,
],
};
39 changes: 22 additions & 17 deletions apps/demo/src/app/home/home.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,24 @@ <h2 class="title">
</div>
<div>
@for (label of labels; track $index) {
<tui-checkbox-labeled
size="l"
class="tui-space_bottom-4"
[ngModel]="label === labels[1]"
>
<label tuiLabel>
<input
size="m"
tuiCheckbox
type="checkbox"
class="tui-space_bottom-4"
[ngModel]="label === labels[1]"
/>
{{ label }}
</tui-checkbox-labeled>
</label>
}
</div>
<div class="controls">
<label>
<tui-toggle
size="l"
<input
size="m"
tuiSwitch
type="checkbox"
class="tui-space_right-3"
[showIcons]="true"
[(ngModel)]="notification"
Expand All @@ -66,31 +71,31 @@ <h2 class="title">
<div class="icons">
<button
appearance=""
icon="tuiIconVolumeXLarge"
shape="rounded"
iconStart="@tui.volume-x"
title="Mute speaker"
tuiIconButton
type="button"
class="button"
[style.border-radius.%]="100"
(click)="slider = 0"
></button>
<button
appearance=""
icon="tuiIconMicOffLarge"
shape="rounded"
iconStart="@tui.mic-off"
title="Mute microphone"
tuiIconButton
type="button"
class="button"
[style.border-radius.%]="100"
></button>
<button
appearance=""
icon="tuiIconPhoneForwardedLarge"
shape="rounded"
iconStart="@tui.phone-forwarded"
title="Forward call"
tuiIconButton
type="button"
class="error"
[style.border-radius.%]="100"
(click)="call(callTemplate)"
></button>
</div>
Expand Down Expand Up @@ -121,7 +126,7 @@ <h3>Aleksandr Inkin</h3>
<div class="buttons">
<button
appearance="custom"
iconRight="tuiIconPhone"
iconEnd="@tui.phone"
size="m"
tuiIconButton
type="button"
Expand All @@ -130,7 +135,7 @@ <h3>Aleksandr Inkin</h3>
></button>
<button
appearance="custom"
iconRight="tuiIconPhone"
iconEnd="@tui.phone"
size="m"
tuiIconButton
type="button"
Expand All @@ -147,7 +152,7 @@ <h3>Aleksandr Inkin</h3>
type="Dr. Henry Walton Jones, Jr."
(close)="toggle(false)"
>
<tui-svg src="tuiIconMessageSquareLarge" />
<tui-icon icon="@tui.message-square" />
I have a bad feeling about this...
<button
tuiButton
Expand Down
19 changes: 9 additions & 10 deletions apps/demo/src/app/home/home.component.less
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@
}

.calendar {
.shadow(2);

box-shadow: var(--tui-shadow-medium);
border-radius: var(--tui-radius-m);
border: 0.0625rem solid var(--tui-base-03);
border: 0.0625rem solid var(--tui-background-neutral-1-hover);
margin-top: 0.25rem;
inline-size: 18rem;
box-sizing: border-box;
Expand All @@ -45,22 +44,22 @@
.error[data-size][data-shape] {
.transition(~'color, background');

background: var(--tui-base-02);
color: var(--tui-primary);
background: var(--tui-background-base-alt);
color: var(--tui-background-accent-1);

&:hover,
&:active {
background: var(--tui-base-03);
color: var(--tui-primary-hover);
background: var(--tui-background-neutral-1-hover);
color: var(--tui-background-accent-1-hover);
}
}

.error[data-size][data-shape] {
color: var(--tui-negative);
color: var(--tui-text-negative);

&:hover,
&:active {
color: var(--tui-negative-hover);
color: var(--tui-text-negative-hover);
}
}

Expand Down Expand Up @@ -122,7 +121,7 @@ tui-dialog[data-appearance='call'][data-size] {
img {
inline-size: 2.25rem;
border-radius: 0.625rem;
border: 0.0625rem solid var(--tui-base-05);
border: 0.0625rem solid var(--tui-border-hover);
}
}

Expand Down
55 changes: 27 additions & 28 deletions apps/demo/src/app/home/home.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,49 +11,48 @@ import {
import {FormsModule} from '@angular/forms';
import type {TuiDay} from '@taiga-ui/cdk';
import {
TuiButtonModule,
TuiCalendarModule,
TuiButton,
TuiCalendar,
TuiDialogService,
TuiDropdownModule,
TuiHintModule,
TuiLinkModule,
TuiSvgModule,
TuiTextfieldControllerModule,
TuiDropdown,
TuiHint,
TuiIcon,
TuiLabel,
TuiLink,
} from '@taiga-ui/core';
import {NgDompurifyPipe, NgDompurifySanitizer} from '@taiga-ui/dompurify';
import {TuiEditor, TuiEditorSocket, TuiEditorTool} from '@taiga-ui/editor';
import {TuiAccordion, TuiCheckbox, TuiPush, TuiSlider, TuiSwitch} from '@taiga-ui/kit';
import {
TuiAccordionModule,
TuiCheckboxLabeledModule,
TuiInputDateModule,
TuiInputTagModule,
TuiPushModule,
TuiSliderModule,
TuiToggleModule,
} from '@taiga-ui/kit';
import {NgDompurifyModule, NgDompurifySanitizer} from '@tinkoff/ng-dompurify';
import {TuiEditorModule, TuiEditorTool} from '@tinkoff/tui-editor';
TuiTextfieldControllerModule,
} from '@taiga-ui/legacy';

@Component({
standalone: true,
selector: 'home',
imports: [
CommonModule,
FormsModule,
NgDompurifyModule,
TuiAccordionModule,
TuiButtonModule,
TuiCalendarModule,
TuiCheckboxLabeledModule,
TuiDropdownModule,
TuiEditorModule,
TuiHintModule,
NgDompurifyPipe,
TuiAccordion,
TuiButton,
TuiCalendar,
TuiCheckbox,
TuiDropdown,
TuiEditor,
TuiEditorSocket,
TuiHint,
TuiIcon,
TuiInputDateModule,
TuiInputTagModule,
TuiLinkModule,
TuiPushModule,
TuiSliderModule,
TuiSvgModule,
TuiLabel,
TuiLink,
TuiPush,
TuiSlider,
TuiSwitch,
TuiTextfieldControllerModule,
TuiToggleModule,
],
templateUrl: './home.component.html',
styleUrls: ['./home.component.less'],
Expand Down
2 changes: 1 addition & 1 deletion apps/demo/src/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ html,
body {
margin: 0;
padding: 0;
color: var(--tui-text-01);
color: var(--tui-text-primary);
}

app {
Expand Down
Loading
Loading