@phillips/seldon 1.74.3 → 1.75.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/Accordion/Accordion.js +2 -2
- package/dist/components/Accordion/AccordionItem.js +3 -3
- package/dist/components/Breadcrumb/Breadcrumb.js +6 -6
- package/dist/components/Breadcrumb/BreadcrumbItem.js +6 -6
- package/dist/components/Button/Button.js +7 -7
- package/dist/components/Carousel/Carousel.js +8 -8
- package/dist/components/Carousel/CarouselContent.js +3 -3
- package/dist/components/Carousel/CarouselDots.js +24 -24
- package/dist/components/Carousel/CarouselItem.js +3 -3
- package/dist/components/ContentPeek/ContentPeek.js +5 -5
- package/dist/components/Drawer/Drawer.js +6 -6
- package/dist/components/Dropdown/Dropdown.js +3 -3
- package/dist/components/Grid/Grid.js +3 -3
- package/dist/components/Grid/utils.js +4 -4
- package/dist/components/GridItem/GridItem.js +8 -8
- package/dist/components/IconButton/IconButton.js +2 -2
- package/dist/components/Link/Link.js +6 -6
- package/dist/components/LinkBlock/LinkBlock.js +8 -7
- package/dist/components/LinkList/LinkList.js +5 -5
- package/dist/components/Modal/Modal.js +4 -4
- package/dist/components/Navigation/Navigation.js +4 -4
- package/dist/components/Navigation/NavigationList/NavigationList.js +3 -3
- package/dist/components/PageContentWrapper/PageContentWrapper.js +4 -4
- package/dist/components/PinchZoom/PinchZoom.js +3 -3
- package/dist/components/Row/Row.js +4 -4
- package/dist/components/Search/Search.js +5 -5
- package/dist/components/SeldonImage/SeldonImage.d.ts +47 -0
- package/dist/components/SeldonImage/SeldonImage.js +73 -0
- package/dist/components/SeldonImage/index.d.ts +1 -0
- package/dist/components/SplitPanel/SplitPanel.js +2 -2
- package/dist/components/Video/Video.js +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/node_modules/exenv/index.js +1 -1
- package/dist/node_modules/prop-types/node_modules/react-is/index.js +1 -1
- package/dist/patterns/DetailList/DetailList.js +7 -7
- package/dist/patterns/LanguageSelector/LanguageSelector.js +4 -4
- package/dist/patterns/Social/Social.js +5 -5
- package/dist/patterns/Subscribe/Subscribe.js +8 -8
- package/dist/patterns/UserManagement/UserManagement.js +2 -2
- package/dist/patterns/ViewingsList/ViewingsList.js +10 -10
- package/dist/patterns/ViewingsList/ViewingsListCard.js +12 -12
- package/dist/patterns/ViewingsList/ViewingsListCardForm.js +6 -6
- package/dist/providers/SeldonProvider/_seldonProvider.css +1 -1
- package/dist/scss/componentStyles.scss +1 -0
- package/dist/scss/components/Carousel/_carousel.scss +3 -3
- package/dist/scss/components/LinkBlock/_linkBlock.scss +2 -2
- package/dist/scss/components/SeldonImage/_seldonImage.scss +68 -0
- package/dist/scss/components/Text/_text.scss +2 -0
- package/dist/scss/providers/SeldonProvider/_seldonProvider.scss +1 -1
- package/dist/scss/site-furniture/Header/_header.scss +1 -0
- package/dist/site-furniture/Footer/Footer.js +2 -2
- package/dist/site-furniture/Header/Header.js +4 -4
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import { px as t } from "../../../utils/index.js";
|
|
|
4
4
|
import l from "../../../node_modules/classnames/index.js";
|
|
5
5
|
import { TextVariants as p } from "../../Text/types.js";
|
|
6
6
|
import f from "../../Text/Text.js";
|
|
7
|
-
const
|
|
7
|
+
const h = i.forwardRef(
|
|
8
8
|
({ id: o, children: n, className: d, isOffScreen: _, leftSectionHeading: m, rightSectionHeading: v }, u) => {
|
|
9
9
|
const s = i.Children.toArray(n).filter((a) => {
|
|
10
10
|
if (a && a.props.navGroup === "nav-link-start")
|
|
@@ -37,7 +37,7 @@ const N = i.forwardRef(
|
|
|
37
37
|
);
|
|
38
38
|
}
|
|
39
39
|
);
|
|
40
|
-
|
|
40
|
+
h.displayName = "NavigationList";
|
|
41
41
|
export {
|
|
42
|
-
|
|
42
|
+
h as default
|
|
43
43
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { getCommonProps as
|
|
2
|
+
import { forwardRef as n } from "react";
|
|
3
|
+
import { getCommonProps as p } from "../../utils/index.js";
|
|
4
4
|
import f from "../../node_modules/classnames/index.js";
|
|
5
|
-
const c =
|
|
5
|
+
const c = n(
|
|
6
6
|
({ children: e, className: o, ...a }, r) => {
|
|
7
|
-
const { className: m, ...s } =
|
|
7
|
+
const { className: m, ...s } = p(a, "PageContentWrapper");
|
|
8
8
|
return /* @__PURE__ */ t("div", { ...s, className: f(m, o), ...a, ref: r, children: e });
|
|
9
9
|
}
|
|
10
10
|
);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as b, useCallback as n, isValidElement as N, cloneElement as S } from "react";
|
|
3
3
|
import { getCommonProps as w } from "../../utils/index.js";
|
|
4
4
|
import { TransformWrapper as x, TransformComponent as T } from "../../node_modules/react-zoom-pan-pinch/dist/index.esm.js";
|
|
5
5
|
import c from "../../node_modules/classnames/index.js";
|
|
6
6
|
const $ = ({ onZoomChange: s, children: e, maxZoom: i = 10, className: f, ...r }) => {
|
|
7
7
|
var l;
|
|
8
|
-
const { className: t, ...d } = w(r, "PinchZoom"), [a, m] =
|
|
8
|
+
const { className: t, ...d } = w(r, "PinchZoom"), [a, m] = b(!1), u = n(
|
|
9
9
|
(P) => {
|
|
10
10
|
const { state: o } = P;
|
|
11
11
|
o.scale > 0.99 && o.scale < 1.01 ? (m(!1), s == null || s(!1)) : (m(!0), s == null || s(!0));
|
|
@@ -36,7 +36,7 @@ const $ = ({ onZoomChange: s, children: e, maxZoom: i = 10, className: f, ...r }
|
|
|
36
36
|
[`${t}-zoomed`]: a
|
|
37
37
|
}),
|
|
38
38
|
contentClass: `${t}-content`,
|
|
39
|
-
children:
|
|
39
|
+
children: N(e) ? S(e, { className: c(`${t}-child`, (l = e == null ? void 0 : e.props) == null ? void 0 : l.className) }) : e
|
|
40
40
|
}
|
|
41
41
|
)
|
|
42
42
|
}
|
|
@@ -3,21 +3,21 @@ import { getCommonProps as p, generatePaddingClassName as e, PaddingTokens as m
|
|
|
3
3
|
import C from "../../node_modules/classnames/index.js";
|
|
4
4
|
const g = ({
|
|
5
5
|
children: s,
|
|
6
|
-
element:
|
|
6
|
+
element: n,
|
|
7
7
|
padding: o = { top: m.lg, bottom: m.lg },
|
|
8
|
-
className:
|
|
8
|
+
className: a,
|
|
9
9
|
...t
|
|
10
10
|
}) => {
|
|
11
11
|
const { className: r, ...l } = p(t, "Row");
|
|
12
12
|
return /* @__PURE__ */ c(
|
|
13
|
-
|
|
13
|
+
n || "section",
|
|
14
14
|
{
|
|
15
15
|
...l,
|
|
16
16
|
className: C(
|
|
17
17
|
r,
|
|
18
18
|
o.top && e(o.top, "start"),
|
|
19
19
|
o.bottom && e(o.bottom, "end"),
|
|
20
|
-
|
|
20
|
+
a
|
|
21
21
|
),
|
|
22
22
|
...t,
|
|
23
23
|
children: s
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a, 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 f from "../../node_modules/classnames/index.js";
|
|
5
5
|
import H from "../Input/Input.js";
|
|
6
6
|
import O from "../Link/Link.js";
|
|
@@ -26,8 +26,8 @@ const ne = ({
|
|
|
26
26
|
getAllResultsLink: S = (r) => `/Search?Search=${r}`,
|
|
27
27
|
...v
|
|
28
28
|
}) => {
|
|
29
|
-
var
|
|
30
|
-
const { className: r, "data-testid": m, ...P } = j(v, "Search"), o = c.useContext(U), h = c.useRef(null), p = c.useRef(null), x = c.useRef(null), t = o.isSearchExpanded, s = (
|
|
29
|
+
var I;
|
|
30
|
+
const { className: r, "data-testid": m, ...P } = j(v, "Search"), o = c.useContext(U), h = c.useRef(null), p = c.useRef(null), x = c.useRef(null), t = o.isSearchExpanded, s = (I = h.current) == null ? void 0 : I.value, T = _ ? (e) => {
|
|
31
31
|
_(e.target.value);
|
|
32
32
|
} : void 0;
|
|
33
33
|
M(x, (e) => {
|
|
@@ -37,7 +37,7 @@ const ne = ({
|
|
|
37
37
|
var n;
|
|
38
38
|
if (e.stopPropagation(), e.key === "Enter") {
|
|
39
39
|
if (e.preventDefault(), s && s.length > 2) {
|
|
40
|
-
const y =
|
|
40
|
+
const y = N(S(s));
|
|
41
41
|
window.location.href = y;
|
|
42
42
|
}
|
|
43
43
|
e.currentTarget instanceof HTMLAnchorElement && e.currentTarget.click();
|
|
@@ -142,7 +142,7 @@ const ne = ({
|
|
|
142
142
|
children: /* @__PURE__ */ a("li", { className: `${r}__result`, children: /* @__PURE__ */ a(
|
|
143
143
|
O,
|
|
144
144
|
{
|
|
145
|
-
href: ((e) =>
|
|
145
|
+
href: ((e) => N(S(e)))(s),
|
|
146
146
|
children: /* @__PURE__ */ a("p", { children: L(s) })
|
|
147
147
|
}
|
|
148
148
|
) }, "viewAllSearchResults")
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
type AspectRatio = '16/9' | '1/1' | 'none';
|
|
3
|
+
export interface SeldonImageProps extends ComponentProps<'div'> {
|
|
4
|
+
/**
|
|
5
|
+
* The aspect ratio of the image container.
|
|
6
|
+
*/
|
|
7
|
+
aspectRatio?: AspectRatio;
|
|
8
|
+
/**
|
|
9
|
+
* The resize behavior of the image (see CSS object-fit).
|
|
10
|
+
*/
|
|
11
|
+
objectFit?: 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
|
12
|
+
/**
|
|
13
|
+
* Whether the image has a blur background covering the background of the image container
|
|
14
|
+
*/
|
|
15
|
+
hasBlurBackground?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The image to display.
|
|
18
|
+
*/
|
|
19
|
+
src: string;
|
|
20
|
+
/**
|
|
21
|
+
* The alt text of the image.
|
|
22
|
+
*/
|
|
23
|
+
alt: string;
|
|
24
|
+
/**
|
|
25
|
+
* The class name of the child img element.
|
|
26
|
+
*/
|
|
27
|
+
imageClassName?: string;
|
|
28
|
+
/**
|
|
29
|
+
* The style of the child img element.
|
|
30
|
+
*/
|
|
31
|
+
imageStyle?: React.CSSProperties;
|
|
32
|
+
/**
|
|
33
|
+
* The text to display when the image fails to load.
|
|
34
|
+
*/
|
|
35
|
+
errorText?: string;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* ## Overview
|
|
39
|
+
*
|
|
40
|
+
* Component for displaying an image with optional blur background, aspect ratio, and object fit.
|
|
41
|
+
*
|
|
42
|
+
* [Figma Link](https://www.figma.com/design/hMu9IWH5N3KamJy8tLFdyV/EASEL-Compendium%3A-Tokens%2C-Components-%26-Patterns?m=auto&node-id=4501-64590)
|
|
43
|
+
*
|
|
44
|
+
* [Storybook Link](https://phillips-seldon.netlify.app/?path=/docs/components-seldonimage--overview)
|
|
45
|
+
*/
|
|
46
|
+
declare const SeldonImage: import("react").ForwardRefExoticComponent<Omit<SeldonImageProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
47
|
+
export default SeldonImage;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { jsxs as b, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as h, useRef as I, useState as v, useEffect as x } from "react";
|
|
3
|
+
import { getCommonProps as y } from "../../utils/index.js";
|
|
4
|
+
import n from "../../node_modules/classnames/index.js";
|
|
5
|
+
const E = h(
|
|
6
|
+
({
|
|
7
|
+
className: f,
|
|
8
|
+
aspectRatio: d = "none",
|
|
9
|
+
objectFit: l = "none",
|
|
10
|
+
hasBlurBackground: $ = !1,
|
|
11
|
+
imageClassName: u,
|
|
12
|
+
imageStyle: p,
|
|
13
|
+
src: s,
|
|
14
|
+
alt: m,
|
|
15
|
+
errorText: N = "Error loading image",
|
|
16
|
+
...i
|
|
17
|
+
}, S) => {
|
|
18
|
+
const { className: e, ...t } = y(i, "SeldonImage"), g = I(null), [r, o] = v("loading");
|
|
19
|
+
return x(() => {
|
|
20
|
+
var c;
|
|
21
|
+
(c = g.current) != null && c.complete && o("loaded");
|
|
22
|
+
}, []), /* @__PURE__ */ b(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
ref: S,
|
|
26
|
+
className: n(e, f, {
|
|
27
|
+
[`${e}--hidden`]: r === "loading" || r === "error",
|
|
28
|
+
[`${e}--aspect-ratio-${d.replace("/", "-")}`]: d !== "none"
|
|
29
|
+
}),
|
|
30
|
+
role: "img",
|
|
31
|
+
"aria-label": m,
|
|
32
|
+
...i,
|
|
33
|
+
...t,
|
|
34
|
+
children: [
|
|
35
|
+
$ && /* @__PURE__ */ a(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
className: n(`${e}-blur`, {
|
|
39
|
+
[`${e}-blur--hidden`]: r === "loading" || r === "error"
|
|
40
|
+
}),
|
|
41
|
+
style: { backgroundImage: `url(${s})` }
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
r === "error" && /* @__PURE__ */ a("div", { className: `${e}--error`, children: `${N}` }),
|
|
45
|
+
/* @__PURE__ */ a(
|
|
46
|
+
"img",
|
|
47
|
+
{
|
|
48
|
+
className: n(`${e}-img`, u, {
|
|
49
|
+
[`${e}-img--hidden`]: r === "loading" || r === "error",
|
|
50
|
+
[`${e}-img--object-fit-${l}`]: l !== "none"
|
|
51
|
+
}),
|
|
52
|
+
style: p,
|
|
53
|
+
src: s,
|
|
54
|
+
alt: m,
|
|
55
|
+
"data-testid": `${t["data-testid"]}-img`,
|
|
56
|
+
ref: g,
|
|
57
|
+
onLoad: () => {
|
|
58
|
+
o("loaded");
|
|
59
|
+
},
|
|
60
|
+
onError: () => {
|
|
61
|
+
o("error");
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
E.displayName = "SeldonImage";
|
|
71
|
+
export {
|
|
72
|
+
E as default
|
|
73
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as SeldonImage, type SeldonImageProps } from './SeldonImage';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import n from "../../node_modules/classnames/index.js";
|
|
3
3
|
import { getCommonProps as c } from "../../utils/index.js";
|
|
4
|
-
const
|
|
4
|
+
const P = ({
|
|
5
5
|
children: o,
|
|
6
6
|
className: m,
|
|
7
7
|
element: t = "section",
|
|
@@ -20,5 +20,5 @@ const N = ({
|
|
|
20
20
|
);
|
|
21
21
|
};
|
|
22
22
|
export {
|
|
23
|
-
|
|
23
|
+
P as default
|
|
24
24
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { getCommonProps as d } from "../../utils/index.js";
|
|
3
3
|
import l from "../../node_modules/classnames/index.js";
|
|
4
|
-
const
|
|
4
|
+
const u = ({ aspectRatio: s = 16 / 9, className: o, videoSource: m, ...e }) => {
|
|
5
5
|
const { className: a, "data-testid": r, ...i } = d(e, "Video"), c = {
|
|
6
6
|
className: l(a, o),
|
|
7
7
|
"data-testid": r,
|
|
@@ -22,5 +22,5 @@ const N = ({ aspectRatio: s = 16 / 9, className: o, videoSource: m, ...e }) => {
|
|
|
22
22
|
) });
|
|
23
23
|
};
|
|
24
24
|
export {
|
|
25
|
-
|
|
25
|
+
u as default
|
|
26
26
|
};
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -62,6 +62,7 @@ import { default as bo } from "./components/Detail/Detail.js";
|
|
|
62
62
|
import { default as Ao } from "./patterns/DetailList/DetailList.js";
|
|
63
63
|
import { DetailListAlignment as ho } from "./patterns/DetailList/types.js";
|
|
64
64
|
import { default as No } from "./components/PinchZoom/PinchZoom.js";
|
|
65
|
+
import { default as wo } from "./components/SeldonImage/SeldonImage.js";
|
|
65
66
|
export {
|
|
66
67
|
He as Accordion,
|
|
67
68
|
Oe as AccordionItem,
|
|
@@ -110,6 +111,7 @@ export {
|
|
|
110
111
|
No as PinchZoom,
|
|
111
112
|
ee as Row,
|
|
112
113
|
le as Search,
|
|
114
|
+
wo as SeldonImage,
|
|
113
115
|
uo as SeldonProvider,
|
|
114
116
|
pe as Select,
|
|
115
117
|
ce as Social,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __module as e } from "../../../../_virtual/
|
|
1
|
+
import { __module as e } from "../../../../_virtual/index5.js";
|
|
2
2
|
import { __require as o } from "./cjs/react-is.production.min.js";
|
|
3
3
|
import { __require as t } from "./cjs/react-is.development.js";
|
|
4
4
|
var r;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import j, { forwardRef as $ } from "react";
|
|
3
3
|
import l from "../../node_modules/classnames/index.js";
|
|
4
|
-
import { getCommonProps as
|
|
4
|
+
import { getCommonProps as D, px as s } from "../../utils/index.js";
|
|
5
5
|
import { DetailListAlignment as t } from "./types.js";
|
|
6
|
-
import { getDetailKey as
|
|
7
|
-
const L =
|
|
6
|
+
import { getDetailKey as N } from "./utils.js";
|
|
7
|
+
const L = $(
|
|
8
8
|
({ alignment: a = t.justified, className: p, children: e, hasSeparators: u = !1, ...m }, c) => {
|
|
9
|
-
const { className: r, ...d } =
|
|
9
|
+
const { className: r, ...d } = D(m, "DetailList"), o = Array.isArray(e) ? e : [e];
|
|
10
10
|
return /* @__PURE__ */ f(
|
|
11
11
|
"dl",
|
|
12
12
|
{
|
|
@@ -18,7 +18,7 @@ const L = N(
|
|
|
18
18
|
...m,
|
|
19
19
|
ref: c,
|
|
20
20
|
children: o == null ? void 0 : o.map(
|
|
21
|
-
(i,
|
|
21
|
+
(i, n) => j.isValidElement(i) ? /* @__PURE__ */ f(
|
|
22
22
|
"div",
|
|
23
23
|
{
|
|
24
24
|
className: l(`${r}-wrapper`, {
|
|
@@ -28,7 +28,7 @@ const L = N(
|
|
|
28
28
|
}),
|
|
29
29
|
children: i
|
|
30
30
|
},
|
|
31
|
-
|
|
31
|
+
N(i, n)
|
|
32
32
|
) : void 0
|
|
33
33
|
)
|
|
34
34
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as b, Fragment as L, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { getCommonProps as
|
|
2
|
+
import { forwardRef as S } from "react";
|
|
3
|
+
import { getCommonProps as N, noOp as T } from "../../utils/index.js";
|
|
4
4
|
import x from "../../node_modules/classnames/index.js";
|
|
5
5
|
import { SupportedLanguages as s } from "../../types/commonTypes.js";
|
|
6
6
|
import C from "../../components/Dropdown/Dropdown.js";
|
|
@@ -36,7 +36,7 @@ const j = ({
|
|
|
36
36
|
o.value
|
|
37
37
|
)) })
|
|
38
38
|
}
|
|
39
|
-
) }), A =
|
|
39
|
+
) }), A = S(
|
|
40
40
|
({
|
|
41
41
|
className: a,
|
|
42
42
|
currentLanguage: n = s.en,
|
|
@@ -50,7 +50,7 @@ const j = ({
|
|
|
50
50
|
...o
|
|
51
51
|
}, c) => {
|
|
52
52
|
var d, g;
|
|
53
|
-
const { className: p, ...h } =
|
|
53
|
+
const { className: p, ...h } = N({ id: l }, "LanguageSelector"), v = (g = (d = r.find((i) => i.value === n)) == null ? void 0 : d.label) != null ? g : "English", u = {
|
|
54
54
|
...h,
|
|
55
55
|
...o,
|
|
56
56
|
id: l,
|
|
@@ -2,9 +2,9 @@ import { jsxs as c, jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import l from "../../node_modules/classnames/index.js";
|
|
3
3
|
import { getCommonProps as f } from "../../utils/index.js";
|
|
4
4
|
import p from "../../components/Button/Button.js";
|
|
5
|
-
import { ButtonVariants as
|
|
6
|
-
import { TextVariants as
|
|
7
|
-
import
|
|
5
|
+
import { ButtonVariants as d } from "../../components/Button/types.js";
|
|
6
|
+
import { TextVariants as u } from "../../components/Text/types.js";
|
|
7
|
+
import N from "../../components/Text/Text.js";
|
|
8
8
|
const T = ({
|
|
9
9
|
className: a,
|
|
10
10
|
children: e,
|
|
@@ -15,8 +15,8 @@ const T = ({
|
|
|
15
15
|
}) => {
|
|
16
16
|
const { className: r, ...n } = f(o, "Social");
|
|
17
17
|
return /* @__PURE__ */ c("div", { ...n, className: l(r, a), ...o, children: [
|
|
18
|
-
/* @__PURE__ */ t(
|
|
19
|
-
/* @__PURE__ */ t(p, { onClick: i, variant:
|
|
18
|
+
/* @__PURE__ */ t(N, { variant: u.heading4, className: `${r}__header`, children: s }),
|
|
19
|
+
/* @__PURE__ */ t(p, { onClick: i, variant: d.tertiary, className: `${r}__button`, children: m }),
|
|
20
20
|
e
|
|
21
21
|
] });
|
|
22
22
|
};
|
|
@@ -16,20 +16,20 @@ const k = ({
|
|
|
16
16
|
inputPlaceholder: f = "example@email.com",
|
|
17
17
|
title: g = "Never Miss A Moment",
|
|
18
18
|
loadingText: _ = "Loading...",
|
|
19
|
-
invalidText:
|
|
20
|
-
errorText:
|
|
21
|
-
successText:
|
|
19
|
+
invalidText: h = "",
|
|
20
|
+
errorText: v = "An error occurred. Please try again.",
|
|
21
|
+
successText: x,
|
|
22
22
|
privacyText: i = "By signing up, you agree to receive email communications from Phillips.",
|
|
23
23
|
subscriptionState: e = o.Default,
|
|
24
24
|
...t
|
|
25
25
|
}) => {
|
|
26
|
-
const { className: r, ...
|
|
27
|
-
invalid:
|
|
28
|
-
success:
|
|
26
|
+
const { className: r, ...N } = L(t, "Subscribe"), y = e === o.Invalid, $ = e === o.Loading, b = e === o.Success, E = e === o.Error, P = {
|
|
27
|
+
invalid: h,
|
|
28
|
+
success: x,
|
|
29
29
|
loading: _,
|
|
30
|
-
error:
|
|
30
|
+
error: v
|
|
31
31
|
}, l = e !== o.Default ? P[e] : "", A = b || $, B = y || E;
|
|
32
|
-
return /* @__PURE__ */ C(u, { ...
|
|
32
|
+
return /* @__PURE__ */ C(u, { ...N, className: I(r, s), noValidate: !0, ...t, children: [
|
|
33
33
|
/* @__PURE__ */ n("h3", { className: `${r}__title`, children: g }),
|
|
34
34
|
a ? /* @__PURE__ */ n("p", { className: `${r}__blurb`, children: a }) : null,
|
|
35
35
|
/* @__PURE__ */ n(
|
|
@@ -17,8 +17,8 @@ const A = x(
|
|
|
17
17
|
href: u = "/account",
|
|
18
18
|
...t
|
|
19
19
|
}, f) => {
|
|
20
|
-
const { className: n, ...
|
|
21
|
-
return /* @__PURE__ */ o("div", { ...
|
|
20
|
+
const { className: n, ...h } = C(t, "UserManagement"), N = e === a.LoggedIn, _ = e !== a.Loading;
|
|
21
|
+
return /* @__PURE__ */ o("div", { ...h, className: v(n, l), ...t, ref: f, children: _ && /* @__PURE__ */ o(L, { children: N ? /* @__PURE__ */ c(i, { className: `${n}__login`, href: u, children: [
|
|
22
22
|
/* @__PURE__ */ o(r, { className: `${n}__account-icon` }),
|
|
23
23
|
/* @__PURE__ */ o(m, { variant: s.body3, children: p })
|
|
24
24
|
] }) : /* @__PURE__ */ c("button", { className: `${n}__login`, onClick: d, children: [
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import * as d from "react";
|
|
3
3
|
import { createElement as L } from "react";
|
|
4
|
-
import
|
|
4
|
+
import S from "../../node_modules/classnames/index.js";
|
|
5
5
|
import { getCommonProps as M } from "../../utils/index.js";
|
|
6
6
|
import P from "./ViewingsListCard.js";
|
|
7
7
|
import R from "../../components/Button/Button.js";
|
|
8
|
-
const
|
|
9
|
-
cardTitle:
|
|
10
|
-
className:
|
|
8
|
+
const $ = () => Math.floor(Math.random() * 100) + Date.now(), G = ({
|
|
9
|
+
cardTitle: C = "Viewing Details",
|
|
10
|
+
className: E,
|
|
11
11
|
i18n: f = {},
|
|
12
12
|
onAdd: r,
|
|
13
13
|
onDelete: e,
|
|
14
|
-
onSave:
|
|
14
|
+
onSave: N,
|
|
15
15
|
title: O,
|
|
16
16
|
viewings: c,
|
|
17
17
|
...i
|
|
@@ -21,23 +21,23 @@ const S = () => Math.floor(Math.random() * 100) + Date.now(), G = ({
|
|
|
21
21
|
h(c);
|
|
22
22
|
}, [c]);
|
|
23
23
|
const { addViewingsBtnLabel: y = "ADD VIEWINGS" } = f, b = () => {
|
|
24
|
-
const t = `${
|
|
24
|
+
const t = `${$()}${a ? "-" + a.length : ""}`;
|
|
25
25
|
n(t), u(t), r && r(t);
|
|
26
26
|
}, V = (t) => {
|
|
27
27
|
n(""), typeof e == "function" && e(t);
|
|
28
28
|
}, k = (t) => {
|
|
29
29
|
n(t), u(a == null ? void 0 : a.find((o) => o.id === t));
|
|
30
30
|
}, x = (t) => {
|
|
31
|
-
|
|
31
|
+
N(t) && n("");
|
|
32
32
|
}, B = () => {
|
|
33
33
|
typeof s == "string" ? typeof e == "function" && e(s) : m === (s == null ? void 0 : s.id) && h((t) => t == null ? void 0 : t.map((o) => o.id === s.id ? s : o)), n("");
|
|
34
34
|
};
|
|
35
|
-
return /* @__PURE__ */ L("div", { ...D, className:
|
|
35
|
+
return /* @__PURE__ */ L("div", { ...D, className: S(p, E), key: m, ...i }, /* @__PURE__ */ l("h2", { className: S(`${p}__title`), children: O }), a == null ? void 0 : a.map((t, o) => /* @__PURE__ */ l(
|
|
36
36
|
P,
|
|
37
37
|
{
|
|
38
38
|
...t,
|
|
39
39
|
...f,
|
|
40
|
-
cardTitle: t.location ? `${
|
|
40
|
+
cardTitle: t.location ? `${C} ${o + 1}` : void 0,
|
|
41
41
|
isEditState: m === t.id,
|
|
42
42
|
onCancel: B,
|
|
43
43
|
onDelete: V,
|
|
@@ -45,7 +45,7 @@ const S = () => Math.floor(Math.random() * 100) + Date.now(), G = ({
|
|
|
45
45
|
onSave: x
|
|
46
46
|
},
|
|
47
47
|
`${t.id}`
|
|
48
|
-
)), /* @__PURE__ */ l(R, { id: `viewings-list-add-btn-${i.id ||
|
|
48
|
+
)), /* @__PURE__ */ l(R, { id: `viewings-list-add-btn-${i.id || $()}`, size: "sm", onClick: b, children: y }));
|
|
49
49
|
};
|
|
50
50
|
export {
|
|
51
51
|
G as default
|
|
@@ -16,14 +16,14 @@ const i = `${u}-viewings-list-card`, dt = ({
|
|
|
16
16
|
address3: z,
|
|
17
17
|
address3Label: A,
|
|
18
18
|
cancelBtnLabel: L = "CANCEL",
|
|
19
|
-
cardTitle:
|
|
20
|
-
deleteBtnLabel:
|
|
21
|
-
editBtnLabel:
|
|
19
|
+
cardTitle: T = "Add New Viewing",
|
|
20
|
+
deleteBtnLabel: V = "DELETE",
|
|
21
|
+
editBtnLabel: _ = "EDIT",
|
|
22
22
|
isEditState: o,
|
|
23
23
|
enableOnSite: f = "false",
|
|
24
|
-
enableOnSiteToggleLabel:
|
|
25
|
-
email:
|
|
26
|
-
emailLabel:
|
|
24
|
+
enableOnSiteToggleLabel: k = "Enabled on website",
|
|
25
|
+
email: I,
|
|
26
|
+
emailLabel: N = "Email",
|
|
27
27
|
emailLink: S,
|
|
28
28
|
emailLinkLabel: j = "Email Address",
|
|
29
29
|
emailOn: B = "false",
|
|
@@ -77,7 +77,7 @@ const i = `${u}-viewings-list-card`, dt = ({
|
|
|
77
77
|
id: e,
|
|
78
78
|
className: mt(`${i}`, { [`${i}--edit-state`]: o }),
|
|
79
79
|
children: [
|
|
80
|
-
/* @__PURE__ */ t("h3", { className: `${i}__title`, children:
|
|
80
|
+
/* @__PURE__ */ t("h3", { className: `${i}__title`, children: T }),
|
|
81
81
|
/* @__PURE__ */ t("input", { type: "hidden", name: "id", value: e }),
|
|
82
82
|
/* @__PURE__ */ t(
|
|
83
83
|
y,
|
|
@@ -104,8 +104,8 @@ const i = `${u}-viewings-list-card`, dt = ({
|
|
|
104
104
|
address2Label: x,
|
|
105
105
|
address3: z,
|
|
106
106
|
address3Label: A,
|
|
107
|
-
email:
|
|
108
|
-
emailLabel:
|
|
107
|
+
email: I,
|
|
108
|
+
emailLabel: N,
|
|
109
109
|
emailLink: S,
|
|
110
110
|
emailLinkLabel: j,
|
|
111
111
|
emailOn: B,
|
|
@@ -138,7 +138,7 @@ const i = `${u}-viewings-list-card`, dt = ({
|
|
|
138
138
|
id: `enableOnSite-${e}`,
|
|
139
139
|
type: "toggle",
|
|
140
140
|
defaultChecked: f === "true",
|
|
141
|
-
labelText:
|
|
141
|
+
labelText: k,
|
|
142
142
|
size: "md",
|
|
143
143
|
inline: !0,
|
|
144
144
|
value: "true",
|
|
@@ -181,7 +181,7 @@ const i = `${u}-viewings-list-card`, dt = ({
|
|
|
181
181
|
type: "button",
|
|
182
182
|
size: "sm",
|
|
183
183
|
onClick: it,
|
|
184
|
-
children:
|
|
184
|
+
children: _
|
|
185
185
|
}
|
|
186
186
|
),
|
|
187
187
|
/* @__PURE__ */ t(
|
|
@@ -192,7 +192,7 @@ const i = `${u}-viewings-list-card`, dt = ({
|
|
|
192
192
|
type: "button",
|
|
193
193
|
size: "sm",
|
|
194
194
|
onClick: () => typeof b == "function" && b(e),
|
|
195
|
-
children:
|
|
195
|
+
children: V
|
|
196
196
|
}
|
|
197
197
|
)
|
|
198
198
|
] }) })
|
|
@@ -22,9 +22,9 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
22
22
|
invalidFields: e,
|
|
23
23
|
previewDates: y,
|
|
24
24
|
previewDatesLabel: E = "Date(s)",
|
|
25
|
-
previewHours1:
|
|
26
|
-
previewHours1Label:
|
|
27
|
-
previewHours2:
|
|
25
|
+
previewHours1: U,
|
|
26
|
+
previewHours1Label: A = "Hours1",
|
|
27
|
+
previewHours2: N,
|
|
28
28
|
previewHours2Label: P = "Hours2",
|
|
29
29
|
previewLabel: j = "Label ('Preview', 'Opening Night', etc)",
|
|
30
30
|
previewLabelValue: I,
|
|
@@ -144,8 +144,8 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
144
144
|
{
|
|
145
145
|
id: `previewHours1-${r}`,
|
|
146
146
|
name: "previewHours1",
|
|
147
|
-
defaultValue:
|
|
148
|
-
labelText:
|
|
147
|
+
defaultValue: U,
|
|
148
|
+
labelText: A,
|
|
149
149
|
size: "sm",
|
|
150
150
|
invalid: e == null ? void 0 : e.previewHours1,
|
|
151
151
|
invalidText: e == null ? void 0 : e.previewHours1,
|
|
@@ -157,7 +157,7 @@ const o = `${X}-viewings-list-card-form`, l = ({
|
|
|
157
157
|
{
|
|
158
158
|
id: `previewHours2-${r}`,
|
|
159
159
|
name: "previewHours2",
|
|
160
|
-
defaultValue:
|
|
160
|
+
defaultValue: N,
|
|
161
161
|
labelText: P,
|
|
162
162
|
size: "sm",
|
|
163
163
|
invalid: e == null ? void 0 : e.previewHours2,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.seldon-provider *,.seldon-provider *:before,.seldon-provider *:after{box-sizing:border-box}.seldon-provider img,.seldon-provider picture,.seldon-provider video,.seldon-provider canvas,.seldon-provider svg{display:block;max-width:100%}.seldon-provider input,.seldon-provider button,.seldon-provider textarea,.seldon-provider select{font:inherit}.seldon-provider strong{font-variation-settings:"wght" 700;font-weight:unset}.seldon-provider p,.seldon-provider h1,.seldon-provider h2,.seldon-provider h3,.seldon-provider h4,.seldon-provider h5,.seldon-provider h6{font-weight:unset;
|
|
1
|
+
.seldon-provider *,.seldon-provider *:before,.seldon-provider *:after{box-sizing:border-box}.seldon-provider img,.seldon-provider picture,.seldon-provider video,.seldon-provider canvas,.seldon-provider svg{display:block;max-width:100%}.seldon-provider input,.seldon-provider button,.seldon-provider textarea,.seldon-provider select{font:inherit}.seldon-provider strong{font-variation-settings:"wght" 700;font-weight:unset}.seldon-provider blockquote,.seldon-provider p,.seldon-provider h1,.seldon-provider h2,.seldon-provider h3,.seldon-provider h4,.seldon-provider h5,.seldon-provider h6{font-weight:unset;overflow-wrap:break-word}.seldon-provider a{color:inherit;text-decoration:none}.seldon-provider ul{list-style:none;padding:0}.seldon-provider li{list-style:none}
|
|
@@ -69,19 +69,19 @@
|
|
|
69
69
|
display: flex;
|
|
70
70
|
height: 8px;
|
|
71
71
|
justify-content: center;
|
|
72
|
-
padding:
|
|
72
|
+
padding: 1px;
|
|
73
73
|
width: 8px;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
&-dot {
|
|
77
|
-
border: 1px solid #adadad;
|
|
78
77
|
border-radius: 50%;
|
|
79
78
|
height: 100%;
|
|
79
|
+
outline: 1px solid #adadad;
|
|
80
80
|
width: 100%;
|
|
81
81
|
|
|
82
82
|
&-selected {
|
|
83
83
|
background-color: #525050;
|
|
84
|
-
|
|
84
|
+
outline-color: #525050;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
}
|