-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(common): add animation for collapse and accordion components (#5146
- Loading branch information
Showing
25 changed files
with
295 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
demo/src/app/components/+accordion/demos/animated/animated.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<accordion [isAnimated]="true"> | ||
<accordion-group heading="Static Header"> | ||
This content is straight in the template. | ||
</accordion-group> | ||
<accordion-group heading="Another group"> | ||
<p>Some content</p> | ||
</accordion-group> | ||
<accordion-group heading="Another group"> | ||
<p>Some content</p> | ||
</accordion-group> | ||
<accordion-group heading="Another group"> | ||
<p>Some content</p> | ||
</accordion-group> | ||
</accordion> |
7 changes: 7 additions & 0 deletions
7
demo/src/app/components/+accordion/demos/animated/animated.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'demo-accordion-animation', | ||
templateUrl: './animated.html' | ||
}) | ||
export class DemoAccordionAnimatedComponent {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,27 @@ | ||
import { DemoAccordionAnimatedComponent } from './animated/animated'; | ||
import { DemoAccordionBasicComponent } from './basic/basic'; | ||
import { DemoAccordionDisabledComponent } from './disabled/disabled'; | ||
import { DemoAccordionStylingComponent } from './styling/styling'; | ||
import { DemoAccordionOneAtATimeComponent } from './one-at-a-time/one-at-a-time'; | ||
import { DemoAccordionDynamicComponent } from './dymanic/dynamic'; | ||
import { DemoAccordionConfigComponent } from './config/config'; | ||
import { DemoAccordionOpenEventComponent } from './open-event/open-event'; | ||
import { DemoAccordionCustomHTMLComponent } from './custom-html/custom-html'; | ||
import { DemoAccordionOpenedComponent } from './opened/opened'; | ||
import { DemoAccordionManualToggleComponent } from './manual-toggle/manual-toggle'; | ||
import { DemoAccordionDisabledComponent } from './disabled/disabled'; | ||
import { DemoAccordionDynamicBodyComponent } from './dynamic-body/dynamic-body'; | ||
import { DemoAccordionDynamicComponent } from './dymanic/dynamic'; | ||
import { DemoAccordionManualToggleComponent } from './manual-toggle/manual-toggle'; | ||
import { DemoAccordionOneAtATimeComponent } from './one-at-a-time/one-at-a-time'; | ||
import { DemoAccordionOpenedComponent } from './opened/opened'; | ||
import { DemoAccordionOpenEventComponent } from './open-event/open-event'; | ||
import { DemoAccordionStylingComponent } from './styling/styling'; | ||
|
||
export const DEMO_COMPONENTS = [ | ||
DemoAccordionAnimatedComponent, | ||
DemoAccordionBasicComponent, | ||
DemoAccordionDisabledComponent, | ||
DemoAccordionStylingComponent, | ||
DemoAccordionOneAtATimeComponent, | ||
DemoAccordionDynamicComponent, | ||
DemoAccordionConfigComponent, | ||
DemoAccordionOpenEventComponent, | ||
DemoAccordionCustomHTMLComponent, | ||
DemoAccordionOpenedComponent, | ||
DemoAccordionDisabledComponent, | ||
DemoAccordionDynamicBodyComponent, | ||
DemoAccordionDynamicComponent, | ||
DemoAccordionManualToggleComponent, | ||
DemoAccordionDynamicBodyComponent | ||
DemoAccordionOneAtATimeComponent, | ||
DemoAccordionOpenedComponent, | ||
DemoAccordionOpenEventComponent, | ||
DemoAccordionStylingComponent | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
demo/src/app/components/+collapse/demos/animated/animated.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<button type="button" class="btn btn-primary" (click)="isCollapsed = !isCollapsed" | ||
[attr.aria-expanded]="!isCollapsed" aria-controls="collapseBasic">Toggle collapse | ||
</button> | ||
<hr> | ||
<div id="collapseBasic" [collapse]="isCollapsed" [isAnimated]="true"> | ||
<div class="well well-lg card card-block card-header">Some content</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { Component } from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'collapse-demo-animation', | ||
templateUrl: './animated.html' | ||
}) | ||
export class CollapseDemoAnimatedComponent { | ||
isCollapsed = false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
import { CollapseDemoAnimatedComponent } from './animated/animated'; | ||
import { CollapseDemoComponent } from './basic/basic'; | ||
import { ToggleManualDemoComponent } from './toggle-manual/toggle-manual'; | ||
import { CollapseDemoEventsComponent } from './events/events'; | ||
import { DemoAccessibilityComponent } from './accessibility/accessibility'; | ||
import { InlineDisplayDemoComponent } from './inline-display/inline-display'; | ||
import { ToggleManualDemoComponent } from './toggle-manual/toggle-manual'; | ||
|
||
export const DEMO_COMPONENTS = [ | ||
CollapseDemoAnimatedComponent, | ||
CollapseDemoComponent, | ||
CollapseDemoEventsComponent, | ||
ToggleManualDemoComponent, | ||
DemoAccessibilityComponent, | ||
InlineDisplayDemoComponent | ||
InlineDisplayDemoComponent, | ||
ToggleManualDemoComponent | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.