@getflip/swirl-components 0.119.0 → 0.120.0

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.
@@ -9,6 +9,7 @@ export class SwirlImageGrid {
9
9
  }
10
10
  };
11
11
  this.aspectRatio = "1/1";
12
+ this.label = undefined;
12
13
  this.items = [];
13
14
  }
14
15
  componentWillLoad() {
@@ -16,7 +17,7 @@ export class SwirlImageGrid {
16
17
  }
17
18
  render() {
18
19
  const className = classnames("image-grid", `image-grid--item-count-${Math.min(4, this.items.length)}`);
19
- return (h(Host, null, h("div", { class: className, role: "list", style: { aspectRatio: this.aspectRatio } }, h("slot", { onSlotchange: this.updateItems }))));
20
+ return (h(Host, null, h("div", { "aria-label": this.label, class: className, role: "list", style: { aspectRatio: this.aspectRatio } }, h("slot", { onSlotchange: this.updateItems }))));
20
21
  }
21
22
  static get is() { return "swirl-image-grid"; }
22
23
  static get encapsulation() { return "shadow"; }
@@ -49,6 +50,23 @@ export class SwirlImageGrid {
49
50
  "attribute": "aspect-ratio",
50
51
  "reflect": false,
51
52
  "defaultValue": "\"1/1\""
53
+ },
54
+ "label": {
55
+ "type": "string",
56
+ "mutable": false,
57
+ "complexType": {
58
+ "original": "string",
59
+ "resolved": "string",
60
+ "references": {}
61
+ },
62
+ "required": false,
63
+ "optional": true,
64
+ "docs": {
65
+ "tags": [],
66
+ "text": ""
67
+ },
68
+ "attribute": "label",
69
+ "reflect": false
52
70
  }
53
71
  };
54
72
  }
@@ -225,14 +225,14 @@ export class SwirlPopover {
225
225
  }
226
226
  lockBodyScroll() {
227
227
  const mobile = isMobileViewport();
228
- if (!mobile || this.disableScrollLock) {
228
+ if (!mobile || this.disableScrollLock || !Boolean(this.scrollContainer)) {
229
229
  return;
230
230
  }
231
231
  disableBodyScroll(this.scrollContainer);
232
232
  }
233
233
  unlockBodyScroll() {
234
234
  const mobile = isMobileViewport();
235
- if (!mobile || this.disableScrollLock) {
235
+ if (!mobile || this.disableScrollLock || !Boolean(this.scrollContainer)) {
236
236
  return;
237
237
  }
238
238
  enableBodyScroll(this.scrollContainer);