@phillips/seldon 1.22.2 → 1.24.0
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/_virtual/Modal.js +4 -0
- package/dist/_virtual/ModalPortal.js +4 -0
- package/dist/_virtual/_commonjsHelpers.js +25 -3
- package/dist/_virtual/ariaAppHider.js +4 -0
- package/dist/_virtual/bodyTrap.js +4 -0
- package/dist/_virtual/classList.js +4 -0
- package/dist/_virtual/focusManager.js +4 -0
- package/dist/_virtual/index2.js +4 -0
- package/dist/_virtual/index3.js +4 -0
- package/dist/_virtual/index4.js +4 -0
- package/dist/_virtual/index5.js +4 -0
- package/dist/_virtual/portalOpenInstances.js +4 -0
- package/dist/_virtual/react-is.development.js +4 -0
- package/dist/_virtual/react-is.production.min.js +4 -0
- package/dist/_virtual/react-lifecycles-compat.es.js +6 -0
- package/dist/_virtual/safeHTMLElement.js +4 -0
- package/dist/_virtual/scopeTab.js +4 -0
- package/dist/_virtual/tabbable.js +4 -0
- package/dist/assets/close.svg.js +5 -0
- package/dist/components/Button/Button.d.ts +9 -0
- package/dist/components/Footer/Footer.d.ts +3 -1
- package/dist/components/Grid/Grid.d.ts +9 -0
- package/dist/components/GridItem/GridItem.d.ts +3 -1
- package/dist/components/HeroBanner/HeroBanner.d.ts +9 -0
- package/dist/components/IconButton/IconButton.d.ts +12 -0
- package/dist/components/IconButton/IconButton.js +16 -0
- package/dist/components/Input/Input.d.ts +13 -0
- package/dist/components/Link/Link.d.ts +3 -1
- package/dist/components/Link/Link.js +21 -19
- package/dist/components/LinkBlock/LinkBlock.d.ts +3 -1
- package/dist/components/LinkList/LinkList.d.ts +3 -1
- package/dist/components/Modal/Modal.d.ts +23 -0
- package/dist/components/Modal/Modal.js +45 -0
- package/dist/components/Row/Row.d.ts +3 -1
- package/dist/components/Select/Select.d.ts +9 -0
- package/dist/components/Social/Social.d.ts +3 -1
- package/dist/components/Subscribe/Subscribe.d.ts +3 -1
- package/dist/components/Text/Text.d.ts +3 -1
- package/dist/components/Text/types.d.ts +2 -2
- package/dist/components/Text/types.js +1 -1
- package/dist/components/Text/utils.js +8 -8
- package/dist/index.d.ts +2 -0
- package/dist/index.js +54 -50
- package/dist/node_modules/exenv/index.js +21 -0
- package/dist/node_modules/object-assign/index.js +55 -0
- package/dist/node_modules/prop-types/checkPropTypes.js +55 -0
- package/dist/node_modules/prop-types/factoryWithThrowingShims.js +53 -0
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +330 -0
- package/dist/node_modules/prop-types/index.js +13 -0
- package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +11 -0
- package/dist/node_modules/prop-types/lib/has.js +7 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.development.js +95 -0
- package/dist/node_modules/prop-types/node_modules/react-is/cjs/react-is.production.min.js +79 -0
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +10 -0
- package/dist/node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js +63 -0
- package/dist/node_modules/react-modal/lib/components/Modal.js +237 -0
- package/dist/node_modules/react-modal/lib/components/ModalPortal.js +249 -0
- package/dist/node_modules/react-modal/lib/helpers/ariaAppHider.js +91 -0
- package/dist/node_modules/react-modal/lib/helpers/bodyTrap.js +42 -0
- package/dist/node_modules/react-modal/lib/helpers/classList.js +62 -0
- package/dist/node_modules/react-modal/lib/helpers/focusManager.js +67 -0
- package/dist/node_modules/react-modal/lib/helpers/portalOpenInstances.js +46 -0
- package/dist/node_modules/react-modal/lib/helpers/safeHTMLElement.js +15 -0
- package/dist/node_modules/react-modal/lib/helpers/scopeTab.js +46 -0
- package/dist/node_modules/react-modal/lib/helpers/tabbable.js +62 -0
- package/dist/node_modules/react-modal/lib/index.js +19 -0
- package/dist/node_modules/warning/warning.js +33 -0
- package/dist/scss/_type.scss +6 -6
- package/dist/scss/_utils.scss +16 -16
- package/dist/scss/_vars.scss +17 -19
- package/dist/scss/components/Footer/_footer.scss +7 -7
- package/dist/scss/components/GridItem/_gridItem.scss +3 -3
- package/dist/scss/components/HeroBanner/_heroBanner.scss +4 -4
- package/dist/scss/components/IconButton/_iconButton.scss +47 -0
- package/dist/scss/components/Link/_link.scss +0 -6
- package/dist/scss/components/LinkList/_linkList.scss +1 -1
- package/dist/scss/components/Modal/_modal.scss +29 -0
- package/dist/scss/components/Modal/_modal.stories.scss +5 -0
- package/dist/scss/components/Social/_social.scss +2 -2
- package/dist/scss/components/SplitPanel/_splitPanel.scss +1 -1
- package/dist/scss/components/Subscribe/_subscribe.scss +1 -1
- package/dist/scss/styles.scss +2 -0
- package/package.json +7 -5
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { __exports as r } from "../../../../../_virtual/react-is.development.js";
|
|
2
|
+
/** @license React v16.13.1
|
|
3
|
+
* react-is.development.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/
|
|
10
|
+
var A;
|
|
11
|
+
function re() {
|
|
12
|
+
return A ? r : (A = 1, process.env.NODE_ENV !== "production" && function() {
|
|
13
|
+
var o = typeof Symbol == "function" && Symbol.for, _ = o ? Symbol.for("react.element") : 60103, T = o ? Symbol.for("react.portal") : 60106, t = o ? Symbol.for("react.fragment") : 60107, n = o ? Symbol.for("react.strict_mode") : 60108, s = o ? Symbol.for("react.profiler") : 60114, c = o ? Symbol.for("react.provider") : 60109, i = o ? Symbol.for("react.context") : 60110, v = o ? Symbol.for("react.async_mode") : 60111, f = o ? Symbol.for("react.concurrent_mode") : 60111, u = o ? Symbol.for("react.forward_ref") : 60112, E = o ? Symbol.for("react.suspense") : 60113, y = o ? Symbol.for("react.suspense_list") : 60120, d = o ? Symbol.for("react.memo") : 60115, l = o ? Symbol.for("react.lazy") : 60116, x = o ? Symbol.for("react.block") : 60121, M = o ? Symbol.for("react.fundamental") : 60117, b = o ? Symbol.for("react.responder") : 60118, p = o ? Symbol.for("react.scope") : 60119;
|
|
14
|
+
function Y(e) {
|
|
15
|
+
return typeof e == "string" || typeof e == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
16
|
+
e === t || e === f || e === s || e === n || e === E || e === y || typeof e == "object" && e !== null && (e.$$typeof === l || e.$$typeof === d || e.$$typeof === c || e.$$typeof === i || e.$$typeof === u || e.$$typeof === M || e.$$typeof === b || e.$$typeof === p || e.$$typeof === x);
|
|
17
|
+
}
|
|
18
|
+
function a(e) {
|
|
19
|
+
if (typeof e == "object" && e !== null) {
|
|
20
|
+
var C = e.$$typeof;
|
|
21
|
+
switch (C) {
|
|
22
|
+
case _:
|
|
23
|
+
var m = e.type;
|
|
24
|
+
switch (m) {
|
|
25
|
+
case v:
|
|
26
|
+
case f:
|
|
27
|
+
case t:
|
|
28
|
+
case s:
|
|
29
|
+
case n:
|
|
30
|
+
case E:
|
|
31
|
+
return m;
|
|
32
|
+
default:
|
|
33
|
+
var P = m && m.$$typeof;
|
|
34
|
+
switch (P) {
|
|
35
|
+
case i:
|
|
36
|
+
case u:
|
|
37
|
+
case l:
|
|
38
|
+
case d:
|
|
39
|
+
case c:
|
|
40
|
+
return P;
|
|
41
|
+
default:
|
|
42
|
+
return C;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
case T:
|
|
46
|
+
return C;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
var $ = v, O = f, F = i, N = c, I = _, L = u, h = t, w = l, D = d, g = T, z = s, U = n, V = E, R = !1;
|
|
51
|
+
function q(e) {
|
|
52
|
+
return R || (R = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), S(e) || a(e) === v;
|
|
53
|
+
}
|
|
54
|
+
function S(e) {
|
|
55
|
+
return a(e) === f;
|
|
56
|
+
}
|
|
57
|
+
function W(e) {
|
|
58
|
+
return a(e) === i;
|
|
59
|
+
}
|
|
60
|
+
function k(e) {
|
|
61
|
+
return a(e) === c;
|
|
62
|
+
}
|
|
63
|
+
function B(e) {
|
|
64
|
+
return typeof e == "object" && e !== null && e.$$typeof === _;
|
|
65
|
+
}
|
|
66
|
+
function G(e) {
|
|
67
|
+
return a(e) === u;
|
|
68
|
+
}
|
|
69
|
+
function K(e) {
|
|
70
|
+
return a(e) === t;
|
|
71
|
+
}
|
|
72
|
+
function X(e) {
|
|
73
|
+
return a(e) === l;
|
|
74
|
+
}
|
|
75
|
+
function Z(e) {
|
|
76
|
+
return a(e) === d;
|
|
77
|
+
}
|
|
78
|
+
function H(e) {
|
|
79
|
+
return a(e) === T;
|
|
80
|
+
}
|
|
81
|
+
function J(e) {
|
|
82
|
+
return a(e) === s;
|
|
83
|
+
}
|
|
84
|
+
function Q(e) {
|
|
85
|
+
return a(e) === n;
|
|
86
|
+
}
|
|
87
|
+
function j(e) {
|
|
88
|
+
return a(e) === E;
|
|
89
|
+
}
|
|
90
|
+
r.AsyncMode = $, r.ConcurrentMode = O, r.ContextConsumer = F, r.ContextProvider = N, r.Element = I, r.ForwardRef = L, r.Fragment = h, r.Lazy = w, r.Memo = D, r.Portal = g, r.Profiler = z, r.StrictMode = U, r.Suspense = V, r.isAsyncMode = q, r.isConcurrentMode = S, r.isContextConsumer = W, r.isContextProvider = k, r.isElement = B, r.isForwardRef = G, r.isFragment = K, r.isLazy = X, r.isMemo = Z, r.isPortal = H, r.isProfiler = J, r.isStrictMode = Q, r.isSuspense = j, r.isValidElementType = Y, r.typeOf = a;
|
|
91
|
+
}(), r);
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
re as __require
|
|
95
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { __exports as r } from "../../../../../_virtual/react-is.production.min.js";
|
|
2
|
+
/** @license React v16.13.1
|
|
3
|
+
* react-is.production.min.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
+
*
|
|
7
|
+
* This source code is licensed under the MIT license found in the
|
|
8
|
+
* LICENSE file in the root directory of this source tree.
|
|
9
|
+
*/
|
|
10
|
+
var _;
|
|
11
|
+
function g() {
|
|
12
|
+
if (_)
|
|
13
|
+
return r;
|
|
14
|
+
_ = 1;
|
|
15
|
+
var t = typeof Symbol == "function" && Symbol.for, a = t ? Symbol.for("react.element") : 60103, b = t ? Symbol.for("react.portal") : 60106, n = t ? Symbol.for("react.fragment") : 60107, c = t ? Symbol.for("react.strict_mode") : 60108, f = t ? Symbol.for("react.profiler") : 60114, i = t ? Symbol.for("react.provider") : 60109, s = t ? Symbol.for("react.context") : 60110, d = t ? Symbol.for("react.async_mode") : 60111, u = t ? Symbol.for("react.concurrent_mode") : 60111, y = t ? Symbol.for("react.forward_ref") : 60112, l = t ? Symbol.for("react.suspense") : 60113, x = t ? Symbol.for("react.suspense_list") : 60120, m = t ? Symbol.for("react.memo") : 60115, p = t ? Symbol.for("react.lazy") : 60116, C = t ? Symbol.for("react.block") : 60121, M = t ? Symbol.for("react.fundamental") : 60117, v = t ? Symbol.for("react.responder") : 60118, w = t ? Symbol.for("react.scope") : 60119;
|
|
16
|
+
function o(e) {
|
|
17
|
+
if (typeof e == "object" && e !== null) {
|
|
18
|
+
var S = e.$$typeof;
|
|
19
|
+
switch (S) {
|
|
20
|
+
case a:
|
|
21
|
+
switch (e = e.type, e) {
|
|
22
|
+
case d:
|
|
23
|
+
case u:
|
|
24
|
+
case n:
|
|
25
|
+
case f:
|
|
26
|
+
case c:
|
|
27
|
+
case l:
|
|
28
|
+
return e;
|
|
29
|
+
default:
|
|
30
|
+
switch (e = e && e.$$typeof, e) {
|
|
31
|
+
case s:
|
|
32
|
+
case y:
|
|
33
|
+
case p:
|
|
34
|
+
case m:
|
|
35
|
+
case i:
|
|
36
|
+
return e;
|
|
37
|
+
default:
|
|
38
|
+
return S;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
case b:
|
|
42
|
+
return S;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
function $(e) {
|
|
47
|
+
return o(e) === u;
|
|
48
|
+
}
|
|
49
|
+
return r.AsyncMode = d, r.ConcurrentMode = u, r.ContextConsumer = s, r.ContextProvider = i, r.Element = a, r.ForwardRef = y, r.Fragment = n, r.Lazy = p, r.Memo = m, r.Portal = b, r.Profiler = f, r.StrictMode = c, r.Suspense = l, r.isAsyncMode = function(e) {
|
|
50
|
+
return $(e) || o(e) === d;
|
|
51
|
+
}, r.isConcurrentMode = $, r.isContextConsumer = function(e) {
|
|
52
|
+
return o(e) === s;
|
|
53
|
+
}, r.isContextProvider = function(e) {
|
|
54
|
+
return o(e) === i;
|
|
55
|
+
}, r.isElement = function(e) {
|
|
56
|
+
return typeof e == "object" && e !== null && e.$$typeof === a;
|
|
57
|
+
}, r.isForwardRef = function(e) {
|
|
58
|
+
return o(e) === y;
|
|
59
|
+
}, r.isFragment = function(e) {
|
|
60
|
+
return o(e) === n;
|
|
61
|
+
}, r.isLazy = function(e) {
|
|
62
|
+
return o(e) === p;
|
|
63
|
+
}, r.isMemo = function(e) {
|
|
64
|
+
return o(e) === m;
|
|
65
|
+
}, r.isPortal = function(e) {
|
|
66
|
+
return o(e) === b;
|
|
67
|
+
}, r.isProfiler = function(e) {
|
|
68
|
+
return o(e) === f;
|
|
69
|
+
}, r.isStrictMode = function(e) {
|
|
70
|
+
return o(e) === c;
|
|
71
|
+
}, r.isSuspense = function(e) {
|
|
72
|
+
return o(e) === l;
|
|
73
|
+
}, r.isValidElementType = function(e) {
|
|
74
|
+
return typeof e == "string" || typeof e == "function" || e === n || e === u || e === f || e === c || e === l || e === x || typeof e == "object" && e !== null && (e.$$typeof === p || e.$$typeof === m || e.$$typeof === i || e.$$typeof === s || e.$$typeof === y || e.$$typeof === M || e.$$typeof === v || e.$$typeof === w || e.$$typeof === C);
|
|
75
|
+
}, r.typeOf = o, r;
|
|
76
|
+
}
|
|
77
|
+
export {
|
|
78
|
+
g as __require
|
|
79
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { __module as e } from "../../../../_virtual/index5.js";
|
|
2
|
+
import { __require as o } from "./cjs/react-is.production.min.js";
|
|
3
|
+
import { __require as t } from "./cjs/react-is.development.js";
|
|
4
|
+
var r;
|
|
5
|
+
function p() {
|
|
6
|
+
return r ? e.exports : (r = 1, process.env.NODE_ENV === "production" ? e.exports = o() : e.exports = t(), e.exports);
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
p as __require
|
|
10
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
function l() {
|
|
2
|
+
var t = this.constructor.getDerivedStateFromProps(this.props, this.state);
|
|
3
|
+
t != null && this.setState(t);
|
|
4
|
+
}
|
|
5
|
+
function p(t) {
|
|
6
|
+
function e(o) {
|
|
7
|
+
var n = this.constructor.getDerivedStateFromProps(t, o);
|
|
8
|
+
return n != null ? n : null;
|
|
9
|
+
}
|
|
10
|
+
this.setState(e.bind(this));
|
|
11
|
+
}
|
|
12
|
+
function r(t, e) {
|
|
13
|
+
try {
|
|
14
|
+
var o = this.props, n = this.state;
|
|
15
|
+
this.props = t, this.state = e, this.__reactInternalSnapshotFlag = !0, this.__reactInternalSnapshot = this.getSnapshotBeforeUpdate(
|
|
16
|
+
o,
|
|
17
|
+
n
|
|
18
|
+
);
|
|
19
|
+
} finally {
|
|
20
|
+
this.props = o, this.state = n;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
l.__suppressDeprecationWarning = !0;
|
|
24
|
+
p.__suppressDeprecationWarning = !0;
|
|
25
|
+
r.__suppressDeprecationWarning = !0;
|
|
26
|
+
function y(t) {
|
|
27
|
+
var e = t.prototype;
|
|
28
|
+
if (!e || !e.isReactComponent)
|
|
29
|
+
throw new Error("Can only polyfill class components");
|
|
30
|
+
if (typeof t.getDerivedStateFromProps != "function" && typeof e.getSnapshotBeforeUpdate != "function")
|
|
31
|
+
return t;
|
|
32
|
+
var o = null, n = null, i = null;
|
|
33
|
+
if (typeof e.componentWillMount == "function" ? o = "componentWillMount" : typeof e.UNSAFE_componentWillMount == "function" && (o = "UNSAFE_componentWillMount"), typeof e.componentWillReceiveProps == "function" ? n = "componentWillReceiveProps" : typeof e.UNSAFE_componentWillReceiveProps == "function" && (n = "UNSAFE_componentWillReceiveProps"), typeof e.componentWillUpdate == "function" ? i = "componentWillUpdate" : typeof e.UNSAFE_componentWillUpdate == "function" && (i = "UNSAFE_componentWillUpdate"), o !== null || n !== null || i !== null) {
|
|
34
|
+
var a = t.displayName || t.name, s = typeof t.getDerivedStateFromProps == "function" ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
|
|
35
|
+
throw Error(
|
|
36
|
+
`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
37
|
+
|
|
38
|
+
` + a + " uses " + s + " but also contains the following legacy lifecycles:" + (o !== null ? `
|
|
39
|
+
` + o : "") + (n !== null ? `
|
|
40
|
+
` + n : "") + (i !== null ? `
|
|
41
|
+
` + i : "") + `
|
|
42
|
+
|
|
43
|
+
The above lifecycles should be removed. Learn more about this warning here:
|
|
44
|
+
https://fb.me/react-async-component-lifecycle-hooks`
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
if (typeof t.getDerivedStateFromProps == "function" && (e.componentWillMount = l, e.componentWillReceiveProps = p), typeof e.getSnapshotBeforeUpdate == "function") {
|
|
48
|
+
if (typeof e.componentDidUpdate != "function")
|
|
49
|
+
throw new Error(
|
|
50
|
+
"Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype"
|
|
51
|
+
);
|
|
52
|
+
e.componentWillUpdate = r;
|
|
53
|
+
var c = e.componentDidUpdate;
|
|
54
|
+
e.componentDidUpdate = function(f, u, d) {
|
|
55
|
+
var h = this.__reactInternalSnapshotFlag ? this.__reactInternalSnapshot : d;
|
|
56
|
+
c.call(this, f, u, h);
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
return t;
|
|
60
|
+
}
|
|
61
|
+
export {
|
|
62
|
+
y as polyfill
|
|
63
|
+
};
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { __exports as d } from "../../../../_virtual/Modal.js";
|
|
2
|
+
import N from "react";
|
|
3
|
+
import T from "react-dom";
|
|
4
|
+
import { p as x } from "../../../prop-types/index.js";
|
|
5
|
+
import { M as A } from "./ModalPortal.js";
|
|
6
|
+
import "../helpers/ariaAppHider.js";
|
|
7
|
+
import "../helpers/safeHTMLElement.js";
|
|
8
|
+
import D from "../../../../_virtual/react-lifecycles-compat.es.js";
|
|
9
|
+
import { __exports as w } from "../../../../_virtual/safeHTMLElement.js";
|
|
10
|
+
import { __exports as q } from "../../../../_virtual/ariaAppHider.js";
|
|
11
|
+
Object.defineProperty(d, "__esModule", {
|
|
12
|
+
value: !0
|
|
13
|
+
});
|
|
14
|
+
d.bodyOpenClassName = d.portalClassName = void 0;
|
|
15
|
+
var g = Object.assign || function(r) {
|
|
16
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
17
|
+
var o = arguments[e];
|
|
18
|
+
for (var a in o)
|
|
19
|
+
Object.prototype.hasOwnProperty.call(o, a) && (r[a] = o[a]);
|
|
20
|
+
}
|
|
21
|
+
return r;
|
|
22
|
+
}, H = /* @__PURE__ */ function() {
|
|
23
|
+
function r(e, o) {
|
|
24
|
+
for (var a = 0; a < o.length; a++) {
|
|
25
|
+
var n = o[a];
|
|
26
|
+
n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return function(e, o, a) {
|
|
30
|
+
return o && r(e.prototype, o), a && r(e, a), e;
|
|
31
|
+
};
|
|
32
|
+
}(), R = N, O = m(R), U = T, _ = m(U), L = x, t = m(L), k = A, C = m(k), $ = q, W = B($), u = w, M = m(u), F = D;
|
|
33
|
+
function B(r) {
|
|
34
|
+
if (r && r.__esModule)
|
|
35
|
+
return r;
|
|
36
|
+
var e = {};
|
|
37
|
+
if (r != null)
|
|
38
|
+
for (var o in r)
|
|
39
|
+
Object.prototype.hasOwnProperty.call(r, o) && (e[o] = r[o]);
|
|
40
|
+
return e.default = r, e;
|
|
41
|
+
}
|
|
42
|
+
function m(r) {
|
|
43
|
+
return r && r.__esModule ? r : { default: r };
|
|
44
|
+
}
|
|
45
|
+
function j(r, e) {
|
|
46
|
+
if (!(r instanceof e))
|
|
47
|
+
throw new TypeError("Cannot call a class as a function");
|
|
48
|
+
}
|
|
49
|
+
function E(r, e) {
|
|
50
|
+
if (!r)
|
|
51
|
+
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
52
|
+
return e && (typeof e == "object" || typeof e == "function") ? e : r;
|
|
53
|
+
}
|
|
54
|
+
function I(r, e) {
|
|
55
|
+
if (typeof e != "function" && e !== null)
|
|
56
|
+
throw new TypeError("Super expression must either be null or a function, not " + typeof e);
|
|
57
|
+
r.prototype = Object.create(e && e.prototype, { constructor: { value: r, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(r, e) : r.__proto__ = e);
|
|
58
|
+
}
|
|
59
|
+
var V = d.portalClassName = "ReactModalPortal", z = d.bodyOpenClassName = "ReactModal__Body--open", s = u.canUseDOM && _.default.createPortal !== void 0, b = function(e) {
|
|
60
|
+
return document.createElement(e);
|
|
61
|
+
}, P = function() {
|
|
62
|
+
return s ? _.default.createPortal : _.default.unstable_renderSubtreeIntoContainer;
|
|
63
|
+
};
|
|
64
|
+
function y(r) {
|
|
65
|
+
return r();
|
|
66
|
+
}
|
|
67
|
+
var p = function(r) {
|
|
68
|
+
I(e, r);
|
|
69
|
+
function e() {
|
|
70
|
+
var o, a, n, l;
|
|
71
|
+
j(this, e);
|
|
72
|
+
for (var c = arguments.length, v = Array(c), f = 0; f < c; f++)
|
|
73
|
+
v[f] = arguments[f];
|
|
74
|
+
return l = (a = (n = E(this, (o = e.__proto__ || Object.getPrototypeOf(e)).call.apply(o, [this].concat(v))), n), n.removePortal = function() {
|
|
75
|
+
!s && _.default.unmountComponentAtNode(n.node);
|
|
76
|
+
var i = y(n.props.parentSelector);
|
|
77
|
+
i && i.contains(n.node) ? i.removeChild(n.node) : console.warn('React-Modal: "parentSelector" prop did not returned any DOM element. Make sure that the parent element is unmounted to avoid any memory leaks.');
|
|
78
|
+
}, n.portalRef = function(i) {
|
|
79
|
+
n.portal = i;
|
|
80
|
+
}, n.renderPortal = function(i) {
|
|
81
|
+
var h = P(), S = h(n, O.default.createElement(C.default, g({ defaultStyles: e.defaultStyles }, i)), n.node);
|
|
82
|
+
n.portalRef(S);
|
|
83
|
+
}, a), E(n, l);
|
|
84
|
+
}
|
|
85
|
+
return H(e, [{
|
|
86
|
+
key: "componentDidMount",
|
|
87
|
+
value: function() {
|
|
88
|
+
if (u.canUseDOM) {
|
|
89
|
+
s || (this.node = b("div")), this.node.className = this.props.portalClassName;
|
|
90
|
+
var a = y(this.props.parentSelector);
|
|
91
|
+
a.appendChild(this.node), !s && this.renderPortal(this.props);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}, {
|
|
95
|
+
key: "getSnapshotBeforeUpdate",
|
|
96
|
+
value: function(a) {
|
|
97
|
+
var n = y(a.parentSelector), l = y(this.props.parentSelector);
|
|
98
|
+
return { prevParent: n, nextParent: l };
|
|
99
|
+
}
|
|
100
|
+
}, {
|
|
101
|
+
key: "componentDidUpdate",
|
|
102
|
+
value: function(a, n, l) {
|
|
103
|
+
if (u.canUseDOM) {
|
|
104
|
+
var c = this.props, v = c.isOpen, f = c.portalClassName;
|
|
105
|
+
a.portalClassName !== f && (this.node.className = f);
|
|
106
|
+
var i = l.prevParent, h = l.nextParent;
|
|
107
|
+
h !== i && (i.removeChild(this.node), h.appendChild(this.node)), !(!a.isOpen && !v) && !s && this.renderPortal(this.props);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}, {
|
|
111
|
+
key: "componentWillUnmount",
|
|
112
|
+
value: function() {
|
|
113
|
+
if (!(!u.canUseDOM || !this.node || !this.portal)) {
|
|
114
|
+
var a = this.portal.state, n = Date.now(), l = a.isOpen && this.props.closeTimeoutMS && (a.closesAt || n + this.props.closeTimeoutMS);
|
|
115
|
+
l ? (a.beforeClose || this.portal.closeWithTimeout(), setTimeout(this.removePortal, l - n)) : this.removePortal();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}, {
|
|
119
|
+
key: "render",
|
|
120
|
+
value: function() {
|
|
121
|
+
if (!u.canUseDOM || !s)
|
|
122
|
+
return null;
|
|
123
|
+
!this.node && s && (this.node = b("div"));
|
|
124
|
+
var a = P();
|
|
125
|
+
return a(O.default.createElement(C.default, g({
|
|
126
|
+
ref: this.portalRef,
|
|
127
|
+
defaultStyles: e.defaultStyles
|
|
128
|
+
}, this.props)), this.node);
|
|
129
|
+
}
|
|
130
|
+
}], [{
|
|
131
|
+
key: "setAppElement",
|
|
132
|
+
value: function(a) {
|
|
133
|
+
W.setElement(a);
|
|
134
|
+
}
|
|
135
|
+
/* eslint-disable react/no-unused-prop-types */
|
|
136
|
+
/* eslint-enable react/no-unused-prop-types */
|
|
137
|
+
}]), e;
|
|
138
|
+
}(R.Component);
|
|
139
|
+
p.propTypes = {
|
|
140
|
+
isOpen: t.default.bool.isRequired,
|
|
141
|
+
style: t.default.shape({
|
|
142
|
+
content: t.default.object,
|
|
143
|
+
overlay: t.default.object
|
|
144
|
+
}),
|
|
145
|
+
portalClassName: t.default.string,
|
|
146
|
+
bodyOpenClassName: t.default.string,
|
|
147
|
+
htmlOpenClassName: t.default.string,
|
|
148
|
+
className: t.default.oneOfType([t.default.string, t.default.shape({
|
|
149
|
+
base: t.default.string.isRequired,
|
|
150
|
+
afterOpen: t.default.string.isRequired,
|
|
151
|
+
beforeClose: t.default.string.isRequired
|
|
152
|
+
})]),
|
|
153
|
+
overlayClassName: t.default.oneOfType([t.default.string, t.default.shape({
|
|
154
|
+
base: t.default.string.isRequired,
|
|
155
|
+
afterOpen: t.default.string.isRequired,
|
|
156
|
+
beforeClose: t.default.string.isRequired
|
|
157
|
+
})]),
|
|
158
|
+
appElement: t.default.oneOfType([t.default.instanceOf(M.default), t.default.instanceOf(u.SafeHTMLCollection), t.default.instanceOf(u.SafeNodeList), t.default.arrayOf(t.default.instanceOf(M.default))]),
|
|
159
|
+
onAfterOpen: t.default.func,
|
|
160
|
+
onRequestClose: t.default.func,
|
|
161
|
+
closeTimeoutMS: t.default.number,
|
|
162
|
+
ariaHideApp: t.default.bool,
|
|
163
|
+
shouldFocusAfterRender: t.default.bool,
|
|
164
|
+
shouldCloseOnOverlayClick: t.default.bool,
|
|
165
|
+
shouldReturnFocusAfterClose: t.default.bool,
|
|
166
|
+
preventScroll: t.default.bool,
|
|
167
|
+
parentSelector: t.default.func,
|
|
168
|
+
aria: t.default.object,
|
|
169
|
+
data: t.default.object,
|
|
170
|
+
role: t.default.string,
|
|
171
|
+
contentLabel: t.default.string,
|
|
172
|
+
shouldCloseOnEsc: t.default.bool,
|
|
173
|
+
overlayRef: t.default.func,
|
|
174
|
+
contentRef: t.default.func,
|
|
175
|
+
id: t.default.string,
|
|
176
|
+
overlayElement: t.default.func,
|
|
177
|
+
contentElement: t.default.func
|
|
178
|
+
};
|
|
179
|
+
p.defaultProps = {
|
|
180
|
+
isOpen: !1,
|
|
181
|
+
portalClassName: V,
|
|
182
|
+
bodyOpenClassName: z,
|
|
183
|
+
role: "dialog",
|
|
184
|
+
ariaHideApp: !0,
|
|
185
|
+
closeTimeoutMS: 0,
|
|
186
|
+
shouldFocusAfterRender: !0,
|
|
187
|
+
shouldCloseOnEsc: !0,
|
|
188
|
+
shouldCloseOnOverlayClick: !0,
|
|
189
|
+
shouldReturnFocusAfterClose: !0,
|
|
190
|
+
preventScroll: !1,
|
|
191
|
+
parentSelector: function() {
|
|
192
|
+
return document.body;
|
|
193
|
+
},
|
|
194
|
+
overlayElement: function(e, o) {
|
|
195
|
+
return O.default.createElement(
|
|
196
|
+
"div",
|
|
197
|
+
e,
|
|
198
|
+
o
|
|
199
|
+
);
|
|
200
|
+
},
|
|
201
|
+
contentElement: function(e, o) {
|
|
202
|
+
return O.default.createElement(
|
|
203
|
+
"div",
|
|
204
|
+
e,
|
|
205
|
+
o
|
|
206
|
+
);
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
p.defaultStyles = {
|
|
210
|
+
overlay: {
|
|
211
|
+
position: "fixed",
|
|
212
|
+
top: 0,
|
|
213
|
+
left: 0,
|
|
214
|
+
right: 0,
|
|
215
|
+
bottom: 0,
|
|
216
|
+
backgroundColor: "rgba(255, 255, 255, 0.75)"
|
|
217
|
+
},
|
|
218
|
+
content: {
|
|
219
|
+
position: "absolute",
|
|
220
|
+
top: "40px",
|
|
221
|
+
left: "40px",
|
|
222
|
+
right: "40px",
|
|
223
|
+
bottom: "40px",
|
|
224
|
+
border: "1px solid #ccc",
|
|
225
|
+
background: "#fff",
|
|
226
|
+
overflow: "auto",
|
|
227
|
+
WebkitOverflowScrolling: "touch",
|
|
228
|
+
borderRadius: "4px",
|
|
229
|
+
outline: "none",
|
|
230
|
+
padding: "20px"
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
(0, F.polyfill)(p);
|
|
234
|
+
process.env.NODE_ENV !== "production" && (p.setCreateHTMLElement = function(r) {
|
|
235
|
+
return b = r;
|
|
236
|
+
});
|
|
237
|
+
d.default = p;
|