@nys-cui/cui-section 0.2.14 → 0.2.16

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.14",
9
+ "version": "0.2.16",
10
10
  "scripts": {
11
11
  "clean": "rm -rf ./dist",
12
12
  "build": "npm run clean && cui --dep",
package/src/section.js CHANGED
@@ -125,6 +125,7 @@ export default class CUI_SECTION extends HTMLElement {
125
125
  // have the dContainer transition to the height of its inner content
126
126
  dContainer.style.height = sectionHeight + 'px';
127
127
  dContainer.style.overflow = "hidden";
128
+ dContainer.style.position = null;
128
129
 
129
130
  this.sdSection.style.removeProperty('height');
130
131
 
@@ -174,6 +175,7 @@ export default class CUI_SECTION extends HTMLElement {
174
175
  dContainer.style.height = sectionHeight + 'px';
175
176
  dContainer.style.transition = dContainerTransition;
176
177
  dContainer.style.overflow = "hidden";
178
+ dContainer.style.position = "relative";
177
179
 
178
180
  sdSection.style.setProperty("height", sdSection.offsetHeight + 'px', "important");
179
181
 
@@ -197,7 +199,7 @@ export default class CUI_SECTION extends HTMLElement {
197
199
  connectedCallback() {
198
200
 
199
201
  this.state = {
200
- sTitle: this.getAttribute('sectiontitle') || "SECTION TITLE",
202
+ sTitle: this.state.sTitle || this.getAttribute('sectiontitle') || "SECTION TITLE",
201
203
  bHideControls: this.hasAttribute("hideControls") ? true : false,
202
204
  bCollapsed: (this.getAttribute('collapsed') === "true") ? true : false,
203
205
  asStyles: (this.getAttribute('styles')) ? this.getAttribute('styles').split(',') : null
package/src/section.scss CHANGED
@@ -79,6 +79,7 @@
79
79
  &[data-collapsed="true"] {
80
80
  height: 0;
81
81
  overflow: hidden;
82
+ position: relative;
82
83
  }
83
84
 
84
85
  // Prevent margin collapse of section contents when collapsing/expanding.