@getflip/swirl-components 0.3.0 → 0.3.1

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.
@@ -158,6 +158,9 @@ const FlipPopover = class {
158
158
  strategy: "fixed",
159
159
  });
160
160
  };
161
+ this.onCloseButtonClick = () => {
162
+ this.close();
163
+ };
161
164
  }
162
165
  componentDidLoad() {
163
166
  this.connectTrigger();
@@ -260,7 +263,7 @@ const FlipPopover = class {
260
263
  return (index.h(index.Host, { id: this.popoverId, onFocusout: this.onFocusOut }, index.h("div", { class: className, onKeyDown: this.onKeydown }, index.h("div", { "aria-hidden": !this.active ? "true" : "false", "aria-label": this.label, class: "popover__content", role: "dialog", tabindex: "-1", ref: (el) => (this.contentContainer = el), style: {
261
264
  top: Boolean(this.position) ? `${(_a = this.position) === null || _a === void 0 ? void 0 : _a.y}px` : "",
262
265
  left: Boolean(this.position) ? `${(_b = this.position) === null || _b === void 0 ? void 0 : _b.x}px` : "",
263
- } }, index.h("span", { class: "popover__handle" }), index.h("div", { class: "popover__scroll-container", ref: (el) => (this.scrollContainer = el) }, index.h("slot", null))), this.active && (index.h("div", { class: "popover__backdrop", onClick: this.close })))));
266
+ } }, index.h("span", { class: "popover__handle" }), index.h("div", { class: "popover__scroll-container", ref: (el) => (this.scrollContainer = el) }, index.h("slot", null))), this.active && (index.h("div", { class: "popover__backdrop", onClick: this.onCloseButtonClick })))));
264
267
  }
265
268
  get el() { return index.getElement(this); }
266
269
  };