@phillips/seldon 1.23.0 → 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/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/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/components/IconButton/_iconButton.scss +47 -0
- package/dist/scss/components/Modal/_modal.scss +29 -0
- package/dist/scss/components/Modal/_modal.stories.scss +5 -0
- package/dist/scss/styles.scss +2 -0
- package/package.json +4 -2
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { __exports as t } from "../../../../_virtual/focusManager.js";
|
|
2
|
+
import { t as s } from "./tabbable.js";
|
|
3
|
+
Object.defineProperty(t, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
});
|
|
6
|
+
t.resetState = f;
|
|
7
|
+
t.log = v;
|
|
8
|
+
t.handleBlur = r;
|
|
9
|
+
t.handleFocus = a;
|
|
10
|
+
t.markForFocusLater = m;
|
|
11
|
+
t.returnFocus = p;
|
|
12
|
+
t.popWithoutFocus = h;
|
|
13
|
+
t.setupScopedFocus = E;
|
|
14
|
+
t.teardownScopedFocus = F;
|
|
15
|
+
var l = s, i = d(l);
|
|
16
|
+
function d(e) {
|
|
17
|
+
return e && e.__esModule ? e : { default: e };
|
|
18
|
+
}
|
|
19
|
+
var n = [], u = null, c = !1;
|
|
20
|
+
function f() {
|
|
21
|
+
n = [];
|
|
22
|
+
}
|
|
23
|
+
function v() {
|
|
24
|
+
process.env.NODE_ENV !== "production" && (console.log("focusManager ----------"), n.forEach(function(e) {
|
|
25
|
+
var o = e || {};
|
|
26
|
+
console.log(o.nodeName, o.className, o.id);
|
|
27
|
+
}), console.log("end focusManager ----------"));
|
|
28
|
+
}
|
|
29
|
+
function r() {
|
|
30
|
+
c = !0;
|
|
31
|
+
}
|
|
32
|
+
function a() {
|
|
33
|
+
if (c) {
|
|
34
|
+
if (c = !1, !u)
|
|
35
|
+
return;
|
|
36
|
+
setTimeout(function() {
|
|
37
|
+
if (!u.contains(document.activeElement)) {
|
|
38
|
+
var e = (0, i.default)(u)[0] || u;
|
|
39
|
+
e.focus();
|
|
40
|
+
}
|
|
41
|
+
}, 0);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function m() {
|
|
45
|
+
n.push(document.activeElement);
|
|
46
|
+
}
|
|
47
|
+
function p() {
|
|
48
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, o = null;
|
|
49
|
+
try {
|
|
50
|
+
n.length !== 0 && (o = n.pop(), o.focus({ preventScroll: e }));
|
|
51
|
+
return;
|
|
52
|
+
} catch {
|
|
53
|
+
console.warn(["You tried to return focus to", o, "but it is not in the DOM anymore"].join(" "));
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function h() {
|
|
57
|
+
n.length > 0 && n.pop();
|
|
58
|
+
}
|
|
59
|
+
function E(e) {
|
|
60
|
+
u = e, window.addEventListener ? (window.addEventListener("blur", r, !1), document.addEventListener("focus", a, !0)) : (window.attachEvent("onBlur", r), document.attachEvent("onFocus", a));
|
|
61
|
+
}
|
|
62
|
+
function F() {
|
|
63
|
+
u = null, window.addEventListener ? (window.removeEventListener("blur", r), document.removeEventListener("focus", a)) : (window.detachEvent("onBlur", r), document.detachEvent("onFocus", a));
|
|
64
|
+
}
|
|
65
|
+
export {
|
|
66
|
+
t as default
|
|
67
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { __exports as r } from "../../../../_virtual/portalOpenInstances.js";
|
|
2
|
+
Object.defineProperty(r, "__esModule", {
|
|
3
|
+
value: !0
|
|
4
|
+
});
|
|
5
|
+
r.log = c;
|
|
6
|
+
r.resetState = l;
|
|
7
|
+
function i(s, e) {
|
|
8
|
+
if (!(s instanceof e))
|
|
9
|
+
throw new TypeError("Cannot call a class as a function");
|
|
10
|
+
}
|
|
11
|
+
var a = function s() {
|
|
12
|
+
var e = this;
|
|
13
|
+
i(this, s), this.register = function(n) {
|
|
14
|
+
if (e.openInstances.indexOf(n) !== -1) {
|
|
15
|
+
process.env.NODE_ENV !== "production" && console.warn("React-Modal: Cannot register modal instance that's already open");
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
e.openInstances.push(n), e.emit("register");
|
|
19
|
+
}, this.deregister = function(n) {
|
|
20
|
+
var t = e.openInstances.indexOf(n);
|
|
21
|
+
if (t === -1) {
|
|
22
|
+
process.env.NODE_ENV !== "production" && console.warn("React-Modal: Unable to deregister " + n + " as it was never registered");
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
e.openInstances.splice(t, 1), e.emit("deregister");
|
|
26
|
+
}, this.subscribe = function(n) {
|
|
27
|
+
e.subscribers.push(n);
|
|
28
|
+
}, this.emit = function(n) {
|
|
29
|
+
e.subscribers.forEach(function(t) {
|
|
30
|
+
return t(
|
|
31
|
+
n,
|
|
32
|
+
// shallow copy to avoid accidental mutation
|
|
33
|
+
e.openInstances.slice()
|
|
34
|
+
);
|
|
35
|
+
});
|
|
36
|
+
}, this.openInstances = [], this.subscribers = [];
|
|
37
|
+
}, o = new a();
|
|
38
|
+
function c() {
|
|
39
|
+
console.log("portalOpenInstances ----------"), console.log(o.openInstances.length), o.openInstances.forEach(function(s) {
|
|
40
|
+
return console.log(s);
|
|
41
|
+
}), console.log("end portalOpenInstances ----------");
|
|
42
|
+
}
|
|
43
|
+
function l() {
|
|
44
|
+
o = new a();
|
|
45
|
+
}
|
|
46
|
+
r.default = o;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { __exports as e } from "../../../../_virtual/safeHTMLElement.js";
|
|
2
|
+
import { e as t } from "../../../exenv/index.js";
|
|
3
|
+
Object.defineProperty(e, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
});
|
|
6
|
+
e.canUseDOM = e.SafeNodeList = e.SafeHTMLCollection = void 0;
|
|
7
|
+
var o = t, r = i(o);
|
|
8
|
+
function i(n) {
|
|
9
|
+
return n && n.__esModule ? n : { default: n };
|
|
10
|
+
}
|
|
11
|
+
var a = r.default, l = a.canUseDOM ? window.HTMLElement : {};
|
|
12
|
+
e.SafeHTMLCollection = a.canUseDOM ? window.HTMLCollection : {};
|
|
13
|
+
e.SafeNodeList = a.canUseDOM ? window.NodeList : {};
|
|
14
|
+
e.canUseDOM = a.canUseDOM;
|
|
15
|
+
e.default = l;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { __module as s } from "../../../../_virtual/scopeTab.js";
|
|
2
|
+
import { t as _ } from "./tabbable.js";
|
|
3
|
+
(function(c, f) {
|
|
4
|
+
Object.defineProperty(f, "__esModule", {
|
|
5
|
+
value: !0
|
|
6
|
+
}), f.default = g;
|
|
7
|
+
var d = _, p = m(d);
|
|
8
|
+
function m(e) {
|
|
9
|
+
return e && e.__esModule ? e : { default: e };
|
|
10
|
+
}
|
|
11
|
+
function v() {
|
|
12
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : document;
|
|
13
|
+
return e.activeElement.shadowRoot ? v(e.activeElement.shadowRoot) : e.activeElement;
|
|
14
|
+
}
|
|
15
|
+
function g(e, r) {
|
|
16
|
+
var a = (0, p.default)(e);
|
|
17
|
+
if (!a.length) {
|
|
18
|
+
r.preventDefault();
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
var t = void 0, n = r.shiftKey, o = a[0], u = a[a.length - 1], i = v();
|
|
22
|
+
if (e === i) {
|
|
23
|
+
if (!n)
|
|
24
|
+
return;
|
|
25
|
+
t = u;
|
|
26
|
+
}
|
|
27
|
+
if (u === i && !n && (t = o), o === i && n && (t = u), t) {
|
|
28
|
+
r.preventDefault(), t.focus();
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
var b = /(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent), h = b != null && b[1] != "Chrome" && /\biPod\b|\biPad\b/g.exec(navigator.userAgent) == null;
|
|
32
|
+
if (h) {
|
|
33
|
+
var l = a.indexOf(i);
|
|
34
|
+
if (l > -1 && (l += n ? -1 : 1), t = a[l], typeof t == "undefined") {
|
|
35
|
+
r.preventDefault(), t = n ? u : o, t.focus();
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
r.preventDefault(), t.focus();
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
c.exports = f.default;
|
|
42
|
+
})(s, s.exports);
|
|
43
|
+
var D = s.exports;
|
|
44
|
+
export {
|
|
45
|
+
D as s
|
|
46
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { __module as n } from "../../../../_virtual/tabbable.js";
|
|
2
|
+
(function(u, a) {
|
|
3
|
+
Object.defineProperty(a, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), a.default = i;
|
|
6
|
+
/*!
|
|
7
|
+
* Adapted from jQuery UI core
|
|
8
|
+
*
|
|
9
|
+
* http://jqueryui.com
|
|
10
|
+
*
|
|
11
|
+
* Copyright 2014 jQuery Foundation and other contributors
|
|
12
|
+
* Released under the MIT license.
|
|
13
|
+
* http://jquery.org/license
|
|
14
|
+
*
|
|
15
|
+
* http://api.jqueryui.com/category/ui-core/
|
|
16
|
+
*/
|
|
17
|
+
var d = "none", s = "contents", f = /input|select|textarea|button|object|iframe/;
|
|
18
|
+
function c(t, e) {
|
|
19
|
+
return e.getPropertyValue("overflow") !== "visible" || // if 'overflow: visible' set, check if there is actually any overflow
|
|
20
|
+
t.scrollWidth <= 0 && t.scrollHeight <= 0;
|
|
21
|
+
}
|
|
22
|
+
function b(t) {
|
|
23
|
+
var e = t.offsetWidth <= 0 && t.offsetHeight <= 0;
|
|
24
|
+
if (e && !t.innerHTML)
|
|
25
|
+
return !0;
|
|
26
|
+
try {
|
|
27
|
+
var r = window.getComputedStyle(t), o = r.getPropertyValue("display");
|
|
28
|
+
return e ? o !== s && c(t, r) : o === d;
|
|
29
|
+
} catch {
|
|
30
|
+
return console.warn("Failed to inspect element style"), !1;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
function l(t) {
|
|
34
|
+
for (var e = t, r = t.getRootNode && t.getRootNode(); e && e !== document.body; ) {
|
|
35
|
+
if (r && e === r && (e = r.host.parentNode), b(e))
|
|
36
|
+
return !1;
|
|
37
|
+
e = e.parentNode;
|
|
38
|
+
}
|
|
39
|
+
return !0;
|
|
40
|
+
}
|
|
41
|
+
function v(t, e) {
|
|
42
|
+
var r = t.nodeName.toLowerCase(), o = f.test(r) && !t.disabled || r === "a" && t.href || e;
|
|
43
|
+
return o && l(t);
|
|
44
|
+
}
|
|
45
|
+
function p(t) {
|
|
46
|
+
var e = t.getAttribute("tabindex");
|
|
47
|
+
e === null && (e = void 0);
|
|
48
|
+
var r = isNaN(e);
|
|
49
|
+
return (r || e >= 0) && v(t, !r);
|
|
50
|
+
}
|
|
51
|
+
function i(t) {
|
|
52
|
+
var e = [].slice.call(t.querySelectorAll("*"), 0).reduce(function(r, o) {
|
|
53
|
+
return r.concat(o.shadowRoot ? i(o.shadowRoot) : [o]);
|
|
54
|
+
}, []);
|
|
55
|
+
return e.filter(p);
|
|
56
|
+
}
|
|
57
|
+
u.exports = a.default;
|
|
58
|
+
})(n, n.exports);
|
|
59
|
+
var g = n.exports;
|
|
60
|
+
export {
|
|
61
|
+
g as t
|
|
62
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { getDefaultExportFromCjs as d } from "../../../_virtual/_commonjsHelpers.js";
|
|
2
|
+
import { __module as r } from "../../../_virtual/index2.js";
|
|
3
|
+
import "./components/Modal.js";
|
|
4
|
+
import { __exports as f } from "../../../_virtual/Modal.js";
|
|
5
|
+
(function(o, t) {
|
|
6
|
+
Object.defineProperty(t, "__esModule", {
|
|
7
|
+
value: !0
|
|
8
|
+
});
|
|
9
|
+
var a = f, l = u(a);
|
|
10
|
+
function u(e) {
|
|
11
|
+
return e && e.__esModule ? e : { default: e };
|
|
12
|
+
}
|
|
13
|
+
t.default = l.default, o.exports = t.default;
|
|
14
|
+
})(r, r.exports);
|
|
15
|
+
var i = r.exports;
|
|
16
|
+
const n = /* @__PURE__ */ d(i);
|
|
17
|
+
export {
|
|
18
|
+
n as default
|
|
19
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var c = process.env.NODE_ENV !== "production", i = function() {
|
|
2
|
+
};
|
|
3
|
+
if (c) {
|
|
4
|
+
var g = function(e, r) {
|
|
5
|
+
var a = arguments.length;
|
|
6
|
+
r = new Array(a > 1 ? a - 1 : 0);
|
|
7
|
+
for (var n = 1; n < a; n++)
|
|
8
|
+
r[n - 1] = arguments[n];
|
|
9
|
+
var u = 0, t = "Warning: " + e.replace(/%s/g, function() {
|
|
10
|
+
return r[u++];
|
|
11
|
+
});
|
|
12
|
+
typeof console != "undefined" && console.error(t);
|
|
13
|
+
try {
|
|
14
|
+
throw new Error(t);
|
|
15
|
+
} catch {
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
i = function(o, e, r) {
|
|
19
|
+
var a = arguments.length;
|
|
20
|
+
r = new Array(a > 2 ? a - 2 : 0);
|
|
21
|
+
for (var n = 2; n < a; n++)
|
|
22
|
+
r[n - 2] = arguments[n];
|
|
23
|
+
if (e === void 0)
|
|
24
|
+
throw new Error(
|
|
25
|
+
"`warning(condition, format, ...args)` requires a warning message argument"
|
|
26
|
+
);
|
|
27
|
+
o || g.apply(null, [e].concat(r));
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
var s = i;
|
|
31
|
+
export {
|
|
32
|
+
s as w
|
|
33
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
.#{$px}-icon-button {
|
|
2
|
+
background-color: unset;
|
|
3
|
+
border: unset;
|
|
4
|
+
color: $text-color;
|
|
5
|
+
min-width: unset;
|
|
6
|
+
padding: unset;
|
|
7
|
+
|
|
8
|
+
& > svg {
|
|
9
|
+
fill: $pure-black;
|
|
10
|
+
height: 100%;
|
|
11
|
+
margin-inline-end: unset;
|
|
12
|
+
width: 100%;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&:hover {
|
|
16
|
+
background-color: unset;
|
|
17
|
+
opacity: 0.75;
|
|
18
|
+
|
|
19
|
+
& > svg {
|
|
20
|
+
fill: $pure-black;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:focus {
|
|
25
|
+
background-color: unset;
|
|
26
|
+
fill: $pure-black;
|
|
27
|
+
|
|
28
|
+
& > svg {
|
|
29
|
+
fill: $pure-black;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&--sm {
|
|
34
|
+
height: 1rem;
|
|
35
|
+
width: 1rem;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&--md {
|
|
39
|
+
height: 1.5rem;
|
|
40
|
+
width: 1.5rem;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&--lg {
|
|
44
|
+
height: 2rem;
|
|
45
|
+
width: 2rem;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@import '../../vars';
|
|
2
|
+
@import '../../utils';
|
|
3
|
+
|
|
4
|
+
.#{$px}-modal {
|
|
5
|
+
background-color: white;
|
|
6
|
+
left: 50%;
|
|
7
|
+
max-height: 100%;
|
|
8
|
+
max-width: 100%;
|
|
9
|
+
overflow: auto;
|
|
10
|
+
padding: 2rem;
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 50%;
|
|
13
|
+
transform: translate(-50%, -50%);
|
|
14
|
+
|
|
15
|
+
&__overlay {
|
|
16
|
+
background-color: rgba(0, 0, 0, 75%);
|
|
17
|
+
height: 100%;
|
|
18
|
+
left: 0;
|
|
19
|
+
position: fixed;
|
|
20
|
+
top: 0;
|
|
21
|
+
width: 100%;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&__close {
|
|
25
|
+
position: absolute;
|
|
26
|
+
right: 0.4rem;
|
|
27
|
+
top: 0.4rem;
|
|
28
|
+
}
|
|
29
|
+
}
|
package/dist/scss/styles.scss
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
// ⚛️ Components
|
|
11
11
|
@import 'components/Button/button';
|
|
12
|
+
@import 'components/IconButton/iconButton';
|
|
12
13
|
|
|
13
14
|
// @import 'components/DatePicker/datePicker';
|
|
14
15
|
@import 'components/Footer/footer';
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
@import 'components/LinkBlock/linkBlock';
|
|
28
29
|
@import 'components/LinkList/linkList';
|
|
29
30
|
@import 'components/Text/text';
|
|
31
|
+
@import 'components/Modal/modal';
|
|
30
32
|
|
|
31
33
|
// 📑 Pages
|
|
32
34
|
@import 'pages/page';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phillips/seldon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.24.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/PhillipsAuctionHouse/seldon"
|
|
@@ -39,7 +39,8 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"classnames": "^2.5.1",
|
|
42
|
-
"flatpickr": "^4.6.13"
|
|
42
|
+
"flatpickr": "^4.6.13",
|
|
43
|
+
"react-modal": "^3.16.1"
|
|
43
44
|
},
|
|
44
45
|
"devDependencies": {
|
|
45
46
|
"@chromatic-com/storybook": "^1.5.0",
|
|
@@ -63,6 +64,7 @@
|
|
|
63
64
|
"@types/color": "^3.0.6",
|
|
64
65
|
"@types/react": "^18.3.3",
|
|
65
66
|
"@types/react-dom": "^18.0.11",
|
|
67
|
+
"@types/react-modal": "^3.16.3",
|
|
66
68
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
67
69
|
"@typescript-eslint/parser": "^5.62.0",
|
|
68
70
|
"@vitejs/plugin-react": "^4.3.0",
|