@phillips/seldon 1.47.0 → 1.49.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/_commonjsHelpers.js +15 -13
- package/dist/assets/PhillipsLogo.svg.js +1 -1
- package/dist/assets/close.svg.js +1 -1
- package/dist/components/Header/Header.d.ts +13 -4
- package/dist/components/Header/Header.js +53 -48
- package/dist/components/Header/utils.d.ts +9 -0
- package/dist/components/Header/utils.js +13 -0
- package/dist/components/Navigation/Navigation.js +35 -31
- package/dist/components/Navigation/NavigationList/NavigationList.d.ts +5 -1
- package/dist/components/Navigation/NavigationList/NavigationList.js +11 -7
- package/dist/components/Search/Search.js +121 -113
- package/dist/components/Search/SearchButton.d.ts +7 -0
- package/dist/components/Search/SearchButton.js +37 -0
- package/dist/components/Subscribe/Subscribe.js +12 -13
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js +13 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +7 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +10 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +8 -0
- package/dist/node_modules/dom-helpers/esm/addClass.js +7 -0
- package/dist/node_modules/dom-helpers/esm/hasClass.js +6 -0
- package/dist/node_modules/dom-helpers/esm/removeClass.js +9 -0
- package/dist/node_modules/lodash.debounce/index.js +3 -0
- package/dist/node_modules/prop-types/index.js +11 -8
- package/dist/node_modules/react-transition-group/esm/CSSTransition.js +207 -0
- package/dist/node_modules/react-transition-group/esm/Transition.js +336 -0
- package/dist/node_modules/react-transition-group/esm/TransitionGroupContext.js +5 -0
- package/dist/node_modules/react-transition-group/esm/config.js +6 -0
- package/dist/node_modules/react-transition-group/esm/utils/PropTypes.js +21 -0
- package/dist/node_modules/react-transition-group/esm/utils/reflow.js +6 -0
- package/dist/node_modules/usehooks-ts/dist/index.js +37 -0
- package/dist/scss/_vars.scss +3 -0
- package/dist/scss/componentStyles.scss +1 -0
- package/dist/scss/components/Drawer/_drawer.scss +1 -1
- package/dist/scss/components/Header/_header.scss +30 -3
- package/dist/scss/components/Input/_input.scss +1 -2
- package/dist/scss/components/Navigation/NavigationItem/_navigationItem.scss +2 -2
- package/dist/scss/components/Navigation/NavigationList/_navigationList.scss +14 -2
- package/dist/scss/components/Navigation/_navigation.scss +6 -16
- package/dist/scss/components/Search/SearchResults/_searchResults.scss +10 -19
- package/dist/scss/components/Search/_search.scss +52 -74
- package/dist/scss/components/Search/_searchButton.scss +41 -0
- package/dist/scss/components/Subscribe/_subscribe.scss +3 -14
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +5 -2
- package/dist/assets/loading_spinner.svg.js +0 -7
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import C from "../../@babel/runtime/helpers/esm/extends.js";
|
|
2
|
+
import x from "../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js";
|
|
3
|
+
import N from "../../@babel/runtime/helpers/esm/inheritsLoose.js";
|
|
4
|
+
import v from "../../prop-types/index.js";
|
|
5
|
+
import A from "../../dom-helpers/esm/addClass.js";
|
|
6
|
+
import _ from "../../dom-helpers/esm/removeClass.js";
|
|
7
|
+
import c from "react";
|
|
8
|
+
import E from "./Transition.js";
|
|
9
|
+
import { classNamesShape as $ } from "./utils/PropTypes.js";
|
|
10
|
+
import { forceReflow as S } from "./utils/reflow.js";
|
|
11
|
+
var T = function(i, p) {
|
|
12
|
+
return i && p && p.split(" ").forEach(function(s) {
|
|
13
|
+
return A(i, s);
|
|
14
|
+
});
|
|
15
|
+
}, d = function(i, p) {
|
|
16
|
+
return i && p && p.split(" ").forEach(function(s) {
|
|
17
|
+
return _(i, s);
|
|
18
|
+
});
|
|
19
|
+
}, g = /* @__PURE__ */ function(u) {
|
|
20
|
+
N(i, u);
|
|
21
|
+
function i() {
|
|
22
|
+
for (var s, t = arguments.length, a = new Array(t), o = 0; o < t; o++)
|
|
23
|
+
a[o] = arguments[o];
|
|
24
|
+
return s = u.call.apply(u, [this].concat(a)) || this, s.appliedClasses = {
|
|
25
|
+
appear: {},
|
|
26
|
+
enter: {},
|
|
27
|
+
exit: {}
|
|
28
|
+
}, s.onEnter = function(e, r) {
|
|
29
|
+
var n = s.resolveArguments(e, r), l = n[0], m = n[1];
|
|
30
|
+
s.removeClasses(l, "exit"), s.addClass(l, m ? "appear" : "enter", "base"), s.props.onEnter && s.props.onEnter(e, r);
|
|
31
|
+
}, s.onEntering = function(e, r) {
|
|
32
|
+
var n = s.resolveArguments(e, r), l = n[0], m = n[1], f = m ? "appear" : "enter";
|
|
33
|
+
s.addClass(l, f, "active"), s.props.onEntering && s.props.onEntering(e, r);
|
|
34
|
+
}, s.onEntered = function(e, r) {
|
|
35
|
+
var n = s.resolveArguments(e, r), l = n[0], m = n[1], f = m ? "appear" : "enter";
|
|
36
|
+
s.removeClasses(l, f), s.addClass(l, f, "done"), s.props.onEntered && s.props.onEntered(e, r);
|
|
37
|
+
}, s.onExit = function(e) {
|
|
38
|
+
var r = s.resolveArguments(e), n = r[0];
|
|
39
|
+
s.removeClasses(n, "appear"), s.removeClasses(n, "enter"), s.addClass(n, "exit", "base"), s.props.onExit && s.props.onExit(e);
|
|
40
|
+
}, s.onExiting = function(e) {
|
|
41
|
+
var r = s.resolveArguments(e), n = r[0];
|
|
42
|
+
s.addClass(n, "exit", "active"), s.props.onExiting && s.props.onExiting(e);
|
|
43
|
+
}, s.onExited = function(e) {
|
|
44
|
+
var r = s.resolveArguments(e), n = r[0];
|
|
45
|
+
s.removeClasses(n, "exit"), s.addClass(n, "exit", "done"), s.props.onExited && s.props.onExited(e);
|
|
46
|
+
}, s.resolveArguments = function(e, r) {
|
|
47
|
+
return s.props.nodeRef ? [s.props.nodeRef.current, e] : [e, r];
|
|
48
|
+
}, s.getClassNames = function(e) {
|
|
49
|
+
var r = s.props.classNames, n = typeof r == "string", l = n && r ? r + "-" : "", m = n ? "" + l + e : r[e], f = n ? m + "-active" : r[e + "Active"], h = n ? m + "-done" : r[e + "Done"];
|
|
50
|
+
return {
|
|
51
|
+
baseClassName: m,
|
|
52
|
+
activeClassName: f,
|
|
53
|
+
doneClassName: h
|
|
54
|
+
};
|
|
55
|
+
}, s;
|
|
56
|
+
}
|
|
57
|
+
var p = i.prototype;
|
|
58
|
+
return p.addClass = function(t, a, o) {
|
|
59
|
+
var e = this.getClassNames(a)[o + "ClassName"], r = this.getClassNames("enter"), n = r.doneClassName;
|
|
60
|
+
a === "appear" && o === "done" && n && (e += " " + n), o === "active" && t && S(t), e && (this.appliedClasses[a][o] = e, T(t, e));
|
|
61
|
+
}, p.removeClasses = function(t, a) {
|
|
62
|
+
var o = this.appliedClasses[a], e = o.base, r = o.active, n = o.done;
|
|
63
|
+
this.appliedClasses[a] = {}, e && d(t, e), r && d(t, r), n && d(t, n);
|
|
64
|
+
}, p.render = function() {
|
|
65
|
+
var t = this.props;
|
|
66
|
+
t.classNames;
|
|
67
|
+
var a = x(t, ["classNames"]);
|
|
68
|
+
return /* @__PURE__ */ c.createElement(E, C({}, a, {
|
|
69
|
+
onEnter: this.onEnter,
|
|
70
|
+
onEntered: this.onEntered,
|
|
71
|
+
onEntering: this.onEntering,
|
|
72
|
+
onExit: this.onExit,
|
|
73
|
+
onExiting: this.onExiting,
|
|
74
|
+
onExited: this.onExited
|
|
75
|
+
}));
|
|
76
|
+
}, i;
|
|
77
|
+
}(c.Component);
|
|
78
|
+
g.defaultProps = {
|
|
79
|
+
classNames: ""
|
|
80
|
+
};
|
|
81
|
+
g.propTypes = process.env.NODE_ENV !== "production" ? C({}, E.propTypes, {
|
|
82
|
+
/**
|
|
83
|
+
* The animation classNames applied to the component as it appears, enters,
|
|
84
|
+
* exits or has finished the transition. A single name can be provided, which
|
|
85
|
+
* will be suffixed for each stage, e.g. `classNames="fade"` applies:
|
|
86
|
+
*
|
|
87
|
+
* - `fade-appear`, `fade-appear-active`, `fade-appear-done`
|
|
88
|
+
* - `fade-enter`, `fade-enter-active`, `fade-enter-done`
|
|
89
|
+
* - `fade-exit`, `fade-exit-active`, `fade-exit-done`
|
|
90
|
+
*
|
|
91
|
+
* A few details to note about how these classes are applied:
|
|
92
|
+
*
|
|
93
|
+
* 1. They are _joined_ with the ones that are already defined on the child
|
|
94
|
+
* component, so if you want to add some base styles, you can use
|
|
95
|
+
* `className` without worrying that it will be overridden.
|
|
96
|
+
*
|
|
97
|
+
* 2. If the transition component mounts with `in={false}`, no classes are
|
|
98
|
+
* applied yet. You might be expecting `*-exit-done`, but if you think
|
|
99
|
+
* about it, a component cannot finish exiting if it hasn't entered yet.
|
|
100
|
+
*
|
|
101
|
+
* 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This
|
|
102
|
+
* allows you to define different behavior for when appearing is done and
|
|
103
|
+
* when regular entering is done, using selectors like
|
|
104
|
+
* `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply
|
|
105
|
+
* an epic entrance animation when element first appears in the DOM using
|
|
106
|
+
* [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can
|
|
107
|
+
* simply use `fade-enter-done` for defining both cases.
|
|
108
|
+
*
|
|
109
|
+
* Each individual classNames can also be specified independently like:
|
|
110
|
+
*
|
|
111
|
+
* ```js
|
|
112
|
+
* classNames={{
|
|
113
|
+
* appear: 'my-appear',
|
|
114
|
+
* appearActive: 'my-active-appear',
|
|
115
|
+
* appearDone: 'my-done-appear',
|
|
116
|
+
* enter: 'my-enter',
|
|
117
|
+
* enterActive: 'my-active-enter',
|
|
118
|
+
* enterDone: 'my-done-enter',
|
|
119
|
+
* exit: 'my-exit',
|
|
120
|
+
* exitActive: 'my-active-exit',
|
|
121
|
+
* exitDone: 'my-done-exit',
|
|
122
|
+
* }}
|
|
123
|
+
* ```
|
|
124
|
+
*
|
|
125
|
+
* If you want to set these classes using CSS Modules:
|
|
126
|
+
*
|
|
127
|
+
* ```js
|
|
128
|
+
* import styles from './styles.css';
|
|
129
|
+
* ```
|
|
130
|
+
*
|
|
131
|
+
* you might want to use camelCase in your CSS file, that way could simply
|
|
132
|
+
* spread them instead of listing them one by one:
|
|
133
|
+
*
|
|
134
|
+
* ```js
|
|
135
|
+
* classNames={{ ...styles }}
|
|
136
|
+
* ```
|
|
137
|
+
*
|
|
138
|
+
* @type {string | {
|
|
139
|
+
* appear?: string,
|
|
140
|
+
* appearActive?: string,
|
|
141
|
+
* appearDone?: string,
|
|
142
|
+
* enter?: string,
|
|
143
|
+
* enterActive?: string,
|
|
144
|
+
* enterDone?: string,
|
|
145
|
+
* exit?: string,
|
|
146
|
+
* exitActive?: string,
|
|
147
|
+
* exitDone?: string,
|
|
148
|
+
* }}
|
|
149
|
+
*/
|
|
150
|
+
classNames: $,
|
|
151
|
+
/**
|
|
152
|
+
* A `<Transition>` callback fired immediately after the 'enter' or 'appear' class is
|
|
153
|
+
* applied.
|
|
154
|
+
*
|
|
155
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
156
|
+
*
|
|
157
|
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
158
|
+
*/
|
|
159
|
+
onEnter: v.func,
|
|
160
|
+
/**
|
|
161
|
+
* A `<Transition>` callback fired immediately after the 'enter-active' or
|
|
162
|
+
* 'appear-active' class is applied.
|
|
163
|
+
*
|
|
164
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
165
|
+
*
|
|
166
|
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
167
|
+
*/
|
|
168
|
+
onEntering: v.func,
|
|
169
|
+
/**
|
|
170
|
+
* A `<Transition>` callback fired immediately after the 'enter' or
|
|
171
|
+
* 'appear' classes are **removed** and the `done` class is added to the DOM node.
|
|
172
|
+
*
|
|
173
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
174
|
+
*
|
|
175
|
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
176
|
+
*/
|
|
177
|
+
onEntered: v.func,
|
|
178
|
+
/**
|
|
179
|
+
* A `<Transition>` callback fired immediately after the 'exit' class is
|
|
180
|
+
* applied.
|
|
181
|
+
*
|
|
182
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
183
|
+
*
|
|
184
|
+
* @type Function(node: HtmlElement)
|
|
185
|
+
*/
|
|
186
|
+
onExit: v.func,
|
|
187
|
+
/**
|
|
188
|
+
* A `<Transition>` callback fired immediately after the 'exit-active' is applied.
|
|
189
|
+
*
|
|
190
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
191
|
+
*
|
|
192
|
+
* @type Function(node: HtmlElement)
|
|
193
|
+
*/
|
|
194
|
+
onExiting: v.func,
|
|
195
|
+
/**
|
|
196
|
+
* A `<Transition>` callback fired immediately after the 'exit' classes
|
|
197
|
+
* are **removed** and the `exit-done` class is added to the DOM node.
|
|
198
|
+
*
|
|
199
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
200
|
+
*
|
|
201
|
+
* @type Function(node: HtmlElement)
|
|
202
|
+
*/
|
|
203
|
+
onExited: v.func
|
|
204
|
+
}) : {};
|
|
205
|
+
export {
|
|
206
|
+
g as default
|
|
207
|
+
};
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import C from "../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js";
|
|
2
|
+
import D from "../../@babel/runtime/helpers/esm/inheritsLoose.js";
|
|
3
|
+
import o from "../../prop-types/index.js";
|
|
4
|
+
import v from "react";
|
|
5
|
+
import b from "react-dom";
|
|
6
|
+
import T from "./config.js";
|
|
7
|
+
import { timeoutsShape as R } from "./utils/PropTypes.js";
|
|
8
|
+
import O from "./TransitionGroupContext.js";
|
|
9
|
+
import { forceReflow as k } from "./utils/reflow.js";
|
|
10
|
+
var x = "unmounted", f = "exited", l = "entering", h = "entered", N = "exiting", p = /* @__PURE__ */ function(d) {
|
|
11
|
+
D(u, d);
|
|
12
|
+
function u(i, e) {
|
|
13
|
+
var t;
|
|
14
|
+
t = d.call(this, i, e) || this;
|
|
15
|
+
var n = e, r = n && !n.isMounting ? i.enter : i.appear, s;
|
|
16
|
+
return t.appearStatus = null, i.in ? r ? (s = f, t.appearStatus = l) : s = h : i.unmountOnExit || i.mountOnEnter ? s = x : s = f, t.state = {
|
|
17
|
+
status: s
|
|
18
|
+
}, t.nextCallback = null, t;
|
|
19
|
+
}
|
|
20
|
+
u.getDerivedStateFromProps = function(e, t) {
|
|
21
|
+
var n = e.in;
|
|
22
|
+
return n && t.status === x ? {
|
|
23
|
+
status: f
|
|
24
|
+
} : null;
|
|
25
|
+
};
|
|
26
|
+
var a = u.prototype;
|
|
27
|
+
return a.componentDidMount = function() {
|
|
28
|
+
this.updateStatus(!0, this.appearStatus);
|
|
29
|
+
}, a.componentDidUpdate = function(e) {
|
|
30
|
+
var t = null;
|
|
31
|
+
if (e !== this.props) {
|
|
32
|
+
var n = this.state.status;
|
|
33
|
+
this.props.in ? n !== l && n !== h && (t = l) : (n === l || n === h) && (t = N);
|
|
34
|
+
}
|
|
35
|
+
this.updateStatus(!1, t);
|
|
36
|
+
}, a.componentWillUnmount = function() {
|
|
37
|
+
this.cancelNextCallback();
|
|
38
|
+
}, a.getTimeouts = function() {
|
|
39
|
+
var e = this.props.timeout, t, n, r;
|
|
40
|
+
return t = n = r = e, e != null && typeof e != "number" && (t = e.exit, n = e.enter, r = e.appear !== void 0 ? e.appear : n), {
|
|
41
|
+
exit: t,
|
|
42
|
+
enter: n,
|
|
43
|
+
appear: r
|
|
44
|
+
};
|
|
45
|
+
}, a.updateStatus = function(e, t) {
|
|
46
|
+
if (e === void 0 && (e = !1), t !== null)
|
|
47
|
+
if (this.cancelNextCallback(), t === l) {
|
|
48
|
+
if (this.props.unmountOnExit || this.props.mountOnEnter) {
|
|
49
|
+
var n = this.props.nodeRef ? this.props.nodeRef.current : b.findDOMNode(this);
|
|
50
|
+
n && k(n);
|
|
51
|
+
}
|
|
52
|
+
this.performEnter(e);
|
|
53
|
+
} else
|
|
54
|
+
this.performExit();
|
|
55
|
+
else this.props.unmountOnExit && this.state.status === f && this.setState({
|
|
56
|
+
status: x
|
|
57
|
+
});
|
|
58
|
+
}, a.performEnter = function(e) {
|
|
59
|
+
var t = this, n = this.props.enter, r = this.context ? this.context.isMounting : e, s = this.props.nodeRef ? [r] : [b.findDOMNode(this), r], c = s[0], m = s[1], S = this.getTimeouts(), g = r ? S.appear : S.enter;
|
|
60
|
+
if (!e && !n || T.disabled) {
|
|
61
|
+
this.safeSetState({
|
|
62
|
+
status: h
|
|
63
|
+
}, function() {
|
|
64
|
+
t.props.onEntered(c);
|
|
65
|
+
});
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
this.props.onEnter(c, m), this.safeSetState({
|
|
69
|
+
status: l
|
|
70
|
+
}, function() {
|
|
71
|
+
t.props.onEntering(c, m), t.onTransitionEnd(g, function() {
|
|
72
|
+
t.safeSetState({
|
|
73
|
+
status: h
|
|
74
|
+
}, function() {
|
|
75
|
+
t.props.onEntered(c, m);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
});
|
|
79
|
+
}, a.performExit = function() {
|
|
80
|
+
var e = this, t = this.props.exit, n = this.getTimeouts(), r = this.props.nodeRef ? void 0 : b.findDOMNode(this);
|
|
81
|
+
if (!t || T.disabled) {
|
|
82
|
+
this.safeSetState({
|
|
83
|
+
status: f
|
|
84
|
+
}, function() {
|
|
85
|
+
e.props.onExited(r);
|
|
86
|
+
});
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
this.props.onExit(r), this.safeSetState({
|
|
90
|
+
status: N
|
|
91
|
+
}, function() {
|
|
92
|
+
e.props.onExiting(r), e.onTransitionEnd(n.exit, function() {
|
|
93
|
+
e.safeSetState({
|
|
94
|
+
status: f
|
|
95
|
+
}, function() {
|
|
96
|
+
e.props.onExited(r);
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
}, a.cancelNextCallback = function() {
|
|
101
|
+
this.nextCallback !== null && (this.nextCallback.cancel(), this.nextCallback = null);
|
|
102
|
+
}, a.safeSetState = function(e, t) {
|
|
103
|
+
t = this.setNextCallback(t), this.setState(e, t);
|
|
104
|
+
}, a.setNextCallback = function(e) {
|
|
105
|
+
var t = this, n = !0;
|
|
106
|
+
return this.nextCallback = function(r) {
|
|
107
|
+
n && (n = !1, t.nextCallback = null, e(r));
|
|
108
|
+
}, this.nextCallback.cancel = function() {
|
|
109
|
+
n = !1;
|
|
110
|
+
}, this.nextCallback;
|
|
111
|
+
}, a.onTransitionEnd = function(e, t) {
|
|
112
|
+
this.setNextCallback(t);
|
|
113
|
+
var n = this.props.nodeRef ? this.props.nodeRef.current : b.findDOMNode(this), r = e == null && !this.props.addEndListener;
|
|
114
|
+
if (!n || r) {
|
|
115
|
+
setTimeout(this.nextCallback, 0);
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
if (this.props.addEndListener) {
|
|
119
|
+
var s = this.props.nodeRef ? [this.nextCallback] : [n, this.nextCallback], c = s[0], m = s[1];
|
|
120
|
+
this.props.addEndListener(c, m);
|
|
121
|
+
}
|
|
122
|
+
e != null && setTimeout(this.nextCallback, e);
|
|
123
|
+
}, a.render = function() {
|
|
124
|
+
var e = this.state.status;
|
|
125
|
+
if (e === x)
|
|
126
|
+
return null;
|
|
127
|
+
var t = this.props, n = t.children;
|
|
128
|
+
t.in, t.mountOnEnter, t.unmountOnExit, t.appear, t.enter, t.exit, t.timeout, t.addEndListener, t.onEnter, t.onEntering, t.onEntered, t.onExit, t.onExiting, t.onExited, t.nodeRef;
|
|
129
|
+
var r = C(t, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
|
|
130
|
+
return (
|
|
131
|
+
// allows for nested Transitions
|
|
132
|
+
/* @__PURE__ */ v.createElement(O.Provider, {
|
|
133
|
+
value: null
|
|
134
|
+
}, typeof n == "function" ? n(e, r) : v.cloneElement(v.Children.only(n), r))
|
|
135
|
+
);
|
|
136
|
+
}, u;
|
|
137
|
+
}(v.Component);
|
|
138
|
+
p.contextType = O;
|
|
139
|
+
p.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
140
|
+
/**
|
|
141
|
+
* A React reference to DOM element that need to transition:
|
|
142
|
+
* https://stackoverflow.com/a/51127130/4671932
|
|
143
|
+
*
|
|
144
|
+
* - When `nodeRef` prop is used, `node` is not passed to callback functions
|
|
145
|
+
* (e.g. `onEnter`) because user already has direct access to the node.
|
|
146
|
+
* - When changing `key` prop of `Transition` in a `TransitionGroup` a new
|
|
147
|
+
* `nodeRef` need to be provided to `Transition` with changed `key` prop
|
|
148
|
+
* (see
|
|
149
|
+
* [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
|
|
150
|
+
*/
|
|
151
|
+
nodeRef: o.shape({
|
|
152
|
+
current: typeof Element == "undefined" ? o.any : function(d, u, a, i, e, t) {
|
|
153
|
+
var n = d[u];
|
|
154
|
+
return o.instanceOf(n && "ownerDocument" in n ? n.ownerDocument.defaultView.Element : Element)(d, u, a, i, e, t);
|
|
155
|
+
}
|
|
156
|
+
}),
|
|
157
|
+
/**
|
|
158
|
+
* A `function` child can be used instead of a React element. This function is
|
|
159
|
+
* called with the current transition status (`'entering'`, `'entered'`,
|
|
160
|
+
* `'exiting'`, `'exited'`), which can be used to apply context
|
|
161
|
+
* specific props to a component.
|
|
162
|
+
*
|
|
163
|
+
* ```jsx
|
|
164
|
+
* <Transition in={this.state.in} timeout={150}>
|
|
165
|
+
* {state => (
|
|
166
|
+
* <MyComponent className={`fade fade-${state}`} />
|
|
167
|
+
* )}
|
|
168
|
+
* </Transition>
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
children: o.oneOfType([o.func.isRequired, o.element.isRequired]).isRequired,
|
|
172
|
+
/**
|
|
173
|
+
* Show the component; triggers the enter or exit states
|
|
174
|
+
*/
|
|
175
|
+
in: o.bool,
|
|
176
|
+
/**
|
|
177
|
+
* By default the child component is mounted immediately along with
|
|
178
|
+
* the parent `Transition` component. If you want to "lazy mount" the component on the
|
|
179
|
+
* first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
|
|
180
|
+
* mounted, even on "exited", unless you also specify `unmountOnExit`.
|
|
181
|
+
*/
|
|
182
|
+
mountOnEnter: o.bool,
|
|
183
|
+
/**
|
|
184
|
+
* By default the child component stays mounted after it reaches the `'exited'` state.
|
|
185
|
+
* Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
|
|
186
|
+
*/
|
|
187
|
+
unmountOnExit: o.bool,
|
|
188
|
+
/**
|
|
189
|
+
* By default the child component does not perform the enter transition when
|
|
190
|
+
* it first mounts, regardless of the value of `in`. If you want this
|
|
191
|
+
* behavior, set both `appear` and `in` to `true`.
|
|
192
|
+
*
|
|
193
|
+
* > **Note**: there are no special appear states like `appearing`/`appeared`, this prop
|
|
194
|
+
* > only adds an additional enter transition. However, in the
|
|
195
|
+
* > `<CSSTransition>` component that first enter transition does result in
|
|
196
|
+
* > additional `.appear-*` classes, that way you can choose to style it
|
|
197
|
+
* > differently.
|
|
198
|
+
*/
|
|
199
|
+
appear: o.bool,
|
|
200
|
+
/**
|
|
201
|
+
* Enable or disable enter transitions.
|
|
202
|
+
*/
|
|
203
|
+
enter: o.bool,
|
|
204
|
+
/**
|
|
205
|
+
* Enable or disable exit transitions.
|
|
206
|
+
*/
|
|
207
|
+
exit: o.bool,
|
|
208
|
+
/**
|
|
209
|
+
* The duration of the transition, in milliseconds.
|
|
210
|
+
* Required unless `addEndListener` is provided.
|
|
211
|
+
*
|
|
212
|
+
* You may specify a single timeout for all transitions:
|
|
213
|
+
*
|
|
214
|
+
* ```jsx
|
|
215
|
+
* timeout={500}
|
|
216
|
+
* ```
|
|
217
|
+
*
|
|
218
|
+
* or individually:
|
|
219
|
+
*
|
|
220
|
+
* ```jsx
|
|
221
|
+
* timeout={{
|
|
222
|
+
* appear: 500,
|
|
223
|
+
* enter: 300,
|
|
224
|
+
* exit: 500,
|
|
225
|
+
* }}
|
|
226
|
+
* ```
|
|
227
|
+
*
|
|
228
|
+
* - `appear` defaults to the value of `enter`
|
|
229
|
+
* - `enter` defaults to `0`
|
|
230
|
+
* - `exit` defaults to `0`
|
|
231
|
+
*
|
|
232
|
+
* @type {number | { enter?: number, exit?: number, appear?: number }}
|
|
233
|
+
*/
|
|
234
|
+
timeout: function(u) {
|
|
235
|
+
var a = R;
|
|
236
|
+
u.addEndListener || (a = a.isRequired);
|
|
237
|
+
for (var i = arguments.length, e = new Array(i > 1 ? i - 1 : 0), t = 1; t < i; t++)
|
|
238
|
+
e[t - 1] = arguments[t];
|
|
239
|
+
return a.apply(void 0, [u].concat(e));
|
|
240
|
+
},
|
|
241
|
+
/**
|
|
242
|
+
* Add a custom transition end trigger. Called with the transitioning
|
|
243
|
+
* DOM node and a `done` callback. Allows for more fine grained transition end
|
|
244
|
+
* logic. Timeouts are still used as a fallback if provided.
|
|
245
|
+
*
|
|
246
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
247
|
+
*
|
|
248
|
+
* ```jsx
|
|
249
|
+
* addEndListener={(node, done) => {
|
|
250
|
+
* // use the css transitionend event to mark the finish of a transition
|
|
251
|
+
* node.addEventListener('transitionend', done, false);
|
|
252
|
+
* }}
|
|
253
|
+
* ```
|
|
254
|
+
*/
|
|
255
|
+
addEndListener: o.func,
|
|
256
|
+
/**
|
|
257
|
+
* Callback fired before the "entering" status is applied. An extra parameter
|
|
258
|
+
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
259
|
+
*
|
|
260
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
261
|
+
*
|
|
262
|
+
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
263
|
+
*/
|
|
264
|
+
onEnter: o.func,
|
|
265
|
+
/**
|
|
266
|
+
* Callback fired after the "entering" status is applied. An extra parameter
|
|
267
|
+
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
268
|
+
*
|
|
269
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
270
|
+
*
|
|
271
|
+
* @type Function(node: HtmlElement, isAppearing: bool)
|
|
272
|
+
*/
|
|
273
|
+
onEntering: o.func,
|
|
274
|
+
/**
|
|
275
|
+
* Callback fired after the "entered" status is applied. An extra parameter
|
|
276
|
+
* `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
|
|
277
|
+
*
|
|
278
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
279
|
+
*
|
|
280
|
+
* @type Function(node: HtmlElement, isAppearing: bool) -> void
|
|
281
|
+
*/
|
|
282
|
+
onEntered: o.func,
|
|
283
|
+
/**
|
|
284
|
+
* Callback fired before the "exiting" status is applied.
|
|
285
|
+
*
|
|
286
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
287
|
+
*
|
|
288
|
+
* @type Function(node: HtmlElement) -> void
|
|
289
|
+
*/
|
|
290
|
+
onExit: o.func,
|
|
291
|
+
/**
|
|
292
|
+
* Callback fired after the "exiting" status is applied.
|
|
293
|
+
*
|
|
294
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed.
|
|
295
|
+
*
|
|
296
|
+
* @type Function(node: HtmlElement) -> void
|
|
297
|
+
*/
|
|
298
|
+
onExiting: o.func,
|
|
299
|
+
/**
|
|
300
|
+
* Callback fired after the "exited" status is applied.
|
|
301
|
+
*
|
|
302
|
+
* **Note**: when `nodeRef` prop is passed, `node` is not passed
|
|
303
|
+
*
|
|
304
|
+
* @type Function(node: HtmlElement) -> void
|
|
305
|
+
*/
|
|
306
|
+
onExited: o.func
|
|
307
|
+
} : {};
|
|
308
|
+
function E() {
|
|
309
|
+
}
|
|
310
|
+
p.defaultProps = {
|
|
311
|
+
in: !1,
|
|
312
|
+
mountOnEnter: !1,
|
|
313
|
+
unmountOnExit: !1,
|
|
314
|
+
appear: !1,
|
|
315
|
+
enter: !0,
|
|
316
|
+
exit: !0,
|
|
317
|
+
onEnter: E,
|
|
318
|
+
onEntering: E,
|
|
319
|
+
onEntered: E,
|
|
320
|
+
onExit: E,
|
|
321
|
+
onExiting: E,
|
|
322
|
+
onExited: E
|
|
323
|
+
};
|
|
324
|
+
p.UNMOUNTED = x;
|
|
325
|
+
p.EXITED = f;
|
|
326
|
+
p.ENTERING = l;
|
|
327
|
+
p.ENTERED = h;
|
|
328
|
+
p.EXITING = N;
|
|
329
|
+
export {
|
|
330
|
+
h as ENTERED,
|
|
331
|
+
l as ENTERING,
|
|
332
|
+
f as EXITED,
|
|
333
|
+
N as EXITING,
|
|
334
|
+
x as UNMOUNTED,
|
|
335
|
+
p as default
|
|
336
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import e from "../../../prop-types/index.js";
|
|
2
|
+
var n = process.env.NODE_ENV !== "production" ? e.oneOfType([e.number, e.shape({
|
|
3
|
+
enter: e.number,
|
|
4
|
+
exit: e.number,
|
|
5
|
+
appear: e.number
|
|
6
|
+
}).isRequired]) : null, t = process.env.NODE_ENV !== "production" ? e.oneOfType([e.string, e.shape({
|
|
7
|
+
enter: e.string,
|
|
8
|
+
exit: e.string,
|
|
9
|
+
active: e.string
|
|
10
|
+
}), e.shape({
|
|
11
|
+
enter: e.string,
|
|
12
|
+
enterDone: e.string,
|
|
13
|
+
enterActive: e.string,
|
|
14
|
+
exit: e.string,
|
|
15
|
+
exitDone: e.string,
|
|
16
|
+
exitActive: e.string
|
|
17
|
+
})]) : null;
|
|
18
|
+
export {
|
|
19
|
+
t as classNamesShape,
|
|
20
|
+
n as timeoutsShape
|
|
21
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { useRef as d, useEffect as c, useLayoutEffect as f } from "react";
|
|
2
|
+
import "../../lodash.debounce/index.js";
|
|
3
|
+
var a = typeof window != "undefined" ? f : c;
|
|
4
|
+
function E(t, r, u, i) {
|
|
5
|
+
const s = d(r);
|
|
6
|
+
a(() => {
|
|
7
|
+
s.current = r;
|
|
8
|
+
}, [r]), c(() => {
|
|
9
|
+
const e = window;
|
|
10
|
+
if (!(e && e.addEventListener))
|
|
11
|
+
return;
|
|
12
|
+
const o = (n) => {
|
|
13
|
+
s.current(n);
|
|
14
|
+
};
|
|
15
|
+
return e.addEventListener(t, o, i), () => {
|
|
16
|
+
e.removeEventListener(t, o, i);
|
|
17
|
+
};
|
|
18
|
+
}, [t, u, i]);
|
|
19
|
+
}
|
|
20
|
+
function L(t, r, u = "mousedown", i = {}) {
|
|
21
|
+
E(
|
|
22
|
+
u,
|
|
23
|
+
(s) => {
|
|
24
|
+
const e = s.target;
|
|
25
|
+
if (!e || !e.isConnected)
|
|
26
|
+
return;
|
|
27
|
+
(Array.isArray(t) ? t.filter((n) => !!n.current).every((n) => n.current && !n.current.contains(e)) : t.current && !t.current.contains(e)) && r(s);
|
|
28
|
+
},
|
|
29
|
+
void 0,
|
|
30
|
+
i
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
E as useEventListener,
|
|
35
|
+
a as useIsomorphicLayoutEffect,
|
|
36
|
+
L as useOnClickOutside
|
|
37
|
+
};
|
package/dist/scss/_vars.scss
CHANGED
|
@@ -352,6 +352,9 @@ $max-site-width: 1560px;
|
|
|
352
352
|
/// height Tokens
|
|
353
353
|
///////////////////////
|
|
354
354
|
$header-height: 42px;
|
|
355
|
+
$nav-height: 3.5rem;
|
|
356
|
+
$top-row-height: 3.75rem;
|
|
357
|
+
$desktop-header-height: calc($nav-height + $top-row-height + 1px);
|
|
355
358
|
$user-management-height: 30px;
|
|
356
359
|
$header-submenu-top: calc($header-height + $user-management-height + 1px);
|
|
357
360
|
$desktop-max-width: var(--desktop-max-width);
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
@use 'components/Row/row';
|
|
21
21
|
@use 'components/GridItem/gridItem';
|
|
22
22
|
@use 'components/Search/search';
|
|
23
|
+
@use 'components/Search/searchButton';
|
|
23
24
|
@use 'components/Search/SearchResults/searchResults';
|
|
24
25
|
@use 'components/Social/social';
|
|
25
26
|
@use 'components/SplitPanel/splitPanel';
|