@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
package/components.json
CHANGED
|
@@ -30092,11 +30092,26 @@ const SwirlFileViewerPdf = class {
|
|
|
30092
30092
|
*, *:before, *:after {
|
|
30093
30093
|
margin: 0;
|
|
30094
30094
|
padding: 0;
|
|
30095
|
+
outline: 0;
|
|
30096
|
+
}
|
|
30097
|
+
|
|
30098
|
+
@page {
|
|
30099
|
+
size: a4;
|
|
30100
|
+
margin: 0;
|
|
30101
|
+
padding: 0;
|
|
30102
|
+
}
|
|
30103
|
+
|
|
30104
|
+
body {
|
|
30105
|
+
height: 100%;
|
|
30106
|
+
width: 100%;
|
|
30095
30107
|
}
|
|
30096
30108
|
|
|
30097
30109
|
img {
|
|
30098
30110
|
display: block;
|
|
30111
|
+
max-width: 100%;
|
|
30112
|
+
max-height: 100%;
|
|
30099
30113
|
width: 100%;
|
|
30114
|
+
height: auto;
|
|
30100
30115
|
page-break-after: always;
|
|
30101
30116
|
}
|
|
30102
30117
|
`;
|
|
@@ -93,6 +93,7 @@ const SwirlPopover = class {
|
|
|
93
93
|
const target = event.target;
|
|
94
94
|
const relatedTarget = event.relatedTarget;
|
|
95
95
|
const activeElement = utils.getActiveElement();
|
|
96
|
+
const swirlComponentsExcludedFromAutoClosing = ["SWIRL-TAB"];
|
|
96
97
|
// Check if the focus has moved outside the popover or its trigger.
|
|
97
98
|
const focusIsOutsidePopover = !this.el.contains(target) && !this.el.contains(activeElement);
|
|
98
99
|
const focusIsNotOnTrigger = target !== this.triggerEl && !this.triggerEl?.contains(target);
|
|
@@ -100,7 +101,8 @@ const SwirlPopover = class {
|
|
|
100
101
|
!this.el.contains(relatedTarget || target) &&
|
|
101
102
|
relatedTarget !== this.el;
|
|
102
103
|
// Close the popover if the focus is outside and additional checks for Safari or WKWebView pass.
|
|
103
|
-
if (
|
|
104
|
+
if (!swirlComponentsExcludedFromAutoClosing.includes(target.tagName) &&
|
|
105
|
+
focusIsOutsidePopover &&
|
|
104
106
|
focusIsNotOnTrigger &&
|
|
105
107
|
(!isSafariOrWKWebView || extraCheckForSafariOrWKWebView)) {
|
|
106
108
|
this.close();
|