@phillips/seldon 1.118.1 → 1.119.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/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js +39 -38
- package/dist/components/Search/Search.js +23 -22
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +28 -28
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +62 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +28 -28
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +33 -31
- package/dist/scss/components/Search/SearchResults/_searchResults.scss +8 -0
- package/dist/scss/components/SeldonImage/_seldonImage.scss +3 -3
- package/dist/scss/patterns/SaleHeaderBanner/_saleHeaderBanner.scss +1 -0
- package/package.json +2 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -64
- /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -0
- /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -0
- /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -0
- /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -0
- /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -0
- /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/tslib/tslib.es6.js +0 -0
|
@@ -1,68 +1,69 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { getCommonProps as y, findChildrenOfType as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { jsx as r, Fragment as k, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { getCommonProps as y, findChildrenOfType as R, px as h } from "../../../utils/index.js";
|
|
3
|
+
import b from "../../../node_modules/classnames/index.js";
|
|
4
|
+
import l, { forwardRef as w, useState as E } from "react";
|
|
5
5
|
import { TextVariants as N } from "../../Text/types.js";
|
|
6
6
|
import C from "../../Text/Text.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
7
|
+
import L from "../NavigationList/NavigationList.js";
|
|
8
|
+
import M from "../../Accordion/Accordion.js";
|
|
9
|
+
import A from "../../Accordion/AccordionItem.js";
|
|
10
10
|
import { SSRMediaQuery as v } from "../../../providers/SeldonProvider/utils.js";
|
|
11
|
-
import { AccordionItemVariant as
|
|
11
|
+
import { AccordionItemVariant as H } from "../../Accordion/types.js";
|
|
12
12
|
import { HeaderContext as x } from "../../../site-furniture/Header/Header.js";
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
import I from "../../../node_modules/react-remove-scroll/dist/es2015/Combination.js";
|
|
14
|
+
const O = ({ id: m, label: i, children: c }) => {
|
|
15
|
+
const { isMenuOpen: d } = l.useContext(x);
|
|
16
|
+
return /* @__PURE__ */ r(M, { children: /* @__PURE__ */ r(
|
|
17
|
+
A,
|
|
17
18
|
{
|
|
18
19
|
hasTransition: !0,
|
|
19
20
|
id: `accordion-item-${m}`,
|
|
20
|
-
label: /* @__PURE__ */
|
|
21
|
-
variant:
|
|
22
|
-
children:
|
|
21
|
+
label: /* @__PURE__ */ r(C, { variant: N.snwHeaderLink, children: i }),
|
|
22
|
+
variant: H.lg,
|
|
23
|
+
children: c
|
|
23
24
|
},
|
|
24
25
|
`accordion-key-${i}`
|
|
25
26
|
) }, `accordion-key-${i}-${d}`);
|
|
26
|
-
},
|
|
27
|
-
({ id: m, label: i, children:
|
|
28
|
-
const { className: s, ...
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
27
|
+
}, P = w(
|
|
28
|
+
({ id: m, label: i, children: c, className: d, onClick: T, ..._ }, $) => {
|
|
29
|
+
const { className: s, ...g } = y({ id: m }, "NavigationItemTrigger"), [p, o] = E(!1), t = R(c, L), { closeMenu: a } = l.useContext(x);
|
|
30
|
+
return /* @__PURE__ */ r(k, { children: /* @__PURE__ */ u(I, { enabled: p, allowPinchZoom: !0, removeScrollBar: !1, children: [
|
|
31
|
+
/* @__PURE__ */ r(v.Media, { lessThan: "md", children: /* @__PURE__ */ r(O, { id: m, label: i, ...g, children: t ? l.cloneElement(t[0], {
|
|
31
32
|
className: `${s}__submenu--mobile`,
|
|
32
|
-
onClick: (
|
|
33
|
-
var
|
|
34
|
-
(
|
|
33
|
+
onClick: (f) => {
|
|
34
|
+
var e, n;
|
|
35
|
+
(n = (e = t[0].props) == null ? void 0 : e.onClick) == null || n.call(e, f), o == null || o(!1), a == null || a();
|
|
35
36
|
}
|
|
36
37
|
}) : null }) }),
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ r(v.Media, { greaterThanOrEqual: "md", children: /* @__PURE__ */ u(
|
|
38
39
|
"li",
|
|
39
40
|
{
|
|
40
|
-
...
|
|
41
|
+
...g,
|
|
41
42
|
ref: $,
|
|
42
|
-
"aria-expanded":
|
|
43
|
-
className:
|
|
44
|
-
[`${s}--hovered`]:
|
|
43
|
+
"aria-expanded": p,
|
|
44
|
+
className: b(d, s, `${h}-nav__item`, {
|
|
45
|
+
[`${s}--hovered`]: p
|
|
45
46
|
}),
|
|
46
47
|
onClick: T,
|
|
47
|
-
onMouseOver: () =>
|
|
48
|
-
onMouseOut: () =>
|
|
48
|
+
onMouseOver: () => o(!0),
|
|
49
|
+
onMouseOut: () => o(!1),
|
|
49
50
|
..._,
|
|
50
51
|
children: [
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
t ?
|
|
52
|
+
/* @__PURE__ */ r("button", { className: `${h}-nav__item-trigger`, type: "button", children: /* @__PURE__ */ r(C, { variant: N.snwHeaderLink, children: i }) }),
|
|
53
|
+
t ? l.cloneElement(t[0], {
|
|
53
54
|
className: `${s}__submenu`,
|
|
54
|
-
onClick: (
|
|
55
|
-
var
|
|
56
|
-
(
|
|
55
|
+
onClick: (f) => {
|
|
56
|
+
var e, n;
|
|
57
|
+
(n = (e = t[0].props) == null ? void 0 : e.onClick) == null || n.call(e, f), o == null || o(!1), a == null || a();
|
|
57
58
|
}
|
|
58
59
|
}) : null
|
|
59
60
|
]
|
|
60
61
|
}
|
|
61
62
|
) })
|
|
62
|
-
] });
|
|
63
|
+
] }) });
|
|
63
64
|
}
|
|
64
65
|
);
|
|
65
|
-
|
|
66
|
+
P.displayName = "NavigationItemTrigger";
|
|
66
67
|
export {
|
|
67
|
-
|
|
68
|
+
P as default
|
|
68
69
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t, jsxs as u } from "react/jsx-runtime";
|
|
2
2
|
import c, { useEffect as V } from "react";
|
|
3
|
-
import { getCommonProps as j, px as D, encodeURLSearchParams as
|
|
3
|
+
import { getCommonProps as j, px as D, encodeURLSearchParams as N } from "../../utils/index.js";
|
|
4
4
|
import _ from "../../node_modules/classnames/index.js";
|
|
5
5
|
import H from "../Input/Input.js";
|
|
6
6
|
import O from "../Link/Link.js";
|
|
@@ -9,25 +9,26 @@ import { TextVariants as F } from "../Text/types.js";
|
|
|
9
9
|
import K from "../Text/Text.js";
|
|
10
10
|
import { useOnClickOutside as M } from "../../node_modules/usehooks-ts/dist/index.js";
|
|
11
11
|
import { HeaderContext as U } from "../../site-furniture/Header/Header.js";
|
|
12
|
-
import { SearchButton as
|
|
12
|
+
import { SearchButton as Z } from "./SearchButton.js";
|
|
13
|
+
import q from "../../node_modules/react-remove-scroll/dist/es2015/Combination.js";
|
|
13
14
|
import z from "../../node_modules/react-transition-group/esm/CSSTransition.js";
|
|
14
|
-
const
|
|
15
|
+
const ie = ({
|
|
15
16
|
onSearch: S,
|
|
16
17
|
onCancel: i,
|
|
17
|
-
searchResults:
|
|
18
|
+
searchResults: I = [],
|
|
18
19
|
state: l = "idle",
|
|
19
20
|
defaultValue: E = "",
|
|
20
21
|
className: b,
|
|
21
22
|
placeholder: w = "",
|
|
22
23
|
searchButtonText: d = "Search",
|
|
23
24
|
loadingText: C = "Search In Progress...",
|
|
24
|
-
invalidText:
|
|
25
|
-
getAllResultsText:
|
|
25
|
+
invalidText: P = "Invalid search",
|
|
26
|
+
getAllResultsText: k = (r) => `View all results for ${r}`,
|
|
26
27
|
getAllResultsLink: v = (r) => `/Search?Search=${r}`,
|
|
27
28
|
...x
|
|
28
29
|
}) => {
|
|
29
|
-
var
|
|
30
|
-
const { className: r, "data-testid": m, ...L } = j(x, "Search"), f = c.useContext(U),
|
|
30
|
+
var R;
|
|
31
|
+
const { className: r, "data-testid": m, ...L } = j(x, "Search"), f = c.useContext(U), h = c.useRef(null), p = c.useRef(null), g = c.useRef(null), a = f.isSearchExpanded, s = (R = h.current) == null ? void 0 : R.value, T = S ? (e) => {
|
|
31
32
|
S(e.target.value);
|
|
32
33
|
} : void 0;
|
|
33
34
|
M(g, (e) => {
|
|
@@ -37,25 +38,25 @@ const ne = ({
|
|
|
37
38
|
var o;
|
|
38
39
|
if (e.stopPropagation(), e.key === "Enter") {
|
|
39
40
|
if (e.preventDefault(), s && s.length > 2) {
|
|
40
|
-
const y =
|
|
41
|
+
const y = N(v(s));
|
|
41
42
|
n(!1), window.location.href = y;
|
|
42
43
|
}
|
|
43
44
|
e.currentTarget instanceof HTMLAnchorElement && (n(!1), e.currentTarget.click());
|
|
44
45
|
}
|
|
45
|
-
e.key === "Escape" && ((o =
|
|
46
|
+
e.key === "Escape" && ((o = p.current) == null || o.reset(), f.setIsSearchExpanded(!1));
|
|
46
47
|
};
|
|
47
48
|
V(() => {
|
|
48
49
|
var e;
|
|
49
50
|
if (a) {
|
|
50
|
-
(e =
|
|
51
|
+
(e = h.current) == null || e.focus();
|
|
51
52
|
return;
|
|
52
53
|
}
|
|
53
54
|
}, [a]);
|
|
54
55
|
const n = (e) => {
|
|
55
56
|
var o;
|
|
56
|
-
(o =
|
|
57
|
+
(o = p.current) == null || o.reset(), f.setIsSearchExpanded(e);
|
|
57
58
|
};
|
|
58
|
-
return /* @__PURE__ */ t("div", { className: `${r}__container`, children: /* @__PURE__ */ u(
|
|
59
|
+
return /* @__PURE__ */ t(q, { enabled: a, allowPinchZoom: !0, removeScrollBar: !1, children: /* @__PURE__ */ t("div", { className: `${r}__container`, children: /* @__PURE__ */ u(
|
|
59
60
|
"div",
|
|
60
61
|
{
|
|
61
62
|
className: `${r}__container__inner`,
|
|
@@ -80,7 +81,7 @@ const ne = ({
|
|
|
80
81
|
className: _(`${r}__form`, {
|
|
81
82
|
[`${r}__form--active`]: a
|
|
82
83
|
}),
|
|
83
|
-
ref:
|
|
84
|
+
ref: p,
|
|
84
85
|
children: [
|
|
85
86
|
/* @__PURE__ */ u(
|
|
86
87
|
"div",
|
|
@@ -110,16 +111,16 @@ const ne = ({
|
|
|
110
111
|
type: "text",
|
|
111
112
|
defaultValue: E,
|
|
112
113
|
invalid: l === "invalid",
|
|
113
|
-
invalidText:
|
|
114
|
+
invalidText: P,
|
|
114
115
|
onKeyDown: $,
|
|
115
116
|
onChange: T,
|
|
116
|
-
ref:
|
|
117
|
+
ref: h
|
|
117
118
|
}
|
|
118
119
|
)
|
|
119
120
|
}
|
|
120
121
|
),
|
|
121
122
|
/* @__PURE__ */ t(
|
|
122
|
-
|
|
123
|
+
Z,
|
|
123
124
|
{
|
|
124
125
|
className: r,
|
|
125
126
|
searchButtonText: d,
|
|
@@ -136,7 +137,7 @@ const ne = ({
|
|
|
136
137
|
s && s.length > 2 ? /* @__PURE__ */ t(
|
|
137
138
|
A,
|
|
138
139
|
{
|
|
139
|
-
autoCompleteResults:
|
|
140
|
+
autoCompleteResults: I,
|
|
140
141
|
isLoading: l === "loading",
|
|
141
142
|
loadingText: C,
|
|
142
143
|
onKeyDown: $,
|
|
@@ -146,8 +147,8 @@ const ne = ({
|
|
|
146
147
|
O,
|
|
147
148
|
{
|
|
148
149
|
onClick: () => n(!1),
|
|
149
|
-
href: ((e) =>
|
|
150
|
-
children: /* @__PURE__ */ t("p", { children:
|
|
150
|
+
href: ((e) => N(v(e)))(s),
|
|
151
|
+
children: /* @__PURE__ */ t("p", { children: k(s) })
|
|
151
152
|
}
|
|
152
153
|
) }, "viewAllSearchResults")
|
|
153
154
|
}
|
|
@@ -159,8 +160,8 @@ const ne = ({
|
|
|
159
160
|
)
|
|
160
161
|
]
|
|
161
162
|
}
|
|
162
|
-
) });
|
|
163
|
+
) }) });
|
|
163
164
|
};
|
|
164
165
|
export {
|
|
165
|
-
|
|
166
|
+
ie as default
|
|
166
167
|
};
|
|
@@ -10,7 +10,7 @@ import { Portal as Y } from "../node_modules/@radix-ui/react-portal/dist/index.j
|
|
|
10
10
|
import { Presence as _ } from "../node_modules/@radix-ui/react-presence/dist/index.js";
|
|
11
11
|
import { Primitive as m } from "../node_modules/@radix-ui/react-primitive/dist/index.js";
|
|
12
12
|
import { useFocusGuards as Z } from "../node_modules/@radix-ui/react-focus-guards/dist/index.js";
|
|
13
|
-
import z from "
|
|
13
|
+
import z from "../../../react-remove-scroll/dist/es2015/Combination.js";
|
|
14
14
|
import { hideOthers as J } from "../../../aria-hidden/dist/es2015/index.js";
|
|
15
15
|
import { Slot as Q } from "../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
16
16
|
import { jsx as i, jsxs as y, Fragment as I } from "react/jsx-runtime";
|
|
@@ -20,7 +20,7 @@ import { useLayoutEffect as z } from "../../react-use-layout-effect/dist/index.j
|
|
|
20
20
|
import { usePrevious as mt } from "../../react-use-previous/dist/index.js";
|
|
21
21
|
import { VisuallyHidden as ht } from "../../react-visually-hidden/dist/index.js";
|
|
22
22
|
import { hideOthers as vt } from "../../../aria-hidden/dist/es2015/index.js";
|
|
23
|
-
import gt from "
|
|
23
|
+
import gt from "../node_modules/react-remove-scroll/dist/es2015/Combination.js";
|
|
24
24
|
import { jsx as p, Fragment as Te, jsxs as ce } from "react/jsx-runtime";
|
|
25
25
|
var St = [" ", "Enter", "ArrowUp", "ArrowDown"], wt = [" ", "Enter"], re = "Select", [ae, de, Ct] = tt(re), [ee, io] = ot(re, [
|
|
26
26
|
Ct,
|
|
@@ -4,47 +4,47 @@ import { RemoveScrollBar as A } from "../../../../../../react-remove-scroll-bar/
|
|
|
4
4
|
import { styleSingleton as I } from "../../../../../../react-style-singleton/dist/es2015/component.js";
|
|
5
5
|
import { nonPassive as s } from "./aggresiveCapture.js";
|
|
6
6
|
import { locationCouldBeScrolled as T, handleScroll as W } from "./handleScroll.js";
|
|
7
|
-
var
|
|
7
|
+
var k = function(t) {
|
|
8
8
|
return "changedTouches" in t ? [t.changedTouches[0].clientX, t.changedTouches[0].clientY] : [0, 0];
|
|
9
9
|
}, Y = function(t) {
|
|
10
10
|
return [t.deltaX, t.deltaY];
|
|
11
11
|
}, B = function(t) {
|
|
12
12
|
return t && "current" in t ? t.current : t;
|
|
13
|
-
},
|
|
13
|
+
}, F = function(t, c) {
|
|
14
14
|
return t[0] === c[0] && t[1] === c[1];
|
|
15
|
-
},
|
|
15
|
+
}, O = function(t) {
|
|
16
16
|
return `
|
|
17
17
|
.block-interactivity-`.concat(t, ` {pointer-events: none;}
|
|
18
18
|
.allow-interactivity-`).concat(t, ` {pointer-events: all;}
|
|
19
19
|
`);
|
|
20
|
-
},
|
|
21
|
-
function
|
|
22
|
-
var c = n.useRef([]), E = n.useRef([0, 0]), d = n.useRef(),
|
|
20
|
+
}, Q = 0, f = [];
|
|
21
|
+
function G(t) {
|
|
22
|
+
var c = n.useRef([]), E = n.useRef([0, 0]), d = n.useRef(), v = n.useState(Q++)[0], m = n.useState(I)[0], g = n.useRef(t);
|
|
23
23
|
n.useEffect(function() {
|
|
24
24
|
g.current = t;
|
|
25
25
|
}, [t]), n.useEffect(function() {
|
|
26
26
|
if (t.inert) {
|
|
27
|
-
document.body.classList.add("block-interactivity-".concat(
|
|
27
|
+
document.body.classList.add("block-interactivity-".concat(v));
|
|
28
28
|
var e = x([t.lockRef.current], (t.shards || []).map(B), !0).filter(Boolean);
|
|
29
29
|
return e.forEach(function(r) {
|
|
30
|
-
return r.classList.add("allow-interactivity-".concat(
|
|
30
|
+
return r.classList.add("allow-interactivity-".concat(v));
|
|
31
31
|
}), function() {
|
|
32
|
-
document.body.classList.remove("block-interactivity-".concat(
|
|
33
|
-
return r.classList.remove("allow-interactivity-".concat(
|
|
32
|
+
document.body.classList.remove("block-interactivity-".concat(v)), e.forEach(function(r) {
|
|
33
|
+
return r.classList.remove("allow-interactivity-".concat(v));
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
}, [t.inert, t.lockRef.current, t.shards]);
|
|
38
|
-
var
|
|
39
|
-
if ("touches" in e && e.touches.length === 2
|
|
38
|
+
var y = n.useCallback(function(e, r) {
|
|
39
|
+
if ("touches" in e && e.touches.length === 2)
|
|
40
40
|
return !g.current.allowPinchZoom;
|
|
41
|
-
var l =
|
|
42
|
-
if ("touches" in e &&
|
|
41
|
+
var l = k(e), o = E.current, u = "deltaX" in e ? e.deltaX : o[0] - l[0], i = "deltaY" in e ? e.deltaY : o[1] - l[1], a, C = e.target, h = Math.abs(u) > Math.abs(i) ? "h" : "v";
|
|
42
|
+
if ("touches" in e && h === "h" && C.type === "range")
|
|
43
43
|
return !1;
|
|
44
|
-
var
|
|
45
|
-
if (!
|
|
44
|
+
var b = T(h, C);
|
|
45
|
+
if (!b)
|
|
46
46
|
return !0;
|
|
47
|
-
if (
|
|
47
|
+
if (b ? a = h : (a = h === "v" ? "h" : "v", b = T(h, C)), !b)
|
|
48
48
|
return !1;
|
|
49
49
|
if (!d.current && "changedTouches" in e && (u || i) && (d.current = a), !a)
|
|
50
50
|
return !0;
|
|
@@ -53,8 +53,8 @@ function z(t) {
|
|
|
53
53
|
}, []), S = n.useCallback(function(e) {
|
|
54
54
|
var r = e;
|
|
55
55
|
if (!(!f.length || f[f.length - 1] !== m)) {
|
|
56
|
-
var l = "deltaY" in r ? Y(r) :
|
|
57
|
-
return a.name === r.type && (a.target === r.target || r.target === a.shadowParent) &&
|
|
56
|
+
var l = "deltaY" in r ? Y(r) : k(r), o = c.current.filter(function(a) {
|
|
57
|
+
return a.name === r.type && (a.target === r.target || r.target === a.shadowParent) && F(a.delta, l);
|
|
58
58
|
})[0];
|
|
59
59
|
if (o && o.should) {
|
|
60
60
|
r.cancelable && r.preventDefault();
|
|
@@ -63,23 +63,23 @@ function z(t) {
|
|
|
63
63
|
if (!o) {
|
|
64
64
|
var u = (g.current.shards || []).map(B).filter(Boolean).filter(function(a) {
|
|
65
65
|
return a.contains(r.target);
|
|
66
|
-
}), i = u.length > 0 ?
|
|
66
|
+
}), i = u.length > 0 ? y(r, u[0]) : !g.current.noIsolation;
|
|
67
67
|
i && r.cancelable && r.preventDefault();
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
}, []), R = n.useCallback(function(e, r, l, o) {
|
|
71
|
-
var u = { name: e, delta: r, target: l, should: o, shadowParent:
|
|
71
|
+
var u = { name: e, delta: r, target: l, should: o, shadowParent: Z(l) };
|
|
72
72
|
c.current.push(u), setTimeout(function() {
|
|
73
73
|
c.current = c.current.filter(function(i) {
|
|
74
74
|
return i !== u;
|
|
75
75
|
});
|
|
76
76
|
}, 1);
|
|
77
77
|
}, []), w = n.useCallback(function(e) {
|
|
78
|
-
E.current =
|
|
78
|
+
E.current = k(e), d.current = void 0;
|
|
79
79
|
}, []), L = n.useCallback(function(e) {
|
|
80
|
-
R(e.type, Y(e), e.target,
|
|
80
|
+
R(e.type, Y(e), e.target, y(e, t.lockRef.current));
|
|
81
81
|
}, []), M = n.useCallback(function(e) {
|
|
82
|
-
R(e.type,
|
|
82
|
+
R(e.type, k(e), e.target, y(e, t.lockRef.current));
|
|
83
83
|
}, []);
|
|
84
84
|
n.useEffect(function() {
|
|
85
85
|
return f.push(m), t.setCallbacks({
|
|
@@ -96,17 +96,17 @@ function z(t) {
|
|
|
96
96
|
return n.createElement(
|
|
97
97
|
n.Fragment,
|
|
98
98
|
null,
|
|
99
|
-
D ? n.createElement(m, { styles:
|
|
99
|
+
D ? n.createElement(m, { styles: O(v) }) : null,
|
|
100
100
|
X ? n.createElement(A, { gapMode: t.gapMode }) : null
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function Z(t) {
|
|
104
104
|
for (var c = null; t !== null; )
|
|
105
105
|
t instanceof ShadowRoot && (c = t.host, t = t.host), t = t.parentNode;
|
|
106
106
|
return c;
|
|
107
107
|
}
|
|
108
108
|
export {
|
|
109
|
-
|
|
109
|
+
G as RemoveScrollSideCar,
|
|
110
110
|
Y as getDeltaXY,
|
|
111
|
-
|
|
111
|
+
k as getTouchXY
|
|
112
112
|
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var p = function(r) {
|
|
2
|
+
return r.tagName === "TEXTAREA";
|
|
3
|
+
}, w = function(r, e) {
|
|
4
|
+
var o = window.getComputedStyle(r);
|
|
5
|
+
return (
|
|
6
|
+
// not-not-scrollable
|
|
7
|
+
o[e] !== "hidden" && // contains scroll inside self
|
|
8
|
+
!(o.overflowY === o.overflowX && !p(r) && o[e] === "visible")
|
|
9
|
+
);
|
|
10
|
+
}, y = function(r) {
|
|
11
|
+
return w(r, "overflowY");
|
|
12
|
+
}, H = function(r) {
|
|
13
|
+
return w(r, "overflowX");
|
|
14
|
+
}, R = function(r, e) {
|
|
15
|
+
var o = e.ownerDocument, t = e;
|
|
16
|
+
do {
|
|
17
|
+
typeof ShadowRoot != "undefined" && t instanceof ShadowRoot && (t = t.host);
|
|
18
|
+
var a = g(r, t);
|
|
19
|
+
if (a) {
|
|
20
|
+
var n = b(r, t), i = n[1], l = n[2];
|
|
21
|
+
if (i > l)
|
|
22
|
+
return !0;
|
|
23
|
+
}
|
|
24
|
+
t = t.parentNode;
|
|
25
|
+
} while (t && t !== o.body);
|
|
26
|
+
return !1;
|
|
27
|
+
}, B = function(r) {
|
|
28
|
+
var e = r.scrollTop, o = r.scrollHeight, t = r.clientHeight;
|
|
29
|
+
return [
|
|
30
|
+
e,
|
|
31
|
+
o,
|
|
32
|
+
t
|
|
33
|
+
];
|
|
34
|
+
}, V = function(r) {
|
|
35
|
+
var e = r.scrollLeft, o = r.scrollWidth, t = r.clientWidth;
|
|
36
|
+
return [
|
|
37
|
+
e,
|
|
38
|
+
o,
|
|
39
|
+
t
|
|
40
|
+
];
|
|
41
|
+
}, g = function(r, e) {
|
|
42
|
+
return r === "v" ? y(e) : H(e);
|
|
43
|
+
}, b = function(r, e) {
|
|
44
|
+
return r === "v" ? B(e) : V(e);
|
|
45
|
+
}, D = function(r, e) {
|
|
46
|
+
return r === "h" && e === "rtl" ? -1 : 1;
|
|
47
|
+
}, W = function(r, e, o, t, a) {
|
|
48
|
+
var n = D(r, window.getComputedStyle(e).direction), i = n * t, l = o.target, f = e.contains(l), c = !1, d = i > 0, s = 0, h = 0;
|
|
49
|
+
do {
|
|
50
|
+
var u = b(r, l), v = u[0], m = u[1], C = u[2], S = m - C - n * v;
|
|
51
|
+
(v || S) && g(r, l) && (s += S, h += v), l instanceof ShadowRoot ? l = l.host : l = l.parentNode;
|
|
52
|
+
} while (
|
|
53
|
+
// portaled content
|
|
54
|
+
!f && l !== document.body || // self content
|
|
55
|
+
f && (e.contains(l) || e === l)
|
|
56
|
+
);
|
|
57
|
+
return (d && (Math.abs(s) < 1 || !a) || !d && (Math.abs(h) < 1 || !a)) && (c = !0), c;
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
W as handleScroll,
|
|
61
|
+
R as locationCouldBeScrolled
|
|
62
|
+
};
|
|
@@ -4,47 +4,47 @@ import { RemoveScrollBar as A } from "../../../react-remove-scroll-bar/dist/es20
|
|
|
4
4
|
import { styleSingleton as I } from "../../../react-style-singleton/dist/es2015/component.js";
|
|
5
5
|
import { nonPassive as s } from "./aggresiveCapture.js";
|
|
6
6
|
import { locationCouldBeScrolled as T, handleScroll as W } from "./handleScroll.js";
|
|
7
|
-
var
|
|
7
|
+
var b = function(t) {
|
|
8
8
|
return "changedTouches" in t ? [t.changedTouches[0].clientX, t.changedTouches[0].clientY] : [0, 0];
|
|
9
9
|
}, Y = function(t) {
|
|
10
10
|
return [t.deltaX, t.deltaY];
|
|
11
11
|
}, B = function(t) {
|
|
12
12
|
return t && "current" in t ? t.current : t;
|
|
13
|
-
},
|
|
13
|
+
}, p = function(t, c) {
|
|
14
14
|
return t[0] === c[0] && t[1] === c[1];
|
|
15
|
-
},
|
|
15
|
+
}, F = function(t) {
|
|
16
16
|
return `
|
|
17
17
|
.block-interactivity-`.concat(t, ` {pointer-events: none;}
|
|
18
18
|
.allow-interactivity-`).concat(t, ` {pointer-events: all;}
|
|
19
19
|
`);
|
|
20
|
-
},
|
|
21
|
-
function
|
|
22
|
-
var c = n.useRef([]), E = n.useRef([0, 0]), d = n.useRef(),
|
|
20
|
+
}, K = 0, f = [];
|
|
21
|
+
function z(t) {
|
|
22
|
+
var c = n.useRef([]), E = n.useRef([0, 0]), d = n.useRef(), h = n.useState(K++)[0], m = n.useState(I)[0], g = n.useRef(t);
|
|
23
23
|
n.useEffect(function() {
|
|
24
24
|
g.current = t;
|
|
25
25
|
}, [t]), n.useEffect(function() {
|
|
26
26
|
if (t.inert) {
|
|
27
|
-
document.body.classList.add("block-interactivity-".concat(
|
|
27
|
+
document.body.classList.add("block-interactivity-".concat(h));
|
|
28
28
|
var e = x([t.lockRef.current], (t.shards || []).map(B), !0).filter(Boolean);
|
|
29
29
|
return e.forEach(function(r) {
|
|
30
|
-
return r.classList.add("allow-interactivity-".concat(
|
|
30
|
+
return r.classList.add("allow-interactivity-".concat(h));
|
|
31
31
|
}), function() {
|
|
32
|
-
document.body.classList.remove("block-interactivity-".concat(
|
|
33
|
-
return r.classList.remove("allow-interactivity-".concat(
|
|
32
|
+
document.body.classList.remove("block-interactivity-".concat(h)), e.forEach(function(r) {
|
|
33
|
+
return r.classList.remove("allow-interactivity-".concat(h));
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
}, [t.inert, t.lockRef.current, t.shards]);
|
|
38
|
-
var
|
|
39
|
-
if ("touches" in e && e.touches.length === 2)
|
|
38
|
+
var k = n.useCallback(function(e, r) {
|
|
39
|
+
if ("touches" in e && e.touches.length === 2 || e.type === "wheel" && e.ctrlKey)
|
|
40
40
|
return !g.current.allowPinchZoom;
|
|
41
|
-
var l =
|
|
42
|
-
if ("touches" in e &&
|
|
41
|
+
var l = b(e), o = E.current, u = "deltaX" in e ? e.deltaX : o[0] - l[0], i = "deltaY" in e ? e.deltaY : o[1] - l[1], a, C = e.target, v = Math.abs(u) > Math.abs(i) ? "h" : "v";
|
|
42
|
+
if ("touches" in e && v === "h" && C.type === "range")
|
|
43
43
|
return !1;
|
|
44
|
-
var
|
|
45
|
-
if (!
|
|
44
|
+
var y = T(v, C);
|
|
45
|
+
if (!y)
|
|
46
46
|
return !0;
|
|
47
|
-
if (
|
|
47
|
+
if (y ? a = v : (a = v === "v" ? "h" : "v", y = T(v, C)), !y)
|
|
48
48
|
return !1;
|
|
49
49
|
if (!d.current && "changedTouches" in e && (u || i) && (d.current = a), !a)
|
|
50
50
|
return !0;
|
|
@@ -53,8 +53,8 @@ function G(t) {
|
|
|
53
53
|
}, []), S = n.useCallback(function(e) {
|
|
54
54
|
var r = e;
|
|
55
55
|
if (!(!f.length || f[f.length - 1] !== m)) {
|
|
56
|
-
var l = "deltaY" in r ? Y(r) :
|
|
57
|
-
return a.name === r.type && (a.target === r.target || r.target === a.shadowParent) &&
|
|
56
|
+
var l = "deltaY" in r ? Y(r) : b(r), o = c.current.filter(function(a) {
|
|
57
|
+
return a.name === r.type && (a.target === r.target || r.target === a.shadowParent) && p(a.delta, l);
|
|
58
58
|
})[0];
|
|
59
59
|
if (o && o.should) {
|
|
60
60
|
r.cancelable && r.preventDefault();
|
|
@@ -63,23 +63,23 @@ function G(t) {
|
|
|
63
63
|
if (!o) {
|
|
64
64
|
var u = (g.current.shards || []).map(B).filter(Boolean).filter(function(a) {
|
|
65
65
|
return a.contains(r.target);
|
|
66
|
-
}), i = u.length > 0 ?
|
|
66
|
+
}), i = u.length > 0 ? k(r, u[0]) : !g.current.noIsolation;
|
|
67
67
|
i && r.cancelable && r.preventDefault();
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
}, []), R = n.useCallback(function(e, r, l, o) {
|
|
71
|
-
var u = { name: e, delta: r, target: l, should: o, shadowParent:
|
|
71
|
+
var u = { name: e, delta: r, target: l, should: o, shadowParent: O(l) };
|
|
72
72
|
c.current.push(u), setTimeout(function() {
|
|
73
73
|
c.current = c.current.filter(function(i) {
|
|
74
74
|
return i !== u;
|
|
75
75
|
});
|
|
76
76
|
}, 1);
|
|
77
77
|
}, []), w = n.useCallback(function(e) {
|
|
78
|
-
E.current =
|
|
78
|
+
E.current = b(e), d.current = void 0;
|
|
79
79
|
}, []), L = n.useCallback(function(e) {
|
|
80
|
-
R(e.type, Y(e), e.target,
|
|
80
|
+
R(e.type, Y(e), e.target, k(e, t.lockRef.current));
|
|
81
81
|
}, []), M = n.useCallback(function(e) {
|
|
82
|
-
R(e.type,
|
|
82
|
+
R(e.type, b(e), e.target, k(e, t.lockRef.current));
|
|
83
83
|
}, []);
|
|
84
84
|
n.useEffect(function() {
|
|
85
85
|
return f.push(m), t.setCallbacks({
|
|
@@ -96,17 +96,17 @@ function G(t) {
|
|
|
96
96
|
return n.createElement(
|
|
97
97
|
n.Fragment,
|
|
98
98
|
null,
|
|
99
|
-
D ? n.createElement(m, { styles:
|
|
99
|
+
D ? n.createElement(m, { styles: F(h) }) : null,
|
|
100
100
|
X ? n.createElement(A, { gapMode: t.gapMode }) : null
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function O(t) {
|
|
104
104
|
for (var c = null; t !== null; )
|
|
105
105
|
t instanceof ShadowRoot && (c = t.host, t = t.host), t = t.parentNode;
|
|
106
106
|
return c;
|
|
107
107
|
}
|
|
108
108
|
export {
|
|
109
|
-
|
|
109
|
+
z as RemoveScrollSideCar,
|
|
110
110
|
Y as getDeltaXY,
|
|
111
|
-
|
|
111
|
+
b as getTouchXY
|
|
112
112
|
};
|
|
@@ -1,58 +1,60 @@
|
|
|
1
|
-
var p = function(
|
|
2
|
-
return
|
|
3
|
-
}, w = function(
|
|
4
|
-
|
|
1
|
+
var p = function(e) {
|
|
2
|
+
return e.tagName === "TEXTAREA";
|
|
3
|
+
}, w = function(e, r) {
|
|
4
|
+
if (!(e instanceof Element))
|
|
5
|
+
return !1;
|
|
6
|
+
var o = window.getComputedStyle(e);
|
|
5
7
|
return (
|
|
6
8
|
// not-not-scrollable
|
|
7
|
-
o[
|
|
8
|
-
!(o.overflowY === o.overflowX && !p(
|
|
9
|
+
o[r] !== "hidden" && // contains scroll inside self
|
|
10
|
+
!(o.overflowY === o.overflowX && !p(e) && o[r] === "visible")
|
|
9
11
|
);
|
|
10
|
-
}, y = function(
|
|
11
|
-
return w(
|
|
12
|
-
}, H = function(
|
|
13
|
-
return w(
|
|
14
|
-
}, R = function(
|
|
15
|
-
var o =
|
|
12
|
+
}, y = function(e) {
|
|
13
|
+
return w(e, "overflowY");
|
|
14
|
+
}, H = function(e) {
|
|
15
|
+
return w(e, "overflowX");
|
|
16
|
+
}, R = function(e, r) {
|
|
17
|
+
var o = r.ownerDocument, t = r;
|
|
16
18
|
do {
|
|
17
19
|
typeof ShadowRoot != "undefined" && t instanceof ShadowRoot && (t = t.host);
|
|
18
|
-
var a = g(
|
|
20
|
+
var a = g(e, t);
|
|
19
21
|
if (a) {
|
|
20
|
-
var n = b(
|
|
22
|
+
var n = b(e, t), i = n[1], l = n[2];
|
|
21
23
|
if (i > l)
|
|
22
24
|
return !0;
|
|
23
25
|
}
|
|
24
26
|
t = t.parentNode;
|
|
25
27
|
} while (t && t !== o.body);
|
|
26
28
|
return !1;
|
|
27
|
-
}, B = function(
|
|
28
|
-
var
|
|
29
|
+
}, B = function(e) {
|
|
30
|
+
var r = e.scrollTop, o = e.scrollHeight, t = e.clientHeight;
|
|
29
31
|
return [
|
|
30
|
-
|
|
32
|
+
r,
|
|
31
33
|
o,
|
|
32
34
|
t
|
|
33
35
|
];
|
|
34
|
-
}, V = function(
|
|
35
|
-
var
|
|
36
|
+
}, V = function(e) {
|
|
37
|
+
var r = e.scrollLeft, o = e.scrollWidth, t = e.clientWidth;
|
|
36
38
|
return [
|
|
37
|
-
|
|
39
|
+
r,
|
|
38
40
|
o,
|
|
39
41
|
t
|
|
40
42
|
];
|
|
41
|
-
}, g = function(
|
|
42
|
-
return
|
|
43
|
-
}, b = function(
|
|
44
|
-
return
|
|
45
|
-
}, D = function(
|
|
46
|
-
return
|
|
47
|
-
}, W = function(
|
|
48
|
-
var n = D(
|
|
43
|
+
}, g = function(e, r) {
|
|
44
|
+
return e === "v" ? y(r) : H(r);
|
|
45
|
+
}, b = function(e, r) {
|
|
46
|
+
return e === "v" ? B(r) : V(r);
|
|
47
|
+
}, D = function(e, r) {
|
|
48
|
+
return e === "h" && r === "rtl" ? -1 : 1;
|
|
49
|
+
}, W = function(e, r, o, t, a) {
|
|
50
|
+
var n = D(e, window.getComputedStyle(r).direction), i = n * t, l = o.target, f = r.contains(l), c = !1, d = i > 0, s = 0, h = 0;
|
|
49
51
|
do {
|
|
50
|
-
var u = b(
|
|
51
|
-
(v || S) && g(
|
|
52
|
+
var u = b(e, l), v = u[0], m = u[1], C = u[2], S = m - C - n * v;
|
|
53
|
+
(v || S) && g(e, l) && (s += S, h += v), l instanceof ShadowRoot ? l = l.host : l = l.parentNode;
|
|
52
54
|
} while (
|
|
53
55
|
// portaled content
|
|
54
56
|
!f && l !== document.body || // self content
|
|
55
|
-
f && (
|
|
57
|
+
f && (r.contains(l) || r === l)
|
|
56
58
|
);
|
|
57
59
|
return (d && (Math.abs(s) < 1 || !a) || !d && (Math.abs(h) < 1 || !a)) && (c = !0), c;
|
|
58
60
|
};
|
|
@@ -6,11 +6,19 @@
|
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: column;
|
|
8
8
|
gap: 0.625rem;
|
|
9
|
+
max-height: calc(90vh - #{$header-height});
|
|
10
|
+
-ms-overflow-style: none; /* Internet Explorer 10+ */
|
|
11
|
+
overflow-y: scroll;
|
|
9
12
|
padding: $spacing-sm;
|
|
10
13
|
position: absolute;
|
|
14
|
+
scrollbar-width: none; /* Firefox */
|
|
11
15
|
top: $search-size;
|
|
12
16
|
width: 100%;
|
|
13
17
|
|
|
18
|
+
&::-webkit-scrollbar {
|
|
19
|
+
display: none; /* Safari and Chrome */
|
|
20
|
+
}
|
|
21
|
+
|
|
14
22
|
@include isHeaderMobile {
|
|
15
23
|
padding: $spacing-sm 0;
|
|
16
24
|
}
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
overflow: hidden;
|
|
5
5
|
position: relative;
|
|
6
6
|
|
|
7
|
-
&--aspect-ratio-16-9 {
|
|
7
|
+
&--aspect-ratio-16-9 img {
|
|
8
8
|
aspect-ratio: 16 / 9;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
&--aspect-ratio-1-1 {
|
|
11
|
+
&--aspect-ratio-1-1 img {
|
|
12
12
|
aspect-ratio: 1 / 1;
|
|
13
13
|
}
|
|
14
14
|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
&-img {
|
|
31
|
-
height:
|
|
31
|
+
height: auto;
|
|
32
32
|
object-fit: contain;
|
|
33
33
|
width: 100%;
|
|
34
34
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phillips/seldon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.119.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/PhillipsAuctionHouse/seldon"
|
|
@@ -58,6 +58,7 @@
|
|
|
58
58
|
"html-react-parser": "^5.2.2",
|
|
59
59
|
"react-intersection-observer": "^9.13.1",
|
|
60
60
|
"react-modal": "^3.16.1",
|
|
61
|
+
"react-remove-scroll": "^2.6.3",
|
|
61
62
|
"react-transition-group": "^4.4.5",
|
|
62
63
|
"react-zoom-pan-pinch": "^3.6.1",
|
|
63
64
|
"usehooks-ts": "^3.1.0"
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
var p = function(e) {
|
|
2
|
-
return e.tagName === "TEXTAREA";
|
|
3
|
-
}, w = function(e, r) {
|
|
4
|
-
if (!(e instanceof Element))
|
|
5
|
-
return !1;
|
|
6
|
-
var o = window.getComputedStyle(e);
|
|
7
|
-
return (
|
|
8
|
-
// not-not-scrollable
|
|
9
|
-
o[r] !== "hidden" && // contains scroll inside self
|
|
10
|
-
!(o.overflowY === o.overflowX && !p(e) && o[r] === "visible")
|
|
11
|
-
);
|
|
12
|
-
}, y = function(e) {
|
|
13
|
-
return w(e, "overflowY");
|
|
14
|
-
}, H = function(e) {
|
|
15
|
-
return w(e, "overflowX");
|
|
16
|
-
}, R = function(e, r) {
|
|
17
|
-
var o = r.ownerDocument, t = r;
|
|
18
|
-
do {
|
|
19
|
-
typeof ShadowRoot != "undefined" && t instanceof ShadowRoot && (t = t.host);
|
|
20
|
-
var a = g(e, t);
|
|
21
|
-
if (a) {
|
|
22
|
-
var n = b(e, t), i = n[1], l = n[2];
|
|
23
|
-
if (i > l)
|
|
24
|
-
return !0;
|
|
25
|
-
}
|
|
26
|
-
t = t.parentNode;
|
|
27
|
-
} while (t && t !== o.body);
|
|
28
|
-
return !1;
|
|
29
|
-
}, B = function(e) {
|
|
30
|
-
var r = e.scrollTop, o = e.scrollHeight, t = e.clientHeight;
|
|
31
|
-
return [
|
|
32
|
-
r,
|
|
33
|
-
o,
|
|
34
|
-
t
|
|
35
|
-
];
|
|
36
|
-
}, V = function(e) {
|
|
37
|
-
var r = e.scrollLeft, o = e.scrollWidth, t = e.clientWidth;
|
|
38
|
-
return [
|
|
39
|
-
r,
|
|
40
|
-
o,
|
|
41
|
-
t
|
|
42
|
-
];
|
|
43
|
-
}, g = function(e, r) {
|
|
44
|
-
return e === "v" ? y(r) : H(r);
|
|
45
|
-
}, b = function(e, r) {
|
|
46
|
-
return e === "v" ? B(r) : V(r);
|
|
47
|
-
}, D = function(e, r) {
|
|
48
|
-
return e === "h" && r === "rtl" ? -1 : 1;
|
|
49
|
-
}, W = function(e, r, o, t, a) {
|
|
50
|
-
var n = D(e, window.getComputedStyle(r).direction), i = n * t, l = o.target, f = r.contains(l), c = !1, d = i > 0, s = 0, h = 0;
|
|
51
|
-
do {
|
|
52
|
-
var u = b(e, l), v = u[0], m = u[1], C = u[2], S = m - C - n * v;
|
|
53
|
-
(v || S) && g(e, l) && (s += S, h += v), l instanceof ShadowRoot ? l = l.host : l = l.parentNode;
|
|
54
|
-
} while (
|
|
55
|
-
// portaled content
|
|
56
|
-
!f && l !== document.body || // self content
|
|
57
|
-
f && (r.contains(l) || r === l)
|
|
58
|
-
);
|
|
59
|
-
return (d && (Math.abs(s) < 1 || !a) || !d && (Math.abs(h) < 1 || !a)) && (c = !0), c;
|
|
60
|
-
};
|
|
61
|
-
export {
|
|
62
|
-
W as handleScroll,
|
|
63
|
-
R as locationCouldBeScrolled
|
|
64
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/tslib/tslib.es6.js
RENAMED
|
File without changes
|