unpoly-rails 3.9.2 → 3.9.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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/assets/unpoly/unpoly.css +1 -0
- data/assets/unpoly/unpoly.es6.js +23 -15
- data/assets/unpoly/unpoly.es6.min.js +1 -1
- data/assets/unpoly/unpoly.js +23 -15
- data/assets/unpoly/unpoly.min.css +1 -1
- data/assets/unpoly/unpoly.min.js +1 -1
- data/lib/unpoly/rails/util.rb +13 -7
- data/lib/unpoly/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c6831a0bfebe95987455e4915056cf4ad5825ee247f90dfdceecf19a28eefea
|
4
|
+
data.tar.gz: 35b6daab0dee551131eb7b37c6ea395412b518e5278748dce5d6d6fab6b17409
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3fca5ae5d5803d90bb4e245aee670303798005c4eb1d5cebb046eafe4414eec4e62e9a6bce17574a24e35a3d5cdde0320f6eca578285b53d56d915a8a8032f4
|
7
|
+
data.tar.gz: eed4b071eaea2b83ebdc3e63bea474303a1ff0a0c2f4eb512b9b0a4caba877daa2b627a62799f334c5a4657f70d03d1491b57c727d0f311d4d0d479e2d7196a4
|
data/README.md
CHANGED
data/assets/unpoly/unpoly.css
CHANGED
data/assets/unpoly/unpoly.es6.js
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
/***/ (() => {
|
6
6
|
|
7
7
|
window.up = {
|
8
|
-
version: '3.9.
|
8
|
+
version: '3.9.3'
|
9
9
|
};
|
10
10
|
|
11
11
|
|
@@ -4743,6 +4743,7 @@ up.Layer.Overlay = class Overlay extends up.Layer {
|
|
4743
4743
|
'dismissable',
|
4744
4744
|
'dismissLabel',
|
4745
4745
|
'dismissAriaLabel',
|
4746
|
+
'trapFocus',
|
4746
4747
|
'onOpened',
|
4747
4748
|
'onAccept',
|
4748
4749
|
'onAccepted',
|
@@ -5671,33 +5672,38 @@ up.OverlayFocus = class OverlayFocus {
|
|
5671
5672
|
constructor(layer) {
|
5672
5673
|
this._layer = layer;
|
5673
5674
|
this._focusElement = this._layer.getFocusElement();
|
5675
|
+
this._trapFocus = this._layer.trapFocus;
|
5674
5676
|
}
|
5675
5677
|
moveToFront() {
|
5676
|
-
if (this.
|
5678
|
+
if (this._active) {
|
5677
5679
|
return;
|
5678
5680
|
}
|
5679
|
-
this.
|
5680
|
-
this._untrapFocus = up.on('focusin', event => this._onFocus(event));
|
5681
|
+
this._active = true;
|
5681
5682
|
this._unsetAttrs = e.setTemporaryAttrs(this._focusElement, {
|
5682
5683
|
'tabindex': '0',
|
5683
5684
|
'role': 'dialog',
|
5684
|
-
'aria-modal':
|
5685
|
+
'aria-modal': this._trapFocus.toString()
|
5685
5686
|
});
|
5686
|
-
|
5687
|
-
|
5687
|
+
if (this._trapFocus) {
|
5688
|
+
this._untrapFocus = up.on('focusin', event => this._onFocus(event));
|
5689
|
+
this._focusTrapBefore = e.affix(this._focusElement, 'beforebegin', 'up-focus-trap[tabindex=0]');
|
5690
|
+
this._focusTrapAfter = e.affix(this._focusElement, 'afterend', 'up-focus-trap[tabindex=0]');
|
5691
|
+
}
|
5688
5692
|
}
|
5689
5693
|
moveToBack() {
|
5690
5694
|
this.teardown();
|
5691
5695
|
}
|
5692
5696
|
teardown() {
|
5693
|
-
if (!this.
|
5697
|
+
if (!this._active) {
|
5694
5698
|
return;
|
5695
5699
|
}
|
5696
|
-
this.
|
5697
|
-
this._untrapFocus();
|
5700
|
+
this._active = false;
|
5698
5701
|
this._unsetAttrs();
|
5699
|
-
this.
|
5700
|
-
|
5702
|
+
if (this._trapFocus) {
|
5703
|
+
this._untrapFocus();
|
5704
|
+
this._focusTrapBefore.remove();
|
5705
|
+
this._focusTrapAfter.remove();
|
5706
|
+
}
|
5701
5707
|
}
|
5702
5708
|
_onFocus(event) {
|
5703
5709
|
const { target } = event;
|
@@ -6692,13 +6698,13 @@ up.Request.Cache = class Cache {
|
|
6692
6698
|
}
|
6693
6699
|
reindex(request) {
|
6694
6700
|
this._delete(request);
|
6701
|
+
delete request.cacheRoute;
|
6695
6702
|
this.put(request);
|
6696
6703
|
}
|
6697
6704
|
_delete(request) {
|
6698
6705
|
var _a;
|
6699
6706
|
u.remove(this._requests, request);
|
6700
6707
|
(_a = request.cacheRoute) === null || _a === void 0 ? void 0 : _a.delete(request);
|
6701
|
-
delete request.cacheRoute;
|
6702
6708
|
}
|
6703
6709
|
_getRoute(request) {
|
6704
6710
|
var _a, _b;
|
@@ -9694,7 +9700,8 @@ up.layer = (function () {
|
|
9694
9700
|
dismissLabel: '×',
|
9695
9701
|
dismissAriaLabel: 'Dismiss dialog',
|
9696
9702
|
dismissable: true,
|
9697
|
-
history: 'auto'
|
9703
|
+
history: 'auto',
|
9704
|
+
trapFocus: true,
|
9698
9705
|
},
|
9699
9706
|
cover: {
|
9700
9707
|
mainTargets: ['[up-main~=cover]']
|
@@ -9727,7 +9734,8 @@ up.layer = (function () {
|
|
9727
9734
|
position: 'bottom',
|
9728
9735
|
size: 'medium',
|
9729
9736
|
align: 'left',
|
9730
|
-
dismissable: 'outside key'
|
9737
|
+
dismissable: 'outside key',
|
9738
|
+
trapFocus: false,
|
9731
9739
|
},
|
9732
9740
|
foreignOverlaySelectors: ['dialog']
|
9733
9741
|
};
|