@getflip/swirl-components 0.184.1 → 0.184.3

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.
@@ -250,11 +250,26 @@ export class SwirlFileViewerPdf {
250
250
  *, *:before, *:after {
251
251
  margin: 0;
252
252
  padding: 0;
253
+ outline: 0;
254
+ }
255
+
256
+ @page {
257
+ size: a4;
258
+ margin: 0;
259
+ padding: 0;
260
+ }
261
+
262
+ body {
263
+ height: 100%;
264
+ width: 100%;
253
265
  }
254
266
 
255
267
  img {
256
268
  display: block;
269
+ max-width: 100%;
270
+ max-height: 100%;
257
271
  width: 100%;
272
+ height: auto;
258
273
  page-break-after: always;
259
274
  }
260
275
  `;
@@ -86,6 +86,7 @@ export class SwirlPopover {
86
86
  const target = event.target;
87
87
  const relatedTarget = event.relatedTarget;
88
88
  const activeElement = getActiveElement();
89
+ const swirlComponentsExcludedFromAutoClosing = ["SWIRL-TAB"];
89
90
  // Check if the focus has moved outside the popover or its trigger.
90
91
  const focusIsOutsidePopover = !this.el.contains(target) && !this.el.contains(activeElement);
91
92
  const focusIsNotOnTrigger = target !== this.triggerEl && !this.triggerEl?.contains(target);
@@ -93,7 +94,8 @@ export class SwirlPopover {
93
94
  !this.el.contains(relatedTarget || target) &&
94
95
  relatedTarget !== this.el;
95
96
  // Close the popover if the focus is outside and additional checks for Safari or WKWebView pass.
96
- if (focusIsOutsidePopover &&
97
+ if (!swirlComponentsExcludedFromAutoClosing.includes(target.tagName) &&
98
+ focusIsOutsidePopover &&
97
99
  focusIsNotOnTrigger &&
98
100
  (!isSafariOrWKWebView || extraCheckForSafariOrWKWebView)) {
99
101
  this.close();