@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.
- package/components.json +1 -1
- package/dist/cjs/swirl-file-viewer_7.cjs.entry.js +15 -0
- package/dist/cjs/swirl-popover_2.cjs.entry.js +3 -1
- package/dist/collection/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/collection/components/swirl-file-viewer/viewers/swirl-file-viewer-pdf/swirl-file-viewer-pdf.js +15 -0
- package/dist/collection/components/swirl-popover/swirl-popover.js +3 -1
- package/dist/components/assets/pdfjs/pdf.worker.min.js +1 -1
- package/dist/components/swirl-file-viewer-pdf2.js +15 -0
- package/dist/components/swirl-popover2.js +3 -1
- package/dist/esm/swirl-file-viewer_7.entry.js +15 -0
- package/dist/esm/swirl-popover_2.entry.js +3 -1
- package/dist/swirl-components/p-0fb68fa4.entry.js +1 -0
- package/dist/swirl-components/{p-23ad09e2.entry.js → p-cc1838df.entry.js} +1 -1
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/package.json +1 -1
- package/dist/swirl-components/p-96744196.entry.js +0 -1
|
@@ -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 (
|
|
97
|
+
if (!swirlComponentsExcludedFromAutoClosing.includes(target.tagName) &&
|
|
98
|
+
focusIsOutsidePopover &&
|
|
97
99
|
focusIsNotOnTrigger &&
|
|
98
100
|
(!isSafariOrWKWebView || extraCheckForSafariOrWKWebView)) {
|
|
99
101
|
this.close();
|