@nys-cui/cui-section 0.2.9 → 0.2.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/section.js +3 -2
- package/src/section.scss +1 -0
package/package.json
CHANGED
package/src/section.js
CHANGED
|
@@ -91,7 +91,7 @@ export default class CUI_SECTION extends HTMLElement {
|
|
|
91
91
|
|
|
92
92
|
this.bLock = true;
|
|
93
93
|
|
|
94
|
-
var sectionHeight = dContainer.scrollHeight;
|
|
94
|
+
var sectionHeight = (this.sectionHeight) ? this.sectionHeight : dContainer.scrollHeight;
|
|
95
95
|
|
|
96
96
|
// have the dContainer transition to the height of its inner content
|
|
97
97
|
dContainer.style.height = sectionHeight + 'px';
|
|
@@ -122,7 +122,8 @@ export default class CUI_SECTION extends HTMLElement {
|
|
|
122
122
|
dContainer.removeAttribute('aria-expanded');
|
|
123
123
|
|
|
124
124
|
// get the height of the dContainer's inner content, regardless of its actual size
|
|
125
|
-
|
|
125
|
+
this.sectionHeight = dContainer.offsetHeight;
|
|
126
|
+
let sectionHeight = this.sectionHeight;
|
|
126
127
|
|
|
127
128
|
// temporarily disable all css transitions
|
|
128
129
|
var dContainerTransition = dContainer.style.transition;
|
package/src/section.scss
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
background: var(--section-background-color);
|
|
12
12
|
border-radius: 5px;
|
|
13
13
|
box-shadow: var(--section-box-shadow-color) var(--section-box-shadow-x) var(--section-box-shadow-y) var(--section-box-shadow-blur);
|
|
14
|
+
transition: height 0.5s ease;
|
|
14
15
|
|
|
15
16
|
header {
|
|
16
17
|
border-bottom: solid 1px var(--section-header-border-color);
|