@phillips/seldon 1.155.0 → 1.157.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.
Files changed (49) hide show
  1. package/dist/_virtual/index10.js +2 -2
  2. package/dist/_virtual/index3.js +2 -2
  3. package/dist/_virtual/index4.js +2 -2
  4. package/dist/_virtual/index5.js +2 -2
  5. package/dist/_virtual/index8.js +2 -2
  6. package/dist/_virtual/index9.js +2 -2
  7. package/dist/components/Modal/Modal.d.ts +8 -8
  8. package/dist/components/Modal/Modal.js +59 -50
  9. package/dist/components/Modal/Modal.stories.d.ts +2 -1
  10. package/dist/node_modules/ics/dist/index.js +2 -2
  11. package/dist/node_modules/ics/dist/pipeline/format.js +1 -1
  12. package/dist/node_modules/ics/dist/pipeline/index.js +1 -1
  13. package/dist/node_modules/ics/dist/pipeline/validate.js +1 -1
  14. package/dist/node_modules/ics/dist/schema/index.js +1 -1
  15. package/dist/node_modules/ics/dist/utils/index.js +1 -1
  16. package/dist/node_modules/prop-types/index.js +8 -9
  17. package/dist/node_modules/runes2/dist/index.js +1 -1
  18. package/dist/node_modules/toposort/index.js +1 -1
  19. package/dist/scss/components/ContentPeek/_contentPeek.scss +1 -1
  20. package/dist/scss/components/Modal/_modal.scss +6 -8
  21. package/dist/scss/components/Modal/_modal.stories.scss +11 -0
  22. package/package.json +1 -3
  23. package/dist/_virtual/Modal.js +0 -4
  24. package/dist/_virtual/ModalPortal.js +0 -4
  25. package/dist/_virtual/ariaAppHider.js +0 -4
  26. package/dist/_virtual/bodyTrap.js +0 -4
  27. package/dist/_virtual/classList.js +0 -4
  28. package/dist/_virtual/focusManager.js +0 -4
  29. package/dist/_virtual/index11.js +0 -4
  30. package/dist/_virtual/index12.js +0 -4
  31. package/dist/_virtual/portalOpenInstances.js +0 -4
  32. package/dist/_virtual/react-lifecycles-compat.es.js +0 -6
  33. package/dist/_virtual/safeHTMLElement.js +0 -4
  34. package/dist/_virtual/scopeTab.js +0 -4
  35. package/dist/_virtual/tabbable.js +0 -4
  36. package/dist/node_modules/exenv/index.js +0 -21
  37. package/dist/node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js +0 -63
  38. package/dist/node_modules/react-modal/lib/components/Modal.js +0 -237
  39. package/dist/node_modules/react-modal/lib/components/ModalPortal.js +0 -249
  40. package/dist/node_modules/react-modal/lib/helpers/ariaAppHider.js +0 -91
  41. package/dist/node_modules/react-modal/lib/helpers/bodyTrap.js +0 -42
  42. package/dist/node_modules/react-modal/lib/helpers/classList.js +0 -62
  43. package/dist/node_modules/react-modal/lib/helpers/focusManager.js +0 -67
  44. package/dist/node_modules/react-modal/lib/helpers/portalOpenInstances.js +0 -46
  45. package/dist/node_modules/react-modal/lib/helpers/safeHTMLElement.js +0 -15
  46. package/dist/node_modules/react-modal/lib/helpers/scopeTab.js +0 -45
  47. package/dist/node_modules/react-modal/lib/helpers/tabbable.js +0 -60
  48. package/dist/node_modules/react-modal/lib/index.js +0 -19
  49. package/dist/node_modules/warning/warning.js +0 -33
@@ -1,237 +0,0 @@
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 H } 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
- }, q = /* @__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), W = H, F = B(W), u = w, M = m(u), $ = 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 q(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
- F.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, $.polyfill)(p);
234
- process.env.NODE_ENV !== "production" && (p.setCreateHTMLElement = function(r) {
235
- return b = r;
236
- });
237
- d.default = p;
@@ -1,249 +0,0 @@
1
- import { __module as T } from "../../../../_virtual/ModalPortal.js";
2
- import $ from "react";
3
- import { p as V } from "../../../prop-types/index.js";
4
- import "../helpers/focusManager.js";
5
- import { s as z } from "../helpers/scopeTab.js";
6
- import "../helpers/ariaAppHider.js";
7
- import "../helpers/classList.js";
8
- import "../helpers/safeHTMLElement.js";
9
- import "../helpers/portalOpenInstances.js";
10
- import "../helpers/bodyTrap.js";
11
- import { __exports as G } from "../../../../_virtual/safeHTMLElement.js";
12
- import { __exports as J } from "../../../../_virtual/focusManager.js";
13
- import { __exports as Q } from "../../../../_virtual/ariaAppHider.js";
14
- import { __exports as X } from "../../../../_virtual/classList.js";
15
- import { __exports as Y } from "../../../../_virtual/portalOpenInstances.js";
16
- (function(E, O) {
17
- Object.defineProperty(O, "__esModule", {
18
- value: !0
19
- });
20
- var c = Object.assign || function(a) {
21
- for (var n = 1; n < arguments.length; n++) {
22
- var s = arguments[n];
23
- for (var e in s)
24
- Object.prototype.hasOwnProperty.call(s, e) && (a[e] = s[e]);
25
- }
26
- return a;
27
- }, A = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(a) {
28
- return typeof a;
29
- } : function(a) {
30
- return a && typeof Symbol == "function" && a.constructor === Symbol && a !== Symbol.prototype ? "symbol" : typeof a;
31
- }, R = /* @__PURE__ */ function() {
32
- function a(n, s) {
33
- for (var e = 0; e < s.length; e++) {
34
- var t = s[e];
35
- t.enumerable = t.enumerable || !1, t.configurable = !0, "value" in t && (t.writable = !0), Object.defineProperty(n, t.key, t);
36
- }
37
- }
38
- return function(n, s, e) {
39
- return s && a(n.prototype, s), e && a(n, e), n;
40
- };
41
- }(), w = $, g = V, o = m(g), D = J, p = C(D), F = z, H = m(F), k = Q, N = C(k), x = X, d = C(x), v = G, S = m(v), L = Y, M = m(L);
42
- function C(a) {
43
- if (a && a.__esModule)
44
- return a;
45
- var n = {};
46
- if (a != null)
47
- for (var s in a)
48
- Object.prototype.hasOwnProperty.call(a, s) && (n[s] = a[s]);
49
- return n.default = a, n;
50
- }
51
- function m(a) {
52
- return a && a.__esModule ? a : { default: a };
53
- }
54
- function P(a, n) {
55
- if (!(a instanceof n))
56
- throw new TypeError("Cannot call a class as a function");
57
- }
58
- function q(a, n) {
59
- if (!a)
60
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
61
- return n && (typeof n == "object" || typeof n == "function") ? n : a;
62
- }
63
- function W(a, n) {
64
- if (typeof n != "function" && n !== null)
65
- throw new TypeError("Super expression must either be null or a function, not " + typeof n);
66
- a.prototype = Object.create(n && n.prototype, { constructor: { value: a, enumerable: !1, writable: !0, configurable: !0 } }), n && (Object.setPrototypeOf ? Object.setPrototypeOf(a, n) : a.__proto__ = n);
67
- }
68
- var b = {
69
- overlay: "ReactModal__Overlay",
70
- content: "ReactModal__Content"
71
- }, j = function(n) {
72
- return n.code === "Tab" || n.keyCode === 9;
73
- }, I = function(n) {
74
- return n.code === "Escape" || n.keyCode === 27;
75
- }, h = 0, _ = function(a) {
76
- W(n, a);
77
- function n(s) {
78
- P(this, n);
79
- var e = q(this, (n.__proto__ || Object.getPrototypeOf(n)).call(this, s));
80
- return e.setOverlayRef = function(t) {
81
- e.overlay = t, e.props.overlayRef && e.props.overlayRef(t);
82
- }, e.setContentRef = function(t) {
83
- e.content = t, e.props.contentRef && e.props.contentRef(t);
84
- }, e.afterClose = function() {
85
- var t = e.props, l = t.appElement, i = t.ariaHideApp, r = t.htmlOpenClassName, u = t.bodyOpenClassName, f = t.parentSelector, y = f && f().ownerDocument || document;
86
- u && d.remove(y.body, u), r && d.remove(y.getElementsByTagName("html")[0], r), i && h > 0 && (h -= 1, h === 0 && N.show(l)), e.props.shouldFocusAfterRender && (e.props.shouldReturnFocusAfterClose ? (p.returnFocus(e.props.preventScroll), p.teardownScopedFocus()) : p.popWithoutFocus()), e.props.onAfterClose && e.props.onAfterClose(), M.default.deregister(e);
87
- }, e.open = function() {
88
- e.beforeOpen(), e.state.afterOpen && e.state.beforeClose ? (clearTimeout(e.closeTimer), e.setState({ beforeClose: !1 })) : (e.props.shouldFocusAfterRender && (p.setupScopedFocus(e.node), p.markForFocusLater()), e.setState({ isOpen: !0 }, function() {
89
- e.openAnimationFrame = requestAnimationFrame(function() {
90
- e.setState({ afterOpen: !0 }), e.props.isOpen && e.props.onAfterOpen && e.props.onAfterOpen({
91
- overlayEl: e.overlay,
92
- contentEl: e.content
93
- });
94
- });
95
- }));
96
- }, e.close = function() {
97
- e.props.closeTimeoutMS > 0 ? e.closeWithTimeout() : e.closeWithoutTimeout();
98
- }, e.focusContent = function() {
99
- return e.content && !e.contentHasFocus() && e.content.focus({ preventScroll: !0 });
100
- }, e.closeWithTimeout = function() {
101
- var t = Date.now() + e.props.closeTimeoutMS;
102
- e.setState({ beforeClose: !0, closesAt: t }, function() {
103
- e.closeTimer = setTimeout(e.closeWithoutTimeout, e.state.closesAt - Date.now());
104
- });
105
- }, e.closeWithoutTimeout = function() {
106
- e.setState({
107
- beforeClose: !1,
108
- isOpen: !1,
109
- afterOpen: !1,
110
- closesAt: null
111
- }, e.afterClose);
112
- }, e.handleKeyDown = function(t) {
113
- j(t) && (0, H.default)(e.content, t), e.props.shouldCloseOnEsc && I(t) && (t.stopPropagation(), e.requestClose(t));
114
- }, e.handleOverlayOnClick = function(t) {
115
- e.shouldClose === null && (e.shouldClose = !0), e.shouldClose && e.props.shouldCloseOnOverlayClick && (e.ownerHandlesClose() ? e.requestClose(t) : e.focusContent()), e.shouldClose = null;
116
- }, e.handleContentOnMouseUp = function() {
117
- e.shouldClose = !1;
118
- }, e.handleOverlayOnMouseDown = function(t) {
119
- !e.props.shouldCloseOnOverlayClick && t.target == e.overlay && t.preventDefault();
120
- }, e.handleContentOnClick = function() {
121
- e.shouldClose = !1;
122
- }, e.handleContentOnMouseDown = function() {
123
- e.shouldClose = !1;
124
- }, e.requestClose = function(t) {
125
- return e.ownerHandlesClose() && e.props.onRequestClose(t);
126
- }, e.ownerHandlesClose = function() {
127
- return e.props.onRequestClose;
128
- }, e.shouldBeClosed = function() {
129
- return !e.state.isOpen && !e.state.beforeClose;
130
- }, e.contentHasFocus = function() {
131
- return document.activeElement === e.content || e.content.contains(document.activeElement);
132
- }, e.buildClassName = function(t, l) {
133
- var i = (typeof l > "u" ? "undefined" : A(l)) === "object" ? l : {
134
- base: b[t],
135
- afterOpen: b[t] + "--after-open",
136
- beforeClose: b[t] + "--before-close"
137
- }, r = i.base;
138
- return e.state.afterOpen && (r = r + " " + i.afterOpen), e.state.beforeClose && (r = r + " " + i.beforeClose), typeof l == "string" && l ? r + " " + l : r;
139
- }, e.attributesFromObject = function(t, l) {
140
- return Object.keys(l).reduce(function(i, r) {
141
- return i[t + "-" + r] = l[r], i;
142
- }, {});
143
- }, e.state = {
144
- afterOpen: !1,
145
- beforeClose: !1
146
- }, e.shouldClose = null, e.moveFromContentToOverlay = null, e;
147
- }
148
- return R(n, [{
149
- key: "componentDidMount",
150
- value: function() {
151
- this.props.isOpen && this.open();
152
- }
153
- }, {
154
- key: "componentDidUpdate",
155
- value: function(e, t) {
156
- process.env.NODE_ENV !== "production" && (e.bodyOpenClassName !== this.props.bodyOpenClassName && console.warn('React-Modal: "bodyOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.'), e.htmlOpenClassName !== this.props.htmlOpenClassName && console.warn('React-Modal: "htmlOpenClassName" prop has been modified. This may cause unexpected behavior when multiple modals are open.')), this.props.isOpen && !e.isOpen ? this.open() : !this.props.isOpen && e.isOpen && this.close(), this.props.shouldFocusAfterRender && this.state.isOpen && !t.isOpen && this.focusContent();
157
- }
158
- }, {
159
- key: "componentWillUnmount",
160
- value: function() {
161
- this.state.isOpen && this.afterClose(), clearTimeout(this.closeTimer), cancelAnimationFrame(this.openAnimationFrame);
162
- }
163
- }, {
164
- key: "beforeOpen",
165
- value: function() {
166
- var e = this.props, t = e.appElement, l = e.ariaHideApp, i = e.htmlOpenClassName, r = e.bodyOpenClassName, u = e.parentSelector, f = u && u().ownerDocument || document;
167
- r && d.add(f.body, r), i && d.add(f.getElementsByTagName("html")[0], i), l && (h += 1, N.hide(t)), M.default.register(this);
168
- }
169
- // Don't steal focus from inner elements
170
- }, {
171
- key: "render",
172
- value: function() {
173
- var e = this.props, t = e.id, l = e.className, i = e.overlayClassName, r = e.defaultStyles, u = e.children, f = l ? {} : r.content, y = i ? {} : r.overlay;
174
- if (this.shouldBeClosed())
175
- return null;
176
- var K = {
177
- ref: this.setOverlayRef,
178
- className: this.buildClassName("overlay", i),
179
- style: c({}, y, this.props.style.overlay),
180
- onClick: this.handleOverlayOnClick,
181
- onMouseDown: this.handleOverlayOnMouseDown
182
- }, U = c({
183
- id: t,
184
- ref: this.setContentRef,
185
- style: c({}, f, this.props.style.content),
186
- className: this.buildClassName("content", l),
187
- tabIndex: "-1",
188
- onKeyDown: this.handleKeyDown,
189
- onMouseDown: this.handleContentOnMouseDown,
190
- onMouseUp: this.handleContentOnMouseUp,
191
- onClick: this.handleContentOnClick,
192
- role: this.props.role,
193
- "aria-label": this.props.contentLabel
194
- }, this.attributesFromObject("aria", c({ modal: !0 }, this.props.aria)), this.attributesFromObject("data", this.props.data || {}), {
195
- "data-testid": this.props.testId
196
- }), B = this.props.contentElement(U, u);
197
- return this.props.overlayElement(K, B);
198
- }
199
- }]), n;
200
- }(w.Component);
201
- _.defaultProps = {
202
- style: {
203
- overlay: {},
204
- content: {}
205
- },
206
- defaultStyles: {}
207
- }, _.propTypes = {
208
- isOpen: o.default.bool.isRequired,
209
- defaultStyles: o.default.shape({
210
- content: o.default.object,
211
- overlay: o.default.object
212
- }),
213
- style: o.default.shape({
214
- content: o.default.object,
215
- overlay: o.default.object
216
- }),
217
- className: o.default.oneOfType([o.default.string, o.default.object]),
218
- overlayClassName: o.default.oneOfType([o.default.string, o.default.object]),
219
- parentSelector: o.default.func,
220
- bodyOpenClassName: o.default.string,
221
- htmlOpenClassName: o.default.string,
222
- ariaHideApp: o.default.bool,
223
- appElement: o.default.oneOfType([o.default.instanceOf(S.default), o.default.instanceOf(v.SafeHTMLCollection), o.default.instanceOf(v.SafeNodeList), o.default.arrayOf(o.default.instanceOf(S.default))]),
224
- onAfterOpen: o.default.func,
225
- onAfterClose: o.default.func,
226
- onRequestClose: o.default.func,
227
- closeTimeoutMS: o.default.number,
228
- shouldFocusAfterRender: o.default.bool,
229
- shouldCloseOnOverlayClick: o.default.bool,
230
- shouldReturnFocusAfterClose: o.default.bool,
231
- preventScroll: o.default.bool,
232
- role: o.default.string,
233
- contentLabel: o.default.string,
234
- aria: o.default.object,
235
- data: o.default.object,
236
- children: o.default.node,
237
- shouldCloseOnEsc: o.default.bool,
238
- overlayRef: o.default.func,
239
- contentRef: o.default.func,
240
- id: o.default.string,
241
- overlayElement: o.default.func,
242
- contentElement: o.default.func,
243
- testId: o.default.string
244
- }, O.default = _, E.exports = O.default;
245
- })(T, T.exports);
246
- var me = T.exports;
247
- export {
248
- me as M
249
- };
@@ -1,91 +0,0 @@
1
- import { __exports as n } from "../../../../_virtual/ariaAppHider.js";
2
- import { w as m } from "../../../warning/warning.js";
3
- import "./safeHTMLElement.js";
4
- import { __exports as c } from "../../../../_virtual/safeHTMLElement.js";
5
- Object.defineProperty(n, "__esModule", {
6
- value: !0
7
- });
8
- n.resetState = h;
9
- n.log = A;
10
- n.assertNodeList = f;
11
- n.setElement = g;
12
- n.validateElement = s;
13
- n.hide = _;
14
- n.show = w;
15
- n.documentNotReadyOrSSRTesting = N;
16
- var v = m, p = E(v), y = c;
17
- function E(e) {
18
- return e && e.__esModule ? e : { default: e };
19
- }
20
- var t = null;
21
- function h() {
22
- t && (t.removeAttribute ? t.removeAttribute("aria-hidden") : t.length != null ? t.forEach(function(e) {
23
- return e.removeAttribute("aria-hidden");
24
- }) : document.querySelectorAll(t).forEach(function(e) {
25
- return e.removeAttribute("aria-hidden");
26
- })), t = null;
27
- }
28
- function A() {
29
- if (process.env.NODE_ENV !== "production") {
30
- var e = t || {};
31
- console.log("ariaAppHider ----------"), console.log(e.nodeName, e.className, e.id), console.log("end ariaAppHider ----------");
32
- }
33
- }
34
- function f(e, r) {
35
- if (!e || !e.length)
36
- throw new Error("react-modal: No elements were found for selector " + r + ".");
37
- }
38
- function g(e) {
39
- var r = e;
40
- if (typeof r == "string" && y.canUseDOM) {
41
- var o = document.querySelectorAll(r);
42
- f(o, r), r = o;
43
- }
44
- return t = r || t, t;
45
- }
46
- function s(e) {
47
- var r = e || t;
48
- return r ? Array.isArray(r) || r instanceof HTMLCollection || r instanceof NodeList ? r : [r] : ((0, p.default)(!1, ["react-modal: App element is not defined.", "Please use `Modal.setAppElement(el)` or set `appElement={el}`.", "This is needed so screen readers don't see main content", "when modal is opened. It is not recommended, but you can opt-out", "by setting `ariaHideApp={false}`."].join(" ")), []);
49
- }
50
- function _(e) {
51
- var r = !0, o = !1, i = void 0;
52
- try {
53
- for (var a = s(e)[Symbol.iterator](), l; !(r = (l = a.next()).done); r = !0) {
54
- var u = l.value;
55
- u.setAttribute("aria-hidden", "true");
56
- }
57
- } catch (d) {
58
- o = !0, i = d;
59
- } finally {
60
- try {
61
- !r && a.return && a.return();
62
- } finally {
63
- if (o)
64
- throw i;
65
- }
66
- }
67
- }
68
- function w(e) {
69
- var r = !0, o = !1, i = void 0;
70
- try {
71
- for (var a = s(e)[Symbol.iterator](), l; !(r = (l = a.next()).done); r = !0) {
72
- var u = l.value;
73
- u.removeAttribute("aria-hidden");
74
- }
75
- } catch (d) {
76
- o = !0, i = d;
77
- } finally {
78
- try {
79
- !r && a.return && a.return();
80
- } finally {
81
- if (o)
82
- throw i;
83
- }
84
- }
85
- }
86
- function N() {
87
- t = null;
88
- }
89
- export {
90
- n as default
91
- };
@@ -1,42 +0,0 @@
1
- import { __exports as d } from "../../../../_virtual/bodyTrap.js";
2
- import "./portalOpenInstances.js";
3
- import { __exports as i } from "../../../../_virtual/portalOpenInstances.js";
4
- Object.defineProperty(d, "__esModule", {
5
- value: !0
6
- });
7
- d.resetState = f;
8
- d.log = v;
9
- var p = i, c = u(p);
10
- function u(t) {
11
- return t && t.__esModule ? t : { default: t };
12
- }
13
- var e = void 0, o = void 0, r = [];
14
- function f() {
15
- for (var t = [e, o], n = 0; n < t.length; n++) {
16
- var a = t[n];
17
- a && a.parentNode && a.parentNode.removeChild(a);
18
- }
19
- e = o = null, r = [];
20
- }
21
- function v() {
22
- console.log("bodyTrap ----------"), console.log(r.length);
23
- for (var t = [e, o], n = 0; n < t.length; n++) {
24
- var a = t[n], l = a || {};
25
- console.log(l.nodeName, l.className, l.id);
26
- }
27
- console.log("edn bodyTrap ----------");
28
- }
29
- function s() {
30
- if (r.length === 0) {
31
- process.env.NODE_ENV !== "production" && console.warn("React-Modal: Open instances > 0 expected");
32
- return;
33
- }
34
- r[r.length - 1].focusContent();
35
- }
36
- function m(t, n) {
37
- !e && !o && (e = document.createElement("div"), e.setAttribute("data-react-modal-body-trap", ""), e.style.position = "absolute", e.style.opacity = "0", e.setAttribute("tabindex", "0"), e.addEventListener("focus", s), o = e.cloneNode(), o.addEventListener("focus", s)), r = n, r.length > 0 ? (document.body.firstChild !== e && document.body.insertBefore(e, document.body.firstChild), document.body.lastChild !== o && document.body.appendChild(o)) : (e.parentElement && e.parentElement.removeChild(e), o.parentElement && o.parentElement.removeChild(o));
38
- }
39
- c.default.subscribe(m);
40
- export {
41
- d as default
42
- };
@@ -1,62 +0,0 @@
1
- import { __exports as i } from "../../../../_virtual/classList.js";
2
- Object.defineProperty(i, "__esModule", {
3
- value: !0
4
- });
5
- i.resetState = d;
6
- i.log = m;
7
- var o = {}, a = {};
8
- function s(t, e) {
9
- t.classList.remove(e);
10
- }
11
- function d() {
12
- var t = document.getElementsByTagName("html")[0];
13
- for (var e in o)
14
- s(t, o[e]);
15
- var n = document.body;
16
- for (var r in a)
17
- s(n, a[r]);
18
- o = {}, a = {};
19
- }
20
- function m() {
21
- if (process.env.NODE_ENV !== "production") {
22
- var t = document.getElementsByTagName("html")[0].className, e = `Show tracked classes:
23
-
24
- `;
25
- e += "<html /> (" + t + `):
26
- `;
27
- for (var n in o)
28
- e += " " + n + " " + o[n] + `
29
- `;
30
- t = document.body.className, e += `
31
-
32
- doc.body (` + t + `):
33
- `;
34
- for (var r in a)
35
- e += " " + r + " " + a[r] + `
36
- `;
37
- e += `
38
- `, console.log(e);
39
- }
40
- }
41
- var u = function(e, n) {
42
- return e[n] || (e[n] = 0), e[n] += 1, n;
43
- }, v = function(e, n) {
44
- return e[n] && (e[n] -= 1), n;
45
- }, f = function(e, n, r) {
46
- r.forEach(function(c) {
47
- u(n, c), e.add(c);
48
- });
49
- }, l = function(e, n, r) {
50
- r.forEach(function(c) {
51
- v(n, c), n[c] === 0 && e.remove(c);
52
- });
53
- };
54
- i.add = function(e, n) {
55
- return f(e.classList, e.nodeName.toLowerCase() == "html" ? o : a, n.split(" "));
56
- };
57
- i.remove = function(e, n) {
58
- return l(e.classList, e.nodeName.toLowerCase() == "html" ? o : a, n.split(" "));
59
- };
60
- export {
61
- i as default
62
- };