@phillips/seldon 1.119.0 → 1.121.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 +1 -1
- package/dist/components/Accordion/Accordion.js +18 -18
- package/dist/components/Accordion/AccordionItem.js +67 -68
- package/dist/components/Carousel/Carousel.js +49 -51
- package/dist/components/Carousel/CarouselDots.js +46 -47
- package/dist/components/ContentPeek/ContentPeek.js +47 -47
- package/dist/components/ErrorBoundary/ErrorBoundary.js +11 -12
- package/dist/components/Filter/Filter.js +40 -41
- package/dist/components/Filter/FilterHeader.js +24 -24
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +21 -20
- package/dist/components/Input/Input.stories.d.ts +7 -0
- package/dist/components/Link/utils.js +2 -2
- package/dist/components/LinkBlock/LinkBlock.js +12 -13
- package/dist/components/LinkList/LinkList.js +8 -11
- package/dist/components/Navigation/Navigation.js +21 -22
- package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js +48 -50
- package/dist/components/Navigation/NavigationList/NavigationList.js +33 -35
- package/dist/components/Pagination/Pagination.js +7 -7
- package/dist/components/Pagination/utils.js +1 -1
- package/dist/components/PinchZoom/PinchZoom.js +40 -43
- package/dist/components/Search/Search.js +94 -98
- package/dist/components/Search/SearchButton.js +19 -19
- package/dist/components/SeldonImage/SeldonImage.js +1 -1
- package/dist/components/Select/Select.js +22 -14
- package/dist/components/Select/Select.stories.d.ts +15 -0
- package/dist/components/Tabs/TabTrigger.js +13 -13
- package/dist/node_modules/@artsy/fresnel/dist/Breakpoints.js +2 -2
- package/dist/node_modules/@artsy/fresnel/dist/DynamicResponsive.js +1 -1
- package/dist/node_modules/@artsy/fresnel/dist/Interactions.js +2 -2
- package/dist/node_modules/@artsy/fresnel/dist/Media.js +2 -2
- package/dist/node_modules/@artsy/fresnel/dist/MediaQueries.js +1 -1
- package/dist/node_modules/@artsy/fresnel/dist/Utils.js +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +2 -2
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +2 -2
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +5 -5
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +63 -67
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +35 -35
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +79 -83
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.js +5 -5
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.js +43 -45
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +86 -87
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.js +7 -8
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.js +56 -57
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.js +12 -13
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.js +37 -42
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js +18 -19
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +86 -87
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +7 -8
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +56 -57
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +10 -10
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +113 -115
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +12 -13
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +33 -37
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +422 -439
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +1 -1
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +18 -19
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-context/dist/index.js +39 -41
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence/dist/index.js +37 -42
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +7 -10
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +1 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +1 -1
- package/dist/node_modules/change-case/dist/index.js +41 -44
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +11 -11
- package/dist/node_modules/date-fns/differenceInDays.js +9 -9
- package/dist/node_modules/date-fns/differenceInHours.js +11 -11
- package/dist/node_modules/date-fns/differenceInMinutes.js +8 -8
- package/dist/node_modules/date-fns/differenceInSeconds.js +7 -7
- package/dist/node_modules/date-fns/formatDuration.js +11 -12
- package/dist/node_modules/date-fns/isSameWeek.js +8 -8
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +12 -12
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +3 -3
- package/dist/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js +5 -5
- package/dist/node_modules/date-fns/locale/zh-CN/_lib/localize.js +10 -10
- package/dist/node_modules/date-fns/startOfDay.js +6 -6
- package/dist/node_modules/date-fns/startOfWeek.js +7 -8
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1 -1
- package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +1 -1
- package/dist/node_modules/exenv/index.js +2 -2
- package/dist/node_modules/get-nonce/dist/es2015/index.js +1 -1
- package/dist/node_modules/prop-types/checkPropTypes.js +2 -2
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +3 -3
- package/dist/node_modules/react-intersection-observer/dist/index.js +2 -2
- package/dist/node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js +1 -1
- package/dist/node_modules/react-modal/lib/components/ModalPortal.js +1 -1
- package/dist/node_modules/react-modal/lib/helpers/scopeTab.js +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +1 -1
- package/dist/node_modules/react-transition-group/esm/Transition.js +1 -1
- package/dist/node_modules/react-zoom-pan-pinch/dist/index.esm.js +14 -14
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +1 -1
- package/dist/node_modules/usehooks-ts/dist/index.js +1 -1
- package/dist/node_modules/warning/warning.js +1 -1
- package/dist/node_modules/wheel-gestures/dist/wheel-gestures.esm.js +1 -1
- package/dist/patterns/BidSnapshot/BidSnapshot.js +58 -58
- package/dist/patterns/DetailList/DetailList.js +22 -22
- package/dist/patterns/FilterMenu/FilterMenu.js +15 -15
- package/dist/patterns/LanguageSelector/LanguageSelector.js +23 -23
- package/dist/patterns/LanguageSelector/utils.js +2 -5
- package/dist/patterns/ObjectTile/ObjectTile.d.ts +4 -0
- package/dist/patterns/ObjectTile/ObjectTile.js +50 -48
- package/dist/patterns/ObjectTile/ObjectTile.stories.d.ts +2 -0
- package/dist/patterns/ViewingsList/StatefulViewingsList.js +16 -16
- package/dist/patterns/ViewingsList/ViewingsList.js +42 -42
- package/dist/patterns/ViewingsList/ViewingsListCard.js +122 -123
- package/dist/patterns/ViewingsList/ViewingsListCardForm.js +170 -170
- package/dist/scss/patterns/ObjectTile/_objectTile.scss +17 -1
- package/dist/site-furniture/Header/Header.js +32 -32
- package/package.json +2 -1
|
@@ -1,61 +1,61 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import
|
|
4
|
-
import { getCommonProps as
|
|
5
|
-
import
|
|
6
|
-
import { ButtonVariants as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import { HeightUnits as
|
|
13
|
-
const
|
|
1
|
+
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as x, useState as f, useRef as P, useEffect as b, useCallback as k } from "react";
|
|
3
|
+
import p from "../../node_modules/classnames/index.js";
|
|
4
|
+
import { getCommonProps as R } from "../../utils/index.js";
|
|
5
|
+
import w from "../Button/Button.js";
|
|
6
|
+
import { ButtonVariants as E } from "../Button/types.js";
|
|
7
|
+
import M from "../Collapsible/Collapsible.js";
|
|
8
|
+
import O from "../Collapsible/CollapsibleContent.js";
|
|
9
|
+
import S from "../Collapsible/CollapsibleTrigger.js";
|
|
10
|
+
import j from "../../assets/plus.svg.js";
|
|
11
|
+
import B from "../../assets/minus.svg.js";
|
|
12
|
+
import { HeightUnits as I } from "./utils.js";
|
|
13
|
+
const L = x(
|
|
14
14
|
({
|
|
15
|
-
className:
|
|
16
|
-
children:
|
|
15
|
+
className: d,
|
|
16
|
+
children: l,
|
|
17
17
|
contentExpandText: u = "Read More",
|
|
18
|
-
contentCollapseText:
|
|
19
|
-
maxHeight:
|
|
20
|
-
minHeightThreshold:
|
|
21
|
-
heightUnits:
|
|
22
|
-
...
|
|
23
|
-
},
|
|
24
|
-
const { className: e, ...
|
|
25
|
-
|
|
26
|
-
if (
|
|
27
|
-
const
|
|
28
|
-
|
|
18
|
+
contentCollapseText: g = "Read Less",
|
|
19
|
+
maxHeight: t = 480,
|
|
20
|
+
minHeightThreshold: m,
|
|
21
|
+
heightUnits: v = I.px,
|
|
22
|
+
...s
|
|
23
|
+
}, C) => {
|
|
24
|
+
const { className: e, ...h } = R(s, "ContentPeek"), [r, y] = f(!1), [i, N] = f(!1), a = P(null);
|
|
25
|
+
b(() => {
|
|
26
|
+
if (a.current) {
|
|
27
|
+
const n = m ?? t;
|
|
28
|
+
N(a.current.scrollHeight > n);
|
|
29
29
|
}
|
|
30
|
-
}, [
|
|
31
|
-
const
|
|
32
|
-
|
|
30
|
+
}, [l, t, m]);
|
|
31
|
+
const $ = k(() => {
|
|
32
|
+
y((n) => !n);
|
|
33
33
|
}, []);
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
-
|
|
34
|
+
return /* @__PURE__ */ c(
|
|
35
|
+
M,
|
|
36
36
|
{
|
|
37
|
-
id:
|
|
37
|
+
id: s?.id,
|
|
38
38
|
open: r,
|
|
39
|
-
onOpenChange:
|
|
40
|
-
className:
|
|
39
|
+
onOpenChange: $,
|
|
40
|
+
className: p(e, d),
|
|
41
41
|
style: {
|
|
42
|
-
"--content-peek-max-height": `${
|
|
42
|
+
"--content-peek-max-height": `${t}${v}`
|
|
43
43
|
},
|
|
44
|
-
ref:
|
|
45
|
-
...
|
|
46
|
-
...
|
|
44
|
+
ref: C,
|
|
45
|
+
...h,
|
|
46
|
+
...s,
|
|
47
47
|
children: [
|
|
48
|
-
/* @__PURE__ */ o(
|
|
49
|
-
|
|
48
|
+
/* @__PURE__ */ o(O, { className: `${e}-content`, ref: a, forceMount: !0, children: l }),
|
|
49
|
+
i ? /* @__PURE__ */ o(
|
|
50
50
|
"div",
|
|
51
51
|
{
|
|
52
|
-
className:
|
|
52
|
+
className: p(`${e}-overlay`, {
|
|
53
53
|
[`${e}-overlay--expanded`]: r,
|
|
54
|
-
[`${e}-overlay--gradient`]:
|
|
54
|
+
[`${e}-overlay--gradient`]: i && !r
|
|
55
55
|
}),
|
|
56
|
-
children: /* @__PURE__ */ o("div", { className: `${e}-overlay-trigger-wrapper`, children: /* @__PURE__ */ o(
|
|
57
|
-
r ? /* @__PURE__ */ o(
|
|
58
|
-
r ?
|
|
56
|
+
children: /* @__PURE__ */ o("div", { className: `${e}-overlay-trigger-wrapper`, children: /* @__PURE__ */ o(S, { asChild: !0, className: `${e}-overlay-trigger`, children: /* @__PURE__ */ c(w, { variant: E.secondary, children: [
|
|
57
|
+
r ? /* @__PURE__ */ o(B, {}) : /* @__PURE__ */ o(j, {}),
|
|
58
|
+
r ? g : u
|
|
59
59
|
] }) }) })
|
|
60
60
|
}
|
|
61
61
|
) : null
|
|
@@ -64,7 +64,7 @@ const U = P(
|
|
|
64
64
|
);
|
|
65
65
|
}
|
|
66
66
|
);
|
|
67
|
-
|
|
67
|
+
L.displayName = "ContentPeek";
|
|
68
68
|
export {
|
|
69
|
-
|
|
69
|
+
L as default
|
|
70
70
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var e = (o, r, t) =>
|
|
4
|
-
import { jsx as
|
|
5
|
-
import * as
|
|
6
|
-
class
|
|
1
|
+
var s = Object.defineProperty;
|
|
2
|
+
var n = (o, r, t) => r in o ? s(o, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[r] = t;
|
|
3
|
+
var e = (o, r, t) => n(o, typeof r != "symbol" ? r + "" : r, t);
|
|
4
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
5
|
+
import * as c from "react";
|
|
6
|
+
class l extends c.Component {
|
|
7
7
|
constructor() {
|
|
8
8
|
super(...arguments);
|
|
9
9
|
e(this, "state", {
|
|
@@ -13,17 +13,16 @@ class h extends p.Component {
|
|
|
13
13
|
static getDerivedStateFromError() {
|
|
14
14
|
return { hasError: !0 };
|
|
15
15
|
}
|
|
16
|
-
componentDidCatch(t,
|
|
17
|
-
|
|
18
|
-
(s = this.props) == null || s.logger(t, (a = n.componentStack) != null ? a : "ErrorBoundary caught an error");
|
|
16
|
+
componentDidCatch(t, a) {
|
|
17
|
+
this.props?.logger(t, a.componentStack ?? "ErrorBoundary caught an error");
|
|
19
18
|
}
|
|
20
19
|
render() {
|
|
21
|
-
return this.state.hasError ? this.props.fallback || /* @__PURE__ */
|
|
20
|
+
return this.state.hasError ? this.props.fallback || /* @__PURE__ */ i("h2", { children: "Sorry... An error occurred and we are looking into it" }) : this.props.children;
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
|
-
e(
|
|
23
|
+
e(l, "defaultProps", {
|
|
25
24
|
logger: console.log
|
|
26
25
|
});
|
|
27
26
|
export {
|
|
28
|
-
|
|
27
|
+
l as default
|
|
29
28
|
};
|
|
@@ -1,53 +1,52 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { ButtonVariants as
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { jsxs as o, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as H, useState as P, Children as j, isValidElement as c, cloneElement as f } from "react";
|
|
3
|
+
import { getCommonProps as B, findChildrenOfType as S, findChildrenExcludingTypes as T, px as b } from "../../utils/index.js";
|
|
4
|
+
import k from "../../node_modules/classnames/index.js";
|
|
5
|
+
import p from "./FilterHeader.js";
|
|
6
|
+
import I from "../Button/Button.js";
|
|
7
|
+
import { ButtonVariants as O } from "../Button/types.js";
|
|
8
|
+
import R from "../../assets/chevronNext.svg.js";
|
|
9
|
+
const q = H(
|
|
10
10
|
({
|
|
11
|
-
className:
|
|
12
|
-
children:
|
|
13
|
-
name:
|
|
14
|
-
viewAllLimit:
|
|
15
|
-
isViewingAll:
|
|
16
|
-
isHidden:
|
|
17
|
-
setViewAllFilter:
|
|
18
|
-
viewAllLabel:
|
|
19
|
-
...
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
(a, j) => p(a) ? h(a, { hidden: !s && j + 1 > m }) : a
|
|
11
|
+
className: h,
|
|
12
|
+
children: C,
|
|
13
|
+
name: a,
|
|
14
|
+
viewAllLimit: l = 10,
|
|
15
|
+
isViewingAll: r = !1,
|
|
16
|
+
isHidden: N = !1,
|
|
17
|
+
setViewAllFilter: n,
|
|
18
|
+
viewAllLabel: u = "View All",
|
|
19
|
+
...i
|
|
20
|
+
}, _) => {
|
|
21
|
+
const [v, x] = P(!1), { className: e, ...y } = B(i, "Filter"), s = j.toArray(C), g = { isViewingAll: r, setViewAllFilter: n, setIsClosing: x }, m = S(s, p)?.[0], F = c(m) ? f(m, g) : null, $ = T(s, [p])?.map(
|
|
22
|
+
(t, E) => c(t) ? f(t, { hidden: !r && E + 1 > l }) : t
|
|
24
23
|
);
|
|
25
|
-
return /* @__PURE__ */
|
|
24
|
+
return /* @__PURE__ */ o(
|
|
26
25
|
"div",
|
|
27
26
|
{
|
|
28
|
-
|
|
29
|
-
className:
|
|
30
|
-
[`${
|
|
31
|
-
"is-closing":
|
|
27
|
+
...y,
|
|
28
|
+
className: k(e, h, {
|
|
29
|
+
[`${b}-filter--hidden`]: N,
|
|
30
|
+
"is-closing": v
|
|
32
31
|
}),
|
|
33
|
-
...
|
|
34
|
-
ref:
|
|
32
|
+
...i,
|
|
33
|
+
ref: _,
|
|
35
34
|
children: [
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
|
|
38
|
-
/* @__PURE__ */
|
|
35
|
+
/* @__PURE__ */ o("fieldset", { name: a, className: `${e}__fieldset`, children: [
|
|
36
|
+
F,
|
|
37
|
+
/* @__PURE__ */ d("div", { className: `${e}__filters`, children: $ })
|
|
39
38
|
] }),
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
s.length > l && !r ? /* @__PURE__ */ o(
|
|
40
|
+
I,
|
|
42
41
|
{
|
|
43
|
-
className: `${
|
|
44
|
-
variant:
|
|
42
|
+
className: `${e}__view-all`,
|
|
43
|
+
variant: O.tertiary,
|
|
45
44
|
onClick: () => {
|
|
46
|
-
|
|
45
|
+
n?.(a);
|
|
47
46
|
},
|
|
48
47
|
children: [
|
|
49
|
-
|
|
50
|
-
/* @__PURE__ */
|
|
48
|
+
u,
|
|
49
|
+
/* @__PURE__ */ d(R, { className: `${e}__chevron` })
|
|
51
50
|
]
|
|
52
51
|
}
|
|
53
52
|
) : null
|
|
@@ -56,7 +55,7 @@ const D = B(
|
|
|
56
55
|
);
|
|
57
56
|
}
|
|
58
57
|
);
|
|
59
|
-
|
|
58
|
+
q.displayName = "Filter";
|
|
60
59
|
export {
|
|
61
|
-
|
|
60
|
+
q as default
|
|
62
61
|
};
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import
|
|
5
|
-
import { TextVariants as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { ButtonVariants as
|
|
9
|
-
import
|
|
10
|
-
const
|
|
11
|
-
({ className:
|
|
12
|
-
const { className:
|
|
13
|
-
a
|
|
14
|
-
|
|
1
|
+
import { jsxs as o, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
import { getCommonProps as h } from "../../utils/index.js";
|
|
4
|
+
import u from "../../node_modules/classnames/index.js";
|
|
5
|
+
import { TextVariants as N } from "../Text/types.js";
|
|
6
|
+
import v from "../Text/Text.js";
|
|
7
|
+
import x from "../Button/Button.js";
|
|
8
|
+
import { ButtonVariants as _ } from "../Button/types.js";
|
|
9
|
+
import g from "../../assets/chevronNext.svg.js";
|
|
10
|
+
const C = p(
|
|
11
|
+
({ className: m, heading: s, isViewingAll: l = !1, setViewAllFilter: i, setIsClosing: a, ...t }, n) => {
|
|
12
|
+
const { className: e, ...c } = h(t, "FilterHeader"), d = () => {
|
|
13
|
+
a?.(!0), setTimeout(() => {
|
|
14
|
+
i?.(null), a?.(!1);
|
|
15
15
|
}, 300);
|
|
16
16
|
};
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
|
|
17
|
+
return /* @__PURE__ */ o("div", { ...c, className: u(e, m), ...t, ref: n, children: [
|
|
18
|
+
/* @__PURE__ */ r(
|
|
19
|
+
v,
|
|
20
20
|
{
|
|
21
|
-
variant:
|
|
22
|
-
className: `${
|
|
23
|
-
element: (
|
|
21
|
+
variant: N.heading4,
|
|
22
|
+
className: `${e}__heading`,
|
|
23
|
+
element: (f) => /* @__PURE__ */ r("legend", { ...f, children: s })
|
|
24
24
|
}
|
|
25
25
|
),
|
|
26
|
-
|
|
27
|
-
/* @__PURE__ */
|
|
26
|
+
l ? /* @__PURE__ */ o(x, { variant: _.tertiary, onClick: d, className: `${e}__back`, children: [
|
|
27
|
+
/* @__PURE__ */ r(g, { className: `${e}__chevron` }),
|
|
28
28
|
"Back to all"
|
|
29
29
|
] }) : null
|
|
30
30
|
] });
|
|
31
31
|
}
|
|
32
32
|
);
|
|
33
|
-
|
|
33
|
+
C.displayName = "FilterHeader";
|
|
34
34
|
export {
|
|
35
|
-
|
|
35
|
+
C as default
|
|
36
36
|
};
|
|
@@ -37,7 +37,7 @@ export interface InputProps extends Omit<React.ComponentProps<'input'>, 'size'>
|
|
|
37
37
|
/**
|
|
38
38
|
* Text that will be read by a screen reader when visiting this control
|
|
39
39
|
*/
|
|
40
|
-
labelText:
|
|
40
|
+
labelText: React.ReactNode;
|
|
41
41
|
/**
|
|
42
42
|
* Optional `onChange` handler that is called whenever `<input>` is updated
|
|
43
43
|
*/
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { jsxs as R, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import * as o from "react";
|
|
3
|
-
import
|
|
3
|
+
import e from "../../node_modules/classnames/index.js";
|
|
4
4
|
import { px as i, useNormalizedInputProps as g } from "../../utils/index.js";
|
|
5
5
|
const k = o.forwardRef(
|
|
6
6
|
({
|
|
7
|
-
className:
|
|
7
|
+
className: p,
|
|
8
8
|
defaultValue: u,
|
|
9
|
-
disabled:
|
|
10
|
-
hideLabel:
|
|
11
|
-
id:
|
|
9
|
+
disabled: $,
|
|
10
|
+
hideLabel: m,
|
|
11
|
+
id: a,
|
|
12
12
|
inline: c,
|
|
13
13
|
invalid: _,
|
|
14
14
|
invalidText: b,
|
|
@@ -16,7 +16,7 @@ const k = o.forwardRef(
|
|
|
16
16
|
onChange: f,
|
|
17
17
|
onClick: v,
|
|
18
18
|
placeholder: x,
|
|
19
|
-
readOnly:
|
|
19
|
+
readOnly: d,
|
|
20
20
|
size: w = "md",
|
|
21
21
|
type: l = "text",
|
|
22
22
|
value: I,
|
|
@@ -24,51 +24,52 @@ const k = o.forwardRef(
|
|
|
24
24
|
warnText: y,
|
|
25
25
|
...r
|
|
26
26
|
}, j) => {
|
|
27
|
-
const
|
|
28
|
-
disabled:
|
|
29
|
-
id:
|
|
27
|
+
const n = o.useId(), t = g({
|
|
28
|
+
disabled: $,
|
|
29
|
+
id: a || n,
|
|
30
30
|
invalid: _,
|
|
31
31
|
invalidText: b,
|
|
32
|
-
readOnly:
|
|
32
|
+
readOnly: d,
|
|
33
33
|
type: l,
|
|
34
34
|
warn: N,
|
|
35
35
|
warnText: y
|
|
36
|
-
}), P =
|
|
36
|
+
}), P = e(`${i}-${l}-input`, `${i}-input`, `${i}-input--${w}`, {
|
|
37
37
|
[`${i}-input--inline`]: c,
|
|
38
|
-
[`${i}-input--readonly`]:
|
|
38
|
+
[`${i}-input--readonly`]: d,
|
|
39
39
|
[`${i}-input--disabled`]: t.disabled,
|
|
40
40
|
[`${i}-input--invalid`]: t.invalid,
|
|
41
41
|
[`${i}-input--warn`]: t.warn,
|
|
42
|
-
[`${
|
|
42
|
+
[`${p}__wrapper`]: p,
|
|
43
43
|
[`${i}-input--hidden`]: r.hidden
|
|
44
44
|
});
|
|
45
45
|
return /* @__PURE__ */ R("div", { className: P, children: [
|
|
46
46
|
/* @__PURE__ */ s(
|
|
47
47
|
"label",
|
|
48
48
|
{
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
"data-testid": `label-${a || n}`,
|
|
50
|
+
htmlFor: a || n,
|
|
51
|
+
className: e(`${i}-input__label`, { [`${i}-input__label--hidden`]: m }),
|
|
51
52
|
children: h
|
|
52
53
|
}
|
|
53
54
|
),
|
|
54
55
|
/* @__PURE__ */ s(
|
|
55
56
|
"input",
|
|
56
57
|
{
|
|
57
|
-
className:
|
|
58
|
-
"data-testid":
|
|
58
|
+
className: e(`${i}-input__input`, p),
|
|
59
|
+
"data-testid": a,
|
|
59
60
|
disabled: t.disabled,
|
|
60
|
-
id:
|
|
61
|
+
id: a || n,
|
|
61
62
|
onChange: f,
|
|
62
63
|
onClick: v,
|
|
63
64
|
placeholder: x,
|
|
64
|
-
readOnly:
|
|
65
|
+
readOnly: d,
|
|
65
66
|
ref: j,
|
|
66
67
|
type: t.type,
|
|
67
68
|
...t.type !== "checkbox" && t.type !== "radio" ? { value: I, defaultValue: u } : {},
|
|
68
69
|
...r
|
|
69
70
|
}
|
|
70
71
|
),
|
|
71
|
-
t.validation ? t.validation : /* @__PURE__ */ s("p", { className:
|
|
72
|
+
t.validation ? t.validation : /* @__PURE__ */ s("p", { className: e(`${i}-input__validation`), children: " " })
|
|
72
73
|
] });
|
|
73
74
|
}
|
|
74
75
|
);
|
|
@@ -322,6 +322,13 @@ export declare const ControlledInput: {
|
|
|
322
322
|
};
|
|
323
323
|
};
|
|
324
324
|
};
|
|
325
|
+
export declare const CustomLabel: {
|
|
326
|
+
({ playgroundWidth, ...args }: StoryProps): import("react/jsx-runtime").JSX.Element;
|
|
327
|
+
args: {
|
|
328
|
+
showIcon: boolean;
|
|
329
|
+
};
|
|
330
|
+
argTypes: {};
|
|
331
|
+
};
|
|
325
332
|
export declare const Playground: {
|
|
326
333
|
({ playgroundWidth, ...args }: StoryProps): import("react/jsx-runtime").JSX.Element;
|
|
327
334
|
args: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { px as a } from "../../utils/index.js";
|
|
2
|
-
const n = (t) => `${a}-link--${t}`, s = (t) => !!
|
|
2
|
+
const n = (t) => `${a}-link--${t}`, s = (t) => !!t?.match(
|
|
3
3
|
/(http[s]?:\/\/)(?!.*phillips\.com)([a-zA-Z0-9\-.]+)(:[0-9]{1,4})?([a-zA-Z0-9/\-._~:?#[\]@!$&'()*+,;=]*)/g
|
|
4
|
-
)
|
|
4
|
+
);
|
|
5
5
|
export {
|
|
6
6
|
n as getLinkVariantClassName,
|
|
7
7
|
s as isLinkExternal
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { getCommonProps as
|
|
4
|
-
import
|
|
5
|
-
import { LinkVariants as
|
|
6
|
-
import
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
/* @__PURE__ */ n(L, { className: `${t}__description`, children: e })
|
|
1
|
+
import { jsxs as c, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import l from "../../node_modules/classnames/index.js";
|
|
3
|
+
import { getCommonProps as d } from "../../utils/index.js";
|
|
4
|
+
import k from "../Link/Link.js";
|
|
5
|
+
import { LinkVariants as p } from "../Link/types.js";
|
|
6
|
+
import f from "../Text/Text.js";
|
|
7
|
+
const u = ({ linkProps: o, description: n, className: e, ...s }) => {
|
|
8
|
+
const { className: t, ...m } = d(s, "LinkBlock"), i = l(t, e), r = o.element ?? k;
|
|
9
|
+
return /* @__PURE__ */ c("div", { ...m, className: i, ...s, children: [
|
|
10
|
+
/* @__PURE__ */ a(r, { ...o, "data-testid": `${m["data-testid"]}-link`, variant: p.link }),
|
|
11
|
+
/* @__PURE__ */ a(f, { className: `${t}__description`, children: n })
|
|
13
12
|
] });
|
|
14
13
|
};
|
|
15
14
|
export {
|
|
16
|
-
|
|
15
|
+
u as default
|
|
17
16
|
};
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { getCommonProps as
|
|
3
|
-
import
|
|
4
|
-
import { Grid as
|
|
5
|
-
const
|
|
6
|
-
const { className:
|
|
7
|
-
return /* @__PURE__ */
|
|
8
|
-
var a, e;
|
|
9
|
-
return /* @__PURE__ */ t("li", { className: `${m}--item`, children: s }, (e = (a = s == null ? void 0 : s.props) == null ? void 0 : a.linkProps) == null ? void 0 : e.href);
|
|
10
|
-
}) });
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { getCommonProps as i } from "../../utils/index.js";
|
|
3
|
+
import l from "../../node_modules/classnames/index.js";
|
|
4
|
+
import { Grid as n } from "../Grid/Grid.js";
|
|
5
|
+
const u = ({ children: o, className: t, ...s }) => {
|
|
6
|
+
const { className: r, ...a } = i(s, "LinkList");
|
|
7
|
+
return /* @__PURE__ */ e(n, { ...a, className: l(r, t), element: "ul", role: "list", ...s, children: o.map((m) => /* @__PURE__ */ e("li", { className: `${r}--item`, children: m }, m?.props?.linkProps?.href)) });
|
|
11
8
|
};
|
|
12
9
|
export {
|
|
13
|
-
|
|
10
|
+
u as default
|
|
14
11
|
};
|
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import e, { forwardRef as
|
|
3
|
-
import { findChildrenOfType as
|
|
4
|
-
import
|
|
5
|
-
import { HeaderContext as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { SSRMediaQuery as
|
|
9
|
-
const
|
|
10
|
-
({ children: i, className:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
return /* @__PURE__ */ l(
|
|
1
|
+
import { jsx as r, jsxs as h } from "react/jsx-runtime";
|
|
2
|
+
import e, { forwardRef as u } from "react";
|
|
3
|
+
import { findChildrenOfType as s, findChildrenExcludingTypes as x, px as l } from "../../utils/index.js";
|
|
4
|
+
import E from "../../node_modules/classnames/index.js";
|
|
5
|
+
import { HeaderContext as N } from "../../site-furniture/Header/Header.js";
|
|
6
|
+
import d from "./NavigationList/NavigationList.js";
|
|
7
|
+
import m from "../../patterns/LanguageSelector/LanguageSelector.js";
|
|
8
|
+
import { SSRMediaQuery as S } from "../../providers/SeldonProvider/utils.js";
|
|
9
|
+
const y = u(
|
|
10
|
+
({ children: i, className: c, id: a, visible: f = !0, ...p }, v) => {
|
|
11
|
+
const { isSearchExpanded: n } = e.useContext(N), o = s(i, d)?.[0], g = x(i, [d, m]), t = s(i, m)?.[0];
|
|
12
|
+
return /* @__PURE__ */ r(
|
|
14
13
|
"nav",
|
|
15
14
|
{
|
|
16
15
|
role: "navigation",
|
|
17
16
|
"data-testid": a,
|
|
18
17
|
id: a,
|
|
19
|
-
style: { "--visible":
|
|
20
|
-
className:
|
|
21
|
-
...
|
|
22
|
-
ref:
|
|
23
|
-
children: /* @__PURE__ */
|
|
24
|
-
|
|
18
|
+
style: { "--visible": f ? "visible" : "hidden" },
|
|
19
|
+
className: E(`${l}-nav`, c),
|
|
20
|
+
...p,
|
|
21
|
+
ref: v,
|
|
22
|
+
children: /* @__PURE__ */ h("div", { className: `${l}-nav__list-container`, children: [
|
|
23
|
+
g,
|
|
25
24
|
e.isValidElement(o) ? e.cloneElement(o, { isOffScreen: n }) : void 0,
|
|
26
|
-
/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ r(S.Media, { lessThan: "md", children: e.isValidElement(t) && t ? e.cloneElement(t, {
|
|
27
26
|
isHidden: n
|
|
28
27
|
}) : void 0 })
|
|
29
28
|
] })
|
|
@@ -31,7 +30,7 @@ const _ = E(
|
|
|
31
30
|
);
|
|
32
31
|
}
|
|
33
32
|
);
|
|
34
|
-
|
|
33
|
+
y.displayName = "Navigation";
|
|
35
34
|
export {
|
|
36
|
-
|
|
35
|
+
y as default
|
|
37
36
|
};
|