Skip to content

Commit 45c9943

Browse files
Merge branch 'main' into text-expand-animations
2 parents 6162a6b + 5254dbb commit 45c9943

File tree

27 files changed

+214
-229
lines changed

27 files changed

+214
-229
lines changed

libs/components/code-examples/src/lib/modules/inline-form/inline-form/basic/example.component.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
22
import { ComponentFixture, TestBed } from '@angular/core/testing';
3-
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
3+
import { provideNoopSkyAnimations } from '@skyux/core';
44
import { SkyInlineFormHarness } from '@skyux/inline-form/testing';
55

66
import { InlineFormBasicExampleComponent } from './example.component';
@@ -11,7 +11,8 @@ describe('Inline form basic demo', () => {
1111
fixture: ComponentFixture<InlineFormBasicExampleComponent>;
1212
}> {
1313
await TestBed.configureTestingModule({
14-
imports: [InlineFormBasicExampleComponent, NoopAnimationsModule],
14+
imports: [InlineFormBasicExampleComponent],
15+
providers: [provideNoopSkyAnimations()],
1516
}).compileComponents();
1617

1718
const fixture = TestBed.createComponent(InlineFormBasicExampleComponent);

libs/components/code-examples/src/lib/modules/inline-form/inline-form/custom-buttons/example.component.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
22
import { ComponentFixture, TestBed } from '@angular/core/testing';
3-
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
3+
import { provideNoopSkyAnimations } from '@skyux/core';
44
import { SkyInlineFormHarness } from '@skyux/inline-form/testing';
55

66
import { InlineFormCustomButtonsExampleComponent } from './example.component';
@@ -11,7 +11,8 @@ describe('Inline form custom button demo', () => {
1111
fixture: ComponentFixture<InlineFormCustomButtonsExampleComponent>;
1212
}> {
1313
await TestBed.configureTestingModule({
14-
imports: [InlineFormCustomButtonsExampleComponent, NoopAnimationsModule],
14+
imports: [InlineFormCustomButtonsExampleComponent],
15+
providers: [provideNoopSkyAnimations()],
1516
}).compileComponents();
1617

1718
const fixture = TestBed.createComponent(

libs/components/code-examples/src/lib/modules/inline-form/inline-form/repeaters/example.component.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
22
import { ComponentFixture, TestBed } from '@angular/core/testing';
3-
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
3+
import { provideNoopSkyAnimations } from '@skyux/core';
44
import { SkyInlineFormHarness } from '@skyux/inline-form/testing';
55
import { SkyRepeaterHarness } from '@skyux/lists/testing';
66

@@ -13,7 +13,8 @@ describe('Inline form with repeater demo', () => {
1313
fixture: ComponentFixture<InlineFormRepeatersExampleComponent>;
1414
}> {
1515
await TestBed.configureTestingModule({
16-
imports: [InlineFormRepeatersExampleComponent, NoopAnimationsModule],
16+
imports: [InlineFormRepeatersExampleComponent],
17+
providers: [provideNoopSkyAnimations()],
1718
}).compileComponents();
1819

1920
const fixture = TestBed.createComponent(

libs/components/code-examples/src/lib/modules/popovers/popover/basic/example.component.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
22
import { ComponentFixture, TestBed } from '@angular/core/testing';
3-
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
3+
import { provideNoopSkyAnimations } from '@skyux/core';
44
import { SkyPopoverAlignment, SkyPopoverPlacement } from '@skyux/popovers';
55
import { SkyPopoverHarness } from '@skyux/popovers/testing';
66

@@ -40,7 +40,8 @@ describe('Basic popover', () => {
4040

4141
beforeEach(() => {
4242
TestBed.configureTestingModule({
43-
imports: [PopoversPopoverBasicExampleComponent, NoopAnimationsModule],
43+
imports: [PopoversPopoverBasicExampleComponent],
44+
providers: [provideNoopSkyAnimations()],
4445
});
4546
});
4647

libs/components/datetime/src/lib/modules/datepicker/calendar/daypicker-cell.component.spec.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import {
55
fakeAsync,
66
tick,
77
} from '@angular/core/testing';
8-
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
98
import { SkyAppTestUtility, expect } from '@skyux-sdk/testing';
9+
import { provideNoopSkyAnimations } from '@skyux/core';
1010

1111
import { SkyDatepickerModule } from '../datepicker.module';
1212

@@ -81,8 +81,9 @@ describe('daypicker cell', () => {
8181
beforeEach(() => {
8282
TestBed.configureTestingModule({
8383
declarations: [],
84-
imports: [SkyDatepickerModule, NoopAnimationsModule],
84+
imports: [SkyDatepickerModule],
8585
providers: [
86+
provideNoopSkyAnimations(),
8687
{
8788
provide: SkyDatepickerCalendarInnerComponent,
8889
useValue: calendarInnerComponent,

libs/components/forms/src/lib/modules/input-box/input-box.component.spec.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
import { AbstractControl } from '@angular/forms';
99
import { By } from '@angular/platform-browser';
1010
import { SkyAppTestUtility, expect, expectAsync } from '@skyux-sdk/testing';
11+
import { provideNoopSkyAnimations } from '@skyux/core';
1112
import {
1213
SkyHelpTestingController,
1314
SkyHelpTestingModule,
@@ -487,6 +488,7 @@ describe('Input box component', () => {
487488
TestBed.configureTestingModule({
488489
imports: [InputBoxFixturesModule, SkyHelpTestingModule],
489490
providers: [
491+
provideNoopSkyAnimations(),
490492
{
491493
provide: SkyThemeService,
492494
useValue: mockThemeSvc,
@@ -1193,6 +1195,7 @@ describe('Input box component', () => {
11931195
TestBed.configureTestingModule({
11941196
imports: [InputBoxFixturesModule],
11951197
providers: [
1198+
provideNoopSkyAnimations(),
11961199
{
11971200
provide: SkyThemeService,
11981201
useValue: mockThemeSvc,

libs/components/inline-form/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
},
1717
"homepage": "https://github.com/blackbaud/skyux#readme",
1818
"peerDependencies": {
19-
"@angular/animations": "^21.2.0",
2019
"@angular/cdk": "^21.2.0",
2120
"@angular/common": "^21.2.0",
2221
"@angular/core": "^21.2.0",

libs/components/inline-form/src/lib/modules/inline-form/animations/slide-dissolve.ts

Lines changed: 0 additions & 59 deletions
This file was deleted.
Lines changed: 29 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
1-
<div [@skySlideDissolve]="showForm">
2-
@if (!showForm) {
3-
<div class="sky-slide-dissolve-first">
4-
<ng-content />
5-
</div>
6-
} @else if (template) {
7-
<div class="sky-slide-dissolve-last">
8-
<div
9-
class="sky-inline-form sky-shadow sky-box sky-elevation-1-bordered sky-padding-even-md"
10-
>
11-
<div class="sky-inline-form-content">
12-
<ng-container [ngTemplateOutlet]="template" />
13-
</div>
14-
<div class="sky-inline-form-footer">
15-
@for (button of buttons; track button.text) {
16-
<button
17-
class="sky-btn {{ 'sky-btn-' + button.styleType }}"
18-
type="button"
19-
[disabled]="button.disabled ? true : null"
20-
[ngClass]="{ 'sky-btn-disabled': button.disabled }"
21-
(click)="closeInlineForm(button)"
22-
>
23-
{{ button.text }}
24-
</button>
25-
}
26-
</div>
1+
@if (!showForm) {
2+
<div class="sky-slide-dissolve-first">
3+
<ng-content />
4+
</div>
5+
} @else if (template) {
6+
<div
7+
class="sky-slide-dissolve-last"
8+
animate.leave="sky-slide-dissolve-leaving"
9+
>
10+
<div
11+
class="sky-inline-form sky-shadow sky-box sky-elevation-1-bordered sky-padding-even-md"
12+
>
13+
<div class="sky-inline-form-content">
14+
<ng-container [ngTemplateOutlet]="template" />
15+
</div>
16+
<div class="sky-inline-form-footer">
17+
@for (button of buttons; track button.text) {
18+
<button
19+
class="sky-btn {{ 'sky-btn-' + button.styleType }}"
20+
type="button"
21+
[disabled]="button.disabled ? true : null"
22+
[ngClass]="{ 'sky-btn-disabled': button.disabled }"
23+
(click)="closeInlineForm(button)"
24+
>
25+
{{ button.text }}
26+
</button>
27+
}
2728
</div>
2829
</div>
29-
}
30-
</div>
30+
</div>
31+
}

libs/components/inline-form/src/lib/modules/inline-form/inline-form.component.scss

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,51 @@
5454
}
5555
}
5656
}
57+
58+
// When the read-only content re-enters after closing the form, fade it in.
59+
.sky-slide-dissolve-first {
60+
@starting-style {
61+
opacity: 0;
62+
}
63+
64+
transition-property: opacity;
65+
transition-duration: var(--sky-transition-time-short);
66+
transition-timing-function: ease-in;
67+
}
68+
69+
// When the form enters, expand height first, then fade in opacity (sequential).
70+
// When the form leaves, snap opacity to 0 immediately, then collapse height.
71+
.sky-slide-dissolve-last {
72+
display: grid;
73+
grid-template-rows: 1fr;
74+
opacity: 1;
75+
76+
// On enter: height expands (no delay), then opacity fades in after height finishes.
77+
// On leave (.sky-slide-dissolve-leaving): overrides below snap opacity and collapse height.
78+
transition-property: grid-template-rows, opacity;
79+
transition-duration:
80+
var(--sky-transition-time-medium), var(--sky-transition-time-medium);
81+
transition-timing-function: ease-in, ease-in;
82+
transition-delay: 0ms, var(--sky-transition-time-medium);
83+
84+
@starting-style {
85+
grid-template-rows: 0fr;
86+
opacity: 0;
87+
}
88+
89+
> .sky-inline-form {
90+
min-height: 0;
91+
overflow: hidden;
92+
}
93+
}
94+
95+
.sky-slide-dissolve-leaving {
96+
grid-template-rows: 0fr;
97+
opacity: 0;
98+
99+
// Snap opacity immediately; height collapses while already invisible.
100+
transition-property: grid-template-rows, opacity;
101+
transition-duration: var(--sky-transition-time-medium), 0ms;
102+
transition-timing-function: ease-in, ease-in;
103+
transition-delay: 0ms, 0ms;
104+
}

0 commit comments

Comments
 (0)