@webqit/webflo 0.20.33 → 0.20.34

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/package.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "vanila-javascript"
13
13
  ],
14
14
  "homepage": "https://webqit.io/tooling/webflo",
15
- "version": "0.20.33",
15
+ "version": "0.20.34",
16
16
  "license": "MIT",
17
17
  "repository": {
18
18
  "type": "git",
@@ -381,7 +381,9 @@ class ModalElement extends HTMLElement {
381
381
  if (swipeDismiss || minmaxScroll) {
382
382
  requestAnimationFrame(() => {
383
383
  let left = 0, top = 0;
384
- if (!this.matches('._left._horz, ._top:not(._horz)')) {
384
+ if (this.matches('._left._horz, ._top:not(._horz)')) {
385
+ this.#viewElement.scrollTo({ top, left });
386
+ } else {
385
387
  if (this.classList.contains('_horz')) {
386
388
  viewWidth = this.#viewElement.clientWidth/* instead of offsetHeight; safari reasons */;
387
389
  left = viewWidth - this.#spacingElement.clientWidth;
@@ -389,9 +391,9 @@ class ModalElement extends HTMLElement {
389
391
  viewHeight = this.#viewElement.clientHeight/* instead of offsetHeight; safari reasons */;
390
392
  top = viewHeight - this.#spacingElement.clientHeight;
391
393
  }
392
- }
393
- if (this.#viewElement.scrollTop < top || this.#viewElement.scrollLeft < left) {
394
- this.#viewElement.scrollTo({ top, left });
394
+ if (this.#viewElement.scrollTop < top || this.#viewElement.scrollLeft < left) {
395
+ this.#viewElement.scrollTo({ top, left });
396
+ }
395
397
  }
396
398
  });
397
399
  }
@@ -1268,6 +1270,39 @@ class ModalElement extends HTMLElement {
1268
1270
  backdrop-filter 0.2s;
1269
1271
  }
1270
1272
 
1273
+ :host(._swipe-dismiss._container) {
1274
+ timeline-scope: --view-scroll;
1275
+ }
1276
+
1277
+ :host(._swipe-dismiss._container)::backdrop {
1278
+ opacity: 0;
1279
+
1280
+ animation-timing-function: linear;
1281
+ animation-fill-mode: forwards;
1282
+ animation-name: appear;
1283
+ animation-timeline: --view-scroll;
1284
+
1285
+ animation-range: 0 calc(100cqh - var(--expanse-length) - var(--minmax-length));
1286
+ }
1287
+
1288
+ :host(._swipe-dismiss._container._horz)::backdrop {
1289
+ animation-range: 0 calc(100cqw - var(--expanse-length) - var(--minmax-length));
1290
+ }
1291
+
1292
+ :host(._swipe-dismiss._container._top:not(._horz))::backdrop,
1293
+ :host(._swipe-dismiss._container._left._horz)::backdrop {
1294
+ opacity: 1;
1295
+ animation-name: disappear;
1296
+ }
1297
+
1298
+ :host(._swipe-dismiss._container._top:not(._horz))::backdrop {
1299
+ animation-range: calc(100% - (100cqh - var(--expanse-length) - var(--minmax-length))) 100%;
1300
+ }
1301
+
1302
+ :host(._swipe-dismiss._container._left._horz)::backdrop {
1303
+ animation-range: calc(100% - (100cqw - var(--expanse-length) - var(--minmax-length))) 100%;
1304
+ }
1305
+
1271
1306
  :host(:popover-open)::backdrop {
1272
1307
  backdrop-filter: blur(3px);
1273
1308
  }