@forter/accordion
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -8,2 +8,3 @@ import { css } from 'lit-element'; | ||
--fc-accordion-section-animation-duration: 0.2s; | ||
/* TODO: move to forter theme */ | ||
--fc-blue-gray-100: #f8fafe; | ||
@@ -91,3 +92,4 @@ --fc-blue-gray-200: #dce3f3; | ||
:host div[part="content"].animating { | ||
:host div[part="content"], | ||
:host div[part="content"] .content-wrapper { | ||
transition: | ||
@@ -111,3 +113,4 @@ min-height var(--fc-accordion-section-animation-duration) | ||
:host(:not([open])) div[part="content"] { | ||
:host(:not([open])) div[part="content"], | ||
:host(:not([open])) div[part="content"] .content-wrapper { | ||
min-height: 0; | ||
@@ -114,0 +117,0 @@ max-height: 0; |
@@ -6,3 +6,2 @@ import { decorate as _decorate, get as _get, getPrototypeOf as _getPrototypeOf } from '../_virtual/_rollupPluginBabelHelpers.js'; | ||
const HEIGHT_CLASS = 'set-height'; | ||
const ANIMATION_CLASS = 'animating'; | ||
let FcAccordionSection = _decorate(null, function (_initialize, _LitElement) { | ||
@@ -107,3 +106,2 @@ class FcAccordionSection extends _LitElement { | ||
this.reflectOpen(); | ||
this.content.classList.add(ANIMATION_CLASS); | ||
this.updateContentHeight(); | ||
@@ -146,3 +144,2 @@ }); | ||
if (propertyName !== 'max-height') return; | ||
this.content.classList.remove(ANIMATION_CLASS); | ||
this.content.classList.remove(HEIGHT_CLASS); | ||
@@ -149,0 +146,0 @@ } |
@@ -6,2 +6,13 @@ # Change Log | ||
## [1.2.1](https://github.com/forter/web-components/compare/@forter/accordion@1.2.0...@forter/accordion@1.2.1) (2022-08-04) | ||
### Bug Fixes | ||
* **accordion:** fix animation on close ([#1054](https://github.com/forter/web-components/issues/1054)) ([c028252](https://github.com/forter/web-components/commit/c028252)) | ||
# [1.2.0](https://github.com/forter/web-components/compare/@forter/accordion@1.1.1...@forter/accordion@1.2.0) (2022-08-03) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@forter/accordion", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "accordion from Forter Components", | ||
@@ -54,3 +54,3 @@ "author": "Forter Developers", | ||
}, | ||
"gitHead": "9a0fc0f9b91732b4ebbb67d15990d94674d0f9a4" | ||
"gitHead": "61e0fde6e6b7eb1f885ab65e05c8b602be0ddb28" | ||
} |
@@ -8,2 +8,3 @@ import { css } from 'lit-element'; | ||
--fc-accordion-section-animation-duration: 0.2s; | ||
/* TODO: move to forter theme */ | ||
--fc-blue-gray-100: #f8fafe; | ||
@@ -91,3 +92,4 @@ --fc-blue-gray-200: #dce3f3; | ||
:host div[part="content"].animating { | ||
:host div[part="content"], | ||
:host div[part="content"] .content-wrapper { | ||
transition: | ||
@@ -111,3 +113,4 @@ min-height var(--fc-accordion-section-animation-duration) | ||
:host(:not([open])) div[part="content"] { | ||
:host(:not([open])) div[part="content"], | ||
:host(:not([open])) div[part="content"] .content-wrapper { | ||
min-height: 0; | ||
@@ -114,0 +117,0 @@ max-height: 0; |
@@ -6,3 +6,2 @@ import { LitElement, html, property } from 'lit-element'; | ||
const HEIGHT_CLASS = 'set-height'; | ||
const ANIMATION_CLASS = 'animating'; | ||
@@ -55,3 +54,2 @@ export class FcAccordionSection extends LitElement { | ||
this.reflectOpen(); | ||
this.content.classList.add(ANIMATION_CLASS); | ||
this.updateContentHeight(); | ||
@@ -83,3 +81,2 @@ }); | ||
this.content.classList.remove(ANIMATION_CLASS); | ||
this.content.classList.remove(HEIGHT_CLASS); | ||
@@ -86,0 +83,0 @@ } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
99718