@moda/om 19.7.1 → 19.7.2
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/dist/index.cjs.js +44 -52
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +44 -52
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1724,18 +1724,13 @@ RemoveScroll.classNames = {
|
|
|
1724
1724
|
};
|
|
1725
1725
|
|
|
1726
1726
|
function _extends() {
|
|
1727
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
1728
|
-
for (var
|
|
1729
|
-
var
|
|
1730
|
-
for (var
|
|
1731
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
1732
|
-
target[key] = source[key];
|
|
1733
|
-
}
|
|
1734
|
-
}
|
|
1727
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
1728
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
1729
|
+
var t = arguments[e];
|
|
1730
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
1735
1731
|
}
|
|
1736
|
-
return
|
|
1737
|
-
};
|
|
1738
|
-
return _extends.apply(this, arguments);
|
|
1732
|
+
return n;
|
|
1733
|
+
}, _extends.apply(null, arguments);
|
|
1739
1734
|
}
|
|
1740
1735
|
|
|
1741
1736
|
var propTypes = {exports: {}};
|
|
@@ -3162,18 +3157,14 @@ var FocusOn$1 = /*#__PURE__*/React.forwardRef(function (props, parentRef) {
|
|
|
3162
3157
|
}))));
|
|
3163
3158
|
});
|
|
3164
3159
|
|
|
3165
|
-
function _setPrototypeOf(
|
|
3166
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
};
|
|
3170
|
-
return _setPrototypeOf(o, p);
|
|
3160
|
+
function _setPrototypeOf(t, e) {
|
|
3161
|
+
return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {
|
|
3162
|
+
return t.__proto__ = e, t;
|
|
3163
|
+
}, _setPrototypeOf(t, e);
|
|
3171
3164
|
}
|
|
3172
3165
|
|
|
3173
|
-
function _inheritsLoose(
|
|
3174
|
-
|
|
3175
|
-
subClass.prototype.constructor = subClass;
|
|
3176
|
-
_setPrototypeOf(subClass, superClass);
|
|
3166
|
+
function _inheritsLoose(t, o) {
|
|
3167
|
+
t.prototype = Object.create(o.prototype), t.prototype.constructor = t, _setPrototypeOf(t, o);
|
|
3177
3168
|
}
|
|
3178
3169
|
|
|
3179
3170
|
function _typeof(o) {
|
|
@@ -3202,19 +3193,13 @@ function toPropertyKey(t) {
|
|
|
3202
3193
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
3203
3194
|
}
|
|
3204
3195
|
|
|
3205
|
-
function _defineProperty(
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
writable: true
|
|
3213
|
-
});
|
|
3214
|
-
} else {
|
|
3215
|
-
obj[key] = value;
|
|
3216
|
-
}
|
|
3217
|
-
return obj;
|
|
3196
|
+
function _defineProperty(e, r, t) {
|
|
3197
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
3198
|
+
value: t,
|
|
3199
|
+
enumerable: !0,
|
|
3200
|
+
configurable: !0,
|
|
3201
|
+
writable: !0
|
|
3202
|
+
}) : e[r] = t, e;
|
|
3218
3203
|
}
|
|
3219
3204
|
|
|
3220
3205
|
function withSideEffect(reducePropsToState, handleStateChangeOnClient) {
|
|
@@ -4655,6 +4640,9 @@ var alwaysContainsScroll = function alwaysContainsScroll(node) {
|
|
|
4655
4640
|
return node.tagName === 'TEXTAREA';
|
|
4656
4641
|
};
|
|
4657
4642
|
var elementCanBeScrolled = function elementCanBeScrolled(node, overflow) {
|
|
4643
|
+
if (!(node instanceof Element)) {
|
|
4644
|
+
return false;
|
|
4645
|
+
}
|
|
4658
4646
|
var styles = window.getComputedStyle(node);
|
|
4659
4647
|
return (
|
|
4660
4648
|
// not-not-scrollable
|
|
@@ -4680,9 +4668,9 @@ var locationCouldBeScrolled = function locationCouldBeScrolled(axis, node) {
|
|
|
4680
4668
|
var isScrollable = elementCouldBeScrolled(axis, current);
|
|
4681
4669
|
if (isScrollable) {
|
|
4682
4670
|
var _a = getScrollVariables(axis, current),
|
|
4683
|
-
|
|
4684
|
-
|
|
4685
|
-
if (
|
|
4671
|
+
scrollHeight = _a[1],
|
|
4672
|
+
clientHeight = _a[2];
|
|
4673
|
+
if (scrollHeight > clientHeight) {
|
|
4686
4674
|
return true;
|
|
4687
4675
|
}
|
|
4688
4676
|
}
|
|
@@ -4996,21 +4984,25 @@ var applyAttributeToOthers = function applyAttributeToOthers(originalTarget, par
|
|
|
4996
4984
|
if (elementsToKeep.has(node)) {
|
|
4997
4985
|
_deep(node);
|
|
4998
4986
|
} else {
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
4987
|
+
try {
|
|
4988
|
+
var attr = node.getAttribute(controlAttribute);
|
|
4989
|
+
var alreadyHidden = attr !== null && attr !== 'false';
|
|
4990
|
+
var counterValue = (counterMap.get(node) || 0) + 1;
|
|
4991
|
+
var markerValue = (markerCounter.get(node) || 0) + 1;
|
|
4992
|
+
counterMap.set(node, counterValue);
|
|
4993
|
+
markerCounter.set(node, markerValue);
|
|
4994
|
+
hiddenNodes.push(node);
|
|
4995
|
+
if (counterValue === 1 && alreadyHidden) {
|
|
4996
|
+
uncontrolledNodes.set(node, true);
|
|
4997
|
+
}
|
|
4998
|
+
if (markerValue === 1) {
|
|
4999
|
+
node.setAttribute(markerName, 'true');
|
|
5000
|
+
}
|
|
5001
|
+
if (!alreadyHidden) {
|
|
5002
|
+
node.setAttribute(controlAttribute, 'true');
|
|
5003
|
+
}
|
|
5004
|
+
} catch (e) {
|
|
5005
|
+
console.error('aria-hidden: cannot operate on ', node, e);
|
|
5014
5006
|
}
|
|
5015
5007
|
}
|
|
5016
5008
|
});
|