@nys-cui/cui-section 0.2.9 → 0.2.11

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 CHANGED
@@ -6,7 +6,7 @@
6
6
  },
7
7
  "main": "./dist/js/section.js",
8
8
  "type": "module",
9
- "version": "0.2.9",
9
+ "version": "0.2.11",
10
10
  "scripts": {
11
11
  "clean": "rm -rf ./dist",
12
12
  "build": "npm run clean && cui --dep",
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
- var sectionHeight = dContainer.scrollHeight;
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
@@ -9,8 +9,9 @@
9
9
 
10
10
  section {
11
11
  background: var(--section-background-color);
12
- border-radius: 5px;
12
+ border-radius: var(--section-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);
@@ -18,6 +19,7 @@
18
19
  margin: 0.75em 0.75em 20px;
19
20
 
20
21
  h2, h3, h4, h5, h6 {
22
+ letter-spacing: var(--section-header-letter-spacing, normal);
21
23
  color: var(--section-header-text-color);
22
24
  font-family: var(--section-header-fonts);
23
25
  font-size: 20px;